CMS 3D CMS Logo

MultiTrackValidator.cc
Go to the documentation of this file.
3 
7 
26 
32 #include <type_traits>
33 
34 #include "TMath.h"
35 #include <TF1.h>
38 //#include <iostream>
39 
40 using namespace std;
41 using namespace edm;
42 
44 namespace {
45  bool trackSelected(unsigned char mask, unsigned char qual) { return mask & 1 << qual; }
46 
47 } // namespace
48 
50  : associators(pset.getUntrackedParameter<std::vector<edm::InputTag>>("associators")),
51  label(pset.getParameter<std::vector<edm::InputTag>>("label")),
52  parametersDefiner(pset.getParameter<std::string>("parametersDefiner")),
53  parametersDefinerIsCosmic_(parametersDefiner == "CosmicParametersDefinerForTP"),
54  ignoremissingtkcollection_(pset.getUntrackedParameter<bool>("ignoremissingtrackcollection", false)),
55  useAssociators_(pset.getParameter<bool>("UseAssociators")),
56  calculateDrSingleCollection_(pset.getUntrackedParameter<bool>("calculateDrSingleCollection")),
57  doPlotsOnlyForTruePV_(pset.getUntrackedParameter<bool>("doPlotsOnlyForTruePV")),
58  doSummaryPlots_(pset.getUntrackedParameter<bool>("doSummaryPlots")),
59  doSimPlots_(pset.getUntrackedParameter<bool>("doSimPlots")),
60  doSimTrackPlots_(pset.getUntrackedParameter<bool>("doSimTrackPlots")),
61  doRecoTrackPlots_(pset.getUntrackedParameter<bool>("doRecoTrackPlots")),
62  dodEdxPlots_(pset.getUntrackedParameter<bool>("dodEdxPlots")),
63  doPVAssociationPlots_(pset.getUntrackedParameter<bool>("doPVAssociationPlots")),
64  doSeedPlots_(pset.getUntrackedParameter<bool>("doSeedPlots")),
65  doMVAPlots_(pset.getUntrackedParameter<bool>("doMVAPlots")),
66  simPVMaxZ_(pset.getUntrackedParameter<double>("simPVMaxZ")) {
67  if (not(pset.getParameter<edm::InputTag>("cores").label().empty())) {
68  cores_ = consumes<edm::View<reco::Candidate>>(pset.getParameter<edm::InputTag>("cores"));
69  }
70  if (label.empty()) {
71  // Disable prefetching of everything if there are no track collections
72  return;
73  }
74 
75  const edm::InputTag& label_tp_effic_tag = pset.getParameter<edm::InputTag>("label_tp_effic");
76  const edm::InputTag& label_tp_fake_tag = pset.getParameter<edm::InputTag>("label_tp_fake");
77 
78  if (pset.getParameter<bool>("label_tp_effic_refvector")) {
79  label_tp_effic_refvector = consumes<TrackingParticleRefVector>(label_tp_effic_tag);
80  } else {
81  label_tp_effic = consumes<TrackingParticleCollection>(label_tp_effic_tag);
82  }
83  if (pset.getParameter<bool>("label_tp_fake_refvector")) {
84  label_tp_fake_refvector = consumes<TrackingParticleRefVector>(label_tp_fake_tag);
85  } else {
86  label_tp_fake = consumes<TrackingParticleCollection>(label_tp_fake_tag);
87  }
88  label_pileupinfo = consumes<std::vector<PileupSummaryInfo>>(pset.getParameter<edm::InputTag>("label_pileupinfo"));
89  for (const auto& tag : pset.getParameter<std::vector<edm::InputTag>>("sim")) {
90  simHitTokens_.push_back(consumes<std::vector<PSimHit>>(tag));
91  }
92 
93  std::vector<edm::InputTag> doResolutionPlotsForLabels =
94  pset.getParameter<std::vector<edm::InputTag>>("doResolutionPlotsForLabels");
95  doResolutionPlots_.reserve(label.size());
96  for (auto& itag : label) {
97  labelToken.push_back(consumes<edm::View<reco::Track>>(itag));
98  const bool doResol = doResolutionPlotsForLabels.empty() ||
101  doResolutionPlots_.push_back(doResol);
102  }
103  { // check for duplicates
104  auto labelTmp = edm::vector_transform(label, [&](const edm::InputTag& tag) { return tag.label(); });
105  std::sort(begin(labelTmp), end(labelTmp));
107  const std::string* prev = &empty;
108  for (const std::string& l : labelTmp) {
109  if (l == *prev) {
110  throw cms::Exception("Configuration") << "Duplicate InputTag in labels: " << l;
111  }
112  prev = &l;
113  }
114  }
115 
116  edm::InputTag beamSpotTag = pset.getParameter<edm::InputTag>("beamSpot");
117  bsSrc = consumes<reco::BeamSpot>(beamSpotTag);
118 
119  ParameterSet psetForHistoProducerAlgo = pset.getParameter<ParameterSet>("histoProducerAlgoBlock");
120  histoProducerAlgo_ = std::make_unique<MTVHistoProducerAlgoForTracker>(psetForHistoProducerAlgo, doSeedPlots_);
121 
122  dirName_ = pset.getParameter<std::string>("dirName");
123 
124  tpNLayersToken_ = consumes<edm::ValueMap<unsigned int>>(pset.getParameter<edm::InputTag>("label_tp_nlayers"));
126  consumes<edm::ValueMap<unsigned int>>(pset.getParameter<edm::InputTag>("label_tp_npixellayers"));
128  consumes<edm::ValueMap<unsigned int>>(pset.getParameter<edm::InputTag>("label_tp_nstripstereolayers"));
129 
130  if (dodEdxPlots_) {
131  m_dEdx1Tag = consumes<edm::ValueMap<reco::DeDxData>>(pset.getParameter<edm::InputTag>("dEdx1Tag"));
132  m_dEdx2Tag = consumes<edm::ValueMap<reco::DeDxData>>(pset.getParameter<edm::InputTag>("dEdx2Tag"));
133  }
134 
135  label_tv = consumes<TrackingVertexCollection>(pset.getParameter<edm::InputTag>("label_tv"));
137  recoVertexToken_ = consumes<edm::View<reco::Vertex>>(pset.getUntrackedParameter<edm::InputTag>("label_vertex"));
139  consumes<reco::VertexToTrackingVertexAssociator>(pset.getUntrackedParameter<edm::InputTag>("vertexAssociator"));
140  }
141 
142  if (doMVAPlots_) {
144  auto mvaPSet = pset.getUntrackedParameter<edm::ParameterSet>("mvaLabels");
145  for (size_t iIter = 0; iIter < labelToken.size(); ++iIter) {
148  if (mvaPSet.exists(labels.module)) {
150  mvaPSet.getUntrackedParameter<std::vector<std::string>>(labels.module), [&](const std::string& tag) {
151  return std::make_tuple(consumes<MVACollection>(edm::InputTag(tag, "MVAValues")),
152  consumes<QualityMaskCollection>(edm::InputTag(tag, "QualityMasks")));
153  });
154  }
155  }
156  }
157 
158  tpSelector = TrackingParticleSelector(pset.getParameter<double>("ptMinTP"),
159  pset.getParameter<double>("ptMaxTP"),
160  pset.getParameter<double>("minRapidityTP"),
161  pset.getParameter<double>("maxRapidityTP"),
162  pset.getParameter<double>("tipTP"),
163  pset.getParameter<double>("lipTP"),
164  pset.getParameter<int>("minHitTP"),
165  pset.getParameter<bool>("signalOnlyTP"),
166  pset.getParameter<bool>("intimeOnlyTP"),
167  pset.getParameter<bool>("chargedOnlyTP"),
168  pset.getParameter<bool>("stableOnlyTP"),
169  pset.getParameter<std::vector<int>>("pdgIdTP"),
170  pset.getParameter<bool>("invertRapidityCutTP"));
171 
172  cosmictpSelector = CosmicTrackingParticleSelector(pset.getParameter<double>("ptMinTP"),
173  pset.getParameter<double>("minRapidityTP"),
174  pset.getParameter<double>("maxRapidityTP"),
175  pset.getParameter<double>("tipTP"),
176  pset.getParameter<double>("lipTP"),
177  pset.getParameter<int>("minHitTP"),
178  pset.getParameter<bool>("chargedOnlyTP"),
179  pset.getParameter<std::vector<int>>("pdgIdTP"));
180 
181  ParameterSet psetVsPhi = psetForHistoProducerAlgo.getParameter<ParameterSet>("TpSelectorForEfficiencyVsPhi");
182  dRtpSelector = TrackingParticleSelector(psetVsPhi.getParameter<double>("ptMin"),
183  psetVsPhi.getParameter<double>("ptMax"),
184  psetVsPhi.getParameter<double>("minRapidity"),
185  psetVsPhi.getParameter<double>("maxRapidity"),
186  psetVsPhi.getParameter<double>("tip"),
187  psetVsPhi.getParameter<double>("lip"),
188  psetVsPhi.getParameter<int>("minHit"),
189  psetVsPhi.getParameter<bool>("signalOnly"),
190  psetVsPhi.getParameter<bool>("intimeOnly"),
191  psetVsPhi.getParameter<bool>("chargedOnly"),
192  psetVsPhi.getParameter<bool>("stableOnly"),
193  psetVsPhi.getParameter<std::vector<int>>("pdgId"),
194  psetVsPhi.getParameter<bool>("invertRapidityCut"));
195 
197 
198  useGsf = pset.getParameter<bool>("useGsf");
199 
200  _simHitTpMapTag = mayConsume<SimHitTPAssociationProducer::SimHitTPAssociationList>(
201  pset.getParameter<edm::InputTag>("simHitTpMapTag"));
202 
205  consumes<edm::View<reco::Track>>(pset.getParameter<edm::InputTag>("trackCollectionForDrCalculation"));
206  }
207 
208  if (useAssociators_) {
209  for (auto const& src : associators) {
210  associatorTokens.push_back(consumes<reco::TrackToTrackingParticleAssociator>(src));
211  }
212  } else {
213  for (auto const& src : associators) {
214  associatormapStRs.push_back(consumes<reco::SimToRecoCollection>(src));
215  associatormapRtSs.push_back(consumes<reco::RecoToSimCollection>(src));
216  }
217  }
218 }
219 
221 
223  edm::Run const&,
224  edm::EventSetup const& setup,
225  Histograms& histograms) const {
226  if (label.empty()) {
227  // Disable histogram booking if there are no track collections
228  return;
229  }
230 
231  const auto minColl = -0.5;
232  const auto maxColl = label.size() - 0.5;
233  const auto nintColl = label.size();
234 
235  auto binLabels = [&](dqm::reco::MonitorElement* me) {
236  for (size_t i = 0; i < label.size(); ++i) {
237  me->setBinLabel(i + 1, label[i].label());
238  }
239  me->disableAlphanumeric();
240  return me;
241  };
242 
243  //Booking histograms concerning with simulated tracks
244  if (doSimPlots_) {
245  ibook.cd();
246  ibook.setCurrentFolder(dirName_ + "simulation");
247 
248  histoProducerAlgo_->bookSimHistos(ibook, histograms.histoProducerAlgo);
249 
250  ibook.cd();
251  ibook.setCurrentFolder(dirName_);
252  }
253 
254  for (unsigned int ww = 0; ww < associators.size(); ww++) {
255  ibook.cd();
256  // FIXME: these need to be moved to a subdirectory whose name depends on the associator
257  ibook.setCurrentFolder(dirName_);
258 
259  if (doSummaryPlots_) {
260  if (doSimTrackPlots_) {
261  histograms.h_assoc_coll.push_back(
262  binLabels(ibook.book1D("num_assoc(simToReco)_coll",
263  "N of associated (simToReco) tracks vs track collection",
264  nintColl,
265  minColl,
266  maxColl)));
267  histograms.h_simul_coll.push_back(binLabels(
268  ibook.book1D("num_simul_coll", "N of simulated tracks vs track collection", nintColl, minColl, maxColl)));
269  }
270  if (doRecoTrackPlots_) {
271  histograms.h_reco_coll.push_back(binLabels(
272  ibook.book1D("num_reco_coll", "N of reco track vs track collection", nintColl, minColl, maxColl)));
273  histograms.h_assoc2_coll.push_back(
274  binLabels(ibook.book1D("num_assoc(recoToSim)_coll",
275  "N of associated (recoToSim) tracks vs track collection",
276  nintColl,
277  minColl,
278  maxColl)));
279  histograms.h_looper_coll.push_back(
280  binLabels(ibook.book1D("num_duplicate_coll",
281  "N of associated (recoToSim) looper tracks vs track collection",
282  nintColl,
283  minColl,
284  maxColl)));
285  histograms.h_pileup_coll.push_back(
286  binLabels(ibook.book1D("num_pileup_coll",
287  "N of associated (recoToSim) pileup tracks vs track collection",
288  nintColl,
289  minColl,
290  maxColl)));
291  }
292  }
293 
294  for (unsigned int www = 0; www < label.size(); www++) {
295  ibook.cd();
296  InputTag algo = label[www];
297  string dirName = dirName_;
298  if (!algo.process().empty())
299  dirName += algo.process() + "_";
300  if (!algo.label().empty())
301  dirName += algo.label() + "_";
302  if (!algo.instance().empty())
303  dirName += algo.instance() + "_";
304  if (dirName.find("Tracks") < dirName.length()) {
305  dirName.replace(dirName.find("Tracks"), 6, "");
306  }
307  string assoc = associators[ww].label();
308  if (assoc.find("Track") < assoc.length()) {
309  assoc.replace(assoc.find("Track"), 5, "");
310  }
311  dirName += assoc;
312  std::replace(dirName.begin(), dirName.end(), ':', '_');
313 
314  ibook.setCurrentFolder(dirName);
315 
316  const bool doResolutionPlots = doResolutionPlots_[www];
317 
318  if (doSimTrackPlots_) {
319  histoProducerAlgo_->bookSimTrackHistos(ibook, histograms.histoProducerAlgo, doResolutionPlots);
321  histoProducerAlgo_->bookSimTrackPVAssociationHistos(ibook, histograms.histoProducerAlgo);
322  }
323 
324  //Booking histograms concerning with reconstructed tracks
325  if (doRecoTrackPlots_) {
326  histoProducerAlgo_->bookRecoHistos(ibook, histograms.histoProducerAlgo, doResolutionPlots);
327  if (dodEdxPlots_)
328  histoProducerAlgo_->bookRecodEdxHistos(ibook, histograms.histoProducerAlgo);
330  histoProducerAlgo_->bookRecoPVAssociationHistos(ibook, histograms.histoProducerAlgo);
331  if (doMVAPlots_)
332  histoProducerAlgo_->bookMVAHistos(
333  ibook, histograms.histoProducerAlgo, mvaQualityCollectionTokens_[www].size());
334  }
335 
336  if (doSeedPlots_) {
337  histoProducerAlgo_->bookSeedHistos(ibook, histograms.histoProducerAlgo);
338  }
339  } //end loop www
340  } // end loop ww
341 }
342 
343 namespace {
344  void ensureEffIsSubsetOfFake(const TrackingParticleRefVector& eff, const TrackingParticleRefVector& fake) {
345  // If efficiency RefVector is empty, don't check the product ids
346  // as it will be 0:0 for empty. This covers also the case where
347  // both are empty. The case of fake being empty and eff not is an
348  // error.
349  if (eff.empty())
350  return;
351 
352  // First ensure product ids
353  if (eff.id() != fake.id()) {
354  throw cms::Exception("Configuration")
355  << "Efficiency and fake TrackingParticle (refs) point to different collections (eff " << eff.id() << " fake "
356  << fake.id()
357  << "). This is not supported. Efficiency TP set must be the same or a subset of the fake TP set.";
358  }
359 
360  // Same technique as in associationMapFilterValues
361  edm::IndexSet fakeKeys;
362  fakeKeys.reserve(fake.size());
363  for (const auto& ref : fake) {
364  fakeKeys.insert(ref.key());
365  }
366 
367  for (const auto& ref : eff) {
368  if (!fakeKeys.has(ref.key())) {
369  throw cms::Exception("Configuration") << "Efficiency TrackingParticle " << ref.key()
370  << " is not found from the set of fake TPs. This is not supported. The "
371  "efficiency TP set must be the same or a subset of the fake TP set.";
372  }
373  }
374  }
375 } // namespace
376 
378  const edm::Handle<TrackingVertexCollection>& htv) const {
379  for (const auto& simV : *htv) {
380  if (simV.eventId().bunchCrossing() != 0)
381  continue; // remove OOTPU
382  if (simV.eventId().event() != 0)
383  continue; // pick the PV of hard scatter
384  return &(simV.position());
385  }
386  return nullptr;
387 }
388 
390  const edm::Event& event, const edm::Handle<TrackingVertexCollection>& htv) const {
392  event.getByToken(recoVertexToken_, hvertex);
393 
395  event.getByToken(vertexAssociatorToken_, hvassociator);
396 
397  auto v_r2s = hvassociator->associateRecoToSim(hvertex, htv);
398  auto pvPtr = hvertex->refAt(0);
399  if (pvPtr->isFake() || pvPtr->ndof() < 0) // skip junk vertices
400  return nullptr;
401 
402  auto pvFound = v_r2s.find(pvPtr);
403  if (pvFound == v_r2s.end())
404  return nullptr;
405 
406  for (const auto& vertexRefQuality : pvFound->val) {
407  const TrackingVertex& tv = *(vertexRefQuality.first);
408  if (tv.eventId().event() == 0 && tv.eventId().bunchCrossing() == 0) {
409  return &(pvPtr->position());
410  }
411  }
412 
413  return nullptr;
414 }
415 
417  const Histograms& histograms,
418  const TrackingParticleRefVector& tPCeff,
419  const ParametersDefinerForTP& parametersDefinerTP,
420  const edm::Event& event,
421  const edm::EventSetup& setup,
422  const reco::BeamSpot& bs,
423  std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>>& momVert_tPCeff,
424  std::vector<size_t>& selected_tPCeff) const {
425  selected_tPCeff.reserve(tPCeff.size());
426  momVert_tPCeff.reserve(tPCeff.size());
427  int nIntimeTPs = 0;
429  for (size_t j = 0; j < tPCeff.size(); ++j) {
430  const TrackingParticleRef& tpr = tPCeff[j];
431 
432  TrackingParticle::Vector momentum = parametersDefinerTP.momentum(event, setup, tpr);
433  TrackingParticle::Point vertex = parametersDefinerTP.vertex(event, setup, tpr);
434  if (doSimPlots_) {
435  histoProducerAlgo_->fill_generic_simTrack_histos(
436  histograms.histoProducerAlgo, momentum, vertex, tpr->eventId().bunchCrossing());
437  }
438  if (tpr->eventId().bunchCrossing() == 0)
439  ++nIntimeTPs;
440 
441  if (cosmictpSelector(tpr, &bs, event, setup)) {
442  selected_tPCeff.push_back(j);
443  momVert_tPCeff.emplace_back(momentum, vertex);
444  }
445  }
446  } else {
447  size_t j = 0;
448  for (auto const& tpr : tPCeff) {
449  const TrackingParticle& tp = *tpr;
450 
451  // TODO: do we want to fill these from all TPs that include IT
452  // and OOT (as below), or limit to IT+OOT TPs passing tpSelector
453  // (as it was before)? The latter would require another instance
454  // of tpSelector with intimeOnly=False.
455  if (doSimPlots_) {
456  histoProducerAlgo_->fill_generic_simTrack_histos(
457  histograms.histoProducerAlgo, tp.momentum(), tp.vertex(), tp.eventId().bunchCrossing());
458  }
459  if (tp.eventId().bunchCrossing() == 0)
460  ++nIntimeTPs;
461 
462  if (tpSelector(tp)) {
463  selected_tPCeff.push_back(j);
464  TrackingParticle::Vector momentum = parametersDefinerTP.momentum(event, setup, tpr);
465  TrackingParticle::Point vertex = parametersDefinerTP.vertex(event, setup, tpr);
466  momVert_tPCeff.emplace_back(momentum, vertex);
467  }
468  ++j;
469  }
470  }
471  if (doSimPlots_) {
472  histoProducerAlgo_->fill_simTrackBased_histos(histograms.histoProducerAlgo, nIntimeTPs);
473  }
474 }
475 
477  const std::vector<size_t>& selected_tPCeff,
478  DynArray<float>& dR_tPCeff,
479  DynArray<float>& dR_tPCeff_jet,
480  const edm::View<reco::Candidate>* cores) const {
481  float etaL[tPCeff.size()], phiL[tPCeff.size()];
482  size_t n_selTP_dr = 0;
483  for (size_t iTP : selected_tPCeff) {
484  //calculare dR wrt inclusive collection (also with PU, low pT, displaced)
485  auto const& tp2 = *(tPCeff[iTP]);
486  auto&& p = tp2.momentum();
487  etaL[iTP] = etaFromXYZ(p.x(), p.y(), p.z());
488  phiL[iTP] = atan2f(p.y(), p.x());
489  }
490  for (size_t iTP1 : selected_tPCeff) {
491  auto const& tp = *(tPCeff[iTP1]);
493  double dR_jet = std::numeric_limits<double>::max();
494  if (dRtpSelector(tp)) { //only for those needed for efficiency!
495  ++n_selTP_dr;
496  float eta = etaL[iTP1];
497  float phi = phiL[iTP1];
498  for (size_t iTP2 : selected_tPCeff) {
499  //calculare dR wrt inclusive collection (also with PU, low pT, displaced)
500  if (iTP1 == iTP2) {
501  continue;
502  }
503  auto dR_tmp = reco::deltaR2(eta, phi, etaL[iTP2], phiL[iTP2]);
504  if (dR_tmp < dR)
505  dR = dR_tmp;
506  } // ttp2 (iTP)
507  if (cores != nullptr) {
508  for (unsigned int ji = 0; ji < cores->size(); ji++) { //jet loop
509  const reco::Candidate& jet = (*cores)[ji];
510  double jet_eta = jet.eta();
511  double jet_phi = jet.phi();
512  auto dR_jet_tmp = reco::deltaR2(eta, phi, jet_eta, jet_phi);
513  if (dR_jet_tmp < dR_jet)
514  dR_jet = dR_jet_tmp;
515  }
516  }
517  }
518  dR_tPCeff[iTP1] = std::sqrt(dR);
519  dR_tPCeff_jet[iTP1] = std::sqrt(dR_jet);
520 
521  } // tp
522  return n_selTP_dr;
523 }
524 
526  const edm::View<reco::Track>& trackCollectionDr,
527  DynArray<float>& dR_trk,
528  DynArray<float>& dR_trk_jet,
529  const edm::View<reco::Candidate>* cores) const {
530  int i = 0;
531  float etaL[trackCollectionDr.size()];
532  float phiL[trackCollectionDr.size()];
533  bool validL[trackCollectionDr.size()];
534  for (auto const& track2 : trackCollectionDr) {
535  auto&& p = track2.momentum();
536  etaL[i] = etaFromXYZ(p.x(), p.y(), p.z());
537  phiL[i] = atan2f(p.y(), p.x());
538  validL[i] = !trackFromSeedFitFailed(track2);
539  ++i;
540  }
541  for (View<reco::Track>::size_type i = 0; i < trackCollection.size(); ++i) {
542  auto const& track = trackCollection[i];
544  auto dR_jet = std::numeric_limits<float>::max();
546  auto&& p = track.momentum();
547  float eta = etaFromXYZ(p.x(), p.y(), p.z());
548  float phi = atan2f(p.y(), p.x());
549  for (View<reco::Track>::size_type j = 0; j < trackCollectionDr.size(); ++j) {
550  if (!validL[j])
551  continue;
552  auto dR_tmp = reco::deltaR2(eta, phi, etaL[j], phiL[j]);
553  if ((dR_tmp < dR) & (dR_tmp > std::numeric_limits<float>::min()))
554  dR = dR_tmp;
555  }
556  if (cores != nullptr) {
557  for (unsigned int ji = 0; ji < cores->size(); ji++) { //jet loop
558  const reco::Candidate& jet = (*cores)[ji];
559  double jet_eta = jet.eta();
560  double jet_phi = jet.phi();
561  auto dR_jet_tmp = reco::deltaR2(eta, phi, jet_eta, jet_phi);
562  if (dR_jet_tmp < dR_jet)
563  dR_jet = dR_jet_tmp;
564  }
565  }
566  }
567  dR_trk[i] = std::sqrt(dR);
568  dR_trk_jet[i] = std::sqrt(dR_jet);
569  }
570 }
571 
573  const edm::EventSetup& setup,
574  const Histograms& histograms) const {
575  if (label.empty()) {
576  // Disable if there are no track collections
577  return;
578  }
579 
580  using namespace reco;
581 
582  LogDebug("TrackValidator") << "\n===================================================="
583  << "\n"
584  << "Analyzing new event"
585  << "\n"
586  << "====================================================\n"
587  << "\n";
588 
589  edm::ESHandle<ParametersDefinerForTP> parametersDefinerTPHandle;
590  setup.get<TrackAssociatorRecord>().get(parametersDefiner, parametersDefinerTPHandle);
591  //Since we modify the object, we must clone it
592  auto parametersDefinerTP = parametersDefinerTPHandle->clone();
593 
595  setup.get<TrackerTopologyRcd>().get(httopo);
596  const TrackerTopology& ttopo = *httopo;
597 
598  // FIXME: we really need to move to edm::View for reading the
599  // TrackingParticles... Unfortunately it has non-trivial
600  // consequences on the associator/association interfaces etc.
601  TrackingParticleRefVector tmpTPeff;
602  TrackingParticleRefVector tmpTPfake;
603  const TrackingParticleRefVector* tmpTPeffPtr = nullptr;
604  const TrackingParticleRefVector* tmpTPfakePtr = nullptr;
605 
607  edm::Handle<TrackingParticleRefVector> TPCollectionHeffRefVector;
608 
609  const bool tp_effic_refvector = label_tp_effic.isUninitialized();
610  if (!tp_effic_refvector) {
611  event.getByToken(label_tp_effic, TPCollectionHeff);
612  for (size_t i = 0, size = TPCollectionHeff->size(); i < size; ++i) {
613  tmpTPeff.push_back(TrackingParticleRef(TPCollectionHeff, i));
614  }
615  tmpTPeffPtr = &tmpTPeff;
616  } else {
617  event.getByToken(label_tp_effic_refvector, TPCollectionHeffRefVector);
618  tmpTPeffPtr = TPCollectionHeffRefVector.product();
619  }
621  edm::Handle<TrackingParticleCollection> TPCollectionHfake;
622  event.getByToken(label_tp_fake, TPCollectionHfake);
623  for (size_t i = 0, size = TPCollectionHfake->size(); i < size; ++i) {
624  tmpTPfake.push_back(TrackingParticleRef(TPCollectionHfake, i));
625  }
626  tmpTPfakePtr = &tmpTPfake;
627  } else {
628  edm::Handle<TrackingParticleRefVector> TPCollectionHfakeRefVector;
629  event.getByToken(label_tp_fake_refvector, TPCollectionHfakeRefVector);
630  tmpTPfakePtr = TPCollectionHfakeRefVector.product();
631  }
632 
633  TrackingParticleRefVector const& tPCeff = *tmpTPeffPtr;
634  TrackingParticleRefVector const& tPCfake = *tmpTPfakePtr;
635 
636  ensureEffIsSubsetOfFake(tPCeff, tPCfake);
637 
640  //warning: make sure the TP collection used in the map is the same used in the MTV!
641  event.getByToken(_simHitTpMapTag, simHitsTPAssoc);
642  parametersDefinerTP->initEvent(simHitsTPAssoc);
643  cosmictpSelector.initEvent(simHitsTPAssoc);
644  }
645 
646  // Find the sim PV and tak its position
648  event.getByToken(label_tv, htv);
649  const TrackingVertex::LorentzVector* theSimPVPosition = getSimPVPosition(htv);
650  if (simPVMaxZ_ >= 0) {
651  if (!theSimPVPosition)
652  return;
653  if (std::abs(theSimPVPosition->z()) > simPVMaxZ_)
654  return;
655  }
656 
657  // Check, when necessary, if reco PV matches to sim PV
658  const reco::Vertex::Point* thePVposition = nullptr;
660  thePVposition = getRecoPVPosition(event, htv);
661  if (doPlotsOnlyForTruePV_ && !thePVposition)
662  return;
663 
664  // Rest of the code assumes that if thePVposition is non-null, the
665  // PV-association histograms get filled. In above, the "nullness"
666  // is used to deliver the information if the reco PV is matched to
667  // the sim PV.
669  thePVposition = nullptr;
670  }
671 
672  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
673  event.getByToken(bsSrc, recoBeamSpotHandle);
674  reco::BeamSpot const& bs = *recoBeamSpotHandle;
675 
677  event.getByToken(label_pileupinfo, puinfoH);
678  PileupSummaryInfo puinfo;
679 
680  for (unsigned int puinfo_ite = 0; puinfo_ite < (*puinfoH).size(); ++puinfo_ite) {
681  if ((*puinfoH)[puinfo_ite].getBunchCrossing() == 0) {
682  puinfo = (*puinfoH)[puinfo_ite];
683  break;
684  }
685  }
686 
687  // Number of 3D layers for TPs
689  event.getByToken(tpNLayersToken_, tpNLayersH);
690  const auto& nLayers_tPCeff = *tpNLayersH;
691 
692  event.getByToken(tpNPixelLayersToken_, tpNLayersH);
693  const auto& nPixelLayers_tPCeff = *tpNLayersH;
694 
695  event.getByToken(tpNStripStereoLayersToken_, tpNLayersH);
696  const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
697 
698  // Precalculate TP selection (for efficiency), and momentum and vertex wrt PCA
699  //
700  // TODO: ParametersDefinerForTP ESProduct needs to be changed to
701  // EDProduct because of consumes.
702  //
703  // In principle, we could just precalculate the momentum and vertex
704  // wrt PCA for all TPs for once and put that to the event. To avoid
705  // repetitive calculations those should be calculated only once for
706  // each TP. That would imply that we should access TPs via Refs
707  // (i.e. View) in here, since, in general, the eff and fake TP
708  // collections can be different (and at least HI seems to use that
709  // feature). This would further imply that the
710  // RecoToSimCollection/SimToRecoCollection should be changed to use
711  // View<TP> instead of vector<TP>, and migrate everything.
712  //
713  // Or we could take only one input TP collection, and do another
714  // TP-selection to obtain the "fake" collection like we already do
715  // for "efficiency" TPs.
716  std::vector<size_t> selected_tPCeff;
717  std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>> momVert_tPCeff;
718  tpParametersAndSelection(histograms, tPCeff, *parametersDefinerTP, event, setup, bs, momVert_tPCeff, selected_tPCeff);
719 
720  //calculate dR for TPs
721  declareDynArray(float, tPCeff.size(), dR_tPCeff);
722 
723  //calculate dR_jet for TPs
724  const edm::View<reco::Candidate>* coresVector = nullptr;
725  if (not cores_.isUninitialized()) {
727  event.getByToken(cores_, cores);
728  if (cores.isValid()) {
729  coresVector = cores.product();
730  }
731  }
732  declareDynArray(float, tPCeff.size(), dR_tPCeff_jet);
733 
734  size_t n_selTP_dr = tpDR(tPCeff, selected_tPCeff, dR_tPCeff, dR_tPCeff_jet, coresVector);
735 
739  }
740 
741  // dE/dx
742  // at some point this could be generalized, with a vector of tags and a corresponding vector of Handles
743  // I'm writing the interface such to take vectors of ValueMaps
744  std::vector<const edm::ValueMap<reco::DeDxData>*> v_dEdx;
745  if (dodEdxPlots_) {
748  event.getByToken(m_dEdx1Tag, dEdx1Handle);
749  event.getByToken(m_dEdx2Tag, dEdx2Handle);
750  v_dEdx.push_back(dEdx1Handle.product());
751  v_dEdx.push_back(dEdx2Handle.product());
752  }
753 
754  std::vector<const MVACollection*> mvaCollections;
755  std::vector<const QualityMaskCollection*> qualityMaskCollections;
756  std::vector<float> mvaValues;
757 
758  int w = 0; //counter counting the number of sets of histograms
759  for (unsigned int ww = 0; ww < associators.size(); ww++) {
760  // run value filtering of recoToSim map already here as it depends only on the association, not track collection
761  reco::SimToRecoCollection const* simRecCollPFull = nullptr;
762  reco::RecoToSimCollection const* recSimCollP = nullptr;
763  reco::RecoToSimCollection recSimCollL;
764  if (!useAssociators_) {
765  Handle<reco::SimToRecoCollection> simtorecoCollectionH;
766  event.getByToken(associatormapStRs[ww], simtorecoCollectionH);
767  simRecCollPFull = simtorecoCollectionH.product();
768 
769  Handle<reco::RecoToSimCollection> recotosimCollectionH;
770  event.getByToken(associatormapRtSs[ww], recotosimCollectionH);
771  recSimCollP = recotosimCollectionH.product();
772 
773  // We need to filter the associations of the fake-TrackingParticle
774  // collection only from RecoToSim collection, otherwise the
775  // RecoToSim histograms get false entries
776  recSimCollL = associationMapFilterValues(*recSimCollP, tPCfake);
777  recSimCollP = &recSimCollL;
778  }
779 
780  for (unsigned int www = 0; www < label.size();
781  www++, w++) { // need to increment w here, since there are many continues in the loop body
782  //
783  //get collections from the event
784  //
785  edm::Handle<View<Track>> trackCollectionHandle;
786  if (!event.getByToken(labelToken[www], trackCollectionHandle) && ignoremissingtkcollection_)
787  continue;
788  const edm::View<Track>& trackCollection = *trackCollectionHandle;
789 
790  reco::SimToRecoCollection const* simRecCollP = nullptr;
791  reco::SimToRecoCollection simRecCollL;
792 
793  //associate tracks
794  LogTrace("TrackValidator") << "Analyzing " << label[www] << " with " << associators[ww] << "\n";
795  if (useAssociators_) {
797  event.getByToken(associatorTokens[ww], theAssociator);
798 
799  // The associator interfaces really need to be fixed...
801  for (edm::View<Track>::size_type i = 0; i < trackCollection.size(); ++i) {
802  trackRefs.push_back(trackCollection.refAt(i));
803  }
804 
805  LogTrace("TrackValidator") << "Calling associateRecoToSim method"
806  << "\n";
807  recSimCollL = theAssociator->associateRecoToSim(trackRefs, tPCfake);
808  recSimCollP = &recSimCollL;
809  LogTrace("TrackValidator") << "Calling associateSimToReco method"
810  << "\n";
811  // It is necessary to do the association wrt. fake TPs,
812  // because this SimToReco association is used also for
813  // duplicates. Since the set of efficiency TPs are required to
814  // be a subset of the set of fake TPs, for efficiency
815  // histograms it doesn't matter if the association contains
816  // associations of TPs not in the set of efficiency TPs.
817  simRecCollL = theAssociator->associateSimToReco(trackRefs, tPCfake);
818  simRecCollP = &simRecCollL;
819  } else {
820  // We need to filter the associations of the current track
821  // collection only from SimToReco collection, otherwise the
822  // SimToReco histograms get false entries. The filtering must
823  // be done separately for each track collection.
824  simRecCollL = associationMapFilterValues(*simRecCollPFull, trackCollection);
825  simRecCollP = &simRecCollL;
826  }
827 
828  reco::RecoToSimCollection const& recSimColl = *recSimCollP;
829  reco::SimToRecoCollection const& simRecColl = *simRecCollP;
830 
831  // read MVA collections
835  for (const auto& tokenTpl : mvaQualityCollectionTokens_[www]) {
836  event.getByToken(std::get<0>(tokenTpl), hmva);
837  event.getByToken(std::get<1>(tokenTpl), hqual);
838 
839  mvaCollections.push_back(hmva.product());
840  qualityMaskCollections.push_back(hqual.product());
841  if (mvaCollections.back()->size() != trackCollection.size()) {
842  throw cms::Exception("Configuration")
843  << "Inconsistency in track collection and MVA sizes. Track collection " << www << " has "
844  << trackCollection.size() << " tracks, whereas the MVA " << (mvaCollections.size() - 1)
845  << " for it has " << mvaCollections.back()->size() << " entries. Double-check your configuration.";
846  }
847  if (qualityMaskCollections.back()->size() != trackCollection.size()) {
848  throw cms::Exception("Configuration")
849  << "Inconsistency in track collection and quality mask sizes. Track collection " << www << " has "
850  << trackCollection.size() << " tracks, whereas the quality mask " << (qualityMaskCollections.size() - 1)
851  << " for it has " << qualityMaskCollections.back()->size()
852  << " entries. Double-check your configuration.";
853  }
854  }
855  }
856 
857  // ########################################################
858  // fill simulation histograms (LOOP OVER TRACKINGPARTICLES)
859  // ########################################################
860 
861  //compute number of tracks per eta interval
862  //
863  LogTrace("TrackValidator") << "\n# of TrackingParticles: " << tPCeff.size() << "\n";
864  int ats(0); //This counter counts the number of simTracks that are "associated" to recoTracks
865  int st(0); //This counter counts the number of simulated tracks passing the MTV selection (i.e. tpSelector(tp) )
866 
867  //loop over already-selected TPs for tracking efficiency
868  for (size_t i = 0; i < selected_tPCeff.size(); ++i) {
869  size_t iTP = selected_tPCeff[i];
870  const TrackingParticleRef& tpr = tPCeff[iTP];
871  const TrackingParticle& tp = *tpr;
872 
873  auto const& momVert = momVert_tPCeff[i];
874  TrackingParticle::Vector momentumTP;
875  TrackingParticle::Point vertexTP;
876 
877  double dxySim(0);
878  double dzSim(0);
879  double dxyPVSim = 0;
880  double dzPVSim = 0;
881  double dR = dR_tPCeff[iTP];
882  double dR_jet = dR_tPCeff_jet[iTP];
883 
884  //---------- THIS PART HAS TO BE CLEANED UP. THE PARAMETER DEFINER WAS NOT MEANT TO BE USED IN THIS WAY ----------
885  //If the TrackingParticle is collison like, get the momentum and vertex at production state
887  momentumTP = tp.momentum();
888  vertexTP = tp.vertex();
889  //Calcualte the impact parameters w.r.t. PCA
890  const TrackingParticle::Vector& momentum = std::get<TrackingParticle::Vector>(momVert);
891  const TrackingParticle::Point& vertex = std::get<TrackingParticle::Point>(momVert);
892  dxySim = TrackingParticleIP::dxy(vertex, momentum, bs.position());
893  dzSim = TrackingParticleIP::dz(vertex, momentum, bs.position());
894 
895  if (theSimPVPosition) {
896  dxyPVSim = TrackingParticleIP::dxy(vertex, momentum, *theSimPVPosition);
897  dzPVSim = TrackingParticleIP::dz(vertex, momentum, *theSimPVPosition);
898  }
899  }
900  //If the TrackingParticle is comics, get the momentum and vertex at PCA
901  else {
902  momentumTP = std::get<TrackingParticle::Vector>(momVert);
903  vertexTP = std::get<TrackingParticle::Point>(momVert);
904  dxySim = TrackingParticleIP::dxy(vertexTP, momentumTP, bs.position());
905  dzSim = TrackingParticleIP::dz(vertexTP, momentumTP, bs.position());
906 
907  // Do dxy and dz vs. PV make any sense for cosmics? I guess not
908  }
909  //---------- THE PART ABOVE HAS TO BE CLEANED UP. THE PARAMETER DEFINER WAS NOT MEANT TO BE USED IN THIS WAY ----------
910 
911  // in the coming lines, histos are filled using as input
912  // - momentumTP
913  // - vertexTP
914  // - dxySim
915  // - dzSim
916  if (!doSimTrackPlots_)
917  continue;
918 
919  // ##############################################
920  // fill RecoAssociated SimTracks' histograms
921  // ##############################################
922  const reco::Track* matchedTrackPointer = nullptr;
923  const reco::Track* matchedSecondTrackPointer = nullptr;
924  unsigned int selectsLoose = mvaCollections.size();
925  unsigned int selectsHP = mvaCollections.size();
926  if (simRecColl.find(tpr) != simRecColl.end()) {
927  auto const& rt = simRecColl[tpr];
928  if (!rt.empty()) {
929  ats++; //This counter counts the number of simTracks that have a recoTrack associated
930  // isRecoMatched = true; // UNUSED
931  matchedTrackPointer = rt.begin()->first.get();
932  if (rt.size() >= 2) {
933  matchedSecondTrackPointer = (rt.begin() + 1)->first.get();
934  }
935  LogTrace("TrackValidator") << "TrackingParticle #" << st << " with pt=" << sqrt(momentumTP.perp2())
936  << " associated with quality:" << rt.begin()->second << "\n";
937 
938  if (doMVAPlots_) {
939  // for each MVA we need to take the value of the track
940  // with largest MVA value (for the cumulative histograms)
941  //
942  // also identify the first MVA that possibly selects any
943  // track matched to this TrackingParticle, separately
944  // for loose and highPurity qualities
945  for (size_t imva = 0; imva < mvaCollections.size(); ++imva) {
946  const auto& mva = *(mvaCollections[imva]);
947  const auto& qual = *(qualityMaskCollections[imva]);
948 
949  auto iMatch = rt.begin();
950  float maxMva = mva[iMatch->first.key()];
951  for (; iMatch != rt.end(); ++iMatch) {
952  auto itrk = iMatch->first.key();
953  maxMva = std::max(maxMva, mva[itrk]);
954 
955  if (selectsLoose >= imva && trackSelected(qual[itrk], reco::TrackBase::loose))
956  selectsLoose = imva;
957  if (selectsHP >= imva && trackSelected(qual[itrk], reco::TrackBase::highPurity))
958  selectsHP = imva;
959  }
960  mvaValues.push_back(maxMva);
961  }
962  }
963  }
964  } else {
965  LogTrace("TrackValidator") << "TrackingParticle #" << st << " with pt,eta,phi: " << sqrt(momentumTP.perp2())
966  << " , " << momentumTP.eta() << " , " << momentumTP.phi() << " , "
967  << " NOT associated to any reco::Track"
968  << "\n";
969  }
970 
971  int nSimHits = tp.numberOfTrackerHits();
972  int nSimLayers = nLayers_tPCeff[tpr];
973  int nSimPixelLayers = nPixelLayers_tPCeff[tpr];
974  int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tpr];
975  histoProducerAlgo_->fill_recoAssociated_simTrack_histos(histograms.histoProducerAlgo,
976  w,
977  tp,
978  momentumTP,
979  vertexTP,
980  dxySim,
981  dzSim,
982  dxyPVSim,
983  dzPVSim,
984  nSimHits,
985  nSimLayers,
986  nSimPixelLayers,
987  nSimStripMonoAndStereoLayers,
988  matchedTrackPointer,
989  puinfo.getPU_NumInteractions(),
990  dR,
991  dR_jet,
992  thePVposition,
993  theSimPVPosition,
994  bs.position(),
995  mvaValues,
996  selectsLoose,
997  selectsHP);
998  mvaValues.clear();
999 
1000  if (matchedTrackPointer && matchedSecondTrackPointer) {
1001  histoProducerAlgo_->fill_duplicate_histos(
1002  histograms.histoProducerAlgo, w, *matchedTrackPointer, *matchedSecondTrackPointer);
1003  }
1004 
1005  if (doSummaryPlots_) {
1006  if (dRtpSelector(tp)) {
1007  histograms.h_simul_coll[ww]->Fill(www);
1008  if (matchedTrackPointer) {
1009  histograms.h_assoc_coll[ww]->Fill(www);
1010  }
1011  }
1012  }
1013 
1014  } // End for (TrackingParticleCollection::size_type i=0; i<tPCeff.size(); i++){
1015 
1016  // ##############################################
1017  // fill recoTracks histograms (LOOP OVER TRACKS)
1018  // ##############################################
1019  if (!doRecoTrackPlots_)
1020  continue;
1021  LogTrace("TrackValidator") << "\n# of reco::Tracks with " << label[www].process() << ":" << label[www].label()
1022  << ":" << label[www].instance() << ": " << trackCollection.size() << "\n";
1023 
1024  int sat(0); //This counter counts the number of recoTracks that are associated to SimTracks from Signal only
1025  int at(0); //This counter counts the number of recoTracks that are associated to SimTracks
1026  int rT(0); //This counter counts the number of recoTracks in general
1027  int seed_fit_failed = 0;
1028  size_t n_selTrack_dr = 0;
1029 
1030  //calculate dR for tracks
1031  const edm::View<Track>* trackCollectionDr = &trackCollection;
1033  trackCollectionDr = trackCollectionForDrCalculation.product();
1034  }
1035  declareDynArray(float, trackCollection.size(), dR_trk);
1036  declareDynArray(float, trackCollection.size(), dR_trk_jet);
1037  trackDR(trackCollection, *trackCollectionDr, dR_trk, dR_trk_jet, coresVector);
1038 
1039  for (View<Track>::size_type i = 0; i < trackCollection.size(); ++i) {
1040  auto track = trackCollection.refAt(i);
1041  rT++;
1043  ++seed_fit_failed;
1044  if ((*dRTrackSelector)(*track, bs.position()))
1045  ++n_selTrack_dr;
1046 
1047  bool isSigSimMatched(false);
1048  bool isSimMatched(false);
1049  bool isChargeMatched(true);
1050  int numAssocRecoTracks = 0;
1051  int nSimHits = 0;
1052  double sharedFraction = 0.;
1053 
1054  auto tpFound = recSimColl.find(track);
1055  isSimMatched = tpFound != recSimColl.end();
1056  if (isSimMatched) {
1057  const auto& tp = tpFound->val;
1058  nSimHits = tp[0].first->numberOfTrackerHits();
1059  sharedFraction = tp[0].second;
1060  if (tp[0].first->charge() != track->charge())
1061  isChargeMatched = false;
1062  if (simRecColl.find(tp[0].first) != simRecColl.end())
1063  numAssocRecoTracks = simRecColl[tp[0].first].size();
1064  at++;
1065  for (unsigned int tp_ite = 0; tp_ite < tp.size(); ++tp_ite) {
1066  TrackingParticle trackpart = *(tp[tp_ite].first);
1067  if ((trackpart.eventId().event() == 0) && (trackpart.eventId().bunchCrossing() == 0)) {
1068  isSigSimMatched = true;
1069  sat++;
1070  break;
1071  }
1072  }
1073  LogTrace("TrackValidator") << "reco::Track #" << rT << " with pt=" << track->pt()
1074  << " associated with quality:" << tp.begin()->second << "\n";
1075  } else {
1076  LogTrace("TrackValidator") << "reco::Track #" << rT << " with pt=" << track->pt()
1077  << " NOT associated to any TrackingParticle"
1078  << "\n";
1079  }
1080 
1081  // set MVA values for this track
1082  // take also the indices of first MVAs to select by loose and
1083  // HP quality
1084  unsigned int selectsLoose = mvaCollections.size();
1085  unsigned int selectsHP = mvaCollections.size();
1086  if (doMVAPlots_) {
1087  for (size_t imva = 0; imva < mvaCollections.size(); ++imva) {
1088  const auto& mva = *(mvaCollections[imva]);
1089  const auto& qual = *(qualityMaskCollections[imva]);
1090  mvaValues.push_back(mva[i]);
1091 
1092  if (selectsLoose >= imva && trackSelected(qual[i], reco::TrackBase::loose))
1093  selectsLoose = imva;
1094  if (selectsHP >= imva && trackSelected(qual[i], reco::TrackBase::highPurity))
1095  selectsHP = imva;
1096  }
1097  }
1098 
1099  double dR = dR_trk[i];
1100  double dR_jet = dR_trk_jet[i];
1101  histoProducerAlgo_->fill_generic_recoTrack_histos(histograms.histoProducerAlgo,
1102  w,
1103  *track,
1104  ttopo,
1105  bs.position(),
1106  thePVposition,
1107  theSimPVPosition,
1108  isSimMatched,
1109  isSigSimMatched,
1110  isChargeMatched,
1111  numAssocRecoTracks,
1112  puinfo.getPU_NumInteractions(),
1113  nSimHits,
1114  sharedFraction,
1115  dR,
1116  dR_jet,
1117  mvaValues,
1118  selectsLoose,
1119  selectsHP);
1120  mvaValues.clear();
1121 
1122  if (doSummaryPlots_) {
1123  histograms.h_reco_coll[ww]->Fill(www);
1124  if (isSimMatched) {
1125  histograms.h_assoc2_coll[ww]->Fill(www);
1126  if (numAssocRecoTracks > 1) {
1127  histograms.h_looper_coll[ww]->Fill(www);
1128  }
1129  if (!isSigSimMatched) {
1130  histograms.h_pileup_coll[ww]->Fill(www);
1131  }
1132  }
1133  }
1134 
1135  // dE/dx
1136  if (dodEdxPlots_)
1137  histoProducerAlgo_->fill_dedx_recoTrack_histos(histograms.histoProducerAlgo, w, track, v_dEdx);
1138 
1139  //Fill other histos
1140  if (!isSimMatched)
1141  continue;
1142 
1143  histoProducerAlgo_->fill_simAssociated_recoTrack_histos(histograms.histoProducerAlgo, w, *track);
1144 
1145  /* TO BE FIXED LATER
1146  if (associators[ww]=="trackAssociatorByChi2"){
1147  //association chi2
1148  double assocChi2 = -tp.begin()->second;//in association map is stored -chi2
1149  h_assochi2[www]->Fill(assocChi2);
1150  h_assochi2_prob[www]->Fill(TMath::Prob((assocChi2)*5,5));
1151  }
1152  else if (associators[ww]=="quickTrackAssociatorByHits"){
1153  double fraction = tp.begin()->second;
1154  h_assocFraction[www]->Fill(fraction);
1155  h_assocSharedHit[www]->Fill(fraction*track->numberOfValidHits());
1156  }
1157  */
1158 
1159  if (doResolutionPlots_[www]) {
1160  //Get tracking particle parameters at point of closest approach to the beamline
1161  TrackingParticleRef tpr = tpFound->val.begin()->first;
1162  TrackingParticle::Vector momentumTP = parametersDefinerTP->momentum(event, setup, tpr);
1163  TrackingParticle::Point vertexTP = parametersDefinerTP->vertex(event, setup, tpr);
1164  int chargeTP = tpr->charge();
1165 
1166  histoProducerAlgo_->fill_ResoAndPull_recoTrack_histos(
1167  histograms.histoProducerAlgo, w, momentumTP, vertexTP, chargeTP, *track, bs.position());
1168  }
1169 
1170  //TO BE FIXED
1171  //std::vector<PSimHit> simhits=tpr.get()->trackPSimHit(DetId::Tracker);
1172  //nrecHit_vs_nsimHit_rec2sim[w]->Fill(track->numberOfValidHits(), (int)(simhits.end()-simhits.begin() ));
1173 
1174  } // End of for(View<Track>::size_type i=0; i<trackCollection.size(); ++i){
1175  mvaCollections.clear();
1176  qualityMaskCollections.clear();
1177 
1178  histoProducerAlgo_->fill_trackBased_histos(histograms.histoProducerAlgo, w, at, rT, n_selTrack_dr, n_selTP_dr);
1179  // Fill seed-specific histograms
1180  if (doSeedPlots_) {
1181  histoProducerAlgo_->fill_seed_histos(
1182  histograms.histoProducerAlgo, www, seed_fit_failed, trackCollection.size());
1183  }
1184 
1185  LogTrace("TrackValidator") << "Collection " << www << "\n"
1186  << "Total Simulated (selected): " << n_selTP_dr << "\n"
1187  << "Total Reconstructed (selected): " << n_selTrack_dr << "\n"
1188  << "Total Reconstructed: " << rT << "\n"
1189  << "Total Associated (recoToSim): " << at << "\n"
1190  << "Total Fakes: " << rT - at << "\n";
1191  } // End of for (unsigned int www=0;www<label.size();www++){
1192  } //END of for (unsigned int ww=0;ww<associators.size();ww++){
1193 }
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
TSCBLBuilderNoMaterial.h
MultiTrackValidator::dRtpSelector
TrackingParticleSelector dRtpSelector
Definition: MultiTrackValidator.h:143
MultiTrackValidator::simPVMaxZ_
const double simPVMaxZ_
Definition: MultiTrackValidator.h:135
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
MultiTrackValidator::associatorTokens
std::vector< edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > > associatorTokens
Definition: MultiTrackValidator.h:119
PileupSummaryInfo.h
electrons_cff.bool
bool
Definition: electrons_cff.py:372
edm::AssociationMap::find
const_iterator find(const key_type &k) const
find element with specified reference key
Definition: AssociationMap.h:173
mps_fire.i
i
Definition: mps_fire.py:355
FreeTrajectoryState.h
MultiTrackValidator::tpNLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
Definition: MultiTrackValidator.h:123
MessageLogger.h
MultiTrackValidator::labelToken
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
Definition: MultiTrackValidator.h:68
funct::false
false
Definition: Factorize.h:34
reco::TrackBase::loose
Definition: TrackBase.h:152
MultiTrackValidator::dqmAnalyze
void dqmAnalyze(const edm::Event &, const edm::EventSetup &, const Histograms &) const override
Method called once per event.
Definition: MultiTrackValidator.cc:572
MultiTrackValidator::cores_
edm::EDGetTokenT< edm::View< reco::Candidate > > cores_
Definition: MultiTrackValidator.h:137
edm::Handle::product
T const * product() const
Definition: Handle.h:70
MultiTrackValidator::label_tp_effic_refvector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
Definition: MultiTrackValidator.h:60
DeDxData.h
MultiTrackValidator::useGsf
bool useGsf
Definition: MultiTrackValidator.h:134
CosmicParametersDefinerForTPESProducer.h
MultiTrackValidator::label
std::vector< edm::InputTag > label
Definition: MultiTrackValidator.h:67
MultiTrackValidator::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
Method called to book the DQM histograms.
Definition: MultiTrackValidator.cc:222
edm::Run
Definition: Run.h:45
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::RefVector::id
ProductID id() const
Accessor for product ID.
Definition: RefVector.h:117
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco::TrackToTrackingParticleAssociator::associateRecoToSim
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
Definition: TrackToTrackingParticleAssociator.h:64
simPFProducer_cfi.associators
associators
Definition: simPFProducer_cfi.py:16
hcal_runs.rt
rt
Definition: hcal_runs.py:76
MultiTrackValidator::dRTrackSelector
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
Definition: MultiTrackValidator.h:144
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
GenParticleRef
edm::Ref< edm::HepMCProduct, HepMC::GenParticle > GenParticleRef
Definition: MultiTrackValidator.cc:43
TrackingVertex.h
MultiTrackValidator::tpNPixelLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
Definition: MultiTrackValidator.h:124
TrackerHitAssociator.h
edm::IndexSet::reserve
void reserve(unsigned int size)
Reserve memory for the set.
Definition: IndexSet.h:34
TrackingParticle::Vector
math::XYZVectorD Vector
point in the space
Definition: TrackingParticle.h:37
edm::RefVector< TrackingParticleCollection >
ParametersDefinerForTP::momentum
virtual TrackingParticle::Vector momentum(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
Definition: ParametersDefinerForTP.cc:17
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
beam_dqm_sourceclient-live_cfg.mva
mva
Definition: beam_dqm_sourceclient-live_cfg.py:119
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
associationMapFilterValues.h
edm::Handle
Definition: AssociativeIterator.h:50
dqmdumpme.first
first
Definition: dqmdumpme.py:55
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
end
#define end
Definition: vmac.h:39
edm::Ref
Definition: AssociativeIterator.h:58
ParametersDefinerForTP::clone
virtual std::unique_ptr< ParametersDefinerForTP > clone() const
Definition: ParametersDefinerForTP.h:67
trackingPlots.assoc
assoc
Definition: trackingPlots.py:183
deltaR.h
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
cmsdt::algo
algo
Definition: constants.h:164
edm::AssociationMap::end
const_iterator end() const
last iterator over the map (read only)
Definition: AssociationMap.h:171
MultiTrackValidator::label_tp_fake_refvector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
Definition: MultiTrackValidator.h:61
reco::VertexToTrackingVertexAssociator::associateRecoToSim
reco::VertexRecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Vertex >> &vCH, const edm::Handle< TrackingVertexCollection > &tVCH) const
Definition: VertexToTrackingVertexAssociator.h:22
MultiTrackValidator.h
MakerMacros.h
MultiTrackValidator::tpNStripStereoLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
Definition: MultiTrackValidator.h:125
cms::cuda::bs
bs
Definition: HistoContainer.h:127
edm::IndexSet::has
bool has(unsigned int index) const
Check if an element (=index) is in the set.
Definition: IndexSet.h:54
TrackingParticleIP::dxy
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
Definition: TrackingParticleIP.h:11
Track.h
TrackFwd.h
TrackingVertexContainer.h
TrackValidationHeavyIons_cff.trackCollectionForDrCalculation
trackCollectionForDrCalculation
Definition: TrackValidationHeavyIons_cff.py:32
edm::RefVector::empty
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:99
MultiTrackValidator::associators
std::vector< edm::InputTag > associators
Definition: MultiTrackValidator.h:57
edm::RefToBaseVector::push_back
void push_back(const RefToBase< T > &)
Definition: RefToBaseVector.h:217
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
MultiTrackValidator::doMVAPlots_
const bool doMVAPlots_
Definition: MultiTrackValidator.h:89
PVValHelper::eta
Definition: PVValidationHelpers.h:69
w
const double w
Definition: UKUtility.cc:23
edm::EDGetTokenT::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:70
DynArray
Definition: DynArray.h:5
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition: TrackingParticle.h:29
reco::BeamSpot
Definition: BeamSpot.h:21
MultiTrackValidator::tpDR
size_t tpDR(const TrackingParticleRefVector &tPCeff, const std::vector< size_t > &selected_tPCeff, DynArray< float > &dR_tPCeff, DynArray< float > &dR_tPCeff_jet, const edm::View< reco::Candidate > *cores) const
Definition: MultiTrackValidator.cc:476
reco::modules::TrackingParticleSelector
SingleObjectSelector< TrackingParticleCollection, ::TrackingParticleSelector > TrackingParticleSelector
Definition: TrackingParticleSelector.cc:17
reco::Track
Definition: Track.h:27
TrackAssociatorRecord
Definition: TrackAssociatorRecord.h:18
edm::ESHandle
Definition: DTSurvey.h:22
MultiTrackValidator::doRecoTrackPlots_
const bool doRecoTrackPlots_
Definition: MultiTrackValidator.h:85
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
declareDynArray
#define declareDynArray(T, n, x)
Definition: DynArray.h:91
MultiTrackValidator::_simHitTpMapTag
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
Definition: MultiTrackValidator.h:146
TrackingVertex::eventId
const EncodedEventId & eventId() const
Definition: TrackingVertex.h:72
IndexSet.h
MultiTrackValidator::getRecoPVPosition
const reco::Vertex::Point * getRecoPVPosition(const edm::Event &event, const edm::Handle< TrackingVertexCollection > &htv) const
Definition: MultiTrackValidator.cc:389
MultiTrackValidator::parametersDefiner
std::string parametersDefiner
Definition: MultiTrackValidator.h:75
AlignmentProducer_cff.beamSpotTag
beamSpotTag
Definition: AlignmentProducer_cff.py:50
MultiTrackValidator::ignoremissingtkcollection_
const bool ignoremissingtkcollection_
Definition: MultiTrackValidator.h:78
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
MultiTrackValidator::doSimPlots_
const bool doSimPlots_
Definition: MultiTrackValidator.h:83
MultiTrackValidator::associatormapRtSs
std::vector< edm::EDGetTokenT< reco::RecoToSimCollection > > associatormapRtSs
Definition: MultiTrackValidator.h:121
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::vector_transform
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
edm::View::size
size_type size() const
ParametersDefinerForTPESProducer.h
trackFromSeedFitFailed
bool trackFromSeedFitFailed(const reco::Track &track)
Definition: trackFromSeedFitFailed.h:6
MultiTrackValidator::dodEdxPlots_
const bool dodEdxPlots_
Definition: MultiTrackValidator.h:86
edm::View
Definition: CaloClusterFwd.h:14
reco::CosmicTrackingParticleSelector
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
Definition: CosmicTrackingParticleSelector.cc:16
TrackToTrackingParticleAssociator.h
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
trackFromSeedFitFailed.h
edm::ParameterSet
Definition: ParameterSet.h:36
MultiTrackValidator::doSimTrackPlots_
const bool doSimTrackPlots_
Definition: MultiTrackValidator.h:84
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
MultiTrackValidator::tpParametersAndSelection
void tpParametersAndSelection(const Histograms &histograms, const TrackingParticleRefVector &tPCeff, const ParametersDefinerForTP &parametersDefinerTP, const edm::Event &event, const edm::EventSetup &setup, const reco::BeamSpot &bs, std::vector< std::tuple< TrackingParticle::Vector, TrackingParticle::Point >> &momVert_tPCeff, std::vector< size_t > &selected_tPCeff) const
Definition: MultiTrackValidator.cc:416
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
MultiTrackValidator::vertexAssociatorToken_
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
Definition: MultiTrackValidator.h:149
edm::AssociationMap< edm::OneToManyWithQualityGeneric< TrackingParticleCollection, edm::View< reco::Track >, double > >
MultiTrackValidator::calculateDrSingleCollection_
const bool calculateDrSingleCollection_
Definition: MultiTrackValidator.h:80
TrackingVertex
Definition: TrackingVertex.h:22
MultiTrackValidator::doPVAssociationPlots_
const bool doPVAssociationPlots_
Definition: MultiTrackValidator.h:87
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
MultiTrackValidator::m_dEdx1Tag
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx1Tag
Definition: MultiTrackValidator.h:72
EncodedEventId::event
int event() const
get the contents of the subdetector field (should be protected?)
Definition: EncodedEventId.h:30
edm::IndexSet
Definition: IndexSet.h:22
MultiTrackValidator::doResolutionPlots_
std::vector< bool > doResolutionPlots_
Definition: MultiTrackValidator.h:91
GsfTrack.h
MultiTrackValidator::~MultiTrackValidator
~MultiTrackValidator() override
Destructor.
Definition: MultiTrackValidator.cc:220
MuonTrackValidator_cfi.parametersDefiner
parametersDefiner
Definition: MuonTrackValidator_cfi.py:26
MultiTrackValidator::doSummaryPlots_
const bool doSummaryPlots_
Definition: MultiTrackValidator.h:82
edm::IndexSet::insert
void insert(unsigned int index)
Insert an element (=index) to the set.
Definition: IndexSet.h:47
MultiTrackValidator::MultiTrackValidator
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
Definition: MultiTrackValidator.cc:49
edm::EventSetup
Definition: EventSetup.h:57
histograms
Definition: histograms.py:1
get
#define get
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
edm::RefToBaseVector< reco::Track >
MultiTrackValidator::recoVertexToken_
edm::EDGetTokenT< edm::View< reco::Vertex > > recoVertexToken_
Definition: MultiTrackValidator.h:148
MultiTrackValidator::useAssociators_
const bool useAssociators_
Definition: MultiTrackValidator.h:79
TrackingParticle::eventId
EncodedEventId eventId() const
Signal source, crossing number.
Definition: TrackingParticle.h:72
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
MultiTrackValidator::doSeedPlots_
const bool doSeedPlots_
Definition: MultiTrackValidator.h:88
reco::Candidate
Definition: Candidate.h:27
ValueMap.h
edm::EDConsumerBase::labelsForToken
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
Definition: EDConsumerBase.cc:347
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
MultiTrackValidator::parametersDefinerIsCosmic_
const bool parametersDefinerIsCosmic_
Definition: MultiTrackValidator.h:77
TrackingParticle.h
MultiTrackValidator::histoProducerAlgo_
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
Definition: MultiTrackValidator.h:93
PtEtaPhiMass.h
reco::Vertex::Point
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
std
Definition: JetResolutionObject.h:76
Ref.h
GsfTrackFwd.h
MultiTrackValidator::label_tp_fake
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
Definition: MultiTrackValidator.h:59
MultiTrackValidator::tpSelector
TrackingParticleSelector tpSelector
Definition: MultiTrackValidator.h:141
MultiTrackValidator::label_tv
edm::EDGetTokenT< TrackingVertexCollection > label_tv
Definition: MultiTrackValidator.h:62
metsig::jet
Definition: SignAlgoResolutions.h:47
transform.h
PileupSummaryInfo::getPU_NumInteractions
const int getPU_NumInteractions() const
Definition: PileupSummaryInfo.h:62
MultiTrackValidator::label_pileupinfo
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
Definition: MultiTrackValidator.h:63
MultiTrackValidator::associatormapStRs
std::vector< edm::EDGetTokenT< reco::SimToRecoCollection > > associatormapStRs
Definition: MultiTrackValidator.h:120
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
Exception
Definition: hltDiff.cc:246
HLT_FULL_cff.cores
cores
Definition: HLT_FULL_cff.py:100366
associationMapFilterValues
T_AssociationMap associationMapFilterValues(const T_AssociationMap &map, const T_RefVector &valueRefs)
Definition: associationMapFilterValues.h:125
TrackerOfflineValidation_Dqm_cff.dirName
dirName
Definition: TrackerOfflineValidation_Dqm_cff.py:55
MultiTrackValidator::cosmictpSelector
CosmicTrackingParticleSelector cosmictpSelector
Definition: MultiTrackValidator.h:142
reco::TrackToTrackingParticleAssociator::associateSimToReco
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
Definition: TrackToTrackingParticleAssociator.h:71
dqm::implementation::IBooker
Definition: DQMStore.h:43
MultiTrackValidator_cfi.doResolutionPlotsForLabels
doResolutionPlotsForLabels
do resolution plots only for these labels (or all if empty)
Definition: MultiTrackValidator_cfi.py:101
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
MultiTrackValidator::dirName_
std::string dirName_
Definition: MultiTrackValidator.h:132
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
TrackingParticleRef
edm::Ref< TrackingParticleCollection > TrackingParticleRef
Definition: TrackingParticleFwd.h:10
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:126
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
MultiTrackValidator::bsSrc
edm::EDGetTokenT< reco::BeamSpot > bsSrc
Definition: MultiTrackValidator.h:70
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
MultiTrackValidator::getSimPVPosition
const TrackingVertex::LorentzVector * getSimPVPosition(const edm::Handle< TrackingVertexCollection > &htv) const
Definition: MultiTrackValidator.cc:377
MultiTrackValidator::m_dEdx2Tag
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx2Tag
Definition: MultiTrackValidator.h:73
TrackingParticle::Point
math::XYZPointD Point
point in the space
Definition: TrackingParticle.h:36
TrackingParticleIP.h
edm::RefVector::size
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
MultiTrackValidator::trackDR
void trackDR(const edm::View< reco::Track > &trackCollection, const edm::View< reco::Track > &trackCollectionDr, DynArray< float > &dR_trk, DynArray< float > &dR_trk_jet, const edm::View< reco::Candidate > *cores) const
Definition: MultiTrackValidator.cc:525
MultiTrackValidator::label_tp_effic
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
Definition: MultiTrackValidator.h:58
MultiTrackValidator::doPlotsOnlyForTruePV_
const bool doPlotsOnlyForTruePV_
Definition: MultiTrackValidator.h:81
MTVHistoProducerAlgoForTracker::makeRecoTrackSelectorFromTPSelectorParameters
static std::unique_ptr< RecoTrackSelectorBase > makeRecoTrackSelectorFromTPSelectorParameters(const edm::ParameterSet &pset)
Definition: MTVHistoProducerAlgoForTracker.cc:370
SimTrackContainer.h
edm::InputTag
Definition: InputTag.h:15
begin
#define begin
Definition: vmac.h:32
label
const char * label
Definition: PFTauDecayModeTools.cc:11
SimVertexContainer.h
EncodedEventId::bunchCrossing
int bunchCrossing() const
get the detector field from this detid
Definition: EncodedEventId.h:25
PileupSummaryInfo
Definition: PileupSummaryInfo.h:22
MultiTrackValidator::labelTokenForDrCalculation
edm::EDGetTokenT< edm::View< reco::Track > > labelTokenForDrCalculation
Definition: MultiTrackValidator.h:147
MultiTrackValidator::mvaQualityCollectionTokens_
std::vector< std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > > mvaQualityCollectionTokens_
Definition: MultiTrackValidator.h:130
edm::View::size_type
unsigned int size_type
Definition: View.h:90
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MultiTrackValidatorHistograms
Definition: MultiTrackValidator.h:33
edm::ProductLabels
Definition: ProductLabels.h:4
MultiTrackValidator::simHitTokens_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
Definition: MultiTrackValidator.h:65
ParametersDefinerForTP::vertex
virtual TrackingParticle::Point vertex(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
Definition: ParametersDefinerForTP.cc:50
TrackingVertex::LorentzVector
math::XYZTLorentzVectorD LorentzVector
Definition: TrackingVertex.h:28
ParametersDefinerForTP
Definition: ParametersDefinerForTP.h:19
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
TrackingParticleIP::dz
auto dz(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
Definition: TrackingParticleIP.h:16
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444
EncodedEventId.h
reco::TrackBase::highPurity
Definition: TrackBase.h:154