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

Adding optionality for MTD timing in PFTICLProducer #37158

Merged
merged 2 commits into from Mar 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions RecoHGCal/TICL/plugins/PFTICLProducer.cc
Expand Up @@ -26,6 +26,7 @@ class PFTICLProducer : public edm::stream::EDProducer<> {

private:
// parameters
const bool useMTDTiming_;
const bool useTimingAverage_;
const float timingQualityThreshold_;

Expand All @@ -40,7 +41,8 @@ class PFTICLProducer : public edm::stream::EDProducer<> {
DEFINE_FWK_MODULE(PFTICLProducer);

PFTICLProducer::PFTICLProducer(const edm::ParameterSet& conf)
: useTimingAverage_(conf.getParameter<bool>("useTimingAverage")),
: useMTDTiming_(conf.getParameter<bool>("useMTDTiming")),
useTimingAverage_(conf.getParameter<bool>("useTimingAverage")),
timingQualityThreshold_(conf.getParameter<double>("timingQualityThreshold")),
ticl_candidates_(consumes<edm::View<TICLCandidate>>(conf.getParameter<edm::InputTag>("ticlCandidateSrc"))),
srcTrackTime_(consumes<edm::ValueMap<float>>(conf.getParameter<edm::InputTag>("trackTimeValueMap"))),
Expand All @@ -59,6 +61,7 @@ void PFTICLProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptio
desc.add<edm::InputTag>("trackTimeErrorMap", edm::InputTag("tofPID:sigmat0"));
desc.add<edm::InputTag>("trackTimeQualityMap", edm::InputTag("mtdTrackQualityMVA:mtdQualMVA"));
desc.add<double>("timingQualityThreshold", 0.5);
desc.add<bool>("useMTDTiming", true);
desc.add<bool>("useTimingAverage", false);
// For PFMuonAlgo
desc.add<edm::InputTag>("muonSrc", edm::InputTag("muons1stStep"));
Expand Down Expand Up @@ -143,7 +146,7 @@ void PFTICLProducer::produce(edm::Event& evt, const edm::EventSetup& es) {
auto time = ticl_cand.time();
auto timeE = ticl_cand.timeError();

if (candidate.charge()) {
if (useMTDTiming_ and candidate.charge()) {
// Ignore HGCAL timing until it will be TOF corrected
time = -99.;
timeE = -1.;
Expand Down