Skip to content
Snippets Groups Projects

Draft: add benchmark for RICH IRT

Open Christopher Dilks requested to merge irt-benchmark into master
Compare and
7 files
+ 907
6
Compare changes
  • Side-by-side
  • Inline
Files
7
+ 88
0
from Gaudi.Configuration import *
from GaudiKernel import SystemOfUnits as units
from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
from Configurables import PodioInput
from Configurables import Jug__PID__IRTAlgorithm as IRTAlgorithm
# env vars
try:
mainDetName = "athena"
if "JUGGLER_DETECTOR" in os.environ: mainDetName = str(os.environ["JUGGLER_DETECTOR"])
if "DETECTOR_PATH" in os.environ: mainDetName = str(os.environ["DETECTOR_PATH"])+"/"+mainDetName
simFile = str(os.environ["JUGGLER_SIM_FILE"])
recFile = str(os.environ["JUGGLER_REC_FILE"])
numEvents = str(os.environ["JUGGLER_N_EVENTS"])
except KeyError:
print("ERROR: incomplete environment variables for options file",file=sys.stderr)
exit(1)
geo_service = GeoSvc("GeoSvc", detectors=["{}.xml".format(mainDetName)])
podioevent = EICDataSvc(
"EventDataSvc",
inputs=[simFile],
#OutputLevel=DEBUG
)
# S13660-3050AE-08 SiPM quantum efficiency [(wavelength [nm], q.e.)]
# Note: this is consistent with S13361-3050AE-08 (for DRICH)
qe_data = [
(325, 0.04),
(340, 0.10),
(350, 0.20),
(370, 0.30),
(400, 0.35),
(450, 0.40),
(500, 0.38),
(550, 0.35),
(600, 0.27),
(650, 0.20),
(700, 0.15),
(750, 0.12),
(800, 0.08),
(850, 0.06),
(900, 0.04)
]
radiators = [
"Aerogel zbins=5 smearing=gaussian 2mrad rindex=1.0190 attenuation[mm]=48.0",
"GasVolume zbins=10 smearing=gaussian 5mrad rindex=1.00076"
]
podioinput = PodioInput(
"PodioReader",
# Input collections: MC truth tracks and DRICH raw hits (photons);
collections=["mcparticles", "DRICHHits"],
#OutputLevel=DEBUG
)
irtrec = IRTAlgorithm(
# Input collections: MC truth tracks and DRICH raw hits (photons);
inputMCParticles="mcparticles",
# DRICH optics configuration produced by DRICH_geo.cpp code along with the dd4hep XML file;
ConfigFile="drich-config.root",
Radiators=[ (r) for r in radiators ],
# SiPM PDE; FIXME: units.eV coefficient gives extra x1000 (?);
QEcurve=[ ((1239.84/a), b) for a, b in qe_data ],
# Rebin the QE in that many equidistant bins internally;
QEbins="100",
# SiPM geometric fill factor and "safety factor" for the photon count estimates;
#GeometricEfficiency="1.00",
SafetyFactor="0.70",
)
# Output ROOT file; keep the input collections as well, append DRICH PID tables;
out = PodioOutput("out", filename=recFile)
out.outputCommands = ["keep *"]
ApplicationMgr(
TopAlg = [podioinput, irtrec, out],
EvtSel = 'NONE',
EvtMax = numEvents,
ExtSvc = [podioevent],
#OutputLevel = DEBUG,
PluginDebugLevel = 2
)
Loading