Skip to content
Snippets Groups Projects
Commit a3798d42 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

update barrel.py

parent c7bf29b0
No related branches found
No related tags found
1 merge request!252Fixes to benchmarks to run with ecce:main
This commit is part of merge request !252. Comments created here will be created in the context of that merge request.
...@@ -52,25 +52,31 @@ sim_coll = [ ...@@ -52,25 +52,31 @@ sim_coll = [
"EcalBarrelHitsContributions", "EcalBarrelHitsContributions",
] ]
algorithms = []
# input and output # input and output
podin = PodioInput("PodioReader", collections=sim_coll) podin = PodioInput("PodioReader", collections=sim_coll)
algorithms.append(podin)
podout = PodioOutput("out", filename=output_rec) podout = PodioOutput("out", filename=output_rec)
algorithms.append(podout)
# Central Barrel Ecal
# Central Barrel Ecal (Imaging Cal.) if has_ecal_barrel_scfi:
cb_ecal_daq = dict( # Central Barrel Ecal (Imaging Cal.)
cb_ecal_daq = dict(
dynamicRangeADC=3*MeV, dynamicRangeADC=3*MeV,
capacityADC=8192, capacityADC=8192,
pedestalMean=400, pedestalMean=400,
pedestalSigma=20) # about 6 keV pedestalSigma=20) # about 6 keV
cb_ecal_digi = CalHitDigi("cb_ecal_digi", cb_ecal_digi = CalHitDigi("cb_ecal_digi",
inputHitCollection="EcalBarrelHits", inputHitCollection="EcalBarrelHits",
outputHitCollection="EcalBarrelImagingHitsDigi", outputHitCollection="EcalBarrelImagingHitsDigi",
energyResolutions=[0., 0.02, 0.], # 2% flat resolution energyResolutions=[0., 0.02, 0.], # 2% flat resolution
**cb_ecal_daq) **cb_ecal_daq)
algorithms.append(cb_ecal_digi)
cb_ecal_reco = ImCalPixelReco("cb_ecal_reco", cb_ecal_reco = ImCalPixelReco("cb_ecal_reco",
inputHitCollection=cb_ecal_digi.outputHitCollection, inputHitCollection=cb_ecal_digi.outputHitCollection,
outputHitCollection="EcalBarrelImagingHitsReco", outputHitCollection="EcalBarrelImagingHitsReco",
samplingFraction=cb_ecal_sf, samplingFraction=cb_ecal_sf,
...@@ -79,20 +85,64 @@ cb_ecal_reco = ImCalPixelReco("cb_ecal_reco", ...@@ -79,20 +85,64 @@ cb_ecal_reco = ImCalPixelReco("cb_ecal_reco",
layerField="layer", # field to get layer id layerField="layer", # field to get layer id
sectorField="module", # field to get sector id sectorField="module", # field to get sector id
**cb_ecal_daq) **cb_ecal_daq)
algorithms.append(cb_ecal_reco)
cb_ecal_cl = ImagingCluster("cb_ecal_cl", cb_ecal_cl = ImagingCluster("cb_ecal_cl",
inputHitCollection=cb_ecal_reco.outputHitCollection, inputHitCollection=cb_ecal_reco.outputHitCollection,
outputProtoClusterCollection="EcalBarrelImagingProtoClusters", outputProtoClusterCollection="EcalBarrelImagingProtoClusters",
localDistXY=[2.*mm, 2*mm], # same layer localDistXY=[2.*mm, 2*mm], # same layer
layerDistEtaPhi=[10*mrad, 10*mrad], # adjacent layer layerDistEtaPhi=[10*mrad, 10*mrad], # adjacent layer
neighbourLayersRange=2, # id diff for adjacent layer neighbourLayersRange=2, # id diff for adjacent layer
sectorDist=3.*cm) # different sector sectorDist=3.*cm) # different sector
algorithms.append(cb_ecal_cl)
cb_ecal_clreco = ImagingClusterReco("cb_ecal_clreco", cb_ecal_clreco = ImagingClusterReco("cb_ecal_clreco",
inputProtoClusters=cb_ecal_cl.outputProtoClusterCollection, inputProtoClusters=cb_ecal_cl.outputProtoClusterCollection,
outputClusters="EcalBarrelImagingClusters", outputClusters="EcalBarrelImagingClusters",
outputLayers="EcalBarrelImagingLayers", outputLayers="EcalBarrelImagingLayers",
mcHits="EcalBarrelHits") mcHits="EcalBarrelHits")
algorithms.append(cb_ecal_clreco)
else:
# SciGlass calorimeter
sciglass_ecal_daq = dict(
dynamicRangeADC=5.*GeV,
capacityADC=32768,
pedestalMean=400,
pedestalSigma=3)
sciglass_ecal_digi = CalHitDigi("sciglass_ecal_digi",
inputHitCollection="EcalBarrelHits",
outputHitCollection="EcalBarrelHitsDigi",
energyResolutions=[0., 0.02, 0.], # 2% flat resolution
**sciglass_ecal_daq)
algorithms.append(sciglass_ecal_digi)
sciglass_ecal_reco = CalHitReco("sciglass_ecal_reco",
inputHitCollection=sciglass_ecal_digi.outputHitCollection,
outputHitCollection="EcalBarrelHitsReco",
thresholdFactor=3, # about 20 keV
readoutClass="EcalBarrelHits", # readout class
sectorField="sector", # field to get sector id
samplingFraction=0.998, # this accounts for a small fraction of leakage
**sciglass_ecal_daq)
algorithms.append(sciglass_ecal_reco)
sciglass_ecal_cl = IslandCluster("sciglass_ecal_cl",
inputHitCollection=sciglass_ecal_reco.outputHitCollection,
outputProtoClusterCollection="EcalBarrelProtoClusters",
splitCluster=False,
minClusterHitEdep=1.0*MeV, # discard low energy hits
minClusterCenterEdep=30*MeV,
sectorDist=5.0*cm)
algorithms.append(sciglass_ecal_cl)
sciglass_ecal_clreco = ImagingClusterReco("sciglass_ecal_clreco",
inputProtoClusters=sciglass_ecal_cl.outputProtoClusterCollection,
mcHits="EcalBarrelHits",
outputClusters="EcalBarrelClusters",
outputLayers="EcalBarrelLayers")
algorithms.append(sciglass_ecal_clreco)
podout.outputCommands = ['drop *', podout.outputCommands = ['drop *',
'keep MCParticles', 'keep MCParticles',
...@@ -101,9 +151,7 @@ podout.outputCommands = ['drop *', ...@@ -101,9 +151,7 @@ podout.outputCommands = ['drop *',
'keep *Cluster*'] 'keep *Cluster*']
ApplicationMgr( ApplicationMgr(
TopAlg = [podin, TopAlg = algorithms,
cb_ecal_digi, cb_ecal_reco, cb_ecal_cl, cb_ecal_clreco,
podout],
EvtSel = 'NONE', EvtSel = 'NONE',
EvtMax = n_events, EvtMax = n_events,
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