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

Added output copies of input collections.

- using copier algo to get around bug (for now).
- note the "2" appended to the output collection names.
parent 3a53f133
Branches
Tags
1 merge request!13Added copies of input collections to output
......@@ -49,7 +49,7 @@ npsim --runType batch \
--inputFiles ../${JUGGLER_FILE_NAME_TAG}.hepmc \
--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 ../ecal/options/example_crystal.py
xenv -x /usr/local/Juggler.xenv gaudirun.py ../ecal/options/crystal_calorimeter_reco.py
ls -l
popd
......
......@@ -47,7 +47,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 ../ecal/options/example_crystal.py
xenv -x /usr/local/Juggler.xenv gaudirun.py ../ecal/options/crystal_calorimeter_reco.py
ls -l
popd
......
from Gaudi.Configuration import *
import os
from GaudiKernel.DataObjectHandleBase import DataObjectHandleBase
from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
from GaudiKernel import SystemOfUnits as units
geo_service = GeoSvc("GeoSvc", detectors=["topside.xml"])
podioevent = EICDataSvc("EventDataSvc", inputs=["sim_emcal_electrons.root"], OutputLevel=DEBUG)
detector_name = "topside"
if "JUGGLER_DETECTOR" in os.environ :
detector_name = str(os.environ["JUGGLER_DETECTOR"])
# todo add checks
input_sim_file = str(os.environ["JUGGLER_SIM_FILE"])
output_rec_file = str(os.environ["JUGGLER_REC_FILE"])
n_events = str(os.environ["JUGGLER_N_EVENTS"])
geo_service = GeoSvc("GeoSvc", detectors=["{}.xml".format(detector_name)])
podioevent = EICDataSvc("EventDataSvc", inputs=[input_sim_file], OutputLevel=DEBUG)
from Configurables import PodioInput
from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier
from Configurables import Jug__Base__InputCopier_dd4pod__CalorimeterHitCollection_dd4pod__CalorimeterHitCollection_ as CalCopier
from Configurables import Jug__Digi__CrystalEndcapsDigi as CrystalEndcapsDigi
from Configurables import Jug__Reco__CrystalEndcapsReco as CrystalEndcapsReco
from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster
from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG
podioinput = PodioInput("PodioReader", collections=["mcparticles","CrystalEcalHits"], OutputLevel=DEBUG)
## 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)
calcopier = CalCopier("CalCopier", inputCollection="CrystalEcalHits", outputCollection="CrystalEcalHits2",OutputLevel=DEBUG)
emcaldigi = CrystalEndcapsDigi("ecal_digi", inputHitCollection="CrystalEcalHits", outputHitCollection="RawDigiEcalHits")
emcalreco = CrystalEndcapsReco("ecal_reco", inputHitCollection="RawDigiEcalHits", outputHitCollection="RecoEcalHits",
minModuleEdep=1.0*units.MeV)
......@@ -21,14 +40,14 @@ emcalcluster = IslandCluster("emcal_cluster", inputHitCollection="RecoEcalHits",
minClusterCenterEdep=30*units.MeV, groupRange=2.0)
clusterreco = RecoCoG("cluster_reco", clusterCollection="EcalClusters", logWeightBase=4.2, moduleDimZName="CrystalBox_z_length")
out = PodioOutput("out", filename="sim_emcal_electrons_output.root")
out = PodioOutput("out", filename=output_rec_file)
out.outputCommands = ["keep *"]
ApplicationMgr(
TopAlg = [podioinput, emcaldigi, emcalreco, emcalcluster, clusterreco, out],
EvtSel = 'NONE',
EvtMax = 100000,
EvtMax = n_events,
ExtSvc = [podioevent],
OutputLevel=DEBUG
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment