CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
MtdTracksValidation Class Reference
Inheritance diagram for MtdTracksValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 MtdTracksValidation (const edm::ParameterSet &)
 
 ~MtdTracksValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
const bool mvaGenRecMatch (const HepMC::GenParticle &, const double &, const reco::TrackBase &)
 
const bool mvaGenSel (const HepMC::GenParticle &, const float &)
 
const bool mvaRecSel (const reco::TrackBase &, const reco::Vertex &, const double &, const double &)
 

Private Attributes

const std::string folder_
 
edm::EDGetTokenT< reco::TrackCollectionGenRecTrackToken_
 
edm::EDGetTokenT< edm::HepMCProductHepMCProductToken_
 
MonitorElementmeBTLTrackEffEtaMtd_
 
MonitorElementmeBTLTrackEffEtaTot_
 
MonitorElementmeBTLTrackEffPhiMtd_
 
MonitorElementmeBTLTrackEffPhiTot_
 
MonitorElementmeBTLTrackEffPtMtd_
 
MonitorElementmeBTLTrackEffPtTot_
 
MonitorElementmeBTLTrackPtRes_
 
MonitorElementmeBTLTrackRPTime_
 
MonitorElementmeETLTrackEffEtaMtd_ [2]
 
MonitorElementmeETLTrackEffEtaTot_ [2]
 
MonitorElementmeETLTrackEffPhiMtd_ [2]
 
MonitorElementmeETLTrackEffPhiTot_ [2]
 
MonitorElementmeETLTrackEffPtMtd_ [2]
 
MonitorElementmeETLTrackEffPtTot_ [2]
 
MonitorElementmeETLTrackPtRes_
 
MonitorElementmeETLTrackRPTime_
 
MonitorElementmeMVATrackEffEtaTot_
 
MonitorElementmeMVATrackEffPtTot_
 
MonitorElementmeMVATrackMatchedEffEtaMtd_
 
MonitorElementmeMVATrackMatchedEffEtaTot_
 
MonitorElementmeMVATrackMatchedEffPtMtd_
 
MonitorElementmeMVATrackMatchedEffPtTot_
 
MonitorElementmeMVATrackPullTot_
 
MonitorElementmeMVATrackResTot_
 
MonitorElementmeMVATrackZposResTot_
 
MonitorElementmeTrackMVAQual_
 
MonitorElementmeTrackNumHits_
 
MonitorElementmeTrackPathLenghtvsEta_
 
MonitorElementmeTrackSigmat0Pid_
 
MonitorElementmeTrackSigmat0SafePid_
 
MonitorElementmeTrackSigmat0Src_
 
MonitorElementmeTrackt0Pid_
 
MonitorElementmeTrackt0SafePid_
 
MonitorElementmeTrackt0Src_
 
MonitorElementmeTracktmtd_
 
edm::ESGetToken< MTDTopology, MTDTopologyRcdmtdtopoToken_
 
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecordparticleTableToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_
 
edm::EDGetTokenT< reco::TrackCollectionRecTrackToken_
 
edm::EDGetTokenT< std::vector< reco::Vertex > > RecVertexToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0PidToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0SafePidToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0SrcToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > SigmatmtdToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > t0PidToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > t0SafePidToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > t0SrcToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > tmtdToken_
 
edm::EDGetTokenT< edm::ValueMap< int > > trackAssocToken_
 
const float trackMaxBtlEta_
 
const float trackMaxEtlEta_
 
const float trackMinEtlEta_
 
const float trackMinPt_
 
edm::EDGetTokenT< edm::ValueMap< float > > trackMVAQualToken_
 

Static Private Attributes

static constexpr double deltaDRcut_ = 0.03
 
static constexpr double deltaPTcut_ = 0.05
 
static constexpr double deltaZcut_ = 0.1
 
static constexpr double etacutGEN_ = 4.
 
static constexpr double etacutREC_ = 3.
 
static constexpr double pTcut_ = 0.7
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 41 of file MtdTracksValidation.cc.

Constructor & Destructor Documentation

◆ MtdTracksValidation()

MtdTracksValidation::MtdTracksValidation ( const edm::ParameterSet iConfig)
explicit

Definition at line 135 of file MtdTracksValidation.cc.

References GenRecTrackToken_, edm::ParameterSet::getParameter(), HepMCProductToken_, mtdtopoToken_, particleTableToken_, pathLengthToken_, RecTrackToken_, RecVertexToken_, Sigmat0PidToken_, Sigmat0SafePidToken_, Sigmat0SrcToken_, SigmatmtdToken_, t0PidToken_, t0SafePidToken_, t0SrcToken_, tmtdToken_, trackAssocToken_, and trackMVAQualToken_.

136  : folder_(iConfig.getParameter<std::string>("folder")),
137  trackMinPt_(iConfig.getParameter<double>("trackMinimumPt")),
138  trackMaxBtlEta_(iConfig.getParameter<double>("trackMaximumBtlEta")),
139  trackMinEtlEta_(iConfig.getParameter<double>("trackMinimumEtlEta")),
140  trackMaxEtlEta_(iConfig.getParameter<double>("trackMaximumEtlEta")) {
141  GenRecTrackToken_ = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("inputTagG"));
142  RecTrackToken_ = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("inputTagT"));
143  RecVertexToken_ = consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("inputTagV"));
144  HepMCProductToken_ = consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("inputTagH"));
145  trackAssocToken_ = consumes<edm::ValueMap<int>>(iConfig.getParameter<edm::InputTag>("trackAssocSrc"));
146  pathLengthToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("pathLengthSrc"));
147  tmtdToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("tmtd"));
148  SigmatmtdToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("sigmatmtd"));
149  t0SrcToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("t0Src"));
150  Sigmat0SrcToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("sigmat0Src"));
151  t0PidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("t0PID"));
152  Sigmat0PidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("sigmat0PID"));
153  t0SafePidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("t0SafePID"));
154  Sigmat0SafePidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("sigmat0SafePID"));
155  trackMVAQualToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("trackMVAQual"));
156  mtdtopoToken_ = esConsumes<MTDTopology, MTDTopologyRcd>();
157  particleTableToken_ = esConsumes<HepPDT::ParticleDataTable, edm::DefaultRecord>();
158 }
edm::EDGetTokenT< edm::ValueMap< int > > trackAssocToken_
edm::EDGetTokenT< edm::ValueMap< float > > trackMVAQualToken_
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< edm::ValueMap< float > > t0SafePidToken_
edm::EDGetTokenT< edm::ValueMap< float > > t0SrcToken_
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
const std::string folder_
edm::EDGetTokenT< edm::HepMCProduct > HepMCProductToken_
edm::EDGetTokenT< std::vector< reco::Vertex > > RecVertexToken_
edm::EDGetTokenT< edm::ValueMap< float > > tmtdToken_
edm::EDGetTokenT< reco::TrackCollection > GenRecTrackToken_
edm::EDGetTokenT< reco::TrackCollection > RecTrackToken_
edm::EDGetTokenT< edm::ValueMap< float > > t0PidToken_
edm::EDGetTokenT< edm::ValueMap< float > > SigmatmtdToken_
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0PidToken_
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0SrcToken_
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0SafePidToken_
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > particleTableToken_

◆ ~MtdTracksValidation()

MtdTracksValidation::~MtdTracksValidation ( )
override

Definition at line 160 of file MtdTracksValidation.cc.

160 {}

Member Function Documentation

◆ analyze()

void MtdTracksValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 163 of file MtdTracksValidation.cc.

References funct::abs(), MTDTopologyMode::barphiflat, ALCARECOTkAlJpsiMuMu_cff::charge, angle_units::operators::convertMmToCm(), deltaZcut_, dqm::impl::MonitorElement::Fill(), GenRecTrackToken_, edm::EventSetup::getHandle(), MTDTopology::getMTDTopologyMode(), edm::EventSetup::getTransientHandle(), HepMCProductToken_, iEvent, edm::makeValid(), CaloTowersParam_cfi::mc, meBTLTrackEffEtaMtd_, meBTLTrackEffEtaTot_, meBTLTrackEffPhiMtd_, meBTLTrackEffPhiTot_, meBTLTrackEffPtMtd_, meBTLTrackEffPtTot_, meBTLTrackPtRes_, meBTLTrackRPTime_, meETLTrackEffEtaMtd_, meETLTrackEffEtaTot_, meETLTrackEffPhiMtd_, meETLTrackEffPhiTot_, meETLTrackEffPtMtd_, meETLTrackEffPtTot_, meETLTrackPtRes_, meETLTrackRPTime_, meMVATrackEffEtaTot_, meMVATrackEffPtTot_, meMVATrackMatchedEffEtaMtd_, meMVATrackMatchedEffEtaTot_, meMVATrackMatchedEffPtMtd_, meMVATrackMatchedEffPtTot_, meMVATrackPullTot_, meMVATrackResTot_, meMVATrackZposResTot_, meTrackMVAQual_, meTrackNumHits_, meTrackPathLenghtvsEta_, meTrackSigmat0Pid_, meTrackSigmat0SafePid_, meTrackSigmat0Src_, meTrackt0Pid_, meTrackt0SafePid_, meTrackt0Src_, meTracktmtd_, mtdtopoToken_, mvaGenRecMatch(), mvaGenSel(), mvaRecSel(), ETLDetId::nDisc(), LHEGenericFilter_cfi::ParticleID, particleTableToken_, pathLengthToken_, RecTrackToken_, RecVertexToken_, Sigmat0PidToken_, Sigmat0SafePidToken_, Sigmat0SrcToken_, SigmatmtdToken_, t0PidToken_, t0SafePidToken_, t0SrcToken_, tmtdToken_, HLT_2022v12_cff::track, trackAssocToken_, trackMaxBtlEta_, trackMaxEtlEta_, trackMinEtlEta_, trackMinPt_, trackMVAQualToken_, and MTDDetId::zside().

163  {
164  using namespace edm;
165  using namespace geant_units::operators;
166  using namespace std;
167 
168  auto topologyHandle = iSetup.getTransientHandle(mtdtopoToken_);
169  const MTDTopology* topology = topologyHandle.product();
170 
171  bool topo1Dis = false;
172  bool topo2Dis = false;
173  if (topology->getMTDTopologyMode() <= static_cast<int>(MTDTopologyMode::Mode::barphiflat)) {
174  topo1Dis = true;
175  }
176  if (topology->getMTDTopologyMode() > static_cast<int>(MTDTopologyMode::Mode::barphiflat)) {
177  topo2Dis = true;
178  }
179 
180  auto GenRecTrackHandle = makeValid(iEvent.getHandle(GenRecTrackToken_));
181  auto RecVertexHandle = makeValid(iEvent.getHandle(RecVertexToken_));
182 
183  const auto& tMtd = iEvent.get(tmtdToken_);
184  const auto& SigmatMtd = iEvent.get(SigmatmtdToken_);
185  const auto& t0Src = iEvent.get(t0SrcToken_);
186  const auto& Sigmat0Src = iEvent.get(Sigmat0SrcToken_);
187  const auto& t0Pid = iEvent.get(t0PidToken_);
188  const auto& Sigmat0Pid = iEvent.get(Sigmat0PidToken_);
189  const auto& t0Safe = iEvent.get(t0SafePidToken_);
190  const auto& Sigmat0Safe = iEvent.get(Sigmat0SafePidToken_);
191  const auto& mtdQualMVA = iEvent.get(trackMVAQualToken_);
192  const auto& trackAssoc = iEvent.get(trackAssocToken_);
193  const auto& pathLength = iEvent.get(pathLengthToken_);
194 
195  unsigned int index = 0;
196  // --- Loop over all RECO tracks ---
197  for (const auto& trackGen : *GenRecTrackHandle) {
198  const reco::TrackRef trackref(iEvent.getHandle(GenRecTrackToken_), index);
199  index++;
200 
201  if (trackAssoc[trackref] == -1) {
202  LogInfo("mtdTracks") << "Extended track not associated";
203  continue;
204  }
205 
206  const reco::TrackRef mtdTrackref = reco::TrackRef(iEvent.getHandle(RecTrackToken_), trackAssoc[trackref]);
207  const reco::Track track = *mtdTrackref;
208 
209  if (track.pt() < trackMinPt_ || std::abs(track.eta()) > trackMaxEtlEta_)
210  continue;
211 
212  meTracktmtd_->Fill(tMtd[trackref]);
213  if (std::round(SigmatMtd[trackref] - Sigmat0Pid[trackref]) != 0) {
214  LogWarning("mtdTracks") << "TimeError associated to refitted track is different from TimeError stored in tofPID "
215  "sigmat0 ValueMap: this should not happen";
216  }
217 
218  meTrackt0Src_->Fill(t0Src[trackref]);
219  meTrackSigmat0Src_->Fill(Sigmat0Src[trackref]);
220 
221  meTrackt0Pid_->Fill(t0Pid[trackref]);
222  meTrackSigmat0Pid_->Fill(Sigmat0Pid[trackref]);
223  meTrackt0SafePid_->Fill(t0Safe[trackref]);
224  meTrackSigmat0SafePid_->Fill(Sigmat0Safe[trackref]);
225  meTrackMVAQual_->Fill(mtdQualMVA[trackref]);
226 
227  meTrackPathLenghtvsEta_->Fill(std::abs(track.eta()), pathLength[trackref]);
228 
229  if (std::abs(track.eta()) < trackMaxBtlEta_) {
230  // --- all BTL tracks (with and without hit in MTD) ---
234 
235  bool MTDBtl = false;
236  int numMTDBtlvalidhits = 0;
237  for (const auto hit : track.recHits()) {
238  if (hit->isValid() == false)
239  continue;
240  MTDDetId Hit = hit->geographicalId();
241  if ((Hit.det() == 6) && (Hit.subdetId() == 1) && (Hit.mtdSubDetector() == 1)) {
242  MTDBtl = true;
243  numMTDBtlvalidhits++;
244  }
245  }
246  meTrackNumHits_->Fill(numMTDBtlvalidhits);
247 
248  // --- keeping only tracks with last hit in MTD ---
249  if (MTDBtl == true) {
254  meBTLTrackPtRes_->Fill((trackGen.pt() - track.pt()) / trackGen.pt());
255  }
256  } //loop over (geometrical) BTL tracks
257 
258  else {
259  // --- all ETL tracks (with and without hit in MTD) ---
260  if ((track.eta() < -trackMinEtlEta_) && (track.eta() > -trackMaxEtlEta_)) {
261  meETLTrackEffEtaTot_[0]->Fill(track.eta());
262  meETLTrackEffPhiTot_[0]->Fill(track.phi());
263  meETLTrackEffPtTot_[0]->Fill(track.pt());
264  }
265 
266  if ((track.eta() > trackMinEtlEta_) && (track.eta() < trackMaxEtlEta_)) {
267  meETLTrackEffEtaTot_[1]->Fill(track.eta());
268  meETLTrackEffPhiTot_[1]->Fill(track.phi());
269  meETLTrackEffPtTot_[1]->Fill(track.pt());
270  }
271 
272  bool MTDEtlZnegD1 = false;
273  bool MTDEtlZnegD2 = false;
274  bool MTDEtlZposD1 = false;
275  bool MTDEtlZposD2 = false;
276  int numMTDEtlvalidhits = 0;
277  for (const auto hit : track.recHits()) {
278  if (hit->isValid() == false)
279  continue;
280  MTDDetId Hit = hit->geographicalId();
281  if ((Hit.det() == 6) && (Hit.subdetId() == 1) && (Hit.mtdSubDetector() == 2)) {
282  ETLDetId ETLHit = hit->geographicalId();
283 
284  if (topo2Dis) {
285  if ((ETLHit.zside() == -1) && (ETLHit.nDisc() == 1)) {
286  MTDEtlZnegD1 = true;
288  meETLTrackPtRes_->Fill((trackGen.pt() - track.pt()) / trackGen.pt());
289  numMTDEtlvalidhits++;
290  }
291  if ((ETLHit.zside() == -1) && (ETLHit.nDisc() == 2)) {
292  MTDEtlZnegD2 = true;
294  meETLTrackPtRes_->Fill((trackGen.pt() - track.pt()) / trackGen.pt());
295  numMTDEtlvalidhits++;
296  }
297  if ((ETLHit.zside() == 1) && (ETLHit.nDisc() == 1)) {
298  MTDEtlZposD1 = true;
300  meETLTrackPtRes_->Fill((trackGen.pt() - track.pt()) / trackGen.pt());
301  numMTDEtlvalidhits++;
302  }
303  if ((ETLHit.zside() == 1) && (ETLHit.nDisc() == 2)) {
304  MTDEtlZposD2 = true;
306  meETLTrackPtRes_->Fill((trackGen.pt() - track.pt()) / trackGen.pt());
307  numMTDEtlvalidhits++;
308  }
309  }
310 
311  if (topo1Dis) {
312  if (ETLHit.zside() == -1) {
313  MTDEtlZnegD1 = true;
315  numMTDEtlvalidhits++;
316  }
317  if (ETLHit.zside() == 1) {
318  MTDEtlZposD1 = true;
320  numMTDEtlvalidhits++;
321  }
322  }
323  }
324  }
325  meTrackNumHits_->Fill(-numMTDEtlvalidhits);
326 
327  // --- keeping only tracks with last hit in MTD ---
328  if ((track.eta() < -trackMinEtlEta_) && (track.eta() > -trackMaxEtlEta_)) {
329  if ((MTDEtlZnegD1 == true) || (MTDEtlZnegD2 == true)) {
330  meETLTrackEffEtaMtd_[0]->Fill(track.eta());
331  meETLTrackEffPhiMtd_[0]->Fill(track.phi());
332  meETLTrackEffPtMtd_[0]->Fill(track.pt());
333  }
334  }
335  if ((track.eta() > trackMinEtlEta_) && (track.eta() < trackMaxEtlEta_)) {
336  if ((MTDEtlZposD1 == true) || (MTDEtlZposD2 == true)) {
337  meETLTrackEffEtaMtd_[1]->Fill(track.eta());
338  meETLTrackEffPhiMtd_[1]->Fill(track.phi());
339  meETLTrackEffPtMtd_[1]->Fill(track.pt());
340  }
341  }
342  }
343  } //RECO tracks loop
344 
345  const auto& primRecoVtx = *(RecVertexHandle.product()->begin());
346 
347  // generator level information (HepMC format)
348  auto GenEventHandle = makeValid(iEvent.getHandle(HepMCProductToken_));
349  const HepMC::GenEvent* mc = GenEventHandle->GetEvent();
350  double zsim = convertMmToCm((*(mc->vertices_begin()))->position().z());
351  double tsim = (*(mc->vertices_begin()))->position().t() * CLHEP::mm / CLHEP::c_light;
352 
353  auto pdt = iSetup.getHandle(particleTableToken_);
354  const HepPDT::ParticleDataTable* pdTable = pdt.product();
355 
356  // select events with reco vertex close to true simulated primary vertex
357  if (std::abs(primRecoVtx.z() - zsim) < deltaZcut_) {
358  index = 0;
359  for (const auto& trackGen : *GenRecTrackHandle) {
360  const reco::TrackRef trackref(iEvent.getHandle(GenRecTrackToken_), index);
361  index++;
362 
363  // select the reconstructed track
364 
365  if (trackAssoc[trackref] == -1) {
366  continue;
367  }
368 
369  bool noCrack = std::abs(trackGen.eta()) < trackMaxBtlEta_ || std::abs(trackGen.eta()) > trackMinEtlEta_;
370 
371  // reco-gen matching used for MVA quality flag
372  if (mvaRecSel(trackGen, primRecoVtx, t0Safe[trackref], Sigmat0Safe[trackref])) {
373  if (noCrack) {
374  meMVATrackEffPtTot_->Fill(trackGen.pt());
375  }
376  meMVATrackEffEtaTot_->Fill(std::abs(trackGen.eta()));
377 
378  double dZ = trackGen.vz() - zsim;
379  double dT(-9999.);
380  double pullT(-9999.);
381  if (Sigmat0Safe[trackref] != -1.) {
382  dT = t0Safe[trackref] - tsim;
383  pullT = dT / Sigmat0Safe[trackref];
384  }
385  for (const auto& genP : mc->particle_range()) {
386  // select status 1 genParticles and match them to the reconstructed track
387 
388  float charge = pdTable->particle(HepPDT::ParticleID(genP->pdg_id())) != nullptr
389  ? pdTable->particle(HepPDT::ParticleID(genP->pdg_id()))->charge()
390  : 0.f;
391  if (mvaGenSel(*genP, charge)) {
392  if (mvaGenRecMatch(*genP, zsim, trackGen)) {
394  if (noCrack) {
395  meMVATrackMatchedEffPtTot_->Fill(trackGen.pt());
396  }
397  meMVATrackMatchedEffEtaTot_->Fill(std::abs(trackGen.eta()));
398  if (pullT > -9999.) {
399  meMVATrackResTot_->Fill(dT);
400  meMVATrackPullTot_->Fill(pullT);
401  if (noCrack) {
402  meMVATrackMatchedEffPtMtd_->Fill(trackGen.pt());
403  }
404  meMVATrackMatchedEffEtaMtd_->Fill(std::abs(trackGen.eta()));
405  }
406  break;
407  }
408  }
409  }
410  }
411  }
412  }
413 }
MonitorElement * meETLTrackEffEtaTot_[2]
edm::EDGetTokenT< edm::ValueMap< int > > trackAssocToken_
MonitorElement * meBTLTrackEffPhiMtd_
int getMTDTopologyMode() const
Definition: MTDTopology.h:27
edm::EDGetTokenT< edm::ValueMap< float > > trackMVAQualToken_
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_
MonitorElement * meMVATrackResTot_
MonitorElement * meTrackNumHits_
MonitorElement * meTrackt0Pid_
MonitorElement * meETLTrackRPTime_
edm::EDGetTokenT< edm::ValueMap< float > > t0SafePidToken_
edm::EDGetTokenT< edm::ValueMap< float > > t0SrcToken_
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
edm::EDGetTokenT< edm::HepMCProduct > HepMCProductToken_
HepPDT::ParticleDataTable ParticleDataTable
MonitorElement * meMVATrackMatchedEffEtaMtd_
const bool mvaRecSel(const reco::TrackBase &, const reco::Vertex &, const double &, const double &)
MonitorElement * meBTLTrackPtRes_
edm::EDGetTokenT< std::vector< reco::Vertex > > RecVertexToken_
MonitorElement * meETLTrackEffPtTot_[2]
MonitorElement * meBTLTrackEffEtaMtd_
edm::EDGetTokenT< edm::ValueMap< float > > tmtdToken_
MonitorElement * meMVATrackMatchedEffPtTot_
MonitorElement * meMVATrackEffPtTot_
MonitorElement * meMVATrackEffEtaTot_
const bool mvaGenSel(const HepMC::GenParticle &, const float &)
Detector identifier base class for the MIP Timing Layer.
Definition: MTDDetId.h:21
edm::EDGetTokenT< reco::TrackCollection > GenRecTrackToken_
MonitorElement * meETLTrackEffPhiMtd_[2]
void Fill(long long x)
edm::EDGetTokenT< reco::TrackCollection > RecTrackToken_
MonitorElement * meBTLTrackEffPhiTot_
int iEvent
Definition: GenABIO.cc:224
MonitorElement * meBTLTrackRPTime_
MonitorElement * meETLTrackPtRes_
MonitorElement * meTrackt0SafePid_
MonitorElement * meBTLTrackEffEtaTot_
static constexpr double deltaZcut_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * meMVATrackMatchedEffEtaTot_
edm::EDGetTokenT< edm::ValueMap< float > > t0PidToken_
MonitorElement * meTrackMVAQual_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
MonitorElement * meETLTrackEffPhiTot_[2]
edm::EDGetTokenT< edm::ValueMap< float > > SigmatmtdToken_
Log< level::Info, false > LogInfo
constexpr NumType convertMmToCm(NumType millimeters)
Definition: angle_units.h:44
MonitorElement * meMVATrackPullTot_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
MonitorElement * meTrackSigmat0SafePid_
MonitorElement * meETLTrackEffEtaMtd_[2]
int zside() const
Definition: MTDDetId.h:61
MonitorElement * meTrackSigmat0Pid_
MonitorElement * meBTLTrackEffPtMtd_
MonitorElement * meTrackt0Src_
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0PidToken_
MonitorElement * meTracktmtd_
MonitorElement * meBTLTrackEffPtTot_
MonitorElement * meTrackPathLenghtvsEta_
Detector identifier class for the Endcap Timing Layer.
Definition: ETLDetId.h:15
HLT enums.
int nDisc() const
Definition: ETLDetId.h:122
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:162
const bool mvaGenRecMatch(const HepMC::GenParticle &, const double &, const reco::TrackBase &)
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0SrcToken_
MonitorElement * meETLTrackEffPtMtd_[2]
MonitorElement * meMVATrackZposResTot_
Log< level::Warning, false > LogWarning
auto makeValid(const U &iOtherHandleType) noexcept(false)
Definition: ValidHandle.h:52
MonitorElement * meMVATrackMatchedEffPtMtd_
MonitorElement * meTrackSigmat0Src_
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0SafePidToken_
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > particleTableToken_

◆ bookHistograms()

void MtdTracksValidation::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 416 of file MtdTracksValidation.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), folder_, meBTLTrackEffEtaMtd_, meBTLTrackEffEtaTot_, meBTLTrackEffPhiMtd_, meBTLTrackEffPhiTot_, meBTLTrackEffPtMtd_, meBTLTrackEffPtTot_, meBTLTrackPtRes_, meBTLTrackRPTime_, meETLTrackEffEtaMtd_, meETLTrackEffEtaTot_, meETLTrackEffPhiMtd_, meETLTrackEffPhiTot_, meETLTrackEffPtMtd_, meETLTrackEffPtTot_, meETLTrackPtRes_, meETLTrackRPTime_, meMVATrackEffEtaTot_, meMVATrackEffPtTot_, meMVATrackMatchedEffEtaMtd_, meMVATrackMatchedEffEtaTot_, meMVATrackMatchedEffPtMtd_, meMVATrackMatchedEffPtTot_, meMVATrackPullTot_, meMVATrackResTot_, meMVATrackZposResTot_, meTrackMVAQual_, meTrackNumHits_, meTrackPathLenghtvsEta_, meTrackSigmat0Pid_, meTrackSigmat0SafePid_, meTrackSigmat0Src_, meTrackt0Pid_, meTrackt0SafePid_, meTrackt0Src_, meTracktmtd_, and dqm::implementation::NavigatorBase::setCurrentFolder().

