CMS 3D CMS Logo

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