Skip to content
Snippets Groups Projects
Commit 79a7c215 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: tracking/central_electrons.sh

	modified:   tracking/options/tracker_reconstruction.py
parent 7dad9e3d
No related branches found
No related tags found
1 merge request!19Tracking
...@@ -8,6 +8,10 @@ if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then ...@@ -8,6 +8,10 @@ if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then
export JUGGLER_N_EVENTS=100 export JUGGLER_N_EVENTS=100
fi fi
if [[ ! -n "${JUGGLER_INSTALL_PREFIX}" ]] ; then
export JUGGLER_INSTALL_PREFIX="/usr/local"
fi
export JUGGLER_FILE_NAME_TAG="central_electrons" export JUGGLER_FILE_NAME_TAG="central_electrons"
export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc" export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc"
...@@ -18,22 +22,23 @@ echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" ...@@ -18,22 +22,23 @@ echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" 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 git clone https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git
mkdir ${JUGGLER_DETECTOR}/build mkdir ${JUGGLER_DETECTOR}/build
pushd ${JUGGLER_DETECTOR}/build pushd ${JUGGLER_DETECTOR}/build
cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j30 install cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j30 install
popd popd
#
# generate the input events ## generate the input events
# note datasets is now only used to develop datasets. ## note datasets is now only used to develop datasets.
#git clone https://eicweb.phy.anl.gov/EIC/datasets.git 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\")" root -b -q "tracking/scripts/gen_central_electrons.cxx(${JUGGLER_N_EVENTS}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")"
#
pushd ${JUGGLER_DETECTOR} pushd ${JUGGLER_DETECTOR}
ls -l #ls -l
# run geant4 simulations ## run geant4 simulations
npsim --runType batch \ npsim --runType batch \
--part.minimalKineticEnergy 1000*GeV \
-v WARNING \ -v WARNING \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${JUGGLER_DETECTOR}.xml \ --compactFile ${JUGGLER_DETECTOR}.xml \
...@@ -41,7 +46,7 @@ npsim --runType batch \ ...@@ -41,7 +46,7 @@ npsim --runType batch \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
# Need to figure out how to pass file name to juggler from the commandline # 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 ls -l
popd popd
......
...@@ -37,11 +37,11 @@ trkcopier = TrkCopier("TrkCopier", inputCollection="SiTrackerBarrelHits", output ...@@ -37,11 +37,11 @@ trkcopier = TrkCopier("TrkCopier", inputCollection="SiTrackerBarrelHits", output
#caldigi = ExampleCaloDigi(inputHitCollection="FAEC_ShHits",outputHitCollection="RawFAECShowerHits") #caldigi = ExampleCaloDigi(inputHitCollection="FAEC_ShHits",outputHitCollection="RawFAECShowerHits")
#ufsd_digi = UFSDTrackerDigi("ufsd_digi", inputHitCollection="SiVertexBarrelHits",outputHitCollection="VertexRawHits",timeResolution=8) #ufsd_digi = UFSDTrackerDigi("ufsd_digi", inputHitCollection="SiVertexBarrelHits",outputHitCollection="VertexRawHits",timeResolution=8)
ufsd_digi = UFSDTrackerDigi("ufsd_digi", inputHitCollection="SiTrackerBarrelHits",outputHitCollection="SiTrackerBarrelRawHits",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) trackerhit = TrackerHitReconstruction("trk_hit_reco",inputHitCollection="SiTrackerBarrelRawHits",outputHitCollection="TrackerBarrelRecHits",OutputLevel=DEBUG)
sourcelinker = TrackerSourceLinker("trk_srclinker",inputHitCollection="TrackerBarrelRecHits",outputSourceLinks="BarrelTrackSourceLinks",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) 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 = [] #types = []
## this printout is useful to check that the type information is passed to python correctly ## this printout is useful to check that the type information is passed to python correctly
...@@ -72,7 +72,7 @@ out.outputCommands = ["keep *", ...@@ -72,7 +72,7 @@ out.outputCommands = ["keep *",
ApplicationMgr( ApplicationMgr(
TopAlg = [podioinput, TopAlg = [podioinput,
copier, trkcopier, #copier, trkcopier,
ufsd_digi, trackerhit, ufsd_digi, trackerhit,
sourcelinker, trackpartruth, sourcelinker, trackpartruth,
trk_find_alg, parts_from_fit, trk_find_alg, parts_from_fit,
......
...@@ -17,8 +17,8 @@ using namespace HepMC3; ...@@ -17,8 +17,8 @@ using namespace HepMC3;
void gen_central_electrons(int n_events = 100, void gen_central_electrons(int n_events = 100,
const char* out_fname = "central_electrons.hepmc") const char* out_fname = "central_electrons.hepmc")
{ {
double cos_theta_min = std::cos(M_PI * (45 / 180.0)); double cos_theta_min = std::cos( 70.0*(M_PI/180.0));
double cos_theta_max = std::cos(125*M_PI); double cos_theta_max = std::cos(110.0*(M_PI/180.0));
WriterAscii hepmc_output(out_fname); WriterAscii hepmc_output(out_fname);
int events_parsed = 0; int events_parsed = 0;
...@@ -39,7 +39,7 @@ void gen_central_electrons(int n_events = 100, ...@@ -39,7 +39,7 @@ void gen_central_electrons(int n_events = 100,
FourVector(0.0, 0.0, 0.0, 0.938), 2212, 4); FourVector(0.0, 0.0, 0.0, 0.938), 2212, 4);
// Define momentum // 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 phi = r1->Uniform(0.0, 2.0 * M_PI);
Double_t costh = r1->Uniform(cos_theta_min, cos_theta_max); Double_t costh = r1->Uniform(cos_theta_min, cos_theta_max);
Double_t th = std::acos(costh); Double_t th = std::acos(costh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment