CMS 3D CMS Logo

MuonTrackValidator.cc
Go to the documentation of this file.
4 
14 
15 #include "TMath.h"
16 #include <TF1.h>
17 
18 using namespace std;
19 using namespace edm;
20 
22  edm::Run const&,
23  edm::EventSetup const& setup) {
24  for (unsigned int ww = 0; ww < associators.size(); ww++) {
25  for (unsigned int www = 0; www < label.size(); www++) {
26  ibooker.cd();
27  InputTag algo = label[www];
28  string dirName = dirName_;
29 
30  auto setBinLogX = [this](TH1* th1) {
31  if (this->useLogPt) {
32  BinLogX(th1);
33  }
34  };
35 
36  if (!algo.process().empty())
37  dirName += algo.process() + "_";
38  if (!algo.label().empty())
39  dirName += algo.label();
40  if (!algo.instance().empty())
41  dirName += ("_" + algo.instance());
42  if (dirName.find("Tracks") < dirName.length()) {
43  dirName.replace(dirName.find("Tracks"), 6, "Trks");
44  }
45  if (dirName.find("UpdatedAtVtx") < dirName.length()) {
46  dirName.replace(dirName.find("UpdatedAtVtx"), 12, "UpdAtVtx");
47  }
48  string assoc = associators[ww];
49  if (assoc.find("tpToTkmuTrackAssociation") < assoc.length()) {
50  dirName += "_TkAsso";
51  }
52  std::replace(dirName.begin(), dirName.end(), ':', '_');
53  ibooker.setCurrentFolder(dirName);
54 
55  h_tracks.push_back(
56  ibooker.book1D("Ntracks", "Number of reconstructed tracks", nintNTracks, minNTracks, maxNTracks));
57  h_fakes.push_back(ibooker.book1D("Nfakes", "Number of fake reco tracks", nintFTracks, minFTracks, maxFTracks));
58  h_charge.push_back(ibooker.book1D("Ncharge", "track charge", 3, -1.5, 1.5));
59 
60  h_recoeta.push_back(ibooker.book1D("num_reco_eta", "N of reco track vs eta", nintEta, minEta, maxEta));
61  h_assoceta.push_back(ibooker.book1D(
62  "num_assoSimToReco_eta", "N of associated tracks (simToReco) vs eta", nintEta, minEta, maxEta));
63  h_assoc2eta.push_back(ibooker.book1D(
64  "num_assoRecoToSim_eta", "N of associated (recoToSim) tracks vs eta", nintEta, minEta, maxEta));
65  h_simuleta.push_back(ibooker.book1D("num_simul_eta", "N of simulated tracks vs eta", nintEta, minEta, maxEta));
66  h_misideta.push_back(ibooker.book1D("num_chargemisid_eta",
67  "N of associated (simToReco) tracks with charge misID vs eta",
68  nintEta,
69  minEta,
70  maxEta));
71 
72  h_recopT.push_back(ibooker.book1D("num_reco_pT", "N of reco track vs pT", nintPt, minPt, maxPt, setBinLogX));
73  h_assocpT.push_back(ibooker.book1D(
74  "num_assoSimToReco_pT", "N of associated tracks (simToReco) vs pT", nintPt, minPt, maxPt, setBinLogX));
75  h_assoc2pT.push_back(ibooker.book1D(
76  "num_assoRecoToSim_pT", "N of associated (recoToSim) tracks vs pT", nintPt, minPt, maxPt, setBinLogX));
77  h_simulpT.push_back(
78  ibooker.book1D("num_simul_pT", "N of simulated tracks vs pT", nintPt, minPt, maxPt, setBinLogX));
79  h_misidpT.push_back(ibooker.book1D("num_chargemisid_pT",
80  "N of associated (simToReco) tracks with charge misID vs pT",
81  nintPt,
82  minPt,
83  maxPt,
84  setBinLogX));
85 
86  h_recophi.push_back(ibooker.book1D("num_reco_phi", "N of reco track vs phi", nintPhi, minPhi, maxPhi));
87  h_assocphi.push_back(ibooker.book1D(
88  "num_assoSimToReco_phi", "N of associated tracks (simToReco) vs phi", nintPhi, minPhi, maxPhi));
89  h_assoc2phi.push_back(ibooker.book1D(
90  "num_assoRecoToSim_phi", "N of associated (recoToSim) tracks vs phi", nintPhi, minPhi, maxPhi));
91  h_simulphi.push_back(ibooker.book1D("num_simul_phi", "N of simulated tracks vs phi", nintPhi, minPhi, maxPhi));
92  h_misidphi.push_back(ibooker.book1D("num_chargemisid_phi",
93  "N of associated (simToReco) tracks with charge misID vs phi",
94  nintPhi,
95  minPhi,
96  maxPhi));
97 
98  h_recohit.push_back(ibooker.book1D("num_reco_hit", "N of reco tracks vs N SimHits", nintNHit, minNHit, maxNHit));
99  h_assochit.push_back(ibooker.book1D(
100  "num_assoSimToReco_hit", "N of associated tracks (simToReco) vs N SimHits", nintNHit, minNHit, maxNHit));
101  h_assoc2hit.push_back(ibooker.book1D(
102  "num_assoRecoToSim_hit", "N of associated (recoToSim) tracks vs N Rechits", nintNHit, minNHit, maxNHit));
103  h_simulhit.push_back(
104  ibooker.book1D("num_simul_hit", "N of simulated tracks vs N SimHits", nintNHit, minNHit, maxNHit));
105  h_misidhit.push_back(ibooker.book1D("num_chargemisid_hit",
106  "N of associated (recoToSim) tracks with charge misID vs N RecHits",
107  nintNHit,
108  minNHit,
109  maxNHit));
110 
111  h_recodxy.push_back(ibooker.book1D("num_reco_dxy", "N of reco track vs dxy", nintDxy, minDxy, maxDxy));
112  h_assocdxy.push_back(ibooker.book1D(
113  "num_assoSimToReco_dxy", "N of associated tracks (simToReco) vs dxy", nintDxy, minDxy, maxDxy));
114  h_assoc2dxy.push_back(ibooker.book1D(
115  "num_assoRecoToSim_dxy", "N of associated (recoToSim) tracks vs dxy", nintDxy, minDxy, maxDxy));
116  h_simuldxy.push_back(ibooker.book1D("num_simul_dxy", "N of simulated tracks vs dxy", nintDxy, minDxy, maxDxy));
117  h_misiddxy.push_back(ibooker.book1D("num_chargemisid_dxy",
118  "N of associated (simToReco) tracks with charge misID vs dxy",
119  nintDxy,
120  minDxy,
121  maxDxy));
122  h_recodz.push_back(ibooker.book1D("num_reco_dz", "N of reco track vs dz", nintDz, minDz, maxDz));
123  h_assocdz.push_back(
124  ibooker.book1D("num_assoSimToReco_dz", "N of associated tracks (simToReco) vs dz", nintDz, minDz, maxDz));
125  h_assoc2dz.push_back(
126  ibooker.book1D("num_assoRecoToSim_dz", "N of associated (recoToSim) tracks vs dz", nintDz, minDz, maxDz));
127  h_simuldz.push_back(ibooker.book1D("num_simul_dz", "N of simulated tracks vs dz", nintDz, minDz, maxDz));
128  h_misiddz.push_back(ibooker.book1D(
129  "num_chargemisid_dz", "N of associated (simToReco) tracks with charge misID vs dz", nintDz, minDz, maxDz));
130 
131  h_assocRpos.push_back(ibooker.book1D(
132  "num_assoSimToReco_Rpos", "N of associated tracks (simToReco) vs Radius", nintRpos, minRpos, maxRpos));
133  h_simulRpos.push_back(
134  ibooker.book1D("num_simul_Rpos", "N of simulated tracks vs Radius", nintRpos, minRpos, maxRpos));
135 
136  h_assocZpos.push_back(ibooker.book1D(
137  "num_assoSimToReco_Zpos", "N of associated tracks (simToReco) vs Z", nintZpos, minZpos, maxZpos));
138  h_simulZpos.push_back(ibooker.book1D("num_simul_Zpos", "N of simulated tracks vs Z", nintZpos, minZpos, maxZpos));
139 
140  h_recopu.push_back(ibooker.book1D("num_reco_pu", "N of reco track vs pu", nintPU, minPU, maxPU));
141  h_assocpu.push_back(
142  ibooker.book1D("num_assoSimToReco_pu", "N of associated tracks (simToReco) vs pu", nintPU, minPU, maxPU));
143  h_assoc2pu.push_back(
144  ibooker.book1D("num_assoRecoToSim_pu", "N of associated (recoToSim) tracks vs pu", nintPU, minPU, maxPU));
145  h_simulpu.push_back(ibooker.book1D("num_simul_pu", "N of simulated tracks vs pu", nintPU, minPU, maxPU));
146  h_misidpu.push_back(ibooker.book1D(
147  "num_chargemisid_pu", "N of associated (simToReco) charge misIDed tracks vs pu", nintPU, minPU, maxPU));
148 
149  h_nchi2.push_back(ibooker.book1D("chi2", "Track normalized #chi^{2}", 80, 0., 20.));
150  h_nchi2_prob.push_back(ibooker.book1D("chi2prob", "Probability of track normalized #chi^{2}", 100, 0., 1.));
151 
152  chi2_vs_nhits.push_back(
153  ibooker.book2D("chi2_vs_nhits", "#chi^{2} vs nhits", nintNHit, minNHit, maxNHit, 20, 0., 10.));
154  chi2_vs_eta.push_back(ibooker.book2D("chi2_vs_eta", "chi2_vs_eta", nintEta, minEta, maxEta, 40, 0., 20.));
155  chi2_vs_phi.push_back(ibooker.book2D("chi2_vs_phi", "#chi^{2} vs #phi", nintPhi, minPhi, maxPhi, 40, 0., 20.));
156 
157  h_nhits.push_back(ibooker.book1D("nhits", "Number of hits per track", nintNHit, minNHit, maxNHit));
158  nhits_vs_eta.push_back(
159  ibooker.book2D("nhits_vs_eta", "Number of Hits vs eta", nintEta, minEta, maxEta, nintNHit, minNHit, maxNHit));
160  nhits_vs_phi.push_back(
161  ibooker.book2D("nhits_vs_phi", "#hits vs #phi", nintPhi, minPhi, maxPhi, nintNHit, minNHit, maxNHit));
162 
163  if (do_MUOhitsPlots) {
164  nDThits_vs_eta.push_back(ibooker.book2D(
165  "nDThits_vs_eta", "Number of DT hits vs eta", nintEta, minEta, maxEta, nintDTHit, minDTHit, maxDTHit));
166  nCSChits_vs_eta.push_back(ibooker.book2D(
167  "nCSChits_vs_eta", "Number of CSC hits vs eta", nintEta, minEta, maxEta, nintCSCHit, minCSCHit, maxCSCHit));
168  nRPChits_vs_eta.push_back(ibooker.book2D(
169  "nRPChits_vs_eta", "Number of RPC hits vs eta", nintEta, minEta, maxEta, nintRPCHit, minRPCHit, maxRPCHit));
170  if (useGEMs_)
171  nGEMhits_vs_eta.push_back(ibooker.book2D(
172  "nGEMhits_vs_eta", "Number of GEM hits vs eta", nintEta, minEta, maxEta, nintNHit, minNHit, maxNHit));
173  if (useME0_)
174  nME0hits_vs_eta.push_back(ibooker.book2D(
175  "nME0hits_vs_eta", "Number of ME0 hits vs eta", nintEta, minEta, maxEta, nintNHit, minNHit, maxNHit));
176  }
177 
178  if (do_TRKhitsPlots) {
179  nTRK_LayersWithMeas_vs_eta.push_back(ibooker.book2D("nTRK_LayersWithMeas_vs_eta",
180  "# TRK Layers with measurement vs eta",
181  nintEta,
182  minEta,
183  maxEta,
184  nintLayers,
185  minLayers,
186  maxLayers));
187  nPixel_LayersWithMeas_vs_eta.push_back(ibooker.book2D("nPixel_LayersWithMeas_vs_eta",
188  "Number of Pixel Layers with measurement vs eta",
189  nintEta,
190  minEta,
191  maxEta,
192  nintPixels,
193  minPixels,
194  maxPixels));
195  h_nmisslayers_inner.push_back(ibooker.book1D(
196  "nTRK_misslayers_inner", "Number of missing inner TRK layers", nintLayers, minLayers, maxLayers));
197  h_nmisslayers_outer.push_back(ibooker.book1D(
198  "nTRK_misslayers_outer", "Number of missing outer TRK layers", nintLayers, minLayers, maxLayers));
199  h_nlosthits.push_back(ibooker.book1D("nlosthits", "Number of lost hits per track", 6, -0.5, 5.5));
200  nlosthits_vs_eta.push_back(ibooker.book2D(
201  "nlosthits_vs_eta", "Number of lost hits per track vs eta", nintEta, minEta, maxEta, 6, -0.5, 5.5));
202  }
203 
204  ptres_vs_eta.push_back(ibooker.book2D("ptres_vs_eta",
205  "p_{T} Relative Residual vs #eta",
206  nintEta,
207  minEta,
208  maxEta,
209  ptRes_nbin,
211  ptRes_rangeMax));
212  ptres_vs_phi.push_back(ibooker.book2D("ptres_vs_phi",
213  "p_{T} Relative Residual vs #phi",
214  nintPhi,
215  minPhi,
216  maxPhi,
217  ptRes_nbin,
219  ptRes_rangeMax));
220  ptres_vs_pt.push_back(ibooker.book2D("ptres_vs_pt",
221  "p_{T} Relative Residual vs p_{T}",
222  nintPt,
223  minPt,
224  maxPt,
225  ptRes_nbin,
228  setBinLogX));
229  h_ptpull.push_back(ibooker.book1D("ptpull", "p_{T} Pull", 100, -10., 10.));
230  ptpull_vs_eta.push_back(
231  ibooker.book2D("ptpull_vs_eta", "p_{T} Pull vs #eta", nintEta, minEta, maxEta, 100, -10., 10.));
232  ptpull_vs_phi.push_back(
233  ibooker.book2D("ptpull_vs_phi", "p_{T} Pull vs #phi", nintPhi, minPhi, maxPhi, 100, -10., 10.));
234  h_qoverppull.push_back(ibooker.book1D("qoverppull", "q/p Pull", 100, -10., 10.));
235 
236  h_etaRes.push_back(ibooker.book1D("etaRes", "#eta residual", etaRes_nbin, etaRes_rangeMin, etaRes_rangeMax));
237  etares_vs_eta.push_back(ibooker.book2D("etares_vs_eta",
238  "#eta Residual vs #eta",
239  nintEta,
240  minEta,
241  maxEta,
242  etaRes_nbin,
244  etaRes_rangeMax));
245 
246  thetaCotres_vs_eta.push_back(ibooker.book2D("thetaCotres_vs_eta",
247  "cot(#theta) Residual vs #eta",
248  nintEta,
249  minEta,
250  maxEta,
254  thetaCotres_vs_pt.push_back(ibooker.book2D("thetaCotres_vs_pt",
255  "cot(#theta) Residual vs p_{T}",
256  nintPt,
257  minPt,
258  maxPt,
262  setBinLogX));
263  h_thetapull.push_back(ibooker.book1D("thetapull", "#theta Pull", 100, -10., 10.));
264  thetapull_vs_eta.push_back(
265  ibooker.book2D("thetapull_vs_eta", "#theta Pull vs #eta", nintEta, minEta, maxEta, 100, -10, 10));
266  thetapull_vs_phi.push_back(
267  ibooker.book2D("thetapull_vs_phi", "#theta Pull vs #phi", nintPhi, minPhi, maxPhi, 100, -10, 10));
268 
269  phires_vs_eta.push_back(ibooker.book2D("phires_vs_eta",
270  "#phi Residual vs #eta",
271  nintEta,
272  minEta,
273  maxEta,
274  phiRes_nbin,
276  phiRes_rangeMax));
277  phires_vs_pt.push_back(ibooker.book2D("phires_vs_pt",
278  "#phi Residual vs p_{T}",
279  nintPt,
280  minPt,
281  maxPt,
282  phiRes_nbin,
285  setBinLogX));
286  phires_vs_phi.push_back(ibooker.book2D("phires_vs_phi",
287  "#phi Residual vs #phi",
288  nintPhi,
289  minPhi,
290  maxPhi,
291  phiRes_nbin,
293  phiRes_rangeMax));
294  h_phipull.push_back(ibooker.book1D("phipull", "#phi Pull", 100, -10., 10.));
295  phipull_vs_eta.push_back(
296  ibooker.book2D("phipull_vs_eta", "#phi Pull vs #eta", nintEta, minEta, maxEta, 100, -10, 10));
297  phipull_vs_phi.push_back(
298  ibooker.book2D("phipull_vs_phi", "#phi Pull vs #phi", nintPhi, minPhi, maxPhi, 100, -10, 10));
299 
300  dxyres_vs_eta.push_back(ibooker.book2D("dxyres_vs_eta",
301  "dxy Residual vs #eta",
302  nintEta,
303  minEta,
304  maxEta,
305  dxyRes_nbin,
307  dxyRes_rangeMax));
308  dxyres_vs_pt.push_back(ibooker.book2D("dxyres_vs_pt",
309  "dxy Residual vs p_{T}",
310  nintPt,
311  minPt,
312  maxPt,
313  dxyRes_nbin,
316  setBinLogX));
317  h_dxypull.push_back(ibooker.book1D("dxypull", "dxy Pull", 100, -10., 10.));
318  dxypull_vs_eta.push_back(
319  ibooker.book2D("dxypull_vs_eta", "dxy Pull vs #eta", nintEta, minEta, maxEta, 100, -10, 10));
320 
321  dzres_vs_eta.push_back(ibooker.book2D(
322  "dzres_vs_eta", "dz Residual vs #eta", nintEta, minEta, maxEta, dzRes_nbin, dzRes_rangeMin, dzRes_rangeMax));
323  dzres_vs_pt.push_back(ibooker.book2D("dzres_vs_pt",
324  "dz Residual vs p_{T}",
325  nintPt,
326  minPt,
327  maxPt,
328  dzRes_nbin,
331  setBinLogX));
332  h_dzpull.push_back(ibooker.book1D("dzpull", "dz Pull", 100, -10., 10.));
333  dzpull_vs_eta.push_back(
334  ibooker.book2D("dzpull_vs_eta", "dz Pull vs #eta", nintEta, minEta, maxEta, 100, -10, 10));
335 
336  nRecHits_vs_nSimHits.push_back(ibooker.book2D(
337  "nRecHits_vs_nSimHits", "nRecHits vs nSimHits", nintNHit, minNHit, maxNHit, nintNHit, minNHit, maxNHit));
338 
339  if (MABH) {
340  h_PurityVsQuality.push_back(
341  ibooker.book2D("PurityVsQuality", "Purity vs Quality (MABH)", 20, 0.01, 1.01, 20, 0.01, 1.01));
342  }
343 
344  if (associators[ww] == "trackAssociatorByChi2") {
345  h_assochi2.push_back(ibooker.book1D("assocChi2", "track association #chi^{2}", 1000, 0., 100.));
346  h_assochi2_prob.push_back(ibooker.book1D("assocChi2_prob", "probability of association #chi^{2}", 100, 0., 1.));
347  } else if (associators[ww] == "trackAssociatorByHits") {
348  h_assocFraction.push_back(ibooker.book1D("assocFraction", "fraction of shared hits", 22, 0., 1.1));
349  h_assocSharedHit.push_back(ibooker.book1D("assocSharedHit", "number of shared hits", 41, -0.5, 40.5));
350  }
351 
352  } //for (unsigned int www=0;www<label.size();www++)
353  } //for (unsigned int ww=0;ww<associators.size();ww++)
354 }
355 
357  using namespace reco;
358 
359  edm::LogInfo("MuonTrackValidator") << "\n===================================================="
360  << "\n"
361  << "Analyzing new event"
362  << "\n"
363  << "====================================================\n"
364  << "\n";
365 
367  int PU_NumInteractions(-1);
368 
369  if (parametersDefiner == "LhcParametersDefinerForTP") {
370  // PileupSummaryInfo is contained only in collision events
371  event.getByToken(pileupinfo_Token, puinfoH);
372  for (std::vector<PileupSummaryInfo>::const_iterator puInfoIt = puinfoH->begin(); puInfoIt != puinfoH->end();
373  ++puInfoIt) {
374  if (puInfoIt->getBunchCrossing() == 0) {
375  PU_NumInteractions = puInfoIt->getPU_NumInteractions();
376  break;
377  }
378  }
379 
380  } else if (parametersDefiner == "CosmicParametersDefinerForTP") {
382  //warning: make sure the TP collection used in the map is the same used here
383  event.getByToken(_simHitTpMapTag, simHitsTPAssoc);
384  cosmicParametersDefinerTP_->initEvent(simHitsTPAssoc);
385  cosmictpSelector.initEvent(simHitsTPAssoc);
386  }
387 
389  const TrackingParticleRefVector* ptr_TPrefV = nullptr;
391  edm::Handle<TrackingParticleRefVector> TPCollectionRefVector_H;
392 
393  if (label_tp_refvector) {
394  event.getByToken(tp_refvector_Token, TPCollectionRefVector_H);
395  ptr_TPrefV = TPCollectionRefVector_H.product();
396  } else {
397  event.getByToken(tp_Token, TPCollection_H);
398  size_t nTP = TPCollection_H->size();
399  for (size_t i = 0; i < nTP; ++i) {
400  TPrefV.push_back(TrackingParticleRef(TPCollection_H, i));
401  }
402  ptr_TPrefV = &TPrefV;
403  }
404  TrackingParticleRefVector const& tPC = *ptr_TPrefV;
405 
406  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
407  bool bs_Available = event.getByToken(bsSrc_Token, recoBeamSpotHandle);
409  if (bs_Available)
410  bs = *recoBeamSpotHandle;
411  edm::LogVerbatim("MuonTrackValidator") << bs;
412 
413  std::vector<const reco::TrackToTrackingParticleAssociator*> associator;
414  if (UseAssociators) {
416  for (auto const& associatorName : associators) {
417  event.getByLabel(associatorName, theAssociator);
418  associator.push_back(theAssociator.product());
419  }
420  }
421 
422  int w = 0;
423  for (unsigned int ww = 0; ww < associators.size(); ww++) {
424  for (unsigned int www = 0; www < label.size(); www++) {
425  //
426  //get collections from the event
427  //
429  unsigned int trackCollectionSize = 0;
430 
431  reco::RecoToSimCollection recSimColl;
432  reco::SimToRecoCollection simRecColl;
433 
434  // account for missing track collections (HLT case)
435  if (!event.getByToken(track_Collection_Token[www], trackCollection) && ignoremissingtkcollection_) {
436  recSimColl.post_insert();
437  simRecColl.post_insert();
438  }
439 
440  //associate tracks to TrackingParticles
441  else {
442  trackCollectionSize = trackCollection->size();
443 
444  if (UseAssociators) {
445  edm::LogVerbatim("MuonTrackValidator")
446  << "Analyzing " << label[www].process() << ":" << label[www].label() << ":" << label[www].instance()
447  << " with " << associators[ww].c_str() << "\n";
448 
449  LogTrace("MuonTrackValidator") << "Calling associateRecoToSim method"
450  << "\n";
451  recSimColl = associator[ww]->associateRecoToSim(trackCollection, TPCollection_H);
452  LogTrace("MuonTrackValidator") << "Calling associateSimToReco method"
453  << "\n";
454  simRecColl = associator[ww]->associateSimToReco(trackCollection, TPCollection_H);
455  } else {
456  edm::LogVerbatim("MuonTrackValidator")
457  << "Analyzing " << label[www].process() << ":" << label[www].label() << ":" << label[www].instance()
458  << " with " << associatormap.process() << ":" << associatormap.label() << ":" << associatormap.instance()
459  << "\n";
460 
461  Handle<reco::SimToRecoCollection> simtorecoCollectionH;
462  event.getByToken(simToRecoCollection_Token, simtorecoCollectionH);
463  simRecColl = *simtorecoCollectionH.product();
464 
465  Handle<reco::RecoToSimCollection> recotosimCollectionH;
466  event.getByToken(recoToSimCollection_Token, recotosimCollectionH);
467  recSimColl = *recotosimCollectionH.product();
468  }
469  }
470 
471  //
472  //fill simulation histograms
473  //
474  edm::LogVerbatim("MuonTrackValidator") << "\n# of TrackingParticles: " << tPC.size() << "\n";
475  int ats = 0;
476  int st = 0;
477 
478  for (size_t i = 0; i < tPC.size(); i++) {
479  bool TP_is_matched = false;
480  bool isChargeOK = true;
481  double quality = 0.;
482 
483  const TrackingParticleRef& tpr = tPC[i];
484  const TrackingParticle& tp = *tpr;
485 
486  TrackingParticle::Vector momentumTP;
487  TrackingParticle::Point vertexTP;
488  double dxySim = 0;
489  double dzSim = 0;
490 
491  //If the TrackingParticle is collision-like, get the momentum and vertex at production state
492  //and the impact parameters w.r.t. PCA
493  if (parametersDefiner == "LhcParametersDefinerForTP") {
494  LogTrace("MuonTrackValidator") << "TrackingParticle " << i;
495  if (!tpSelector(tp))
496  continue;
497  momentumTP = tp.momentum();
498  vertexTP = tp.vertex();
499  TrackingParticle::Vector momentum = lhcParametersDefinerTP_->momentum(event, setup, tpr);
500  TrackingParticle::Point vertex = lhcParametersDefinerTP_->vertex(event, setup, tpr);
501  dxySim = TrackingParticleIP::dxy(vertex, momentum, bs.position());
502  dzSim = TrackingParticleIP::dz(vertex, momentum, bs.position());
503  }
504  //for cosmics get the momentum and vertex at PCA
505  else if (parametersDefiner == "CosmicParametersDefinerForTP") {
506  edm::LogVerbatim("MuonTrackValidator") << "TrackingParticle " << i;
507  if (!cosmictpSelector(tpr, &bs, event, setup))
508  continue;
509  momentumTP = cosmicParametersDefinerTP_->momentum(event, setup, tpr);
510  vertexTP = cosmicParametersDefinerTP_->vertex(event, setup, tpr);
511  dxySim = TrackingParticleIP::dxy(vertexTP, momentumTP, bs.position());
512  dzSim = TrackingParticleIP::dz(vertexTP, momentumTP, bs.position());
513  }
514 
515  // Number of counted SimHits depend on the selection of tracker and muon detectors (via cfg parameters)
516  int nSimHits = 0;
517  if (usetracker && usemuon) {
518  nSimHits = tpr.get()->numberOfHits();
519  } else if (!usetracker && usemuon) {
520  nSimHits = tpr.get()->numberOfHits() - tpr.get()->numberOfTrackerHits();
521  } else if (usetracker && !usemuon) {
522  nSimHits = tpr.get()->numberOfTrackerHits();
523  }
524 
525  edm::LogVerbatim("MuonTrackValidator") << "--------------------Selected TrackingParticle #" << tpr.key()
526  << " (N counted simhits = " << nSimHits << ")";
527  edm::LogVerbatim("MuonTrackValidator")
528  << "momentumTP: pt = " << sqrt(momentumTP.perp2()) << ", pz = " << momentumTP.z()
529  << ", \t vertexTP: radius = " << sqrt(vertexTP.perp2()) << ", z = " << vertexTP.z();
530  st++;
531 
532  double TPeta = momentumTP.eta();
533  double xTPeta = getEta(TPeta); // may be |eta| in histos according to useFabsEta
534  double TPpt = sqrt(momentumTP.perp2());
535  double xTPpt = getPt(TPpt); // may be 1/pt in histos according to useInvPt
536  double TPphi = momentumTP.phi();
537  double TPrpos = sqrt(vertexTP.perp2());
538  double TPzpos = vertexTP.z();
539 
540  int assoc_recoTrack_NValidHits = 0;
541  if (simRecColl.find(tpr) != simRecColl.end()) {
542  auto const& rt = simRecColl[tpr];
543  if (!rt.empty()) {
544  RefToBase<Track> assoc_recoTrack = rt.begin()->first;
545  TP_is_matched = true;
546  ats++;
547  if (assoc_recoTrack->charge() != tpr->charge())
548  isChargeOK = false;
549  quality = rt.begin()->second;
550  assoc_recoTrack_NValidHits = assoc_recoTrack->numberOfValidHits();
551  edm::LogVerbatim("MuonTrackValidator") << "-----------------------------associated to Track #"
552  << assoc_recoTrack.key() << " with quality:" << quality << "\n";
553  }
554  } else {
555  edm::LogVerbatim("MuonTrackValidator")
556  << "TrackingParticle #" << tpr.key() << " with pt,eta,phi: " << sqrt(momentumTP.perp2()) << " , "
557  << momentumTP.eta() << " , " << momentumTP.phi() << " , "
558  << " NOT associated to any reco::Track"
559  << "\n";
560  }
561 
562  // histos for efficiency vs eta
563  fillPlotNoFlow(h_simuleta[w], xTPeta);
564  if (TP_is_matched) {
565  fillPlotNoFlow(h_assoceta[w], xTPeta);
566  if (!isChargeOK)
567  fillPlotNoFlow(h_misideta[w], xTPeta);
568  }
569 
570  // histos for efficiency vs phi
571  fillPlotNoFlow(h_simulphi[w], TPphi);
572  if (TP_is_matched) {
573  fillPlotNoFlow(h_assocphi[w], TPphi);
574  if (!isChargeOK)
575  fillPlotNoFlow(h_misidphi[w], TPphi);
576  }
577 
578  // histos for efficiency vs pT
579  fillPlotNoFlow(h_simulpT[w], xTPpt);
580  if (TP_is_matched) {
581  fillPlotNoFlow(h_assocpT[w], xTPpt);
582  if (!isChargeOK)
583  fillPlotNoFlow(h_misidpT[w], xTPpt);
584  }
585 
586  // histos for efficiency vs dxy
587  fillPlotNoFlow(h_simuldxy[w], dxySim);
588  if (TP_is_matched) {
589  fillPlotNoFlow(h_assocdxy[w], dxySim);
590  if (!isChargeOK)
591  fillPlotNoFlow(h_misiddxy[w], dxySim);
592  }
593 
594  // histos for efficiency vs dz
595  fillPlotNoFlow(h_simuldz[w], dzSim);
596  if (TP_is_matched) {
597  fillPlotNoFlow(h_assocdz[w], dzSim);
598  if (!isChargeOK)
599  fillPlotNoFlow(h_misiddz[w], dzSim);
600  }
601 
602  // histos for efficiency vs Radius
603  fillPlotNoFlow(h_simulRpos[w], TPrpos);
604  if (TP_is_matched)
605  fillPlotNoFlow(h_assocRpos[w], TPrpos);
606 
607  // histos for efficiency vs z position
608  fillPlotNoFlow(h_simulZpos[w], TPzpos);
609  if (TP_is_matched)
610  fillPlotNoFlow(h_assocZpos[w], TPzpos);
611 
612  // histos for efficiency vs Number of Hits
613  fillPlotNoFlow(h_simulhit[w], nSimHits);
614  if (TP_is_matched) {
615  fillPlotNoFlow(h_assochit[w], nSimHits);
616  nRecHits_vs_nSimHits[w]->Fill(nSimHits, assoc_recoTrack_NValidHits);
617 
618  // charge misid is more useful w.r.t. nRecHits (filled after)
619  //if (!isChargeOK) fillPlotNoFlow(h_misidhit[w], nSimHits);
620  }
621 
622  // histos for efficiency vs PileUp
623  fillPlotNoFlow(h_simulpu[w], PU_NumInteractions);
624  if (TP_is_matched) {
625  fillPlotNoFlow(h_assocpu[w], PU_NumInteractions);
626  if (!isChargeOK)
627  fillPlotNoFlow(h_misidpu[w], PU_NumInteractions);
628  }
629 
630  } // End for (size_t i = 0; i < tPCeff.size(); i++) {
631 
632  //
633  //fill reconstructed track histograms
634  //
635  edm::LogVerbatim("MuonTrackValidator")
636  << "\n# of reco::Tracks with " << label[www].process() << ":" << label[www].label() << ":"
637  << label[www].instance() << ": " << trackCollectionSize << "\n";
638 
639  int at = 0;
640  int rT = 0;
641  for (edm::View<Track>::size_type i = 0; i < trackCollectionSize; ++i) {
642  bool Track_is_matched = false;
643  bool isChargeOK = true;
645  int nRecHits = track->numberOfValidHits();
646  rT++;
647 
648  std::vector<std::pair<TrackingParticleRef, double> > tp;
650 
651  // new logic (bidirectional)
653  edm::LogVerbatim("MuonTrackValidator") << "----------------------------------------Track #" << track.key()
654  << " (N valid rechits = " << nRecHits << ")";
655 
656  if (recSimColl.find(track) != recSimColl.end()) {
657  tp = recSimColl[track];
658  if (!tp.empty()) {
659  tpr = tp.begin()->first;
660  // RtS and StR must associate the same pair !
661  if (simRecColl.find(tpr) != simRecColl.end()) {
662  auto const& assoc_track_checkback = simRecColl[tpr].begin()->first;
663 
664  if (assoc_track_checkback.key() == track.key()) {
665  Track_is_matched = true;
666  at++;
667  if (track->charge() != tpr->charge())
668  isChargeOK = false;
669  double Purity = tp.begin()->second;
670  double Quality = simRecColl[tpr].begin()->second;
671  edm::LogVerbatim("MuonTrackValidator")
672  << "with pt=" << track->pt() << " associated with purity:" << Purity << " to TrackingParticle #"
673  << tpr.key() << "\n";
674  if (MABH)
675  h_PurityVsQuality[w]->Fill(Quality, Purity);
676  }
677  }
678  }
679  }
680 
681  if (!Track_is_matched)
682  edm::LogVerbatim("MuonTrackValidator")
683  << "with pt=" << track->pt() << " NOT associated to any TrackingParticle"
684  << "\n";
685  }
686  // old logic, valid for cosmics 2-legs reco (bugged for collision scenario)
687  else {
688  if (recSimColl.find(track) != recSimColl.end()) {
689  tp = recSimColl[track];
690  if (!tp.empty()) {
691  tpr = tp.begin()->first;
692  Track_is_matched = true;
693  at++;
694  if (track->charge() != tpr->charge())
695  isChargeOK = false;
696  edm::LogVerbatim("MuonTrackValidator") << "reco::Track #" << track.key() << " with pt=" << track->pt()
697  << " associated with quality:" << tp.begin()->second << "\n";
698  }
699  } else {
700  edm::LogVerbatim("MuonTrackValidator") << "reco::Track #" << track.key() << " with pt=" << track->pt()
701  << " NOT associated to any TrackingParticle"
702  << "\n";
703  }
704  }
705 
706  double etaRec = track->eta();
707  double xetaRec = getEta(etaRec);
708 
709  double ptRec = track->pt();
710  double xptRec = getPt(ptRec);
711 
712  double qoverpRec = track->qoverp();
713  double phiRec = track->phi();
714  double thetaRec = track->theta();
715  double dxyRec = track->dxy(bs.position());
716  double dzRec = track->dz(bs.position());
717 
718  double qoverpError = track->qoverpError();
719  double ptError = track->ptError();
720  double thetaError = track->thetaError();
721  double phiError = track->phiError();
722  double dxyError = track->dxyError();
723  double dzError = track->dzError();
724 
725  // histos for fake rate vs eta
726  fillPlotNoFlow(h_recoeta[w], xetaRec);
727  if (Track_is_matched) {
728  fillPlotNoFlow(h_assoc2eta[w], xetaRec);
729  }
730 
731  // histos for fake rate vs phi
732  fillPlotNoFlow(h_recophi[w], phiRec);
733  if (Track_is_matched) {
734  fillPlotNoFlow(h_assoc2phi[w], phiRec);
735  }
736 
737  // histos for fake rate vs pT
738  fillPlotNoFlow(h_recopT[w], xptRec);
739  if (Track_is_matched) {
740  fillPlotNoFlow(h_assoc2pT[w], xptRec);
741  }
742 
743  // histos for fake rate vs dxy
744  fillPlotNoFlow(h_recodxy[w], dxyRec);
745  if (Track_is_matched) {
746  fillPlotNoFlow(h_assoc2dxy[w], dxyRec);
747  }
748 
749  // histos for fake rate vs dz
750  fillPlotNoFlow(h_recodz[w], dzRec);
751  if (Track_is_matched) {
752  fillPlotNoFlow(h_assoc2dz[w], dzRec);
753  }
754 
755  // histos for fake rate vs Number of RecHits in track
756  fillPlotNoFlow(h_recohit[w], nRecHits);
757  if (Track_is_matched) {
758  fillPlotNoFlow(h_assoc2hit[w], nRecHits);
759  // charge misid w.r.t. nRecHits
760  if (!isChargeOK)
761  fillPlotNoFlow(h_misidhit[w], nRecHits);
762  }
763 
764  // histos for fake rate vs Number of PU interactions
765  fillPlotNoFlow(h_recopu[w], PU_NumInteractions);
766  if (Track_is_matched) {
767  fillPlotNoFlow(h_assoc2pu[w], PU_NumInteractions);
768  }
769 
770  // Fill other histos
771  TrackingParticle* tpp = const_cast<TrackingParticle*>(tpr.get());
772  // TrackingParticle parameters at point of closest approach to the beamline
773  TrackingParticle::Vector momentumTP;
774  TrackingParticle::Point vertexTP;
775 
776  if (parametersDefiner == "LhcParametersDefinerForTP") {
777  // following reco plots are made only from tracks associated to selected signal TPs
778  if (!(Track_is_matched && tpSelector(*tpp)))
779  continue;
780  else {
781  momentumTP = lhcParametersDefinerTP_->momentum(event, setup, tpr);
782  vertexTP = lhcParametersDefinerTP_->vertex(event, setup, tpr);
783  }
784  } else if (parametersDefiner == "CosmicParametersDefinerForTP") {
785  // following reco plots are made only from tracks associated to selected signal TPs
786  if (!(Track_is_matched && cosmictpSelector(tpr, &bs, event, setup)))
787  continue;
788  else {
789  momentumTP = cosmicParametersDefinerTP_->momentum(event, setup, tpr);
790  vertexTP = cosmicParametersDefinerTP_->vertex(event, setup, tpr);
791  }
792  }
793 
794  if (associators[ww] == "trackAssociatorByChi2") {
795  //association chi2
796  double assocChi2 = -tp.begin()->second; //in association map is stored -chi2
797  h_assochi2[www]->Fill(assocChi2);
798  h_assochi2_prob[www]->Fill(TMath::Prob((assocChi2)*5, 5));
799  } else if (associators[ww] == "trackAssociatorByHits") {
800  double fraction = tp.begin()->second;
801  h_assocFraction[www]->Fill(fraction);
802  h_assocSharedHit[www]->Fill(fraction * nRecHits);
803  }
804 
805  h_charge[w]->Fill(track->charge());
806 
807  // Hits
808  h_nhits[w]->Fill(nRecHits);
809  nhits_vs_eta[w]->Fill(xetaRec, nRecHits);
810  nhits_vs_phi[w]->Fill(phiRec, nRecHits);
811 
812  if (do_MUOhitsPlots) {
813  nDThits_vs_eta[w]->Fill(xetaRec, track->hitPattern().numberOfValidMuonDTHits());
814  nCSChits_vs_eta[w]->Fill(xetaRec, track->hitPattern().numberOfValidMuonCSCHits());
815  nRPChits_vs_eta[w]->Fill(xetaRec, track->hitPattern().numberOfValidMuonRPCHits());
816  if (useGEMs_)
817  nGEMhits_vs_eta[w]->Fill(xetaRec, track->hitPattern().numberOfValidMuonGEMHits());
818  if (useME0_)
819  nME0hits_vs_eta[w]->Fill(xetaRec, track->hitPattern().numberOfValidMuonME0Hits());
820  }
821 
822  if (do_TRKhitsPlots) {
823  nTRK_LayersWithMeas_vs_eta[w]->Fill(xetaRec, track->hitPattern().trackerLayersWithMeasurement());
824  nPixel_LayersWithMeas_vs_eta[w]->Fill(xetaRec, track->hitPattern().pixelLayersWithMeasurement());
825  h_nlosthits[w]->Fill(track->numberOfLostHits());
826  h_nmisslayers_inner[w]->Fill(track->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS));
827  h_nmisslayers_outer[w]->Fill(track->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_OUTER_HITS));
828  nlosthits_vs_eta[w]->Fill(xetaRec, track->numberOfLostHits());
829  }
830 
831  // normalized chi2
832  h_nchi2[w]->Fill(track->normalizedChi2());
833  h_nchi2_prob[w]->Fill(TMath::Prob(track->chi2(), (int)track->ndof()));
834  chi2_vs_nhits[w]->Fill(nRecHits, track->normalizedChi2());
835  chi2_vs_eta[w]->Fill(xetaRec, track->normalizedChi2());
836  chi2_vs_phi[w]->Fill(phiRec, track->normalizedChi2());
837 
838  double ptSim = sqrt(momentumTP.perp2());
839  double xptSim = getPt(ptSim);
840  double qoverpSim = tpr->charge() / sqrt(momentumTP.x() * momentumTP.x() + momentumTP.y() * momentumTP.y() +
841  momentumTP.z() * momentumTP.z());
842  double etaSim = momentumTP.eta();
843  double thetaSim = momentumTP.theta();
844  double phiSim = momentumTP.phi();
845  double dxySim = TrackingParticleIP::dxy(vertexTP, momentumTP, bs.position());
846  double dzSim = TrackingParticleIP::dz(vertexTP, momentumTP, bs.position());
847 
848  double etares = etaRec - etaSim;
849  double ptRelRes = (ptRec - ptSim) / ptSim; // relative residual -> resolution
850  double ptPull = (ptRec - ptSim) / ptError;
851  double qoverpPull = (qoverpRec - qoverpSim) / qoverpError;
852  double thetaPull = (thetaRec - thetaSim) / thetaError;
853  double phiDiff = phiRec - phiSim;
854  if (abs(phiDiff) > M_PI) {
855  if (phiDiff > 0.)
856  phiDiff = phiDiff - 2. * M_PI;
857  else
858  phiDiff = phiDiff + 2. * M_PI;
859  }
860  double phiPull = phiDiff / phiError;
861  double dxyPull = (dxyRec - dxySim) / dxyError;
862  double dzPull = (dzRec - dzSim) / dzError;
863 
864  h_etaRes[w]->Fill(etares);
865  etares_vs_eta[w]->Fill(xetaRec, etares);
866 
867  ptres_vs_eta[w]->Fill(xetaRec, ptRelRes);
868  ptres_vs_pt[w]->Fill(xptSim, ptRelRes);
869  ptres_vs_phi[w]->Fill(phiRec, ptRelRes);
870  h_ptpull[w]->Fill(ptPull);
871  ptpull_vs_eta[w]->Fill(xetaRec, ptPull);
872  ptpull_vs_phi[w]->Fill(phiRec, ptPull);
873  h_qoverppull[w]->Fill(qoverpPull);
874 
875  thetaCotres_vs_eta[w]->Fill(xetaRec, cos(thetaRec) / sin(thetaRec) - cos(thetaSim) / sin(thetaSim));
876  thetaCotres_vs_pt[w]->Fill(xptSim, cos(thetaRec) / sin(thetaRec) - cos(thetaSim) / sin(thetaSim));
877  h_thetapull[w]->Fill(thetaPull);
878  thetapull_vs_eta[w]->Fill(xetaRec, thetaPull);
879  thetapull_vs_phi[w]->Fill(phiRec, thetaPull);
880 
881  phires_vs_eta[w]->Fill(xetaRec, phiDiff);
882  phires_vs_pt[w]->Fill(xptSim, phiDiff);
883  phires_vs_phi[w]->Fill(phiRec, phiDiff);
884  h_phipull[w]->Fill(phiPull);
885  phipull_vs_eta[w]->Fill(xetaRec, phiPull);
886  phipull_vs_phi[w]->Fill(phiRec, phiPull);
887 
888  dxyres_vs_eta[w]->Fill(xetaRec, dxyRec - dxySim);
889  dxyres_vs_pt[w]->Fill(xptSim, dxyRec - dxySim);
890  h_dxypull[w]->Fill(dxyPull);
891  dxypull_vs_eta[w]->Fill(xetaRec, dxyPull);
892 
893  dzres_vs_eta[w]->Fill(xetaRec, dzRec - dzSim);
894  dzres_vs_pt[w]->Fill(xptSim, dzRec - dzSim);
895  h_dzpull[w]->Fill(dzPull);
896  dzpull_vs_eta[w]->Fill(xetaRec, dzPull);
897 
898  double contrib_Qoverp = qoverpPull * qoverpPull / 5;
899  double contrib_dxy = dxyPull * dxyPull / 5;
900  double contrib_dz = dzPull * dzPull / 5;
901  double contrib_theta = thetaPull * thetaPull / 5;
902  double contrib_phi = phiPull * phiPull / 5;
903  double assoChi2 = contrib_Qoverp + contrib_dxy + contrib_dz + contrib_theta + contrib_phi;
904 
905  LogTrace("MuonTrackValidator") << "normalized Chi2 (track 5-dofs matching) = " << assoChi2 << "\n"
906  << "\t contrib_Qoverp = " << contrib_Qoverp << "\n"
907  << "\t contrib_theta = " << contrib_theta << "\n"
908  << "\t contrib_phi = " << contrib_phi << "\n"
909  << "\t contrib_dxy = " << contrib_dxy << "\n"
910  << "\t contrib_dz = " << contrib_dz << "\n";
911 
912  LogTrace("MuonTrackValidator") << "ptRec = " << ptRec << "\n"
913  << "etaRec = " << etaRec << "\n"
914  << "qoverpRec = " << qoverpRec << "\n"
915  << "thetaRec = " << thetaRec << "\n"
916  << "phiRec = " << phiRec << "\n"
917  << "dxyRec = " << dxyRec << "\n"
918  << "dzRec = " << dzRec << "\n"
919  << ""
920  << "\n"
921  << "qoverpError = " << qoverpError << "\n"
922  << "thetaError = " << thetaError << "\n"
923  << "phiError = " << phiError << "\n"
924  << "dxyError = " << dxyError << "\n"
925  << "dzError = " << dzError << "\n"
926  << ""
927  << "\n"
928  << "ptSim = " << ptSim << "\n"
929  << "etaSim = " << etaSim << "\n"
930  << "qoverpSim = " << qoverpSim << "\n"
931  << "thetaSim = " << thetaSim << "\n"
932  << "phiSim = " << phiSim << "\n"
933  << "dxySim = " << dxySim << "\n"
934  << "dzSim = " << dzSim << "\n";
935  } // End of for(edm::View<Track>::size_type i=0; i<trackCollectionSize; ++i) {
936 
937  h_tracks[w]->Fill(at);
938  h_fakes[w]->Fill(rT - at);
939  edm::LogVerbatim("MuonTrackValidator") << "Total Simulated: " << st << "\n"
940  << "Total Associated (simToReco): " << ats << "\n"
941  << "Total Reconstructed: " << rT << "\n"
942  << "Total Associated (recoToSim): " << at << "\n"
943  << "Total Fakes: " << rT - at << "\n";
944  w++;
945  } // End of for (unsigned int www=0;www<label.size();www++){
946  } //END of for (unsigned int ww=0;ww<associators.size();ww++){
947 }
Log< level::Info, true > LogVerbatim
unsigned int size_type
Definition: View.h:90
Vector momentum() const
spatial momentum vector
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:798
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
T w() const
constexpr uint32_t maxLayers
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T const * product() const
Definition: Handle.h:70
def replace(string, replacements)
minPt
Definition: PV_cfg.py:223
float getEta(float r, float z)
Definition: Hit.h:38
key_type key() const
Accessor for product key.
Definition: Ref.h:250
const_iterator find(const key_type &k) const
find element with specified reference key
#define LogTrace(id)
const_iterator end() const
last iterator over the map (read only)
math::XYZPointD Point
point in the space
char const * label
string quality
int charge() const
track electric charge
Definition: TrackBase.h:596
auto dz(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
void post_insert()
post insert action
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
trackCollection
Definition: JetHT_cfg.py:51
#define M_PI
Log< level::Info, false > LogInfo
size_t key() const
Definition: RefToBase.h:219
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
maxPt
Definition: PV_cfg.py:224
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 bookHistograms(DQMEDAnalyzer::DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const_iterator begin() const
first iterator over the map (read only)
fixed size matrix
HLT enums.
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
void analyze(const edm::Event &, const edm::EventSetup &) override
Monte Carlo truth information used for tracking validation.
math::XYZVectorD Vector
point in the space
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::Ref< TrackingParticleCollection > TrackingParticleRef
Definition: event.py:1
Definition: Run.h:45