From 79a7c2157e052049e2ba314e2904fdd5ff6e5e26 Mon Sep 17 00:00:00 2001 From: Whitney Armstrong <warmstrong@anl.gov> Date: Thu, 22 Oct 2020 10:33:47 -0500 Subject: [PATCH] modified: tracking/central_electrons.sh modified: tracking/options/tracker_reconstruction.py --- tracking/central_electrons.sh | 23 +++++++++++++--------- tracking/options/tracker_reconstruction.py | 6 +++--- tracking/scripts/gen_central_electrons.cxx | 6 +++--- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/tracking/central_electrons.sh b/tracking/central_electrons.sh index 2ce49b8d..8fb2dade 100644 --- a/tracking/central_electrons.sh +++ b/tracking/central_electrons.sh @@ -8,6 +8,10 @@ if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then export JUGGLER_N_EVENTS=100 fi +if [[ ! -n "${JUGGLER_INSTALL_PREFIX}" ]] ; then + export JUGGLER_INSTALL_PREFIX="/usr/local" +fi + export JUGGLER_FILE_NAME_TAG="central_electrons" export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc" @@ -18,22 +22,23 @@ echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" -# Build the detector constructors. +## Build the detector constructors. git clone https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git mkdir ${JUGGLER_DETECTOR}/build pushd ${JUGGLER_DETECTOR}/build cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j30 install popd - -# generate the input events -# note datasets is now only used to develop datasets. -#git clone https://eicweb.phy.anl.gov/EIC/datasets.git datasets +# +## generate the input events +## note datasets is now only used to develop datasets. +##git clone https://eicweb.phy.anl.gov/EIC/datasets.git datasets root -b -q "tracking/scripts/gen_central_electrons.cxx(${JUGGLER_N_EVENTS}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")" - +# pushd ${JUGGLER_DETECTOR} -ls -l -# run geant4 simulations +#ls -l +## run geant4 simulations npsim --runType batch \ + --part.minimalKineticEnergy 1000*GeV \ -v WARNING \ --numberOfEvents ${JUGGLER_N_EVENTS} \ --compactFile ${JUGGLER_DETECTOR}.xml \ @@ -41,7 +46,7 @@ npsim --runType batch \ --outputFile ${JUGGLER_SIM_FILE} # Need to figure out how to pass file name to juggler from the commandline -xenv -x /usr/local/Juggler.xenv gaudirun.py ../tracking/options/tracker_reconstruction.py +xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv gaudirun.py ../tracking/options/tracker_reconstruction.py ls -l popd diff --git a/tracking/options/tracker_reconstruction.py b/tracking/options/tracker_reconstruction.py index 5db1281b..68988a17 100644 --- a/tracking/options/tracker_reconstruction.py +++ b/tracking/options/tracker_reconstruction.py @@ -37,11 +37,11 @@ trkcopier = TrkCopier("TrkCopier", inputCollection="SiTrackerBarrelHits", output #caldigi = ExampleCaloDigi(inputHitCollection="FAEC_ShHits",outputHitCollection="RawFAECShowerHits") #ufsd_digi = UFSDTrackerDigi("ufsd_digi", inputHitCollection="SiVertexBarrelHits",outputHitCollection="VertexRawHits",timeResolution=8) ufsd_digi = UFSDTrackerDigi("ufsd_digi", inputHitCollection="SiTrackerBarrelHits",outputHitCollection="SiTrackerBarrelRawHits",timeResolution=8) -trackpartruth = TrackParamTruthInit("trk_par_init",inputMCParticles="mcparticles",outputInitialTrackParameters="InitTrackParams")#,OutputLevel=DEBUG) +trackpartruth = TrackParamTruthInit("trk_par_init",inputMCParticles="mcparticles",outputInitialTrackParameters="InitTrackParams",OutputLevel=DEBUG) trackerhit = TrackerHitReconstruction("trk_hit_reco",inputHitCollection="SiTrackerBarrelRawHits",outputHitCollection="TrackerBarrelRecHits",OutputLevel=DEBUG) sourcelinker = TrackerSourceLinker("trk_srclinker",inputHitCollection="TrackerBarrelRecHits",outputSourceLinks="BarrelTrackSourceLinks",OutputLevel=DEBUG) trk_find_alg = TrackFindingAlgorithm("trk_find_alg",inputSourceLinks="BarrelTrackSourceLinks",inputInitialTrackParameters= "InitTrackParams", outputTrajectories="trajectories",OutputLevel=DEBUG) -parts_from_fit = ParticlesFromTrackFit("parts_from_fit",inputTrajectories="trajectories",outputParticles="ReconstructedParticles")#,OutputLevel=DEBUG) +parts_from_fit = ParticlesFromTrackFit("parts_from_fit",inputTrajectories="trajectories",outputParticles="ReconstructedParticles",OutputLevel=DEBUG) #types = [] ## this printout is useful to check that the type information is passed to python correctly @@ -72,7 +72,7 @@ out.outputCommands = ["keep *", ApplicationMgr( TopAlg = [podioinput, - copier, trkcopier, + #copier, trkcopier, ufsd_digi, trackerhit, sourcelinker, trackpartruth, trk_find_alg, parts_from_fit, diff --git a/tracking/scripts/gen_central_electrons.cxx b/tracking/scripts/gen_central_electrons.cxx index 1f57715a..06867dfa 100644 --- a/tracking/scripts/gen_central_electrons.cxx +++ b/tracking/scripts/gen_central_electrons.cxx @@ -17,8 +17,8 @@ using namespace HepMC3; void gen_central_electrons(int n_events = 100, const char* out_fname = "central_electrons.hepmc") { - double cos_theta_min = std::cos(M_PI * (45 / 180.0)); - double cos_theta_max = std::cos(125*M_PI); + double cos_theta_min = std::cos( 70.0*(M_PI/180.0)); + double cos_theta_max = std::cos(110.0*(M_PI/180.0)); WriterAscii hepmc_output(out_fname); int events_parsed = 0; @@ -39,7 +39,7 @@ void gen_central_electrons(int n_events = 100, FourVector(0.0, 0.0, 0.0, 0.938), 2212, 4); // Define momentum - Double_t p = r1->Uniform(0.0, 30.0); + Double_t p = r1->Uniform(1.0, 10.0); Double_t phi = r1->Uniform(0.0, 2.0 * M_PI); Double_t costh = r1->Uniform(cos_theta_min, cos_theta_max); Double_t th = std::acos(costh); -- GitLab