From 23cd32cd4107928c1f5f5addd36f31c9c4e300cc Mon Sep 17 00:00:00 2001 From: ccaillol Date: Thu, 15 Sep 2022 12:34:22 +0200 Subject: [PATCH] Adrianos comments --- .../interface/L1TrackJetProducer.h | 1 + .../plugins/L1TrackJetProducer.cc | 114 +++++++++--------- 2 files changed, 58 insertions(+), 57 deletions(-) diff --git a/L1Trigger/L1TTrackMatch/interface/L1TrackJetProducer.h b/L1Trigger/L1TTrackMatch/interface/L1TrackJetProducer.h index 7de68d459f20b..b8a3ed94703a1 100644 --- a/L1Trigger/L1TTrackMatch/interface/L1TrackJetProducer.h +++ b/L1Trigger/L1TTrackMatch/interface/L1TrackJetProducer.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include //Each individual box in the eta and phi dimension. // Also used to store final cluster data for each zbin. diff --git a/L1Trigger/L1TTrackMatch/plugins/L1TrackJetProducer.cc b/L1Trigger/L1TTrackMatch/plugins/L1TrackJetProducer.cc index 7186504bb1f83..d645dffcaa4a7 100644 --- a/L1Trigger/L1TTrackMatch/plugins/L1TrackJetProducer.cc +++ b/L1Trigger/L1TTrackMatch/plugins/L1TrackJetProducer.cc @@ -64,73 +64,73 @@ class L1TrackJetProducer : public stream::EDProducer<> { // ----------member data --------------------------- - edm::ESGetToken tTopoToken_; - const EDGetTokenT>> trackToken_; - const edm::EDGetTokenT> PVtxToken_; vector> L1TrkPtrs_; vector tdtrk_; - float trkZMax_; - float trkPtMax_; - float trkPtMin_; - float trkEtaMax_; - float nStubs4PromptChi2_; - float nStubs5PromptChi2_; - float nStubs4PromptBend_; - float nStubs5PromptBend_; - int trkNPSStubMin_; - int lowpTJetMinTrackMultiplicity_; - float lowpTJetThreshold_; - int highpTJetMinTrackMultiplicity_; - float highpTJetThreshold_; - int zBins_; - int etaBins_; - int phiBins_; - double minTrkJetpT_; + const float trkZMax_; + const float trkPtMax_; + const float trkPtMin_; + const float trkEtaMax_; + const float nStubs4PromptChi2_; + const float nStubs5PromptChi2_; + const float nStubs4PromptBend_; + const float nStubs5PromptBend_; + const int trkNPSStubMin_; + const int lowpTJetMinTrackMultiplicity_; + const float lowpTJetThreshold_; + const int highpTJetMinTrackMultiplicity_; + const float highpTJetThreshold_; + const int zBins_; + const int etaBins_; + const int phiBins_; + const double minTrkJetpT_; float zStep_; float etaStep_; float phiStep_; - bool displaced_; - float d0CutNStubs4_; - float d0CutNStubs5_; - float nStubs4DisplacedChi2_; - float nStubs5DisplacedChi2_; - float nStubs4DisplacedBend_; - float nStubs5DisplacedBend_; - int nDisplacedTracks_; - float dzPVTrk_; + const bool displaced_; + const float d0CutNStubs4_; + const float d0CutNStubs5_; + const float nStubs4DisplacedChi2_; + const float nStubs5DisplacedChi2_; + const float nStubs4DisplacedBend_; + const float nStubs5DisplacedBend_; + const int nDisplacedTracks_; + const float dzPVTrk_; + + edm::ESGetToken tTopoToken_; + const EDGetTokenT>> trackToken_; + const edm::EDGetTokenT> PVtxToken_; }; L1TrackJetProducer::L1TrackJetProducer(const ParameterSet &iConfig) - : tTopoToken_(esConsumes(edm::ESInputTag("", ""))), + : trkZMax_((float)iConfig.getParameter("trk_zMax")), + trkPtMax_((float)iConfig.getParameter("trk_ptMax")), + trkPtMin_((float)iConfig.getParameter("trk_ptMin")), + trkEtaMax_((float)iConfig.getParameter("trk_etaMax")), + nStubs4PromptChi2_((float)iConfig.getParameter("nStubs4PromptChi2")), + nStubs5PromptChi2_((float)iConfig.getParameter("nStubs5PromptChi2")), + nStubs4PromptBend_((float)iConfig.getParameter("nStubs4PromptBend")), + nStubs5PromptBend_((float)iConfig.getParameter("nStubs5PromptBend")), + trkNPSStubMin_((int)iConfig.getParameter("trk_nPSStubMin")), + lowpTJetMinTrackMultiplicity_((int)iConfig.getParameter("lowpTJetMinTrackMultiplicity")), + lowpTJetThreshold_((float)iConfig.getParameter("lowpTJetThreshold")), + highpTJetMinTrackMultiplicity_((int)iConfig.getParameter("highpTJetMinTrackMultiplicity")), + highpTJetThreshold_((float)iConfig.getParameter("highpTJetThreshold")), + zBins_((int)iConfig.getParameter("zBins")), + etaBins_((int)iConfig.getParameter("etaBins")), + phiBins_((int)iConfig.getParameter("phiBins")), + minTrkJetpT_(iConfig.getParameter("minTrkJetpT")), + displaced_(iConfig.getParameter("displaced")), + d0CutNStubs4_((float)iConfig.getParameter("d0_cutNStubs4")), + d0CutNStubs5_((float)iConfig.getParameter("d0_cutNStubs5")), + nStubs4DisplacedChi2_((float)iConfig.getParameter("nStubs4DisplacedChi2")), + nStubs5DisplacedChi2_((float)iConfig.getParameter("nStubs5DisplacedChi2")), + nStubs4DisplacedBend_((float)iConfig.getParameter("nStubs4DisplacedBend")), + nStubs5DisplacedBend_((float)iConfig.getParameter("nStubs5DisplacedBend")), + nDisplacedTracks_((int)iConfig.getParameter("nDisplacedTracks")), + dzPVTrk_((float)iConfig.getParameter("MaxDzTrackPV")), + tTopoToken_(esConsumes(edm::ESInputTag("", ""))), trackToken_(consumes>>(iConfig.getParameter("L1TrackInputTag"))), PVtxToken_(consumes>(iConfig.getParameter("L1PVertexCollection"))) { - trkZMax_ = (float)iConfig.getParameter("trk_zMax"); - trkPtMax_ = (float)iConfig.getParameter("trk_ptMax"); - trkPtMin_ = (float)iConfig.getParameter("trk_ptMin"); - trkEtaMax_ = (float)iConfig.getParameter("trk_etaMax"); - nStubs4PromptChi2_ = (float)iConfig.getParameter("nStubs4PromptChi2"); - nStubs5PromptChi2_ = (float)iConfig.getParameter("nStubs5PromptChi2"); - nStubs4PromptBend_ = (float)iConfig.getParameter("nStubs4PromptBend"); - nStubs5PromptBend_ = (float)iConfig.getParameter("nStubs5PromptBend"); - trkNPSStubMin_ = (int)iConfig.getParameter("trk_nPSStubMin"); - minTrkJetpT_ = iConfig.getParameter("minTrkJetpT"); - etaBins_ = (int)iConfig.getParameter("etaBins"); - phiBins_ = (int)iConfig.getParameter("phiBins"); - zBins_ = (int)iConfig.getParameter("zBins"); - d0CutNStubs4_ = (float)iConfig.getParameter("d0_cutNStubs4"); - d0CutNStubs5_ = (float)iConfig.getParameter("d0_cutNStubs5"); - lowpTJetMinTrackMultiplicity_ = (int)iConfig.getParameter("lowpTJetMinTrackMultiplicity"); - lowpTJetThreshold_ = (float)iConfig.getParameter("lowpTJetThreshold"); - highpTJetMinTrackMultiplicity_ = (int)iConfig.getParameter("highpTJetMinTrackMultiplicity"); - highpTJetThreshold_ = (float)iConfig.getParameter("highpTJetThreshold"); - displaced_ = iConfig.getParameter("displaced"); - nStubs4DisplacedChi2_ = (float)iConfig.getParameter("nStubs4DisplacedChi2"); - nStubs5DisplacedChi2_ = (float)iConfig.getParameter("nStubs5DisplacedChi2"); - nStubs4DisplacedBend_ = (float)iConfig.getParameter("nStubs4DisplacedBend"); - nStubs5DisplacedBend_ = (float)iConfig.getParameter("nStubs5DisplacedBend"); - nDisplacedTracks_ = (int)iConfig.getParameter("nDisplacedTracks"); - dzPVTrk_ = (float)iConfig.getParameter("MaxDzTrackPV"); - zStep_ = 2.0 * trkZMax_ / (zBins_ + 1); // added +1 in denom etaStep_ = 2.0 * trkEtaMax_ / etaBins_; //etaStep is the width of an etabin phiStep_ = 2 * M_PI / phiBins_; ////phiStep is the width of a phibin