File indexing completed on 2025-01-18 10:18:04
0001 from Gaudi.Configuration import *
0002
0003 from GaudiKernel.DataObjectHandleBase import DataObjectHandleBase
0004 from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
0005 from GaudiKernel import SystemOfUnits as units
0006
0007 geo_service = GeoSvc("GeoSvc", detectors=["../NPDet/src/GenericDetectors/calorimeters/compact/Crystal_example.xml"])
0008 podioevent = EICDataSvc("EventDataSvc", inputs=["output_emcal_electrons_npsim.root"], OutputLevel=DEBUG)
0009
0010 from Configurables import PodioInput
0011 from Configurables import Jug__Digi__CrystalEndcapsDigi as CrystalEndcapsDigi
0012 from Configurables import Jug__Reco__CrystalEndcapsReco as CrystalEndcapsReco
0013 from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster
0014 from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG
0015
0016 podioinput = PodioInput("PodioReader", collections=["MCParticles","EcalHits"], OutputLevel=DEBUG)
0017 emcaldigi = CrystalEndcapsDigi(inputHitCollection="EcalHits", outputHitCollection="RawDigiEcalHits")
0018 emcalreco = CrystalEndcapsReco(inputHitCollection="RawDigiEcalHits", outputHitCollection="RecoEcalHits",
0019 minModuleEdep=1.0*units.MeV)
0020 emcalcluster = IslandCluster(inputHitCollection="RecoEcalHits", outputClusterCollection="EcalClusters",
0021 minClusterCenterEdep=30*units.MeV, groupRange=2.0)
0022 clusterreco = RecoCoG(clusterCollection="EcalClusters", logWeightBase=4.2, moduleDimZName="CrystalBox_z_length")
0023
0024
0025 out = PodioOutput("out", filename="reco_emcal_electrons_npsim.root")
0026 out.outputCommands = ["keep EcalClusters"]
0027
0028 ApplicationMgr(
0029 TopAlg = [podioinput, emcaldigi, emcalreco, emcalcluster, clusterreco, out],
0030 EvtSel = 'NONE',
0031 EvtMax = 100,
0032 ExtSvc = [podioevent],
0033 OutputLevel=ERROR
0034 )
0035