Skip to content

Commit

Permalink
CLDReco: only allow a single XML file and fail otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer authored and Zehvogel committed Dec 12, 2023
1 parent a1b4074 commit eeaec1b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CLDConfig/CLDReconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,12 @@
"UseTruthInPrefit": ["false"]
}

if any(small_vtx in detPath for detPath in geoservice.detectors for small_vtx in ["_o2_", "_o3_", "_o4_"]):
if len(geoservice.detectors) > 1:
raise RuntimeError("Too many XML files for the detector path, please only specify the main file!")

if any(small_vtx in geoservice.detectors[0] for small_vtx in ["_o2_", "_o3_", "_o4_"]):
CT_MAX_DIST = "0.05;" # semi-colon is important!
elif any("_o1_" in detPath for detPath in geoservice.detectors):
elif "_o1_" in geoservice.detectors[0]:
CT_MAX_DIST = "0.03;" # semi-colon is important!
else:
raise RuntimeError("Unknown detector model to chose CT_MAX_DISTANCE")
Expand Down

0 comments on commit eeaec1b

Please sign in to comment.