Skip to content

Commit

Permalink
add --trackingOnly flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehvogel authored and andresailer committed Nov 2, 2023
1 parent f76612d commit 81b1039
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 17 deletions.
45 changes: 28 additions & 17 deletions CLDConfig/CLDReconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
from k4FWCore.parseArgs import parser
parser.add_argument("--inputFiles", action="extend", nargs="+", metavar=("file1", "file2"), help="One or multiple input files")
parser.add_argument("--outputBasename", help="Basename of the output file(s)", default=output_basename)
parser.add_argument("--trackingOnly", action="store_true", help="Run only track reconstruction", default=False)
my_opts = parser.parse_known_args()[0]

output_basename = my_opts.outputBasename
Expand Down Expand Up @@ -1098,42 +1099,52 @@
}

# TODO: put this somewhere else, needs to be in front of the output for now :(
# setup AIDA histogramming and add eventual background overlay
algList.append(MyAIDAProcessor)
algList.append(Overlay[CONFIG["Overlay"]])
# tracker hit digitisation
algList.append(VXDBarrelDigitiser)
algList.append(VXDEndcapDigitiser)
algList.append(InnerPlanarDigiProcessor)
algList.append(InnerEndcapPlanarDigiProcessor)
algList.append(OuterPlanarDigiProcessor)
algList.append(OuterEndcapPlanarDigiProcessor)

# tracking
if CONFIG["Tracking"] == "Truth":
algList.append(MyTruthTrackFinder)
elif CONFIG["Tracking"] == "Conformal":
algList.append(MyConformalTracking)
algList.append(ClonesAndSplitTracksFinder)

algList.append(Refit)
algList.append(MyDDCaloDigi[CONFIG["CalorimeterIntegrationTimeWindow"]])
algList.append(MyDDSimpleMuonDigi)
algList.append(MyDDMarlinPandora[CONFIG["CalorimeterIntegrationTimeWindow"]])
algList.append(LumiCalReco)

# calorimeter digitization and pandora
if not my_opts.trackingOnly:
algList.append(MyDDCaloDigi[CONFIG["CalorimeterIntegrationTimeWindow"]])
algList.append(MyDDSimpleMuonDigi)
algList.append(MyDDMarlinPandora[CONFIG["CalorimeterIntegrationTimeWindow"]])
algList.append(LumiCalReco)
# monitoring and Reco to MCTruth linking
algList.append(MyClicEfficiencyCalculator)
algList.append(MyRecoMCTruthLinker)
algList.append(MyTrackChecker)
algList.append(MyCLICPfoSelectorDefault)
algList.append(MyCLICPfoSelectorLoose)
algList.append(MyCLICPfoSelectorTight)

if CONFIG["Overlay"] == "False":
algList.append(RenameCollection)
else:
algList.append(MyFastJetProcessor)

algList.append(VertexFinder)
algList.append(JetClusteringAndRefiner)
if CONFIG["VertexUnconstrained"] == "True":
algList.append(VertexFinderUnconstrained)
# pfo selector (might need re-optimisation)
if not my_opts.trackingOnly:
algList.append(MyCLICPfoSelectorDefault)
algList.append(MyCLICPfoSelectorLoose)
algList.append(MyCLICPfoSelectorTight)
# misc.
if CONFIG["Overlay"] == "False":
algList.append(RenameCollection)
else:
algList.append(MyFastJetProcessor)

algList.append(VertexFinder)
algList.append(JetClusteringAndRefiner)
if CONFIG["VertexUnconstrained"] == "True":
algList.append(VertexFinderUnconstrained)
# event number processor, down here to attach the conversion back to edm4hep to it
algList.append(EventNumber)

if CONFIG["OutputMode"] == "LCIO":
Expand Down
6 changes: 6 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ add_test(NAME edm4hep_input
COMMAND k4run --inputFiles=test.edm4hep.root --outputBasename=rec_test_edm4hep CLDReconstruction.py --GeoSvc.detectors=${DETECTOR}
)
set_property(TEST edm4hep_input APPEND PROPERTY DEPENDS ddsim_edm4hep)

add_test(NAME trkOnly
WORKING_DIRECTORY ${CLDConfig_DIR}
COMMAND k4run --trackingOnly --inputFiles=test.edm4hep.root --outputBasename=trkOnly_test_edm4hep CLDReconstruction.py --GeoSvc.detectors=${DETECTOR}
)
set_property(TEST trkOnly APPEND PROPERTY DEPENDS ddsim_edm4hep)

0 comments on commit 81b1039

Please sign in to comment.