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

feat: support pfrich/mrich alternatives in brycecanyon

parent b57319c3
No related branches found
No related tags found
1 merge request!188feat: support pfrich/mrich alternatives in brycecanyon
......@@ -13,8 +13,13 @@ detector_version = str(os.environ.get("DETECTOR_VERSION", "main"))
# Detector features that affect reconstruction
has_ecal_barrel_scfi = False
has_pid_backward_pfrich = False
if "epic" in detector_name and "imaging" in detector_config:
has_ecal_barrel_scfi = True
has_pid_backward_pfrich = True
if "epic" in detector_name and "brycecanyon" in detector_config:
has_ecal_barrel_scfi = True
has_pid_backward_pfrich = True
# CAL reconstruction
# get sampling fractions from system environment variable
......
......@@ -13,8 +13,13 @@ detector_version = str(os.environ.get("DETECTOR_VERSION", "main"))
# Detector features that affect reconstruction
has_ecal_barrel_scfi = False
has_pid_backward_pfrich = False
if "epic" in detector_name and "imaging" in detector_config:
has_ecal_barrel_scfi = True
has_pid_backward_pfrich = True
if "epic" in detector_name and "brycecanyon" in detector_config:
has_ecal_barrel_scfi = True
has_pid_backward_pfrich = True
# CAL reconstruction
# get sampling fractions from system environment variable
......
......@@ -15,8 +15,13 @@ detector_version = str(os.environ.get("DETECTOR_VERSION", "main"))
# Detector features that affect reconstruction
has_ecal_barrel_scfi = False
has_pid_backward_pfrich = False
if "epic" in detector_name and "imaging" in detector_config:
has_ecal_barrel_scfi = True
has_pid_backward_pfrich = True
if "epic" in detector_name and "brycecanyon" in detector_config:
has_ecal_barrel_scfi = True
has_pid_backward_pfrich = True
if "PBEAM" in os.environ:
ionBeamEnergy = str(os.environ["PBEAM"])
......@@ -250,7 +255,10 @@ sim_coll += (
+ mpgd_barrel_collections
)
sim_coll.append("MRICHHits")
if has_pid_backward_pfrich:
sim_coll.append("PFRICHHits")
else:
sim_coll.append("MRICHHits")
# list of algorithms
algorithms = []
......@@ -1119,8 +1127,22 @@ algorithms.append(drich_reco)
# #inputTrackCollection=parts_with_truth_pid.outputParticles,
# outputClusterCollection="ForwardRICHClusters")
# MRICH
if "acadia" in detector_version:
# PFRICH/MRICH
if has_pid_backward_pfrich:
pfrich_digi = PhotoMultiplierDigi(
"pfrich_digi",
inputHitCollection="PFRICHHits",
outputHitCollection="PFRICHRawHits",
quantumEfficiency=[(a * eV, b) for a, b in qe_data],
)
algorithms.append(pfrich_digi)
pfrich_reco = PhotoMultiplierReco(
"pfrich_reco",
inputHitCollection=pfrich_digi.outputHitCollection,
outputHitCollection="PFRICHRecHits",
)
algorithms.append(pfrich_reco)
else:
mrich_digi = PhotoMultiplierDigi(
"mrich_digi",
inputHitCollection="MRICHHits",
......
......@@ -13,12 +13,13 @@ detector_version = str(os.environ.get("DETECTOR_VERSION", "main"))
# 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
has_pid_backward_pfrich = False
if "epic" in detector_name and "imaging" in detector_config:
has_ecal_barrel_scfi = True
has_pid_backward_pfrich = True
if "epic" in detector_name and "brycecanyon" in detector_config:
has_ecal_barrel_scfi = True
has_pid_backward_pfrich = True
# RICH reconstruction
qe_data = [
......@@ -126,7 +127,10 @@ sim_coll += (
+ mpgd_barrel_collections
)
sim_coll.append("MRICHHits")
if has_pid_backward_pfrich:
sim_coll.append("PFRICHHits")
else:
sim_coll.append("MRICHHits")
# list of algorithms
algorithms = []
......
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