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

modified: emcal_electrons.sh

	modified:   options/crystal_calorimeter_reco.py
parent 7419e855
No related branches found
No related tags found
1 merge request!40Fixing empty plots
...@@ -70,7 +70,8 @@ if [[ "$?" -ne "0" ]] ; then ...@@ -70,7 +70,8 @@ if [[ "$?" -ne "0" ]] ; then
echo "ERROR running npdet" echo "ERROR running npdet"
exit 1 exit 1
fi fi
xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv gaudirun.py ../ecal/options/crystal_calorimeter_reco.py xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv \
gaudirun.py ../ecal/options/crystal_calorimeter_reco.py
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running juggler" echo "ERROR running juggler"
exit 1 exit 1
......
...@@ -10,9 +10,22 @@ if "JUGGLER_DETECTOR" in os.environ : ...@@ -10,9 +10,22 @@ if "JUGGLER_DETECTOR" in os.environ :
detector_name = str(os.environ["JUGGLER_DETECTOR"]) detector_name = str(os.environ["JUGGLER_DETECTOR"])
# todo add checks # todo add checks
input_sim_file = str(os.environ["JUGGLER_SIM_FILE"]) input_sim_file = "jug_input.root"
output_rec_file = str(os.environ["JUGGLER_REC_FILE"]) if "JUGGLER_SIM_FILE" in os.environ :
n_events = str(os.environ["JUGGLER_N_EVENTS"]) input_sim_file = str(os.environ["JUGGLER_SIM_FILE"])
else :
print(" ERROR : JUGGLER_SIM_FILE not set" )
output_rec_file = "jug_rec.root"
if "JUGGLER_REC_FILE" in os.environ :
output_rec_file = str(os.environ["JUGGLER_REC_FILE"])
else :
print(" ERROR : JUGGLER_REC_FILE not set" )
n_events = 100
if "JUGGLER_N_EVENTS" in os.environ :
n_events = str(os.environ["JUGGLER_N_EVENTS"])
geo_service = GeoSvc("GeoSvc", detectors=["{}.xml".format(detector_name)]) geo_service = GeoSvc("GeoSvc", detectors=["{}.xml".format(detector_name)])
podioevent = EICDataSvc("EventDataSvc", inputs=[input_sim_file], OutputLevel=DEBUG) podioevent = EICDataSvc("EventDataSvc", inputs=[input_sim_file], OutputLevel=DEBUG)
...@@ -31,15 +44,28 @@ from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG ...@@ -31,15 +44,28 @@ from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG
podioinput = PodioInput("PodioReader", collections=["mcparticles","CrystalEcalHits"], OutputLevel=DEBUG) podioinput = PodioInput("PodioReader", collections=["mcparticles","CrystalEcalHits"], OutputLevel=DEBUG)
## copiers to get around input --> output copy bug. Note the "2" appended to the output collection. ## copiers to get around input --> output copy bug. Note the "2" appended to the output collection.
copier = MCCopier("MCCopier", inputCollection="mcparticles", outputCollection="mcparticles2",OutputLevel=DEBUG) copier = MCCopier("MCCopier", inputCollection="mcparticles", outputCollection="mcparticles2",OutputLevel=DEBUG)
calcopier = CalCopier("CalCopier", inputCollection="CrystalEcalHits", outputCollection="CrystalEcalHits2",OutputLevel=DEBUG) calcopier = CalCopier("CalCopier", inputCollection="CrystalEcalHits", outputCollection="CrystalEcalHits2",OutputLevel=DEBUG)
emcaldigi = CrystalEndcapsDigi("ecal_digi", inputHitCollection="CrystalEcalHits", outputHitCollection="RawDigiEcalHits") emcaldigi = CrystalEndcapsDigi("ecal_digi",
emcalreco = CrystalEndcapsReco("ecal_reco", inputHitCollection="RawDigiEcalHits", outputHitCollection="RecoEcalHits", inputHitCollection="CrystalEcalHits",
minModuleEdep=1.0*units.MeV) outputHitCollection="RawDigiEcalHits")
emcalcluster = IslandCluster("emcal_cluster", inputHitCollection="RecoEcalHits", outputClusterCollection="EcalClusters",
minClusterCenterEdep=30*units.MeV, groupRange=2.0) emcalreco = CrystalEndcapsReco("ecal_reco",
clusterreco = RecoCoG("cluster_reco", clusterCollection="EcalClusters", logWeightBase=4.2, moduleDimZName="CrystalBox_z_length") inputHitCollection="RawDigiEcalHits",
outputHitCollection="RecoEcalHits",
minModuleEdep=0.00001*units.MeV)
emcalcluster = IslandCluster("emcal_cluster",
inputHitCollection="RecoEcalHits",
outputClusterCollection="EcalClusters",
minClusterCenterEdep=0.00001*units.MeV,
groupRange=2.0)
clusterreco = RecoCoG("cluster_reco",
clusterCollection="EcalClusters",
logWeightBase=4.2,
moduleDimZName="CrystalBox_z_length")
out = PodioOutput("out", filename=output_rec_file) out = PodioOutput("out", filename=output_rec_file)
......
...@@ -22,7 +22,7 @@ using namespace HepMC3; ...@@ -22,7 +22,7 @@ using namespace HepMC3;
void emcal_electrons(int n_events = 1e2, double e_start = 1.0, double e_end = 1.0, void emcal_electrons(int n_events = 1e2, double e_start = 1.0, double e_end = 1.0,
const char* out_fname = "./data/emcal_electron_0GeVto30GeV_100kEvt.hepmc") const char* out_fname = "./data/emcal_electron_0GeVto30GeV_100kEvt.hepmc")
{ {
double cos_theta_min = std::cos(M_PI * (120.0 / 180.0)); double cos_theta_min = std::cos(M_PI * (155.0 / 180.0));
double cos_theta_max = std::cos(M_PI); double cos_theta_max = std::cos(M_PI);
WriterAscii hepmc_output(out_fname); WriterAscii hepmc_output(out_fname);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment