CMS 3D CMS Logo

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