Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --trackingOnly flag #13

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading