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
No related tags found
1 merge request!13Added copies of input collections to output
...@@ -49,7 +49,7 @@ npsim --runType batch \ ...@@ -49,7 +49,7 @@ npsim --runType batch \
--inputFiles ../${JUGGLER_FILE_NAME_TAG}.hepmc \ --inputFiles ../${JUGGLER_FILE_NAME_TAG}.hepmc \
--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 ../ecal/options/example_crystal.py xenv -x /usr/local/Juggler.xenv gaudirun.py ../ecal/options/crystal_calorimeter_reco.py
ls -l ls -l
popd popd
......
...@@ -47,7 +47,7 @@ npsim --runType batch \ ...@@ -47,7 +47,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 ../ecal/options/example_crystal.py xenv -x /usr/local/Juggler.xenv gaudirun.py ../ecal/options/crystal_calorimeter_reco.py
ls -l ls -l
popd popd
......
from Gaudi.Configuration import * from Gaudi.Configuration import *
import os
from GaudiKernel.DataObjectHandleBase import DataObjectHandleBase from GaudiKernel.DataObjectHandleBase import DataObjectHandleBase
from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
from GaudiKernel import SystemOfUnits as units from GaudiKernel import SystemOfUnits as units
geo_service = GeoSvc("GeoSvc", detectors=["topside.xml"]) detector_name = "topside"
podioevent = EICDataSvc("EventDataSvc", inputs=["sim_emcal_electrons.root"], OutputLevel=DEBUG) 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 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__Digi__CrystalEndcapsDigi as CrystalEndcapsDigi
from Configurables import Jug__Reco__CrystalEndcapsReco as CrystalEndcapsReco from Configurables import Jug__Reco__CrystalEndcapsReco as CrystalEndcapsReco
from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster
from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG 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.
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") emcaldigi = CrystalEndcapsDigi("ecal_digi", inputHitCollection="CrystalEcalHits", outputHitCollection="RawDigiEcalHits")
emcalreco = CrystalEndcapsReco("ecal_reco", inputHitCollection="RawDigiEcalHits", outputHitCollection="RecoEcalHits", emcalreco = CrystalEndcapsReco("ecal_reco", inputHitCollection="RawDigiEcalHits", outputHitCollection="RecoEcalHits",
minModuleEdep=1.0*units.MeV) minModuleEdep=1.0*units.MeV)
...@@ -21,14 +40,14 @@ emcalcluster = IslandCluster("emcal_cluster", inputHitCollection="RecoEcalHits", ...@@ -21,14 +40,14 @@ emcalcluster = IslandCluster("emcal_cluster", inputHitCollection="RecoEcalHits",
minClusterCenterEdep=30*units.MeV, groupRange=2.0) minClusterCenterEdep=30*units.MeV, groupRange=2.0)
clusterreco = RecoCoG("cluster_reco", clusterCollection="EcalClusters", logWeightBase=4.2, moduleDimZName="CrystalBox_z_length") 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 *"] out.outputCommands = ["keep *"]
ApplicationMgr( ApplicationMgr(
TopAlg = [podioinput, emcaldigi, emcalreco, emcalcluster, clusterreco, out], TopAlg = [podioinput, emcaldigi, emcalreco, emcalcluster, clusterreco, out],
EvtSel = 'NONE', EvtSel = 'NONE',
EvtMax = 100000, EvtMax = n_events,
ExtSvc = [podioevent], ExtSvc = [podioevent],
OutputLevel=DEBUG OutputLevel=DEBUG
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment