CMS 3D CMS Logo

TrackToTrackComparisonHists.cc
Go to the documentation of this file.
3 
5 
9 
12 
13 //
14 // constructors and destructor
15 //
17  : monitoredTrackInputTag_(iConfig.getParameter<edm::InputTag>("monitoredTrack")),
18  referenceTrackInputTag_(iConfig.getParameter<edm::InputTag>("referenceTrack")),
19  topDirName_(iConfig.getParameter<std::string>("topDirName")),
20  dRmin_(iConfig.getParameter<double>("dRmin")),
21  pTCutForPlateau_(iConfig.getParameter<double>("pTCutForPlateau")),
22  dxyCutForPlateau_(iConfig.getParameter<double>("dxyCutForPlateau")),
23  dzWRTPvCut_(iConfig.getParameter<double>("dzWRTPvCut")),
24  requireValidHLTPaths_(iConfig.getParameter<bool>("requireValidHLTPaths")),
25  genTriggerEventFlag_(new GenericTriggerEventFlag(
26  iConfig.getParameter<edm::ParameterSet>("genericTriggerEventPSet"), consumesCollector(), *this))
27 
28 {
29  initialize_parameter(iConfig);
30 
31  //now do what ever initialization is needed
32  monitoredTrackToken_ = consumes<reco::TrackCollection>(monitoredTrackInputTag_);
33  referenceTrackToken_ = consumes<reco::TrackCollection>(referenceTrackInputTag_);
34  monitoredBSToken_ = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("monitoredBeamSpot"));
35  referenceBSToken_ = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("referenceBeamSpot"));
36  monitoredPVToken_ = consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("monitoredPrimaryVertices"));
37  referencePVToken_ = consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("referencePrimaryVertices"));
38 
41 
44 
45  matchTracksMEs_.label = "matches";
46 }
47 
50  genTriggerEventFlag_.reset();
51 }
52 
54 
56  LogDebug("TrackToTrackComparisonHists")
57  << " requireValidHLTPaths_ " << requireValidHLTPaths_ << " hltPathsAreValid_ " << hltPathsAreValid_ << "\n";
58  // if valid HLT paths are required,
59  // analyze event only if paths are valid
61  return;
62  }
63 
64  LogDebug("TrackToTrackComparisonHists") << " genTriggerEventFlag_->on() " << genTriggerEventFlag_->on()
65  << " accept: " << genTriggerEventFlag_->accept(iEvent, iSetup) << "\n";
66  // Filter out events if Trigger Filtering is requested
67  if (genTriggerEventFlag_->on() && !genTriggerEventFlag_->accept(iEvent, iSetup)) {
68  return;
69  }
70 
71  //
72  // Get Reference Track Info
73  //
74  edm::Handle<reco::TrackCollection> referenceTracksHandle;
75  iEvent.getByToken(referenceTrackToken_, referenceTracksHandle);
76  if (!referenceTracksHandle.isValid()) {
77  edm::LogError("TrackToTrackComparisonHists") << "referenceTracksHandle not found, skipping event";
78  return;
79  }
80  reco::TrackCollection referenceTracks = *referenceTracksHandle;
81 
82  edm::Handle<reco::BeamSpot> referenceBSHandle;
83  iEvent.getByToken(referenceBSToken_, referenceBSHandle);
84  if (!referenceBSHandle.isValid()) {
85  edm::LogError("TrackToTrackComparisonHists") << "referenceBSHandle not found, skipping event";
86  return;
87  }
88  reco::BeamSpot referenceBS = *referenceBSHandle;
89 
90  edm::Handle<reco::VertexCollection> referencePVHandle;
91  iEvent.getByToken(referencePVToken_, referencePVHandle);
92  if (!referencePVHandle.isValid()) {
93  edm::LogError("TrackToTrackComparisonHists") << "referencePVHandle not found, skipping event";
94  return;
95  }
96  if (referencePVHandle->empty()) {
97  edm::LogInfo("TrackToTrackComparisonHists") << "referencePVHandle->size is 0 ";
98  return;
99  }
100  reco::Vertex referencePV = referencePVHandle->at(0);
101 
102  //
103  // Get Monitored Track Info
104  //
105  edm::Handle<reco::TrackCollection> monitoredTracksHandle;
106  iEvent.getByToken(monitoredTrackToken_, monitoredTracksHandle);
107  if (!monitoredTracksHandle.isValid()) {
108  edm::LogError("TrackToTrackComparisonHists") << "monitoredTracksHandle not found, skipping event";
109  return;
110  }
111  reco::TrackCollection monitoredTracks = *monitoredTracksHandle;
112 
113  edm::Handle<reco::BeamSpot> monitoredBSHandle;
114  iEvent.getByToken(monitoredBSToken_, monitoredBSHandle);
115  if (!monitoredTracksHandle.isValid()) {
116  edm::LogError("TrackToTrackComparisonHists") << "monitoredBSHandle not found, skipping event";
117  return;
118  }
119  reco::BeamSpot monitoredBS = *monitoredBSHandle;
120 
121  edm::Handle<reco::VertexCollection> monitoredPVHandle;
122  iEvent.getByToken(monitoredPVToken_, monitoredPVHandle);
123  if (!monitoredPVHandle.isValid()) {
124  edm::LogError("TrackToTrackComparisonHists") << "monitoredPVHandle not found, skipping event";
125  return;
126  }
127  if (monitoredPVHandle->empty()) {
128  edm::LogInfo("TrackToTrackComparisonHists") << "monitoredPVHandle->size is 0 ";
129  return;
130  }
131  reco::Vertex monitoredPV = monitoredPVHandle->at(0);
132 
133  edm::LogInfo("TrackToTrackComparisonHists")
134  << "analyzing " << monitoredTrackInputTag_.process() << ":" << monitoredTrackInputTag_.label() << ":"
135  << monitoredTrackInputTag_.instance() << " w.r.t. " << referenceTrackInputTag_.process() << ":"
137 
138  //
139  // Build the dR maps
140  //
141  idx2idxByDoubleColl monitored2referenceColl;
142  fillMap(monitoredTracks, referenceTracks, monitored2referenceColl, dRmin_);
143 
144  idx2idxByDoubleColl reference2monitoredColl;
145  fillMap(referenceTracks, monitoredTracks, reference2monitoredColl, dRmin_);
146 
147  unsigned int nReferenceTracks(0); // Counts the number of refernce tracks
148  unsigned int nMatchedReferenceTracks(0); // Counts the number of matched refernce tracks
149  unsigned int nMonitoredTracks(0); // Counts the number of monitored tracks
150  unsigned int nUnmatchedMonitoredTracks(0); // Counts the number of unmatched monitored tracks
151 
152  //
153  // loop over reference tracks
154  //
155  LogDebug("TrackToTrackComparisonHists") << "\n# of tracks (reference): " << referenceTracks.size() << "\n";
156  for (idx2idxByDoubleColl::const_iterator pItr = reference2monitoredColl.begin(), eItr = reference2monitoredColl.end();
157  pItr != eItr;
158  ++pItr) {
159  nReferenceTracks++;
160  int trackIdx = pItr->first;
161  reco::Track track = referenceTracks.at(trackIdx);
162 
163  float dzWRTpv = track.dz(referencePV.position());
164  if (fabs(dzWRTpv) > dzWRTPvCut_)
165  continue;
166 
167  fill_generic_tracks_histos(*&referenceTracksMEs_, &track, &referenceBS, &referencePV);
168 
169  std::map<double, int> trackDRmap = pItr->second;
170  if (trackDRmap.empty()) {
173  continue;
174  }
175 
176  double dRmin = trackDRmap.begin()->first;
179 
180  bool matched = false;
181  if (dRmin < dRmin_)
182  matched = true;
183 
184  if (matched) {
185  nMatchedReferenceTracks++;
186  fill_generic_tracks_histos(*&matchedReferenceTracksMEs_, &track, &referenceBS, &referencePV);
189 
190  int matchedTrackIndex = trackDRmap[dRmin];
191  reco::Track matchedTrack = monitoredTracks.at(matchedTrackIndex);
192  fill_matching_tracks_histos(*&matchTracksMEs_, &track, &matchedTrack, &referenceBS, &referencePV);
193  }
194 
195  } // Over reference tracks
196 
197  //
198  // loop over monitoed tracks
199  //
200  LogDebug("TrackToTrackComparisonHists") << "\n# of tracks (monitored): " << monitoredTracks.size() << "\n";
201  for (idx2idxByDoubleColl::const_iterator pItr = monitored2referenceColl.begin(), eItr = monitored2referenceColl.end();
202  pItr != eItr;
203  ++pItr) {
204  nMonitoredTracks++;
205  int trackIdx = pItr->first;
206  reco::Track track = monitoredTracks.at(trackIdx);
207 
208  float dzWRTpv = track.dz(monitoredPV.position());
209  if (fabs(dzWRTpv) > dzWRTPvCut_)
210  continue;
211 
212  fill_generic_tracks_histos(*&monitoredTracksMEs_, &track, &monitoredBS, &monitoredPV);
213 
214  std::map<double, int> trackDRmap = pItr->second;
215  if (trackDRmap.empty()) {
218  continue;
219  }
220 
221  double dRmin = trackDRmap.begin()->first;
224 
225  bool matched = false;
226  if (dRmin < dRmin_)
227  matched = true;
228 
229  if (!matched) {
230  nUnmatchedMonitoredTracks++;
231  fill_generic_tracks_histos(*&unMatchedMonitoredTracksMEs_, &track, &monitoredBS, &monitoredPV);
234  }
235 
236  } // over monitoed tracks
237 
238  edm::LogInfo("TrackToTrackComparisonHists")
239  << "Total reference tracks: " << nReferenceTracks << "\n"
240  << "Total matched reference tracks: " << nMatchedReferenceTracks << "\n"
241  << "Total monitored tracks: " << nMonitoredTracks << "\n"
242  << "Total unMatched monitored tracks: " << nUnmatchedMonitoredTracks << "\n";
243 }
244 
246  edm::Run const& iRun,
247  edm::EventSetup const& iSetup) {
249  genTriggerEventFlag_->initRun(iRun, iSetup);
250 
251  // check if every HLT path specified has a valid match in the HLT Menu
253  (genTriggerEventFlag_ && genTriggerEventFlag_->on() && genTriggerEventFlag_->allHLTPathsAreValid());
254 
255  // if valid HLT paths are required,
256  // create DQM outputs only if all paths are valid
258  return;
259  }
260 
262 
263  bookHistos(ibooker, referenceTracksMEs_, "ref", dir);
264  bookHistos(ibooker, matchedReferenceTracksMEs_, "ref_matched", dir);
265 
266  bookHistos(ibooker, monitoredTracksMEs_, "mon", dir);
267  bookHistos(ibooker, unMatchedMonitoredTracksMEs_, "mon_unMatched", dir);
268 
269  book_matching_tracks_histos(ibooker, matchTracksMEs_, "matches", dir);
270 }
271 
272 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
275 
276  desc.add<bool>("requireValidHLTPaths", true);
277 
278  desc.add<edm::InputTag>("monitoredTrack", edm::InputTag("hltMergedTracks"));
279  desc.add<edm::InputTag>("monitoredBeamSpot", edm::InputTag("hltOnlineBeamSpot"));
280  desc.add<edm::InputTag>("monitoredPrimaryVertices", edm::InputTag("hltVerticesPFSelector"));
281 
282  desc.add<edm::InputTag>("referenceTrack", edm::InputTag("generalTracks"));
283  desc.add<edm::InputTag>("referenceBeamSpot", edm::InputTag("offlineBeamSpot"));
284  desc.add<edm::InputTag>("referencePrimaryVertices", edm::InputTag("offlinePrimaryVertices"));
285 
286  desc.add<std::string>("topDirName", "HLT/Tracking/ValidationWRTOffline");
287  desc.add<double>("dRmin", 0.002);
288 
289  desc.add<double>("pTCutForPlateau", 0.9);
290  desc.add<double>("dxyCutForPlateau", 2.5);
291  desc.add<double>("dzWRTPvCut", 1e6);
292 
295  desc.add<edm::ParameterSetDescription>("genericTriggerEventPSet", genericTriggerEventPSet);
296 
299  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
300 
301  descriptions.add("trackToTrackComparisonHists", desc);
302 }
303 
305  reco::TrackCollection tracks2,
307  float dRMin) {
308  //
309  // loop on tracks1
310  //
311  int i = 0;
312  for (const auto& track1 : tracks1) {
313  std::map<double, int> tmp;
314  int j = 0;
315  float smallest_dR = 1e9;
316  int smallest_dR_j = -1;
317 
318  //
319  // loop on tracks2
320  //
321  for (const auto& track2 : tracks2) {
322  double dR = reco::deltaR(track1.eta(), track1.phi(), track2.eta(), track2.phi());
323 
324  if (dR < smallest_dR) {
325  smallest_dR = dR;
326  smallest_dR_j = j;
327  }
328 
329  if (dR < dRMin) {
330  tmp[dR] = j;
331  }
332 
333  j++;
334  }
335 
336  //
337  // If there are no tracks that pass the dR store the smallest (for debugging/validating matching)
338  //
339  if (tmp.empty())
340  tmp[smallest_dR] = smallest_dR_j;
341 
342  map.push_back(std::make_pair(i, tmp));
343  i++;
344  }
345 }
346 
348  generalME& mes,
349  TString label,
350  std::string& dir) {
351  book_generic_tracks_histos(ibooker, mes, label, dir);
352 }
353 
355  generalME& mes,
356  TString label,
357  std::string& dir) {
358  ibooker.cd();
359  ibooker.setCurrentFolder(dir);
360  (mes.h_pt) = ibooker.book1D(label + "_pt", "track p_{T}", Pt_nbin, Pt_rangeMin, Pt_rangeMax);
361  (mes.h_eta) = ibooker.book1D(label + "_eta", "track pseudorapidity", Eta_nbin, Eta_rangeMin, Eta_rangeMax);
362  (mes.h_phi) = ibooker.book1D(label + "_phi", "track #phi", Phi_nbin, Phi_rangeMin, Phi_rangeMax);
363  (mes.h_dxy) =
364  ibooker.book1D(label + "_dxy", "track transverse dca to beam spot", Dxy_nbin, Dxy_rangeMin, Dxy_rangeMax);
365  (mes.h_dz) = ibooker.book1D(label + "_dz", "track longitudinal dca to beam spot", Dz_nbin, Dz_rangeMin, Dz_rangeMax);
366  (mes.h_dxyWRTpv) = ibooker.book1D(
367  label + "_dxyWRTpv", "track transverse dca to primary vertex", Dxy_nbin, Dxy_rangeMin, Dxy_rangeMax);
368  (mes.h_dzWRTpv) = ibooker.book1D(
369  label + "_dzWRTpv", "track longitudinal dca to primary vertex", Dz_nbin, 0.1 * Dz_rangeMin, 0.1 * Dz_rangeMax);
370  (mes.h_charge) = ibooker.book1D(label + "_charge", "track charge", 5, -2, 2);
371  (mes.h_hits) = ibooker.book1D(label + "_hits", "track number of hits", 35, -0.5, 34.5);
372  (mes.h_dRmin) = ibooker.book1D(label + "_dRmin", "track min dR", 100, 0., 0.01);
373  (mes.h_dRmin_l) = ibooker.book1D(label + "_dRmin_l", "track min dR", 100, 0., 0.4);
374 
375  (mes.h_pt_vs_eta) = ibooker.book2D(label + "_ptVSeta",
376  "track p_{T} vs #eta",
377  Eta_nbin,
378  Eta_rangeMin,
379  Eta_rangeMax,
380  Pt_nbin,
381  Pt_rangeMin,
382  Pt_rangeMax);
383 }
384 
386  matchingME& mes,
387  TString label,
388  std::string& dir) {
389  ibooker.cd();
390  ibooker.setCurrentFolder(dir);
391 
392  (mes.h_hits_vs_hits) = ibooker.book2D(
393  label + "_hits_vs_hits", "monitored track # hits vs reference track # hits", 35, -0.5, 34.5, 35, -0.5, 34.5);
394  (mes.h_pt_vs_pt) = ibooker.book2D(label + "_pt_vs_pt",
395  "monitored track p_{T} vs reference track p_{T}",
396  Pt_nbin,
397  Pt_rangeMin,
398  Pt_rangeMax,
399  Pt_nbin,
400  Pt_rangeMin,
401  Pt_rangeMax);
402  (mes.h_eta_vs_eta) = ibooker.book2D(label + "_eta_vs_eta",
403  "monitored track #eta vs reference track #eta",
404  Eta_nbin,
405  Eta_rangeMin,
406  Eta_rangeMax,
407  Eta_nbin,
408  Eta_rangeMin,
409  Eta_rangeMax);
410  (mes.h_phi_vs_phi) = ibooker.book2D(label + "_phi_vs_phi",
411  "monitored track #phi vs reference track #phi",
412  Phi_nbin,
413  Phi_rangeMin,
414  Phi_rangeMax,
415  Phi_nbin,
416  Phi_rangeMin,
417  Phi_rangeMax);
418 
419  (mes.h_dPt) = ibooker.book1D(label + "_dPt", "#Delta track #P_T", ptRes_nbin, ptRes_rangeMin, ptRes_rangeMax);
420  (mes.h_dEta) = ibooker.book1D(label + "_dEta", "#Delta track #eta", etaRes_nbin, etaRes_rangeMin, etaRes_rangeMax);
421  (mes.h_dPhi) = ibooker.book1D(label + "_dPhi", "#Delta track #phi", phiRes_nbin, phiRes_rangeMin, phiRes_rangeMax);
422  (mes.h_dDxy) = ibooker.book1D(
423  label + "_dDxy", "#Delta track transverse dca to beam spot", dxyRes_nbin, dxyRes_rangeMin, dxyRes_rangeMax);
424  (mes.h_dDz) = ibooker.book1D(
425  label + "_dDz", "#Delta track longitudinal dca to beam spot", dzRes_nbin, dzRes_rangeMin, dzRes_rangeMax);
426  (mes.h_dDxyWRTpv) = ibooker.book1D(label + "_dDxyWRTpv",
427  "#Delta track transverse dca to primary vertex ",
428  dxyRes_nbin,
431  (mes.h_dDzWRTpv) = ibooker.book1D(label + "_dDzWRTpv",
432  "#Delta track longitudinal dca to primary vertex",
433  dzRes_nbin,
436  (mes.h_dCharge) = ibooker.book1D(label + "_dCharge", "#Delta track charge", 5, -2.5, 2.5);
437  (mes.h_dHits) = ibooker.book1D(label + "_dHits", "#Delta track number of hits", 39, -19.5, 19.5);
438 }
439 
441  generalME& mes, reco::Track* trk, reco::BeamSpot* bs, reco::Vertex* pv, bool requirePlateau) {
442  float pt = trk->pt();
443  float eta = trk->eta();
444  float phi = trk->phi();
445  float dxy = trk->dxy(bs->position());
446  float dz = trk->dz(bs->position());
447  float dxyWRTpv = trk->dxy(pv->position());
448  float dzWRTpv = trk->dz(pv->position());
449  float charge = trk->charge();
450  float nhits = trk->hitPattern().numberOfValidHits();
451 
452  bool dxyOnPlateau = (fabs(dxyWRTpv) < dxyCutForPlateau_);
453  bool pTOnPlateau = (pt > pTCutForPlateau_);
454 
455  if (dxyOnPlateau || !requirePlateau) {
456  (mes.h_pt)->Fill(pt);
457  }
458 
459  if ((pTOnPlateau && dxyOnPlateau) || !requirePlateau) {
460  (mes.h_eta)->Fill(eta);
461  (mes.h_phi)->Fill(phi);
462  (mes.h_dz)->Fill(dz);
463  (mes.h_dzWRTpv)->Fill(dzWRTpv);
464  (mes.h_charge)->Fill(charge);
465  (mes.h_hits)->Fill(nhits);
466  }
467 
468  if (pTOnPlateau || !requirePlateau) {
469  (mes.h_dxy)->Fill(dxy);
470  (mes.h_dxyWRTpv)->Fill(dxyWRTpv);
471  }
472 
473  (mes.h_pt_vs_eta)->Fill(eta, pt);
474 }
475 
478  float mon_pt = mon->pt();
479  float mon_eta = mon->eta();
480  float mon_phi = mon->phi();
481  float mon_dxy = mon->dxy(bs->position());
482  float mon_dz = mon->dz(bs->position());
483  float mon_dxyWRTpv = mon->dxy(pv->position());
484  float mon_dzWRTpv = mon->dz(pv->position());
485  float mon_charge = mon->charge();
486  float mon_nhits = mon->hitPattern().numberOfValidHits();
487 
488  float ref_pt = ref->pt();
489  float ref_eta = ref->eta();
490  float ref_phi = ref->phi();
491  float ref_dxy = ref->dxy(bs->position());
492  float ref_dz = ref->dz(bs->position());
493  float ref_dxyWRTpv = ref->dxy(pv->position());
494  float ref_dzWRTpv = ref->dz(pv->position());
495  float ref_charge = ref->charge();
496  float ref_nhits = ref->hitPattern().numberOfValidHits();
497 
498  (mes.h_hits_vs_hits)->Fill(ref_nhits, mon_nhits);
499  (mes.h_pt_vs_pt)->Fill(ref_pt, mon_pt);
500  (mes.h_eta_vs_eta)->Fill(ref_eta, mon_eta);
501  (mes.h_phi_vs_phi)->Fill(ref_phi, mon_phi);
502 
503  (mes.h_dPt)->Fill(ref_pt - mon_pt);
504  (mes.h_dEta)->Fill(ref_eta - mon_eta);
505  (mes.h_dPhi)->Fill(ref_phi - mon_phi);
506  (mes.h_dDxy)->Fill(ref_dxy - mon_dxy);
507  (mes.h_dDz)->Fill(ref_dz - mon_dz);
508  (mes.h_dDxyWRTpv)->Fill(ref_dxyWRTpv - mon_dxyWRTpv);
509  (mes.h_dDzWRTpv)->Fill(ref_dzWRTpv - mon_dzWRTpv);
510  (mes.h_dCharge)->Fill(ref_charge - mon_charge);
511  (mes.h_dHits)->Fill(ref_nhits - mon_nhits);
512 }
513 
515  const edm::ParameterSet& pset = iConfig.getParameter<edm::ParameterSet>("histoPSet");
516 
517  Eta_rangeMin = pset.getParameter<double>("Eta_rangeMin");
518  Eta_rangeMax = pset.getParameter<double>("Eta_rangeMax");
519  Eta_nbin = pset.getParameter<unsigned int>("Eta_nbin");
520 
521  Pt_rangeMin = pset.getParameter<double>("Pt_rangeMin");
522  Pt_rangeMax = pset.getParameter<double>("Pt_rangeMax");
523  Pt_nbin = pset.getParameter<unsigned int>("Pt_nbin");
524 
525  Phi_rangeMin = pset.getParameter<double>("Phi_rangeMin");
526  Phi_rangeMax = pset.getParameter<double>("Phi_rangeMax");
527  Phi_nbin = pset.getParameter<unsigned int>("Phi_nbin");
528 
529  Dxy_rangeMin = pset.getParameter<double>("Dxy_rangeMin");
530  Dxy_rangeMax = pset.getParameter<double>("Dxy_rangeMax");
531  Dxy_nbin = pset.getParameter<unsigned int>("Dxy_nbin");
532 
533  Dz_rangeMin = pset.getParameter<double>("Dz_rangeMin");
534  Dz_rangeMax = pset.getParameter<double>("Dz_rangeMax");
535  Dz_nbin = pset.getParameter<unsigned int>("Dz_nbin");
536 
537  ptRes_rangeMin = pset.getParameter<double>("ptRes_rangeMin");
538  ptRes_rangeMax = pset.getParameter<double>("ptRes_rangeMax");
539  ptRes_nbin = pset.getParameter<unsigned int>("ptRes_nbin");
540 
541  phiRes_rangeMin = pset.getParameter<double>("phiRes_rangeMin");
542  phiRes_rangeMax = pset.getParameter<double>("phiRes_rangeMax");
543  phiRes_nbin = pset.getParameter<unsigned int>("phiRes_nbin");
544 
545  etaRes_rangeMin = pset.getParameter<double>("etaRes_rangeMin");
546  etaRes_rangeMax = pset.getParameter<double>("etaRes_rangeMax");
547  etaRes_nbin = pset.getParameter<unsigned int>("etaRes_nbin");
548 
549  dxyRes_rangeMin = pset.getParameter<double>("dxyRes_rangeMin");
550  dxyRes_rangeMax = pset.getParameter<double>("dxyRes_rangeMax");
551  dxyRes_nbin = pset.getParameter<unsigned int>("dxyRes_nbin");
552 
553  dzRes_rangeMin = pset.getParameter<double>("dzRes_rangeMin");
554  dzRes_rangeMax = pset.getParameter<double>("dzRes_rangeMax");
555  dzRes_nbin = pset.getParameter<unsigned int>("dzRes_nbin");
556 }
557 
559  pset.add<double>("Eta_rangeMin", -2.5);
560  pset.add<double>("Eta_rangeMax", 2.5);
561  pset.add<unsigned int>("Eta_nbin", 50);
562 
563  pset.add<double>("Pt_rangeMin", 0.1);
564  pset.add<double>("Pt_rangeMax", 100.0);
565  pset.add<unsigned int>("Pt_nbin", 1000);
566 
567  pset.add<double>("Phi_rangeMin", -3.1416);
568  pset.add<double>("Phi_rangeMax", 3.1416);
569  pset.add<unsigned int>("Phi_nbin", 36);
570 
571  pset.add<double>("Dxy_rangeMin", -1.0);
572  pset.add<double>("Dxy_rangeMax", 1.0);
573  pset.add<unsigned int>("Dxy_nbin", 300);
574 
575  pset.add<double>("Dz_rangeMin", -30.0);
576  pset.add<double>("Dz_rangeMax", 30.0);
577  pset.add<unsigned int>("Dz_nbin", 60);
578 
579  pset.add<double>("ptRes_rangeMin", -0.1);
580  pset.add<double>("ptRes_rangeMax", 0.1);
581  pset.add<unsigned int>("ptRes_nbin", 100);
582 
583  pset.add<double>("phiRes_rangeMin", -0.01);
584  pset.add<double>("phiRes_rangeMax", 0.01);
585  pset.add<unsigned int>("phiRes_nbin", 300);
586 
587  pset.add<double>("etaRes_rangeMin", -0.01);
588  pset.add<double>("etaRes_rangeMax", 0.01);
589  pset.add<unsigned int>("etaRes_nbin", 300);
590 
591  pset.add<double>("dxyRes_rangeMin", -0.05);
592  pset.add<double>("dxyRes_rangeMax", 0.05);
593  pset.add<unsigned int>("dxyRes_nbin", 500);
594 
595  pset.add<double>("dzRes_rangeMin", -0.05);
596  pset.add<double>("dzRes_rangeMax", 0.05);
597  pset.add<unsigned int>("dzRes_nbin", 150);
598 }
edm::EDGetTokenT< reco::TrackCollection > monitoredTrackToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
int numberOfValidHits() const
Definition: HitPattern.h:817
void beginJob(const edm::EventSetup &iSetup)
edm::EDGetTokenT< reco::BeamSpot > referenceBSToken_
edm::EDGetTokenT< reco::VertexCollection > monitoredPVToken_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
std::string const & instance() const
Definition: InputTag.h:37
const Point & position() const
position
Definition: Vertex.h:127
edm::EDGetTokenT< reco::TrackCollection > referenceTrackToken_
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
std::string const & label() const
Definition: InputTag.h:36
Log< level::Error, false > LogError
double pt() const
track transverse momentum
Definition: TrackBase.h:637
char const * label
int charge() const
track electric charge
Definition: TrackBase.h:596
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:622
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< GenericTriggerEventFlag > genTriggerEventFlag_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void fill_generic_tracks_histos(generalME &mes, reco::Track *trk, reco::BeamSpot *bs, reco::Vertex *pv, bool requirePlateau=true)
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
std::vector< std::pair< int, std::map< double, int > > > idx2idxByDoubleColl
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
Log< level::Info, false > LogInfo
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:504
void initialize_parameter(const edm::ParameterSet &iConfig)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void fill_matching_tracks_histos(matchingME &mes, reco::Track *mon, reco::Track *ref, reco::BeamSpot *bs, reco::Vertex *pv)
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< reco::BeamSpot > monitoredBSToken_
edm::EDGetTokenT< reco::VertexCollection > referencePVToken_
void fillMap(reco::TrackCollection tracks1, reco::TrackCollection tracks2, idx2idxByDoubleColl &map, float dRMin)
HLT enums.
void book_matching_tracks_histos(DQMStore::IBooker &ibooker, matchingME &mes, TString label, std::string &dir)
void book_generic_tracks_histos(DQMStore::IBooker &ibooker, generalME &mes, TString label, std::string &dir)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
std::string const & process() const
Definition: InputTag.h:40
tmp
align.sh
Definition: createJobs.py:716
static void fillPSetDescription(edm::ParameterSetDescription &desc)
void bookHistos(DQMStore::IBooker &ibooker, generalME &mes, TString label, std::string &dir)
Definition: Run.h:45
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:608
#define LogDebug(id)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrackToTrackComparisonHists(const edm::ParameterSet &)