CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackAnalyzer.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author Suchandra Dutta , Giorgia Mila
5  */
6 
15 
20 #include <string>
21 #include "TMath.h"
23 
24 namespace {
25  template <typename T, size_t N>
26  std::array<T, N + 1> makeLogBins(const double min, const double max) {
27  const double minLog10 = std::log10(min);
28  const double maxLog10 = std::log10(max);
29  const double width = (maxLog10 - minLog10) / N;
30  std::array<T, N + 1> ret;
31  ret[0] = std::pow(10, minLog10);
32  const double mult = std::pow(10, width);
33  for (size_t i = 1; i <= N; ++i) {
34  ret[i] = ret[i - 1] * mult;
35  }
36  return ret;
37  }
38 } // namespace
39 
41  : conf_(nullptr),
42  stateName_(iConfig.getParameter<std::string>("MeasurementState")),
43  doTrackerSpecific_(iConfig.getParameter<bool>("doTrackerSpecific")),
44  doAllPlots_(iConfig.getParameter<bool>("doAllPlots")),
45  doBSPlots_(iConfig.getParameter<bool>("doBeamSpotPlots")),
46  doPVPlots_(iConfig.getParameter<bool>("doPrimaryVertexPlots")),
47  doDCAPlots_(iConfig.getParameter<bool>("doDCAPlots")),
48  doGeneralPropertiesPlots_(iConfig.getParameter<bool>("doGeneralPropertiesPlots")),
49  doMeasurementStatePlots_(iConfig.getParameter<bool>("doMeasurementStatePlots")),
50  doHitPropertiesPlots_(iConfig.getParameter<bool>("doHitPropertiesPlots")),
51  doRecHitVsPhiVsEtaPerTrack_(iConfig.getParameter<bool>("doRecHitVsPhiVsEtaPerTrack")),
52  doRecHitVsPtVsEtaPerTrack_(iConfig.getParameter<bool>("doRecHitVsPtVsEtaPerTrack")),
53  doLayersVsPhiVsEtaPerTrack_(iConfig.getParameter<bool>("doLayersVsPhiVsEtaPerTrack")),
54  doRecHitsPerTrackProfile_(iConfig.getParameter<bool>("doRecHitsPerTrackProfile")),
55  doThetaPlots_(iConfig.getParameter<bool>("doThetaPlots")),
56  doTrackPxPyPlots_(iConfig.getParameter<bool>("doTrackPxPyPlots")),
57  doDCAwrtPVPlots_(iConfig.getParameter<bool>("doDCAwrtPVPlots")),
58  doDCAwrt000Plots_(iConfig.getParameter<bool>("doDCAwrt000Plots")),
59  doLumiAnalysis_(iConfig.getParameter<bool>("doLumiAnalysis")),
60  doTestPlots_(iConfig.getParameter<bool>("doTestPlots")),
61  doHIPlots_(iConfig.getParameter<bool>("doHIPlots")),
62  doSIPPlots_(iConfig.getParameter<bool>("doSIPPlots")),
63  doEffFromHitPatternVsPU_(iConfig.getParameter<bool>("doEffFromHitPatternVsPU")),
64  doEffFromHitPatternVsBX_(iConfig.getParameter<bool>("doEffFromHitPatternVsBX")),
65  doEffFromHitPatternVsLUMI_(iConfig.getParameter<bool>("doEffFromHitPatternVsLUMI")),
66  pvNDOF_(iConfig.getParameter<int>("pvNDOF")),
67  useBPixLayer1_(iConfig.getParameter<bool>("useBPixLayer1")),
68  minNumberOfPixelsPerCluster_(iConfig.getParameter<int>("minNumberOfPixelsPerCluster")),
69  minPixelClusterCharge_(iConfig.getParameter<double>("minPixelClusterCharge")),
70  qualityString_(iConfig.getParameter<std::string>("qualityString")),
71  good_vertices_(0),
72  bx_(0),
73  pixel_lumi_(0.),
74  scal_lumi_(0.) {
75  initHistos();
76  TopFolder_ = iConfig.getParameter<std::string>("FolderName");
77 }
78 
80  edm::InputTag bsSrc = iConfig.getParameter<edm::InputTag>("beamSpot");
81  edm::InputTag primaryVertexInputTag = iConfig.getParameter<edm::InputTag>("primaryVertex");
82  edm::InputTag pixelClusterInputTag = iConfig.getParameter<edm::InputTag>("pixelCluster4lumi");
83  edm::InputTag scalInputTag = iConfig.getParameter<edm::InputTag>("scal");
85  pvToken_ = iC.consumes<reco::VertexCollection>(primaryVertexInputTag);
88 
89  if (useBPixLayer1_)
91  else
93 }
94 
96  Chi2 = nullptr;
97  Chi2Prob = nullptr;
98  Chi2ProbVsPhi = nullptr;
99  Chi2ProbVsEta = nullptr;
100  Chi2oNDF = nullptr;
101  Chi2oNDFVsEta = nullptr;
102  Chi2oNDFVsPhi = nullptr;
103  Chi2oNDFVsTheta = nullptr;
104 
105  NumberOfRecHitsPerTrack = nullptr;
107  NumberOfLostRecHitsPerTrack = nullptr;
108 
112 
114 
117 
118  DistanceOfClosestApproach = nullptr;
129  DeltaZToPV = nullptr;
130  DeltaZToPVZoom = nullptr;
137  xPointOfClosestApproach = nullptr;
140  yPointOfClosestApproach = nullptr;
143  zPointOfClosestApproach = nullptr;
145  algorithm = nullptr;
146  oriAlgo = nullptr;
147  stoppingSource = nullptr;
148  stoppingSourceVSeta = nullptr;
149  stoppingSourceVSphi = nullptr;
150  // TESTING
153 
154  // by Mia in order to deal w/ LS transitions
155  Chi2oNDF_lumiFlag = nullptr;
157 
159  //special Plots for HI DQM //SHOULD I ADD THE BOOL HERE??
161  LongDCASig = nullptr;
162  TransDCASig = nullptr;
163  dNdPhi_HighPurity = nullptr;
164  dNdEta_HighPurity = nullptr;
165  dNdPt_HighPurity = nullptr;
166  NhitVsEta_HighPurity = nullptr;
167  NhitVsPhi_HighPurity = nullptr;
168 
169  // IP significance
170  sipDxyToBS = nullptr;
171  sipDzToBS = nullptr;
172  sip3dToPV = nullptr;
173  sip2dToPV = nullptr;
174  sipDxyToPV = nullptr;
175  sipDzToPV = nullptr;
176 }
177 
179 
181  const edm::EventSetup& iSetup,
182  const edm::ParameterSet& iConfig) {
183  conf_ = &iConfig;
185  bookHistosForBeamSpot(ibooker);
188  bookHistosForEfficiencyFromHitPatter(ibooker, iSetup, "", false);
190  bookHistosForEfficiencyFromHitPatter(ibooker, iSetup, "VsBX", false);
192  bookHistosForEfficiencyFromHitPatter(ibooker, iSetup, "VsSCALLUMI", false);
193  // if (doEffFromHitPatternVsLUMI_ || doAllPlots_) bookHistosForEfficiencyFromHitPatter(ibooker, iSetup, "VsPIXELLUMI");
195  bookHistosForEfficiencyFromHitPatter(ibooker, iSetup, "", true);
197  bookHistosForEfficiencyFromHitPatter(ibooker, iSetup, "VsSCALLUMI", true);
198 
199  // book tracker specific related histograms
200  // ---------------------------------------------------------------------------------//
203 
204  // book state related histograms
205  // ---------------------------------------------------------------------------------//
207  if (stateName_ == "All") {
208  bookHistosForState("OuterSurface", ibooker);
209  bookHistosForState("InnerSurface", ibooker);
210  bookHistosForState("ImpactPoint", ibooker);
211  } else if (stateName_ != "OuterSurface" && stateName_ != "InnerSurface" && stateName_ != "ImpactPoint" &&
212  stateName_ != "default") {
213  bookHistosForState("default", ibooker);
214 
215  } else {
216  bookHistosForState(stateName_, ibooker);
217  }
218  conf_ = nullptr;
219  }
220 }
221 
223  const edm::EventSetup& iSetup,
224  const std::string suffix,
225  bool useInac) {
226  ibooker.setCurrentFolder(TopFolder_ + "/HitEffFromHitPattern" + (useInac ? "All" : "") + suffix);
227 
228  constexpr int LUMIBin = 300; // conf_->getParameter<int>("LUMIBin");
229  float LUMIMin = conf_->getParameter<double>("LUMIMin");
230  float LUMIMax = conf_->getParameter<double>("LUMIMax");
231 
232  int PVBin = conf_->getParameter<int>("PVBin");
233  float PVMin = conf_->getParameter<double>("PVMin");
234  float PVMax = conf_->getParameter<double>("PVMax");
235 
236  int NBINS[] = {PVBin, int(GetLumi::lastBunchCrossing), LUMIBin, LUMIBin};
237  float MIN[] = {PVMin, 0.5, LUMIMin, LUMIMin};
238  float MAX[] = {PVMax, float(GetLumi::lastBunchCrossing) + 0.5, LUMIMax, LUMIMax};
239  std::string NAME[] = {"", "VsBX", "VsLUMI", "VsLUMI"};
240 
241  auto logBins = makeLogBins<float, LUMIBin>(LUMIMin, LUMIMax);
242 
243  int mon = -1;
244  int nbins = -1;
245  float min = -1.;
246  float max = -1.;
247  bool logQ = false;
248  std::string name = "";
249  for (int i = 0; i < monQuantity::END; i++) {
250  if (monName[i] == suffix) {
251  logQ = (i > 1); // VsLUMI
252  mon = i;
253  if (useInac)
254  mon += monQuantity::END;
255  nbins = NBINS[i];
256  min = MIN[i];
257  max = MAX[i];
258  name = NAME[i];
259  }
260  }
261 
262  edm::ESHandle<TrackerGeometry> trackerGeometry;
263  iSetup.get<TrackerDigiGeometryRecord>().get(trackerGeometry);
264 
265  // Values are not ordered randomly, but the order is taken from
266  // http://cmslxr.fnal.gov/dxr/CMSSW/source/Geometry/CommonDetUnit/interface/GeomDetEnumerators.h#15
267  const char* dets[] = {"None", "PXB", "PXF", "TIB", "TID", "TOB", "TEC"};
268 
269  // Also in this case, ordering is not random but extracted from
270  // http://cmslxr.fnal.gov/dxr/CMSSW/source/DataFormats/TrackReco/interface/HitPattern.h
271  // The category "total" is an addition to ease the computation of
272  // the efficiencies and is not part of the original HitPattern.
273  const char* hit_category[] = {"valid", "missing", "inactive", "bad", "total"};
274 
275  // We set sub_det to be a 1-based index since to it is the sub-sub-structure in the HitPattern
276  char title[50];
277  for (unsigned int det = 1; det < sizeof(dets) / sizeof(char*); ++det) {
278  for (unsigned int sub_det = 1; sub_det <= trackerGeometry->numberOfLayers(det); ++sub_det) {
279  for (unsigned int cat = 0; cat < sizeof(hit_category) / sizeof(char*); ++cat) {
280  memset(title, 0, sizeof(title));
281  snprintf(title, sizeof(title), "Hits%s_%s_%s_Subdet%d", name.c_str(), hit_category[cat], dets[det], sub_det);
282  switch (cat) {
283  case 0:
284  hits_valid_.insert(std::make_pair(Key(det, sub_det, mon),
285  logQ ? ibooker.book1D(title, title, nbins, &logBins[0])
286  : ibooker.book1D(title, title, nbins, min, max)));
287  break;
288  case 4:
289  hits_total_.insert(std::make_pair(Key(det, sub_det, mon),
290  logQ ? ibooker.book1D(title, title, nbins, &logBins[0])
291  : ibooker.book1D(title, title, nbins, min, max)));
292  break;
293  default:
294  LogDebug("TrackAnalyzer") << "Invalid hit category used " << cat << " ignored\n";
295  }
296  }
297  }
298  }
299 }
300 
303  // parameters from the configuration
304  std::string QualName = conf_->getParameter<std::string>("Quality");
306  std::string MEBSFolderName = conf_->getParameter<std::string>("BSFolderName");
307 
308  // use the AlgoName and Quality Name
309  std::string CategoryName = !QualName.empty() ? AlgoName + "_" + QualName : AlgoName;
310 
311  // get binning from the configuration
312  int TKHitBin = conf_->getParameter<int>("RecHitBin");
313  double TKHitMin = conf_->getParameter<double>("RecHitMin");
314  double TKHitMax = conf_->getParameter<double>("RecHitMax");
315 
316  int TKLostBin = conf_->getParameter<int>("RecLostBin");
317  double TKLostMin = conf_->getParameter<double>("RecLostMin");
318  double TKLostMax = conf_->getParameter<double>("RecLostMax");
319 
320  int TKLayBin = conf_->getParameter<int>("RecLayBin");
321  double TKLayMin = conf_->getParameter<double>("RecLayMin");
322  double TKLayMax = conf_->getParameter<double>("RecLayMax");
323 
324  int PhiBin = conf_->getParameter<int>("PhiBin");
325  double PhiMin = conf_->getParameter<double>("PhiMin");
326  double PhiMax = conf_->getParameter<double>("PhiMax");
327 
328  int EtaBin = conf_->getParameter<int>("EtaBin");
329  double EtaMin = conf_->getParameter<double>("EtaMin");
330  double EtaMax = conf_->getParameter<double>("EtaMax");
331 
332  int PtBin = conf_->getParameter<int>("TrackPtBin");
333  double PtMin = conf_->getParameter<double>("TrackPtMin");
334  double PtMax = conf_->getParameter<double>("TrackPtMax");
335 
336  int Phi2DBin = conf_->getParameter<int>("Phi2DBin");
337  int Eta2DBin = conf_->getParameter<int>("Eta2DBin");
338  int Pt2DBin = conf_->getParameter<int>("TrackPt2DBin");
339 
340  int VXBin = conf_->getParameter<int>("VXBin");
341  double VXMin = conf_->getParameter<double>("VXMin");
342  double VXMax = conf_->getParameter<double>("VXMax");
343 
344  int VYBin = conf_->getParameter<int>("VYBin");
345  double VYMin = conf_->getParameter<double>("VYMin");
346  double VYMax = conf_->getParameter<double>("VYMax");
347 
348  int VZBin = conf_->getParameter<int>("VZBin");
349  double VZMin = conf_->getParameter<double>("VZMin");
350  double VZMax = conf_->getParameter<double>("VZMax");
351 
352  ibooker.setCurrentFolder(TopFolder_);
353 
354  // book the Hit Property histograms
355  // ---------------------------------------------------------------------------------//
356 
357  TkParameterMEs tkmes;
359  ibooker.setCurrentFolder(TopFolder_ + "/HitProperties");
360 
361  histname = "NumberOfRecHitsPerTrack_";
363  ibooker.book1D(histname + CategoryName, histname + CategoryName, TKHitBin, TKHitMin, TKHitMax);
364  NumberOfRecHitsPerTrack->setAxisTitle("Number of all RecHits of each Track");
365  NumberOfRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
366 
367  histname = "NumberOfValidRecHitsPerTrack_";
369  ibooker.book1D(histname + CategoryName, histname + CategoryName, TKHitBin, TKHitMin, TKHitMax);
370  NumberOfValidRecHitsPerTrack->setAxisTitle("Number of valid RecHits for each Track");
371 
372  NumberOfValidRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
373 
374  histname = "NumberOfLostRecHitsPerTrack_";
376  ibooker.book1D(histname + CategoryName, histname + CategoryName, TKLostBin, TKLostMin, TKLostMax);
377  NumberOfLostRecHitsPerTrack->setAxisTitle("Number of lost RecHits for each Track");
378  NumberOfLostRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
379 
380  histname = "NumberOfMissingInnerRecHitsPerTrack_";
381  NumberOfMIRecHitsPerTrack = ibooker.book1D(histname + CategoryName, histname + CategoryName, 10, -0.5, 9.5);
382  NumberOfMIRecHitsPerTrack->setAxisTitle("Number of missing-inner RecHits for each Track");
383  NumberOfMIRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
384 
385  histname = "NumberOfMissingOuterRecHitsPerTrack_";
386  NumberOfMORecHitsPerTrack = ibooker.book1D(histname + CategoryName, histname + CategoryName, 10, -0.5, 9.5);
387  NumberOfMORecHitsPerTrack->setAxisTitle("Number of missing-outer RecHits for each Track");
388  NumberOfMORecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
389 
390  histname = "ValidFractionPerTrack_";
391  ValidFractionPerTrack = ibooker.book1D(histname + CategoryName, histname + CategoryName, 101, 0., 1.01);
392  ValidFractionPerTrack->setAxisTitle("ValidFraction of RecHits for each Track");
393  ValidFractionPerTrack->setAxisTitle("Number of Tracks", 2);
394 
396  histname = "NumberOfValidRecHitVsPhiVsEtaPerTrack_";
398  histname + CategoryName,
399  Eta2DBin,
400  EtaMin,
401  EtaMax,
402  Phi2DBin,
403  PhiMin,
404  PhiMax,
405  0,
406  40.,
407  "");
410 
411  histname = "NumberOfLostRecHitVsPhiVsEtaPerTrack_";
413  histname + CategoryName,
414  Eta2DBin,
415  EtaMin,
416  EtaMax,
417  Phi2DBin,
418  PhiMin,
419  PhiMax,
420  0,
421  5.,
422  "");
425 
426  histname = "NumberMIRecHitVsPhiVsEtaPerTrack_";
428  histname + CategoryName,
429  Eta2DBin,
430  EtaMin,
431  EtaMax,
432  Phi2DBin,
433  PhiMin,
434  PhiMax,
435  0,
436  15.,
437  "");
440 
441  histname = "NumberMORecHitVsPhiVsEtaPerTrack_";
443  histname + CategoryName,
444  Eta2DBin,
445  EtaMin,
446  EtaMax,
447  Phi2DBin,
448  PhiMin,
449  PhiMax,
450  0,
451  15.,
452  "");
455 
456  histname = "ValidFractionVsPhiVsEtaPerTrack_";
457  ValidFractionVsPhiVsEtaPerTrack = ibooker.bookProfile2D(histname + CategoryName,
458  histname + CategoryName,
459  Eta2DBin,
460  EtaMin,
461  EtaMax,
462  Phi2DBin,
463  PhiMin,
464  PhiMax,
465  0,
466  2.,
467  "");
470  }
471 
473  histname = "NumberOfValidRecHitVsPtVsEtaPerTrack_";
475  histname + CategoryName, histname + CategoryName, Eta2DBin, EtaMin, EtaMax, Pt2DBin, PtMin, PtMax, 0, 40., "");
477  NumberOfValidRecHitVsPtVsEtaPerTrack->setAxisTitle("Track p_{T} [GeV] ", 2);
478 
479  histname = "NumberOfLostRecHitVsPtVsEtaPerTrack_";
481  histname + CategoryName, histname + CategoryName, Eta2DBin, EtaMin, EtaMax, Pt2DBin, PtMin, PtMax, 0, 5., "");
483  NumberOfLostRecHitVsPtVsEtaPerTrack->setAxisTitle("Track p_{T} [GeV] ", 2);
484 
485  histname = "NumberMIRecHitVsPtVsEtaPerTrack_";
487  histname + CategoryName, histname + CategoryName, Eta2DBin, EtaMin, EtaMax, Pt2DBin, PtMin, PtMax, 0, 15., "");
489  NumberOfMIRecHitVsPtVsEtaPerTrack->setAxisTitle("Track p_{T} [GeV] ", 2);
490 
491  histname = "NumberMORecHitVsPtVsEtaPerTrack_";
493  histname + CategoryName, histname + CategoryName, Eta2DBin, EtaMin, EtaMax, Pt2DBin, PtMin, PtMax, 0, 15., "");
495  NumberOfMORecHitVsPtVsEtaPerTrack->setAxisTitle("Track p_{T} [GeV] ", 2);
496  }
497 
498  histname = "NumberOfValidRecHitsPerTrackVsPt_";
500  histname + CategoryName, histname + CategoryName, PtBin, PtMin, PtMax, TKHitMin, TKHitMax, "");
501  NumberOfValidRecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
502  NumberOfValidRecHitsPerTrackVsPt->setAxisTitle("Number of valid RecHits in each Track", 2);
503 
504  histname = "NumberOfLostRecHitsPerTrackVsPt_";
506  histname + CategoryName, histname + CategoryName, PtBin, PtMin, PtMax, TKHitMin, TKHitMax, "");
507  NumberOfLostRecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
508  NumberOfLostRecHitsPerTrackVsPt->setAxisTitle("Average Number of Lost RecHits per Track", 2);
509 
510  histname = "NumberMIRecHitsPerTrackVsPt_";
512  histname + CategoryName, histname + CategoryName, PtBin, PtMin, PtMax, TKHitMin, TKHitMax, "");
513  NumberOfMIRecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
514  NumberOfMIRecHitsPerTrackVsPt->setAxisTitle("Average Number of Lost RecHits per Track", 2);
515 
516  histname = "NumberMORecHitsPerTrackVsPt_";
518  histname + CategoryName, histname + CategoryName, PtBin, PtMin, PtMax, TKHitMin, TKHitMax, "");
519  NumberOfMORecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
520  NumberOfMORecHitsPerTrackVsPt->setAxisTitle("Average Number of Lost RecHits per Track", 2);
521 
522  std::string layerTypeName[5] = {"", "Off", "3D", "Missing", "Pixel"};
523  for (int i = 0; i < 4; ++i) {
524  histname = "NumberOf" + layerTypeName[i] + "LayersPerTrack_";
526  ibooker.book1D(histname + CategoryName, histname + CategoryName, TKLayBin, TKLayMin, TKLayMax);
527  NumberOfLayersPerTrack[i]->setAxisTitle("Number of " + layerTypeName[i] + " Layers of each Track", 1);
528  NumberOfLayersPerTrack[i]->setAxisTitle("Number of Tracks", 2);
529  }
531  for (int i = 0; i < 5; ++i) {
532  histname = "NumberOf" + layerTypeName[i] + "LayersVsPhiVsEtaPerTrack_";
533  NumberOfLayersVsPhiVsEtaPerTrack[i] = ibooker.bookProfile2D(histname + CategoryName,
534  histname + CategoryName,
535  Eta2DBin,
536  EtaMin,
537  EtaMax,
538  Phi2DBin,
539  PhiMin,
540  PhiMax,
541  0,
542  40.,
543  "");
544  NumberOfLayersVsPhiVsEtaPerTrack[i]->setAxisTitle("Track #eta ", 1);
545  NumberOfLayersVsPhiVsEtaPerTrack[i]->setAxisTitle("Track #phi ", 2);
546  }
547  }
548 
549  // book the General Property histograms
550  // ---------------------------------------------------------------------------------//
551 
553  int Chi2Bin = conf_->getParameter<int>("Chi2Bin");
554  double Chi2Min = conf_->getParameter<double>("Chi2Min");
555  double Chi2Max = conf_->getParameter<double>("Chi2Max");
556 
557  int Chi2NDFBin = conf_->getParameter<int>("Chi2NDFBin");
558  double Chi2NDFMin = conf_->getParameter<double>("Chi2NDFMin");
559  double Chi2NDFMax = conf_->getParameter<double>("Chi2NDFMax");
560 
561  int Chi2ProbBin = conf_->getParameter<int>("Chi2ProbBin");
562  double Chi2ProbMin = conf_->getParameter<double>("Chi2ProbMin");
563  double Chi2ProbMax = conf_->getParameter<double>("Chi2ProbMax");
564 
565  //HI PLOTS////
566  int TransDCABins = conf_->getParameter<int>("TransDCABins");
567  double TransDCAMin = conf_->getParameter<double>("TransDCAMin");
568  double TransDCAMax = conf_->getParameter<double>("TransDCAMax");
569 
570  int LongDCABins = conf_->getParameter<int>("LongDCABins");
571  double LongDCAMin = conf_->getParameter<double>("LongDCAMin");
572  double LongDCAMax = conf_->getParameter<double>("LongDCAMax");
574 
575  ibooker.setCurrentFolder(TopFolder_ + "/GeneralProperties");
576 
577  histname = "Chi2_";
578  Chi2 = ibooker.book1D(histname + CategoryName, histname + CategoryName, Chi2Bin, Chi2Min, Chi2Max);
579  Chi2->setAxisTitle("Track #chi^{2}", 1);
580  Chi2->setAxisTitle("Number of Tracks", 2);
581 
582  histname = "Chi2Prob_";
583  Chi2Prob = ibooker.book1D(histname + CategoryName, histname + CategoryName, Chi2ProbBin, Chi2ProbMin, Chi2ProbMax);
584  Chi2Prob->setAxisTitle("Track #chi^{2} probability", 1);
585  Chi2Prob->setAxisTitle("Number of Tracks", 2);
586 
587  histname = "Chi2oNDF_";
588  Chi2oNDF = ibooker.book1D(histname + CategoryName, histname + CategoryName, Chi2NDFBin, Chi2NDFMin, Chi2NDFMax);
589  Chi2oNDF->setAxisTitle("Track #chi^{2}/ndf", 1);
590  Chi2oNDF->setAxisTitle("Number of Tracks", 2);
591 
593  //HI PLOTS///
595  if (doHIPlots_) {
596  histname = "LongDCASig_";
597  LongDCASig =
598  ibooker.book1D(histname + CategoryName, histname + CategoryName, LongDCABins, LongDCAMin, LongDCAMax);
599  LongDCASig->setAxisTitle("dz/#sigma_{dz}", 1);
600 
601  histname = "TransDCASig_";
602  TransDCASig =
603  ibooker.book1D(histname + CategoryName, histname + CategoryName, TransDCABins, TransDCAMin, TransDCAMax);
604  TransDCASig->setAxisTitle("dxy/#sigma_{dxy}", 1);
605 
606  histname = "dNdPhi_HighPurity_";
607  dNdPhi_HighPurity = ibooker.book1D(histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax);
608  dNdPhi_HighPurity->setAxisTitle("#phi", 1);
609 
610  histname = "dNdEta_HighPurity_";
611  dNdEta_HighPurity = ibooker.book1D(histname + CategoryName, histname + CategoryName, EtaBin, EtaMin, EtaMax);
612  dNdEta_HighPurity->setAxisTitle("#eta", 1);
613 
614  histname = "dNdPt_HighPurity_";
615  dNdPt_HighPurity = ibooker.book1D(histname + CategoryName, histname + CategoryName, 150, 0, 0.3);
616  dNdPt_HighPurity->setAxisTitle("#sigma_{p_{T}}/p_{T}", 1);
617 
618  histname = "NhitVsEta_HighPurity_";
620  ibooker.bookProfile(histname + CategoryName, histname + CategoryName, EtaBin, EtaMin, EtaMax, -0.5, 39.5, "");
621  NhitVsEta_HighPurity->setAxisTitle("Track #eta", 1);
622  NhitVsEta_HighPurity->setAxisTitle("Number of Valid RecHits in each Track", 2);
623 
624  histname = "NhitVsPhi_HighPurity_";
626  ibooker.bookProfile(histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, -0.5, 39.5, "");
627  NhitVsPhi_HighPurity->setAxisTitle("Track #phi", 1);
628  NhitVsPhi_HighPurity->setAxisTitle("Number of Valid RecHits in each Track", 2);
629 
630  histname = "Ptdist_HighPurity_";
631  Ptdist_HighPurity = ibooker.book1D(histname + CategoryName, histname + CategoryName, 150, 0, 50.);
632  Ptdist_HighPurity->setAxisTitle("p_{T} (GeV/c)", 1);
633  Ptdist_HighPurity->setAxisTitle("Number of Tracks", 2);
634 
635  histname = "dNhitdPt_HighPurity_";
637  ibooker.bookProfile(histname + CategoryName, histname + CategoryName, 150, 0, 25., -0.5, 39.5, "");
638  dNhitdPt_HighPurity->setAxisTitle("p_{T} (GeV/c)", 1);
639  dNhitdPt_HighPurity->setAxisTitle("N_{hit}", 2);
640  }
641 
643  histname = "xPointOfClosestApproach_";
644  xPointOfClosestApproach = ibooker.book1D(histname + CategoryName, histname + CategoryName, VXBin, VXMin, VXMax);
645  xPointOfClosestApproach->setAxisTitle("x component of Track PCA to beam line (cm)", 1);
646  xPointOfClosestApproach->setAxisTitle("Number of Tracks", 2);
647 
648  histname = "yPointOfClosestApproach_";
649  yPointOfClosestApproach = ibooker.book1D(histname + CategoryName, histname + CategoryName, VYBin, VYMin, VYMax);
650  yPointOfClosestApproach->setAxisTitle("y component of Track PCA to beam line (cm)", 1);
651  yPointOfClosestApproach->setAxisTitle("Number of Tracks", 2);
652 
653  histname = "zPointOfClosestApproach_";
654  zPointOfClosestApproach = ibooker.book1D(histname + CategoryName, histname + CategoryName, VZBin, VZMin, VZMax);
655  zPointOfClosestApproach->setAxisTitle("z component of Track PCA to beam line (cm)", 1);
656  zPointOfClosestApproach->setAxisTitle("Number of Tracks", 2);
657 
658  histname = "xPointOfClosestApproachToPV_";
660  ibooker.book1D(histname + CategoryName, histname + CategoryName, VXBin, VXMin, VXMax);
661  xPointOfClosestApproachToPV->setAxisTitle("x component of Track PCA to pv (cm)", 1);
662  xPointOfClosestApproachToPV->setAxisTitle("Number of Tracks", 2);
663 
664  histname = "yPointOfClosestApproachToPV_";
666  ibooker.book1D(histname + CategoryName, histname + CategoryName, VYBin, VYMin, VYMax);
667  yPointOfClosestApproachToPV->setAxisTitle("y component of Track PCA to pv line (cm)", 1);
668  yPointOfClosestApproachToPV->setAxisTitle("Number of Tracks", 2);
669 
670  histname = "zPointOfClosestApproachToPV_";
672  ibooker.book1D(histname + CategoryName, histname + CategoryName, VZBin, VZMin, VZMax);
673  zPointOfClosestApproachToPV->setAxisTitle("z component of Track PCA to pv line (cm)", 1);
674  zPointOfClosestApproachToPV->setAxisTitle("Number of Tracks", 2);
675  }
676 
677  // See DataFormats/TrackReco/interface/TrackBase.h for track algorithm enum definition
678  // http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/DataFormats/TrackReco/interface/TrackBase.h?view=log
679  histname = "algorithm_";
680  algorithm = ibooker.book1D(histname + CategoryName,
681  histname + CategoryName,
683  0.,
684  double(reco::TrackBase::algoSize));
685  algorithm->setAxisTitle("Tracking algorithm", 1);
686  algorithm->setAxisTitle("Number of Tracks", 2);
687 
688  histname = "originalAlgorithm_";
689  oriAlgo = ibooker.book1D(histname + CategoryName,
690  histname + CategoryName,
692  0.,
693  double(reco::TrackBase::algoSize));
694  oriAlgo->setAxisTitle("Tracking algorithm", 1);
695  oriAlgo->setAxisTitle("Number of Tracks", 2);
696 
697  for (size_t ibin = 0; ibin < reco::TrackBase::algoSize - 1; ibin++) {
700  }
701 
702  size_t StopReasonNameSize = sizeof(StopReasonName::StopReasonName) / sizeof(std::string);
703  histname = "stoppingSource_";
704  stoppingSource = ibooker.book1D(
705  histname + CategoryName, histname + CategoryName, StopReasonNameSize, 0., double(StopReasonNameSize));
706  stoppingSource->setAxisTitle("stopping reason", 1);
707  stoppingSource->setAxisTitle("Number of Tracks", 2);
708 
709  histname = "stoppingSourceVSeta_";
711  ibooker.bookProfile(histname + CategoryName, histname + CategoryName, EtaBin, EtaMin, EtaMax, 2, 0., 2.);
712  stoppingSourceVSeta->setAxisTitle("track #eta", 1);
713  stoppingSourceVSeta->setAxisTitle("stopped fraction", 2);
714 
715  histname = "stoppingSourceVSphi_";
717  ibooker.bookProfile(histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, 2, 0., 2.);
718  stoppingSourceVSphi->setAxisTitle("track #phi", 1);
719  stoppingSourceVSphi->setAxisTitle("stopped fraction", 2);
720 
721  for (size_t ibin = 0; ibin < StopReasonNameSize; ibin++) {
723  }
724  }
725 }
726 
728  // parameters from the configuration
729  std::string QualName = conf_->getParameter<std::string>("Quality");
731 
732  // use the AlgoName and Quality Name
733  std::string CategoryName = !QualName.empty() ? AlgoName + "_" + QualName : AlgoName;
734 
735  // book LS analysis related histograms
736  // -----------------------------------
737  if (doLumiAnalysis_) {
738  // get binning from the configuration
739  int TKHitBin = conf_->getParameter<int>("RecHitBin");
740  double TKHitMin = conf_->getParameter<double>("RecHitMin");
741  double TKHitMax = conf_->getParameter<double>("RecHitMax");
742 
743  int Chi2NDFBin = conf_->getParameter<int>("Chi2NDFBin");
744  double Chi2NDFMin = conf_->getParameter<double>("Chi2NDFMin");
745  double Chi2NDFMax = conf_->getParameter<double>("Chi2NDFMax");
746 
747  // add by Mia in order to deal w/ LS transitions
748  ibooker.setCurrentFolder(TopFolder_ + "/LSanalysis");
749 
750  histname = "NumberOfRecHitsPerTrack_lumiFlag_";
752  ibooker.book1D(histname + CategoryName, histname + CategoryName, TKHitBin, TKHitMin, TKHitMax);
753  NumberOfRecHitsPerTrack_lumiFlag->setAxisTitle("Number of all RecHits of each Track");
754  NumberOfRecHitsPerTrack_lumiFlag->setAxisTitle("Number of Tracks", 2);
755 
756  histname = "Chi2oNDF_lumiFlag_";
758  ibooker.book1D(histname + CategoryName, histname + CategoryName, Chi2NDFBin, Chi2NDFMin, Chi2NDFMax);
759  Chi2oNDF_lumiFlag->setAxisTitle("Track #chi^{2}/ndf", 1);
760  Chi2oNDF_lumiFlag->setAxisTitle("Number of Tracks", 2);
761  }
762 }
763 
765  // parameters from the configuration
766  std::string QualName = conf_->getParameter<std::string>("Quality");
768 
769  // use the AlgoName and Quality Name
770  std::string CategoryName = !QualName.empty() ? AlgoName + "_" + QualName : AlgoName;
771  std::string Folder = TopFolder_.substr(0, 2);
772 
773  // book the Beam Spot related histograms
774  // ---------------------------------------------------------------------------------//
775 
776  if (doDCAPlots_ || doBSPlots_ || doAllPlots_) {
777  int DxyErrBin = conf_->getParameter<int>("DxyErrBin");
778  double DxyErrMax = conf_->getParameter<double>("DxyErrMax");
779 
780  int DxyBin = conf_->getParameter<int>("DxyBin");
781  double DxyMin = conf_->getParameter<double>("DxyMin");
782  double DxyMax = conf_->getParameter<double>("DxyMax");
783 
784  int AbsDxyBin = conf_->getParameter<int>("AbsDxyBin");
785  double AbsDxyMin = conf_->getParameter<double>("AbsDxyMin");
786  double AbsDxyMax = conf_->getParameter<double>("AbsDxyMax");
787 
788  int PhiBin = conf_->getParameter<int>("PhiBin");
789  double PhiMin = conf_->getParameter<double>("PhiMin");
790  double PhiMax = conf_->getParameter<double>("PhiMax");
791 
792  int EtaBin = conf_->getParameter<int>("EtaBin");
793  double EtaMin = conf_->getParameter<double>("EtaMin");
794  double EtaMax = conf_->getParameter<double>("EtaMax");
795 
796  int PtBin = conf_->getParameter<int>("TrackPtBin");
797  double PtMin = conf_->getParameter<double>("TrackPtMin");
798  double PtMax = conf_->getParameter<double>("TrackPtMax");
799 
800  int X0Bin = conf_->getParameter<int>("X0Bin");
801  double X0Min = conf_->getParameter<double>("X0Min");
802  double X0Max = conf_->getParameter<double>("X0Max");
803 
804  int Y0Bin = conf_->getParameter<int>("Y0Bin");
805  double Y0Min = conf_->getParameter<double>("Y0Min");
806  double Y0Max = conf_->getParameter<double>("Y0Max");
807 
808  int Z0Bin = conf_->getParameter<int>("Z0Bin");
809  double Z0Min = conf_->getParameter<double>("Z0Min");
810  double Z0Max = conf_->getParameter<double>("Z0Max");
811 
812  int VZBinProf = conf_->getParameter<int>("VZBinProf");
813  double VZMinProf = conf_->getParameter<double>("VZMinProf");
814  double VZMaxProf = conf_->getParameter<double>("VZMaxProf");
815 
816  ibooker.setCurrentFolder(TopFolder_ + "/GeneralProperties");
817 
818  histname = "DistanceOfClosestApproachError_";
820  ibooker.book1D(histname + CategoryName, histname + CategoryName, DxyErrBin, 0., DxyErrMax);
821  DistanceOfClosestApproachError->setAxisTitle("Track d_{xy} error (cm)", 1);
822  DistanceOfClosestApproachError->setAxisTitle("Number of Tracks", 2);
823 
824  histname = "DistanceOfClosestApproachErrorVsPt_";
826  ibooker.bookProfile(histname + CategoryName, histname + CategoryName, PtBin, PtMin, PtMax, 0., DxyErrMax);
827  DistanceOfClosestApproachErrorVsPt->setAxisTitle("Track p_{T} (GeV)", 1);
828  DistanceOfClosestApproachErrorVsPt->setAxisTitle("Track d_{xy} error (cm)", 2);
829 
830  histname = "DistanceOfClosestApproachErrorVsEta_";
832  ibooker.bookProfile(histname + CategoryName, histname + CategoryName, EtaBin, EtaMin, EtaMax, 0., DxyErrMax);
834  DistanceOfClosestApproachErrorVsEta->setAxisTitle("Track d_{xy} error (cm)", 2);
835 
836  histname = "DistanceOfClosestApproachErrorVsPhi_";
838  ibooker.bookProfile(histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, 0., DxyErrMax);
840  DistanceOfClosestApproachErrorVsPhi->setAxisTitle("Track d_{xy} error (cm)", 2);
841 
842  histname = "DistanceOfClosestApproachErrorVsDxy_";
844  ibooker.bookProfile(histname + CategoryName, histname + CategoryName, DxyBin, DxyMin, DxyMax, 0., DxyErrMax);
846  DistanceOfClosestApproachErrorVsDxy->setAxisTitle("Track d_{xy} error (cm)", 2);
847 
848  histname = "DistanceOfClosestApproachToBS_";
850  ibooker.book1D(histname + CategoryName, histname + CategoryName, DxyBin, DxyMin, DxyMax);
851  DistanceOfClosestApproachToBS->setAxisTitle("Track d_{xy} wrt beam spot (cm)", 1);
852  DistanceOfClosestApproachToBS->setAxisTitle("Number of Tracks", 2);
853 
854  if (Folder == "Tr") {
855  histname = "DistanceOfClosestApproachToBSdz_";
857  ibooker.book1D(histname + CategoryName, histname + CategoryName, 100, -1.1, 1.1);
858  DistanceOfClosestApproachToBSdz->setAxisTitle("Track d_{z} wrt beam spot (cm)", 1);
859  DistanceOfClosestApproachToBSdz->setAxisTitle("Number of Tracks", 2);
860 
861  histname = "DistanceOfClosestApproachToBSVsEta_";
863  histname + CategoryName, histname + CategoryName, EtaBin, EtaMin, EtaMax, DxyBin, DxyMin, DxyMax, "");
865  DistanceOfClosestApproachToBSVsEta->setAxisTitle("Track d_{xy} wrt beam spot (cm)", 2);
866  }
867 
868  histname = "AbsDistanceOfClosestApproachToBS_";
870  ibooker.book1D(histname + CategoryName, histname + CategoryName, AbsDxyBin, AbsDxyMin, AbsDxyMax);
871  AbsDistanceOfClosestApproachToBS->setAxisTitle("Track |d_{xy}| wrt beam spot (cm)", 1);
872  AbsDistanceOfClosestApproachToBS->setAxisTitle("Number of Tracks", 2);
873 
874  histname = "DistanceOfClosestApproachToBSVsPhi_";
876  histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax, "");
878  DistanceOfClosestApproachToBSVsPhi->setAxisTitle("Track d_{xy} wrt beam spot (cm)", 2);
879 
880  histname = "xPointOfClosestApproachVsZ0wrt000_";
882  histname + CategoryName, histname + CategoryName, Z0Bin, Z0Min, Z0Max, X0Bin, X0Min, X0Max, "");
884  xPointOfClosestApproachVsZ0wrt000->setAxisTitle("x component of Track PCA to beam line (cm)", 2);
885 
886  histname = "yPointOfClosestApproachVsZ0wrt000_";
888  histname + CategoryName, histname + CategoryName, Z0Bin, Z0Min, Z0Max, Y0Bin, Y0Min, Y0Max, "");
890  yPointOfClosestApproachVsZ0wrt000->setAxisTitle("y component of Track PCA to beam line (cm)", 2);
891 
892  histname = "xPointOfClosestApproachVsZ0wrtBS_";
894  histname + CategoryName, histname + CategoryName, Z0Bin, Z0Min, Z0Max, X0Bin, X0Min, X0Max, "");
895  xPointOfClosestApproachVsZ0wrtBS->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)", 1);
896  xPointOfClosestApproachVsZ0wrtBS->setAxisTitle("x component of Track PCA to BS (cm)", 2);
897 
898  histname = "yPointOfClosestApproachVsZ0wrtBS_";
900  histname + CategoryName, histname + CategoryName, Z0Bin, Z0Min, Z0Max, Y0Bin, Y0Min, Y0Max, "");
901  yPointOfClosestApproachVsZ0wrtBS->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)", 1);
902  yPointOfClosestApproachVsZ0wrtBS->setAxisTitle("y component of Track PCA to BS (cm)", 2);
903 
904  histname = "zPointOfClosestApproachVsPhi_";
906  histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, VZBinProf, VZMinProf, VZMaxProf, "");
907  zPointOfClosestApproachVsPhi->setAxisTitle("Track #phi", 1);
908  zPointOfClosestApproachVsPhi->setAxisTitle("z component of Track PCA to beam line (cm)", 2);
909  }
910 
911  if (doDCAPlots_ || doPVPlots_ || doAllPlots_) {
912  int DxyBin = conf_->getParameter<int>("DxyBin");
913  double DxyMin = conf_->getParameter<double>("DxyMin");
914  double DxyMax = conf_->getParameter<double>("DxyMax");
915 
916  int PhiBin = conf_->getParameter<int>("PhiBin");
917  double PhiMin = conf_->getParameter<double>("PhiMin");
918  double PhiMax = conf_->getParameter<double>("PhiMax");
919 
920  int X0Bin = conf_->getParameter<int>("X0Bin");
921  double X0Min = conf_->getParameter<double>("X0Min");
922  double X0Max = conf_->getParameter<double>("X0Max");
923 
924  int Y0Bin = conf_->getParameter<int>("Y0Bin");
925  double Y0Min = conf_->getParameter<double>("Y0Min");
926  double Y0Max = conf_->getParameter<double>("Y0Max");
927 
928  int Z0Bin = conf_->getParameter<int>("Z0Bin");
929  double Z0Min = conf_->getParameter<double>("Z0Min");
930  double Z0Max = conf_->getParameter<double>("Z0Max");
931 
932  ibooker.setCurrentFolder(TopFolder_ + "/GeneralProperties");
933 
934  histname = "DistanceOfClosestApproachToPV_";
936  ibooker.book1D(histname + CategoryName, histname + CategoryName, DxyBin, DxyMin, DxyMax);
937  DistanceOfClosestApproachToPV->setAxisTitle("Track d_{xy} w.r.t. PV (cm)", 1);
938  DistanceOfClosestApproachToPV->setAxisTitle("Number of Tracks", 2);
939 
940  histname = "DistanceOfClosestApproachToPVZoom_";
942  ibooker.book1D(histname + CategoryName, histname + CategoryName, 100, -0.08, 0.08);
943  DistanceOfClosestApproachToPVZoom->setAxisTitle("Track d_{xy} w.r.t. PV (cm)", 1);
944  DistanceOfClosestApproachToPVZoom->setAxisTitle("Number of Tracks", 2);
945 
946  histname = "DeltaZToPV_";
947  DeltaZToPV = ibooker.book1D(histname + CategoryName, histname + CategoryName, Z0Bin, Z0Min, Z0Max);
948  DeltaZToPV->setAxisTitle("Track d_{z} w.r.t. PV (cm)", 1);
949  DeltaZToPV->setAxisTitle("Number of Tracks", 2);
950 
951  histname = "DeltaZToPVZoom_";
952  DeltaZToPVZoom = ibooker.book1D(histname + CategoryName, histname + CategoryName, 100, -0.15, 0.15);
953  DeltaZToPVZoom->setAxisTitle("Track d_{z} w.r.t. PV (cm)", 1);
954  DeltaZToPVZoom->setAxisTitle("Number of Tracks", 2);
955 
956  histname = "DistanceOfClosestApproachToPVVsPhi_";
958  histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax, "");
960  DistanceOfClosestApproachToPVVsPhi->setAxisTitle("Track d_{xy} w.r.t. PV (cm)", 2);
961 
962  histname = "xPointOfClosestApproachVsZ0wrtPV_";
964  histname + CategoryName, histname + CategoryName, Z0Bin, Z0Min, Z0Max, X0Bin, X0Min, X0Max, "");
965  xPointOfClosestApproachVsZ0wrtPV->setAxisTitle("d_{z} w.r.t. PV (cm)", 1);
966  xPointOfClosestApproachVsZ0wrtPV->setAxisTitle("x component of Track PCA to PV (cm)", 2);
967 
968  histname = "yPointOfClosestApproachVsZ0wrtPV_";
970  histname + CategoryName, histname + CategoryName, Z0Bin, Z0Min, Z0Max, Y0Bin, Y0Min, Y0Max, "");
971  yPointOfClosestApproachVsZ0wrtPV->setAxisTitle("d_{z} w.r.t. PV (cm)", 1);
972  yPointOfClosestApproachVsZ0wrtPV->setAxisTitle("y component of Track PCA to PV (cm)", 2);
973  }
974 
975  if (doBSPlots_ || doAllPlots_) {
976  if (doTestPlots_) {
977  int DxyBin = conf_->getParameter<int>("DxyBin");
978  double DxyMin = conf_->getParameter<double>("DxyMin");
979  double DxyMax = conf_->getParameter<double>("DxyMax");
980 
981  int PhiBin = conf_->getParameter<int>("PhiBin");
982  double PhiMin = conf_->getParameter<double>("PhiMin");
983  double PhiMax = conf_->getParameter<double>("PhiMax");
984 
985  histname = "TESTDistanceOfClosestApproachToBS_";
987  ibooker.book1D(histname + CategoryName, histname + CategoryName, DxyBin, DxyMin, DxyMax);
988  TESTDistanceOfClosestApproachToBS->setAxisTitle("Track d_{xy} wrt beam spot (cm)", 1);
989  TESTDistanceOfClosestApproachToBS->setAxisTitle("Number of Tracks", 2);
990 
991  histname = "TESTDistanceOfClosestApproachToBSVsPhi_";
993  histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax, "");
995  TESTDistanceOfClosestApproachToBSVsPhi->setAxisTitle("Track d_{xy} wrt beam spot (cm)", 2);
996  }
997  }
998 
999  // book the Profile plots for DCA related histograms
1000  // ---------------------------------------------------------------------------------//
1001  if (doDCAPlots_ || doAllPlots_) {
1002  if (doDCAwrt000Plots_) {
1003  int EtaBin = conf_->getParameter<int>("EtaBin");
1004  double EtaMin = conf_->getParameter<double>("EtaMin");
1005  double EtaMax = conf_->getParameter<double>("EtaMax");
1006 
1007  int PhiBin = conf_->getParameter<int>("PhiBin");
1008  double PhiMin = conf_->getParameter<double>("PhiMin");
1009  double PhiMax = conf_->getParameter<double>("PhiMax");
1010 
1011  int DxyBin = conf_->getParameter<int>("DxyBin");
1012  double DxyMin = conf_->getParameter<double>("DxyMin");
1013  double DxyMax = conf_->getParameter<double>("DxyMax");
1014 
1015  if (doThetaPlots_) {
1016  int ThetaBin = conf_->getParameter<int>("ThetaBin");
1017  double ThetaMin = conf_->getParameter<double>("ThetaMin");
1018  double ThetaMax = conf_->getParameter<double>("ThetaMax");
1019 
1020  ibooker.setCurrentFolder(TopFolder_ + "/GeneralProperties");
1021  histname = "DistanceOfClosestApproachVsTheta_";
1023  histname + CategoryName, histname + CategoryName, ThetaBin, ThetaMin, ThetaMax, DxyMin, DxyMax, "");
1024  DistanceOfClosestApproachVsTheta->setAxisTitle("Track #theta", 1);
1025  DistanceOfClosestApproachVsTheta->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)", 2);
1026  }
1027 
1028  histname = "DistanceOfClosestApproachVsEta_";
1030  histname + CategoryName, histname + CategoryName, EtaBin, EtaMin, EtaMax, DxyMin, DxyMax, "");
1031  DistanceOfClosestApproachVsEta->setAxisTitle("Track #eta", 1);
1032  DistanceOfClosestApproachVsEta->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)", 2);
1033  // temporary patch in order to put back those MEs in Muon Workspace
1034 
1035  histname = "DistanceOfClosestApproach_";
1037  ibooker.book1D(histname + CategoryName, histname + CategoryName, DxyBin, DxyMin, DxyMax);
1038  DistanceOfClosestApproach->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)", 1);
1039  DistanceOfClosestApproach->setAxisTitle("Number of Tracks", 2);
1040 
1041  histname = "DistanceOfClosestApproachVsPhi_";
1043  histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, DxyMin, DxyMax, "");
1044  DistanceOfClosestApproachVsPhi->setAxisTitle("Track #phi", 1);
1045  DistanceOfClosestApproachVsPhi->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)", 2);
1046  }
1047  }
1048 
1049  if (doSIPPlots_ || doAllPlots_) {
1050  const double sipBins = 200;
1051  const double sipMin = -20;
1052  const double sipMax = 20;
1053 
1054  ibooker.setCurrentFolder(TopFolder_ + "/GeneralProperties");
1055 
1056  // SIP wrt. beamspot
1057  histname = "SIPDxyToBS_";
1058  sipDxyToBS = ibooker.book1D(histname + CategoryName, histname + CategoryName, sipBins, sipMin, sipMax);
1059  sipDxyToBS->setAxisTitle("Track dxy significance wrt beam spot", 1);
1060  sipDxyToBS->setAxisTitle("Number of Tracks", 2);
1061 
1062  histname = "SIPDzToBS_";
1063  sipDzToBS = ibooker.book1D(histname + CategoryName, histname + CategoryName, sipBins, sipMin, sipMax);
1064  sipDzToBS->setAxisTitle("Track dz significance wrt beam spot", 1);
1065  sipDzToBS->setAxisTitle("Number of Tracks", 2);
1066 
1067  // SIP wrt. vertex
1068  histname = "SIP3DToPV_";
1069  sip3dToPV = ibooker.book1D(histname + CategoryName, histname + CategoryName, sipBins, sipMin, sipMax);
1070  sip3dToPV->setAxisTitle("3D IP significance wrt primary vertex", 1);
1071  sip3dToPV->setAxisTitle("Number of Tracks", 2);
1072 
1073  histname = "SIP2DToPV_";
1074  sip2dToPV = ibooker.book1D(histname + CategoryName, histname + CategoryName, sipBins, sipMin, sipMax);
1075  sip2dToPV->setAxisTitle("2D IP significance wrt primary vertex", 1);
1076  sip2dToPV->setAxisTitle("Number of Tracks", 2);
1077 
1078  histname = "SIPDxyToPV_";
1079  sipDxyToPV = ibooker.book1D(histname + CategoryName, histname + CategoryName, sipBins, sipMin, sipMax);
1080  sipDxyToPV->setAxisTitle("Track dxy significance wrt primary vertex", 1);
1081  sipDxyToPV->setAxisTitle("Number of Tracks", 2);
1082 
1083  histname = "SIPDzToPV_";
1084  sipDzToPV = ibooker.book1D(histname + CategoryName, histname + CategoryName, sipBins, sipMin, sipMax);
1085  sipDzToPV->setAxisTitle("Track dz significance wrt primary vertex", 1);
1086  sipDzToPV->setAxisTitle("Number of Tracks", 2);
1087  }
1088 }
1089 
1090 // -- Analyse
1091 // ---------------------------------------------------------------------------------//
1093  good_vertices_ = 0;
1094 
1095  edm::Handle<reco::VertexCollection> recoPrimaryVerticesHandle;
1096  iEvent.getByToken(pvToken_, recoPrimaryVerticesHandle);
1097  if (recoPrimaryVerticesHandle.isValid())
1098  if (!recoPrimaryVerticesHandle->empty())
1099  for (auto v : *recoPrimaryVerticesHandle)
1100  if (v.ndof() >= pvNDOF_ && !v.isFake())
1101  ++good_vertices_;
1102 }
1103 
1105 
1108  // as done by pixelLumi http://cmslxr.fnal.gov/source/DQM/PixelLumi/plugins/PixelLumiDQM.cc
1109 
1111  iEvent.getByToken(lumiscalersToken_, lumiScalers);
1112  if (lumiScalers.isValid() && !lumiScalers->empty()) {
1113  LumiScalersCollection::const_iterator scalit = lumiScalers->begin();
1114  scal_lumi_ = scalit->instantLumi();
1115  } else
1116  scal_lumi_ = -1;
1117 
1119  iEvent.getByToken(pixelClustersToken_, pixelClusters);
1120  if (pixelClusters.isValid()) {
1121  edm::ESHandle<TrackerTopology> tTopoHandle;
1122  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
1123  const TrackerTopology* const tTopo = tTopoHandle.product();
1124 
1125  // Count the number of clusters with at least a minimum
1126  // number of pixels per cluster and at least a minimum charge.
1127  size_t numClusters = 0;
1128  size_t tot = 0;
1129 
1130  edmNew::DetSetVector<SiPixelCluster>::const_iterator pixCluDet = pixelClusters->begin();
1131  for (; pixCluDet != pixelClusters->end(); ++pixCluDet) {
1132  DetId detid = pixCluDet->detId();
1133  size_t subdetid = detid.subdetId();
1134  // std::cout << tTopo->print(detid) << std::endl;
1135  if (subdetid == (int)PixelSubdetector::PixelBarrel)
1136  if (tTopo->layer(detid) == 1)
1137  continue;
1138 
1140  for (; pixClu != pixCluDet->end(); ++pixClu) {
1141  ++tot;
1142  if ((pixClu->size() >= minNumberOfPixelsPerCluster_) && (pixClu->charge() >= minPixelClusterCharge_)) {
1143  ++numClusters;
1144  }
1145  }
1146  }
1147  pixel_lumi_ = lumi_factor_per_bx_ * numClusters / GetLumi::CM2_TO_NANOBARN; // ?!?!
1148  } else
1149  pixel_lumi_ = -1.;
1150 }
1151 
1153  auto pt = track.pt();
1154  auto phi = track.phi();
1155  // double eta = track.eta();
1156  auto phiIn = track.innerPosition().phi();
1157  auto etaIn = track.innerPosition().eta();
1158  auto phiOut = track.outerPosition().phi();
1159  auto etaOut = track.outerPosition().eta();
1160 
1162  int nValidRecHits = track.numberOfValidHits();
1163  int nLostRecHits = track.numberOfLostHits();
1166 
1167  auto chi2 = track.chi2();
1168  auto chi2prob = TMath::Prob(track.chi2(), (int)track.ndof());
1169  auto chi2oNDF = track.normalizedChi2();
1170 
1171  std::string Folder = TopFolder_.substr(0, 2);
1172 
1174  // rec hits
1175  NumberOfRecHitsPerTrack->Fill(nRecHits);
1176  NumberOfValidRecHitsPerTrack->Fill(nValidRecHits);
1177  NumberOfLostRecHitsPerTrack->Fill(nLostRecHits);
1178  NumberOfMIRecHitsPerTrack->Fill(nLostIn);
1179  NumberOfMORecHitsPerTrack->Fill(nLostOut);
1181 
1182  // 2D plots
1184  NumberOfValidRecHitVsPhiVsEtaPerTrack->Fill(etaIn, phiIn, nValidRecHits);
1185  NumberOfLostRecHitVsPhiVsEtaPerTrack->Fill(etaIn, phiIn, nLostRecHits);
1186  NumberOfMIRecHitVsPhiVsEtaPerTrack->Fill(etaIn, phiIn, nLostIn);
1187  NumberOfMORecHitVsPhiVsEtaPerTrack->Fill(etaOut, phiOut, nLostOut);
1188  ValidFractionVsPhiVsEtaPerTrack->Fill(etaIn, phiIn, track.validFraction());
1189  }
1191  NumberOfValidRecHitVsPtVsEtaPerTrack->Fill(etaIn, pt, nValidRecHits);
1192  NumberOfLostRecHitVsPtVsEtaPerTrack->Fill(etaIn, pt, nLostRecHits);
1193  NumberOfMIRecHitVsPtVsEtaPerTrack->Fill(etaIn, pt, nLostIn);
1194  NumberOfMORecHitVsPtVsEtaPerTrack->Fill(etaOut, pt, nLostOut);
1195  }
1196  NumberOfValidRecHitsPerTrackVsPt->Fill(pt, nValidRecHits);
1197  NumberOfLostRecHitsPerTrackVsPt->Fill(pt, nLostRecHits);
1200 
1201  int nLayers[5] = {track.hitPattern().trackerLayersWithMeasurement(),
1207 
1208  // layers
1209  for (int i = 0; i < 4; ++i)
1210  NumberOfLayersPerTrack[i]->Fill(nLayers[i]);
1211 
1212  // 2D plots
1214  for (int i = 0; i < 5; ++i)
1215  NumberOfLayersVsPhiVsEtaPerTrack[i]->Fill(etaIn, phiIn, nLayers[i]);
1216  }
1217 
1219  fillHistosForEfficiencyFromHitPatter(track, "", float(good_vertices_), false);
1221  fillHistosForEfficiencyFromHitPatter(track, "VsBX", float(bx_), false);
1223  fillHistosForEfficiencyFromHitPatter(track, "VsSCALLUMI", scal_lumi_, false);
1224  // if (doEffFromHitPatternVsLUMI_ || doAllPlots_) fillHistosForEfficiencyFromHitPatter(track,"VsPIXELLUMI", pixel_lumi_ );
1226  fillHistosForEfficiencyFromHitPatter(track, "", float(good_vertices_), true);
1228  fillHistosForEfficiencyFromHitPatter(track, "VsSCALLUMI", scal_lumi_, true);
1229 
1231  // fitting
1232  Chi2->Fill(chi2);
1233  Chi2Prob->Fill(chi2prob);
1234  Chi2oNDF->Fill(chi2oNDF);
1235 
1236  // DCA
1237  // temporary patch in order to put back those MEs in Muon Workspace
1238  if (doDCAPlots_) {
1239  if (doDCAwrt000Plots_) {
1242  }
1243 
1244  // PCA
1248  }
1249 
1250  // algorithm
1251  algorithm->Fill(static_cast<double>(track.algo()));
1252  oriAlgo->Fill(static_cast<double>(track.originalAlgo()));
1253 
1254  // stopping source
1255  int max = stoppingSource->getNbinsX();
1256  double stop = track.stopReason() > max ? double(max - 1) : static_cast<double>(track.stopReason());
1257  double stopped = int(StopReason::NOT_STOPPED) == track.stopReason() ? 0. : 1.;
1258  stoppingSource->Fill(stop);
1259  stoppingSourceVSeta->Fill(track.eta(), stopped);
1260  stoppingSourceVSphi->Fill(track.phi(), stopped);
1261  }
1262 
1263  if (doLumiAnalysis_) {
1265  Chi2oNDF_lumiFlag->Fill(chi2oNDF);
1266  }
1267 
1269  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
1270  iEvent.getByToken(beamSpotToken_, recoBeamSpotHandle);
1271  const reco::BeamSpot& bs = *recoBeamSpotHandle;
1272 
1278 
1280 
1281  if (Folder == "Tr") {
1283  DistanceOfClosestApproachToBSVsEta->Fill(track.eta(), track.dxy(bs.position()));
1284  }
1285 
1287  DistanceOfClosestApproachToBSVsPhi->Fill(track.phi(), track.dxy(bs.position()));
1288  zPointOfClosestApproachVsPhi->Fill(track.phi(), track.vz());
1289  xPointOfClosestApproachVsZ0wrt000->Fill(track.dz(), track.vx());
1290  yPointOfClosestApproachVsZ0wrt000->Fill(track.dz(), track.vy());
1291  xPointOfClosestApproachVsZ0wrtBS->Fill(track.dz(bs.position()), (track.vx() - bs.position(track.vz()).x()));
1292  yPointOfClosestApproachVsZ0wrtBS->Fill(track.dz(bs.position()), (track.vy() - bs.position(track.vz()).y()));
1293  if (doTestPlots_) {
1294  TESTDistanceOfClosestApproachToBS->Fill(track.dxy(bs.position(track.vz())));
1295  TESTDistanceOfClosestApproachToBSVsPhi->Fill(track.phi(), track.dxy(bs.position(track.vz())));
1296  }
1297 
1298  if (doSIPPlots_) {
1299  sipDxyToBS->Fill(track.dxy(bs.position()) / track.dxyError());
1300  sipDzToBS->Fill(track.dz(bs.position()) / track.dzError());
1301  }
1302  }
1303 
1305  edm::Handle<reco::VertexCollection> recoPrimaryVerticesHandle;
1306  iEvent.getByToken(pvToken_, recoPrimaryVerticesHandle);
1307  if (recoPrimaryVerticesHandle.isValid() && !recoPrimaryVerticesHandle->empty()) {
1308  const reco::Vertex& pv = (*recoPrimaryVerticesHandle)[0];
1309 
1311  //HI PLOTS///////
1313 
1314  if (doHIPlots_) {
1315  double longDCAsig = 0, transDCAsig = 0;
1316  double zerr2 = track.dzError() * track.dzError() + pv.zError() * pv.zError();
1317  double xyerr2 = track.d0Error() * track.d0Error() + pv.xError() * pv.yError();
1318  if (zerr2 > 0)
1319  longDCAsig = track.dz(pv.position()) / zerr2;
1320  if (xyerr2 > 0)
1321  transDCAsig = track.dxy(pv.position()) / xyerr2;
1322  LongDCASig->Fill(longDCAsig);
1323  TransDCASig->Fill(transDCAsig);
1324 
1326  dNdEta_HighPurity->Fill(track.eta());
1327  dNdPhi_HighPurity->Fill(track.phi());
1328  dNdPt_HighPurity->Fill(track.ptError() / track.pt());
1329  NhitVsEta_HighPurity->Fill(track.eta(), track.numberOfValidHits());
1330  NhitVsPhi_HighPurity->Fill(track.phi(), track.numberOfValidHits());
1331  dNhitdPt_HighPurity->Fill(track.pt(), track.numberOfValidHits());
1332  Ptdist_HighPurity->Fill(track.pt());
1333  } //end of high quality tracks requirement
1334  }
1335 
1336  xPointOfClosestApproachToPV->Fill(track.vx() - pv.position().x());
1337  yPointOfClosestApproachToPV->Fill(track.vy() - pv.position().y());
1340  DeltaZToPV->Fill(track.dz(pv.position()));
1342  DeltaZToPVZoom->Fill(track.dz(pv.position()));
1343  DistanceOfClosestApproachToPVVsPhi->Fill(track.phi(), track.dxy(pv.position()));
1344  xPointOfClosestApproachVsZ0wrtPV->Fill(track.dz(pv.position()), (track.vx() - pv.position().x()));
1345  yPointOfClosestApproachVsZ0wrtPV->Fill(track.dz(pv.position()), (track.vy() - pv.position().y()));
1346 
1347  if (doSIPPlots_) {
1349  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", theB);
1350  reco::TransientTrack transTrack = theB->build(track);
1351 
1352  GlobalVector dir(track.px(), track.py(), track.pz());
1353  std::pair<bool, Measurement1D> ip3d = IPTools::signedImpactParameter3D(transTrack, dir, pv);
1354  std::pair<bool, Measurement1D> ip2d = IPTools::signedTransverseImpactParameter(transTrack, dir, pv);
1355  if (ip3d.first)
1356  sip3dToPV->Fill(ip3d.second.value() / ip3d.second.error());
1357  if (ip2d.first)
1358  sip2dToPV->Fill(ip2d.second.value() / ip2d.second.error());
1359  sipDxyToPV->Fill(track.dxy(pv.position()) / track.dxyError());
1360  sipDzToPV->Fill(track.dz(pv.position()) / track.dzError());
1361  }
1362  }
1363  }
1364 
1365  if (doDCAPlots_ || doAllPlots_) {
1366  if (doDCAwrt000Plots_) {
1367  if (doThetaPlots_) {
1368  DistanceOfClosestApproachVsTheta->Fill(track.theta(), track.d0());
1369  }
1370  DistanceOfClosestApproachVsEta->Fill(track.eta(), track.d0());
1371  }
1372  }
1373 
1374  //Tracker Specific Histograms
1377  }
1378 
1380  if (stateName_ == "All") {
1381  fillHistosForState(iSetup, track, std::string("OuterSurface"));
1382  fillHistosForState(iSetup, track, std::string("InnerSurface"));
1383  fillHistosForState(iSetup, track, std::string("ImpactPoint"));
1384  } else if (stateName_ != "OuterSurface" && stateName_ != "InnerSurface" && stateName_ != "ImpactPoint" &&
1385  stateName_ != "default") {
1386  fillHistosForState(iSetup, track, std::string("default"));
1387  } else {
1388  fillHistosForState(iSetup, track, stateName_);
1389  }
1390  }
1391 
1392  if (doAllPlots_) {
1393  }
1394 }
1395 
1397  const std::string suffix,
1398  const float monitoring,
1399  bool useInac) {
1400  int mon = -1;
1401  for (int i = 0; i < monQuantity::END; i++) {
1402  if (monName[i] == suffix)
1403  mon = i;
1404  }
1405  if (useInac)
1406  mon += monQuantity::END;
1407 
1408  // if (track.pt() > 1.0 && track.dxy() < 0.1 and monitoring > 0) {
1409  if (track.pt() > 1.0 && track.dxy() < 0.1 and monitoring > -9.) {
1410  auto hp = track.hitPattern();
1411  // Here hit_category is meant to iterate over
1412  // reco::HitPattern::HitCategory, defined here:
1413  // http://cmslxr.fnal.gov/dxr/CMSSW/source/DataFormats/TrackReco/interface/HitPattern.h
1414  for (unsigned int category = 0; category < 3; ++category) {
1415  for (int hit = 0; hit < hp.numberOfAllHits((reco::HitPattern::HitCategory)(category)); ++hit) {
1416  auto pattern = hp.getHitPattern((reco::HitPattern::HitCategory)(category), hit);
1417  // Boolean bad is missing simply because it is inferred and the only missing case.
1418  bool valid = hp.validHitFilter(pattern);
1419  bool missing = hp.missingHitFilter(pattern);
1420  bool inactive = hp.inactiveHitFilter(pattern);
1421  int hit_type = -1;
1422  hit_type = valid ? 0 : (missing ? 1 : (inactive ? 2 : 3));
1423  if (hits_valid_.find(Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)) ==
1424  hits_valid_.end()) {
1425  LogDebug("TrackAnalyzer") << "Invalid combination of detector and subdetector: ("
1426  << hp.getSubStructure(pattern) << ", " << hp.getSubSubStructure(pattern) << ", "
1427  << mon << "): ignoring it.\n";
1428  continue;
1429  }
1430  switch (hit_type) {
1431  case 0:
1432  hits_valid_[Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)]->Fill(monitoring);
1433  hits_total_[Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)]->Fill(monitoring);
1434  break;
1435  case 2:
1436  if (!useInac)
1437  break;
1438  [[fallthrough]];
1439  case 1:
1440  hits_total_[Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)]->Fill(monitoring);
1441  break;
1442  default:
1443  LogDebug("TrackAnalyzer") << "Invalid hit category used " << hit_type << " ignored\n";
1444  }
1445  }
1446  }
1447  }
1448 }
1449 
1450 // book histograms at differnt measurement points
1451 // ---------------------------------------------------------------------------------//
1453  // parameters from the configuration
1454  std::string QualName = conf_->getParameter<std::string>("Quality");
1456  std::string Folder = TopFolder_.substr(0, 2);
1457 
1458  // use the AlgoName and Quality Name
1459  std::string CategoryName = !QualName.empty() ? AlgoName + "_" + QualName : AlgoName;
1460 
1461  // get binning from the configuration
1462  double Chi2NDFMin = conf_->getParameter<double>("Chi2NDFMin");
1463  double Chi2NDFMax = conf_->getParameter<double>("Chi2NDFMax");
1464 
1465  int RecHitBin = conf_->getParameter<int>("RecHitBin");
1466  double RecHitMin = conf_->getParameter<double>("RecHitMin");
1467  double RecHitMax = conf_->getParameter<double>("RecHitMax");
1468 
1469  int RecLayBin = conf_->getParameter<int>("RecHitBin");
1470  double RecLayMin = conf_->getParameter<double>("RecHitMin");
1471  double RecLayMax = conf_->getParameter<double>("RecHitMax");
1472 
1473  int PhiBin = conf_->getParameter<int>("PhiBin");
1474  double PhiMin = conf_->getParameter<double>("PhiMin");
1475  double PhiMax = conf_->getParameter<double>("PhiMax");
1476 
1477  int EtaBin = conf_->getParameter<int>("EtaBin");
1478  double EtaMin = conf_->getParameter<double>("EtaMin");
1479  double EtaMax = conf_->getParameter<double>("EtaMax");
1480 
1481  int Phi2DBin = conf_->getParameter<int>("Phi2DBin");
1482  int Eta2DBin = conf_->getParameter<int>("Eta2DBin");
1483 
1484  int ThetaBin = conf_->getParameter<int>("ThetaBin");
1485  double ThetaMin = conf_->getParameter<double>("ThetaMin");
1486  double ThetaMax = conf_->getParameter<double>("ThetaMax");
1487 
1488  int TrackQBin = conf_->getParameter<int>("TrackQBin");
1489  double TrackQMin = conf_->getParameter<double>("TrackQMin");
1490  double TrackQMax = conf_->getParameter<double>("TrackQMax");
1491 
1492  int TrackPtBin = conf_->getParameter<int>("TrackPtBin");
1493  double TrackPtMin = conf_->getParameter<double>("TrackPtMin");
1494  double TrackPtMax = conf_->getParameter<double>("TrackPtMax");
1495 
1496  int TrackPBin = conf_->getParameter<int>("TrackPBin");
1497  double TrackPMin = conf_->getParameter<double>("TrackPMin");
1498  double TrackPMax = conf_->getParameter<double>("TrackPMax");
1499 
1500  int TrackPxBin = conf_->getParameter<int>("TrackPxBin");
1501  double TrackPxMin = conf_->getParameter<double>("TrackPxMin");
1502  double TrackPxMax = conf_->getParameter<double>("TrackPxMax");
1503 
1504  int TrackPyBin = conf_->getParameter<int>("TrackPyBin");
1505  double TrackPyMin = conf_->getParameter<double>("TrackPyMin");
1506  double TrackPyMax = conf_->getParameter<double>("TrackPyMax");
1507 
1508  int TrackPzBin = conf_->getParameter<int>("TrackPzBin");
1509  double TrackPzMin = conf_->getParameter<double>("TrackPzMin");
1510  double TrackPzMax = conf_->getParameter<double>("TrackPzMax");
1511 
1512  int ptErrBin = conf_->getParameter<int>("ptErrBin");
1513  double ptErrMin = conf_->getParameter<double>("ptErrMin");
1514  double ptErrMax = conf_->getParameter<double>("ptErrMax");
1515 
1516  int pxErrBin = conf_->getParameter<int>("pxErrBin");
1517  double pxErrMin = conf_->getParameter<double>("pxErrMin");
1518  double pxErrMax = conf_->getParameter<double>("pxErrMax");
1519 
1520  int pyErrBin = conf_->getParameter<int>("pyErrBin");
1521  double pyErrMin = conf_->getParameter<double>("pyErrMin");
1522  double pyErrMax = conf_->getParameter<double>("pyErrMax");
1523 
1524  int pzErrBin = conf_->getParameter<int>("pzErrBin");
1525  double pzErrMin = conf_->getParameter<double>("pzErrMin");
1526  double pzErrMax = conf_->getParameter<double>("pzErrMax");
1527 
1528  int pErrBin = conf_->getParameter<int>("pErrBin");
1529  double pErrMin = conf_->getParameter<double>("pErrMin");
1530  double pErrMax = conf_->getParameter<double>("pErrMax");
1531 
1532  int phiErrBin = conf_->getParameter<int>("phiErrBin");
1533  double phiErrMin = conf_->getParameter<double>("phiErrMin");
1534  double phiErrMax = conf_->getParameter<double>("phiErrMax");
1535 
1536  int etaErrBin = conf_->getParameter<int>("etaErrBin");
1537  double etaErrMin = conf_->getParameter<double>("etaErrMin");
1538  double etaErrMax = conf_->getParameter<double>("etaErrMax");
1539 
1540  double Chi2ProbMin = conf_->getParameter<double>("Chi2ProbMin");
1541  double Chi2ProbMax = conf_->getParameter<double>("Chi2ProbMax");
1542 
1543  ibooker.setCurrentFolder(TopFolder_);
1544 
1545  TkParameterMEs tkmes;
1546 
1547  std::string histTag = (sname == "default") ? CategoryName : sname + "_" + CategoryName;
1548 
1549  if (doAllPlots_) {
1550  // general properties
1551  ibooker.setCurrentFolder(TopFolder_ + "/GeneralProperties");
1552 
1553  if (doThetaPlots_) {
1554  histname = "Chi2oNDFVsTheta_" + histTag;
1555  tkmes.Chi2oNDFVsTheta =
1556  ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, Chi2NDFMin, Chi2NDFMax, "");
1557  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #theta", 1);
1558  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #chi^{2}/ndf", 2);
1559  }
1560  histname = "Chi2oNDFVsPhi_" + histTag;
1561  tkmes.Chi2oNDFVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, Chi2NDFMin, Chi2NDFMax, "");
1562  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #phi", 1);
1563  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #chi^{2}/ndf", 2);
1564 
1565  histname = "Chi2ProbVsPhi_" + histTag;
1566  tkmes.Chi2ProbVsPhi = ibooker.bookProfile(
1567  histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, Chi2ProbMin, Chi2ProbMax);
1568  tkmes.Chi2ProbVsPhi->setAxisTitle("Tracks #phi", 1);
1569  tkmes.Chi2ProbVsPhi->setAxisTitle("Track #chi^{2} probability", 2);
1570 
1571  histname = "Chi2ProbVsEta_" + histTag;
1572  tkmes.Chi2ProbVsEta = ibooker.bookProfile(
1573  histname + CategoryName, histname + CategoryName, EtaBin, EtaMin, EtaMax, Chi2ProbMin, Chi2ProbMax);
1574  tkmes.Chi2ProbVsEta->setAxisTitle("Tracks #eta", 1);
1575  tkmes.Chi2ProbVsEta->setAxisTitle("Track #chi^{2} probability", 2);
1576  }
1577 
1578  // general properties
1579  ibooker.setCurrentFolder(TopFolder_ + "/GeneralProperties");
1580 
1581  histname = "Chi2oNDFVsEta_" + histTag;
1582  tkmes.Chi2oNDFVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, Chi2NDFMin, Chi2NDFMax, "");
1583  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #eta", 1);
1584  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #chi^{2}/ndf", 2);
1585 
1586  histname = "Chi2oNDFVsPt_" + histTag;
1587  tkmes.Chi2oNDFVsPt =
1588  ibooker.bookProfile(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax, Chi2NDFMin, Chi2NDFMax, "");
1589  tkmes.Chi2oNDFVsPt->setAxisTitle("Track p_{T} (GeV/c)", 1);
1590  tkmes.Chi2oNDFVsPt->setAxisTitle("Track #chi^{2}/ndf", 2);
1591 
1592  histname = "Chi2oNDFVsNHits_" + histTag;
1593  tkmes.Chi2oNDFVsNHits = ibooker.bookProfile(histname, histname, 50, 0., 50, Chi2NDFMin, Chi2NDFMax, "");
1594  tkmes.Chi2oNDFVsNHits->setAxisTitle("Track NHits", 1);
1595  tkmes.Chi2oNDFVsNHits->setAxisTitle("Track #chi^{2}/ndf", 2);
1596 
1597  histname = "TrackP_" + histTag;
1598  tkmes.TrackP = ibooker.book1D(histname, histname, TrackPBin, TrackPMin, TrackPMax);
1599  tkmes.TrackP->setAxisTitle("Track |p| (GeV/c)", 1);
1600  tkmes.TrackP->setAxisTitle("Number of Tracks", 2);
1601 
1602  histname = "TrackPt_" + histTag;
1603  tkmes.TrackPt = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1604  tkmes.TrackPt->setAxisTitle("Track p_{T} (GeV/c)", 1);
1605  tkmes.TrackPt->setAxisTitle("Number of Tracks", 2);
1606 
1607  if (doTrackPxPyPlots_) {
1608  histname = "TrackPx_" + histTag;
1609  tkmes.TrackPx = ibooker.book1D(histname, histname, TrackPxBin, TrackPxMin, TrackPxMax);
1610  tkmes.TrackPx->setAxisTitle("Track p_{x} (GeV/c)", 1);
1611  tkmes.TrackPx->setAxisTitle("Number of Tracks", 2);
1612 
1613  histname = "TrackPy_" + histTag;
1614  tkmes.TrackPy = ibooker.book1D(histname, histname, TrackPyBin, TrackPyMin, TrackPyMax);
1615  tkmes.TrackPy->setAxisTitle("Track p_{y} (GeV/c)", 1);
1616  tkmes.TrackPy->setAxisTitle("Number of Tracks", 2);
1617  }
1618  histname = "TrackPz_" + histTag;
1619  tkmes.TrackPz = ibooker.book1D(histname, histname, TrackPzBin, TrackPzMin, TrackPzMax);
1620  tkmes.TrackPz->setAxisTitle("Track p_{z} (GeV/c)", 1);
1621  tkmes.TrackPz->setAxisTitle("Number of Tracks", 2);
1622 
1623  histname = "TrackPhi_" + histTag;
1624  tkmes.TrackPhi = ibooker.book1D(histname, histname, PhiBin, PhiMin, PhiMax);
1625  tkmes.TrackPhi->setAxisTitle("Track #phi", 1);
1626  tkmes.TrackPhi->setAxisTitle("Number of Tracks", 2);
1627 
1628  histname = "TrackEta_" + histTag;
1629  tkmes.TrackEta = ibooker.book1D(histname, histname, EtaBin, EtaMin, EtaMax);
1630  tkmes.TrackEta->setAxisTitle("Track #eta", 1);
1631  tkmes.TrackEta->setAxisTitle("Number of Tracks", 2);
1632 
1633  if (Folder == "Tr") {
1634  histname = "TrackPtHighPurity_" + histTag;
1635  tkmes.TrackPtHighPurity = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1636  tkmes.TrackPtHighPurity->setAxisTitle("Track p_{T} (GeV/c)", 1);
1637  tkmes.TrackPtHighPurity->setAxisTitle("Number of High Purity Tracks", 2);
1638 
1639  histname = "TrackPtTight_" + histTag;
1640  tkmes.TrackPtTight = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1641  tkmes.TrackPtTight->setAxisTitle("Track p_{T} (GeV/c)", 1);
1642  tkmes.TrackPtTight->setAxisTitle("Number of Tight Tracks", 2);
1643 
1644  histname = "TrackPtLoose_" + histTag;
1645  tkmes.TrackPtLoose = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1646  tkmes.TrackPtLoose->setAxisTitle("Track p_{T} (GeV/c)", 1);
1647  tkmes.TrackPtLoose->setAxisTitle("Number of Loose Tracks", 2);
1648 
1649  histname = "Quality_";
1650  tkmes.Quality = ibooker.book1D(histname + CategoryName, histname + CategoryName, 3, 0., 3.);
1651  tkmes.Quality->setAxisTitle("Track quality", 1);
1652  tkmes.Quality->setAxisTitle("Number of Tracks", 2);
1653 
1654  for (size_t ibin = 0; ibin < 3; ibin++) {
1655  tkmes.Quality->setBinLabel(ibin + 1, reco::TrackBase::qualityNames[ibin]);
1656  }
1657 
1658  histname = "TrackPt_NegEta_Phi_btw_neg16_neg32_" + histTag;
1659  tkmes.TrackPt_NegEta_Phi_btw_neg16_neg32 = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1660  tkmes.TrackPt_NegEta_Phi_btw_neg16_neg32->setAxisTitle("Track p_{T} (GeV/c)", 1);
1661  tkmes.TrackPt_NegEta_Phi_btw_neg16_neg32->setAxisTitle("Number of Tracks", 2);
1662 
1663  histname = "TrackPt_NegEta_Phi_btw_0_neg16_" + histTag;
1664  tkmes.TrackPt_NegEta_Phi_btw_0_neg16 = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1665  tkmes.TrackPt_NegEta_Phi_btw_0_neg16->setAxisTitle("Track p_{T} (GeV/c)", 1);
1666  tkmes.TrackPt_NegEta_Phi_btw_0_neg16->setAxisTitle("Number of Tracks", 2);
1667 
1668  histname = "TrackPt_NegEta_Phi_btw_16_0_" + histTag;
1669  tkmes.TrackPt_NegEta_Phi_btw_16_0 = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1670  tkmes.TrackPt_NegEta_Phi_btw_16_0->setAxisTitle("Track p_{T} (GeV/c)", 1);
1671  tkmes.TrackPt_NegEta_Phi_btw_16_0->setAxisTitle("Number of Tracks", 2);
1672 
1673  histname = "TrackPt_NegEta_Phi_btw_32_16_" + histTag;
1674  tkmes.TrackPt_NegEta_Phi_btw_32_16 = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1675  tkmes.TrackPt_NegEta_Phi_btw_32_16->setAxisTitle("Track p_{T} (GeV/c)", 1);
1676  tkmes.TrackPt_NegEta_Phi_btw_32_16->setAxisTitle("Number of Tracks", 2);
1677 
1678  histname = "TrackPt_PosEta_Phi_btw_neg16_neg32_" + histTag;
1679  tkmes.TrackPt_PosEta_Phi_btw_neg16_neg32 = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1680  tkmes.TrackPt_PosEta_Phi_btw_neg16_neg32->setAxisTitle("Track p_{T} (GeV/c)", 1);
1681  tkmes.TrackPt_PosEta_Phi_btw_neg16_neg32->setAxisTitle("Number of Tracks", 2);
1682 
1683  histname = "TrackPt_PosEta_Phi_btw_0_neg16_" + histTag;
1684  tkmes.TrackPt_PosEta_Phi_btw_0_neg16 = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1685  tkmes.TrackPt_PosEta_Phi_btw_0_neg16->setAxisTitle("Track p_{T} (GeV/c)", 1);
1686  tkmes.TrackPt_PosEta_Phi_btw_0_neg16->setAxisTitle("Number of Tracks", 2);
1687 
1688  histname = "TrackPt_PosEta_Phi_btw_16_0_" + histTag;
1689  tkmes.TrackPt_PosEta_Phi_btw_16_0 = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1690  tkmes.TrackPt_PosEta_Phi_btw_16_0->setAxisTitle("Track p_{T} (GeV/c)", 1);
1691  tkmes.TrackPt_PosEta_Phi_btw_16_0->setAxisTitle("Number of Tracks", 2);
1692 
1693  histname = "TrackPt_PosEta_Phi_btw_32_16_" + histTag;
1694  tkmes.TrackPt_PosEta_Phi_btw_32_16 = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1695  tkmes.TrackPt_PosEta_Phi_btw_32_16->setAxisTitle("Track p_{T} (GeV/c)", 1);
1696  tkmes.TrackPt_PosEta_Phi_btw_32_16->setAxisTitle("Number of Tracks", 2);
1697 
1698  histname = "Ratio_byFolding_" + histTag;
1699  tkmes.Ratio_byFolding = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1700  tkmes.Ratio_byFolding->setAxisTitle("Track p_{T} (GeV/c)", 1);
1701 
1702  histname = "Ratio_byFolding2_" + histTag;
1703  tkmes.Ratio_byFolding2 = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1704  tkmes.Ratio_byFolding2->setAxisTitle("Track p_{T} (GeV/c)", 1);
1705 
1706  histname = "TrackEtaHighpurity_" + histTag;
1707  tkmes.TrackEtaHighPurity = ibooker.book1D(histname, histname, EtaBin, EtaMin, EtaMax);
1708  tkmes.TrackEtaHighPurity->setAxisTitle("Track #eta", 1);
1709  tkmes.TrackEtaHighPurity->setAxisTitle("Number of High Purity Tracks", 2);
1710 
1711  histname = "TrackEtaTight_" + histTag;
1712  tkmes.TrackEtaTight = ibooker.book1D(histname, histname, EtaBin, EtaMin, EtaMax);
1713  tkmes.TrackEtaTight->setAxisTitle("Track #eta", 1);
1714  tkmes.TrackEtaTight->setAxisTitle("Number of Tight Tracks", 2);
1715 
1716  histname = "TrackEtaLoose_" + histTag;
1717  tkmes.TrackEtaLoose = ibooker.book1D(histname, histname, EtaBin, EtaMin, EtaMax);
1718  tkmes.TrackEtaLoose->setAxisTitle("Track #eta", 1);
1719  tkmes.TrackEtaLoose->setAxisTitle("Number of Loose Tracks", 2);
1720 
1721  histname = "TrackEtaPhiInverted_" + histTag;
1722  tkmes.TrackEtaPhiInverted = ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax);
1723  tkmes.TrackEtaPhiInverted->setAxisTitle("Track #eta", 1);
1724  tkmes.TrackEtaPhiInverted->setAxisTitle("Track #phi", 2);
1725 
1726  histname = "TrackEtaPhiInvertedoutofphase_" + histTag;
1728  ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax);
1729  tkmes.TrackEtaPhiInvertedoutofphase->setAxisTitle("Track #eta", 1);
1730  tkmes.TrackEtaPhiInvertedoutofphase->setAxisTitle("Track #phi", 2);
1731 
1732  histname = "TkEtaPhi_Ratio_byFoldingmap_" + histTag;
1734  ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax);
1735  tkmes.TkEtaPhi_Ratio_byFoldingmap->setAxisTitle("Track #eta", 1);
1736  tkmes.TkEtaPhi_Ratio_byFoldingmap->setAxisTitle("Track #phi", 2);
1737 
1738  histname = "TkEtaPhi_Ratio_byFoldingmap_op_" + histTag;
1740  ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax);
1741  tkmes.TkEtaPhi_Ratio_byFoldingmap_op->setAxisTitle("Track #eta", 1);
1742  tkmes.TkEtaPhi_Ratio_byFoldingmap_op->setAxisTitle("Track #phi", 2);
1743 
1744  histname = "TkEtaPhi_RelativeDifference_byFoldingmap_" + histTag;
1746  ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax);
1749 
1750  histname = "TkEtaPhi_RelativeDifference_byFoldingmap_op_" + histTag;
1752  ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax);
1755 
1756  histname = "TrackQoverP_" + histTag;
1757  tkmes.TrackQoverP = ibooker.book1D(histname, histname, 10 * TrackQBin, TrackQMin, TrackQMax);
1758  tkmes.TrackQoverP->setAxisTitle("Track QoverP", 1);
1759  tkmes.TrackQoverP->setAxisTitle("Number of Tracks", 2);
1760  }
1761 
1762  histname = "TrackEtaPhi_" + histTag;
1763  tkmes.TrackEtaPhi = ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax);
1764  tkmes.TrackEtaPhi->setAxisTitle("Track #eta", 1);
1765  tkmes.TrackEtaPhi->setAxisTitle("Track #phi", 2);
1766 
1767  histname = "TrackEtaPhiInner_" + histTag;
1768  tkmes.TrackEtaPhiInner = ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax);
1769  tkmes.TrackEtaPhiInner->setAxisTitle("Track #eta", 1);
1770  tkmes.TrackEtaPhiInner->setAxisTitle("Track #phi", 2);
1771 
1772  histname = "TrackEtaPhiOuter_" + histTag;
1773  tkmes.TrackEtaPhiOuter = ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax);
1774  tkmes.TrackEtaPhiOuter->setAxisTitle("Track #eta", 1);
1775  tkmes.TrackEtaPhiOuter->setAxisTitle("Track #phi", 2);
1776 
1777  if (doThetaPlots_) {
1778  histname = "TrackTheta_" + histTag;
1779  tkmes.TrackTheta = ibooker.book1D(histname, histname, ThetaBin, ThetaMin, ThetaMax);
1780  tkmes.TrackTheta->setAxisTitle("Track #theta", 1);
1781  tkmes.TrackTheta->setAxisTitle("Number of Tracks", 2);
1782  }
1783  histname = "TrackQ_" + histTag;
1784  tkmes.TrackQ = ibooker.book1D(histname, histname, TrackQBin, TrackQMin, TrackQMax);
1785  tkmes.TrackQ->setAxisTitle("Track Charge", 1);
1786  tkmes.TrackQ->setAxisTitle("Number of Tracks", 2);
1787 
1788  histname = "TrackPErrOverP_" + histTag;
1789  tkmes.TrackPErr = ibooker.book1D(histname, histname, pErrBin, pErrMin, pErrMax);
1790  tkmes.TrackPErr->setAxisTitle("track error(p)/p", 1);
1791  tkmes.TrackPErr->setAxisTitle("Number of Tracks", 2);
1792 
1793  histname = "TrackPtErrOverPt_" + histTag;
1794  tkmes.TrackPtErr = ibooker.book1D(histname, histname, ptErrBin, ptErrMin, ptErrMax);
1795  tkmes.TrackPtErr->setAxisTitle("track error(p_{T})/p_{T}", 1);
1796  tkmes.TrackPtErr->setAxisTitle("Number of Tracks", 2);
1797 
1798  histname = "TrackPtErrOverPtVsEta_" + histTag;
1799  tkmes.TrackPtErrVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, ptErrMin, ptErrMax);
1800  tkmes.TrackPtErrVsEta->setAxisTitle("Track #eta", 1);
1801  tkmes.TrackPtErrVsEta->setAxisTitle("track error(p_{T})/p_{T}", 2);
1802 
1803  if (doTrackPxPyPlots_) {
1804  histname = "TrackPxErrOverPx_" + histTag;
1805  tkmes.TrackPxErr = ibooker.book1D(histname, histname, pxErrBin, pxErrMin, pxErrMax);
1806  tkmes.TrackPxErr->setAxisTitle("track error(p_{x})/p_{x}", 1);
1807  tkmes.TrackPxErr->setAxisTitle("Number of Tracks", 2);
1808 
1809  histname = "TrackPyErrOverPy_" + histTag;
1810  tkmes.TrackPyErr = ibooker.book1D(histname, histname, pyErrBin, pyErrMin, pyErrMax);
1811  tkmes.TrackPyErr->setAxisTitle("track error(p_{y})/p_{y}", 1);
1812  tkmes.TrackPyErr->setAxisTitle("Number of Tracks", 2);
1813  }
1814  histname = "TrackPzErrOverPz_" + histTag;
1815  tkmes.TrackPzErr = ibooker.book1D(histname, histname, pzErrBin, pzErrMin, pzErrMax);
1816  tkmes.TrackPzErr->setAxisTitle("track error(p_{z})/p_{z}", 1);
1817  tkmes.TrackPzErr->setAxisTitle("Number of Tracks", 2);
1818 
1819  histname = "TrackPhiErr_" + histTag;
1820  tkmes.TrackPhiErr = ibooker.book1D(histname, histname, phiErrBin, phiErrMin, phiErrMax);
1821  tkmes.TrackPhiErr->setAxisTitle("track error(#phi)");
1822  tkmes.TrackPhiErr->setAxisTitle("Number of Tracks", 2);
1823 
1824  histname = "TrackEtaErr_" + histTag;
1825  tkmes.TrackEtaErr = ibooker.book1D(histname, histname, etaErrBin, etaErrMin, etaErrMax);
1826  tkmes.TrackEtaErr->setAxisTitle("track error(#eta)");
1827  tkmes.TrackEtaErr->setAxisTitle("Number of Tracks", 2);
1828 
1829  // rec hit profiles
1830  ibooker.setCurrentFolder(TopFolder_ + "/GeneralProperties");
1831  histname = "NumberOfRecHitsPerTrackVsPhi_" + histTag;
1833  ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, RecHitBin, RecHitMin, RecHitMax, "");
1834  tkmes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Track #phi", 1);
1835  tkmes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Number of RecHits in each Track", 2);
1836 
1837  if (doThetaPlots_) {
1838  histname = "NumberOfRecHitsPerTrackVsTheta_" + histTag;
1840  ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, RecHitBin, RecHitMin, RecHitMax, "");
1841  tkmes.NumberOfRecHitsPerTrackVsTheta->setAxisTitle("Track #phi", 1);
1842  tkmes.NumberOfRecHitsPerTrackVsTheta->setAxisTitle("Number of RecHits in each Track", 2);
1843  }
1844  histname = "NumberOfRecHitsPerTrackVsEta_" + histTag;
1846  ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, RecHitBin, RecHitMin, RecHitMax, "");
1847  tkmes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Track #eta", 1);
1848  tkmes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Number of RecHits in each Track", 2);
1849 
1850  histname = "NumberOfValidRecHitsPerTrackVsPhi_" + histTag;
1852  ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, RecHitMin, RecHitMax, "");
1853  tkmes.NumberOfValidRecHitsPerTrackVsPhi->setAxisTitle("Track #phi", 1);
1854  tkmes.NumberOfValidRecHitsPerTrackVsPhi->setAxisTitle("Number of valid RecHits in each Track", 2);
1855 
1856  histname = "NumberOfValidRecHitsPerTrackVsEta_" + histTag;
1858  ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, RecHitMin, RecHitMax, "");
1859  tkmes.NumberOfValidRecHitsPerTrackVsEta->setAxisTitle("Track #eta", 1);
1860  tkmes.NumberOfValidRecHitsPerTrackVsEta->setAxisTitle("Number of valid RecHits in each Track", 2);
1861 
1862  histname = "NumberOfValidRecHitsPerTrackVsPt_" + histTag;
1864  ibooker.bookProfile(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax, RecHitMin, RecHitMax, "");
1865  tkmes.NumberOfValidRecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
1866  tkmes.NumberOfValidRecHitsPerTrackVsPt->setAxisTitle("Number of valid RecHits in each Track", 2);
1867 
1869  histname = "NumberOfLayersPerTrackVsPhi_" + histTag;
1871  ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, RecLayBin, RecLayMin, RecLayMax, "");
1872  tkmes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Track #phi", 1);
1873  tkmes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Number of Layers in each Track", 2);
1874 
1875  if (doThetaPlots_) {
1876  histname = "NumberOfLayersPerTrackVsTheta_" + histTag;
1878  ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, RecLayBin, RecLayMin, RecLayMax, "");
1879  tkmes.NumberOfLayersPerTrackVsTheta->setAxisTitle("Track #phi", 1);
1880  tkmes.NumberOfLayersPerTrackVsTheta->setAxisTitle("Number of Layers in each Track", 2);
1881  }
1882  histname = "NumberOfLayersPerTrackVsEta_" + histTag;
1884  ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, RecLayBin, RecLayMin, RecLayMax, "");
1885  tkmes.NumberOfLayersPerTrackVsEta->setAxisTitle("Track #eta", 1);
1886  tkmes.NumberOfLayersPerTrackVsEta->setAxisTitle("Number of Layers in each Track", 2);
1887 
1888  if (doThetaPlots_) {
1889  histname = "Chi2oNDFVsTheta_" + histTag;
1890  tkmes.Chi2oNDFVsTheta =
1891  ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, Chi2NDFMin, Chi2NDFMax, "");
1892  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #theta", 1);
1893  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #chi^{2}/ndf", 2);
1894  }
1895  if (doAllPlots_) {
1896  histname = "Chi2oNDFVsPhi_" + histTag;
1897  tkmes.Chi2oNDFVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, Chi2NDFMin, Chi2NDFMax, "");
1898  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #phi", 1);
1899  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #chi^{2}/ndf", 2);
1900 
1901  histname = "Chi2oNDFVsEta_" + histTag;
1902  tkmes.Chi2oNDFVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, Chi2NDFMin, Chi2NDFMax, "");
1903  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #eta", 1);
1904  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #chi^{2}/ndf", 2);
1905 
1906  histname = "Chi2ProbVsPhi_" + histTag;
1907  tkmes.Chi2ProbVsPhi = ibooker.bookProfile(
1908  histname + CategoryName, histname + CategoryName, PhiBin, PhiMin, PhiMax, Chi2ProbMin, Chi2ProbMax);
1909  tkmes.Chi2ProbVsPhi->setAxisTitle("Tracks #phi", 1);
1910  tkmes.Chi2ProbVsPhi->setAxisTitle("Track #chi^{2} probability", 2);
1911 
1912  histname = "Chi2ProbVsEta_" + histTag;
1913  tkmes.Chi2ProbVsEta = ibooker.bookProfile(
1914  histname + CategoryName, histname + CategoryName, EtaBin, EtaMin, EtaMax, Chi2ProbMin, Chi2ProbMax);
1915  tkmes.Chi2ProbVsEta->setAxisTitle("Tracks #eta", 1);
1916  tkmes.Chi2ProbVsEta->setAxisTitle("Track #chi^{2} probability", 2);
1917  }
1918 
1919  // now put the MEs in the map
1920  TkParameterMEMap.insert(std::make_pair(sname, tkmes));
1921 }
1922 
1923 // fill histograms at differnt measurement points
1924 // ---------------------------------------------------------------------------------//
1926  //get the kinematic parameters
1927  double p, px, py, pz, pt, theta, phi, eta, q;
1928  double pxerror, pyerror, pzerror, pterror, perror, phierror, etaerror;
1929 
1930  std::string Folder = TopFolder_.substr(0, 2);
1931 
1932  auto phiIn = track.innerPosition().phi();
1933  auto etaIn = track.innerPosition().eta();
1934  auto phiOut = track.outerPosition().phi();
1935  auto etaOut = track.outerPosition().eta();
1936 
1937  if (sname == "default") {
1938  p = track.p();
1939  px = track.px();
1940  py = track.py();
1941  pz = track.pz();
1942  pt = track.pt();
1943  phi = track.phi();
1944  theta = track.theta();
1945  eta = track.eta();
1946  q = track.charge();
1947 
1948  pterror = (pt) ? track.ptError() / (pt * pt) : 0.0;
1949  pxerror = -1.0;
1950  pyerror = -1.0;
1951  pzerror = -1.0;
1952  perror = -1.0;
1953  phierror = track.phiError();
1954  etaerror = track.etaError();
1955 
1956  } else {
1958  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", theB);
1959  reco::TransientTrack TransTrack = theB->build(track);
1960 
1962 
1963  if (sname == "OuterSurface")
1964  TSOS = TransTrack.outermostMeasurementState();
1965  else if (sname == "InnerSurface")
1966  TSOS = TransTrack.innermostMeasurementState();
1967  else if (sname == "ImpactPoint")
1968  TSOS = TransTrack.impactPointState();
1969 
1970  p = TSOS.globalMomentum().mag();
1971  px = TSOS.globalMomentum().x();
1972  py = TSOS.globalMomentum().y();
1973  pz = TSOS.globalMomentum().z();
1974  pt = TSOS.globalMomentum().perp();
1975  phi = TSOS.globalMomentum().phi();
1976  theta = TSOS.globalMomentum().theta();
1977  eta = TSOS.globalMomentum().eta();
1978  q = TSOS.charge();
1979 
1980  //get the error of the kinimatic parameters
1982  double partialPterror =
1983  errors(3, 3) * pow(TSOS.globalMomentum().x(), 2) + errors(4, 4) * pow(TSOS.globalMomentum().y(), 2);
1984  pterror = sqrt(partialPterror) / TSOS.globalMomentum().perp();
1985  pxerror = sqrt(errors(3, 3)) / TSOS.globalMomentum().x();
1986  pyerror = sqrt(errors(4, 4)) / TSOS.globalMomentum().y();
1987  pzerror = sqrt(errors(5, 5)) / TSOS.globalMomentum().z();
1988  perror = sqrt(partialPterror + errors(5, 5) * pow(TSOS.globalMomentum().z(), 2)) / TSOS.globalMomentum().mag();
1989  phierror = sqrt(TSOS.curvilinearError().matrix()(2, 2));
1990  etaerror = sqrt(TSOS.curvilinearError().matrix()(1, 1)) * fabs(sin(TSOS.globalMomentum().theta()));
1991  }
1992 
1993  std::map<std::string, TkParameterMEs>::iterator iPos = TkParameterMEMap.find(sname);
1994  if (iPos != TkParameterMEMap.end()) {
1995  TkParameterMEs tkmes = iPos->second;
1996 
1997  // momentum
1998  tkmes.TrackP->Fill(p);
1999  if (doTrackPxPyPlots_) {
2000  tkmes.TrackPx->Fill(px);
2001  tkmes.TrackPy->Fill(py);
2002  }
2003  tkmes.TrackPz->Fill(pz);
2004  tkmes.TrackPt->Fill(pt);
2005 
2006  // angles
2007  tkmes.TrackPhi->Fill(phi);
2008  tkmes.TrackEta->Fill(eta);
2009  tkmes.TrackEtaPhi->Fill(eta, phi);
2010 
2011  if (Folder == "Tr") {
2012  tkmes.TrackEtaPhiInverted->Fill(eta, -1 * phi);
2013  tkmes.TrackEtaPhiInvertedoutofphase->Fill(eta, 3.141592654 + -1 * phi);
2014  tkmes.TrackEtaPhiInvertedoutofphase->Fill(eta, -1 * phi - 3.141592654);
2015  tkmes.TkEtaPhi_Ratio_byFoldingmap->getTH2F()->Divide(
2016  tkmes.TrackEtaPhi->getTH2F(), tkmes.TrackEtaPhiInverted->getTH2F(), 1., 1., "");
2017  tkmes.TkEtaPhi_Ratio_byFoldingmap_op->getTH2F()->Divide(
2018  tkmes.TrackEtaPhi->getTH2F(), tkmes.TrackEtaPhiInvertedoutofphase->getTH2F(), 1., 1., "");
2019 
2020  int nx = tkmes.TrackEtaPhi->getTH2F()->GetNbinsX();
2021  int ny = tkmes.TrackEtaPhi->getTH2F()->GetNbinsY();
2022 
2023  for (int ii = 1; ii <= nx; ii++) {
2024  for (int jj = 1; jj <= ny; jj++) {
2025  double Sum1 = tkmes.TrackEtaPhi->getTH2F()->GetBinContent(ii, jj) +
2026  tkmes.TrackEtaPhiInverted->getTH2F()->GetBinContent(ii, jj);
2027  double Sum2 = tkmes.TrackEtaPhi->getTH2F()->GetBinContent(ii, jj) +
2028  tkmes.TrackEtaPhiInvertedoutofphase->getTH2F()->GetBinContent(ii, jj);
2029 
2030  double Sub1 = tkmes.TrackEtaPhi->getTH2F()->GetBinContent(ii, jj) -
2031  tkmes.TrackEtaPhiInverted->getTH2F()->GetBinContent(ii, jj);
2032  double Sub2 = tkmes.TrackEtaPhi->getTH2F()->GetBinContent(ii, jj) -
2033  tkmes.TrackEtaPhiInvertedoutofphase->getTH2F()->GetBinContent(ii, jj);
2034 
2035  if (Sum1 == 0 || Sum2 == 0) {
2038  } else {
2039  double ratio1 = Sub1 / Sum1;
2040  double ratio2 = Sub2 / Sum2;
2043  }
2044  }
2045  }
2046 
2047  //pT histograms to create efficiency vs pT plot, only for the most inefficient region.
2048 
2049  if (eta < 0. && phi < -1.6) {
2051  }
2052  if (eta < 0. && phi < 0 && phi >= -1.6) {
2054  }
2055  if (eta < 0. && phi < 1.6 && phi >= 0) {
2056  tkmes.TrackPt_NegEta_Phi_btw_16_0->Fill(pt);
2057  }
2058  if (eta < 0. && phi >= 1.6) {
2060  }
2061  if (eta >= 0. && phi < -1.6) {
2063  }
2064  if (eta >= 0. && phi < 0 && phi >= -1.6) {
2066  }
2067  if (eta >= 0. && phi < 1.6 && phi >= 0) {
2068  tkmes.TrackPt_PosEta_Phi_btw_16_0->Fill(pt);
2069  }
2070  if (eta >= 0. && phi >= 1.6) {
2072  }
2073 
2074  float A[8];
2075  A[0] = tkmes.TrackPt_NegEta_Phi_btw_neg16_neg32->getTH1()->Integral();
2076  A[1] = tkmes.TrackPt_NegEta_Phi_btw_0_neg16->getTH1()->Integral();
2077  A[2] = tkmes.TrackPt_NegEta_Phi_btw_16_0->getTH1()->Integral();
2078  A[3] = tkmes.TrackPt_NegEta_Phi_btw_32_16->getTH1()->Integral();
2079  A[4] = tkmes.TrackPt_PosEta_Phi_btw_neg16_neg32->getTH1()->Integral();
2080  A[5] = tkmes.TrackPt_PosEta_Phi_btw_0_neg16->getTH1()->Integral();
2081  A[6] = tkmes.TrackPt_PosEta_Phi_btw_16_0->getTH1()->Integral();
2082  A[7] = tkmes.TrackPt_PosEta_Phi_btw_32_16->getTH1()->Integral();
2083 
2084  //WZ (the worst zone)
2085  int WZ = 0;
2086  float minA = A[0];
2087  for (int w = 1; w < 8; w++) {
2088  if (minA > A[w]) {
2089  minA = A[w];
2090  WZ = w;
2091  }
2092  }
2093 
2094  switch (WZ) {
2095  case 1:
2098  1.,
2099  1.,
2100  "B");
2103  1.,
2104  1.,
2105  "B");
2106  break;
2107  case 2:
2108  tkmes.Ratio_byFolding->getTH1()->Divide(
2112  1.,
2113  1.,
2114  "B");
2115  break;
2116  case 3:
2117  tkmes.Ratio_byFolding->getTH1()->Divide(
2119  tkmes.Ratio_byFolding2->getTH1()->Divide(
2120  tkmes.TrackPt_NegEta_Phi_btw_16_0->getTH1(), tkmes.TrackPt_NegEta_Phi_btw_32_16->getTH1(), 1., 1., "B");
2121  break;
2122  case 4:
2123  tkmes.Ratio_byFolding->getTH1()->Divide(tkmes.TrackPt_NegEta_Phi_btw_32_16->getTH1(),
2125  1.,
2126  1.,
2127  "B");
2128  tkmes.Ratio_byFolding2->getTH1()->Divide(
2129  tkmes.TrackPt_NegEta_Phi_btw_32_16->getTH1(), tkmes.TrackPt_NegEta_Phi_btw_16_0->getTH1(), 1., 1., "B");
2130  break;
2131  case 5:
2134  1.,
2135  1.,
2136  "B");
2139  1.,
2140  1.,
2141  "B");
2142  break;
2143  case 6:
2144  tkmes.Ratio_byFolding->getTH1()->Divide(
2148  1.,
2149  1.,
2150  "B");
2151  break;
2152  case 7:
2153  tkmes.Ratio_byFolding->getTH1()->Divide(
2155  tkmes.Ratio_byFolding2->getTH1()->Divide(
2156  tkmes.TrackPt_PosEta_Phi_btw_16_0->getTH1(), tkmes.TrackPt_PosEta_Phi_btw_32_16->getTH1(), 1., 1., "B");
2157  break;
2158  case 8:
2159  tkmes.Ratio_byFolding->getTH1()->Divide(tkmes.TrackPt_PosEta_Phi_btw_32_16->getTH1(),
2161  1.,
2162  1.,
2163  "B");
2164  tkmes.Ratio_byFolding2->getTH1()->Divide(
2165  tkmes.TrackPt_PosEta_Phi_btw_32_16->getTH1(), tkmes.TrackPt_PosEta_Phi_btw_16_0->getTH1(), 1., 1., "B");
2166  break;
2167  }
2168  tkmes.Ratio_byFolding->setAxisTitle("Efficiency(Ratio)_" + std::to_string(WZ), 2);
2169  tkmes.Ratio_byFolding2->setAxisTitle("Efficiency(Ratio)_" + std::to_string(WZ), 2);
2170 
2171  if (track.quality(reco::TrackBase::highPurity)) {
2172  tkmes.TrackPtHighPurity->Fill(pt);
2174  }
2175  if (track.quality(reco::TrackBase::tight)) {
2176  tkmes.TrackPtTight->Fill(pt);
2177  tkmes.Quality->Fill(reco::TrackBase::tight, 1.);
2178  }
2179  if (track.quality(reco::TrackBase::loose)) {
2180  tkmes.TrackPtLoose->Fill(pt);
2181  tkmes.Quality->Fill(reco::TrackBase::loose, 1.);
2182  }
2183  if (track.quality(reco::TrackBase::highPurity)) {
2184  tkmes.TrackEtaHighPurity->Fill(eta);
2185  }
2186  if (track.quality(reco::TrackBase::tight)) {
2187  tkmes.TrackEtaTight->Fill(eta);
2188  }
2189  if (track.quality(reco::TrackBase::loose)) {
2190  tkmes.TrackEtaLoose->Fill(eta);
2191  }
2192 
2193  if (p > 0.) {
2194  tkmes.TrackQoverP->Fill(q / p);
2195  }
2196  }
2197 
2198  tkmes.TrackEtaPhiInner->Fill(etaIn, phiIn);
2199  tkmes.TrackEtaPhiOuter->Fill(etaOut, phiOut);
2200 
2201  if (doThetaPlots_) {
2202  tkmes.TrackTheta->Fill(theta);
2203  }
2204  tkmes.TrackQ->Fill(q);
2205 
2206  // errors
2207  tkmes.TrackPtErr->Fill(pterror);
2208  tkmes.TrackPtErrVsEta->Fill(eta, pterror);
2209  if (doTrackPxPyPlots_) {
2210  tkmes.TrackPxErr->Fill(pxerror);
2211  tkmes.TrackPyErr->Fill(pyerror);
2212  }
2213  tkmes.TrackPzErr->Fill(pzerror);
2214  tkmes.TrackPErr->Fill(perror);
2215  tkmes.TrackPhiErr->Fill(phierror);
2216  tkmes.TrackEtaErr->Fill(etaerror);
2217 
2219  int nValidRecHits = track.numberOfValidHits();
2220  // rec hits
2221  tkmes.NumberOfRecHitsPerTrackVsPhi->Fill(phi, nRecHits);
2222  if (doThetaPlots_) {
2223  tkmes.NumberOfRecHitsPerTrackVsTheta->Fill(theta, nRecHits);
2224  }
2225  tkmes.NumberOfRecHitsPerTrackVsEta->Fill(eta, nRecHits);
2226  tkmes.NumberOfValidRecHitsPerTrackVsPhi->Fill(phi, nValidRecHits);
2227  tkmes.NumberOfValidRecHitsPerTrackVsEta->Fill(eta, nValidRecHits);
2228  tkmes.NumberOfValidRecHitsPerTrackVsPt->Fill(pt, nValidRecHits);
2229 
2231  // rec layers
2232  tkmes.NumberOfLayersPerTrackVsPhi->Fill(phi, nLayers);
2233  if (doThetaPlots_) {
2234  tkmes.NumberOfLayersPerTrackVsTheta->Fill(theta, nLayers);
2235  }
2236  tkmes.NumberOfLayersPerTrackVsEta->Fill(eta, nLayers);
2237 
2238  double chi2prob = TMath::Prob(track.chi2(), (int)track.ndof());
2239  double chi2oNDF = track.normalizedChi2();
2240 
2241  tkmes.Chi2oNDFVsEta->Fill(eta, chi2oNDF);
2242  tkmes.Chi2oNDFVsPt->Fill(pt, chi2oNDF);
2243  tkmes.Chi2oNDFVsNHits->Fill(nRecHits, chi2oNDF);
2244 
2245  if (doAllPlots_) {
2246  // general properties
2247  if (doThetaPlots_) {
2248  tkmes.Chi2oNDFVsTheta->Fill(theta, chi2oNDF);
2249  }
2250  tkmes.Chi2oNDFVsPhi->Fill(phi, chi2oNDF);
2251  tkmes.Chi2ProbVsPhi->Fill(phi, chi2prob);
2252  tkmes.Chi2ProbVsEta->Fill(eta, chi2prob);
2253  }
2254  }
2255 }
2256 
2258  // parameters from the configuration
2259  std::string QualName = conf_->getParameter<std::string>("Quality");
2261 
2262  // use the AlgoName and Quality Name
2263  std::string CategoryName = !QualName.empty() ? AlgoName + "_" + QualName : AlgoName;
2264 
2265  int PhiBin = conf_->getParameter<int>("PhiBin");
2266  double PhiMin = conf_->getParameter<double>("PhiMin");
2267  double PhiMax = conf_->getParameter<double>("PhiMax");
2268 
2269  int EtaBin = conf_->getParameter<int>("EtaBin");
2270  double EtaMin = conf_->getParameter<double>("EtaMin");
2271  double EtaMax = conf_->getParameter<double>("EtaMax");
2272 
2273  int PtBin = conf_->getParameter<int>("TrackPtBin");
2274  double PtMin = conf_->getParameter<double>("TrackPtMin");
2275  double PtMax = conf_->getParameter<double>("TrackPtMax");
2276 
2277  // book hit property histograms
2278  // ---------------------------------------------------------------------------------//
2279  ibooker.setCurrentFolder(TopFolder_ + "/HitProperties");
2280 
2281  std::vector<std::string> subdetectors = conf_->getParameter<std::vector<std::string> >("subdetectors");
2282  int detBin = conf_->getParameter<int>("subdetectorBin");
2283 
2284  for (auto det : subdetectors) {
2285  // hits properties
2286  ibooker.setCurrentFolder(TopFolder_ + "/HitProperties/" + det);
2287 
2288  TkRecHitsPerSubDetMEs recHitsPerSubDet_mes;
2289 
2290  recHitsPerSubDet_mes.detectorTag = det;
2291  int detID = -1;
2292  if (det == "TIB")
2293  detID = StripSubdetector::TIB; // 3
2294  if (det == "TOB")
2295  detID = StripSubdetector::TOB; // 5
2296  if (det == "TID")
2297  detID = StripSubdetector::TID; // 4
2298  if (det == "TEC")
2299  detID = StripSubdetector::TEC; // 6
2300  if (det == "PixBarrel")
2301  detID = PixelSubdetector::PixelBarrel; // 1
2302  if (det == "PixEndcap")
2303  detID = PixelSubdetector::PixelEndcap; // 2
2304  if (det == "Pixel")
2305  detID = 0;
2306  if (det == "Strip")
2307  detID = 7;
2308 
2309  recHitsPerSubDet_mes.detectorId = detID;
2310 
2311  histname = "NumberOfRecHitsPerTrack_" + det + "_" + CategoryName;
2312  recHitsPerSubDet_mes.NumberOfRecHitsPerTrack =
2313  ibooker.book1D(histname, histname, detBin, -0.5, double(detBin) - 0.5);
2314  recHitsPerSubDet_mes.NumberOfRecHitsPerTrack->setAxisTitle("Number of " + det + " valid RecHits in each Track", 1);
2315  recHitsPerSubDet_mes.NumberOfRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
2316 
2317  histname = "NumberOfRecHitsPerTrackVsPhi_" + det + "_" + CategoryName;
2318  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPhi =
2319  ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, detBin, -0.5, double(detBin) - 0.5, "");
2320  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Track #phi", 1);
2321  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Number of " + det + " valid RecHits in each Track",
2322  2);
2323 
2324  histname = "NumberOfRecHitsPerTrackVsEta_" + det + "_" + CategoryName;
2325  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsEta =
2326  ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, detBin, -0.5, double(detBin) - 0.5, "");
2327  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Track #eta", 1);
2328  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Number of " + det + " valid RecHits in each Track",
2329  2);
2330 
2331  histname = "NumberOfRecHitsPerTrackVsPt_" + det + "_" + CategoryName;
2332  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPt =
2333  ibooker.bookProfile(histname, histname, PtBin, PtMin, PtMax, detBin, -0.5, double(detBin) - 0.5, "");
2334  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
2335  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPt->setAxisTitle("Number of " + det + " valid RecHits in each Track",
2336  2);
2337 
2338  histname = "NumberOfLayersPerTrack_" + det + "_" + CategoryName;
2339  recHitsPerSubDet_mes.NumberOfLayersPerTrack =
2340  ibooker.book1D(histname, histname, detBin, -0.5, double(detBin) - 0.5);
2341  recHitsPerSubDet_mes.NumberOfLayersPerTrack->setAxisTitle("Number of " + det + " valid Layers in each Track", 1);
2342  recHitsPerSubDet_mes.NumberOfLayersPerTrack->setAxisTitle("Number of Tracks", 2);
2343 
2344  histname = "NumberOfLayersPerTrackVsPhi_" + det + "_" + CategoryName;
2345  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPhi =
2346  ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, detBin, -0.5, double(detBin) - 0.5, "");
2347  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Track #phi", 1);
2348  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Number of " + det + " valid Layers in each Track",
2349  2);
2350 
2351  histname = "NumberOfLayersPerTrackVsEta_" + det + "_" + CategoryName;
2352  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsEta =
2353  ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, detBin, -0.5, double(detBin) - 0.5, "");
2354  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsEta->setAxisTitle("Track #eta", 1);
2355  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsEta->setAxisTitle("Number of " + det + " valid Layers in each Track",
2356  2);
2357 
2358  histname = "NumberOfLayersPerTrackVsPt_" + det + "_" + CategoryName;
2359  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPt =
2360  ibooker.bookProfile(histname, histname, PtBin, PtMin, PtMax, detBin, -0.5, double(detBin) - 0.5, "");
2361  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
2362  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPt->setAxisTitle("Number of " + det + " valid Layers in each Track",
2363  2);
2364 
2365  TkRecHitsPerSubDetMEMap.insert(std::pair<std::string, TkRecHitsPerSubDetMEs>(det, recHitsPerSubDet_mes));
2366  }
2367 }
2368 
2370  double phi = track.phi();
2371  double eta = track.eta();
2372  double pt = track.pt();
2373 
2374  for (std::map<std::string, TkRecHitsPerSubDetMEs>::iterator it = TkRecHitsPerSubDetMEMap.begin();
2375  it != TkRecHitsPerSubDetMEMap.end();
2376  it++) {
2377  int nValidLayers = 0;
2378  int nValidRecHits = 0;
2379  int substr = it->second.detectorId;
2380  switch (substr) {
2381  case 0:
2382  nValidLayers = track.hitPattern().pixelBarrelLayersWithMeasurement() +
2383  track.hitPattern().pixelEndcapLayersWithMeasurement(); // case 0: pixel
2384  nValidRecHits = track.hitPattern().numberOfValidPixelBarrelHits() +
2385  track.hitPattern().numberOfValidPixelEndcapHits(); // case 0: pixel
2386  break;
2387  case StripSubdetector::TIB:
2388  nValidLayers = track.hitPattern().stripTIBLayersWithMeasurement(); // case 3: strip TIB
2389  nValidRecHits = track.hitPattern().numberOfValidStripTIBHits(); // case 3: strip TIB
2390  break;
2391  case StripSubdetector::TID:
2392  nValidLayers = track.hitPattern().stripTIDLayersWithMeasurement(); // case 4: strip TID
2393  nValidRecHits = track.hitPattern().numberOfValidStripTIDHits(); // case 4: strip TID
2394  break;
2395  case StripSubdetector::TOB:
2396  nValidLayers = track.hitPattern().stripTOBLayersWithMeasurement(); // case 5: strip TOB
2397  nValidRecHits = track.hitPattern().numberOfValidStripTOBHits(); // case 5: strip TOB
2398  break;
2399  case StripSubdetector::TEC:
2400  nValidLayers = track.hitPattern().stripTECLayersWithMeasurement(); // case 6: strip TEC
2401  nValidRecHits = track.hitPattern().numberOfValidStripTECHits(); // case 6: strip TEC
2402  break;
2404  nValidLayers = track.hitPattern().pixelBarrelLayersWithMeasurement(); // case 1: pixel PXB
2405  nValidRecHits = track.hitPattern().numberOfValidPixelBarrelHits(); // case 1: pixel PXB
2406  break;
2408  nValidLayers = track.hitPattern().pixelEndcapLayersWithMeasurement(); // case 2: pixel PXF
2409  nValidRecHits = track.hitPattern().numberOfValidPixelEndcapHits(); // case 2: pixel PXF
2410  break;
2411  case 7:
2412  nValidLayers = track.hitPattern().stripTIBLayersWithMeasurement() // case 7: strip
2416  nValidRecHits = track.hitPattern().numberOfValidStripTIBHits() // case 7: strip
2419  break;
2420  default:
2421  break;
2422  }
2423 
2424  //Fill Layers and RecHits
2425  it->second.NumberOfRecHitsPerTrack->Fill(nValidRecHits);
2426  it->second.NumberOfRecHitsPerTrackVsPhi->Fill(phi, nValidRecHits);
2427  it->second.NumberOfRecHitsPerTrackVsEta->Fill(eta, nValidRecHits);
2428  it->second.NumberOfRecHitsPerTrackVsPt->Fill(pt, nValidRecHits);
2429 
2430  it->second.NumberOfLayersPerTrack->Fill(nValidLayers);
2431  it->second.NumberOfLayersPerTrackVsPhi->Fill(phi, nValidLayers);
2432  it->second.NumberOfLayersPerTrackVsEta->Fill(eta, nValidLayers);
2433  it->second.NumberOfLayersPerTrackVsPt->Fill(pt, nValidLayers);
2434  }
2435 }
2436 //
2437 // -- Set Lumi Flag
2438 //
2440  TkParameterMEs tkmes;
2441  if (Chi2oNDF_lumiFlag)
2445 }
2446 //
2447 // -- Apply Reset
2448 //
2450  TkParameterMEs tkmes;
2451  if (Chi2oNDF_lumiFlag)
2455 }
#define LogDebug(id)
MonitorElement * NumberOfRecHitsPerTrackVsPhi
MonitorElement * stoppingSourceVSphi
MonitorElement * TrackEtaPhiInvertedoutofphase
MonitorElement * NumberOfValidRecHitsPerTrackVsPhi
MonitorElement * Chi2ProbVsPhi
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
MonitorElement * NumberOfLayersPerTrackVsPhi
int stripTOBLayersWithMeasurement() const
Definition: HitPattern.cc:597
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
Definition: DQMStore.cc:239
T getParameter(std::string const &) const
static constexpr auto TEC
MonitorElement * DistanceOfClosestApproachToPVVsPhi
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:632
MonitorElement * NumberOfRecHitVsPhiVsEtaPerTrack
bool doTrackerSpecific_
Definition: TrackAnalyzer.h:87
MonitorElement * ValidFractionVsPhiVsEtaPerTrack
double d0Error() const
error on d0
Definition: TrackBase.h:719
MonitorElement * dNhitdPt_HighPurity
std::unordered_map< Key, MonitorElement *, KeyHasher > hits_total_
constexpr int nLayers
Definition: Common.h:13
void fillHistosForTrackerSpecific(const reco::Track &track)
virtual TH2F * getTH2F() const
const_iterator end(bool update=false) const
MonitorElement * NumberOfRecHitsPerTrackVsEta
MonitorElement * DistanceOfClosestApproachError
void bookHistosForLScertification(DQMStore::IBooker &ibooker)
MonitorElement * DistanceOfClosestApproachToBSdz
MonitorElement * stoppingSourceVSeta
T perp() const
Definition: PV3DBase.h:69
void fillHistosForEfficiencyFromHitPatter(const reco::Track &track, const std::string suffix, const float monitoring, bool useInac)
double validFraction() const
fraction of valid hits on the track
Definition: TrackBase.h:748
MonitorElement * DeltaZToPVZoom
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:590
const double w
Definition: UKUtility.cc:23
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
MonitorElement * NumberOfValidRecHitsPerTrack
MonitorElement * DistanceOfClosestApproachErrorVsPhi
int stripTIBLayersWithMeasurement() const
Definition: HitPattern.cc:577
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:572
MonitorElement * Ratio_byFolding
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
double zError() const
error on z
Definition: Vertex.h:127
MonitorElement * Chi2oNDF_lumiFlag
double theta() const
polar angle
Definition: TrackBase.h:581
double dxyError() const
error on dxy
Definition: TrackBase.h:716
ret
prodAgent to be discontinued
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:418
MonitorElement * xPointOfClosestApproachToPV
const CurvilinearTrajectoryError & curvilinearError() const
MonitorElement * TkEtaPhi_RelativeDifference_byFoldingmap
MonitorElement * sip3dToPV
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:57
MonitorElement * NumberOfLostRecHitsPerTrack
#define nullptr
uint8_t stopReason() const
Definition: TrackBase.h:428
DxyErrBin
it might need to be adjust if CMS asks to have lumi levelling at lower values
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
const CartesianTrajectoryError cartesianError() const
MonitorElement * NumberOfLayersVsPhiVsEtaPerTrack[5]
Geom::Theta< T > theta() const
reco::TransientTrack build(const reco::Track *p) const
void setLumiFlag()
this ME is meant to be stored for each luminosity section
bool doGeneralPropertiesPlots_
Definition: TrackAnalyzer.h:92
T y() const
Definition: PV3DBase.h:60
double etaError() const
error on eta
Definition: TrackBase.h:710
MonitorElement * Chi2oNDFVsPhi
int bunchCrossing() const
Definition: EventBase.h:64
MonitorElement * Chi2ProbVsPhi
MonitorElement * NumberOfMORecHitsPerTrackVsPt
MonitorElement * DistanceOfClosestApproachErrorVsPt
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:81
MonitorElement * DistanceOfClosestApproachVsPhi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:614
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:743
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
bool doEffFromHitPatternVsBX_
MonitorElement * sipDzToBS
std::map< std::string, TkParameterMEs > TkParameterMEMap
MonitorElement * NumberOfLayersPerTrack[4]
MonitorElement * NhitVsPhi_HighPurity
MonitorElement * NumberOfRecHitsPerTrackVsTheta
data_type const * const_iterator
Definition: DetSetNew.h:31
MonitorElement * algorithm
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:605
static const std::string StopReasonName[]
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:492
bool doHitPropertiesPlots_
Definition: TrackAnalyzer.h:94
MonitorElement * DistanceOfClosestApproach
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
bool doRecHitVsPhiVsEtaPerTrack_
Definition: TrackAnalyzer.h:95
MonitorElement * NumberOfLayersPerTrackVsTheta
MonitorElement * TkEtaPhi_Ratio_byFoldingmap
bool doRecHitVsPtVsEtaPerTrack_
Definition: TrackAnalyzer.h:96
MonitorElement * NumberOfRecHitsPerTrack_lumiFlag
std::map< std::string, TkRecHitsPerSubDetMEs > TkRecHitsPerSubDetMEMap
int trackerLayersWithMeasurement() const
Definition: HitPattern.cc:513
const Point & position() const
position
Definition: Vertex.h:113
MonitorElement * NumberOfValidRecHitVsPhiVsEtaPerTrack
int pixelEndcapLayersWithMeasurement() const
Definition: HitPattern.cc:566
MonitorElement * TrackPt_NegEta_Phi_btw_32_16
int numberOfValidStripTOBHits() const
Definition: HitPattern.h:825
bool doMeasurementStatePlots_
Definition: TrackAnalyzer.h:93
missing
Definition: combine.py:5
MonitorElement * DeltaZToPV
TrajectoryStateOnSurface innermostMeasurementState() const
MonitorElement * NumberOfRecHitsPerTrack
static double XSEC_PIXEL_CLUSTER
Definition: GetLumi.h:36
MonitorElement * Ptdist_HighPurity
unsigned int numberOfLayers(int subdet) const
void setLumi(const edm::Event &, const edm::EventSetup &iSetup)
MonitorElement * DistanceOfClosestApproachToBSVsEta
MonitorElement * TrackPtHighPurity
int numberOfLostTrackerHits(HitCategory category) const
Definition: HitPattern.h:863
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
TrackAlgorithm algo() const
Definition: TrackBase.h:526
void Fill(long long x)
MonitorElement * TESTDistanceOfClosestApproachToBSVsPhi
virtual void Reset()
reset ME (ie. contents, errors, etc)
static const unsigned int lastBunchCrossing
Definition: GetLumi.h:43
MonitorElement * NumberOfValidRecHitsPerTrackVsEta
MonitorElement * Chi2oNDFVsEta
MonitorElement * TransDCASig
int iEvent
Definition: GenABIO.cc:224
def cat(path)
Definition: eostools.py:401
MonitorElement * NumberOfMIRecHitVsPhiVsEtaPerTrack
MonitorElement * NumberOfRecHitsPerTrackVsPhi
MonitorElement * xPointOfClosestApproachVsZ0wrt000
T mag() const
Definition: PV3DBase.h:64
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:617
int numberOfValidStripLayersWithMonoAndStereo(uint16_t stripdet, uint16_t layer) const
Definition: HitPattern.cc:348
std::string qualityString_
MonitorElement * TrackPt_NegEta_Phi_btw_16_0
int numberOfValidPixelBarrelHits() const
Definition: HitPattern.h:805
MonitorElement * oriAlgo
bool doDCAwrt000Plots_
bool doEffFromHitPatternVsPU_
static const std::string qualityNames[]
Definition: TrackBase.h:163
MonitorElement * NumberOfRecHitsPerTrackVsTheta
MonitorElement * NumberOfLostRecHitVsPhiVsEtaPerTrack
MonitorElement * NumberOfMIRecHitsPerTrackVsPt
virtual int getNbinsX() const
get # of bins in X-axis
void initHisto(DQMStore::IBooker &ibooker, const edm::EventSetup &, const edm::ParameterSet &)
MonitorElement * xPointOfClosestApproach
MonitorElement * Chi2oNDFVsTheta
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:566
MonitorElement * NumberOfMIRecHitsPerTrack
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:569
int stripTIDLayersWithMeasurement() const
Definition: HitPattern.cc:587
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
MonitorElement * NumberOfValidRecHitsPerTrackVsEta
T sqrt(T t)
Definition: SSEVec.h:19
MonitorElement * TrackPt_PosEta_Phi_btw_16_0
MonitorElement * NumberOfRecHitsPerTrackVsPhi
MonitorElement * TrackEtaHighPurity
MonitorElement * NumberOfRecHitsPerTrackVsPt
double pt() const
track transverse momentum
Definition: TrackBase.h:602
T z() const
Definition: PV3DBase.h:61
MonitorElement * dNdPt_HighPurity
void setBX(const edm::Event &)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
Definition: DQMStore.cc:333
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:696
std::string TopFolder_
Definition: TrackAnalyzer.h:75
MonitorElement * xPointOfClosestApproachVsZ0wrtBS
double phiError() const
error on phi
Definition: TrackBase.h:713
MonitorElement * NumberOfValidRecHitsPerTrackVsPhi
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
int numberOfAllHits(HitCategory category) const
Definition: HitPattern.h:774
MonitorElement * dNdPhi_HighPurity
def pv(vc)
Definition: MetAnalyzer.py:7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int numberOfValidStripTIDHits() const
Definition: HitPattern.h:821
MonitorElement * yPointOfClosestApproachToPV
MonitorElement * NumberOfRecHitsPerTrackVsEta
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:740
int numberOfValidStripTECHits() const
Definition: HitPattern.h:829
static double CM2_TO_NANOBARN
Definition: GetLumi.h:42
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")
Definition: DQMStore.cc:381
MonitorElement * NumberOfLostRecHitsPerTrackVsPt
MonitorElement * sip2dToPV
T min(T a, T b)
Definition: MathUtil.h:58
MonitorElement * Chi2oNDFVsTheta
static constexpr auto TOB
TrajectoryStateOnSurface outermostMeasurementState() const
MonitorElement * DistanceOfClosestApproachErrorVsDxy
MonitorElement * sipDzToPV
MonitorElement * sipDxyToBS
bool isValid() const
Definition: HandleBase.h:70
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * NumberOfValidRecHitsPerTrackVsPt
int trackerLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.h:993
void bookHistosForHitProperties(DQMStore::IBooker &ibooker)
MonitorElement * DistanceOfClosestApproachVsEta
MonitorElement * zPointOfClosestApproachVsPhi
ii
Definition: cuy.py:590
const AlgebraicSymMatrix66 & matrix() const
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:611
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:596
MonitorElement * NumberOfLayersPerTrackVsEta
edm::ParameterSet const * conf_
Definition: TrackAnalyzer.h:83
double dzError() const
error on dz
Definition: TrackBase.h:725
MonitorElement * dNdEta_HighPurity
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
MonitorElement * TrackEtaPhiInverted
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:626
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
void bookHistosForTrackerSpecific(DQMStore::IBooker &ibooker)
MonitorElement * stoppingSource
void fillHistosForState(const edm::EventSetup &iSetup, const reco::Track &track, std::string sname)
Definition: DetId.h:17
TrackAlgorithm originalAlgo() const
Definition: TrackBase.h:527
TrajectoryStateOnSurface TSOS
Definition: TestHits.cc:19
MonitorElement * TrackPt_PosEta_Phi_btw_32_16
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
double xError() const
error on x
Definition: Vertex.h:123
static constexpr auto TIB
MonitorElement * NumberOfLayersPerTrackVsEta
MonitorElement * DistanceOfClosestApproachErrorVsEta
#define N
Definition: blowfish.cc:9
MonitorElement * TkEtaPhi_RelativeDifference_byFoldingmap_op
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: TrackAnalyzer.h:77
MonitorElement * sipDxyToPV
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::Track &track)
bool doEffFromHitPatternVsLUMI_
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:483
MonitorElement * xPointOfClosestApproachVsZ0wrtPV
std::unordered_map< Key, MonitorElement *, KeyHasher > hits_valid_
MonitorElement * yPointOfClosestApproachVsZ0wrtBS
MonitorElement * NumberOfMIRecHitVsPtVsEtaPerTrack
std::array< T, N+1 > makeLogBins(const T &min, const T &max)
int minNumberOfPixelsPerCluster_
int pixelBarrelLayersWithMeasurement() const
Definition: HitPattern.cc:555
MonitorElement * DistanceOfClosestApproachVsTheta
MonitorElement * TrackPt_NegEta_Phi_btw_neg16_neg32
void bookHistosForBeamSpot(DQMStore::IBooker &ibooker)
static double rXSEC_PIXEL_CLUSTER
Definition: GetLumi.h:40
MonitorElement * Chi2ProbVsEta
int numberOfValidStripTIBHits() const
Definition: HitPattern.h:817
MonitorElement * NumberOfMORecHitVsPtVsEtaPerTrack
static const std::string algoNames[]
Definition: TrackBase.h:147
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:531
unsigned int layer(const DetId &id) const
int numberOfValidPixelEndcapHits() const
Definition: HitPattern.h:809
MonitorElement * zPointOfClosestApproachToPV
T eta() const
Definition: PV3DBase.h:73
MonitorElement * Ratio_byFolding2
int trackerLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:532
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClustersToken_
Definition: TrackAnalyzer.h:79
MonitorElement * DistanceOfClosestApproachToPV
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:623
MonitorElement * NumberOfValidRecHitsPerTrackVsPt
const AlgebraicSymMatrix55 & matrix() const
bool doTrackPxPyPlots_
GlobalVector globalMomentum() const
void bookHistosForEfficiencyFromHitPatter(DQMStore::IBooker &ibooker, const edm::EventSetup &iSetup, const std::string suffix, bool useInac)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Definition: DQMStore.cc:266
MonitorElement * DistanceOfClosestApproachToBSVsPhi
bool doLayersVsPhiVsEtaPerTrack_
Definition: TrackAnalyzer.h:98
TransDCABins
FOR HI PLOTS#####################.
unsigned int bx_
MonitorElement * ValidFractionPerTrack
T get() const
Definition: EventSetup.h:73
MonitorElement * NhitVsEta_HighPurity
int stripTECLayersWithMeasurement() const
Definition: HitPattern.cc:607
MonitorElement * yPointOfClosestApproachVsZ0wrt000
unsigned int good_vertices_
MonitorElement * TrackPtErrVsEta
MonitorElement * TrackPt_NegEta_Phi_btw_0_neg16
MonitorElement * TESTDistanceOfClosestApproachToBS
std::vector< LumiScalers > LumiScalersCollection
Definition: LumiScalers.h:144
MonitorElement * NumberOfRecHitsPerTrackVsEta
int charge() const
track electric charge
Definition: TrackBase.h:575
const Point & position() const
position
Definition: BeamSpot.h:59
TrajectoryStateOnSurface impactPointState() const
Definition: errors.py:1
void bookHistosForState(std::string sname, DQMStore::IBooker &ibooker)
MonitorElement * yPointOfClosestApproach
float minPixelClusterCharge_
MonitorElement * Chi2oNDFVsNHits
MonitorElement * Chi2Prob
edm::EDGetTokenT< LumiScalersCollection > lumiscalersToken_
Definition: TrackAnalyzer.h:80
MonitorElement * TrackEtaPhiOuter
Definition: Chi2.h:15
size_type size() const
Definition: DetSetNew.h:68
MonitorElement * yPointOfClosestApproachVsZ0wrtPV
void setNumberOfGoodVertices(const edm::Event &)
std::string stateName_
Definition: TrackAnalyzer.h:85
MonitorElement * AbsDistanceOfClosestApproachToBS
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:587
MonitorElement * zPointOfClosestApproach
MonitorElement * TrackPt_PosEta_Phi_btw_0_neg16
TrackAnalyzer(const edm::ParameterSet &)
T x() const
Definition: PV3DBase.h:59
float lumi_factor_per_bx_
Definition: TrackAnalyzer.h:81
MonitorElement * Chi2ProbVsEta
static constexpr auto TID
MonitorElement * NumberOfLostRecHitVsPtVsEtaPerTrack
T const * product() const
Definition: ESHandle.h:86
static double FREQ_ORBIT
Definition: GetLumi.h:26
MonitorElement * TrackEtaPhiInner
MonitorElement * TkEtaPhi_Ratio_byFoldingmap_op
virtual TH1 * getTH1() const
MonitorElement * TrackEtaLoose
MonitorElement * DistanceOfClosestApproachToBS
std::string monName[monQuantity::END]
MonitorElement * Chi2oNDF
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
double yError() const
error on y
Definition: Vertex.h:125
const_iterator begin(bool update=false) const
std::string histname
#define constexpr
MonitorElement * Chi2oNDFVsEta
MonitorElement * TrackPt_PosEta_Phi_btw_neg16_neg32
const int NBINS
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:608
MonitorElement * NumberOfValidRecHitVsPtVsEtaPerTrack
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:620
MonitorElement * NumberOfMORecHitVsPhiVsEtaPerTrack
static double SECONDS_PER_LS
Definition: GetLumi.h:27
monitoring
[optional] : when omitted the verbosity level is set to STANDARD
MonitorElement * NumberOfMORecHitsPerTrack
MonitorElement * TrackEtaTight
MonitorElement * NumberOfLayersPerTrackVsPhi
MonitorElement * DistanceOfClosestApproachToPVZoom
MonitorElement * LongDCASig
edm::EDGetTokenT< reco::VertexCollection > pvToken_
Definition: TrackAnalyzer.h:78
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * Chi2oNDFVsPhi