diff --git a/benchmarks/sampling_ecal/options/sampling_cluster3d.py b/benchmarks/sampling_ecal/options/sampling_cluster3d.py index 768cdc08f48de35bf01fbb97409a831adfeebf31..ae202681ffeacb2ddc4f7deccb592735b7b9793d 100644 --- a/benchmarks/sampling_ecal/options/sampling_cluster3d.py +++ b/benchmarks/sampling_ecal/options/sampling_cluster3d.py @@ -8,6 +8,7 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc 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__EcalTungstenSamplingDigi as EcalTungstenSamplingDigi from Configurables import Jug__Reco__EcalTungstenSamplingReco as EcalTungstenSamplingReco from Configurables import Jug__Reco__TopologicalCellCluster as TopologicalCellCluster @@ -17,12 +18,10 @@ from Configurables import Jug__Reco__ImagingClusterReco as ImagingReco # input arguments through environment variables kwargs = dict() kwargs['sf'] = float(os.environ.get('CB_EMCAL_SAMP_FRAC', '1.0')) -kwargs['input'] = os.environ.get('CB_EMCAL_SIM_FILE', '../topside/barrel_el_5GeV.root') -kwargs['output'] = os.environ.get('CB_EMCAL_REC_FILE', 'barrel_cluster_el5GeV.root') +kwargs['input'] = os.environ.get('CB_EMCAL_SIM_FILE', '../topside/barrel_pion0_5GeV.root') +kwargs['output'] = os.environ.get('CB_EMCAL_REC_FILE', 'barrel_pion0_5GeV_cluster.root') kwargs['compact'] = os.environ.get('CB_EMCAL_COMPACT_PATH', '../topside/test.xml') -kwargs['nev'] = int(os.environ.get('CB_EMCAL_NUMEV', 1000)) - -print(kwargs) +kwargs['nev'] = int(os.environ.get('CB_EMCAL_NUMEV', 10000)) if kwargs['nev'] < 1: f = ROOT.TFile(kwargs['input']) @@ -31,7 +30,7 @@ if kwargs['nev'] < 1: # get sampling fraction from system environment variable, 1.0 by default sf = float(os.environ.get('CB_EMCAL_SAMP_FRAC', '1.0')) -geo_service = GeoSvc("GeoSvc", detectors=kwargs['compact'].split(',')) +geo_service = GeoSvc("GeoSvc", detectors=kwargs['compact'].split(',')) podioevent = EICDataSvc("EventDataSvc", inputs=kwargs['input'].split(','), OutputLevel=DEBUG) out = PodioOutput("out", filename=kwargs['output']) @@ -41,6 +40,11 @@ copier = MCCopier("MCCopier", inputCollection="mcparticles", outputCollection="mcparticles2", OutputLevel=DEBUG) +calcopier = CalCopier("CalCopier", + inputCollection="EcalBarrelHits", + outputCollection="EcalBarrelHits2", + OutputLevel=DEBUG) + emcaldigi = EcalTungstenSamplingDigi("ecal_digi", inputHitCollection="EcalBarrelHits", outputHitCollection="DigiEcalBarrelHits", @@ -59,7 +63,12 @@ emcalreco = EcalTungstenSamplingReco("ecal_reco", emcalcluster = TopologicalCellCluster(inputHitCollection="RecoEcalBarrelHits", outputClusterCollection="EcalBarrelClusters", minClusterCenterEdep=0.3*units.MeV, - groupRanges=[2.*units.cm, 2*units.cm, 2.*units.cm]) + localRanges=[2.*units.mm, 2*units.mm], + adjLayerRanges=[5*units.mrad, 5*units.mrad], + adjLayerDiff=1, + adjSectorDist=1*units.cm, + layerField="layer", + sectorField="module") clusterreco = ImagingReco(inputClusterCollection="EcalBarrelClusters", outputClusterCollection="EcalBarrelClustersReco", outputLayerCollection="EcalBarrelClustersLayers", @@ -70,7 +79,7 @@ clusterreco = ImagingReco(inputClusterCollection="EcalBarrelClusters", out.outputCommands = ["keep *"] ApplicationMgr( - TopAlg=[podioinput, copier, emcaldigi, emcalreco, emcalcluster, clusterreco, out], + TopAlg=[podioinput, copier, calcopier, emcaldigi, emcalreco, emcalcluster, clusterreco, out], EvtSel='NONE', EvtMax=kwargs['nev'], ExtSvc=[podioevent],