416  {
417  ibook.setCurrentFolder(folder_);
418 
419  // histogram booking
420  meBTLTrackRPTime_ = ibook.book1D("TrackBTLRPTime", "Track t0 with respect to R.P.;t0 [ns]", 100, -1, 3);
421  meBTLTrackEffEtaTot_ = ibook.book1D("TrackBTLEffEtaTot", "Track efficiency vs eta (Tot);#eta_{RECO}", 100, -1.6, 1.6);
423  ibook.book1D("TrackBTLEffPhiTot", "Track efficiency vs phi (Tot);#phi_{RECO} [rad]", 100, -3.2, 3.2);
424  meBTLTrackEffPtTot_ = ibook.book1D("TrackBTLEffPtTot", "Track efficiency vs pt (Tot);pt_{RECO} [GeV]", 50, 0, 10);
425  meBTLTrackEffEtaMtd_ = ibook.book1D("TrackBTLEffEtaMtd", "Track efficiency vs eta (Mtd);#eta_{RECO}", 100, -1.6, 1.6);
427  ibook.book1D("TrackBTLEffPhiMtd", "Track efficiency vs phi (Mtd);#phi_{RECO} [rad]", 100, -3.2, 3.2);
428  meBTLTrackEffPtMtd_ = ibook.book1D("TrackBTLEffPtMtd", "Track efficiency vs pt (Mtd);pt_{RECO} [GeV]", 50, 0, 10);
430  ibook.book1D("TrackBTLPtRes", "Track pT resolution ;pT_{Gentrack}-pT_{MTDtrack}/pT_{Gentrack} ", 100, -0.1, 0.1);
431  meETLTrackRPTime_ = ibook.book1D("TrackETLRPTime", "Track t0 with respect to R.P.;t0 [ns]", 100, -1, 3);
433  ibook.book1D("TrackETLEffEtaTotZneg", "Track efficiency vs eta (Tot) (-Z);#eta_{RECO}", 100, -3.2, -1.4);
435  ibook.book1D("TrackETLEffEtaTotZpos", "Track efficiency vs eta (Tot) (+Z);#eta_{RECO}", 100, 1.4, 3.2);
437  ibook.book1D("TrackETLEffPhiTotZneg", "Track efficiency vs phi (Tot) (-Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
439  ibook.book1D("TrackETLEffPhiTotZpos", "Track efficiency vs phi (Tot) (+Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
441  ibook.book1D("TrackETLEffPtTotZneg", "Track efficiency vs pt (Tot) (-Z);pt_{RECO} [GeV]", 50, 0, 10);
443  ibook.book1D("TrackETLEffPtTotZpos", "Track efficiency vs pt (Tot) (+Z);pt_{RECO} [GeV]", 50, 0, 10);
445  ibook.book1D("TrackETLEffEtaMtdZneg", "Track efficiency vs eta (Mtd) (-Z);#eta_{RECO}", 100, -3.2, -1.4);
447  ibook.book1D("TrackETLEffEtaMtdZpos", "Track efficiency vs eta (Mtd) (+Z);#eta_{RECO}", 100, 1.4, 3.2);
449  ibook.book1D("TrackETLEffPhiMtdZneg", "Track efficiency vs phi (Mtd) (-Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
451  ibook.book1D("TrackETLEffPhiMtdZpos", "Track efficiency vs phi (Mtd) (+Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
453  ibook.book1D("TrackETLEffPtMtdZneg", "Track efficiency vs pt (Mtd) (-Z);pt_{RECO} [GeV]", 50, 0, 10);
455  ibook.book1D("TrackETLEffPtMtdZpos", "Track efficiency vs pt (Mtd) (+Z);pt_{RECO} [GeV]", 50, 0, 10);
457  ibook.book1D("TrackETLPtRes", "Track pT resolution;pT_{Gentrack}-pT_{MTDtrack}/pT_{Gentrack} ", 100, -0.1, 0.1);
458 
459  meTracktmtd_ = ibook.book1D("Tracktmtd", "Track time from TrackExtenderWithMTD;tmtd [ns]", 150, 1, 16);
460  meTrackt0Src_ = ibook.book1D("Trackt0Src", "Track time from TrackExtenderWithMTD;t0Src [ns]", 100, -1.5, 1.5);
462  ibook.book1D("TrackSigmat0Src", "Time Error from TrackExtenderWithMTD; #sigma_{t0Src} [ns]", 100, 0, 0.1);
463 
464  meTrackt0Pid_ = ibook.book1D("Trackt0Pid", "Track t0 as stored in TofPid;t0 [ns]", 100, -1, 1);
465  meTrackSigmat0Pid_ = ibook.book1D("TrackSigmat0Pid", "Sigmat0 as stored in TofPid; #sigma_{t0} [ns]", 100, 0, 0.1);
466  meTrackt0SafePid_ = ibook.book1D("Trackt0SafePID", "Track t0 Safe as stored in TofPid;t0 [ns]", 100, -1, 1);
468  ibook.book1D("TrackSigmat0SafePID", "Sigmat0 Safe as stored in TofPid; #sigma_{t0} [ns]", 100, 0, 0.1);
469  meTrackNumHits_ = ibook.book1D("TrackNumHits", "Number of valid MTD hits per track ; Number of hits", 10, -5, 5);
470  meTrackMVAQual_ = ibook.book1D("TrackMVAQual", "Track MVA Quality as stored in Value Map ; MVAQual", 100, 0, 1);
472  "TrackPathLenghtvsEta", "MTD Track pathlength vs MTD track Eta;|#eta|;Pathlength", 100, 0, 3.2, 100.0, 400.0, "S");
473  meMVATrackEffPtTot_ = ibook.book1D("MVAEffPtTot", "Pt of tracks associated to LV; track pt [GeV] ", 110, 0., 11.);
475  ibook.book1D("MVAMatchedEffPtTot", "Pt of tracks associated to LV matched to GEN; track pt [GeV] ", 110, 0., 11.);
477  "MVAMatchedEffPtMtd", "Pt of tracks associated to LV matched to GEN with time; track pt [GeV] ", 110, 0., 11.);
478  meMVATrackEffEtaTot_ = ibook.book1D("MVAEffEtaTot", "Pt of tracks associated to LV; track eta ", 66, 0., 3.3);
480  ibook.book1D("MVAMatchedEffEtaTot", "Pt of tracks associated to LV matched to GEN; track eta ", 66, 0., 3.3);
482  "MVAMatchedEffEtaMtd", "Pt of tracks associated to LV matched to GEN with time; track eta ", 66, 0., 3.3);
483  meMVATrackResTot_ = ibook.book1D(
484  "MVATrackRes", "t_{rec} - t_{sim} for LV associated tracks; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
486  ibook.book1D("MVATrackPull", "Pull for associated tracks; (t_{rec}-t_{sim})/#sigma_{t}", 50, -5., 5.);
488  "MVATrackZposResTot", "Z_{PCA} - Z_{sim} for associated tracks;Z_{PCA} - Z_{sim} [cm] ", 100, -0.1, 0.1);
489 }
MonitorElement * meETLTrackEffEtaTot_[2]
MonitorElement * meBTLTrackEffPhiMtd_
MonitorElement * meMVATrackResTot_
MonitorElement * meTrackNumHits_
MonitorElement * meTrackt0Pid_
MonitorElement * meETLTrackRPTime_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
const std::string folder_
MonitorElement * meMVATrackMatchedEffEtaMtd_
MonitorElement * meBTLTrackPtRes_
MonitorElement * meETLTrackEffPtTot_[2]
MonitorElement * meBTLTrackEffEtaMtd_
MonitorElement * meMVATrackMatchedEffPtTot_
MonitorElement * meMVATrackEffPtTot_
MonitorElement * meMVATrackEffEtaTot_
MonitorElement * meETLTrackEffPhiMtd_[2]
MonitorElement * meBTLTrackEffPhiTot_
MonitorElement * meBTLTrackRPTime_
MonitorElement * meETLTrackPtRes_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
MonitorElement * meTrackt0SafePid_
MonitorElement * meBTLTrackEffEtaTot_
MonitorElement * meMVATrackMatchedEffEtaTot_
MonitorElement * meTrackMVAQual_
MonitorElement * meETLTrackEffPhiTot_[2]
MonitorElement * meMVATrackPullTot_
MonitorElement * meTrackSigmat0SafePid_
MonitorElement * meETLTrackEffEtaMtd_[2]
MonitorElement * meTrackSigmat0Pid_
MonitorElement * meBTLTrackEffPtMtd_
MonitorElement * meTrackt0Src_
MonitorElement * meTracktmtd_
MonitorElement * meBTLTrackEffPtTot_
MonitorElement * meTrackPathLenghtvsEta_
MonitorElement * meETLTrackEffPtMtd_[2]
MonitorElement * meMVATrackZposResTot_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * meMVATrackMatchedEffPtMtd_
MonitorElement * meTrackSigmat0Src_

◆ fillDescriptions()

void MtdTracksValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 493 of file MtdTracksValidation.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, HLT_2022v12_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

493  {
495 
496  desc.add<std::string>("folder", "MTD/Tracks");
497  desc.add<edm::InputTag>("inputTagG", edm::InputTag("generalTracks"));
498  desc.add<edm::InputTag>("inputTagT", edm::InputTag("trackExtenderWithMTD"));
499  desc.add<edm::InputTag>("inputTagV", edm::InputTag("offlinePrimaryVertices4D"));
500  desc.add<edm::InputTag>("inputTagH", edm::InputTag("generatorSmeared"));
501  desc.add<edm::InputTag>("tmtd", edm::InputTag("trackExtenderWithMTD:generalTracktmtd"));
502  desc.add<edm::InputTag>("sigmatmtd", edm::InputTag("trackExtenderWithMTD:generalTracksigmatmtd"));
503  desc.add<edm::InputTag>("t0Src", edm::InputTag("trackExtenderWithMTD:generalTrackt0"));
504  desc.add<edm::InputTag>("sigmat0Src", edm::InputTag("trackExtenderWithMTD:generalTracksigmat0"));
505  desc.add<edm::InputTag>("trackAssocSrc", edm::InputTag("trackExtenderWithMTD:generalTrackassoc"))
506  ->setComment("Association between General and MTD Extended tracks");
507  desc.add<edm::InputTag>("pathLengthSrc", edm::InputTag("trackExtenderWithMTD:generalTrackPathLength"));
508  desc.add<edm::InputTag>("t0SafePID", edm::InputTag("tofPID:t0safe"));
509  desc.add<edm::InputTag>("sigmat0SafePID", edm::InputTag("tofPID:sigmat0safe"));
510  desc.add<edm::InputTag>("sigmat0PID", edm::InputTag("tofPID:sigmat0"));
511  desc.add<edm::InputTag>("t0PID", edm::InputTag("tofPID:t0"));
512  desc.add<edm::InputTag>("trackMVAQual", edm::InputTag("mtdTrackQualityMVA:mtdQualMVA"));
513  desc.add<double>("trackMinimumPt", 0.7); // [GeV]
514  desc.add<double>("trackMaximumBtlEta", 1.5);
515  desc.add<double>("trackMinimumEtlEta", 1.6);
516  desc.add<double>("trackMaximumEtlEta", 3.);
517 
518  descriptions.add("mtdTracksValid", desc);
519 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ mvaGenRecMatch()

const bool MtdTracksValidation::mvaGenRecMatch ( const HepMC::GenParticle &  genP,
const double &  zsim,
const reco::TrackBase trk 
)
private

Definition at line 542 of file MtdTracksValidation.cc.

References funct::abs(), deltaDRcut_, deltaPTcut_, reco::deltaR(), deltaZcut_, HGC3DClusterGenMatchSelector_cfi::dR, match(), reco::TrackBase::momentum(), reco::TrackBase::pt(), and reco::TrackBase::vz().

Referenced by analyze().

544  {
545  bool match = false;
546  double dR = reco::deltaR(genP.momentum(), trk.momentum());
547  double genPT = genP.momentum().perp();
548  match =
549  std::abs(genPT - trk.pt()) < trk.pt() * deltaPTcut_ && dR < deltaDRcut_ && std::abs(trk.vz() - zsim) < deltaZcut_;
550  return match;
551 }
static constexpr double deltaPTcut_
double pt() const
track transverse momentum
Definition: TrackBase.h:637
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:661
static constexpr double deltaZcut_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
static constexpr double deltaDRcut_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

◆ mvaGenSel()

const bool MtdTracksValidation::mvaGenSel ( const HepMC::GenParticle &  gp,
const float &  charge 
)
private

Definition at line 521 of file MtdTracksValidation.cc.

References funct::abs(), ALCARECOTkAlJpsiMuMu_cff::charge, etacutGEN_, runTauDisplay::gp, match(), and pTcut_.

Referenced by analyze().

521  {
522  bool match = false;
523  if (gp.status() != 1) {
524  return match;
525  }
526  match = charge != 0.f && gp.momentum().perp() > pTcut_ && std::abs(gp.momentum().eta()) < etacutGEN_;
527  return match;
528 }
static constexpr double etacutGEN_
static constexpr double pTcut_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

◆ mvaRecSel()

const bool MtdTracksValidation::mvaRecSel ( const reco::TrackBase trk,
const reco::Vertex vtx,
const double &  t0,
const double &  st0 
)
private

Definition at line 530 of file MtdTracksValidation.cc.

References funct::abs(), deltaZcut_, reco::TrackBase::eta(), etacutREC_, match(), reco::TrackBase::pt(), pTcut_, FrontierCondition_GT_autoExpress_cfi::t0, extraflags_cff::vtx, and reco::TrackBase::vz().

Referenced by analyze().

533  {
534  bool match = false;
535  match = trk.pt() > pTcut_ && std::abs(trk.eta()) < etacutREC_ && std::abs(trk.vz() - vtx.z()) <= deltaZcut_;
536  if (st0 > 0.) {
537  match = match && std::abs(t0 - vtx.t()) < 3. * st0;
538  }
539  return match;
540 }
static constexpr double pTcut_
static constexpr double etacutREC_
double pt() const
track transverse momentum
Definition: TrackBase.h:637
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:661
static constexpr double deltaZcut_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

Member Data Documentation

◆ deltaDRcut_

constexpr double MtdTracksValidation::deltaDRcut_ = 0.03
staticprivate

Definition at line 70 of file MtdTracksValidation.cc.

Referenced by mvaGenRecMatch().

◆ deltaPTcut_

constexpr double MtdTracksValidation::deltaPTcut_ = 0.05
staticprivate

Definition at line 69 of file MtdTracksValidation.cc.

Referenced by mvaGenRecMatch().

◆ deltaZcut_

constexpr double MtdTracksValidation::deltaZcut_ = 0.1
staticprivate

Definition at line 68 of file MtdTracksValidation.cc.

Referenced by analyze(), mvaGenRecMatch(), and mvaRecSel().

◆ etacutGEN_

constexpr double MtdTracksValidation::etacutGEN_ = 4.
staticprivate

Definition at line 65 of file MtdTracksValidation.cc.

Referenced by mvaGenSel().

◆ etacutREC_

constexpr double MtdTracksValidation::etacutREC_ = 3.
staticprivate

Definition at line 66 of file MtdTracksValidation.cc.

Referenced by mvaRecSel().

◆ folder_

const std::string MtdTracksValidation::folder_
private

Definition at line 59 of file MtdTracksValidation.cc.

Referenced by bookHistograms().

◆ GenRecTrackToken_

edm::EDGetTokenT<reco::TrackCollection> MtdTracksValidation::GenRecTrackToken_
private

Definition at line 72 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ HepMCProductToken_

edm::EDGetTokenT<edm::HepMCProduct> MtdTracksValidation::HepMCProductToken_
private

Definition at line 76 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ meBTLTrackEffEtaMtd_

MonitorElement* MtdTracksValidation::meBTLTrackEffEtaMtd_
private

Definition at line 98 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBTLTrackEffEtaTot_

MonitorElement* MtdTracksValidation::meBTLTrackEffEtaTot_
private

Definition at line 95 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBTLTrackEffPhiMtd_

MonitorElement* MtdTracksValidation::meBTLTrackEffPhiMtd_
private

Definition at line 99 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBTLTrackEffPhiTot_

MonitorElement* MtdTracksValidation::meBTLTrackEffPhiTot_
private

Definition at line 96 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBTLTrackEffPtMtd_

MonitorElement* MtdTracksValidation::meBTLTrackEffPtMtd_
private

Definition at line 100 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBTLTrackEffPtTot_

MonitorElement* MtdTracksValidation::meBTLTrackEffPtTot_
private

Definition at line 97 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBTLTrackPtRes_

MonitorElement* MtdTracksValidation::meBTLTrackPtRes_
private

Definition at line 101 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBTLTrackRPTime_

MonitorElement* MtdTracksValidation::meBTLTrackRPTime_
private

Definition at line 94 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meETLTrackEffEtaMtd_

MonitorElement* MtdTracksValidation::meETLTrackEffEtaMtd_[2]
private

Definition at line 107 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meETLTrackEffEtaTot_

MonitorElement* MtdTracksValidation::meETLTrackEffEtaTot_[2]
private

Definition at line 104 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meETLTrackEffPhiMtd_

MonitorElement* MtdTracksValidation::meETLTrackEffPhiMtd_[2]
private

Definition at line 108 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meETLTrackEffPhiTot_

MonitorElement* MtdTracksValidation::meETLTrackEffPhiTot_[2]
private

Definition at line 105 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meETLTrackEffPtMtd_

MonitorElement* MtdTracksValidation::meETLTrackEffPtMtd_[2]
private

Definition at line 109 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meETLTrackEffPtTot_

MonitorElement* MtdTracksValidation::meETLTrackEffPtTot_[2]
private

Definition at line 106 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meETLTrackPtRes_

MonitorElement* MtdTracksValidation::meETLTrackPtRes_
private

Definition at line 110 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meETLTrackRPTime_

MonitorElement* MtdTracksValidation::meETLTrackRPTime_
private

Definition at line 103 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMVATrackEffEtaTot_

MonitorElement* MtdTracksValidation::meMVATrackEffEtaTot_
private

Definition at line 126 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMVATrackEffPtTot_

MonitorElement* MtdTracksValidation::meMVATrackEffPtTot_
private

Definition at line 123 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMVATrackMatchedEffEtaMtd_

MonitorElement* MtdTracksValidation::meMVATrackMatchedEffEtaMtd_
private

Definition at line 128 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMVATrackMatchedEffEtaTot_

MonitorElement* MtdTracksValidation::meMVATrackMatchedEffEtaTot_
private

Definition at line 127 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMVATrackMatchedEffPtMtd_

MonitorElement* MtdTracksValidation::meMVATrackMatchedEffPtMtd_
private

Definition at line 125 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMVATrackMatchedEffPtTot_

MonitorElement* MtdTracksValidation::meMVATrackMatchedEffPtTot_
private

Definition at line 124 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMVATrackPullTot_

MonitorElement* MtdTracksValidation::meMVATrackPullTot_
private

Definition at line 130 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMVATrackResTot_

MonitorElement* MtdTracksValidation::meMVATrackResTot_
private

Definition at line 129 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMVATrackZposResTot_

MonitorElement* MtdTracksValidation::meMVATrackZposResTot_
private

Definition at line 131 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMVAQual_

MonitorElement* MtdTracksValidation::meTrackMVAQual_
private

Definition at line 120 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackNumHits_

MonitorElement* MtdTracksValidation::meTrackNumHits_
private

Definition at line 119 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPathLenghtvsEta_

MonitorElement* MtdTracksValidation::meTrackPathLenghtvsEta_
private

Definition at line 121 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackSigmat0Pid_

MonitorElement* MtdTracksValidation::meTrackSigmat0Pid_
private

Definition at line 116 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackSigmat0SafePid_

MonitorElement* MtdTracksValidation::meTrackSigmat0SafePid_
private

Definition at line 118 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackSigmat0Src_

MonitorElement* MtdTracksValidation::meTrackSigmat0Src_
private

Definition at line 114 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackt0Pid_

MonitorElement* MtdTracksValidation::meTrackt0Pid_
private

Definition at line 115 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackt0SafePid_

MonitorElement* MtdTracksValidation::meTrackt0SafePid_
private

Definition at line 117 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackt0Src_

MonitorElement* MtdTracksValidation::meTrackt0Src_
private

Definition at line 113 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTracktmtd_

MonitorElement* MtdTracksValidation::meTracktmtd_
private

Definition at line 112 of file MtdTracksValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mtdtopoToken_

edm::ESGetToken<MTDTopology, MTDTopologyRcd> MtdTracksValidation::mtdtopoToken_
private

Definition at line 91 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ particleTableToken_

edm::ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> MtdTracksValidation::particleTableToken_
private

Definition at line 92 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ pathLengthToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::pathLengthToken_
private

Definition at line 79 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ pTcut_

constexpr double MtdTracksValidation::pTcut_ = 0.7
staticprivate

Definition at line 67 of file MtdTracksValidation.cc.

Referenced by mvaGenSel(), and mvaRecSel().

◆ RecTrackToken_

edm::EDGetTokenT<reco::TrackCollection> MtdTracksValidation::RecTrackToken_
private

Definition at line 73 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ RecVertexToken_

edm::EDGetTokenT<std::vector<reco::Vertex> > MtdTracksValidation::RecVertexToken_
private

Definition at line 74 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ Sigmat0PidToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::Sigmat0PidToken_
private

Definition at line 86 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ Sigmat0SafePidToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::Sigmat0SafePidToken_
private

Definition at line 88 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ Sigmat0SrcToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::Sigmat0SrcToken_
private

Definition at line 84 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ SigmatmtdToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::SigmatmtdToken_
private

Definition at line 82 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ t0PidToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::t0PidToken_
private

Definition at line 85 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ t0SafePidToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::t0SafePidToken_
private

Definition at line 87 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ t0SrcToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::t0SrcToken_
private

Definition at line 83 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ tmtdToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::tmtdToken_
private

Definition at line 81 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ trackAssocToken_

edm::EDGetTokenT<edm::ValueMap<int> > MtdTracksValidation::trackAssocToken_
private

Definition at line 78 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().

◆ trackMaxBtlEta_

const float MtdTracksValidation::trackMaxBtlEta_
private

Definition at line 61 of file MtdTracksValidation.cc.

Referenced by analyze().

◆ trackMaxEtlEta_

const float MtdTracksValidation::trackMaxEtlEta_
private

Definition at line 63 of file MtdTracksValidation.cc.

Referenced by analyze().

◆ trackMinEtlEta_

const float MtdTracksValidation::trackMinEtlEta_
private

Definition at line 62 of file MtdTracksValidation.cc.

Referenced by analyze().

◆ trackMinPt_

const float MtdTracksValidation::trackMinPt_
private

Definition at line 60 of file MtdTracksValidation.cc.

Referenced by analyze().

◆ trackMVAQualToken_

edm::EDGetTokenT<edm::ValueMap<float> > MtdTracksValidation::trackMVAQualToken_
private

Definition at line 89 of file MtdTracksValidation.cc.

Referenced by analyze(), and MtdTracksValidation().