CMS 3D CMS Logo

MTVHistoProducerAlgoForTracker.cc
Go to the documentation of this file.
4 
9 
11 
12 #include "TMath.h"
13 #include <TF1.h>
14 #include <cassert>
15 
16 using namespace std;
17 
18 namespace {
20 
21  void BinLogX(TH1* h) {
22  TAxis* axis = h->GetXaxis();
23  int bins = axis->GetNbins();
24 
25  float from = axis->GetXmin();
26  float to = axis->GetXmax();
27  float width = (to - from) / bins;
28  std::vector<float> new_bins(bins + 1, 0);
29 
30  for (int i = 0; i <= bins; i++) {
31  new_bins[i] = TMath::Power(10, from + i * width);
32  }
33  axis->Set(bins, new_bins.data());
34  }
35 
36  void BinLogY(TH1* h) {
37  TAxis* axis = h->GetYaxis();
38  int bins = axis->GetNbins();
39 
40  float from = axis->GetXmin();
41  float to = axis->GetXmax();
42  float width = (to - from) / bins;
43  std::vector<float> new_bins(bins + 1, 0);
44 
45  for (int i = 0; i <= bins; i++) {
46  new_bins[i] = TMath::Power(10, from + i * width);
47  }
48  axis->Set(bins, new_bins.data());
49  }
50 
51  template <typename... Args>
52  dqm::reco::MonitorElement* make1DIfLogX(DQMStore::IBooker& ibook, bool logx, Args&&... args) {
53  auto h = std::make_unique<TH1F>(std::forward<Args>(args)...);
54  if (logx)
55  BinLogX(h.get());
56  const auto& name = h->GetName();
57  return ibook.book1D(name, h.release());
58  }
59 
60  template <typename... Args>
61  dqm::reco::MonitorElement* makeProfileIfLogX(DQMStore::IBooker& ibook, bool logx, Args&&... args) {
62  auto h = std::make_unique<TProfile>(std::forward<Args>(args)...);
63  if (logx)
64  BinLogX(h.get());
65  const auto& name = h->GetName();
66  return ibook.bookProfile(name, h.release());
67  }
68 
69  template <typename... Args>
70  dqm::reco::MonitorElement* make2DIfLogX(DQMStore::IBooker& ibook, bool logx, Args&&... args) {
71  auto h = std::make_unique<TH2F>(std::forward<Args>(args)...);
72  if (logx)
73  BinLogX(h.get());
74  const auto& name = h->GetName();
75  return ibook.book2D(name, h.release());
76  }
77 
78  template <typename... Args>
79  dqm::reco::MonitorElement* make2DIfLogY(DQMStore::IBooker& ibook, bool logy, Args&&... args) {
80  auto h = std::make_unique<TH2F>(std::forward<Args>(args)...);
81  if (logy)
82  BinLogY(h.get());
83  const auto& name = h->GetName();
84  return ibook.book2D(name, h.release());
85  }
86 
87  void setBinLabels(dqm::reco::MonitorElement*& h, const std::vector<std::string>& labels) {
88  for (size_t i = 0; i < labels.size(); ++i) {
89  h->setBinLabel(i + 1, labels[i]);
90  }
91  h->disableAlphanumeric();
92  }
93 
94  void setBinLabelsAlgo(dqm::reco::MonitorElement*& h, int axis = 1) {
95  for (size_t i = 0; i < reco::TrackBase::algoSize; ++i) {
96  h->setBinLabel(i + 1, reco::TrackBase::algoName(static_cast<reco::TrackBase::TrackAlgorithm>(i)), axis);
97  }
98  h->disableAlphanumeric();
99  }
100 
101  void fillMVAHistos(const std::vector<dqm::reco::MonitorElement*>& h_mva,
102  const std::vector<dqm::reco::MonitorElement*>& h_mvacut,
103  const std::vector<dqm::reco::MonitorElement*>& h_mva_hp,
104  const std::vector<dqm::reco::MonitorElement*>& h_mvacut_hp,
105  const std::vector<float>& mvas,
106  unsigned int selectsLoose,
107  unsigned int selectsHP) {
108  // Fill MVA1 histos with all tracks, MVA2 histos only with tracks
109  // not selected by MVA1, etc.
110  for (size_t i = 0; i < mvas.size(); ++i) {
111  if (i <= selectsLoose) {
112  h_mva[i]->Fill(mvas[i]);
113  h_mvacut[i]->Fill(mvas[i]);
114  }
115  if (i >= 1 && i <= selectsHP) {
116  h_mva_hp[i]->Fill(mvas[i]);
117  h_mvacut_hp[i]->Fill(mvas[i]);
118  }
119  }
120  }
121 
122  void fillMVAHistos(double xval,
123  const std::vector<dqm::reco::MonitorElement*>& h_mva,
124  const std::vector<dqm::reco::MonitorElement*>& h_mva_hp,
125  const std::vector<float>& mvas,
126  unsigned int selectsLoose,
127  unsigned int selectsHP) {
128  // Fill MVA1 histos with all tracks, MVA2 histos only with tracks
129  // not selected by MVA1, etc.
130  for (size_t i = 0; i < mvas.size(); ++i) {
131  if (i <= selectsLoose) {
132  h_mva[i]->Fill(xval, mvas[i]);
133  }
134  if (i >= 1 && i <= selectsHP) {
135  h_mva_hp[i]->Fill(xval, mvas[i]);
136  }
137  }
138  }
139 } // namespace
140 
142  : doSeedPlots_(doSeedPlots), doMTDPlots_(pset.getUntrackedParameter<bool>("doMTDPlots")) {
143  //parameters for _vs_eta plots
144  minEta = pset.getParameter<double>("minEta");
145  maxEta = pset.getParameter<double>("maxEta");
146  nintEta = pset.getParameter<int>("nintEta");
147  useFabsEta = pset.getParameter<bool>("useFabsEta");
148 
149  //parameters for _vs_pt plots
150  minPt = pset.getParameter<double>("minPt");
151  maxPt = pset.getParameter<double>("maxPt");
152  nintPt = pset.getParameter<int>("nintPt");
153  useInvPt = pset.getParameter<bool>("useInvPt");
154  useLogPt = pset.getUntrackedParameter<bool>("useLogPt", false);
155 
156  //parameters for _vs_Hit plots
157  minHit = pset.getParameter<double>("minHit");
158  maxHit = pset.getParameter<double>("maxHit");
159  nintHit = pset.getParameter<int>("nintHit");
160 
161  //parameters for _vs_Pu plots
162  minPu = pset.getParameter<double>("minPu");
163  maxPu = pset.getParameter<double>("maxPu");
164  nintPu = pset.getParameter<int>("nintPu");
165 
166  //parameters for _vs_Layer plots
167  minLayers = pset.getParameter<double>("minLayers");
168  maxLayers = pset.getParameter<double>("maxLayers");
169  nintLayers = pset.getParameter<int>("nintLayers");
170 
171  //parameters for _vs_phi plots
172  minPhi = pset.getParameter<double>("minPhi");
173  maxPhi = pset.getParameter<double>("maxPhi");
174  nintPhi = pset.getParameter<int>("nintPhi");
175 
176  //parameters for _vs_Dxy plots
177  minDxy = pset.getParameter<double>("minDxy");
178  maxDxy = pset.getParameter<double>("maxDxy");
179  nintDxy = pset.getParameter<int>("nintDxy");
180 
181  //parameters for _vs_Dz plots
182  minDz = pset.getParameter<double>("minDz");
183  maxDz = pset.getParameter<double>("maxDz");
184  nintDz = pset.getParameter<int>("nintDz");
185 
186  dxyDzZoom = pset.getParameter<double>("dxyDzZoom");
187 
188  //parameters for _vs_ProductionVertexTransvPosition plots
189  minVertpos = pset.getParameter<double>("minVertpos");
190  maxVertpos = pset.getParameter<double>("maxVertpos");
191  nintVertpos = pset.getParameter<int>("nintVertpos");
192  useLogVertpos = pset.getUntrackedParameter<bool>("useLogVertpos");
193 
194  //parameters for _vs_ProductionVertexZPosition plots
195  minZpos = pset.getParameter<double>("minZpos");
196  maxZpos = pset.getParameter<double>("maxZpos");
197  nintZpos = pset.getParameter<int>("nintZpos");
198 
199  //parameters for _vs_dR plots
200  mindr = pset.getParameter<double>("mindr");
201  maxdr = pset.getParameter<double>("maxdr");
202  nintdr = pset.getParameter<int>("nintdr");
203 
204  //parameters for _vs_dR_jet plots
205  mindrj = pset.getParameter<double>("mindrj");
206  maxdrj = pset.getParameter<double>("maxdrj");
207  nintdrj = pset.getParameter<int>("nintdrj");
208 
209  // paramers for _vs_chi2 plots
210  minChi2 = pset.getParameter<double>("minChi2");
211  maxChi2 = pset.getParameter<double>("maxChi2");
212  nintChi2 = pset.getParameter<int>("nintChi2");
213 
214  //parameters for dE/dx plots
215  minDeDx = pset.getParameter<double>("minDeDx");
216  maxDeDx = pset.getParameter<double>("maxDeDx");
217  nintDeDx = pset.getParameter<int>("nintDeDx");
218 
219  //parameters for Pileup plots
220  minVertcount = pset.getParameter<double>("minVertcount");
221  maxVertcount = pset.getParameter<double>("maxVertcount");
222  nintVertcount = pset.getParameter<int>("nintVertcount");
223 
224  //parameters for number of tracks plots
225  minTracks = pset.getParameter<double>("minTracks");
226  maxTracks = pset.getParameter<double>("maxTracks");
227  nintTracks = pset.getParameter<int>("nintTracks");
228 
229  //parameters for vs. PV z plots
230  minPVz = pset.getParameter<double>("minPVz");
231  maxPVz = pset.getParameter<double>("maxPVz");
232  nintPVz = pset.getParameter<int>("nintPVz");
233 
234  //parameters for vs. MVA plots
235  minMVA = pset.getParameter<double>("minMVA");
236  maxMVA = pset.getParameter<double>("maxMVA");
237  nintMVA = pset.getParameter<int>("nintMVA");
238 
239  //parameters for resolution plots
240  ptRes_rangeMin = pset.getParameter<double>("ptRes_rangeMin");
241  ptRes_rangeMax = pset.getParameter<double>("ptRes_rangeMax");
242  ptRes_nbin = pset.getParameter<int>("ptRes_nbin");
243 
244  phiRes_rangeMin = pset.getParameter<double>("phiRes_rangeMin");
245  phiRes_rangeMax = pset.getParameter<double>("phiRes_rangeMax");
246  phiRes_nbin = pset.getParameter<int>("phiRes_nbin");
247 
248  cotThetaRes_rangeMin = pset.getParameter<double>("cotThetaRes_rangeMin");
249  cotThetaRes_rangeMax = pset.getParameter<double>("cotThetaRes_rangeMax");
250  cotThetaRes_nbin = pset.getParameter<int>("cotThetaRes_nbin");
251 
252  dxyRes_rangeMin = pset.getParameter<double>("dxyRes_rangeMin");
253  dxyRes_rangeMax = pset.getParameter<double>("dxyRes_rangeMax");
254  dxyRes_nbin = pset.getParameter<int>("dxyRes_nbin");
255 
256  dzRes_rangeMin = pset.getParameter<double>("dzRes_rangeMin");
257  dzRes_rangeMax = pset.getParameter<double>("dzRes_rangeMax");
258  dzRes_nbin = pset.getParameter<int>("dzRes_nbin");
259 
260  maxDzpvCum = pset.getParameter<double>("maxDzpvCumulative");
261  nintDzpvCum = pset.getParameter<int>("nintDzpvCumulative");
262 
263  maxDzpvsigCum = pset.getParameter<double>("maxDzpvsigCumulative");
264  nintDzpvsigCum = pset.getParameter<int>("nintDzpvsigCumulative");
265 
266  //--- tracking particle selectors for efficiency measurements
267  using namespace edm;
268  using namespace reco::modules;
269  auto initTPselector = [&](auto& sel, auto& name) {
270  sel = std::make_unique<TrackingParticleSelector>(
272  };
273  auto initTrackSelector = [&](auto& sel, auto& name) {
275  };
276  auto initGPselector = [&](auto& sel, auto& name) {
277  sel = std::make_unique<GenParticleCustomSelector>(
279  };
280 
281  initTPselector(generalTpSelector, "generalTpSelector");
282  initTPselector(TpSelectorForEfficiencyVsEta, "TpSelectorForEfficiencyVsEta");
283  initTPselector(TpSelectorForEfficiencyVsPhi, "TpSelectorForEfficiencyVsPhi");
284  initTPselector(TpSelectorForEfficiencyVsPt, "TpSelectorForEfficiencyVsPt");
285  initTPselector(TpSelectorForEfficiencyVsVTXR, "TpSelectorForEfficiencyVsVTXR");
286  initTPselector(TpSelectorForEfficiencyVsVTXZ, "TpSelectorForEfficiencyVsVTXZ");
287 
288  initTrackSelector(trackSelectorVsEta, "TpSelectorForEfficiencyVsEta");
289  initTrackSelector(trackSelectorVsPhi, "TpSelectorForEfficiencyVsPhi");
290  initTrackSelector(trackSelectorVsPt, "TpSelectorForEfficiencyVsPt");
291 
292  initGPselector(generalGpSelector, "generalGpSelector");
293  initGPselector(GpSelectorForEfficiencyVsEta, "GpSelectorForEfficiencyVsEta");
294  initGPselector(GpSelectorForEfficiencyVsPhi, "GpSelectorForEfficiencyVsPhi");
295  initGPselector(GpSelectorForEfficiencyVsPt, "GpSelectorForEfficiencyVsPt");
296  initGPselector(GpSelectorForEfficiencyVsVTXR, "GpSelectorForEfficiencyVsVTXR");
297  initGPselector(GpSelectorForEfficiencyVsVTXZ, "GpSelectorForEfficiencyVsVTXZ");
298 
299  // SeedingLayerSets
300  // If enabled, use last bin to denote other or unknown cases
301  seedingLayerSetNames = pset.getParameter<std::vector<std::string>>("seedingLayerSets");
302  std::vector<std::pair<SeedingLayerSetId, std::string>> stripPairSets;
303  if (!seedingLayerSetNames.empty()) {
304  std::vector<std::vector<std::string>> layerSets = SeedingLayerSetsBuilder::layerNamesInSets(seedingLayerSetNames);
305  for (size_t i = 0; i < layerSets.size(); ++i) {
306  const auto& layerSet = layerSets[i];
307  if (layerSet.size() > std::tuple_size<SeedingLayerSetId>::value) {
308  throw cms::Exception("Configuration")
309  << "Got seedingLayerSet " << seedingLayerSetNames[i] << " with " << layerSet.size()
310  << " elements, but I have a hard-coded maximum of " << std::tuple_size<SeedingLayerSetId>::value
311  << ". Please increase the maximum in MTVHistoProducerAlgoForTracker.h";
312  }
313  SeedingLayerSetId setId;
314  for (size_t j = 0; j < layerSet.size(); ++j) {
315  // SeedingLayerSetsBuilder::fillDescriptions() kind-of
316  // suggests that the 'M' prefix stands for strip mono hits
317  // (maybe it should force), so making the assumption here is
318  // (still) a bit ugly. But, this is the easiest way.
319  bool isStripMono = !layerSet[j].empty() && layerSet[j][0] == 'M';
320  setId[j] = std::make_tuple(SeedingLayerSetsBuilder::nameToEnumId(layerSet[j]), isStripMono);
321  }
322  // Account for the fact that strip triplet seeding may give pairs
323  if (layerSet.size() == 3 && isTrackerStrip(std::get<GeomDetEnumerators::SubDetector>(std::get<0>(setId[0])))) {
324  SeedingLayerSetId pairId;
325  pairId[0] = setId[0];
326  pairId[1] = setId[1];
327  stripPairSets.emplace_back(pairId, layerSet[0] + "+" + layerSet[1]);
328  }
329 
330  auto inserted = seedingLayerSetToBin.insert(std::make_pair(setId, i));
331  if (!inserted.second)
332  throw cms::Exception("Configuration") << "SeedingLayerSet " << seedingLayerSetNames[i]
333  << " is specified twice, while the set list should be unique.";
334  }
335 
336  // Add the "strip pairs from strip triplets" if they don't otherwise exist
337  for (const auto& setIdName : stripPairSets) {
338  auto inserted = seedingLayerSetToBin.insert(std::make_pair(setIdName.first, seedingLayerSetNames.size()));
339  if (inserted.second)
340  seedingLayerSetNames.push_back(setIdName.second);
341  }
342 
343  seedingLayerSetNames.emplace_back("Other/Unknown");
344  }
345 
346  // fix for the LogScale by Ryan
347  if (useLogPt) {
348  maxPt = log10(maxPt);
349  if (minPt > 0) {
350  minPt = log10(minPt);
351  } else {
352  edm::LogWarning("MultiTrackValidator")
353  << "minPt = " << minPt << " <= 0 out of range while requesting log scale. Using minPt = 0.1.";
354  minPt = log10(0.1);
355  }
356  }
357  if (useLogVertpos) {
358  maxVertpos = std::log10(maxVertpos);
359  if (minVertpos > 0) {
360  minVertpos = std::log10(minVertpos);
361  } else {
362  edm::LogWarning("MultiTrackValidator")
363  << "minVertpos = " << minVertpos << " <= 0 out of range while requesting log scale. Using minVertpos = 0.1.";
364  minVertpos = -1;
365  }
366  }
367 }
368 
370 
372  const edm::ParameterSet& pset) {
373  edm::ParameterSet psetTrack;
374  psetTrack.copyForModify(pset);
375  psetTrack.eraseSimpleParameter("minHit");
376  psetTrack.eraseSimpleParameter("signalOnly");
377  psetTrack.eraseSimpleParameter("intimeOnly");
378  psetTrack.eraseSimpleParameter("chargedOnly");
379  psetTrack.eraseSimpleParameter("stableOnly");
380  psetTrack.addParameter("maxChi2", 1e10);
381  psetTrack.addParameter("minHit", 0);
382  psetTrack.addParameter("minPixelHit", 0);
383  psetTrack.addParameter("minLayer", 0);
384  psetTrack.addParameter("min3DLayer", 0);
385  psetTrack.addParameter("quality", std::vector<std::string>{});
386  psetTrack.addParameter("algorithm", std::vector<std::string>{});
387  psetTrack.addParameter("originalAlgorithm", std::vector<std::string>{});
388  psetTrack.addParameter("algorithmMaskContains", std::vector<std::string>{});
389  psetTrack.addParameter("invertRapidityCut", false);
390  psetTrack.addParameter("minPhi", -3.2);
391  psetTrack.addParameter("maxPhi", 3.2);
392  return std::make_unique<RecoTrackSelectorBase>(psetTrack);
393 }
394 
396  histograms.h_ptSIM = make1DIfLogX(ibook, useLogPt, "ptSIM", "generated p_{t}", nintPt, minPt, maxPt);
397  histograms.h_etaSIM = ibook.book1D("etaSIM", "generated pseudorapidity", nintEta, minEta, maxEta);
398  histograms.h_phiSIM = ibook.book1D("phiSIM", "generated phi", nintPhi, minPhi, maxPhi);
399  histograms.h_tracksSIM =
400  ibook.book1D("tracksSIM", "number of simulated tracks", nintTracks, minTracks, maxTracks * 10);
401  histograms.h_vertposSIM =
402  ibook.book1D("vertposSIM", "Transverse position of sim vertices", nintVertpos, minVertpos, maxVertpos);
403  histograms.h_bunchxSIM = ibook.book1D("bunchxSIM", "bunch crossing", 21, -15.5, 5.5);
404 }
405 
408  bool doResolutionPlots) {
409  histograms.h_assoceta.push_back(
410  ibook.book1D("num_assoc(simToReco)_eta", "N of associated tracks (simToReco) vs eta", nintEta, minEta, maxEta));
411  histograms.h_simuleta.push_back(
412  ibook.book1D("num_simul_eta", "N of simulated tracks vs eta", nintEta, minEta, maxEta));
413 
414  histograms.h_assocpT.push_back(make1DIfLogX(
415  ibook, useLogPt, "num_assoc(simToReco)_pT", "N of associated tracks (simToReco) vs pT", nintPt, minPt, maxPt));
416  histograms.h_simulpT.push_back(
417  make1DIfLogX(ibook, useLogPt, "num_simul_pT", "N of simulated tracks vs pT", nintPt, minPt, maxPt));
418 
419  histograms.h_assocpTvseta.push_back(make2DIfLogY(ibook,
420  useLogPt,
421  "num_assoc(simToReco)_pTvseta",
422  "N of associated tracks (simToReco) in (pT-eta) please",
423  nintEta,
424  minEta,
425  maxEta,
426  nintPt,
427  minPt,
428  maxPt));
429  histograms.h_simulpTvseta.push_back(make2DIfLogY(ibook,
430  useLogPt,
431  "num_simul_pTvseta",
432  "N of simulated tracks in (pT-eta) plane",
433  nintEta,
434  minEta,
435  maxEta,
436  nintPt,
437  minPt,
438  maxPt));
439 
440  histograms.h_assochit.push_back(
441  ibook.book1D("num_assoc(simToReco)_hit", "N of associated tracks (simToReco) vs hit", nintHit, minHit, maxHit));
442  histograms.h_simulhit.push_back(
443  ibook.book1D("num_simul_hit", "N of simulated tracks vs hit", nintHit, minHit, maxHit));
444 
445  histograms.h_assoclayer.push_back(ibook.book1D(
446  "num_assoc(simToReco)_layer", "N of associated tracks (simToReco) vs layer", nintLayers, minLayers, maxLayers));
447  histograms.h_simullayer.push_back(
448  ibook.book1D("num_simul_layer", "N of simulated tracks vs layer", nintLayers, minLayers, maxLayers));
449 
450  histograms.h_assocpixellayer.push_back(ibook.book1D("num_assoc(simToReco)_pixellayer",
451  "N of associated tracks (simToReco) vs pixel layer",
452  nintLayers,
453  minLayers,
454  maxLayers));
455  histograms.h_simulpixellayer.push_back(
456  ibook.book1D("num_simul_pixellayer", "N of simulated tracks vs pixel layer", nintLayers, minLayers, maxLayers));
457 
458  histograms.h_assoc3Dlayer.push_back(ibook.book1D("num_assoc(simToReco)_3Dlayer",
459  "N of associated tracks (simToReco) vs 3D layer",
460  nintLayers,
461  minLayers,
462  maxLayers));
463  histograms.h_simul3Dlayer.push_back(
464  ibook.book1D("num_simul_3Dlayer", "N of simulated tracks vs 3D layer", nintLayers, minLayers, maxLayers));
465 
466  histograms.h_assocpu.push_back(
467  ibook.book1D("num_assoc(simToReco)_pu", "N of associated tracks (simToReco) vs pu", nintPu, minPu, maxPu));
468  histograms.h_simulpu.push_back(ibook.book1D("num_simul_pu", "N of simulated tracks vs pu", nintPu, minPu, maxPu));
469 
470  histograms.h_assocphi.push_back(
471  ibook.book1D("num_assoc(simToReco)_phi", "N of associated tracks (simToReco) vs phi", nintPhi, minPhi, maxPhi));
472  histograms.h_simulphi.push_back(
473  ibook.book1D("num_simul_phi", "N of simulated tracks vs phi", nintPhi, minPhi, maxPhi));
474 
475  histograms.h_assocdxy.push_back(
476  ibook.book1D("num_assoc(simToReco)_dxy", "N of associated tracks (simToReco) vs dxy", nintDxy, minDxy, maxDxy));
477  histograms.h_simuldxy.push_back(
478  ibook.book1D("num_simul_dxy", "N of simulated tracks vs dxy", nintDxy, minDxy, maxDxy));
479 
480  histograms.h_assocdz.push_back(
481  ibook.book1D("num_assoc(simToReco)_dz", "N of associated tracks (simToReco) vs dz", nintDz, minDz, maxDz));
482  histograms.h_simuldz.push_back(ibook.book1D("num_simul_dz", "N of simulated tracks vs dz", nintDz, minDz, maxDz));
483 
484  histograms.h_assocvertpos.push_back(make1DIfLogX(ibook,
486  "num_assoc(simToReco)_vertpos",
487  "N of associated tracks (simToReco) vs transverse vert position",
488  nintVertpos,
489  minVertpos,
490  maxVertpos));
491  histograms.h_simulvertpos.push_back(make1DIfLogX(ibook,
493  "num_simul_vertpos",
494  "N of simulated tracks vs transverse vert position",
495  nintVertpos,
496  minVertpos,
497  maxVertpos));
498 
499  histograms.h_assoczpos.push_back(ibook.book1D(
500  "num_assoc(simToReco)_zpos", "N of associated tracks (simToReco) vs z vert position", nintZpos, minZpos, maxZpos));
501  histograms.h_simulzpos.push_back(
502  ibook.book1D("num_simul_zpos", "N of simulated tracks vs z vert position", nintZpos, minZpos, maxZpos));
503 
504  histograms.h_assocdr.push_back(make1DIfLogX(ibook,
505  true,
506  "num_assoc(simToReco)_dr",
507  "N of associated tracks (simToReco) vs dR",
508  nintdr,
509  log10(mindr),
510  log10(maxdr)));
511  histograms.h_simuldr.push_back(
512  make1DIfLogX(ibook, true, "num_simul_dr", "N of simulated tracks vs dR", nintdr, log10(mindr), log10(maxdr)));
513 
514  histograms.h_assocdrj.push_back(make1DIfLogX(ibook,
515  true,
516  "num_assoc(simToReco)_drj",
517  "N of associated tracks (simToReco) vs dR(TP,jet)",
518  nintdrj,
519  log10(mindrj),
520  log10(maxdrj)));
521  histograms.h_simuldrj.push_back(make1DIfLogX(
522  ibook, true, "num_simul_drj", "N of simulated tracks vs dR(TP,jet)", nintdrj, log10(mindrj), log10(maxdrj)));
523 
524  histograms.h_simul_simpvz.push_back(
525  ibook.book1D("num_simul_simpvz", "N of simulated tracks vs. sim PV z", nintPVz, minPVz, maxPVz));
526  histograms.h_assoc_simpvz.push_back(ibook.book1D(
527  "num_assoc(simToReco)_simpvz", "N of associated tracks (simToReco) vs. sim PV z", nintPVz, minPVz, maxPVz));
528 
529  histograms.nrecHit_vs_nsimHit_sim2rec.push_back(doResolutionPlots ? ibook.book2D("nrecHit_vs_nsimHit_sim2rec",
530  "nrecHit vs nsimHit (Sim2RecAssoc)",
531  nintHit,
532  minHit,
533  maxHit,
534  nintHit,
535  minHit,
536  maxHit)
537  : nullptr);
538 
539  // TODO: use the dynamic track algo priority order also here
540  constexpr auto nalgos = reco::TrackBase::algoSize;
541  histograms.h_duplicates_oriAlgo_vs_oriAlgo.push_back(ibook.book2D("duplicates_oriAlgo_vs_oriAlgo",
542  "Duplicate tracks: originalAlgo vs originalAlgo",
543  nalgos,
544  0,
545  nalgos,
546  nalgos,
547  0,
548  nalgos));
549  setBinLabelsAlgo(histograms.h_duplicates_oriAlgo_vs_oriAlgo.back(), 1);
550  setBinLabelsAlgo(histograms.h_duplicates_oriAlgo_vs_oriAlgo.back(), 2);
551 }
552 
554  histograms.h_assocdxypv.push_back(ibook.book1D(
555  "num_assoc(simToReco)_dxypv", "N of associated tracks (simToReco) vs dxy(PV)", nintDxy, minDxy, maxDxy));
556  histograms.h_simuldxypv.push_back(
557  ibook.book1D("num_simul_dxypv", "N of simulated tracks vs dxy(PV)", nintDxy, minDxy, maxDxy));
558 
559  histograms.h_assocdzpv.push_back(
560  ibook.book1D("num_assoc(simToReco)_dzpv", "N of associated tracks (simToReco) vs dz(PV)", nintDz, minDz, maxDz));
561  histograms.h_simuldzpv.push_back(
562  ibook.book1D("num_simul_dzpv", "N of simulated tracks vs dz(PV)", nintDz, minDz, maxDz));
563 
564  histograms.h_assocdxypvzoomed.push_back(ibook.book1D("num_assoc(simToReco)_dxypv_zoomed",
565  "N of associated tracks (simToReco) vs dxy(PV)",
566  nintDxy,
567  minDxy / dxyDzZoom,
568  maxDxy / dxyDzZoom));
569  histograms.h_simuldxypvzoomed.push_back(ibook.book1D(
570  "num_simul_dxypv_zoomed", "N of simulated tracks vs dxy(PV)", nintDxy, minDxy / dxyDzZoom, maxDxy / dxyDzZoom));
571 
572  histograms.h_assocdzpvzoomed.push_back(ibook.book1D("num_assoc(simToReco)_dzpv_zoomed",
573  "N of associated tracks (simToReco) vs dz(PV)",
574  nintDz,
575  minDz / dxyDzZoom,
576  maxDz / dxyDzZoom));
577  histograms.h_simuldzpvzoomed.push_back(ibook.book1D(
578  "num_simul_dzpv_zoomed", "N of simulated tracks vs dz(PV)", nintDz, minDz / dxyDzZoom, maxDz / dxyDzZoom));
579 
580  histograms.h_assoc_dzpvcut.push_back(ibook.book1D(
581  "num_assoc(simToReco)_dzpvcut", "N of associated tracks (simToReco) vs dz(PV)", nintDzpvCum, 0, maxDzpvCum));
582  histograms.h_simul_dzpvcut.push_back(
583  ibook.book1D("num_simul_dzpvcut", "N of simulated tracks from sim PV", nintDzpvCum, 0, maxDzpvCum));
584  histograms.h_simul2_dzpvcut.push_back(ibook.book1D(
585  "num_simul2_dzpvcut", "N of simulated tracks (associated to any track) from sim PV", nintDzpvCum, 0, maxDzpvCum));
586 
587  histograms.h_assoc_dzpvsigcut.push_back(ibook.book1D("num_assoc(simToReco)_dzpvsigcut",
588  "N of associated tracks (simToReco) vs dz(PV)/dzError",
590  0,
591  maxDzpvsigCum));
592  histograms.h_simul_dzpvsigcut.push_back(ibook.book1D(
593  "num_simul_dzpvsigcut", "N of simulated tracks from sim PV/dzError", nintDzpvsigCum, 0, maxDzpvsigCum));
594  histograms.h_simul2_dzpvsigcut.push_back(
595  ibook.book1D("num_simul2_dzpvsigcut",
596  "N of simulated tracks (associated to any track) from sim PV/dzError",
598  0,
599  maxDzpvsigCum));
600 }
601 
604  bool doResolutionPlots) {
605  histograms.h_tracks.push_back(
606  ibook.book1D("tracks", "number of reconstructed tracks", nintTracks, minTracks, maxTracks));
607  histograms.h_fakes.push_back(ibook.book1D("fakes", "number of fake reco tracks", nintTracks, minTracks, maxTracks));
608  histograms.h_charge.push_back(ibook.book1D("charge", "charge", 3, -1.5, 1.5));
609 
610  histograms.h_hits.push_back(ibook.book1D("hits", "number of hits per track", nintHit, minHit, maxHit));
611  histograms.h_losthits.push_back(ibook.book1D("losthits", "number of lost hits per track", nintHit, minHit, maxHit));
612  histograms.h_nchi2.push_back(ibook.book1D("chi2", "normalized #chi^{2}", 200, 0, 20));
613  histograms.h_nchi2_prob.push_back(ibook.book1D("chi2_prob", "normalized #chi^{2} probability", 100, 0, 1));
614 
615  histograms.h_nmisslayers_inner.push_back(
616  ibook.book1D("missing_inner_layers", "number of missing inner layers", nintLayers, minLayers, maxLayers));
617  histograms.h_nmisslayers_outer.push_back(
618  ibook.book1D("missing_outer_layers", "number of missing outer layers", nintLayers, minLayers, maxLayers));
619 
620  histograms.h_algo.push_back(
621  ibook.book1D("h_algo", "Tracks by algo", reco::TrackBase::algoSize, 0., double(reco::TrackBase::algoSize)));
622  for (size_t ibin = 0; ibin < reco::TrackBase::algoSize - 1; ibin++)
623  histograms.h_algo.back()->setBinLabel(ibin + 1, reco::TrackBase::algoNames[ibin]);
624  histograms.h_algo.back()->disableAlphanumeric();
625 
627  histograms.h_recoeta.push_back(ibook.book1D("num_reco_eta", "N of reco track vs eta", nintEta, minEta, maxEta));
628  histograms.h_reco2eta.push_back(
629  ibook.book1D("num_reco2_eta", "N of selected reco track vs eta", nintEta, minEta, maxEta));
630  histograms.h_assoc2eta.push_back(
631  ibook.book1D("num_assoc(recoToSim)_eta", "N of associated (recoToSim) tracks vs eta", nintEta, minEta, maxEta));
632  histograms.h_loopereta.push_back(ibook.book1D(
633  "num_duplicate_eta", "N of associated (recoToSim) duplicate tracks vs eta", nintEta, minEta, maxEta));
634  if (!doSeedPlots_)
635  histograms.h_misideta.push_back(ibook.book1D(
636  "num_chargemisid_eta", "N of associated (recoToSim) charge misIDed tracks vs eta", nintEta, minEta, maxEta));
637  histograms.h_pileupeta.push_back(
638  ibook.book1D("num_pileup_eta", "N of associated (recoToSim) pileup tracks vs eta", nintEta, minEta, maxEta));
639  //
640  histograms.h_recopT.push_back(
641  make1DIfLogX(ibook, useLogPt, "num_reco_pT", "N of reco track vs pT", nintPt, minPt, maxPt));
642  histograms.h_reco2pT.push_back(
643  make1DIfLogX(ibook, useLogPt, "num_reco2_pT", "N of selected reco track vs pT", nintPt, minPt, maxPt));
644  histograms.h_assoc2pT.push_back(make1DIfLogX(
645  ibook, useLogPt, "num_assoc(recoToSim)_pT", "N of associated (recoToSim) tracks vs pT", nintPt, minPt, maxPt));
646  histograms.h_looperpT.push_back(make1DIfLogX(
647  ibook, useLogPt, "num_duplicate_pT", "N of associated (recoToSim) duplicate tracks vs pT", nintPt, minPt, maxPt));
648  if (!doSeedPlots_)
649  histograms.h_misidpT.push_back(make1DIfLogX(ibook,
650  useLogPt,
651  "num_chargemisid_pT",
652  "N of associated (recoToSim) charge misIDed tracks vs pT",
653  nintPt,
654  minPt,
655  maxPt));
656  histograms.h_pileuppT.push_back(make1DIfLogX(
657  ibook, useLogPt, "num_pileup_pT", "N of associated (recoToSim) pileup tracks vs pT", nintPt, minPt, maxPt));
658  //
659  histograms.h_recopTvseta.push_back(make2DIfLogY(ibook,
660  useLogPt,
661  "num_reco_pTvseta",
662  "N of reco track in (pT-eta) plane",
663  nintEta,
664  minEta,
665  maxEta,
666  nintPt,
667  minPt,
668  maxPt));
669  histograms.h_reco2pTvseta.push_back(make2DIfLogY(ibook,
670  useLogPt,
671  "num_reco2_pTvseta",
672  "N of selected reco track in (pT-eta) plane",
673  nintEta,
674  minEta,
675  maxEta,
676  nintPt,
677  minPt,
678  maxPt));
679  histograms.h_assoc2pTvseta.push_back(make2DIfLogY(ibook,
680  useLogPt,
681  "num_assoc(recoToSim)_pTvseta",
682  "N of associated (recoToSim) tracks in (pT-eta) plane",
683  nintEta,
684  minEta,
685  maxEta,
686  nintPt,
687  minPt,
688  maxPt));
689  histograms.h_looperpTvseta.push_back(make2DIfLogY(ibook,
690  useLogPt,
691  "num_duplicate_pTvseta",
692  "N of associated (recoToSim) duplicate tracks in (pT-eta) plane",
693  nintEta,
694  minEta,
695  maxEta,
696  nintPt,
697  minPt,
698  maxPt));
699  if (!doSeedPlots_)
700  histograms.h_misidpTvseta.push_back(
701  make2DIfLogY(ibook,
702  useLogPt,
703  "num_chargemisid_pTvseta",
704  "N of associated (recoToSim) charge misIDed tracks in (pT-eta) plane",
705  nintEta,
706  minEta,
707  maxEta,
708  nintPt,
709  minPt,
710  maxPt));
711  histograms.h_pileuppTvseta.push_back(make2DIfLogY(ibook,
712  useLogPt,
713  "num_pileup_pTvseta",
714  "N of associated (recoToSim) pileup tracks in (pT-eta) plane",
715  nintEta,
716  minEta,
717  maxEta,
718  nintPt,
719  minPt,
720  maxPt));
721  //
722  histograms.h_recohit.push_back(ibook.book1D("num_reco_hit", "N of reco track vs hit", nintHit, minHit, maxHit));
723  histograms.h_assoc2hit.push_back(
724  ibook.book1D("num_assoc(recoToSim)_hit", "N of associated (recoToSim) tracks vs hit", nintHit, minHit, maxHit));
725  histograms.h_looperhit.push_back(ibook.book1D(
726  "num_duplicate_hit", "N of associated (recoToSim) duplicate tracks vs hit", nintHit, minHit, maxHit));
727  if (!doSeedPlots_)
728  histograms.h_misidhit.push_back(ibook.book1D(
729  "num_chargemisid_hit", "N of associated (recoToSim) charge misIDed tracks vs hit", nintHit, minHit, maxHit));
730  histograms.h_pileuphit.push_back(
731  ibook.book1D("num_pileup_hit", "N of associated (recoToSim) pileup tracks vs hit", nintHit, minHit, maxHit));
732  //
733  histograms.h_recolayer.push_back(
734  ibook.book1D("num_reco_layer", "N of reco track vs layer", nintLayers, minLayers, maxLayers));
735  histograms.h_assoc2layer.push_back(ibook.book1D(
736  "num_assoc(recoToSim)_layer", "N of associated (recoToSim) tracks vs layer", nintLayers, minLayers, maxLayers));
737  histograms.h_looperlayer.push_back(ibook.book1D(
738  "num_duplicate_layer", "N of associated (recoToSim) duplicate tracks vs layer", nintLayers, minLayers, maxLayers));
739  if (!doSeedPlots_)
740  histograms.h_misidlayer.push_back(ibook.book1D("num_chargemisid_layer",
741  "N of associated (recoToSim) charge misIDed tracks vs layer",
742  nintLayers,
743  minLayers,
744  maxLayers));
745  histograms.h_pileuplayer.push_back(ibook.book1D(
746  "num_pileup_layer", "N of associated (recoToSim) pileup tracks vs layer", nintLayers, minLayers, maxLayers));
747  //
748  histograms.h_recopixellayer.push_back(
749  ibook.book1D("num_reco_pixellayer", "N of reco track vs pixellayer", nintLayers, minLayers, maxLayers));
750  histograms.h_assoc2pixellayer.push_back(ibook.book1D("num_assoc(recoToSim)_pixellayer",
751  "N of associated (recoToSim) tracks vs pixellayer",
752  nintLayers,
753  minLayers,
754  maxLayers));
755  histograms.h_looperpixellayer.push_back(ibook.book1D("num_duplicate_pixellayer",
756  "N of associated (recoToSim) duplicate tracks vs pixellayer",
757  nintLayers,
758  minLayers,
759  maxLayers));
760  if (!doSeedPlots_)
761  histograms.h_misidpixellayer.push_back(
762  ibook.book1D("num_chargemisid_pixellayer",
763  "N of associated (recoToSim) charge misIDed tracks vs pixellayer",
764  nintLayers,
765  minLayers,
766  maxLayers));
767  histograms.h_pileuppixellayer.push_back(ibook.book1D("num_pileup_pixellayer",
768  "N of associated (recoToSim) pileup tracks vs pixellayer",
769  nintLayers,
770  minLayers,
771  maxLayers));
772  //
773  histograms.h_reco3Dlayer.push_back(
774  ibook.book1D("num_reco_3Dlayer", "N of reco track vs 3D layer", nintLayers, minLayers, maxLayers));
775  histograms.h_assoc23Dlayer.push_back(ibook.book1D("num_assoc(recoToSim)_3Dlayer",
776  "N of associated (recoToSim) tracks vs 3D layer",
777  nintLayers,
778  minLayers,
779  maxLayers));
780  histograms.h_looper3Dlayer.push_back(ibook.book1D("num_duplicate_3Dlayer",
781  "N of associated (recoToSim) duplicate tracks vs 3D layer",
782  nintLayers,
783  minLayers,
784  maxLayers));
785  if (!doSeedPlots_)
786  histograms.h_misid3Dlayer.push_back(ibook.book1D("num_chargemisid_3Dlayer",
787  "N of associated (recoToSim) charge misIDed tracks vs 3D layer",
788  nintLayers,
789  minLayers,
790  maxLayers));
791  histograms.h_pileup3Dlayer.push_back(ibook.book1D(
792  "num_pileup_3Dlayer", "N of associated (recoToSim) pileup tracks vs 3D layer", nintLayers, minLayers, maxLayers));
793  //
794  histograms.h_recopu.push_back(ibook.book1D("num_reco_pu", "N of reco track vs pu", nintPu, minPu, maxPu));
795  histograms.h_reco2pu.push_back(ibook.book1D("num_reco2_pu", "N of selected reco track vs pu", nintPu, minPu, maxPu));
796  histograms.h_assoc2pu.push_back(
797  ibook.book1D("num_assoc(recoToSim)_pu", "N of associated (recoToSim) tracks vs pu", nintPu, minPu, maxPu));
798  histograms.h_looperpu.push_back(
799  ibook.book1D("num_duplicate_pu", "N of associated (recoToSim) duplicate tracks vs pu", nintPu, minPu, maxPu));
800  if (!doSeedPlots_)
801  histograms.h_misidpu.push_back(ibook.book1D(
802  "num_chargemisid_pu", "N of associated (recoToSim) charge misIDed tracks vs pu", nintPu, minPu, maxPu));
803  histograms.h_pileuppu.push_back(
804  ibook.book1D("num_pileup_pu", "N of associated (recoToSim) pileup tracks vs pu", nintPu, minPu, maxPu));
805  //
806  histograms.h_recophi.push_back(ibook.book1D("num_reco_phi", "N of reco track vs phi", nintPhi, minPhi, maxPhi));
807  histograms.h_assoc2phi.push_back(
808  ibook.book1D("num_assoc(recoToSim)_phi", "N of associated (recoToSim) tracks vs phi", nintPhi, minPhi, maxPhi));
809  histograms.h_looperphi.push_back(ibook.book1D(
810  "num_duplicate_phi", "N of associated (recoToSim) duplicate tracks vs phi", nintPhi, minPhi, maxPhi));
811  if (!doSeedPlots_)
812  histograms.h_misidphi.push_back(ibook.book1D(
813  "num_chargemisid_phi", "N of associated (recoToSim) charge misIDed tracks vs phi", nintPhi, minPhi, maxPhi));
814  histograms.h_pileupphi.push_back(
815  ibook.book1D("num_pileup_phi", "N of associated (recoToSim) pileup tracks vs phi", nintPhi, minPhi, maxPhi));
816 
817  histograms.h_recodxy.push_back(ibook.book1D("num_reco_dxy", "N of reco track vs dxy", nintDxy, minDxy, maxDxy));
818  histograms.h_assoc2dxy.push_back(
819  ibook.book1D("num_assoc(recoToSim)_dxy", "N of associated (recoToSim) tracks vs dxy", nintDxy, minDxy, maxDxy));
820  histograms.h_looperdxy.push_back(
821  ibook.book1D("num_duplicate_dxy", "N of associated (recoToSim) looper tracks vs dxy", nintDxy, minDxy, maxDxy));
822  if (!doSeedPlots_)
823  histograms.h_misiddxy.push_back(ibook.book1D(
824  "num_chargemisid_dxy", "N of associated (recoToSim) charge misIDed tracks vs dxy", nintDxy, minDxy, maxDxy));
825  histograms.h_pileupdxy.push_back(
826  ibook.book1D("num_pileup_dxy", "N of associated (recoToSim) pileup tracks vs dxy", nintDxy, minDxy, maxDxy));
827 
828  histograms.h_recodz.push_back(ibook.book1D("num_reco_dz", "N of reco track vs dz", nintDz, minDz, maxDz));
829  histograms.h_assoc2dz.push_back(
830  ibook.book1D("num_assoc(recoToSim)_dz", "N of associated (recoToSim) tracks vs dz", nintDz, minDz, maxDz));
831  histograms.h_looperdz.push_back(
832  ibook.book1D("num_duplicate_dz", "N of associated (recoToSim) looper tracks vs dz", nintDz, minDz, maxDz));
833  if (!doSeedPlots_)
834  histograms.h_misiddz.push_back(ibook.book1D(
835  "num_chargemisid_versus_dz", "N of associated (recoToSim) charge misIDed tracks vs dz", nintDz, minDz, maxDz));
836  histograms.h_pileupdz.push_back(
837  ibook.book1D("num_pileup_dz", "N of associated (recoToSim) pileup tracks vs dz", nintDz, minDz, maxDz));
838 
839  histograms.h_recovertpos.push_back(make1DIfLogX(ibook,
841  "num_reco_vertpos",
842  "N of reconstructed tracks vs transverse ref point position",
843  nintVertpos,
844  minVertpos,
845  maxVertpos));
846  histograms.h_assoc2vertpos.push_back(
847  make1DIfLogX(ibook,
849  "num_assoc(recoToSim)_vertpos",
850  "N of associated (recoToSim) tracks vs transverse ref point position",
851  nintVertpos,
852  minVertpos,
853  maxVertpos));
854  histograms.h_loopervertpos.push_back(
855  make1DIfLogX(ibook,
857  "num_duplicate_vertpos",
858  "N of associated (recoToSim) looper tracks vs transverse ref point position",
859  nintVertpos,
860  minVertpos,
861  maxVertpos));
862  histograms.h_pileupvertpos.push_back(
863  make1DIfLogX(ibook,
865  "num_pileup_vertpos",
866  "N of associated (recoToSim) pileup tracks vs transverse ref point position",
867  nintVertpos,
868  minVertpos,
869  maxVertpos));
870 
871  histograms.h_recozpos.push_back(ibook.book1D(
872  "num_reco_zpos", "N of reconstructed tracks vs transverse ref point position", nintZpos, minZpos, maxZpos));
873  histograms.h_assoc2zpos.push_back(ibook.book1D("num_assoc(recoToSim)_zpos",
874  "N of associated (recoToSim) tracks vs transverse ref point position",
875  nintZpos,
876  minZpos,
877  maxZpos));
878  histograms.h_looperzpos.push_back(
879  ibook.book1D("num_duplicate_zpos",
880  "N of associated (recoToSim) looper tracks vs transverse ref point position",
881  nintZpos,
882  minZpos,
883  maxZpos));
884  histograms.h_pileupzpos.push_back(
885  ibook.book1D("num_pileup_zpos",
886  "N of associated (recoToSim) pileup tracks vs transverse ref point position",
887  nintZpos,
888  minZpos,
889  maxZpos));
890 
891  histograms.h_recodr.push_back(
892  make1DIfLogX(ibook, true, "num_reco_dr", "N of reconstructed tracks vs dR", nintdr, log10(mindr), log10(maxdr)));
893  histograms.h_assoc2dr.push_back(make1DIfLogX(ibook,
894  true,
895  "num_assoc(recoToSim)_dr",
896  "N of associated tracks (recoToSim) vs dR",
897  nintdr,
898  log10(mindr),
899  log10(maxdr)));
900  histograms.h_looperdr.push_back(make1DIfLogX(ibook,
901  true,
902  "num_duplicate_dr",
903  "N of associated (recoToSim) looper tracks vs dR",
904  nintdr,
905  log10(mindr),
906  log10(maxdr)));
907  histograms.h_pileupdr.push_back(make1DIfLogX(ibook,
908  true,
909  "num_pileup_dr",
910  "N of associated (recoToSim) pileup tracks vs dR",
911  nintdr,
912  log10(mindr),
913  log10(maxdr)));
914 
915  histograms.h_recodrj.push_back(make1DIfLogX(
916  ibook, true, "num_reco_drj", "N of reconstructed tracks vs dR(track,jet)", nintdrj, log10(mindrj), log10(maxdrj)));
917  histograms.h_assoc2drj.push_back(make1DIfLogX(ibook,
918  true,
919  "num_assoc(recoToSim)_drj",
920  "N of associated tracks (recoToSim) vs dR(track,jet)",
921  nintdrj,
922  log10(mindrj),
923  log10(maxdrj)));
924  histograms.h_looperdrj.push_back(make1DIfLogX(ibook,
925  true,
926  "num_duplicate_drj",
927  "N of associated (recoToSim) looper tracks vs dR(track,jet)",
928  nintdrj,
929  log10(mindrj),
930  log10(maxdrj)));
931  histograms.h_pileupdrj.push_back(make1DIfLogX(ibook,
932  true,
933  "num_pileup_drj",
934  "N of associated (recoToSim) pileup tracks vs dR(track,jet)",
935  nintdrj,
936  log10(mindrj),
937  log10(maxdrj)));
938 
939  histograms.h_reco_simpvz.push_back(
940  ibook.book1D("num_reco_simpvz", "N of reco track vs. sim PV z", nintPVz, minPVz, maxPVz));
941  histograms.h_assoc2_simpvz.push_back(ibook.book1D(
942  "num_assoc(recoToSim)_simpvz", "N of associated tracks (recoToSim) vs. sim PV z", nintPVz, minPVz, maxPVz));
943  histograms.h_looper_simpvz.push_back(ibook.book1D(
944  "num_duplicate_simpvz", "N of associated (recoToSim) looper tracks vs. sim PV z", nintPVz, minPVz, maxPVz));
945  histograms.h_pileup_simpvz.push_back(ibook.book1D(
946  "num_pileup_simpvz", "N of associated (recoToSim) pileup tracks vs. sim PV z", nintPVz, minPVz, maxPVz));
947 
948  histograms.h_recochi2.push_back(
949  ibook.book1D("num_reco_chi2", "N of reco track vs normalized #chi^{2}", nintChi2, minChi2, maxChi2));
950  histograms.h_assoc2chi2.push_back(ibook.book1D("num_assoc(recoToSim)_chi2",
951  "N of associated (recoToSim) tracks vs normalized #chi^{2}",
952  nintChi2,
953  minChi2,
954  maxChi2));
955  histograms.h_looperchi2.push_back(ibook.book1D("num_duplicate_chi2",
956  "N of associated (recoToSim) looper tracks vs normalized #chi^{2}",
957  nintChi2,
958  minChi2,
959  maxChi2));
960  if (!doSeedPlots_)
961  histograms.h_misidchi2.push_back(
962  ibook.book1D("num_chargemisid_chi2",
963  "N of associated (recoToSim) charge misIDed tracks vs normalized #chi^{2}",
964  nintChi2,
965  minChi2,
966  maxChi2));
967  histograms.h_pileupchi2.push_back(ibook.book1D("num_pileup_chi2",
968  "N of associated (recoToSim) pileup tracks vs normalized #chi^{2}",
969  nintChi2,
970  minChi2,
971  maxChi2));
972 
973  histograms.h_recochi2prob.push_back(
974  ibook.book1D("num_reco_chi2prob", "N of reco track vs normalized #chi^{2}", 100, 0., 1.));
975  histograms.h_assoc2chi2prob.push_back(ibook.book1D(
976  "num_assoc(recoToSim)_chi2prob", "N of associated (recoToSim) tracks vs normalized #chi^{2}", 100, 0., 1.));
977  histograms.h_looperchi2prob.push_back(ibook.book1D(
978  "num_duplicate_chi2prob", "N of associated (recoToSim) looper tracks vs normalized #chi^{2}", 100, 0., 1.));
979  if (!doSeedPlots_)
980  histograms.h_misidchi2prob.push_back(
981  ibook.book1D("num_chargemisid_chi2prob",
982  "N of associated (recoToSim) charge misIDed tracks vs normalized #chi^{2}",
983  100,
984  0.,
985  1.));
986  histograms.h_pileupchi2prob.push_back(ibook.book1D(
987  "num_pileup_chi2prob", "N of associated (recoToSim) pileup tracks vs normalized #chi^{2}", 100, 0., 1.));
988 
989  if (!seedingLayerSetNames.empty()) {
990  const auto size = seedingLayerSetNames.size();
991  histograms.h_reco_seedingLayerSet.push_back(
992  ibook.book1D("num_reco_seedingLayerSet", "N of reco track vs. seedingLayerSet", size, 0, size));
993  histograms.h_assoc2_seedingLayerSet.push_back(
994  ibook.book1D("num_assoc(recoToSim)_seedingLayerSet",
995  "N of associated track (recoToSim) tracks vs. seedingLayerSet",
996  size,
997  0,
998  size));
999  histograms.h_looper_seedingLayerSet.push_back(ibook.book1D(
1000  "num_duplicate_seedingLayerSet", "N of reco associated (recoToSim) looper vs. seedingLayerSet", size, 0, size));
1001  histograms.h_pileup_seedingLayerSet.push_back(ibook.book1D(
1002  "num_pileup_seedingLayerSet", "N of reco associated (recoToSim) pileup vs. seedingLayerSet", size, 0, size));
1003 
1004  setBinLabels(histograms.h_reco_seedingLayerSet.back(), seedingLayerSetNames);
1005  setBinLabels(histograms.h_assoc2_seedingLayerSet.back(), seedingLayerSetNames);
1006  setBinLabels(histograms.h_looper_seedingLayerSet.back(), seedingLayerSetNames);
1007  setBinLabels(histograms.h_pileup_seedingLayerSet.back(), seedingLayerSetNames);
1008  }
1009 
1011 
1012  auto bookResolutionPlots1D = [&](std::vector<dqm::reco::MonitorElement*>& vec, auto&&... params) {
1013  vec.push_back(doResolutionPlots ? ibook.book1D(std::forward<decltype(params)>(params)...) : nullptr);
1014  };
1015  auto bookResolutionPlots2D = [&](std::vector<dqm::reco::MonitorElement*>& vec, bool logx, auto&&... params) {
1016  vec.push_back(doResolutionPlots ? make2DIfLogX(ibook, logx, std::forward<decltype(params)>(params)...) : nullptr);
1017  };
1018  auto bookResolutionPlotsProfile2D = [&](std::vector<dqm::reco::MonitorElement*>& vec, auto&&... params) {
1019  vec.push_back(doResolutionPlots ? ibook.bookProfile2D(std::forward<decltype(params)>(params)...) : nullptr);
1020  };
1021 
1022  bookResolutionPlots1D(histograms.h_eta, "eta", "pseudorapidity residue", 1000, -0.1, 0.1);
1023  bookResolutionPlots1D(histograms.h_pt, "pullPt", "pull of p_{t}", 100, -10, 10);
1024  bookResolutionPlots1D(histograms.h_pullTheta, "pullTheta", "pull of #theta parameter", 250, -25, 25);
1025  bookResolutionPlots1D(histograms.h_pullPhi, "pullPhi", "pull of #phi parameter", 250, -25, 25);
1026  bookResolutionPlots1D(histograms.h_pullDxy, "pullDxy", "pull of dxy parameter", 250, -25, 25);
1027  bookResolutionPlots1D(histograms.h_pullDz, "pullDz", "pull of dz parameter", 250, -25, 25);
1028  bookResolutionPlots1D(histograms.h_pullQoverp, "pullQoverp", "pull of qoverp parameter", 250, -25, 25);
1029 
1030  /* TO BE FIXED -----------
1031  if (associators[ww]=="TrackAssociatorByChi2"){
1032  histograms.h_assochi2.push_back( ibook.book1D("assocChi2","track association #chi^{2}",1000000,0,100000) );
1033  histograms.h_assochi2_prob.push_back(ibook.book1D("assocChi2_prob","probability of association #chi^{2}",100,0,1));
1034  } else if (associators[ww]=="quickTrackAssociatorByHits"){
1035  histograms.h_assocFraction.push_back( ibook.book1D("assocFraction","fraction of shared hits",200,0,2) );
1036  histograms.h_assocSharedHit.push_back(ibook.book1D("assocSharedHit","number of shared hits",20,0,20));
1037  }
1038  */
1039  histograms.h_assocFraction.push_back(ibook.book1D("assocFraction", "fraction of shared hits", 200, 0, 2));
1040  histograms.h_assocSharedHit.push_back(ibook.book1D("assocSharedHit", "number of shared hits", 41, -0.5, 40.5));
1041  // ----------------------
1042 
1043  // use the standard error of the mean as the errors in the profile
1044  histograms.chi2_vs_nhits.push_back(
1045  ibook.bookProfile("chi2mean_vs_nhits", "mean #chi^{2} vs nhits", nintHit, minHit, maxHit, 100, 0, 10, " "));
1046 
1047  bookResolutionPlots2D(
1048  histograms.etares_vs_eta, false, "etares_vs_eta", "etaresidue vs eta", nintEta, minEta, maxEta, 200, -0.1, 0.1);
1049  bookResolutionPlots2D(
1050  histograms.nrec_vs_nsim,
1051  false,
1052  "nrec_vs_nsim",
1053  "Number of selected reco tracks vs. number of selected sim tracks;TrackingParticles;Reco tracks",
1054  nintTracks,
1055  minTracks,
1056  maxTracks,
1057  nintTracks,
1058  minTracks,
1059  maxTracks);
1060 
1061  histograms.chi2_vs_eta.push_back(
1062  ibook.bookProfile("chi2mean", "mean #chi^{2} vs #eta", nintEta, minEta, maxEta, 200, 0, 20, " "));
1063  histograms.chi2_vs_phi.push_back(
1064  ibook.bookProfile("chi2mean_vs_phi", "mean #chi^{2} vs #phi", nintPhi, minPhi, maxPhi, 200, 0, 20, " "));
1065  histograms.chi2_vs_pt.push_back(
1066  makeProfileIfLogX(ibook, useLogPt, "chi2mean_vs_pt", "mean #chi^{2} vs p_{T}", nintPt, minPt, maxPt, 0, 20));
1067  histograms.chi2_vs_drj.push_back(makeProfileIfLogX(
1068  ibook, true, "chi2mean_vs_drj", "mean #chi^{2} vs dR(track,jet)", nintdrj, log10(mindrj), log10(maxdrj), 0, 20));
1069 
1070  histograms.assoc_chi2_vs_eta.push_back(
1071  ibook.bookProfile("assoc_chi2mean", "mean #chi^{2} vs #eta", nintEta, minEta, maxEta, 200, 0., 20., " "));
1072  histograms.assoc_chi2prob_vs_eta.push_back(ibook.bookProfile(
1073  "assoc_chi2prob_vs_eta", "mean #chi^{2} probability vs #eta", nintEta, minEta, maxEta, 100, 0., 1., " "));
1074  histograms.assoc_chi2_vs_pt.push_back(makeProfileIfLogX(
1075  ibook, useLogPt, "assoc_chi2mean_vs_pt", "mean #chi^{2} vs p_{T}", nintPt, minPt, maxPt, 0., 20.));
1076  histograms.assoc_chi2prob_vs_pt.push_back(makeProfileIfLogX(
1077  ibook, useLogPt, "assoc_chi2prob_vs_pt", "mean #chi^{2} probability vs p_{T}", nintPt, minPt, maxPt, 0., 1.));
1078  histograms.assoc_chi2_vs_drj.push_back(makeProfileIfLogX(ibook,
1079  true,
1080  "assoc_chi2mean_vs_drj",
1081  "mean #chi^{2} vs dR(track,jet)",
1082  nintdrj,
1083  log10(mindrj),
1084  log10(maxdrj),
1085  0.,
1086  20));
1087  histograms.assoc_chi2prob_vs_drj.push_back(makeProfileIfLogX(ibook,
1088  true,
1089  "assoc_chi2prob_vs_drj",
1090  "mean #chi^{2} probability vs dR(track,jet)",
1091  nintdrj,
1092  log10(mindrj),
1093  log10(maxdrj),
1094  0.,
1095  1.));
1096 
1097  histograms.nhits_vs_eta.push_back(
1098  ibook.bookProfile("hits_eta", "mean hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1099  histograms.nPXBhits_vs_eta.push_back(ibook.bookProfile(
1100  "PXBhits_vs_eta", "mean # PXB its vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1101  histograms.nPXFhits_vs_eta.push_back(ibook.bookProfile(
1102  "PXFhits_vs_eta", "mean # PXF hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1103  histograms.nPXLhits_vs_eta.push_back(ibook.bookProfile(
1104  "PXLhits_vs_eta", "mean # PXL hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1105  histograms.nTIBhits_vs_eta.push_back(ibook.bookProfile(
1106  "TIBhits_vs_eta", "mean # TIB hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1107  histograms.nTIDhits_vs_eta.push_back(ibook.bookProfile(
1108  "TIDhits_vs_eta", "mean # TID hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1109  histograms.nTOBhits_vs_eta.push_back(ibook.bookProfile(
1110  "TOBhits_vs_eta", "mean # TOB hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1111  histograms.nTEChits_vs_eta.push_back(ibook.bookProfile(
1112  "TEChits_vs_eta", "mean # TEC hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1113  histograms.nSTRIPhits_vs_eta.push_back(ibook.bookProfile(
1114  "STRIPhits_vs_eta", "mean # STRIP hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1115 
1116  histograms.nLayersWithMeas_vs_eta.push_back(ibook.bookProfile("LayersWithMeas_eta",
1117  "mean # Layers with measurement vs eta",
1118  nintEta,
1119  minEta,
1120  maxEta,
1121  nintLayers,
1122  minLayers,
1123  maxLayers,
1124  " "));
1125  histograms.nPXLlayersWithMeas_vs_eta.push_back(ibook.bookProfile("PXLlayersWithMeas_vs_eta",
1126  "mean # PXL Layers with measurement vs eta",
1127  nintEta,
1128  minEta,
1129  maxEta,
1130  nintLayers,
1131  minLayers,
1132  maxLayers,
1133  " "));
1134  histograms.nSTRIPlayersWithMeas_vs_eta.push_back(ibook.bookProfile("STRIPlayersWithMeas_vs_eta",
1135  "mean # STRIP Layers with measurement vs eta",
1136  nintEta,
1137  minEta,
1138  maxEta,
1139  nintLayers,
1140  minLayers,
1141  maxLayers,
1142  " "));
1143  histograms.nSTRIPlayersWith1dMeas_vs_eta.push_back(ibook.bookProfile("STRIPlayersWith1dMeas_vs_eta",
1144  "mean # STRIP Layers with 1D measurement vs eta",
1145  nintEta,
1146  minEta,
1147  maxEta,
1148  nintLayers,
1149  minLayers,
1150  maxLayers,
1151  " "));
1152  histograms.nSTRIPlayersWith2dMeas_vs_eta.push_back(ibook.bookProfile("STRIPlayersWith2dMeas_vs_eta",
1153  "mean # STRIP Layers with 2D measurement vs eta",
1154  nintEta,
1155  minEta,
1156  maxEta,
1157  nintLayers,
1158  minLayers,
1159  maxLayers,
1160  " "));
1161 
1162  if (doMTDPlots_) {
1163  histograms.nMTDhits_vs_eta.push_back(ibook.bookProfile(
1164  "MTDhits_vs_eta", "mean # MTD hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1165 
1166  histograms.nBTLhits_vs_eta.push_back(ibook.bookProfile(
1167  "BTLhits_vs_eta", "mean # BTL hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1168 
1169  histograms.nETLhits_vs_eta.push_back(ibook.bookProfile(
1170  "ETLhits_vs_eta", "mean # ETL hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1171  }
1172 
1173  histograms.nhits_vs_phi.push_back(
1174  ibook.bookProfile("hits_phi", "mean # hits vs #phi", nintPhi, minPhi, maxPhi, nintHit, minHit, maxHit, " "));
1175 
1176  histograms.nlosthits_vs_eta.push_back(ibook.bookProfile(
1177  "losthits_vs_eta", "mean # lost hits vs eta", nintEta, minEta, maxEta, nintHit, minHit, maxHit, " "));
1178 
1179  //resolution of track parameters
1180  // dPt/Pt cotTheta Phi TIP LIP
1181  // log10(pt)<0.5 100,0.1 240,0.08 100,0.015 100,0.1000 150,0.3000
1182  // 0.5<log10(pt)<1.5 100,0.1 120,0.01 100,0.003 100,0.0100 150,0.0500
1183  // >1.5 100,0.3 100,0.005 100,0.0008 100,0.0060 120,0.0300
1184 
1185  bookResolutionPlots2D(histograms.ptres_vs_eta,
1186  false,
1187  "ptres_vs_eta",
1188  "ptres_vs_eta",
1189  nintEta,
1190  minEta,
1191  maxEta,
1192  ptRes_nbin,
1194  ptRes_rangeMax);
1195 
1196  bookResolutionPlots2D(histograms.ptres_vs_phi,
1197  false,
1198  "ptres_vs_phi",
1199  "p_{t} res vs #phi",
1200  nintPhi,
1201  minPhi,
1202  maxPhi,
1203  ptRes_nbin,
1205  ptRes_rangeMax);
1206 
1207  bookResolutionPlots2D(histograms.ptres_vs_pt,
1208  useLogPt,
1209  "ptres_vs_pt",
1210  "ptres_vs_pt",
1211  nintPt,
1212  minPt,
1213  maxPt,
1214  ptRes_nbin,
1216  ptRes_rangeMax);
1217 
1218  bookResolutionPlots2D(histograms.cotThetares_vs_eta,
1219  false,
1220  "cotThetares_vs_eta",
1221  "cotThetares_vs_eta",
1222  nintEta,
1223  minEta,
1224  maxEta,
1228 
1229  bookResolutionPlots2D(histograms.cotThetares_vs_pt,
1230  useLogPt,
1231  "cotThetares_vs_pt",
1232  "cotThetares_vs_pt",
1233  nintPt,
1234  minPt,
1235  maxPt,
1239 
1240  bookResolutionPlots2D(histograms.phires_vs_eta,
1241  false,
1242  "phires_vs_eta",
1243  "phires_vs_eta",
1244  nintEta,
1245  minEta,
1246  maxEta,
1247  phiRes_nbin,
1249  phiRes_rangeMax);
1250 
1251  bookResolutionPlots2D(histograms.phires_vs_pt,
1252  useLogPt,
1253  "phires_vs_pt",
1254  "phires_vs_pt",
1255  nintPt,
1256  minPt,
1257  maxPt,
1258  phiRes_nbin,
1260  phiRes_rangeMax);
1261 
1262  bookResolutionPlots2D(histograms.phires_vs_phi,
1263  false,
1264  "phires_vs_phi",
1265  "#phi res vs #phi",
1266  nintPhi,
1267  minPhi,
1268  maxPhi,
1269  phiRes_nbin,
1271  phiRes_rangeMax);
1272 
1273  bookResolutionPlots2D(histograms.dxyres_vs_eta,
1274  false,
1275  "dxyres_vs_eta",
1276  "dxyres_vs_eta",
1277  nintEta,
1278  minEta,
1279  maxEta,
1280  dxyRes_nbin,
1282  dxyRes_rangeMax);
1283 
1284  bookResolutionPlots2D(histograms.dxyres_vs_pt,
1285  useLogPt,
1286  "dxyres_vs_pt",
1287  "dxyres_vs_pt",
1288  nintPt,
1289  minPt,
1290  maxPt,
1291  dxyRes_nbin,
1293  dxyRes_rangeMax);
1294 
1295  bookResolutionPlots2D(histograms.dxyres_vs_phi,
1296  false,
1297  "dxyres_vs_phi",
1298  "dxyres_vs_phi",
1299  nintPhi,
1300  minPhi,
1301  maxPhi,
1302  dxyRes_nbin,
1304  dxyRes_rangeMax);
1305 
1306  bookResolutionPlots2D(histograms.dzres_vs_eta,
1307  false,
1308  "dzres_vs_eta",
1309  "dzres_vs_eta",
1310  nintEta,
1311  minEta,
1312  maxEta,
1313  dzRes_nbin,
1315  dzRes_rangeMax);
1316 
1317  bookResolutionPlots2D(histograms.dzres_vs_pt,
1318  useLogPt,
1319  "dzres_vs_pt",
1320  "dzres_vs_pt",
1321  nintPt,
1322  minPt,
1323  maxPt,
1324  dzRes_nbin,
1326  dzRes_rangeMax);
1327 
1328  bookResolutionPlots2D(histograms.dzres_vs_phi,
1329  false,
1330  "dzres_vs_phi",
1331  "dzres_vs_phi",
1332  nintPhi,
1333  minPhi,
1334  maxPhi,
1335  dzRes_nbin,
1337  dzRes_rangeMax);
1338 
1339  bookResolutionPlotsProfile2D(histograms.ptmean_vs_eta_phi,
1340  "ptmean_vs_eta_phi",
1341  "mean p_{t} vs #eta and #phi",
1342  nintPhi,
1343  minPhi,
1344  maxPhi,
1345  nintEta,
1346  minEta,
1347  maxEta,
1348  1000,
1349  0,
1350  1000);
1351  bookResolutionPlotsProfile2D(histograms.phimean_vs_eta_phi,
1352  "phimean_vs_eta_phi",
1353  "mean #phi vs #eta and #phi",
1354  nintPhi,
1355  minPhi,
1356  maxPhi,
1357  nintEta,
1358  minEta,
1359  maxEta,
1360  nintPhi,
1361  minPhi,
1362  maxPhi);
1363 
1364  //pulls of track params vs eta: to be used with fitslicesytool
1365  bookResolutionPlots2D(
1366  histograms.dxypull_vs_eta, false, "dxypull_vs_eta", "dxypull_vs_eta", nintEta, minEta, maxEta, 100, -10, 10);
1367  bookResolutionPlots2D(
1368  histograms.ptpull_vs_eta, false, "ptpull_vs_eta", "ptpull_vs_eta", nintEta, minEta, maxEta, 100, -10, 10);
1369  bookResolutionPlots2D(
1370  histograms.dzpull_vs_eta, false, "dzpull_vs_eta", "dzpull_vs_eta", nintEta, minEta, maxEta, 100, -10, 10);
1371  bookResolutionPlots2D(
1372  histograms.phipull_vs_eta, false, "phipull_vs_eta", "phipull_vs_eta", nintEta, minEta, maxEta, 100, -10, 10);
1373  bookResolutionPlots2D(
1374  histograms.thetapull_vs_eta, false, "thetapull_vs_eta", "thetapull_vs_eta", nintEta, minEta, maxEta, 100, -10, 10);
1375  bookResolutionPlots2D(
1376  histograms.dxypull_vs_pt, useLogPt, "dxypull_vs_pt", "dxypull_vs_pt", nintPt, minPt, maxPt, 100, -10, 10);
1377  bookResolutionPlots2D(
1378  histograms.ptpull_vs_pt, useLogPt, "ptpull_vs_pt", "ptpull_vs_pt", nintPt, minPt, maxPt, 100, -10, 10);
1379  bookResolutionPlots2D(
1380  histograms.dzpull_vs_pt, useLogPt, "dzpull_vs_pt", "dzpull_vs_pt", nintPt, minPt, maxPt, 100, -10, 10);
1381  bookResolutionPlots2D(
1382  histograms.phipull_vs_pt, useLogPt, "phipull_vs_pt", "phipull_vs_pt", nintPt, minPt, maxPt, 100, -10, 10);
1383  bookResolutionPlots2D(
1384  histograms.thetapull_vs_pt, useLogPt, "thetapull_vs_pt", "thetapull_vs_pt", nintPt, minPt, maxPt, 100, -10, 10);
1385 
1386  // histograms.h_ptshiftetamean.push_back( ibook.book1D("h_ptshifteta_Mean","<#deltapT/pT>[%] vs #eta",nintEta,minEta,maxEta) );
1387 
1388  //pulls of track params vs phi
1389  bookResolutionPlots2D(
1390  histograms.ptpull_vs_phi, false, "ptpull_vs_phi", "p_{t} pull vs #phi", nintPhi, minPhi, maxPhi, 100, -10, 10);
1391  bookResolutionPlots2D(
1392  histograms.phipull_vs_phi, false, "phipull_vs_phi", "#phi pull vs #phi", nintPhi, minPhi, maxPhi, 100, -10, 10);
1393  bookResolutionPlots2D(histograms.thetapull_vs_phi,
1394  false,
1395  "thetapull_vs_phi",
1396  "#theta pull vs #phi",
1397  nintPhi,
1398  minPhi,
1399  maxPhi,
1400  100,
1401  -10,
1402  10);
1403 
1404  bookResolutionPlots2D(histograms.nrecHit_vs_nsimHit_rec2sim,
1405  false,
1406  "nrecHit_vs_nsimHit_rec2sim",
1407  "nrecHit vs nsimHit (Rec2simAssoc)",
1408  nintHit,
1409  minHit,
1410  maxHit,
1411  nintHit,
1412  minHit,
1413  maxHit);
1414 }
1415 
1417  histograms.h_recodxypv.push_back(
1418  ibook.book1D("num_reco_dxypv", "N of reco track vs dxy(PV)", nintDxy, minDxy, maxDxy));
1419  histograms.h_assoc2dxypv.push_back(ibook.book1D(
1420  "num_assoc(recoToSim)_dxypv", "N of associated (recoToSim) tracks vs dxy(PV)", nintDxy, minDxy, maxDxy));
1421  histograms.h_looperdxypv.push_back(ibook.book1D(
1422  "num_duplicate_dxypv", "N of associated (recoToSim) looper tracks vs dxy(PV)", nintDxy, minDxy, maxDxy));
1423  if (!doSeedPlots_)
1424  histograms.h_misiddxypv.push_back(ibook.book1D("num_chargemisid_dxypv",
1425  "N of associated (recoToSim) charge misIDed tracks vs dxy(PV)",
1426  nintDxy,
1427  minDxy,
1428  maxDxy));
1429  histograms.h_pileupdxypv.push_back(ibook.book1D(
1430  "num_pileup_dxypv", "N of associated (recoToSim) pileup tracks vs dxy(PV)", nintDxy, minDxy, maxDxy));
1431 
1432  histograms.h_recodzpv.push_back(ibook.book1D("num_reco_dzpv", "N of reco track vs dz(PV)", nintDz, minDz, maxDz));
1433  histograms.h_assoc2dzpv.push_back(
1434  ibook.book1D("num_assoc(recoToSim)_dzpv", "N of associated (recoToSim) tracks vs dz(PV)", nintDz, minDz, maxDz));
1435  histograms.h_looperdzpv.push_back(
1436  ibook.book1D("num_duplicate_dzpv", "N of associated (recoToSim) looper tracks vs dz(PV)", nintDz, minDz, maxDz));
1437  if (!doSeedPlots_)
1438  histograms.h_misiddzpv.push_back(ibook.book1D("num_chargemisid_versus_dzpv",
1439  "N of associated (recoToSim) charge misIDed tracks vs dz(PV)",
1440  nintDz,
1441  minDz,
1442  maxDz));
1443  histograms.h_pileupdzpv.push_back(
1444  ibook.book1D("num_pileup_dzpv", "N of associated (recoToSim) pileup tracks vs dz(PV)", nintDz, minDz, maxDz));
1445 
1446  histograms.h_recodxypvzoomed.push_back(ibook.book1D(
1447  "num_reco_dxypv_zoomed", "N of reco track vs dxy(PV)", nintDxy, minDxy / dxyDzZoom, maxDxy / dxyDzZoom));
1448  histograms.h_assoc2dxypvzoomed.push_back(ibook.book1D("num_assoc(recoToSim)_dxypv_zoomed",
1449  "N of associated (recoToSim) tracks vs dxy(PV)",
1450  nintDxy,
1451  minDxy / dxyDzZoom,
1452  maxDxy / dxyDzZoom));
1453  histograms.h_looperdxypvzoomed.push_back(ibook.book1D("num_duplicate_dxypv_zoomed",
1454  "N of associated (recoToSim) looper tracks vs dxy(PV)",
1455  nintDxy,
1456  minDxy / dxyDzZoom,
1457  maxDxy / dxyDzZoom));
1458  if (!doSeedPlots_)
1459  histograms.h_misiddxypvzoomed.push_back(ibook.book1D("num_chargemisid_dxypv_zoomed",
1460  "N of associated (recoToSim) charge misIDed tracks vs dxy(PV)",
1461  nintDxy,
1462  minDxy / dxyDzZoom,
1463  maxDxy / dxyDzZoom));
1464  histograms.h_pileupdxypvzoomed.push_back(ibook.book1D("num_pileup_dxypv_zoomed",
1465  "N of associated (recoToSim) pileup tracks vs dxy(PV)",
1466  nintDxy,
1467  minDxy / dxyDzZoom,
1468  maxDxy / dxyDzZoom));
1469 
1470  histograms.h_recodzpvzoomed.push_back(
1471  ibook.book1D("num_reco_dzpv_zoomed", "N of reco track vs dz(PV)", nintDz, minDz / dxyDzZoom, maxDz / dxyDzZoom));
1472  histograms.h_assoc2dzpvzoomed.push_back(ibook.book1D("num_assoc(recoToSim)_dzpv_zoomed",
1473  "N of associated (recoToSim) tracks vs dz(PV)",
1474  nintDz,
1475  minDz / dxyDzZoom,
1476  maxDz / dxyDzZoom));
1477  histograms.h_looperdzpvzoomed.push_back(ibook.book1D("num_duplicate_dzpv_zoomed",
1478  "N of associated (recoToSim) looper tracks vs dz(PV)",
1479  nintDz,
1480  minDz / dxyDzZoom,
1481  maxDz / dxyDzZoom));
1482  if (!doSeedPlots_)
1483  histograms.h_misiddzpvzoomed.push_back(ibook.book1D("num_chargemisid_versus_dzpv_zoomed",
1484  "N of associated (recoToSim) charge misIDed tracks vs dz(PV)",
1485  nintDz,
1486  minDz / dxyDzZoom,
1487  maxDz / dxyDzZoom));
1488  histograms.h_pileupdzpvzoomed.push_back(ibook.book1D("num_pileup_dzpv_zoomed",
1489  "N of associated (recoToSim) pileup tracks vs dz(PV)",
1490  nintDz,
1491  minDz / dxyDzZoom,
1492  maxDz / dxyDzZoom));
1493 
1494  histograms.h_reco_dzpvcut.push_back(
1495  ibook.book1D("num_reco_dzpvcut", "N of reco track vs dz(PV)", nintDzpvCum, 0, maxDzpvCum));
1496  histograms.h_assoc2_dzpvcut.push_back(ibook.book1D(
1497  "num_assoc(recoToSim)_dzpvcut", "N of associated (recoToSim) tracks vs dz(PV)", nintDzpvCum, 0, maxDzpvCum));
1498  histograms.h_pileup_dzpvcut.push_back(ibook.book1D(
1499  "num_pileup_dzpvcut", "N of associated (recoToSim) pileup tracks vs dz(PV)", nintDzpvCum, 0, maxDzpvCum));
1500 
1501  histograms.h_reco_dzpvsigcut.push_back(
1502  ibook.book1D("num_reco_dzpvsigcut", "N of reco track vs dz(PV)/dzError", nintDzpvsigCum, 0, maxDzpvsigCum));
1503  histograms.h_assoc2_dzpvsigcut.push_back(ibook.book1D("num_assoc(recoToSim)_dzpvsigcut",
1504  "N of associated (recoToSim) tracks vs dz(PV)/dzError",
1506  0,
1507  maxDzpvsigCum));
1508  histograms.h_pileup_dzpvsigcut.push_back(ibook.book1D("num_pileup_dzpvsigcut",
1509  "N of associated (recoToSim) pileup tracks vs dz(PV)/dzError",
1511  0,
1512  maxDzpvsigCum));
1513 }
1514 
1516  // dE/dx stuff
1517  histograms.h_dedx_estim.emplace_back();
1518  histograms.h_dedx_estim.back().push_back(
1519  ibook.book1D("h_dedx_estim1", "dE/dx estimator 1", nintDeDx, minDeDx, maxDeDx));
1520  histograms.h_dedx_estim.back().push_back(
1521  ibook.book1D("h_dedx_estim2", "dE/dx estimator 2", nintDeDx, minDeDx, maxDeDx));
1522 
1523  histograms.h_dedx_nom.emplace_back();
1524  histograms.h_dedx_nom.back().push_back(
1525  ibook.book1D("h_dedx_nom1", "dE/dx number of measurements", nintHit, minHit, maxHit));
1526  histograms.h_dedx_nom.back().push_back(
1527  ibook.book1D("h_dedx_nom2", "dE/dx number of measurements", nintHit, minHit, maxHit));
1528 
1529  histograms.h_dedx_sat.emplace_back();
1530  histograms.h_dedx_sat.back().push_back(
1531  ibook.book1D("h_dedx_sat1", "dE/dx number of measurements with saturation", nintHit, minHit, maxHit));
1532  histograms.h_dedx_sat.back().push_back(
1533  ibook.book1D("h_dedx_sat2", "dE/dx number of measurements with saturation", nintHit, minHit, maxHit));
1534 }
1535 
1537  histograms.h_seedsFitFailed.push_back(
1538  ibook.book1D("seeds_fitFailed", "Number of seeds for which the fit failed", nintTracks, minTracks, maxTracks));
1539  histograms.h_seedsFitFailedFraction.push_back(
1540  ibook.book1D("seeds_fitFailedFraction", "Fraction of seeds for which the fit failed", 100, 0, 1));
1541 }
1542 
1544  histograms.h_reco_mva.emplace_back();
1545  histograms.h_assoc2_mva.emplace_back();
1546 
1547  histograms.h_reco_mvacut.emplace_back();
1548  histograms.h_assoc_mvacut.emplace_back();
1549  histograms.h_assoc2_mvacut.emplace_back();
1550  histograms.h_simul2_mvacut.emplace_back();
1551 
1552  histograms.h_reco_mva_hp.emplace_back();
1553  histograms.h_assoc2_mva_hp.emplace_back();
1554 
1555  histograms.h_reco_mvacut_hp.emplace_back();
1556  histograms.h_assoc_mvacut_hp.emplace_back();
1557  histograms.h_assoc2_mvacut_hp.emplace_back();
1558  histograms.h_simul2_mvacut_hp.emplace_back();
1559 
1560  histograms.h_assoc2_mva_vs_pt.emplace_back();
1561  histograms.h_fake_mva_vs_pt.emplace_back();
1562  histograms.h_assoc2_mva_vs_pt_hp.emplace_back();
1563  histograms.h_fake_mva_vs_pt_hp.emplace_back();
1564  histograms.h_assoc2_mva_vs_eta.emplace_back();
1565  histograms.h_fake_mva_vs_eta.emplace_back();
1566  histograms.h_assoc2_mva_vs_eta_hp.emplace_back();
1567  histograms.h_fake_mva_vs_eta_hp.emplace_back();
1568 
1569  for (size_t i = 1; i <= nMVAs; ++i) {
1570  auto istr = std::to_string(i);
1571  std::string pfix;
1572 
1573  if (i == 1) {
1574  histograms.h_reco_mva_hp.back().emplace_back();
1575  histograms.h_assoc2_mva_hp.back().emplace_back();
1576 
1577  histograms.h_reco_mvacut_hp.back().emplace_back();
1578  histograms.h_assoc_mvacut_hp.back().emplace_back();
1579  histograms.h_assoc2_mvacut_hp.back().emplace_back();
1580  histograms.h_simul2_mvacut_hp.back().emplace_back();
1581 
1582  histograms.h_assoc2_mva_vs_pt_hp.back().emplace_back();
1583  histograms.h_fake_mva_vs_pt_hp.back().emplace_back();
1584  histograms.h_assoc2_mva_vs_eta_hp.back().emplace_back();
1585  histograms.h_fake_mva_vs_eta_hp.back().emplace_back();
1586  } else {
1587  pfix = " (not loose-selected)";
1588  std::string pfix2 = " (not HP-selected)";
1589 
1590  histograms.h_reco_mva_hp.back().push_back(ibook.book1D(
1591  "num_reco_mva" + istr + "_hp", "N of reco track after vs MVA" + istr + pfix2, nintMVA, minMVA, maxMVA));
1592  histograms.h_assoc2_mva_hp.back().push_back(
1593  ibook.book1D("num_assoc(recoToSim)_mva" + istr + "_hp",
1594  "N of associated tracks (recoToSim) vs MVA" + istr + pfix2,
1595  nintMVA,
1596  minMVA,
1597  maxMVA));
1598 
1599  histograms.h_reco_mvacut_hp.back().push_back(ibook.book1D("num_reco_mva" + istr + "cut" + "_hp",
1600  "N of reco track vs cut on MVA" + istr + pfix2,
1601  nintMVA,
1602  minMVA,
1603  maxMVA));
1604  histograms.h_assoc_mvacut_hp.back().push_back(
1605  ibook.book1D("num_assoc(simToReco)_mva" + istr + "cut_hp",
1606  "N of associated tracks (simToReco) vs cut on MVA" + istr + pfix2,
1607  nintMVA,
1608  minMVA,
1609  maxMVA));
1610  histograms.h_assoc2_mvacut_hp.back().push_back(
1611  ibook.book1D("num_assoc(recoToSim)_mva" + istr + "cut_hp",
1612  "N of associated tracks (recoToSim) vs cut on MVA" + istr + pfix2,
1613  nintMVA,
1614  minMVA,
1615  maxMVA));
1616  histograms.h_simul2_mvacut_hp.back().push_back(
1617  ibook.book1D("num_simul2_mva" + istr + "cut_hp",
1618  "N of simulated tracks (associated to any track) vs cut on MVA" + istr + pfix2,
1619  nintMVA,
1620  minMVA,
1621  maxMVA));
1622 
1623  histograms.h_assoc2_mva_vs_pt_hp.back().push_back(
1624  makeProfileIfLogX(ibook,
1625  useLogPt,
1626  ("mva_assoc(recoToSim)_mva" + istr + "_pT_hp").c_str(),
1627  ("MVA" + istr + " of associated tracks (recoToSim) vs. track p_{T}" + pfix2).c_str(),
1628  nintPt,
1629  minPt,
1630  maxPt,
1631  minMVA,
1632  maxMVA));
1633  histograms.h_fake_mva_vs_pt_hp.back().push_back(
1634  makeProfileIfLogX(ibook,
1635  useLogPt,
1636  ("mva_fake_mva" + istr + "pT_hp").c_str(),
1637  ("MVA" + istr + " of non-associated tracks (recoToSim) vs. track p_{T}" + pfix2).c_str(),
1638  nintPt,
1639  minPt,
1640  maxPt,
1641  minMVA,
1642  maxMVA));
1643  histograms.h_assoc2_mva_vs_eta_hp.back().push_back(
1644  ibook.bookProfile("mva_assoc(recoToSim)_mva" + istr + "_eta_hp",
1645  "MVA" + istr + " of associated tracks (recoToSim) vs. track #eta" + pfix2,
1646  nintEta,
1647  minEta,
1648  maxEta,
1649  nintMVA,
1650  minMVA,
1651  maxMVA));
1652  histograms.h_fake_mva_vs_eta_hp.back().push_back(
1653  ibook.bookProfile("mva_fake_mva" + istr + "eta_hp",
1654  "MVA" + istr + " of non-associated tracks (recoToSim) vs. track #eta" + pfix2,
1655  nintEta,
1656  minEta,
1657  maxEta,
1658  nintMVA,
1659  minMVA,
1660  maxMVA));
1661  }
1662 
1663  histograms.h_reco_mva.back().push_back(
1664  ibook.book1D("num_reco_mva" + istr, "N of reco track vs MVA" + istr + pfix, nintMVA, minMVA, maxMVA));
1665  histograms.h_assoc2_mva.back().push_back(ibook.book1D("num_assoc(recoToSim)_mva" + istr,
1666  "N of associated tracks (recoToSim) vs MVA" + istr + pfix,
1667  nintMVA,
1668  minMVA,
1669  maxMVA));
1670 
1671  histograms.h_reco_mvacut.back().push_back(ibook.book1D(
1672  "num_reco_mva" + istr + "cut", "N of reco track vs cut on MVA" + istr + pfix, nintMVA, minMVA, maxMVA));
1673  histograms.h_assoc_mvacut.back().push_back(
1674  ibook.book1D("num_assoc(simToReco)_mva" + istr + "cut",
1675  "N of associated tracks (simToReco) vs cut on MVA" + istr + pfix,
1676  nintMVA,
1677  minMVA,
1678  maxMVA));
1679  histograms.h_assoc2_mvacut.back().push_back(
1680  ibook.book1D("num_assoc(recoToSim)_mva" + istr + "cut",
1681  "N of associated tracks (recoToSim) vs cut on MVA" + istr + pfix,
1682  nintMVA,
1683  minMVA,
1684  maxMVA));
1685  histograms.h_simul2_mvacut.back().push_back(
1686  ibook.book1D("num_simul2_mva" + istr + "cut",
1687  "N of simulated tracks (associated to any track) vs cut on MVA" + istr + pfix,
1688  nintMVA,
1689  minMVA,
1690  maxMVA));
1691 
1692  histograms.h_assoc2_mva_vs_pt.back().push_back(
1693  makeProfileIfLogX(ibook,
1694  useLogPt,
1695  ("mva_assoc(recoToSim)_mva" + istr + "_pT").c_str(),
1696  ("MVA" + istr + " of associated tracks (recoToSim) vs. track p_{T}" + pfix).c_str(),
1697  nintPt,
1698  minPt,
1699  maxPt,
1700  minMVA,
1701  maxMVA));
1702  histograms.h_fake_mva_vs_pt.back().push_back(
1703  makeProfileIfLogX(ibook,
1704  useLogPt,
1705  ("mva_fake_mva" + istr + "_pT").c_str(),
1706  ("MVA" + istr + " of non-associated tracks (recoToSim) vs. track p_{T}" + pfix).c_str(),
1707  nintPt,
1708  minPt,
1709  maxPt,
1710  minMVA,
1711  maxMVA));
1712  histograms.h_assoc2_mva_vs_eta.back().push_back(
1713  ibook.bookProfile("mva_assoc(recoToSim)_mva" + istr + "_eta",
1714  "MVA" + istr + " of associated tracks (recoToSim) vs. track #eta" + pfix,
1715  nintEta,
1716  minEta,
1717  maxEta,
1718  nintMVA,
1719  minMVA,
1720  maxMVA));
1721  histograms.h_fake_mva_vs_eta.back().push_back(
1722  ibook.bookProfile("mva_fake_mva" + istr + "_eta",
1723  "MVA" + istr + " of non-associated tracks (recoToSim) vs. track #eta" + pfix,
1724  nintEta,
1725  minEta,
1726  maxEta,
1727  nintMVA,
1728  minMVA,
1729  maxMVA));
1730  }
1731 }
1732 
1734  const TrackingParticle::Vector& momentumTP,
1735  const TrackingParticle::Point& vertexTP,
1736  int bx) const {
1737  if (bx == 0) {
1738  histograms.h_ptSIM->Fill(sqrt(momentumTP.perp2()));
1739  histograms.h_etaSIM->Fill(momentumTP.eta());
1740  histograms.h_phiSIM->Fill(momentumTP.phi());
1741  histograms.h_vertposSIM->Fill(sqrt(vertexTP.perp2()));
1742  }
1743  histograms.h_bunchxSIM->Fill(bx);
1744 }
1745 
1747  const Histograms& histograms,
1748  int count,
1749  const TrackingParticle& tp,
1750  const TrackingParticle::Vector& momentumTP,
1751  const TrackingParticle::Point& vertexTP,
1752  double dxySim,
1753  double dzSim,
1754  double dxyPVSim,
1755  double dzPVSim,
1756  int nSimHits,
1757  int nSimLayers,
1758  int nSimPixelLayers,
1759  int nSimStripMonoAndStereoLayers,
1760  const reco::Track* track,
1761  int numVertices,
1762  double dR,
1763  double dRJet,
1764  const math::XYZPoint* pvPosition,
1765  const TrackingVertex::LorentzVector* simPVPosition,
1766  const math::XYZPoint& bsPosition,
1767  const std::vector<float>& mvas,
1768  unsigned int selectsLoose,
1769  unsigned int selectsHP) const {
1770  bool isMatched = track;
1771  const auto eta = getEta(momentumTP.eta());
1772  const auto phi = momentumTP.phi();
1773  const auto pt = getPt(sqrt(momentumTP.perp2()));
1774  const auto nSim3DLayers = nSimPixelLayers + nSimStripMonoAndStereoLayers;
1775 
1776  const auto vertexTPwrtBS = vertexTP - bsPosition;
1777  const auto vertxy = std::sqrt(vertexTPwrtBS.perp2());
1778  const auto vertz = vertexTPwrtBS.z();
1779 
1780  //efficiency vs. cut on MVA
1781  //
1782  // Note that this includes also pileup TPs, as "signalOnly"
1783  // selection is applied only in the TpSelector*. Have to think if
1784  // this is really what we want.
1785  if (isMatched) {
1786  for (size_t i = 0; i < mvas.size(); ++i) {
1787  if (i <= selectsLoose) {
1788  histograms.h_simul2_mvacut[count][i]->Fill(maxMVA);
1789  histograms.h_assoc_mvacut[count][i]->Fill(mvas[i]);
1790  }
1791  if (i >= 1 && i <= selectsHP) {
1792  histograms.h_simul2_mvacut_hp[count][i]->Fill(maxMVA);
1793  histograms.h_assoc_mvacut_hp[count][i]->Fill(mvas[i]);
1794  }
1795  }
1796  }
1797 
1798  if ((*TpSelectorForEfficiencyVsEta)(tp)) {
1799  //effic vs eta
1800  histograms.h_simuleta[count]->Fill(eta);
1801  if (isMatched)
1802  histograms.h_assoceta[count]->Fill(eta);
1803  }
1804 
1805  if ((*TpSelectorForEfficiencyVsPhi)(tp)) {
1806  histograms.h_simulphi[count]->Fill(phi);
1807  if (isMatched)
1808  histograms.h_assocphi[count]->Fill(phi);
1809  //effic vs hits
1810  histograms.h_simulhit[count]->Fill(nSimHits);
1811  histograms.h_simullayer[count]->Fill(nSimLayers);
1812  histograms.h_simulpixellayer[count]->Fill(nSimPixelLayers);
1813  histograms.h_simul3Dlayer[count]->Fill(nSim3DLayers);
1814  if (isMatched) {
1815  histograms.h_assochit[count]->Fill(nSimHits);
1816  histograms.h_assoclayer[count]->Fill(nSimLayers);
1817  histograms.h_assocpixellayer[count]->Fill(nSimPixelLayers);
1818  histograms.h_assoc3Dlayer[count]->Fill(nSim3DLayers);
1819  if (histograms.nrecHit_vs_nsimHit_sim2rec[count])
1820  histograms.nrecHit_vs_nsimHit_sim2rec[count]->Fill(track->numberOfValidHits(), nSimHits);
1821  }
1822  //effic vs pu
1823  histograms.h_simulpu[count]->Fill(numVertices);
1824  if (isMatched)
1825  histograms.h_assocpu[count]->Fill(numVertices);
1826  //efficiency vs dR
1827  histograms.h_simuldr[count]->Fill(dR);
1828  if (isMatched)
1829  histograms.h_assocdr[count]->Fill(dR);
1830  //efficiency vs dR jet
1831  histograms.h_simuldrj[count]->Fill(dRJet);
1832  if (isMatched)
1833  histograms.h_assocdrj[count]->Fill(dRJet);
1834  }
1835 
1836  if ((*TpSelectorForEfficiencyVsPt)(tp)) {
1837  histograms.h_simulpT[count]->Fill(pt);
1838  if (isMatched)
1839  histograms.h_assocpT[count]->Fill(pt);
1840  }
1841 
1843  histograms.h_simuldxy[count]->Fill(dxySim);
1844  if (isMatched)
1845  histograms.h_assocdxy[count]->Fill(dxySim);
1846  if (pvPosition) {
1847  histograms.h_simuldxypv[count]->Fill(dxyPVSim);
1848  histograms.h_simuldxypvzoomed[count]->Fill(dxyPVSim);
1849  if (isMatched) {
1850  histograms.h_assocdxypv[count]->Fill(dxyPVSim);
1851  histograms.h_assocdxypvzoomed[count]->Fill(dxyPVSim);
1852  }
1853  }
1854 
1855  histograms.h_simulvertpos[count]->Fill(vertxy);
1856  if (isMatched)
1857  histograms.h_assocvertpos[count]->Fill(vertxy);
1858  }
1859 
1861  histograms.h_simuldz[count]->Fill(dzSim);
1862  if (isMatched)
1863  histograms.h_assocdz[count]->Fill(dzSim);
1864 
1865  histograms.h_simulzpos[count]->Fill(vertz);
1866  if (isMatched)
1867  histograms.h_assoczpos[count]->Fill(vertz);
1868 
1869  if (pvPosition) {
1870  histograms.h_simuldzpv[count]->Fill(dzPVSim);
1871  histograms.h_simuldzpvzoomed[count]->Fill(dzPVSim);
1872 
1873  histograms.h_simul_dzpvcut[count]->Fill(0);
1874  histograms.h_simul_dzpvsigcut[count]->Fill(0);
1875 
1876  if (isMatched) {
1877  histograms.h_assocdzpv[count]->Fill(dzPVSim);
1878  histograms.h_assocdzpvzoomed[count]->Fill(dzPVSim);
1879 
1880  histograms.h_simul2_dzpvcut[count]->Fill(0);
1881  histograms.h_simul2_dzpvsigcut[count]->Fill(0);
1882  const double dzpvcut = std::abs(track->dz(*pvPosition));
1883  const double dzpvsigcut = dzpvcut / track->dzError();
1884  histograms.h_assoc_dzpvcut[count]->Fill(dzpvcut);
1885  histograms.h_assoc_dzpvsigcut[count]->Fill(dzpvsigcut);
1886  }
1887  }
1888  if (simPVPosition) {
1889  const auto simpvz = simPVPosition->z();
1890  histograms.h_simul_simpvz[count]->Fill(simpvz);
1891  if (isMatched) {
1892  histograms.h_assoc_simpvz[count]->Fill(simpvz);
1893  }
1894  }
1895  }
1896 }
1897 
1899  int count,
1900  const reco::Track& track1,
1901  const reco::Track& track2) const {
1902  histograms.h_duplicates_oriAlgo_vs_oriAlgo[count]->Fill(track1.originalAlgo(), track2.originalAlgo());
1903 }
1904 
1906  histograms.h_tracksSIM->Fill(numSimTracks);
1907 }
1908 
1909 // dE/dx
1911  const Histograms& histograms,
1912  int count,
1913  const edm::RefToBase<reco::Track>& trackref,
1914  const std::vector<const edm::ValueMap<reco::DeDxData>*>& v_dEdx) const {
1915  for (unsigned int i = 0; i < v_dEdx.size(); i++) {
1916  const edm::ValueMap<reco::DeDxData>& dEdxTrack = *(v_dEdx[i]);
1917  const reco::DeDxData& dedx = dEdxTrack[trackref];
1918  histograms.h_dedx_estim[count][i]->Fill(dedx.dEdx());
1919  histograms.h_dedx_nom[count][i]->Fill(dedx.numberOfMeasurements());
1920  histograms.h_dedx_sat[count][i]->Fill(dedx.numberOfSaturatedMeasurements());
1921  }
1922 }
1923 
1925  int count,
1926  const reco::Track& track,
1927  const TrackerTopology& ttopo,
1928  const math::XYZPoint& bsPosition,
1929  const math::XYZPoint* pvPosition,
1930  const TrackingVertex::LorentzVector* simPVPosition,
1931  bool isMatched,
1932  bool isSigMatched,
1933  bool isChargeMatched,
1934  int numAssocRecoTracks,
1935  int numVertices,
1936  int nSimHits,
1937  double sharedFraction,
1938  double dR,
1939  double dRJet,
1940  const std::vector<float>& mvas,
1941  unsigned int selectsLoose,
1942  unsigned int selectsHP) const {
1943  //Fill track algo histogram
1944  histograms.h_algo[count]->Fill(track.algo());
1945  int sharedHits = sharedFraction * track.numberOfValidHits();
1946 
1947  //Compute fake rate vs eta
1948  const auto eta = getEta(track.momentum().eta());
1949  const auto phi = track.momentum().phi();
1950  const auto pt = getPt(sqrt(track.momentum().perp2()));
1951  const auto dxy = track.dxy(bsPosition);
1952  const auto dz = track.dz(bsPosition);
1953  const auto dxypv = pvPosition ? track.dxy(*pvPosition) : 0.0;
1954  const auto dzpv = pvPosition ? track.dz(*pvPosition) : 0.0;
1955  const auto dzpvsig = pvPosition ? dzpv / track.dzError() : 0.0;
1956  const auto nhits = track.found();
1957  const auto nlayers = track.hitPattern().trackerLayersWithMeasurement();
1958  const auto nPixelLayers = track.hitPattern().pixelLayersWithMeasurement();
1959  const auto n3DLayers = nPixelLayers + track.hitPattern().numberOfValidStripLayersWithMonoAndStereo();
1960  const auto refPointWrtBS = track.referencePoint() - bsPosition;
1961  const auto vertxy = std::sqrt(refPointWrtBS.perp2());
1962  const auto vertz = refPointWrtBS.z();
1963  const auto chi2 = track.normalizedChi2();
1964  const auto chi2prob = TMath::Prob(track.chi2(), (int)track.ndof());
1965  const bool fillSeedingLayerSets = !seedingLayerSetNames.empty();
1966  const unsigned int seedingLayerSetBin = fillSeedingLayerSets ? getSeedingLayerSetBin(track, ttopo) : 0;
1967  const auto simpvz = simPVPosition ? simPVPosition->z() : 0.0;
1968 
1969  const bool paramsValid = !trackFromSeedFitFailed(track);
1970 
1971  if (paramsValid) {
1972  histograms.h_recoeta[count]->Fill(eta);
1973  histograms.h_recophi[count]->Fill(phi);
1974  histograms.h_recopT[count]->Fill(pt);
1975  histograms.h_recopTvseta[count]->Fill(eta, pt);
1976  histograms.h_recodxy[count]->Fill(dxy);
1977  histograms.h_recodz[count]->Fill(dz);
1978  histograms.h_recochi2[count]->Fill(chi2);
1979  histograms.h_recochi2prob[count]->Fill(chi2prob);
1980  histograms.h_recovertpos[count]->Fill(vertxy);
1981  histograms.h_recozpos[count]->Fill(vertz);
1982  histograms.h_recodr[count]->Fill(dR);
1983  histograms.h_recodrj[count]->Fill(dRJet);
1984  if (dRJet <= 99999) //dRJet can be set to numeric_limits max^2, this is a protection
1985  histograms.chi2_vs_drj[count]->Fill(dRJet, chi2);
1986  if (fillSeedingLayerSets)
1987  histograms.h_reco_seedingLayerSet[count]->Fill(seedingLayerSetBin);
1988  if (pvPosition) {
1989  histograms.h_recodxypv[count]->Fill(dxypv);
1990  histograms.h_recodzpv[count]->Fill(dzpv);
1991  histograms.h_recodxypvzoomed[count]->Fill(dxypv);
1992  histograms.h_recodzpvzoomed[count]->Fill(dzpv);
1993 
1994  histograms.h_reco_dzpvcut[count]->Fill(std::abs(dzpv));
1995  histograms.h_reco_dzpvsigcut[count]->Fill(std::abs(dzpvsig));
1996  }
1997  if (simPVPosition) {
1998  histograms.h_reco_simpvz[count]->Fill(simpvz);
1999  }
2000  if ((*trackSelectorVsEta)(track, bsPosition)) {
2001  histograms.h_reco2eta[count]->Fill(eta);
2002  }
2003  if ((*trackSelectorVsPt)(track, bsPosition)) {
2004  histograms.h_reco2pT[count]->Fill(pt);
2005  histograms.h_reco2pTvseta[count]->Fill(eta, pt);
2006  }
2007  }
2008  histograms.h_recohit[count]->Fill(nhits);
2009  histograms.h_recolayer[count]->Fill(nlayers);
2010  histograms.h_recopixellayer[count]->Fill(nPixelLayers);
2011  histograms.h_reco3Dlayer[count]->Fill(n3DLayers);
2012  histograms.h_recopu[count]->Fill(numVertices);
2013  if ((*trackSelectorVsPhi)(track, bsPosition)) {
2014  histograms.h_reco2pu[count]->Fill(numVertices);
2015  }
2016 
2017  if (!mvas.empty()) {
2018  assert(histograms.h_reco_mva.size() > static_cast<size_t>(count));
2019  assert(histograms.h_reco_mvacut.size() > static_cast<size_t>(count));
2020  assert(histograms.h_reco_mva_hp.size() > static_cast<size_t>(count));
2021  assert(histograms.h_reco_mvacut_hp.size() > static_cast<size_t>(count));
2022 
2023  fillMVAHistos(histograms.h_reco_mva[count],
2024  histograms.h_reco_mvacut[count],
2025  histograms.h_reco_mva_hp[count],
2026  histograms.h_reco_mvacut_hp[count],
2027  mvas,
2028  selectsLoose,
2029  selectsHP);
2030  }
2031 
2032  if (isMatched) {
2033  if (paramsValid) {
2034  histograms.h_assoc2eta[count]->Fill(eta);
2035  histograms.h_assoc2phi[count]->Fill(phi);
2036  histograms.h_assoc2pT[count]->Fill(pt);
2037  histograms.h_assoc2pTvseta[count]->Fill(eta, pt);
2038  histograms.h_assoc2dxy[count]->Fill(dxy);
2039  histograms.h_assoc2dz[count]->Fill(dz);
2040  histograms.h_assoc2hit[count]->Fill(nhits);
2041  histograms.h_assoc2chi2[count]->Fill(chi2);
2042  histograms.h_assoc2chi2prob[count]->Fill(chi2prob);
2043  histograms.assoc_chi2_vs_eta[count]->Fill(eta, chi2);
2044  histograms.assoc_chi2prob_vs_eta[count]->Fill(eta, chi2prob);
2045  histograms.assoc_chi2_vs_pt[count]->Fill(pt, chi2);
2046  histograms.assoc_chi2prob_vs_pt[count]->Fill(pt, chi2prob);
2047  if (dRJet <= 99999) { //dRJet can be set to numeric_limits max^2, this is a protection
2048  histograms.assoc_chi2_vs_drj[count]->Fill(dRJet, chi2);
2049  histograms.assoc_chi2prob_vs_drj[count]->Fill(dRJet, chi2prob);
2050  }
2051  histograms.h_assoc2vertpos[count]->Fill(vertxy);
2052  histograms.h_assoc2zpos[count]->Fill(vertz);
2053  histograms.h_assoc2dr[count]->Fill(dR);
2054  histograms.h_assoc2drj[count]->Fill(dRJet);
2055  if (fillSeedingLayerSets)
2056  histograms.h_assoc2_seedingLayerSet[count]->Fill(seedingLayerSetBin);
2057  if (pvPosition) {
2058  histograms.h_assoc2dxypv[count]->Fill(dxypv);
2059  histograms.h_assoc2dzpv[count]->Fill(dzpv);
2060  histograms.h_assoc2dxypvzoomed[count]->Fill(dxypv);
2061  histograms.h_assoc2dzpvzoomed[count]->Fill(dzpv);
2062 
2063  histograms.h_assoc2_dzpvcut[count]->Fill(std::abs(dzpv));
2064  histograms.h_assoc2_dzpvsigcut[count]->Fill(std::abs(dzpvsig));
2065  }
2066  if (simPVPosition) {
2067  histograms.h_assoc2_simpvz[count]->Fill(simpvz);
2068  }
2069  }
2070  histograms.h_assoc2layer[count]->Fill(nlayers);
2071  histograms.h_assoc2pixellayer[count]->Fill(nPixelLayers);
2072  histograms.h_assoc23Dlayer[count]->Fill(n3DLayers);
2073  histograms.h_assoc2pu[count]->Fill(numVertices);
2074 
2075  if (!mvas.empty()) {
2076  assert(histograms.h_reco_mva.size() > static_cast<size_t>(count));
2077  assert(histograms.h_reco_mvacut.size() > static_cast<size_t>(count));
2078  assert(histograms.h_reco_mva_hp.size() > static_cast<size_t>(count));
2079  assert(histograms.h_reco_mvacut_hp.size() > static_cast<size_t>(count));
2080  fillMVAHistos(histograms.h_assoc2_mva[count],
2081  histograms.h_assoc2_mvacut[count],
2082  histograms.h_assoc2_mva_hp[count],
2083  histograms.h_assoc2_mvacut_hp[count],
2084  mvas,
2085  selectsLoose,
2086  selectsHP);
2087  assert(histograms.h_assoc2_mva_vs_pt.size() > static_cast<size_t>(count));
2088  assert(histograms.h_assoc2_mva_vs_pt_hp.size() > static_cast<size_t>(count));
2089  fillMVAHistos(pt,
2090  histograms.h_assoc2_mva_vs_pt[count],
2091  histograms.h_assoc2_mva_vs_pt_hp[count],
2092  mvas,
2093  selectsLoose,
2094  selectsHP);
2095  assert(histograms.h_assoc2_mva_vs_eta.size() > static_cast<size_t>(count));
2096  assert(histograms.h_assoc2_mva_vs_eta_hp.size() > static_cast<size_t>(count));
2097  fillMVAHistos(eta,
2098  histograms.h_assoc2_mva_vs_eta[count],
2099  histograms.h_assoc2_mva_vs_eta_hp[count],
2100  mvas,
2101  selectsLoose,
2102  selectsHP);
2103  }
2104 
2105  if (histograms.nrecHit_vs_nsimHit_rec2sim[count])
2106  histograms.nrecHit_vs_nsimHit_rec2sim[count]->Fill(track.numberOfValidHits(), nSimHits);
2107  histograms.h_assocFraction[count]->Fill(sharedFraction);
2108  histograms.h_assocSharedHit[count]->Fill(sharedHits);
2109 
2110  if (!doSeedPlots_ && !isChargeMatched) {
2111  histograms.h_misideta[count]->Fill(eta);
2112  histograms.h_misidphi[count]->Fill(phi);
2113  histograms.h_misidpT[count]->Fill(pt);
2114  histograms.h_misidpTvseta[count]->Fill(eta, pt);
2115  histograms.h_misiddxy[count]->Fill(dxy);
2116  histograms.h_misiddz[count]->Fill(dz);
2117  histograms.h_misidhit[count]->Fill(nhits);
2118  histograms.h_misidlayer[count]->Fill(nlayers);
2119  histograms.h_misidpixellayer[count]->Fill(nPixelLayers);
2120  histograms.h_misid3Dlayer[count]->Fill(n3DLayers);
2121  histograms.h_misidpu[count]->Fill(numVertices);
2122  histograms.h_misidchi2[count]->Fill(chi2);
2123  histograms.h_misidchi2prob[count]->Fill(chi2prob);
2124  if (pvPosition) {
2125  histograms.h_misiddxypv[count]->Fill(dxypv);
2126  histograms.h_misiddzpv[count]->Fill(dzpv);
2127  histograms.h_misiddxypvzoomed[count]->Fill(dxypv);
2128  histograms.h_misiddzpvzoomed[count]->Fill(dzpv);
2129  }
2130  }
2131 
2132  if (numAssocRecoTracks > 1) {
2133  if (paramsValid) {
2134  histograms.h_loopereta[count]->Fill(eta);
2135  histograms.h_looperphi[count]->Fill(phi);
2136  histograms.h_looperpT[count]->Fill(pt);
2137  histograms.h_looperpTvseta[count]->Fill(eta, pt);
2138  histograms.h_looperdxy[count]->Fill(dxy);
2139  histograms.h_looperdz[count]->Fill(dz);
2140  histograms.h_looperchi2[count]->Fill(chi2);
2141  histograms.h_looperchi2prob[count]->Fill(chi2prob);
2142  histograms.h_loopervertpos[count]->Fill(vertxy);
2143  histograms.h_looperzpos[count]->Fill(vertz);
2144  histograms.h_looperdr[count]->Fill(dR);
2145  histograms.h_looperdrj[count]->Fill(dRJet);
2146  if (fillSeedingLayerSets)
2147  histograms.h_looper_seedingLayerSet[count]->Fill(seedingLayerSetBin);
2148  if (pvPosition) {
2149  histograms.h_looperdxypv[count]->Fill(dxypv);
2150  histograms.h_looperdzpv[count]->Fill(dzpv);
2151  histograms.h_looperdxypvzoomed[count]->Fill(dxypv);
2152  histograms.h_looperdzpvzoomed[count]->Fill(dzpv);
2153  }
2154  if (simPVPosition) {
2155  histograms.h_looper_simpvz[count]->Fill(simpvz);
2156  }
2157  }
2158  histograms.h_looperhit[count]->Fill(nhits);
2159  histograms.h_looperlayer[count]->Fill(nlayers);
2160  histograms.h_looperpixellayer[count]->Fill(nPixelLayers);
2161  histograms.h_looper3Dlayer[count]->Fill(n3DLayers);
2162  histograms.h_looperpu[count]->Fill(numVertices);
2163  }
2164  if (!isSigMatched) {
2165  if (paramsValid) {
2166  histograms.h_pileupeta[count]->Fill(eta);
2167  histograms.h_pileupphi[count]->Fill(phi);
2168  histograms.h_pileuppT[count]->Fill(pt);
2169  histograms.h_pileuppTvseta[count]->Fill(eta, pt);
2170  histograms.h_pileupdxy[count]->Fill(dxy);
2171  histograms.h_pileupdz[count]->Fill(dz);
2172  histograms.h_pileupchi2[count]->Fill(chi2);
2173  histograms.h_pileupchi2prob[count]->Fill(chi2prob);
2174  histograms.h_pileupvertpos[count]->Fill(vertxy);
2175  histograms.h_pileupzpos[count]->Fill(vertz);
2176  histograms.h_pileupdr[count]->Fill(dR);
2177  histograms.h_pileupdrj[count]->Fill(dRJet);
2178  if (fillSeedingLayerSets)
2179  histograms.h_pileup_seedingLayerSet[count]->Fill(seedingLayerSetBin);
2180  if (pvPosition) {
2181  histograms.h_pileupdxypv[count]->Fill(dxypv);
2182  histograms.h_pileupdzpv[count]->Fill(dzpv);
2183  histograms.h_pileupdxypvzoomed[count]->Fill(dxypv);
2184  histograms.h_pileupdzpvzoomed[count]->Fill(dzpv);
2185 
2186  histograms.h_pileup_dzpvcut[count]->Fill(std::abs(dzpv));
2187  histograms.h_pileup_dzpvsigcut[count]->Fill(std::abs(dzpvsig));
2188  }
2189  if (simPVPosition) {
2190  histograms.h_pileup_simpvz[count]->Fill(simpvz);
2191  }
2192  }
2193  histograms.h_pileuphit[count]->Fill(nhits);
2194  histograms.h_pileuplayer[count]->Fill(nlayers);
2195  histograms.h_pileuppixellayer[count]->Fill(nPixelLayers);
2196  histograms.h_pileup3Dlayer[count]->Fill(n3DLayers);
2197  histograms.h_pileuppu[count]->Fill(numVertices);
2198  }
2199  } else { // !isMatched
2200  if (!mvas.empty()) {
2201  assert(histograms.h_fake_mva_vs_pt.size() > static_cast<size_t>(count));
2202  assert(histograms.h_fake_mva_vs_pt_hp.size() > static_cast<size_t>(count));
2203  assert(histograms.h_fake_mva_vs_eta.size() > static_cast<size_t>(count));
2204  assert(histograms.h_fake_mva_vs_eta_hp.size() > static_cast<size_t>(count));
2205  fillMVAHistos(
2206  pt, histograms.h_fake_mva_vs_pt[count], histograms.h_fake_mva_vs_pt_hp[count], mvas, selectsLoose, selectsHP);
2207  fillMVAHistos(eta,
2208  histograms.h_fake_mva_vs_eta[count],
2209  histograms.h_fake_mva_vs_eta_hp[count],
2210  mvas,
2211  selectsLoose,
2212  selectsHP);
2213  }
2214  }
2215 }
2216 
2218  int count,
2219  const reco::Track& track) const {
2220  //nchi2 and hits global distributions
2221  histograms.h_hits[count]->Fill(track.numberOfValidHits());
2222  histograms.h_losthits[count]->Fill(track.numberOfLostHits());
2223  histograms.h_nmisslayers_inner[count]->Fill(
2224  track.hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS));
2225  histograms.h_nmisslayers_outer[count]->Fill(
2226  track.hitPattern().numberOfLostHits(reco::HitPattern::MISSING_OUTER_HITS));
2228  return;
2229 
2230  histograms.h_nchi2[count]->Fill(track.normalizedChi2());
2231  histograms.h_nchi2_prob[count]->Fill(TMath::Prob(track.chi2(), (int)track.ndof()));
2232  histograms.chi2_vs_nhits[count]->Fill(track.numberOfValidHits(), track.normalizedChi2());
2233  histograms.h_charge[count]->Fill(track.charge());
2234 
2235  //chi2 and #hit vs eta: fill 2D histos
2236  const auto eta = getEta(track.eta());
2237  histograms.chi2_vs_eta[count]->Fill(eta, track.normalizedChi2());
2238  histograms.nhits_vs_eta[count]->Fill(eta, track.numberOfValidHits());
2239  const auto pt = getPt(sqrt(track.momentum().perp2()));
2240  histograms.chi2_vs_pt[count]->Fill(pt, track.normalizedChi2());
2241  const auto pxbHits = track.hitPattern().numberOfValidPixelBarrelHits();
2242  const auto pxfHits = track.hitPattern().numberOfValidPixelEndcapHits();
2243  const auto tibHits = track.hitPattern().numberOfValidStripTIBHits();
2244  const auto tidHits = track.hitPattern().numberOfValidStripTIDHits();
2245  const auto tobHits = track.hitPattern().numberOfValidStripTOBHits();
2246  const auto tecHits = track.hitPattern().numberOfValidStripTECHits();
2247  histograms.nPXBhits_vs_eta[count]->Fill(eta, pxbHits);
2248  histograms.nPXFhits_vs_eta[count]->Fill(eta, pxfHits);
2249  histograms.nPXLhits_vs_eta[count]->Fill(eta, pxbHits + pxfHits);
2250  histograms.nTIBhits_vs_eta[count]->Fill(eta, tibHits);
2251  histograms.nTIDhits_vs_eta[count]->Fill(eta, tidHits);
2252  histograms.nTOBhits_vs_eta[count]->Fill(eta, tobHits);
2253  histograms.nTEChits_vs_eta[count]->Fill(eta, tecHits);
2254  histograms.nSTRIPhits_vs_eta[count]->Fill(eta, tibHits + tidHits + tobHits + tecHits);
2255  histograms.nLayersWithMeas_vs_eta[count]->Fill(eta, track.hitPattern().trackerLayersWithMeasurement());
2256  histograms.nPXLlayersWithMeas_vs_eta[count]->Fill(eta, track.hitPattern().pixelLayersWithMeasurement());
2257  if (doMTDPlots_) {
2258  // const auto mtdHits = track.hitPattern().numberOfValidTimingHits();
2259  const auto btlHits = track.hitPattern().numberOfValidTimingBTLHits();
2260  const auto etlHits = track.hitPattern().numberOfValidTimingETLHits();
2261  histograms.nMTDhits_vs_eta[count]->Fill(eta, btlHits + etlHits);
2262  histograms.nBTLhits_vs_eta[count]->Fill(eta, btlHits);
2263  histograms.nETLhits_vs_eta[count]->Fill(eta, etlHits);
2264  }
2265  int LayersAll = track.hitPattern().stripLayersWithMeasurement();
2266  int Layers2D = track.hitPattern().numberOfValidStripLayersWithMonoAndStereo();
2267  int Layers1D = LayersAll - Layers2D;
2268  histograms.nSTRIPlayersWithMeas_vs_eta[count]->Fill(eta, LayersAll);
2269  histograms.nSTRIPlayersWith1dMeas_vs_eta[count]->Fill(eta, Layers1D);
2270  histograms.nSTRIPlayersWith2dMeas_vs_eta[count]->Fill(eta, Layers2D);
2271 
2272  histograms.nlosthits_vs_eta[count]->Fill(eta, track.numberOfLostHits());
2273 }
2274 
2276  int count,
2277  int assTracks,
2278  int numRecoTracks,
2279  int numRecoTracksSelected,
2280  int numSimTracksSelected) const {
2281  histograms.h_tracks[count]->Fill(assTracks);
2282  histograms.h_fakes[count]->Fill(numRecoTracks - assTracks);
2283  if (histograms.nrec_vs_nsim[count])
2284  histograms.nrec_vs_nsim[count]->Fill(numSimTracksSelected, numRecoTracksSelected);
2285 }
2286 
2288  int count,
2289  const TrackingParticle::Vector& momentumTP,
2290  const TrackingParticle::Point& vertexTP,
2291  int chargeTP,
2292  const reco::Track& track,
2293  const math::XYZPoint& bsPosition) const {
2295  return;
2296 
2297  // evaluation of TP parameters
2298  double qoverpSim = chargeTP / sqrt(momentumTP.x() * momentumTP.x() + momentumTP.y() * momentumTP.y() +
2299  momentumTP.z() * momentumTP.z());
2300  double lambdaSim = M_PI / 2 - momentumTP.theta();
2301  double phiSim = momentumTP.phi();
2302  double dxySim = TrackingParticleIP::dxy(vertexTP, momentumTP, bsPosition);
2303  double dzSim = TrackingParticleIP::dz(vertexTP, momentumTP, bsPosition);
2304 
2305  // reco::Track::ParameterVector rParameters = track.parameters(); // UNUSED
2306 
2307  double qoverpRec(0);
2308  double qoverpErrorRec(0);
2309  double ptRec(0);
2310  double ptErrorRec(0);
2311  double lambdaRec(0);
2312  double lambdaErrorRec(0);
2313  double phiRec(0);
2314  double phiErrorRec(0);
2315 
2316  /* TO BE FIXED LATER -----------
2317  //loop to decide whether to take gsfTrack (utilisation of mode-function) or common track
2318  const GsfTrack* gsfTrack(0);
2319  if(useGsf){
2320  gsfTrack = dynamic_cast<const GsfTrack*>(&(*track));
2321  if (gsfTrack==0) edm::LogInfo("TrackValidator") << "Trying to access mode for a non-GsfTrack";
2322  }
2323 
2324  if (gsfTrack) {
2325  // get values from mode
2326  getRecoMomentum(*gsfTrack, ptRec, ptErrorRec, qoverpRec, qoverpErrorRec,
2327  lambdaRec,lambdaErrorRec, phiRec, phiErrorRec);
2328  }
2329 
2330  else {
2331  // get values from track (without mode)
2332  getRecoMomentum(*track, ptRec, ptErrorRec, qoverpRec, qoverpErrorRec,
2333  lambdaRec,lambdaErrorRec, phiRec, phiErrorRec);
2334  }
2335  */
2336  getRecoMomentum(track, ptRec, ptErrorRec, qoverpRec, qoverpErrorRec, lambdaRec, lambdaErrorRec, phiRec, phiErrorRec);
2337  // -------------
2338 
2339  double ptError = ptErrorRec;
2340  double ptres = ptRec - sqrt(momentumTP.perp2());
2341  double etares = track.eta() - momentumTP.Eta();
2342 
2343  double dxyRec = track.dxy(bsPosition);
2344  double dzRec = track.dz(bsPosition);
2345 
2346  const auto phiRes = phiRec - phiSim;
2347  const auto dxyRes = dxyRec - dxySim;
2348  const auto dzRes = dzRec - dzSim;
2349  const auto cotThetaRes = 1 / tan(M_PI * 0.5 - lambdaRec) - 1 / tan(M_PI * 0.5 - lambdaSim);
2350 
2351  // eta residue; pt, k, theta, phi, dxy, dz pulls
2352  double qoverpPull = (qoverpRec - qoverpSim) / qoverpErrorRec;
2353  double thetaPull = (lambdaRec - lambdaSim) / lambdaErrorRec;
2354  double phiPull = phiRes / phiErrorRec;
2355  double dxyPull = dxyRes / track.dxyError();
2356  double dzPull = dzRes / track.dzError();
2357 
2358 #ifdef EDM_ML_DEBUG
2359  double contrib_Qoverp = ((qoverpRec - qoverpSim) / qoverpErrorRec) * ((qoverpRec - qoverpSim) / qoverpErrorRec) / 5;
2360  double contrib_dxy = ((dxyRec - dxySim) / track.dxyError()) * ((dxyRec - dxySim) / track.dxyError()) / 5;
2361  double contrib_dz = ((dzRec - dzSim) / track.dzError()) * ((dzRec - dzSim) / track.dzError()) / 5;
2362  double contrib_theta = ((lambdaRec - lambdaSim) / lambdaErrorRec) * ((lambdaRec - lambdaSim) / lambdaErrorRec) / 5;
2363  double contrib_phi = ((phiRec - phiSim) / phiErrorRec) * ((phiRec - phiSim) / phiErrorRec) / 5;
2364 
2365  LogTrace("TrackValidatorTEST")
2366  //<< "assocChi2=" << tp.begin()->second << "\n"
2367  << ""
2368  << "\n"
2369  << "ptREC=" << ptRec << "\n"
2370  << "etaREC=" << track.eta() << "\n"
2371  << "qoverpREC=" << qoverpRec << "\n"
2372  << "dxyREC=" << dxyRec << "\n"
2373  << "dzREC=" << dzRec << "\n"
2374  << "thetaREC=" << track.theta() << "\n"
2375  << "phiREC=" << phiRec << "\n"
2376  << ""
2377  << "\n"
2378  << "qoverpError()=" << qoverpErrorRec << "\n"
2379  << "dxyError()=" << track.dxyError() << "\n"
2380  << "dzError()=" << track.dzError() << "\n"
2381  << "thetaError()=" << lambdaErrorRec << "\n"
2382  << "phiError()=" << phiErrorRec << "\n"
2383  << ""
2384  << "\n"
2385  << "ptSIM=" << sqrt(momentumTP.perp2()) << "\n"
2386  << "etaSIM=" << momentumTP.Eta() << "\n"
2387  << "qoverpSIM=" << qoverpSim << "\n"
2388  << "dxySIM=" << dxySim << "\n"
2389  << "dzSIM=" << dzSim << "\n"
2390  << "thetaSIM=" << M_PI / 2 - lambdaSim << "\n"
2391  << "phiSIM=" << phiSim << "\n"
2392  << ""
2393  << "\n"
2394  << "contrib_Qoverp=" << contrib_Qoverp << "\n"
2395  << "contrib_dxy=" << contrib_dxy << "\n"
2396  << "contrib_dz=" << contrib_dz << "\n"
2397  << "contrib_theta=" << contrib_theta << "\n"
2398  << "contrib_phi=" << contrib_phi << "\n"
2399  << ""
2400  << "\n"
2401  << "chi2PULL=" << contrib_Qoverp + contrib_dxy + contrib_dz + contrib_theta + contrib_phi << "\n";
2402 #endif
2403 
2404  histograms.h_pullQoverp[count]->Fill(qoverpPull);
2405  histograms.h_pullTheta[count]->Fill(thetaPull);
2406  histograms.h_pullPhi[count]->Fill(phiPull);
2407  histograms.h_pullDxy[count]->Fill(dxyPull);
2408  histograms.h_pullDz[count]->Fill(dzPull);
2409 
2410  const auto etaSim = getEta(momentumTP.eta());
2411  const auto ptSim = getPt(sqrt(momentumTP.perp2()));
2412 
2413  histograms.h_pt[count]->Fill(ptres / ptError);
2414  histograms.h_eta[count]->Fill(etares);
2415  //histograms.etares_vs_eta[count]->Fill(getEta(track.eta()),etares);
2416  histograms.etares_vs_eta[count]->Fill(etaSim, etares);
2417 
2418  //resolution of track params: fill 2D histos
2419  histograms.dxyres_vs_eta[count]->Fill(etaSim, dxyRes);
2420  histograms.ptres_vs_eta[count]->Fill(etaSim, ptres / ptRec);
2421  histograms.dzres_vs_eta[count]->Fill(etaSim, dzRes);
2422  histograms.phires_vs_eta[count]->Fill(etaSim, phiRes);
2423  histograms.cotThetares_vs_eta[count]->Fill(etaSim, cotThetaRes);
2424 
2425  //same as before but vs pT
2426  histograms.dxyres_vs_pt[count]->Fill(ptSim, dxyRes);
2427  histograms.ptres_vs_pt[count]->Fill(ptSim, ptres / ptRec);
2428  histograms.dzres_vs_pt[count]->Fill(ptSim, dzRes);
2429  histograms.phires_vs_pt[count]->Fill(ptSim, phiRes);
2430  histograms.cotThetares_vs_pt[count]->Fill(ptSim, cotThetaRes);
2431 
2432  //pulls of track params vs eta: fill 2D histos
2433  histograms.dxypull_vs_eta[count]->Fill(etaSim, dxyPull);
2434  histograms.ptpull_vs_eta[count]->Fill(etaSim, ptres / ptError);
2435  histograms.dzpull_vs_eta[count]->Fill(etaSim, dzPull);
2436  histograms.phipull_vs_eta[count]->Fill(etaSim, phiPull);
2437  histograms.thetapull_vs_eta[count]->Fill(etaSim, thetaPull);
2438 
2439  //pulls of track params vs pt: fill 2D histos
2440  histograms.dxypull_vs_pt[count]->Fill(ptSim, dxyPull);
2441  histograms.ptpull_vs_pt[count]->Fill(ptSim, ptres / ptError);
2442  histograms.dzpull_vs_pt[count]->Fill(ptSim, dzPull);
2443  histograms.phipull_vs_pt[count]->Fill(ptSim, phiPull);
2444  histograms.thetapull_vs_pt[count]->Fill(ptSim, thetaPull);
2445 
2446  //plots vs phi
2447  histograms.nhits_vs_phi[count]->Fill(phiRec, track.numberOfValidHits());
2448  histograms.chi2_vs_phi[count]->Fill(phiRec, track.normalizedChi2());
2449  histograms.ptmean_vs_eta_phi[count]->Fill(phiRec, getEta(track.eta()), ptRec);
2450  histograms.phimean_vs_eta_phi[count]->Fill(phiRec, getEta(track.eta()), phiRec);
2451 
2452  histograms.dxyres_vs_phi[count]->Fill(phiSim, dxyRes);
2453  histograms.ptres_vs_phi[count]->Fill(phiSim, ptres / ptRec);
2454  histograms.dzres_vs_phi[count]->Fill(phiSim, dzRes);
2455  histograms.phires_vs_phi[count]->Fill(phiSim, phiRes);
2456 
2457  histograms.ptpull_vs_phi[count]->Fill(phiSim, ptres / ptError);
2458  histograms.phipull_vs_phi[count]->Fill(phiSim, phiPull);
2459  histograms.thetapull_vs_phi[count]->Fill(phiSim, thetaPull);
2460 }
2461 
2463  double& pt,
2464  double& ptError,
2465  double& qoverp,
2466  double& qoverpError,
2467  double& lambda,
2468  double& lambdaError,
2469  double& phi,
2470  double& phiError) const {
2471  pt = track.pt();
2472  ptError = track.ptError();
2473  qoverp = track.qoverp();
2474  qoverpError = track.qoverpError();
2475  lambda = track.lambda();
2476  lambdaError = track.lambdaError();
2477  phi = track.phi();
2478  phiError = track.phiError();
2479  // cout <<"test1" << endl;
2480 }
2481 
2483  double& pt,
2484  double& ptError,
2485  double& qoverp,
2486  double& qoverpError,
2487  double& lambda,
2488  double& lambdaError,
2489  double& phi,
2490  double& phiError) const {
2491  pt = gsfTrack.ptMode();
2492  ptError = gsfTrack.ptModeError();
2493  qoverp = gsfTrack.qoverpMode();
2494  qoverpError = gsfTrack.qoverpModeError();
2495  lambda = gsfTrack.lambdaMode();
2496  lambdaError = gsfTrack.lambdaModeError();
2497  phi = gsfTrack.phiMode();
2498  phiError = gsfTrack.phiModeError();
2499  // cout <<"test2" << endl;
2500 }
2501 
2503  if (useFabsEta)
2504  return fabs(eta);
2505  else
2506  return eta;
2507 }
2508 
2510  if (useInvPt && pt != 0)
2511  return 1 / pt;
2512  else
2513  return pt;
2514 }
2515 
2517  const TrackerTopology& ttopo) const {
2518  if (track.seedRef().isNull() || !track.seedRef().isAvailable())
2519  return seedingLayerSetNames.size() - 1;
2520 
2521  const TrajectorySeed& seed = *(track.seedRef());
2522  SeedingLayerSetId searchId;
2523  const int nhits = seed.nHits();
2524  if (nhits > static_cast<int>(std::tuple_size<SeedingLayerSetId>::value)) {
2525  LogDebug("TrackValidator") << "Got seed with " << nhits << " hits, but I have a hard-coded maximum of "
2527  << ", classifying the seed as 'unknown'. Please increase the maximum in "
2528  "MTVHistoProducerAlgoForTracker.h if needed.";
2529  return seedingLayerSetNames.size() - 1;
2530  }
2531  int i = 0;
2532  for (auto const& recHit : seed.recHits()) {
2533  DetId detId = recHit.geographicalId();
2534 
2535  if (detId.det() != DetId::Tracker) {
2536  throw cms::Exception("LogicError") << "Encountered seed hit detId " << detId.rawId() << " not from Tracker, but "
2537  << detId.det();
2538  }
2539 
2541  bool subdetStrip = false;
2542  switch (detId.subdetId()) {
2545  break;
2548  break;
2549  case StripSubdetector::TIB:
2550  subdet = GeomDetEnumerators::TIB;
2551  subdetStrip = true;
2552  break;
2553  case StripSubdetector::TID:
2554  subdet = GeomDetEnumerators::TID;
2555  subdetStrip = true;
2556  break;
2557  case StripSubdetector::TOB:
2558  subdet = GeomDetEnumerators::TOB;
2559  subdetStrip = true;
2560  break;
2561  case StripSubdetector::TEC:
2562  subdet = GeomDetEnumerators::TEC;
2563  subdetStrip = true;
2564  break;
2565  default:
2566  throw cms::Exception("LogicError") << "Unknown subdetId " << detId.subdetId();
2567  };
2568 
2569  TrackerDetSide side = static_cast<TrackerDetSide>(ttopo.side(detId));
2570 
2571  // Even with the recent addition of
2572  // SeedingLayerSetsBuilder::fillDescription() this assumption is a
2573  // bit ugly.
2574  const bool isStripMono = subdetStrip && trackerHitRTTI::isSingle(recHit);
2575  searchId[i] =
2576  SeedingLayerId(SeedingLayerSetsBuilder::SeedingLayerId(subdet, side, ttopo.layer(detId)), isStripMono);
2577  ++i;
2578  }
2579  auto found = seedingLayerSetToBin.find(searchId);
2580  if (found == seedingLayerSetToBin.end()) {
2581  return seedingLayerSetNames.size() - 1;
2582  }
2583  return found->second;
2584 }
2585 
2587  int count,
2588  const reco::GenParticle& tp,
2589  const TrackingParticle::Vector& momentumTP,
2590  const TrackingParticle::Point& vertexTP,
2591  double dxySim,
2592  double dzSim,
2593  int nSimHits,
2594  const reco::Track* track,
2595  int numVertices) const {
2596  bool isMatched = track;
2597 
2598  if ((*GpSelectorForEfficiencyVsEta)(tp)) {
2599  //effic vs eta
2600  histograms.h_simuleta[count]->Fill(getEta(momentumTP.eta()));
2601  if (isMatched)
2602  histograms.h_assoceta[count]->Fill(getEta(momentumTP.eta()));
2603  }
2604 
2605  if ((*GpSelectorForEfficiencyVsPhi)(tp)) {
2606  histograms.h_simulphi[count]->Fill(momentumTP.phi());
2607  if (isMatched)
2608  histograms.h_assocphi[count]->Fill(momentumTP.phi());
2609  //effic vs hits
2610  histograms.h_simulhit[count]->Fill((int)nSimHits);
2611  if (isMatched) {
2612  histograms.h_assochit[count]->Fill((int)nSimHits);
2613  if (histograms.nrecHit_vs_nsimHit_sim2rec[count])
2614  histograms.nrecHit_vs_nsimHit_sim2rec[count]->Fill(track->numberOfValidHits(), nSimHits);
2615  }
2616  //effic vs pu
2617  histograms.h_simulpu[count]->Fill(numVertices);
2618  if (isMatched)
2619  histograms.h_assocpu[count]->Fill(numVertices);
2620  //efficiency vs dR
2621  //not implemented for now
2622  }
2623 
2624  if ((*GpSelectorForEfficiencyVsPt)(tp)) {
2625  histograms.h_simulpT[count]->Fill(getPt(sqrt(momentumTP.perp2())));
2626  histograms.h_simulpTvseta[count]->Fill(getEta(momentumTP.eta()), getPt(sqrt(momentumTP.perp2())));
2627  if (isMatched) {
2628  histograms.h_assocpT[count]->Fill(getPt(sqrt(momentumTP.perp2())));
2629  histograms.h_assocpTvseta[count]->Fill(getEta(momentumTP.eta()), getPt(sqrt(momentumTP.perp2())));
2630  }
2631  }
2632 
2634  histograms.h_simuldxy[count]->Fill(dxySim);
2635  if (isMatched)
2636  histograms.h_assocdxy[count]->Fill(dxySim);
2637 
2638  histograms.h_simulvertpos[count]->Fill(sqrt(vertexTP.perp2()));
2639  if (isMatched)
2640  histograms.h_assocvertpos[count]->Fill(sqrt(vertexTP.perp2()));
2641  }
2642 
2644  histograms.h_simuldz[count]->Fill(dzSim);
2645  if (isMatched)
2646  histograms.h_assocdz[count]->Fill(dzSim);
2647 
2648  histograms.h_simulzpos[count]->Fill(vertexTP.z());
2649  if (isMatched)
2650  histograms.h_assoczpos[count]->Fill(vertexTP.z());
2651  }
2652 }
2653 
2655  int count,
2656  int seedsFitFailed,
2657  int seedsTotal) const {
2658  histograms.h_seedsFitFailed[count]->Fill(seedsFitFailed);
2659  histograms.h_seedsFitFailedFraction[count]->Fill(static_cast<double>(seedsFitFailed) / seedsTotal);
2660 }
MTVHistoProducerAlgoForTracker::trackSelectorVsEta
std::unique_ptr< RecoTrackSelectorBase > trackSelectorVsEta
Definition: MTVHistoProducerAlgoForTracker.h:287
reco::GsfTrack::ptMode
double ptMode() const
track transverse momentum from mode
Definition: GsfTrack.h:47
MTVHistoProducerAlgoForTracker::maxPt
double maxPt
Definition: MTVHistoProducerAlgoForTracker.h:301
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
writedatasetfile.args
args
Definition: writedatasetfile.py:18
GeomDetEnumerators::SubDetector
SubDetector
Definition: GeomDetEnumerators.h:10
reco::HitPattern::MISSING_OUTER_HITS
Definition: HitPattern.h:155
MTVHistoProducerAlgoForTracker::bookRecoPVAssociationHistos
void bookRecoPVAssociationHistos(DQMStore::IBooker &ibook, Histograms &histograms)
Definition: MTVHistoProducerAlgoForTracker.cc:1416
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
reco::GsfTrack::lambdaModeError
double lambdaModeError() const
error on lambda from mode
Definition: GsfTrack.h:92
MTVHistoProducerAlgoForTracker::maxHit
double maxHit
Definition: MTVHistoProducerAlgoForTracker.h:305
TrackerTopology::side
unsigned int side(const DetId &id) const
Definition: TrackerTopology.cc:28
reco::GsfTrack::phiModeError
double phiModeError() const
error on phi from mode
Definition: GsfTrack.h:96
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
MTVHistoProducerAlgoForTracker::nintTracks
int nintTracks
Definition: MTVHistoProducerAlgoForTracker.h:334
MTVHistoProducerAlgoForTracker::useInvPt
bool useInvPt
Definition: MTVHistoProducerAlgoForTracker.h:303
MTVHistoProducerAlgoForTracker::maxTracks
double maxTracks
Definition: MTVHistoProducerAlgoForTracker.h:333
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
MTVHistoProducerAlgoForTracker::minPu
double minPu
Definition: MTVHistoProducerAlgoForTracker.h:307
MTVHistoProducerAlgoForTracker::fill_duplicate_histos
void fill_duplicate_histos(const Histograms &histograms, int count, const reco::Track &track1, const reco::Track &track2) const
Definition: MTVHistoProducerAlgoForTracker.cc:1898
MTVHistoProducerAlgoForTracker::generalGpSelector
std::unique_ptr< GenParticleCustomSelector > generalGpSelector
Definition: MTVHistoProducerAlgoForTracker.h:291
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
MTVHistoProducerAlgoForTracker::minDxy
double minDxy
Definition: MTVHistoProducerAlgoForTracker.h:313
reco::GsfTrack::qoverpMode
double qoverpMode() const
q/p from mode
Definition: GsfTrack.h:39
MessageLogger.h
MTVHistoProducerAlgoForTracker::getSeedingLayerSetBin
unsigned int getSeedingLayerSetBin(const reco::Track &track, const TrackerTopology &ttopo) const
Definition: MTVHistoProducerAlgoForTracker.cc:2516
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
MTVHistoProducerAlgoForTracker::minDz
double minDz
Definition: MTVHistoProducerAlgoForTracker.h:315
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
GeomDetEnumerators::TID
Definition: GeomDetEnumerators.h:15
DeDxData.h
MTVHistoProducerAlgoForTracker::phiRes_rangeMin
double phiRes_rangeMin
Definition: MTVHistoProducerAlgoForTracker.h:346
MTVHistoProducerAlgoForTracker::bookSeedHistos
void bookSeedHistos(DQMStore::IBooker &ibook, Histograms &histograms)
Definition: MTVHistoProducerAlgoForTracker.cc:1536
MTVHistoProducerAlgoForTracker::GpSelectorForEfficiencyVsEta
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsEta
Definition: MTVHistoProducerAlgoForTracker.h:292
trackerHitRTTI::isSingle
bool isSingle(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:26
reco::GenParticle
Definition: GenParticle.h:21
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
MTVHistoProducerAlgoForTracker::TpSelectorForEfficiencyVsVTXR
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsVTXR
Definition: MTVHistoProducerAlgoForTracker.h:284
MTVHistoProducerAlgoForTracker::nintDeDx
int nintDeDx
Definition: MTVHistoProducerAlgoForTracker.h:330
MTVHistoProducerAlgoForTracker::useFabsEta
bool useFabsEta
Definition: MTVHistoProducerAlgoForTracker.h:300
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
MTVHistoProducerAlgoForTracker::useLogPt
bool useLogPt
Definition: MTVHistoProducerAlgoForTracker.h:304
MTVHistoProducerAlgoForTracker::GpSelectorForEfficiencyVsPt
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsPt
Definition: MTVHistoProducerAlgoForTracker.h:294
MTVHistoProducerAlgoForTracker::GpSelectorForEfficiencyVsVTXZ
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsVTXZ
Definition: MTVHistoProducerAlgoForTracker.h:296
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
dqm::implementation::IBooker::bookProfile2D
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
reco::GsfTrack::lambdaMode
double lambdaMode() const
Lambda angle from mode.
Definition: GsfTrack.h:43
GeomDetEnumerators::TIB
Definition: GeomDetEnumerators.h:13
MTVHistoProducerAlgoForTracker::maxMVA
double maxMVA
Definition: MTVHistoProducerAlgoForTracker.h:337
MTVHistoProducerAlgoForTracker::maxDeDx
double maxDeDx
Definition: MTVHistoProducerAlgoForTracker.h:329
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
MTVHistoProducerAlgoForTracker::fill_trackBased_histos
void fill_trackBased_histos(const Histograms &histograms, int count, int assTracks, int numRecoTracks, int numRecoTracksSelected, int numSimTracksSelected) const
Definition: MTVHistoProducerAlgoForTracker.cc:2275
MTVHistoProducerAlgoForTracker::maxLayers
double maxLayers
Definition: MTVHistoProducerAlgoForTracker.h:309
to
cms::cuda::assert
assert(be >=bs)
MTVHistoProducerAlgoForTracker::maxdr
double maxdr
Definition: MTVHistoProducerAlgoForTracker.h:323
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
GeomDetEnumerators::TOB
Definition: GeomDetEnumerators.h:14
MTVHistoProducerAlgoForTracker::TpSelectorForEfficiencyVsEta
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsEta
Definition: MTVHistoProducerAlgoForTracker.h:281
MTVHistoProducerAlgoForTracker::nintDzpvCum
int nintDzpvCum
Definition: MTVHistoProducerAlgoForTracker.h:356
MTVHistoProducerAlgoForTracker::trackSelectorVsPhi
std::unique_ptr< RecoTrackSelectorBase > trackSelectorVsPhi
Definition: MTVHistoProducerAlgoForTracker.h:288
MTVHistoProducerAlgoForTracker::fill_ResoAndPull_recoTrack_histos
void fill_ResoAndPull_recoTrack_histos(const Histograms &histograms, int count, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, int chargeTP, const reco::Track &track, const math::XYZPoint &bsPosition) const
Definition: MTVHistoProducerAlgoForTracker.cc:2287
MTVHistoProducerAlgoForTracker::TpSelectorForEfficiencyVsPt
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsPt
Definition: MTVHistoProducerAlgoForTracker.h:283
reco::TrackBase::originalAlgo
TrackAlgorithm originalAlgo() const
Definition: TrackBase.h:548
MTVHistoProducerAlgoForTracker::maxChi2
double maxChi2
Definition: MTVHistoProducerAlgoForTracker.h:327
TrackingParticle::Vector
math::XYZVectorD Vector
point in the space
Definition: TrackingParticle.h:37
edm::ParameterSet::copyForModify
void copyForModify(ParameterSet const &other)
Definition: ParameterSet.cc:100
reco::GsfTrack::phiMode
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:55
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
muonCosmicCompatibility_cfi.sharedHits
sharedHits
Definition: muonCosmicCompatibility_cfi.py:31
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
MTVHistoProducerAlgoForTracker::GpSelectorForEfficiencyVsPhi
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsPhi
Definition: MTVHistoProducerAlgoForTracker.h:293
MTVHistoProducerAlgoForTracker::minHit
double minHit
Definition: MTVHistoProducerAlgoForTracker.h:305
MTVHistoProducerAlgoForTracker::dxyRes_rangeMax
double dxyRes_rangeMax
Definition: MTVHistoProducerAlgoForTracker.h:350
fileCollector.seed
seed
Definition: fileCollector.py:127
DetId
Definition: DetId.h:17
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
MTVHistoProducerAlgoForTracker::nintEta
int nintEta
Definition: MTVHistoProducerAlgoForTracker.h:299
MTVHistoProducerAlgoForTracker::minPt
double minPt
Definition: MTVHistoProducerAlgoForTracker.h:301
reco::GsfTrack
Definition: GsfTrack.h:12
MTVHistoProducerAlgoForTracker::nintPt
int nintPt
Definition: MTVHistoProducerAlgoForTracker.h:302
TrackingParticleIP::dxy
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
Definition: TrackingParticleIP.h:11
h
MTVHistoProducerAlgoForTracker::mindr
double mindr
Definition: MTVHistoProducerAlgoForTracker.h:323
TrackFwd.h
MTVHistoProducerAlgoForTracker::maxEta
double maxEta
Definition: MTVHistoProducerAlgoForTracker.h:298
dqm::legacy::DQMStore
Definition: DQMStore.h:727
MTVHistoProducerAlgoForTracker::bookSimTrackPVAssociationHistos
void bookSimTrackPVAssociationHistos(DQMStore::IBooker &ibook, Histograms &histograms)
Definition: MTVHistoProducerAlgoForTracker.cc:553
MTVHistoProducerAlgoForTracker::dzRes_rangeMin
double dzRes_rangeMin
Definition: MTVHistoProducerAlgoForTracker.h:352
MTVHistoProducerAlgoForTracker::minEta
double minEta
Definition: MTVHistoProducerAlgoForTracker.h:298
PVValHelper::eta
Definition: PVValidationHelpers.h:70
MTVHistoProducerAlgoForTracker::minZpos
double minZpos
Definition: MTVHistoProducerAlgoForTracker.h:321
MTVHistoProducerAlgoForTracker::phiRes_nbin
int phiRes_nbin
Definition: MTVHistoProducerAlgoForTracker.h:347
reco::DeDxData::numberOfMeasurements
unsigned int numberOfMeasurements() const
Definition: DeDxData.cc:18
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition: TrackingParticle.h:29
MTVHistoProducerAlgoForTracker::minVertpos
double minVertpos
Definition: MTVHistoProducerAlgoForTracker.h:318
MTVHistoProducerAlgoForTracker::nintLayers
int nintLayers
Definition: MTVHistoProducerAlgoForTracker.h:310
reco::DeDxData::numberOfSaturatedMeasurements
int numberOfSaturatedMeasurements() const
Definition: DeDxData.cc:20
reco::Track
Definition: Track.h:27
TrackerDetSide
TrackerDetSide
Definition: TrackerDetSide.h:4
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
MTVHistoProducerAlgoForTracker::bookSimHistos
void bookSimHistos(DQMStore::IBooker &ibook, Histograms &histograms)
Definition: MTVHistoProducerAlgoForTracker.cc:395
MTVHistoProducerAlgoForTracker::minChi2
double minChi2
Definition: MTVHistoProducerAlgoForTracker.h:327
MTVHistoProducerAlgoForTracker::maxZpos
double maxZpos
Definition: MTVHistoProducerAlgoForTracker.h:321
MTVHistoProducerAlgoForTracker::nintDz
int nintDz
Definition: MTVHistoProducerAlgoForTracker.h:316
MTVHistoProducerAlgoForTracker.h
SeedingLayerSetsBuilder::SeedingLayerId
std::tuple< GeomDetEnumerators::SubDetector, TrackerDetSide, int > SeedingLayerId
Definition: SeedingLayerSetsBuilder.h:33
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
MTVHistoProducerAlgoForTracker::nintDxy
int nintDxy
Definition: MTVHistoProducerAlgoForTracker.h:314
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
reco::TrackBase::algoName
std::string algoName() const
Definition: TrackBase.h:550
MTVHistoProducerAlgoForTracker::minPhi
double minPhi
Definition: MTVHistoProducerAlgoForTracker.h:311
MTVHistoProducerAlgoForTracker::fill_simTrackBased_histos
void fill_simTrackBased_histos(const Histograms &histograms, int numSimTracks) const
Definition: MTVHistoProducerAlgoForTracker.cc:1905
nhits
Definition: HIMultiTrackSelector.h:42
Args
Definition: hcalPublishConditions.cc:31
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
MTVHistoProducerAlgoForTracker::minVertcount
double minVertcount
Definition: MTVHistoProducerAlgoForTracker.h:331
MTVHistoProducerAlgoForTracker::maxPVz
double maxPVz
Definition: MTVHistoProducerAlgoForTracker.h:335
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MTVHistoProducerAlgoForTracker::nintVertpos
int nintVertpos
Definition: MTVHistoProducerAlgoForTracker.h:319
MTVHistoProducerAlgoForTracker::bookMVAHistos
void bookMVAHistos(DQMStore::IBooker &ibook, Histograms &histograms, size_t nMVAs)
Definition: MTVHistoProducerAlgoForTracker.cc:1543
edm::ParameterSet::eraseSimpleParameter
void eraseSimpleParameter(std::string const &name)
Definition: ParameterSet.cc:131
trackFromSeedFitFailed
bool trackFromSeedFitFailed(const reco::Track &track)
Definition: trackFromSeedFitFailed.h:6
trackerHitRTTI::isMatched
bool isMatched(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:33
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
trackFromSeedFitFailed.h
MTVHistoProducerAlgoForTracker::minPVz
double minPVz
Definition: MTVHistoProducerAlgoForTracker.h:335
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::modules
Definition: IMASelector.h:46
DetId::Tracker
Definition: DetId.h:25
MTVHistoProducerAlgoForTracker::phiRes_rangeMax
double phiRes_rangeMax
Definition: MTVHistoProducerAlgoForTracker.h:346
MTVHistoProducerAlgoForTracker::minLayers
double minLayers
Definition: MTVHistoProducerAlgoForTracker.h:309
MTVHistoProducerAlgoForTracker::doMTDPlots_
const bool doMTDPlots_
Definition: MTVHistoProducerAlgoForTracker.h:341
MTVHistoProducerAlgoForTracker::doSeedPlots_
const bool doSeedPlots_
Definition: MTVHistoProducerAlgoForTracker.h:340
MultiTrackValidator_cfi.doSeedPlots
doSeedPlots
Definition: MultiTrackValidator_cfi.py:97
MTVHistoProducerAlgoForTracker::SeedingLayerSetId
std::array< SeedingLayerId, 4 > SeedingLayerSetId
Definition: MTVHistoProducerAlgoForTracker.h:363
MTVHistoProducerAlgoForTracker::trackSelectorVsPt
std::unique_ptr< RecoTrackSelectorBase > trackSelectorVsPt
Definition: MTVHistoProducerAlgoForTracker.h:289
MTVHistoProducerAlgoForTracker::SeedingLayerId
std::tuple< SeedingLayerSetsBuilder::SeedingLayerId, bool > SeedingLayerId
Definition: MTVHistoProducerAlgoForTracker.h:362
GeomDetEnumerators::TEC
Definition: GeomDetEnumerators.h:16
MTVHistoProducerAlgoForTracker::minMVA
double minMVA
Definition: MTVHistoProducerAlgoForTracker.h:337
MTVHistoProducerAlgoForTracker::nintPhi
int nintPhi
Definition: MTVHistoProducerAlgoForTracker.h:312
MTVHistoProducerAlgoForTracker::maxVertcount
double maxVertcount
Definition: MTVHistoProducerAlgoForTracker.h:331
MTVHistoProducerAlgoForTracker::maxDz
double maxDz
Definition: MTVHistoProducerAlgoForTracker.h:315
edm::ParameterSet::addParameter
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
MTVHistoProducerAlgoForTracker::maxVertpos
double maxVertpos
Definition: MTVHistoProducerAlgoForTracker.h:318
createfilelist.int
int
Definition: createfilelist.py:10
MTVHistoProducerAlgoForTracker::maxDxy
double maxDxy
Definition: MTVHistoProducerAlgoForTracker.h:313
MTVHistoProducerAlgoForTracker::nintdrj
int nintdrj
Definition: MTVHistoProducerAlgoForTracker.h:326
MTVHistoProducerAlgoForTracker::TpSelectorForEfficiencyVsVTXZ
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsVTXZ
Definition: MTVHistoProducerAlgoForTracker.h:285
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
HcalObjRepresent::setBinLabels
void setBinLabels(std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:548
MTVHistoProducerAlgoForTracker::maxDzpvCum
double maxDzpvCum
Definition: MTVHistoProducerAlgoForTracker.h:355
histograms
Definition: histograms.py:1
MTVHistoProducerAlgoForTracker::cotThetaRes_rangeMin
double cotThetaRes_rangeMin
Definition: MTVHistoProducerAlgoForTracker.h:348
MTVHistoProducerAlgoForTracker::nintdr
int nintdr
Definition: MTVHistoProducerAlgoForTracker.h:324
MTVHistoProducerAlgoForTracker::useLogVertpos
bool useLogVertpos
Definition: MTVHistoProducerAlgoForTracker.h:320
MTVHistoProducerAlgoForTrackerHistograms
Definition: MTVHistoProducerAlgoForTracker.h:29
SeedingLayerSetsBuilder::nameToEnumId
static SeedingLayerId nameToEnumId(const std::string &name)
Definition: SeedingLayerSetsBuilder.cc:32
MTVHistoProducerAlgoForTracker::getRecoMomentum
void getRecoMomentum(const reco::Track &track, double &pt, double &ptError, double &qoverp, double &qoverpError, double &lambda, double &lambdaError, double &phi, double &phiError) const
retrieval of reconstructed momentum components from reco::Track (== mean values for GSF)
Definition: MTVHistoProducerAlgoForTracker.cc:2462
ValueMap.h
MTVHistoProducerAlgoForTracker::minDeDx
double minDeDx
Definition: MTVHistoProducerAlgoForTracker.h:329
MTVHistoProducerAlgoForTracker::nintHit
int nintHit
Definition: MTVHistoProducerAlgoForTracker.h:306
DDAxes::phi
MTVHistoProducerAlgoForTracker::mindrj
double mindrj
Definition: MTVHistoProducerAlgoForTracker.h:325
MTVHistoProducerAlgoForTracker::getEta
double getEta(double eta) const
Definition: MTVHistoProducerAlgoForTracker.cc:2502
MTVHistoProducerAlgoForTracker::minTracks
double minTracks
Definition: MTVHistoProducerAlgoForTracker.h:333
MTVHistoProducerAlgoForTracker::fill_dedx_recoTrack_histos
void fill_dedx_recoTrack_histos(const Histograms &histograms, int count, const edm::RefToBase< reco::Track > &trackref, const std::vector< const edm::ValueMap< reco::DeDxData > * > &v_dEdx) const
Definition: MTVHistoProducerAlgoForTracker.cc:1910
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
Ref.h
MTVHistoProducerAlgoForTracker::ptRes_rangeMin
double ptRes_rangeMin
Definition: MTVHistoProducerAlgoForTracker.h:344
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
MTVHistoProducerAlgoForTracker::getPt
double getPt(double pt) const
Definition: MTVHistoProducerAlgoForTracker.cc:2509
reco::DeDxData::dEdx
float dEdx() const
Definition: DeDxData.cc:11
PVValHelper::dxy
Definition: PVValidationHelpers.h:48
MTVHistoProducerAlgoForTracker::dxyDzZoom
double dxyDzZoom
Definition: MTVHistoProducerAlgoForTracker.h:317
MTVHistoProducerAlgoForTracker::nintZpos
int nintZpos
Definition: MTVHistoProducerAlgoForTracker.h:322
reco::TrackBase::algoSize
Definition: TrackBase.h:141
MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos
void fill_generic_recoTrack_histos(const Histograms &histograms, int count, const reco::Track &track, const TrackerTopology &ttopo, const math::XYZPoint &bsPosition, const math::XYZPoint *pvPosition, const TrackingVertex::LorentzVector *simPVPosition, bool isMatched, bool isSigMatched, bool isChargeMatched, int numAssocRecoTracks, int numVertices, int nSimHits, double sharedFraction, double dR, double dR_jet, const std::vector< float > &mvas, unsigned int selectsLoose, unsigned int selectsHP) const
Definition: MTVHistoProducerAlgoForTracker.cc:1924
PVValHelper::dz
Definition: PVValidationHelpers.h:51
edm::ValueMap
Definition: ValueMap.h:107
relativeConstraints.value
value
Definition: relativeConstraints.py:53
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
Exception
Definition: hltDiff.cc:245
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
phase2tkutil::DQMStore
dqm::reco::DQMStore DQMStore
Definition: TrackerPhase2DQMUtil.h:16
MTVHistoProducerAlgoForTracker::nintPu
int nintPu
Definition: MTVHistoProducerAlgoForTracker.h:308
MTVHistoProducerAlgoForTracker::nintDzpvsigCum
int nintDzpvsigCum
Definition: MTVHistoProducerAlgoForTracker.h:358
MTVHistoProducerAlgoForTracker::seedingLayerSetNames
std::vector< std::string > seedingLayerSetNames
Definition: MTVHistoProducerAlgoForTracker.h:360
MTVHistoProducerAlgoForTracker::generalTpSelector
std::unique_ptr< TrackingParticleSelector > generalTpSelector
Definition: MTVHistoProducerAlgoForTracker.h:280
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
SeedingLayerSetsBuilder::layerNamesInSets
static std::vector< std::vector< std::string > > layerNamesInSets(const std::vector< std::string > &namesPSet)
Definition: SeedingLayerSetsBuilder.cc:275
TrajectorySeed
Definition: TrajectorySeed.h:18
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::RefToBase< reco::Track >
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
MTVHistoProducerAlgoForTracker::nintChi2
int nintChi2
Definition: MTVHistoProducerAlgoForTracker.h:328
dqm::implementation::IBooker
Definition: DQMStore.h:43
MTVHistoProducerAlgoForTracker::ptRes_rangeMax
double ptRes_rangeMax
Definition: MTVHistoProducerAlgoForTracker.h:344
MTVHistoProducerAlgoForTracker::nintMVA
int nintMVA
Definition: MTVHistoProducerAlgoForTracker.h:338
MTVHistoProducerAlgoForTracker::nintPVz
int nintPVz
Definition: MTVHistoProducerAlgoForTracker.h:336
MTVHistoProducerAlgoForTracker::ptRes_nbin
int ptRes_nbin
Definition: MTVHistoProducerAlgoForTracker.h:345
MTVHistoProducerAlgoForTracker::maxdrj
double maxdrj
Definition: MTVHistoProducerAlgoForTracker.h:325
reco::DeDxData
Definition: DeDxData.h:8
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::GsfTrack::ptModeError
double ptModeError() const
error on Pt (set to 1000 TeV if charge==0 for safety) from mode
Definition: GsfTrack.h:81
MTVHistoProducerAlgoForTracker::fill_generic_simTrack_histos
void fill_generic_simTrack_histos(const Histograms &histograms, const TrackingParticle::Vector &, const TrackingParticle::Point &vertex, int bx) const
Definition: MTVHistoProducerAlgoForTracker.cc:1733
MTVHistoProducerAlgoForTracker::bookSimTrackHistos
void bookSimTrackHistos(DQMStore::IBooker &ibook, Histograms &histograms, bool doResolutionPlots)
Definition: MTVHistoProducerAlgoForTracker.cc:406
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
MTVHistoProducerAlgoForTracker::dzRes_rangeMax
double dzRes_rangeMax
Definition: MTVHistoProducerAlgoForTracker.h:352
MTVHistoProducerAlgoForTracker::nintVertcount
int nintVertcount
Definition: MTVHistoProducerAlgoForTracker.h:332
EgammaValidation_Wenu_cff.sel
sel
Definition: EgammaValidation_Wenu_cff.py:33
MTVHistoProducerAlgoForTracker::maxPu
double maxPu
Definition: MTVHistoProducerAlgoForTracker.h:307
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
MTVHistoProducerAlgoForTracker::dxyRes_nbin
int dxyRes_nbin
Definition: MTVHistoProducerAlgoForTracker.h:351
MTVHistoProducerAlgoForTracker::cotThetaRes_nbin
int cotThetaRes_nbin
Definition: MTVHistoProducerAlgoForTracker.h:349
TrackingParticle::Point
math::XYZPointD Point
point in the space
Definition: TrackingParticle.h:36
TrackingParticleIP.h
MTVHistoProducerAlgoForTracker::GpSelectorForEfficiencyVsVTXR
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsVTXR
Definition: MTVHistoProducerAlgoForTracker.h:295
reco::TrackBase::algoNames
static const std::string algoNames[]
Definition: TrackBase.h:147
MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos
void fill_simAssociated_recoTrack_histos(const Histograms &histograms, int count, const reco::Track &track) const
Definition: MTVHistoProducerAlgoForTracker.cc:2217
MTVHistoProducerAlgoForTracker::makeRecoTrackSelectorFromTPSelectorParameters
static std::unique_ptr< RecoTrackSelectorBase > makeRecoTrackSelectorFromTPSelectorParameters(const edm::ParameterSet &pset)
Definition: MTVHistoProducerAlgoForTracker.cc:371
MTVHistoProducerAlgoForTracker::MTVHistoProducerAlgoForTracker
MTVHistoProducerAlgoForTracker(const edm::ParameterSet &pset, const bool doSeedPlots)
Definition: MTVHistoProducerAlgoForTracker.cc:141
MTVHistoProducerAlgoForTracker::dzRes_nbin
int dzRes_nbin
Definition: MTVHistoProducerAlgoForTracker.h:353
MTVHistoProducerAlgoForTracker::bookRecoHistos
void bookRecoHistos(DQMStore::IBooker &ibook, Histograms &histograms, bool doResolutionPlots)
Definition: MTVHistoProducerAlgoForTracker.cc:602
GeomDetEnumerators::isTrackerStrip
bool isTrackerStrip(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:64
MTVHistoProducerAlgoForTracker::cotThetaRes_rangeMax
double cotThetaRes_rangeMax
Definition: MTVHistoProducerAlgoForTracker.h:348
MTVHistoProducerAlgoForTracker::maxDzpvsigCum
double maxDzpvsigCum
Definition: MTVHistoProducerAlgoForTracker.h:357
MTVHistoProducerAlgoForTracker::~MTVHistoProducerAlgoForTracker
~MTVHistoProducerAlgoForTracker()
Definition: MTVHistoProducerAlgoForTracker.cc:369
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
reco::modules::ParameterAdapter
Definition: ParameterAdapter.h:12
MTVHistoProducerAlgoForTracker::dxyRes_rangeMin
double dxyRes_rangeMin
Definition: MTVHistoProducerAlgoForTracker.h:350
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
reco::GsfTrack::qoverpModeError
double qoverpModeError() const
error on signed transverse curvature from mode
Definition: GsfTrack.h:79
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
MTVHistoProducerAlgoForTracker::bookRecodEdxHistos
void bookRecodEdxHistos(DQMStore::IBooker &ibook, Histograms &histograms)
Definition: MTVHistoProducerAlgoForTracker.cc:1515
MTVHistoProducerAlgoForTracker::seedingLayerSetToBin
std::map< SeedingLayerSetId, unsigned int > seedingLayerSetToBin
Definition: MTVHistoProducerAlgoForTracker.h:364
muonME0PseudoDigis_cfi.phiError
phiError
Definition: muonME0PseudoDigis_cfi.py:9
TrackingVertex::LorentzVector
math::XYZTLorentzVectorD LorentzVector
Definition: TrackingVertex.h:28
MTVHistoProducerAlgoForTracker::TpSelectorForEfficiencyVsPhi
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsPhi
Definition: MTVHistoProducerAlgoForTracker.h:282
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
nlayers
Definition: HIMultiTrackSelector.h:48
MTVHistoProducerAlgoForTracker::maxPhi
double maxPhi
Definition: MTVHistoProducerAlgoForTracker.h:311
TrackingParticleIP::dz
auto dz(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
Definition: TrackingParticleIP.h:16
MTVHistoProducerAlgoForTracker::fill_seed_histos
void fill_seed_histos(const Histograms &histograms, int count, int seedsFitFailed, int seedsTotal) const
Definition: MTVHistoProducerAlgoForTracker.cc:2654
MTVHistoProducerAlgoForTracker::fill_recoAssociated_simTrack_histos
void fill_recoAssociated_simTrack_histos(const Histograms &histograms, int count, const TrackingParticle &tp, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, double dxy, double dz, double dxyPV, double dzPV, int nSimHits, int nSimLayers, int nSimPixelLayers, int nSimStripMonoAndStereoLayers, const reco::Track *track, int numVertices, double dR, double dR_jet, const math::XYZPoint *pvPosition, const TrackingVertex::LorentzVector *simPVPosition, const math::XYZPoint &bsPosition, const std::vector< float > &mvas, unsigned int selectsLoose, unsigned int selectsHP) const
Definition: MTVHistoProducerAlgoForTracker.cc:1746