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

Use has_ecal_barrel_scfi

parent f0f19d04
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.
...@@ -12,8 +12,19 @@ from Configurables import Jug__Reco__CalorimeterHitsMerger as CalHitsMerger ...@@ -12,8 +12,19 @@ from Configurables import Jug__Reco__CalorimeterHitsMerger as CalHitsMerger
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
detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena"))
detector_config = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", detector_name))
detector_version = str(os.environ.get("JUGGLER_DETECTOR_VERSION", "master"))
detector_path = str(os.environ.get("DETECTOR_PATH", ".")) detector_path = str(os.environ.get("DETECTOR_PATH", "."))
# Detector features that affect reconstruction
has_ecal_barrel_scfi = False
if 'athena' in detector_name:
has_ecal_barrel_scfi = True
if 'ecce' in detector_name and 'imaging' in detector_config:
has_ecal_barrel_scfi = True
# input arguments from calibration file # input arguments from calibration file
with open(f'{detector_path}/calibrations/emcal_barrel_calibration.json') as f: with open(f'{detector_path}/calibrations/emcal_barrel_calibration.json') as f:
calib_data = json.load(f)['electron'] calib_data = json.load(f)['electron']
...@@ -38,22 +49,38 @@ sf = float(os.environ.get('CB_EMCAL_SAMP_FRAC', '1.0')) ...@@ -38,22 +49,38 @@ sf = float(os.environ.get('CB_EMCAL_SAMP_FRAC', '1.0'))
geo_service = GeoSvc("GeoSvc", detectors=kwargs['compact'].split(','), OutputLevel=INFO) geo_service = GeoSvc("GeoSvc", detectors=kwargs['compact'].split(','), OutputLevel=INFO)
podioevent = EICDataSvc("EventDataSvc", inputs=kwargs['input'].split(','), OutputLevel=DEBUG) podioevent = EICDataSvc("EventDataSvc", inputs=kwargs['input'].split(','), OutputLevel=DEBUG)
podin = PodioInput("PodioReader", collections=["MCParticles", "EcalBarrelScFiHits", "EcalBarrelScFiHitsContributions"], OutputLevel=DEBUG) sim_coll = [
"MCParticles",
]
if has_ecal_barrel_scfi:
sim_coll += [
"EcalBarrelHits",
"EcalBarrelHitsContributions",
]
algorithms = []
podin = PodioInput("PodioReader", collections=sim_coll, OutputLevel=DEBUG)
algorithms.append(podin)
podout = PodioOutput("out", filename=kwargs['output']) podout = PodioOutput("out", filename=kwargs['output'])
algorithms.append(podout)
# use the same daq_setting for digi/reco pair if has_ecal_barrel_scfi:
scfi_barrel_daq = dict( # use the same daq_setting for digi/reco pair
scfi_barrel_daq = dict(
dynamicRangeADC=50.*MeV, dynamicRangeADC=50.*MeV,
capacityADC=32768, capacityADC=32768,
pedestalMean=400, pedestalMean=400,
pedestalSigma=10) pedestalSigma=10)
scfi_barrel_digi = CalHitDigi("scfi_barrel_digi", scfi_barrel_digi = CalHitDigi("scfi_barrel_digi",
inputHitCollection="EcalBarrelScFiHits", inputHitCollection="EcalBarrelScFiHits",
outputHitCollection="EcalBarrelScFiHitsDigi", outputHitCollection="EcalBarrelScFiHitsDigi",
**scfi_barrel_daq) **scfi_barrel_daq)
algorithms.append(scfi_barrel_digi)
scfi_barrel_reco = CalHitReco("scfi_barrel_reco", scfi_barrel_reco = CalHitReco("scfi_barrel_reco",
inputHitCollection=scfi_barrel_digi.outputHitCollection, inputHitCollection=scfi_barrel_digi.outputHitCollection,
outputHitCollection="EcalBarrelScFiHitsReco", outputHitCollection="EcalBarrelScFiHitsReco",
thresholdFactor=5.0, thresholdFactor=5.0,
...@@ -62,31 +89,34 @@ scfi_barrel_reco = CalHitReco("scfi_barrel_reco", ...@@ -62,31 +89,34 @@ scfi_barrel_reco = CalHitReco("scfi_barrel_reco",
sectorField="module", sectorField="module",
localDetFields=["system", "module"], # use local coordinates in each module (stave) localDetFields=["system", "module"], # use local coordinates in each module (stave)
**scfi_barrel_daq) **scfi_barrel_daq)
algorithms.append(scfi_barrel_reco)
# merge hits in different layer (projection to local x-y plane) # merge hits in different layer (projection to local x-y plane)
scfi_barrel_merger = CalHitsMerger("scfi_barrel_merger", scfi_barrel_merger = CalHitsMerger("scfi_barrel_merger",
# OutputLevel=DEBUG, # OutputLevel=DEBUG,
inputHitCollection=scfi_barrel_reco.outputHitCollection, inputHitCollection=scfi_barrel_reco.outputHitCollection,
outputHitCollection="EcalBarrelScFiGridReco", outputHitCollection="EcalBarrelScFiGridReco",
fields=["fiber"], fields=["fiber"],
fieldRefNumbers=[1], fieldRefNumbers=[1],
readoutClass="EcalBarrelScFiHits") readoutClass="EcalBarrelScFiHits")
algorithms.append(scfi_barrel_merger)
scfi_barrel_cl = IslandCluster("scfi_barrel_cl", scfi_barrel_cl = IslandCluster("scfi_barrel_cl",
# OutputLevel=DEBUG, # OutputLevel=DEBUG,
inputHitCollection=scfi_barrel_reco.outputHitCollection, inputHitCollection=scfi_barrel_reco.outputHitCollection,
outputProtoClusterCollection="EcalBarrelScFiProtoClusters", outputProtoClusterCollection="EcalBarrelScFiProtoClusters",
splitCluster=False, splitCluster=False,
minClusterCenterEdep=10.*MeV, minClusterCenterEdep=10.*MeV,
localDistXZ=[30*mm, 30*mm]) localDistXZ=[30*mm, 30*mm])
algorithms.append(scfi_barrel_cl)
scfi_barrel_clreco = RecoCoG("scfi_barrel_clreco", scfi_barrel_clreco = RecoCoG("scfi_barrel_clreco",
inputProtoClusterCollection=scfi_barrel.outputProtoClusterCollection, inputProtoClusterCollection=scfi_barrel.outputProtoClusterCollection,
outputClusterCollection="EcalBarrelScFiClusters", outputClusterCollection="EcalBarrelScFiClusters",
mcHits="EcalBarrelScFiHits", mcHits="EcalBarrelScFiHits",
logWeightBase=6.2, logWeightBase=6.2,
samplingFraction=kwargs['sf']) samplingFraction=kwargs['sf'])
algorithms.append(scfi_barrel_clreco)
podout.outputCommands = ["keep *"] podout.outputCommands = ["keep *"]
......
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