Skip to content
Snippets Groups Projects
Commit 849a4172 authored by Chao Peng's avatar Chao Peng
Browse files

update option file

parent 7a672a4a
No related branches found
No related tags found
1 merge request!83update option file
...@@ -8,6 +8,7 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc ...@@ -8,6 +8,7 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
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__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__Digi__EcalTungstenSamplingDigi as EcalTungstenSamplingDigi
from Configurables import Jug__Reco__EcalTungstenSamplingReco as EcalTungstenSamplingReco from Configurables import Jug__Reco__EcalTungstenSamplingReco as EcalTungstenSamplingReco
from Configurables import Jug__Reco__TopologicalCellCluster as TopologicalCellCluster from Configurables import Jug__Reco__TopologicalCellCluster as TopologicalCellCluster
...@@ -17,12 +18,10 @@ from Configurables import Jug__Reco__ImagingClusterReco as ImagingReco ...@@ -17,12 +18,10 @@ from Configurables import Jug__Reco__ImagingClusterReco as ImagingReco
# input arguments through environment variables # input arguments through environment variables
kwargs = dict() kwargs = dict()
kwargs['sf'] = float(os.environ.get('CB_EMCAL_SAMP_FRAC', '1.0')) 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['input'] = os.environ.get('CB_EMCAL_SIM_FILE', '../topside/barrel_pion0_5GeV.root')
kwargs['output'] = os.environ.get('CB_EMCAL_REC_FILE', 'barrel_cluster_el5GeV.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['compact'] = os.environ.get('CB_EMCAL_COMPACT_PATH', '../topside/test.xml')
kwargs['nev'] = int(os.environ.get('CB_EMCAL_NUMEV', 1000)) kwargs['nev'] = int(os.environ.get('CB_EMCAL_NUMEV', 10000))
print(kwargs)
if kwargs['nev'] < 1: if kwargs['nev'] < 1:
f = ROOT.TFile(kwargs['input']) f = ROOT.TFile(kwargs['input'])
...@@ -31,7 +30,7 @@ if kwargs['nev'] < 1: ...@@ -31,7 +30,7 @@ if kwargs['nev'] < 1:
# get sampling fraction from system environment variable, 1.0 by default # get sampling fraction from system environment variable, 1.0 by default
sf = float(os.environ.get('CB_EMCAL_SAMP_FRAC', '1.0')) 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) podioevent = EICDataSvc("EventDataSvc", inputs=kwargs['input'].split(','), OutputLevel=DEBUG)
out = PodioOutput("out", filename=kwargs['output']) out = PodioOutput("out", filename=kwargs['output'])
...@@ -41,6 +40,11 @@ copier = MCCopier("MCCopier", ...@@ -41,6 +40,11 @@ copier = MCCopier("MCCopier",
inputCollection="mcparticles", inputCollection="mcparticles",
outputCollection="mcparticles2", outputCollection="mcparticles2",
OutputLevel=DEBUG) OutputLevel=DEBUG)
calcopier = CalCopier("CalCopier",
inputCollection="EcalBarrelHits",
outputCollection="EcalBarrelHits2",
OutputLevel=DEBUG)
emcaldigi = EcalTungstenSamplingDigi("ecal_digi", emcaldigi = EcalTungstenSamplingDigi("ecal_digi",
inputHitCollection="EcalBarrelHits", inputHitCollection="EcalBarrelHits",
outputHitCollection="DigiEcalBarrelHits", outputHitCollection="DigiEcalBarrelHits",
...@@ -59,7 +63,12 @@ emcalreco = EcalTungstenSamplingReco("ecal_reco", ...@@ -59,7 +63,12 @@ emcalreco = EcalTungstenSamplingReco("ecal_reco",
emcalcluster = TopologicalCellCluster(inputHitCollection="RecoEcalBarrelHits", emcalcluster = TopologicalCellCluster(inputHitCollection="RecoEcalBarrelHits",
outputClusterCollection="EcalBarrelClusters", outputClusterCollection="EcalBarrelClusters",
minClusterCenterEdep=0.3*units.MeV, 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", clusterreco = ImagingReco(inputClusterCollection="EcalBarrelClusters",
outputClusterCollection="EcalBarrelClustersReco", outputClusterCollection="EcalBarrelClustersReco",
outputLayerCollection="EcalBarrelClustersLayers", outputLayerCollection="EcalBarrelClustersLayers",
...@@ -70,7 +79,7 @@ clusterreco = ImagingReco(inputClusterCollection="EcalBarrelClusters", ...@@ -70,7 +79,7 @@ clusterreco = ImagingReco(inputClusterCollection="EcalBarrelClusters",
out.outputCommands = ["keep *"] out.outputCommands = ["keep *"]
ApplicationMgr( ApplicationMgr(
TopAlg=[podioinput, copier, emcaldigi, emcalreco, emcalcluster, clusterreco, out], TopAlg=[podioinput, copier, calcopier, emcaldigi, emcalreco, emcalcluster, clusterreco, out],
EvtSel='NONE', EvtSel='NONE',
EvtMax=kwargs['nev'], EvtMax=kwargs['nev'],
ExtSvc=[podioevent], ExtSvc=[podioevent],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment