test
CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackAnalyzer.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author Suchandra Dutta , Giorgia Mila
5  */
6 
15 
20 #include <string>
21 #include "TMath.h"
23 
25  : conf_( iConfig )
26  , doTrackerSpecific_ ( conf_.getParameter<bool>("doTrackerSpecific") )
27  , doAllPlots_ ( conf_.getParameter<bool>("doAllPlots") )
28  , doBSPlots_ ( conf_.getParameter<bool>("doBeamSpotPlots") )
29  , doPVPlots_ ( conf_.getParameter<bool>("doPrimaryVertexPlots") )
30  , doDCAPlots_ ( conf_.getParameter<bool>("doDCAPlots") )
31  , doGeneralPropertiesPlots_ ( conf_.getParameter<bool>("doGeneralPropertiesPlots") )
32  , doMeasurementStatePlots_ ( conf_.getParameter<bool>("doMeasurementStatePlots") )
33  , doHitPropertiesPlots_ ( conf_.getParameter<bool>("doHitPropertiesPlots") )
34  , doRecHitVsPhiVsEtaPerTrack_ ( conf_.getParameter<bool>("doRecHitVsPhiVsEtaPerTrack") )
35  , doRecHitVsPtVsEtaPerTrack_ ( conf_.getParameter<bool>("doRecHitVsPtVsEtaPerTrack") )
36  , doLayersVsPhiVsEtaPerTrack_ ( conf_.getParameter<bool>("doLayersVsPhiVsEtaPerTrack") )
37  , doRecHitsPerTrackProfile_ ( conf_.getParameter<bool>("doRecHitsPerTrackProfile") )
38  , doThetaPlots_ ( conf_.getParameter<bool>("doThetaPlots") )
39  , doTrackPxPyPlots_ ( conf_.getParameter<bool>("doTrackPxPyPlots") )
40  , doDCAwrtPVPlots_ ( conf_.getParameter<bool>("doDCAwrtPVPlots") )
41  , doDCAwrt000Plots_ ( conf_.getParameter<bool>("doDCAwrt000Plots") )
42  , doLumiAnalysis_ ( conf_.getParameter<bool>("doLumiAnalysis") )
43  , doTestPlots_ ( conf_.getParameter<bool>("doTestPlots") )
44  , doHIPlots_ ( conf_.getParameter<bool>("doHIPlots") )
45  , doSIPPlots_ ( conf_.getParameter<bool>("doSIPPlots") )
46  , doEffFromHitPatternVsPU_ ( conf_.getParameter<bool>("doEffFromHitPatternVsPU") )
47  , doEffFromHitPatternVsBX_ ( conf_.getParameter<bool>("doEffFromHitPatternVsBX") )
48  , doEffFromHitPatternVsLUMI_ ( conf_.getParameter<bool>("doEffFromHitPatternVsLUMI") )
49  , pvNDOF_ ( conf_.getParameter<int> ("pvNDOF") )
50  , useBPixLayer1_ ( conf_.getParameter<bool>("useBPixLayer1") )
51  , minNumberOfPixelsPerCluster_ ( conf_.getParameter<int>("minNumberOfPixelsPerCluster") )
52  , minPixelClusterCharge_ ( conf_.getParameter<double>("minPixelClusterCharge") )
53  , qualityString_ ( conf_.getParameter<std::string>("qualityString"))
54  , good_vertices_(0)
55  , bx_(0)
56  , pixel_lumi_(0.)
57  , scal_lumi_(0.)
58 {
59  initHistos();
60  TopFolder_ = conf_.getParameter<std::string>("FolderName");
61 }
62 
64  : TrackAnalyzer(iConfig)
65 {
66  edm::InputTag bsSrc = conf_.getParameter<edm::InputTag>("beamSpot");
67  edm::InputTag primaryVertexInputTag = conf_.getParameter<edm::InputTag>("primaryVertex");
68  edm::InputTag pixelClusterInputTag = conf_.getParameter<edm::InputTag>("pixelCluster4lumi");
69  edm::InputTag scalInputTag = conf_.getParameter<edm::InputTag>("scal");
71  pvToken_ = iC.consumes<reco::VertexCollection>(primaryVertexInputTag);
74 
75  if(useBPixLayer1_)
77  else
79 
80 
81 }
82 
84 {
85  Chi2 = nullptr;
86  Chi2Prob = nullptr;
87  Chi2ProbVsPhi = nullptr;
88  Chi2ProbVsEta = nullptr;
89  Chi2oNDF = nullptr;
90  Chi2oNDFVsEta = nullptr;
91  Chi2oNDFVsPhi = nullptr;
92  Chi2oNDFVsTheta = nullptr;
93 
94  NumberOfRecHitsPerTrack = nullptr;
97 
101 
103 
106 
107  DistanceOfClosestApproach = nullptr;
114  xPointOfClosestApproach = nullptr;
117  yPointOfClosestApproach = nullptr;
120  zPointOfClosestApproach = nullptr;
122  algorithm = nullptr;
123  oriAlgo = nullptr;
124  stoppingSource = nullptr;
125  stoppingSourceVSeta = nullptr;
126  stoppingSourceVSphi = nullptr;
127  // TESTING
130 
131 // by Mia in order to deal w/ LS transitions
132  Chi2oNDF_lumiFlag = nullptr;
134 
136  //special Plots for HI DQM //SHOULD I ADD THE BOOL HERE??
138  LongDCASig = nullptr;
139  TransDCASig = nullptr;
140  dNdPhi_HighPurity = nullptr;
141  dNdEta_HighPurity = nullptr;
142  dNdPt_HighPurity = nullptr;
143  NhitVsEta_HighPurity = nullptr;
144  NhitVsPhi_HighPurity = nullptr;
145 
146  // IP significance
147  sipDxyToBS = nullptr;
148  sipDzToBS = nullptr;
149  sip3dToPV = nullptr;
150  sip2dToPV = nullptr;
151  sipDxyToPV = nullptr;
152  sipDzToPV = nullptr;
153 
154 }
155 
157 {
158 }
159 
161 {
162 
164  bookHistosForBeamSpot(ibooker);
168  if (doEffFromHitPatternVsLUMI_ || doAllPlots_) bookHistosForEfficiencyFromHitPatter(ibooker, iSetup, "VsSCALLUMI");
169  // if (doEffFromHitPatternVsLUMI_ || doAllPlots_) bookHistosForEfficiencyFromHitPatter(ibooker, iSetup, "VsPIXELLUMI");
170 
171  // book tracker specific related histograms
172  // ---------------------------------------------------------------------------------//
174 
175  // book state related histograms
176  // ---------------------------------------------------------------------------------//
178 
179  std::string StateName = conf_.getParameter<std::string>("MeasurementState");
180 
181  if (StateName == "All") {
182  bookHistosForState("OuterSurface", ibooker);
183  bookHistosForState("InnerSurface", ibooker);
184  bookHistosForState("ImpactPoint" , ibooker);
185  } else if (
186  StateName != "OuterSurface" &&
187  StateName != "InnerSurface" &&
188  StateName != "ImpactPoint" &&
189  StateName != "default"
190  ) {
191  bookHistosForState("default", ibooker);
192 
193  } else {
194  bookHistosForState(StateName, ibooker);
195  }
196 
197  }
198 }
199 
201  const edm::EventSetup & iSetup,
202  const std::string suffix)
203 {
204 
205  ibooker.setCurrentFolder(TopFolder_ + "/HitEffFromHitPattern" + suffix);
206 
207  int LUMIBin = conf_.getParameter<int>("LUMIBin");
208  float LUMIMin = conf_.getParameter<double>("LUMIMin");
209  float LUMIMax = conf_.getParameter<double>("LUMIMax");
210 
211 
212  int NBINS[] = { 50, int(GetLumi::lastBunchCrossing), 300 , LUMIBin};
213  float MIN[] = { 0.5, 0.5, 0., LUMIMin };
214  float MAX[] = { 50.5, float(GetLumi::lastBunchCrossing)+0.5, 3., LUMIMax };
215  std::string NAME[] = { "", "VsBX", "VsLUMI", "VsLUMI" };
216 
217  int mon = -1;
218  int nbins = -1;
219  float min = -1.;
220  float max = -1.;
221  std::string name = "";
222  for (int i=0; i<monQuantity::END; i++) {
223  if (monName[i] == suffix) {
224  mon = i;
225  nbins = NBINS[i];
226  min = MIN[i];
227  max = MAX[i];
228  name = NAME[i];
229  }
230  }
231 
232  edm::ESHandle<TrackerGeometry> trackerGeometry;
233  iSetup.get<TrackerDigiGeometryRecord>().get(trackerGeometry);
234 
235  // Values are not ordered randomly, but the order is taken from
236  // http://cmslxr.fnal.gov/dxr/CMSSW/source/Geometry/CommonDetUnit/interface/GeomDetEnumerators.h#15
237  const char * dets[] = { "None", "PXB", "PXF", "TIB", "TID", "TOB", "TEC"};
238 
239  // Also in this case, ordering is not random but extracted from
240  // http://cmslxr.fnal.gov/dxr/CMSSW/source/DataFormats/TrackReco/interface/HitPattern.h
241  // The category "total" is an addition to ease the computation of
242  // the efficiencies and is not part of the original HitPattern.
243  const char * hit_category[] = { "valid", "missing", "inactive", "bad", "total"};
244 
245  // We set sub_det to be a 1-based index since to it is the sub-sub-structure in the HitPattern
246  char title[50];
247  for (unsigned int det = 1; det < sizeof(dets)/sizeof(char*); ++det ) {
248  for (unsigned int sub_det = 1;
249  sub_det <= trackerGeometry->numberOfLayers(det); ++sub_det) {
250  for (unsigned int cat = 0;
251  cat < sizeof(hit_category)/sizeof(char *); ++cat) {
252  memset(title, 0, sizeof(title));
253  snprintf(title, sizeof(title), "Hits%s_%s_%s_Subdet%d", name.c_str(), hit_category[cat], dets[det], sub_det);
254  switch(cat) {
255  case 0:
256  hits_valid_.insert(std::make_pair(
257  Key(det, sub_det, mon),
258  ibooker.book1D(title, title, nbins, min, max)));
259  break;
260  case 1:
261  hits_missing_.insert(std::make_pair(
262  Key(det, sub_det, mon),
263  ibooker.book1D(title, title, nbins, min, max)));
264  break;
265  case 2:
266  hits_inactive_.insert(std::make_pair(
267  Key(det, sub_det, mon),
268  ibooker.book1D(title, title, nbins, min, max)));
269  break;
270  case 3:
271  hits_bad_.insert(std::make_pair(
272  Key(det, sub_det, mon),
273  ibooker.book1D(title, title, nbins, min, max)));
274  break;
275  case 4:
276  hits_total_.insert(std::make_pair(
277  Key(det, sub_det, mon),
278  ibooker.book1D(title, title, nbins, min, max)));
279  break;
280  default:
281  LogDebug("TrackAnalyzer") << "Invalid hit category used " << cat << " ignored\n";
282  }
283  }
284  }
285  }
286 }
287 
290 
291  // parameters from the configuration
292  std::string QualName = conf_.getParameter<std::string>("Quality");
294  std::string MEBSFolderName = conf_.getParameter<std::string>("BSFolderName");
295 
296  // use the AlgoName and Quality Name
297  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
298 
299  // get binning from the configuration
300  int TKHitBin = conf_.getParameter<int>( "RecHitBin");
301  double TKHitMin = conf_.getParameter<double>("RecHitMin");
302  double TKHitMax = conf_.getParameter<double>("RecHitMax");
303 
304  int TKLostBin = conf_.getParameter<int>( "RecLostBin");
305  double TKLostMin = conf_.getParameter<double>("RecLostMin");
306  double TKLostMax = conf_.getParameter<double>("RecLostMax");
307 
308  int TKLayBin = conf_.getParameter<int>( "RecLayBin");
309  double TKLayMin = conf_.getParameter<double>("RecLayMin");
310  double TKLayMax = conf_.getParameter<double>("RecLayMax");
311 
312  int PhiBin = conf_.getParameter<int>( "PhiBin");
313  double PhiMin = conf_.getParameter<double>("PhiMin");
314  double PhiMax = conf_.getParameter<double>("PhiMax");
315 
316  int EtaBin = conf_.getParameter<int>( "EtaBin");
317  double EtaMin = conf_.getParameter<double>("EtaMin");
318  double EtaMax = conf_.getParameter<double>("EtaMax");
319 
320  int PtBin = conf_.getParameter<int>( "TrackPtBin");
321  double PtMin = conf_.getParameter<double>("TrackPtMin");
322  double PtMax = conf_.getParameter<double>("TrackPtMax");
323 
324  int VXBin = conf_.getParameter<int>( "VXBin");
325  double VXMin = conf_.getParameter<double>("VXMin");
326  double VXMax = conf_.getParameter<double>("VXMax");
327 
328  int VYBin = conf_.getParameter<int>( "VYBin");
329  double VYMin = conf_.getParameter<double>("VYMin");
330  double VYMax = conf_.getParameter<double>("VYMax");
331 
332  int VZBin = conf_.getParameter<int>( "VZBin");
333  double VZMin = conf_.getParameter<double>("VZMin");
334  double VZMax = conf_.getParameter<double>("VZMax");
335 
336  ibooker.setCurrentFolder(TopFolder_);
337 
338  // book the Hit Property histograms
339  // ---------------------------------------------------------------------------------//
340 
341  TkParameterMEs tkmes;
343 
344  ibooker.setCurrentFolder(TopFolder_+"/HitProperties");
345 
346  histname = "NumberOfRecHitsPerTrack_";
347  NumberOfRecHitsPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKHitBin, TKHitMin, TKHitMax);
348  NumberOfRecHitsPerTrack->setAxisTitle("Number of all RecHits of each Track");
349  NumberOfRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
350 
351  histname = "NumberOfValidRecHitsPerTrack_";
352  NumberOfValidRecHitsPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKHitBin, TKHitMin, TKHitMax);
353  NumberOfValidRecHitsPerTrack->setAxisTitle("Number of valid RecHits for each Track");
354  NumberOfValidRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
355 
356  histname = "NumberOfLostRecHitsPerTrack_";
357  NumberOfLostRecHitsPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKLostBin, TKLostMin, TKLostMax);
358  NumberOfLostRecHitsPerTrack->setAxisTitle("Number of lost RecHits for each Track");
359  NumberOfLostRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
360 
361  histname = "NumberOfMissingInnerRecHitsPerTrack_";
362  NumberOfMIRecHitsPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, 10, -0.5, 9.5);
363  NumberOfMIRecHitsPerTrack->setAxisTitle("Number of missing-inner RecHits for each Track");
364  NumberOfMIRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
365 
366  histname = "NumberOfMissingOuterRecHitsPerTrack_";
367  NumberOfMORecHitsPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, 10, -0.5, 9.5);
368  NumberOfMORecHitsPerTrack->setAxisTitle("Number of missing-outer RecHits for each Track");
369  NumberOfMORecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
370 
371  histname = "ValidFractionPerTrack_";
372  ValidFractionPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, 101, 0., 1.01);
373  ValidFractionPerTrack->setAxisTitle("ValidFraction of RecHits for each Track");
374  ValidFractionPerTrack->setAxisTitle("Number of Tracks", 2);
375 
376 
377 
379 
380  histname = "NumberOfValidRecHitVsPhiVsEtaPerTrack_";
381  NumberOfValidRecHitVsPhiVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
382  EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax, 0, 40., "");
385 
386  histname = "NumberOfLostRecHitVsPhiVsEtaPerTrack_";
387  NumberOfLostRecHitVsPhiVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
388  EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax, 0, 5., "");
391 
392 
393  histname = "NumberMIRecHitVsPhiVsEtaPerTrack_";
394  NumberOfMIRecHitVsPhiVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
395  EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax, 0, 15., "");
398 
399  histname = "NumberMORecHitVsPhiVsEtaPerTrack_";
400  NumberOfMORecHitVsPhiVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
401  EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax, 0, 15., "");
404 
405  histname = "ValidFractionVsPhiVsEtaPerTrack_";
406  ValidFractionVsPhiVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
407  EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax, 0, 2., "");
410 
411  }
412 
414 
415  histname = "NumberOfValidRecHitVsPtVsEtaPerTrack_";
416  NumberOfValidRecHitVsPtVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
417  EtaBin, EtaMin, EtaMax, PtBin, PtMin, PtMax, 0, 40., "");
419  NumberOfValidRecHitVsPtVsEtaPerTrack->setAxisTitle("Track p_{T} [GeV] ", 2);
420 
421  histname = "NumberOfLostRecHitVsPtVsEtaPerTrack_";
422  NumberOfLostRecHitVsPtVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
423  EtaBin, EtaMin, EtaMax, PtBin, PtMin, PtMax, 0, 5., "");
425  NumberOfLostRecHitVsPtVsEtaPerTrack->setAxisTitle("Track p_{T} [GeV] ", 2);
426 
427 
428  histname = "NumberMIRecHitVsPtVsEtaPerTrack_";
429  NumberOfMIRecHitVsPtVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
430  EtaBin, EtaMin, EtaMax, PtBin, PtMin, PtMax, 0, 15., "");
432  NumberOfMIRecHitVsPtVsEtaPerTrack->setAxisTitle("Track p_{T} [GeV] ", 2);
433 
434  histname = "NumberMORecHitVsPtVsEtaPerTrack_";
435  NumberOfMORecHitVsPtVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
436  EtaBin, EtaMin, EtaMax, PtBin, PtMin, PtMax, 0, 15., "");
438  NumberOfMORecHitVsPtVsEtaPerTrack->setAxisTitle("Track p_{T} [GeV] ", 2);
439 
440  }
441 
442  histname = "NumberOfValidRecHitsPerTrackVsPt_";
443  NumberOfValidRecHitsPerTrackVsPt = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PtBin, PtMin, PtMax, TKHitMin, TKHitMax,"");
444  NumberOfValidRecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]",1);
445  NumberOfValidRecHitsPerTrackVsPt->setAxisTitle("Number of valid RecHits in each Track",2);
446 
447  histname = "NumberOfLostRecHitsPerTrackVsPt_";
448  NumberOfLostRecHitsPerTrackVsPt = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PtBin, PtMin, PtMax,TKHitMin, TKHitMax,"");
449  NumberOfLostRecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
450  NumberOfLostRecHitsPerTrackVsPt->setAxisTitle("Average Number of Lost RecHits per Track", 2);
451 
452 
453  histname = "NumberMIRecHitsPerTrackVsPt_";
454  NumberOfMIRecHitsPerTrackVsPt = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PtBin, PtMin, PtMax,TKHitMin, TKHitMax,"");
455  NumberOfMIRecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
456  NumberOfMIRecHitsPerTrackVsPt->setAxisTitle("Average Number of Lost RecHits per Track", 2);
457 
458  histname = "NumberMORecHitsPerTrackVsPt_";
459  NumberOfMORecHitsPerTrackVsPt = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PtBin, PtMin, PtMax,TKHitMin, TKHitMax,"");
460  NumberOfMORecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]", 1);
461  NumberOfMORecHitsPerTrackVsPt->setAxisTitle("Average Number of Lost RecHits per Track", 2);
462 
463  std::string layerTypeName[4] = {"","Off","3D","Missing"};
464  for (int i=0; i<4; ++i) {
465  histname = "NumberOf"+ layerTypeName[i] + "LayersPerTrack_";
466  NumberOfLayersPerTrack[i] = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKLayBin, TKLayMin, TKLayMax);
467  NumberOfLayersPerTrack[i]->setAxisTitle("Number of " + layerTypeName[i] + " Layers of each Track", 1);
468  NumberOfLayersPerTrack[i]->setAxisTitle("Number of Tracks", 2);
469  }
471  for (int i=0; i<4; ++i) {
472  histname = "NumberOf"+ layerTypeName[i] + "LayersVsPhiVsEtaPerTrack_";
473  NumberOfLayersVsPhiVsEtaPerTrack[i] = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
474  EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax, 0, 40., "");
475  NumberOfLayersVsPhiVsEtaPerTrack[i]->setAxisTitle("Track #eta ", 1);
476  NumberOfLayersVsPhiVsEtaPerTrack[i]->setAxisTitle("Track #phi ", 2);
477  }
478  }
479 
480  // book the General Property histograms
481  // ---------------------------------------------------------------------------------//
482 
484 
485  int Chi2Bin = conf_.getParameter<int>( "Chi2Bin");
486  double Chi2Min = conf_.getParameter<double>("Chi2Min");
487  double Chi2Max = conf_.getParameter<double>("Chi2Max");
488 
489  int Chi2NDFBin = conf_.getParameter<int>( "Chi2NDFBin");
490  double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
491  double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
492 
493  int Chi2ProbBin = conf_.getParameter<int>( "Chi2ProbBin");
494  double Chi2ProbMin = conf_.getParameter<double>("Chi2ProbMin");
495  double Chi2ProbMax = conf_.getParameter<double>("Chi2ProbMax");
496 
497 
498  //HI PLOTS////
499  int TransDCABins = conf_.getParameter<int>("TransDCABins");
500  double TransDCAMin = conf_.getParameter<double>("TransDCAMin");
501  double TransDCAMax = conf_.getParameter<double>("TransDCAMax");
502 
503  int LongDCABins = conf_.getParameter<int>("LongDCABins");
504  double LongDCAMin = conf_.getParameter<double>("LongDCAMin");
505  double LongDCAMax = conf_.getParameter<double>("LongDCAMax");
507 
508 
509  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
510 
511  histname = "Chi2_";
512  Chi2 = ibooker.book1D(histname+CategoryName, histname+CategoryName, Chi2Bin, Chi2Min, Chi2Max);
513  Chi2->setAxisTitle("Track #chi^{2}" ,1);
514  Chi2->setAxisTitle("Number of Tracks",2);
515 
516  histname = "Chi2Prob_";
517  Chi2Prob = ibooker.book1D(histname+CategoryName, histname+CategoryName, Chi2ProbBin, Chi2ProbMin, Chi2ProbMax);
518  Chi2Prob->setAxisTitle("Track #chi^{2} probability",1);
519  Chi2Prob->setAxisTitle("Number of Tracks" ,2);
520 
521  histname = "Chi2oNDF_";
522  Chi2oNDF = ibooker.book1D(histname+CategoryName, histname+CategoryName, Chi2NDFBin, Chi2NDFMin, Chi2NDFMax);
523  Chi2oNDF->setAxisTitle("Track #chi^{2}/ndf",1);
524  Chi2oNDF->setAxisTitle("Number of Tracks" ,2);
525 
526 
528  //HI PLOTS///
530  if (doHIPlots_)
531  {
532  histname = "LongDCASig_";
533  LongDCASig = ibooker.book1D(histname+CategoryName, histname+CategoryName,LongDCABins,LongDCAMin,LongDCAMax);
534  LongDCASig->setAxisTitle("dz/#sigma_{dz}",1);
535 
536  histname = "TransDCASig_";
537  TransDCASig = ibooker.book1D(histname+CategoryName,histname+CategoryName,TransDCABins,TransDCAMin,TransDCAMax);
538  TransDCASig->setAxisTitle("dxy/#sigma_{dxy}",1);
539 
540  histname = "dNdPhi_HighPurity_";
541  dNdPhi_HighPurity = ibooker.book1D(histname+CategoryName,histname+CategoryName,PhiBin,PhiMin,PhiMax);
542  dNdPhi_HighPurity->setAxisTitle("#phi",1);
543 
544  histname = "dNdEta_HighPurity_";
545  dNdEta_HighPurity = ibooker.book1D(histname+CategoryName,histname+CategoryName,EtaBin,EtaMin,EtaMax);
546  dNdEta_HighPurity->setAxisTitle("#eta",1);
547 
548  histname = "dNdPt_HighPurity_";
549  dNdPt_HighPurity = ibooker.book1D(histname+CategoryName,histname+CategoryName,150,0,0.3);
550  dNdPt_HighPurity->setAxisTitle("#sigma_{p_{T}}/p_{T}",1);
551 
552  histname = "NhitVsEta_HighPurity_";
553  NhitVsEta_HighPurity = ibooker.bookProfile(histname+CategoryName,histname+CategoryName,EtaBin,EtaMin,EtaMax,-0.5,39.5,"");
554  NhitVsEta_HighPurity->setAxisTitle("Track #eta",1);
555  NhitVsEta_HighPurity->setAxisTitle("Number of Valid RecHits in each Track",2);
556 
557  histname = "NhitVsPhi_HighPurity_";
558  NhitVsPhi_HighPurity = ibooker.bookProfile(histname+CategoryName,histname+CategoryName,PhiBin,PhiMin,PhiMax,-0.5,39.5,"");
559  NhitVsPhi_HighPurity->setAxisTitle("Track #phi",1);
560  NhitVsPhi_HighPurity->setAxisTitle("Number of Valid RecHits in each Track",2);
561 
562  histname = "Ptdist_HighPurity_";
563  Ptdist_HighPurity = ibooker.book1D(histname+CategoryName,histname+CategoryName,150,0,50.);
564  Ptdist_HighPurity->setAxisTitle("p_{T} (GeV/c)",1);
565  Ptdist_HighPurity->setAxisTitle("Number of Tracks",2);
566 
567  histname = "dNhitdPt_HighPurity_";
568  dNhitdPt_HighPurity = ibooker.bookProfile(histname+CategoryName,histname+CategoryName,150,0,25.,-0.5,39.5,"");
569  dNhitdPt_HighPurity->setAxisTitle("p_{T} (GeV/c)",1);
570  dNhitdPt_HighPurity->setAxisTitle("N_{hit}",2);
571 
572  }
573 
574 
575 
577  histname = "xPointOfClosestApproach_";
578  xPointOfClosestApproach = ibooker.book1D(histname+CategoryName, histname+CategoryName, VXBin, VXMin, VXMax);
579  xPointOfClosestApproach->setAxisTitle("x component of Track PCA to beam line (cm)",1);
580  xPointOfClosestApproach->setAxisTitle("Number of Tracks",2);
581 
582  histname = "yPointOfClosestApproach_";
583  yPointOfClosestApproach = ibooker.book1D(histname+CategoryName, histname+CategoryName, VYBin, VYMin, VYMax);
584  yPointOfClosestApproach->setAxisTitle("y component of Track PCA to beam line (cm)",1);
585  yPointOfClosestApproach->setAxisTitle("Number of Tracks",2);
586 
587  histname = "zPointOfClosestApproach_";
588  zPointOfClosestApproach = ibooker.book1D(histname+CategoryName, histname+CategoryName, VZBin, VZMin, VZMax);
589  zPointOfClosestApproach->setAxisTitle("z component of Track PCA to beam line (cm)",1);
590  zPointOfClosestApproach->setAxisTitle("Number of Tracks",2);
591 
592  histname = "xPointOfClosestApproachToPV_";
593  xPointOfClosestApproachToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, VXBin, VXMin, VXMax);
594  xPointOfClosestApproachToPV->setAxisTitle("x component of Track PCA to pv (cm)",1);
595  xPointOfClosestApproachToPV->setAxisTitle("Number of Tracks",2);
596 
597  histname = "yPointOfClosestApproachToPV_";
598  yPointOfClosestApproachToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, VYBin, VYMin, VYMax);
599  yPointOfClosestApproachToPV->setAxisTitle("y component of Track PCA to pv line (cm)",1);
600  yPointOfClosestApproachToPV->setAxisTitle("Number of Tracks",2);
601 
602  histname = "zPointOfClosestApproachToPV_";
603  zPointOfClosestApproachToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, VZBin, VZMin, VZMax);
604  zPointOfClosestApproachToPV->setAxisTitle("z component of Track PCA to pv line (cm)",1);
605  zPointOfClosestApproachToPV->setAxisTitle("Number of Tracks",2);
606  }
607 
608  // See DataFormats/TrackReco/interface/TrackBase.h for track algorithm enum definition
609  // http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/DataFormats/TrackReco/interface/TrackBase.h?view=log
610  histname = "algorithm_";
611  algorithm = ibooker.book1D(histname+CategoryName, histname+CategoryName, reco::TrackBase::algoSize, 0., double(reco::TrackBase::algoSize));
612  algorithm->setAxisTitle("Tracking algorithm",1);
613  algorithm->setAxisTitle("Number of Tracks",2);
614 
615  histname = "originalAlgorithm_";
616  oriAlgo = ibooker.book1D(histname+CategoryName, histname+CategoryName, reco::TrackBase::algoSize, 0., double(reco::TrackBase::algoSize));
617  oriAlgo->setAxisTitle("Tracking algorithm",1);
618  oriAlgo->setAxisTitle("Number of Tracks",2);
619 
620  for (size_t ibin=0; ibin<reco::TrackBase::algoSize-1; ibin++) {
623  }
624 
625  size_t StopReasonNameSize = sizeof(StopReasonName::StopReasonName)/sizeof(std::string);
626  if(StopReasonNameSize != static_cast<unsigned int>(StopReason::SIZE)) {
627  throw cms::Exception("Assert") << "StopReason::SIZE is " << static_cast<unsigned int>(StopReason::SIZE)
628  << " but StopReasonName's only for "
629  << StopReasonNameSize
630  << ". Please update DataFormats/TrackReco/interface/TrajectoryStopReasons.h.";
631  }
632 
633  histname = "stoppingSource_";
634  stoppingSource = ibooker.book1D(histname+CategoryName, histname+CategoryName, StopReasonNameSize, 0., double(StopReasonNameSize));
635  stoppingSource->setAxisTitle("stopping reason",1);
636  stoppingSource->setAxisTitle("Number of Tracks",2);
637 
638  histname = "stoppingSourceVSeta_";
639  stoppingSourceVSeta = ibooker.book2D(histname+CategoryName, histname+CategoryName, EtaBin, EtaMin, EtaMax, StopReasonNameSize, 0., double(StopReasonNameSize));
640  stoppingSourceVSeta->setAxisTitle("track #eta",1);
641  stoppingSourceVSeta->setAxisTitle("stopping reason",2);
642 
643  histname = "stoppingSourceVSphi_";
644  stoppingSourceVSphi = ibooker.book2D(histname+CategoryName, histname+CategoryName, PhiBin, PhiMin, PhiMax, StopReasonNameSize, 0., double(StopReasonNameSize));
645  stoppingSourceVSphi->setAxisTitle("track #phi",1);
646  stoppingSourceVSphi->setAxisTitle("stopping reason",2);
647 
648  for (size_t ibin=0; ibin<StopReasonNameSize; ibin++) {
652  }
653 
654  }
655 
656 }
657 
659 
660  // parameters from the configuration
661  std::string QualName = conf_.getParameter<std::string>("Quality");
663 
664  // use the AlgoName and Quality Name
665  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
666 
667 
668  // book LS analysis related histograms
669  // -----------------------------------
670  if ( doLumiAnalysis_ ) {
671 
672  // get binning from the configuration
673  int TKHitBin = conf_.getParameter<int>( "RecHitBin");
674  double TKHitMin = conf_.getParameter<double>("RecHitMin");
675  double TKHitMax = conf_.getParameter<double>("RecHitMax");
676 
677  int Chi2NDFBin = conf_.getParameter<int>( "Chi2NDFBin");
678  double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
679  double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
680 
681  // add by Mia in order to deal w/ LS transitions
682  ibooker.setCurrentFolder(TopFolder_+"/LSanalysis");
683 
684  histname = "NumberOfRecHitsPerTrack_lumiFlag_";
685  NumberOfRecHitsPerTrack_lumiFlag = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKHitBin, TKHitMin, TKHitMax);
686  NumberOfRecHitsPerTrack_lumiFlag->setAxisTitle("Number of all RecHits of each Track");
687  NumberOfRecHitsPerTrack_lumiFlag->setAxisTitle("Number of Tracks", 2);
688 
689  histname = "Chi2oNDF_lumiFlag_";
690  Chi2oNDF_lumiFlag = ibooker.book1D(histname+CategoryName, histname+CategoryName, Chi2NDFBin, Chi2NDFMin, Chi2NDFMax);
691  Chi2oNDF_lumiFlag->setAxisTitle("Track #chi^{2}/ndf",1);
692  Chi2oNDF_lumiFlag->setAxisTitle("Number of Tracks" ,2);
693 
694  }
695 }
696 
698 
699  // parameters from the configuration
700  std::string QualName = conf_.getParameter<std::string>("Quality");
702 
703  // use the AlgoName and Quality Name
704  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
705 
706  // book the Beam Spot related histograms
707  // ---------------------------------------------------------------------------------//
708 
710 
711  int DxyBin = conf_.getParameter<int>( "DxyBin");
712  double DxyMin = conf_.getParameter<double>("DxyMin");
713  double DxyMax = conf_.getParameter<double>("DxyMax");
714 
715  int AbsDxyBin = conf_.getParameter<int>( "AbsDxyBin");
716  double AbsDxyMin = conf_.getParameter<double>("AbsDxyMin");
717  double AbsDxyMax = conf_.getParameter<double>("AbsDxyMax");
718 
719  int PhiBin = conf_.getParameter<int>( "PhiBin");
720  double PhiMin = conf_.getParameter<double>("PhiMin");
721  double PhiMax = conf_.getParameter<double>("PhiMax");
722 
723  int X0Bin = conf_.getParameter<int>( "X0Bin");
724  double X0Min = conf_.getParameter<double>("X0Min");
725  double X0Max = conf_.getParameter<double>("X0Max");
726 
727  int Y0Bin = conf_.getParameter<int>( "Y0Bin");
728  double Y0Min = conf_.getParameter<double>("Y0Min");
729  double Y0Max = conf_.getParameter<double>("Y0Max");
730 
731  int Z0Bin = conf_.getParameter<int>( "Z0Bin");
732  double Z0Min = conf_.getParameter<double>("Z0Min");
733  double Z0Max = conf_.getParameter<double>("Z0Max");
734 
735  int VZBinProf = conf_.getParameter<int>( "VZBinProf");
736  double VZMinProf = conf_.getParameter<double>("VZMinProf");
737  double VZMaxProf = conf_.getParameter<double>("VZMaxProf");
738 
739 
740  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
741 
742  histname = "DistanceOfClosestApproachToBS_";
743  DistanceOfClosestApproachToBS = ibooker.book1D(histname+CategoryName,histname+CategoryName,DxyBin,DxyMin,DxyMax);
744  DistanceOfClosestApproachToBS->setAxisTitle("Track d_{xy} wrt beam spot (cm)",1);
745  DistanceOfClosestApproachToBS->setAxisTitle("Number of Tracks",2);
746 
747  histname = "AbsDistanceOfClosestApproachToBS_";
748  AbsDistanceOfClosestApproachToBS = ibooker.book1D(histname+CategoryName,histname+CategoryName,AbsDxyBin,AbsDxyMin,AbsDxyMax);
749  AbsDistanceOfClosestApproachToBS->setAxisTitle("Track |d_{xy}| wrt beam spot (cm)",1);
750  AbsDistanceOfClosestApproachToBS->setAxisTitle("Number of Tracks",2);
751 
752  histname = "DistanceOfClosestApproachToBSVsPhi_";
753  DistanceOfClosestApproachToBSVsPhi = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,"");
754  DistanceOfClosestApproachToBSVsPhi->getTH1()->SetCanExtend(TH1::kAllAxes);
756  DistanceOfClosestApproachToBSVsPhi->setAxisTitle("Track d_{xy} wrt beam spot (cm)",2);
757 
758  histname = "xPointOfClosestApproachVsZ0wrt000_";
759  xPointOfClosestApproachVsZ0wrt000 = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, X0Bin, X0Min, X0Max,"");
761  xPointOfClosestApproachVsZ0wrt000->setAxisTitle("x component of Track PCA to beam line (cm)",2);
762 
763  histname = "yPointOfClosestApproachVsZ0wrt000_";
764  yPointOfClosestApproachVsZ0wrt000 = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, Y0Bin, Y0Min, Y0Max,"");
766  yPointOfClosestApproachVsZ0wrt000->setAxisTitle("y component of Track PCA to beam line (cm)",2);
767 
768  histname = "xPointOfClosestApproachVsZ0wrtBS_";
769  xPointOfClosestApproachVsZ0wrtBS = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, X0Bin, X0Min, X0Max,"");
770  xPointOfClosestApproachVsZ0wrtBS->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)",1);
771  xPointOfClosestApproachVsZ0wrtBS->setAxisTitle("x component of Track PCA to BS (cm)",2);
772 
773  histname = "yPointOfClosestApproachVsZ0wrtBS_";
774  yPointOfClosestApproachVsZ0wrtBS = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, Y0Bin, Y0Min, Y0Max,"");
775  yPointOfClosestApproachVsZ0wrtBS->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)",1);
776  yPointOfClosestApproachVsZ0wrtBS->setAxisTitle("y component of Track PCA to BS (cm)",2);
777 
778  histname = "zPointOfClosestApproachVsPhi_";
779  zPointOfClosestApproachVsPhi = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PhiBin, PhiMin, PhiMax, VZBinProf, VZMinProf, VZMaxProf, "");
781  zPointOfClosestApproachVsPhi->setAxisTitle("z component of Track PCA to beam line (cm)",2);
782  }
783 
785 
786  int DxyBin = conf_.getParameter<int>( "DxyBin");
787  double DxyMin = conf_.getParameter<double>("DxyMin");
788  double DxyMax = conf_.getParameter<double>("DxyMax");
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 X0Bin = conf_.getParameter<int>( "X0Bin");
795  double X0Min = conf_.getParameter<double>("X0Min");
796  double X0Max = conf_.getParameter<double>("X0Max");
797 
798  int Y0Bin = conf_.getParameter<int>( "Y0Bin");
799  double Y0Min = conf_.getParameter<double>("Y0Min");
800  double Y0Max = conf_.getParameter<double>("Y0Max");
801 
802  int Z0Bin = conf_.getParameter<int>( "Z0Bin");
803  double Z0Min = conf_.getParameter<double>("Z0Min");
804  double Z0Max = conf_.getParameter<double>("Z0Max");
805 
806  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
807 
808  histname = "DistanceOfClosestApproachToPV_";
809  DistanceOfClosestApproachToPV = ibooker.book1D(histname+CategoryName,histname+CategoryName,DxyBin,DxyMin,DxyMax);
810  DistanceOfClosestApproachToPV->setAxisTitle("Track d_{xy} wrt beam spot (cm)",1);
811  DistanceOfClosestApproachToPV->setAxisTitle("Number of Tracks",2);
812 
813  histname = "DistanceOfClosestApproachToPVVsPhi_";
814  DistanceOfClosestApproachToPVVsPhi = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,"");
815  DistanceOfClosestApproachToPVVsPhi->getTH1()->SetCanExtend(TH1::kAllAxes);
817  DistanceOfClosestApproachToPVVsPhi->setAxisTitle("Track d_{xy} wrt beam spot (cm)",2);
818 
819  histname = "xPointOfClosestApproachVsZ0wrtPV_";
820  xPointOfClosestApproachVsZ0wrtPV = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, X0Bin, X0Min, X0Max,"");
821  xPointOfClosestApproachVsZ0wrtPV->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)",1);
822  xPointOfClosestApproachVsZ0wrtPV->setAxisTitle("x component of Track PCA to PV (cm)",2);
823 
824  histname = "yPointOfClosestApproachVsZ0wrtPV_";
825  yPointOfClosestApproachVsZ0wrtPV = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, Y0Bin, Y0Min, Y0Max,"");
826  yPointOfClosestApproachVsZ0wrtPV->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)",1);
827  yPointOfClosestApproachVsZ0wrtPV->setAxisTitle("y component of Track PCA to PV (cm)",2);
828 
829  }
830 
831  if (doBSPlots_ || doAllPlots_) {
832  if (doTestPlots_) {
833 
834  int DxyBin = conf_.getParameter<int>( "DxyBin");
835  double DxyMin = conf_.getParameter<double>("DxyMin");
836  double DxyMax = conf_.getParameter<double>("DxyMax");
837 
838  int PhiBin = conf_.getParameter<int>( "PhiBin");
839  double PhiMin = conf_.getParameter<double>("PhiMin");
840  double PhiMax = conf_.getParameter<double>("PhiMax");
841 
842  histname = "TESTDistanceOfClosestApproachToBS_";
843  TESTDistanceOfClosestApproachToBS = ibooker.book1D(histname+CategoryName,histname+CategoryName,DxyBin,DxyMin,DxyMax);
844  TESTDistanceOfClosestApproachToBS->setAxisTitle("Track d_{xy} wrt beam spot (cm)",1);
845  TESTDistanceOfClosestApproachToBS->setAxisTitle("Number of Tracks",2);
846 
847  histname = "TESTDistanceOfClosestApproachToBSVsPhi_";
848  TESTDistanceOfClosestApproachToBSVsPhi = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,"");
849  TESTDistanceOfClosestApproachToBSVsPhi->getTH1()->SetCanExtend(TH1::kAllAxes);
851  TESTDistanceOfClosestApproachToBSVsPhi->setAxisTitle("Track d_{xy} wrt beam spot (cm)",2);
852 
853  }
854 
855  }
856 
857  // book the Profile plots for DCA related histograms
858  // ---------------------------------------------------------------------------------//
859  if(doDCAPlots_ || doAllPlots_) {
860 
861  if (doDCAwrt000Plots_) {
862 
863  int EtaBin = conf_.getParameter<int>( "EtaBin");
864  double EtaMin = conf_.getParameter<double>("EtaMin");
865  double EtaMax = conf_.getParameter<double>("EtaMax");
866 
867  int PhiBin = conf_.getParameter<int>( "PhiBin");
868  double PhiMin = conf_.getParameter<double>("PhiMin");
869  double PhiMax = conf_.getParameter<double>("PhiMax");
870 
871  int DxyBin = conf_.getParameter<int>( "DxyBin");
872  double DxyMin = conf_.getParameter<double>("DxyMin");
873  double DxyMax = conf_.getParameter<double>("DxyMax");
874 
875  if (doThetaPlots_) {
876  int ThetaBin = conf_.getParameter<int>( "ThetaBin");
877  double ThetaMin = conf_.getParameter<double>("ThetaMin");
878  double ThetaMax = conf_.getParameter<double>("ThetaMax");
879 
880  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
881  histname = "DistanceOfClosestApproachVsTheta_";
882  DistanceOfClosestApproachVsTheta = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, ThetaBin, ThetaMin, ThetaMax, DxyMin,DxyMax,"");
884  DistanceOfClosestApproachVsTheta->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)",2);
885  }
886 
887  histname = "DistanceOfClosestApproachVsEta_";
888  DistanceOfClosestApproachVsEta = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, EtaBin, EtaMin, EtaMax, DxyMin, DxyMax,"");
890  DistanceOfClosestApproachVsEta->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)",2);
891  // temporary patch in order to put back those MEs in Muon Workspace
892 
893  histname = "DistanceOfClosestApproach_";
894  DistanceOfClosestApproach = ibooker.book1D(histname+CategoryName,histname+CategoryName,DxyBin,DxyMin,DxyMax);
895  DistanceOfClosestApproach->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)",1);
896  DistanceOfClosestApproach->setAxisTitle("Number of Tracks",2);
897 
898  histname = "DistanceOfClosestApproachVsPhi_";
899  DistanceOfClosestApproachVsPhi = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, PhiBin, PhiMin, PhiMax, DxyMin,DxyMax,"");
900  DistanceOfClosestApproachVsPhi->getTH1()->SetCanExtend(TH1::kAllAxes);
902  DistanceOfClosestApproachVsPhi->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)",2);
903  }
904  }
905 
906 
907  if (doSIPPlots_ || doAllPlots_) {
908  const double sipBins = 200;
909  const double sipMin = -20;
910  const double sipMax = 20;
911 
912  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
913 
914  // SIP wrt. beamspot
915  histname = "SIPDxyToBS_";
916  sipDxyToBS = ibooker.book1D(histname+CategoryName, histname+CategoryName, sipBins, sipMin, sipMax);
917  sipDxyToBS->setAxisTitle("Track dxy significance wrt beam spot",1);
918  sipDxyToBS->setAxisTitle("Number of Tracks",2);
919 
920  histname = "SIPDzToBS_";
921  sipDzToBS = ibooker.book1D(histname+CategoryName, histname+CategoryName, sipBins, sipMin, sipMax);
922  sipDzToBS->setAxisTitle("Track dz significance wrt beam spot",1);
923  sipDzToBS->setAxisTitle("Number of Tracks",2);
924 
925  // SIP wrt. vertex
926  histname = "SIP3DToPV_";
927  sip3dToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, sipBins, sipMin, sipMax);
928  sip3dToPV->setAxisTitle("3D IP significance wrt primary vertex",1);
929  sip3dToPV->setAxisTitle("Number of Tracks",2);
930 
931  histname = "SIP2DToPV_";
932  sip2dToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, sipBins, sipMin, sipMax);
933  sip2dToPV->setAxisTitle("2D IP significance wrt primary vertex",1);
934  sip2dToPV->setAxisTitle("Number of Tracks",2);
935 
936  histname = "SIPDxyToPV_";
937  sipDxyToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, sipBins, sipMin, sipMax);
938  sipDxyToPV->setAxisTitle("Track dxy significance wrt primary vertex",1);
939  sipDxyToPV->setAxisTitle("Number of Tracks",2);
940 
941  histname = "SIPDzToPV_";
942  sipDzToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, sipBins, sipMin, sipMax);
943  sipDzToPV->setAxisTitle("Track dz significance wrt primary vertex",1);
944  sipDzToPV->setAxisTitle("Number of Tracks",2);
945  }
946 }
947 
948 // -- Analyse
949 // ---------------------------------------------------------------------------------//
951 
952  good_vertices_ = 0;
953 
954  edm::Handle<reco::VertexCollection> recoPrimaryVerticesHandle;
955  iEvent.getByToken(pvToken_, recoPrimaryVerticesHandle);
956  if (recoPrimaryVerticesHandle.isValid())
957  if (recoPrimaryVerticesHandle->size() > 0)
958  for (auto v : *recoPrimaryVerticesHandle)
959  if (v.ndof() >= pvNDOF_ && !v.isFake())
960  ++good_vertices_;
961 }
962 
964  bx_ = iEvent.bunchCrossing();
965 }
966 
969  // as done by pixelLumi http://cmslxr.fnal.gov/source/DQM/PixelLumi/plugins/PixelLumiDQM.cc
970 
972  iEvent.getByToken(lumiscalersToken_, lumiScalers);
973  if ( lumiScalers.isValid() && lumiScalers->size() ) {
974  LumiScalersCollection::const_iterator scalit = lumiScalers->begin();
975  scal_lumi_ = scalit->instantLumi();
976  } else
977  scal_lumi_ = -1;
978 
980  iEvent.getByToken(pixelClustersToken_, pixelClusters);
981  if ( pixelClusters.isValid() ) {
982 
983  edm::ESHandle<TrackerTopology> tTopoHandle;
984  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
985  const TrackerTopology* const tTopo = tTopoHandle.product();
986 
987  // Count the number of clusters with at least a minimum
988  // number of pixels per cluster and at least a minimum charge.
989  size_t numClusters = 0;
990  size_t tot = 0;
991 
992  edmNew::DetSetVector<SiPixelCluster>::const_iterator pixCluDet = pixelClusters->begin();
993  for ( ; pixCluDet!=pixelClusters->end(); ++pixCluDet) {
994 
995  DetId detid = pixCluDet->detId();
996  size_t subdetid = detid.subdetId();
997  // std::cout << tTopo->print(detid) << std::endl;
998  if ( subdetid == (int) PixelSubdetector::PixelBarrel )
999  if ( tTopo->layer(detid)==1 )
1000  continue;
1001 
1003  for ( ; pixClu != pixCluDet->end(); ++pixClu ) {
1004  ++tot;
1005  if ( (pixClu->size() >= minNumberOfPixelsPerCluster_) &&
1006  (pixClu->charge() >= minPixelClusterCharge_ ) ) {
1007  ++numClusters;
1008  }
1009  }
1010  }
1011  pixel_lumi_ = lumi_factor_per_bx_ * numClusters / GetLumi::CM2_TO_NANOBARN ; // ?!?!
1012  } else
1013  pixel_lumi_ = -1.;
1014 
1015 }
1016 
1017 void TrackAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup, const reco::Track& track)
1018 {
1019  auto pt = track.pt();
1020  auto phi = track.phi();
1021  // double eta = track.eta();
1022  auto phiIn = track.innerPosition().phi();
1023  auto etaIn = track.innerPosition().eta();
1024  auto phiOut = track.outerPosition().phi();
1025  auto etaOut = track.outerPosition().eta();
1026 
1027  int nRecHits = track.hitPattern().numberOfHits(reco::HitPattern::TRACK_HITS);
1028  int nValidRecHits = track.numberOfValidHits();
1029  int nLostRecHits = track.numberOfLostHits();
1032 
1033  auto chi2 = track.chi2();
1034  auto chi2prob = TMath::Prob(track.chi2(),(int)track.ndof());
1035  auto chi2oNDF = track.normalizedChi2();
1036 
1038  // rec hits
1039  NumberOfRecHitsPerTrack -> Fill(nRecHits);
1040  NumberOfValidRecHitsPerTrack-> Fill(nValidRecHits);
1041  NumberOfLostRecHitsPerTrack -> Fill(nLostRecHits);
1042  NumberOfMIRecHitsPerTrack -> Fill(nLostIn);
1043  NumberOfMORecHitsPerTrack -> Fill(nLostOut);
1045 
1046 
1047  // 2D plots
1049  NumberOfValidRecHitVsPhiVsEtaPerTrack->Fill(etaIn,phiIn,nValidRecHits);
1050  NumberOfLostRecHitVsPhiVsEtaPerTrack->Fill(etaIn,phiIn,nLostRecHits);
1051  NumberOfMIRecHitVsPhiVsEtaPerTrack->Fill(etaIn,phiIn,nLostIn);
1052  NumberOfMORecHitVsPhiVsEtaPerTrack->Fill(etaOut,phiOut,nLostOut);
1053  ValidFractionVsPhiVsEtaPerTrack -> Fill(etaIn,phiIn,track.validFraction());
1054  }
1056  NumberOfValidRecHitVsPtVsEtaPerTrack->Fill(etaIn,pt,nValidRecHits);
1057  NumberOfLostRecHitVsPtVsEtaPerTrack->Fill(etaIn,pt,nLostRecHits);
1058  NumberOfMIRecHitVsPtVsEtaPerTrack->Fill(etaIn,pt,nLostIn);
1059  NumberOfMORecHitVsPtVsEtaPerTrack->Fill(etaOut,pt,nLostOut);
1060  }
1061  NumberOfValidRecHitsPerTrackVsPt->Fill(pt,nValidRecHits);
1062  NumberOfLostRecHitsPerTrackVsPt->Fill(pt,nLostRecHits);
1065 
1066  int nLayers[4] = { track.hitPattern().trackerLayersWithMeasurement(),
1070  };
1071 
1072  // layers
1073  for (int i=0;i<4;++i) NumberOfLayersPerTrack[i]->Fill(nLayers[i]);
1074 
1075  // 2D plots
1077  for (int i=0;i<4;++i) NumberOfLayersVsPhiVsEtaPerTrack[i]->Fill(etaIn,phiIn,nLayers[i]);
1078 
1079  }
1080 
1084  // if (doEffFromHitPatternVsLUMI_ || doAllPlots_) fillHistosForEfficiencyFromHitPatter(track,"VsPIXELLUMI", pixel_lumi_ );
1085 
1086 
1088  // fitting
1089  Chi2 -> Fill(chi2);
1090  Chi2Prob -> Fill(chi2prob);
1091  Chi2oNDF -> Fill(chi2oNDF);
1092 
1093  // DCA
1094  // temporary patch in order to put back those MEs in Muon Workspace
1095  if (doDCAPlots_) {
1096  if (doDCAwrt000Plots_) {
1099  }
1100 
1101  // PCA
1105  }
1106 
1107  // algorithm
1108  algorithm->Fill(static_cast<double>(track.algo()));
1109  oriAlgo->Fill(static_cast<double>(track.originalAlgo()));
1110 
1111  // stopping source
1112  int max = stoppingSource->getNbinsX();
1113  double stop = track.stopReason() > max ? double(max-1) : static_cast<double>(track.stopReason());
1114  stoppingSource->Fill(stop);
1115  stoppingSourceVSeta->Fill(track.eta(),stop);
1116  stoppingSourceVSphi->Fill(track.phi(),stop);
1117  }
1118 
1119  if ( doLumiAnalysis_ ) {
1121  Chi2oNDF_lumiFlag -> Fill(chi2oNDF);
1122  }
1123 
1125 
1126  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
1127  iEvent.getByToken(beamSpotToken_,recoBeamSpotHandle);
1128  const reco::BeamSpot& bs = *recoBeamSpotHandle;
1129 
1132  DistanceOfClosestApproachToBSVsPhi -> Fill(track.phi(), track.dxy(bs.position()));
1133  zPointOfClosestApproachVsPhi -> Fill(track.phi(), track.vz());
1134  xPointOfClosestApproachVsZ0wrt000 -> Fill(track.dz(), track.vx());
1135  yPointOfClosestApproachVsZ0wrt000 -> Fill(track.dz(), track.vy());
1136  xPointOfClosestApproachVsZ0wrtBS -> Fill(track.dz(bs.position()),(track.vx()-bs.position(track.vz()).x()));
1137  yPointOfClosestApproachVsZ0wrtBS -> Fill(track.dz(bs.position()),(track.vy()-bs.position(track.vz()).y()));
1138  if (doTestPlots_) {
1139  TESTDistanceOfClosestApproachToBS -> Fill(track.dxy(bs.position(track.vz())));
1140  TESTDistanceOfClosestApproachToBSVsPhi -> Fill(track.phi(), track.dxy(bs.position(track.vz())));
1141  }
1142 
1143  if(doSIPPlots_) {
1144  sipDxyToBS->Fill(track.dxy(bs.position())/track.dxyError());
1145  sipDzToBS->Fill(track.dz(bs.position())/track.dzError());
1146  }
1147  }
1148 
1150  edm::Handle<reco::VertexCollection> recoPrimaryVerticesHandle;
1151  iEvent.getByToken(pvToken_,recoPrimaryVerticesHandle);
1152  if (recoPrimaryVerticesHandle.isValid() && recoPrimaryVerticesHandle->size() > 0) {
1153  const reco::Vertex& pv = (*recoPrimaryVerticesHandle)[0];
1154 
1155 
1157  //HI PLOTS///////
1159 
1160  if(doHIPlots_)
1161  {
1162  double longDCAsig = 0, transDCAsig = 0;
1163  double zerr2 = track.dzError()*track.dzError()+pv.zError()*pv.zError();
1164  double xyerr2 = track.d0Error()*track.d0Error()+pv.xError()*pv.yError();
1165  if(zerr2 > 0) longDCAsig = track.dz(pv.position())/zerr2;
1166  if(xyerr2 > 0) transDCAsig = track.dxy(pv.position())/xyerr2;
1167  LongDCASig->Fill(longDCAsig);
1168  TransDCASig->Fill(transDCAsig);
1169 
1170 
1171 
1172 
1174  {
1175  dNdEta_HighPurity->Fill(track.eta());
1176  dNdPhi_HighPurity->Fill(track.phi());
1177  dNdPt_HighPurity->Fill(track.ptError()/track.pt());
1178  NhitVsEta_HighPurity->Fill(track.eta(),track.numberOfValidHits());
1179  NhitVsPhi_HighPurity->Fill(track.phi(),track.numberOfValidHits());
1180  dNhitdPt_HighPurity->Fill(track.pt(),track.numberOfValidHits());
1181  Ptdist_HighPurity->Fill(track.pt());
1182  }//end of high quality tracks requirement
1183  }
1184 
1185 
1186  xPointOfClosestApproachToPV->Fill(track.vx()-pv.position().x());
1187  yPointOfClosestApproachToPV->Fill(track.vy()-pv.position().y());
1190  DistanceOfClosestApproachToPVVsPhi -> Fill(track.phi(), track.dxy(pv.position()));
1191  xPointOfClosestApproachVsZ0wrtPV -> Fill(track.dz(pv.position()),(track.vx()-pv.position().x()));
1192  yPointOfClosestApproachVsZ0wrtPV -> Fill(track.dz(pv.position()),(track.vy()-pv.position().y()));
1193 
1194 
1195  if(doSIPPlots_) {
1197  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder",theB);
1198  reco::TransientTrack transTrack = theB->build(track);
1199 
1200  GlobalVector dir(track.px(), track.py(), track.pz());
1201  std::pair<bool, Measurement1D> ip3d = IPTools::signedImpactParameter3D(transTrack, dir, pv);
1202  std::pair<bool, Measurement1D> ip2d = IPTools::signedTransverseImpactParameter(transTrack, dir, pv);
1203  if(ip3d.first) sip3dToPV->Fill(ip3d.second.value() / ip3d.second.error());
1204  if(ip2d.first) sip2dToPV->Fill(ip2d.second.value() / ip2d.second.error());
1205  sipDxyToPV->Fill(track.dxy(pv.position())/track.dxyError());
1206  sipDzToPV->Fill(track.dz(pv.position())/track.dzError());
1207  }
1208  }
1209  }
1210 
1211  if(doDCAPlots_ || doAllPlots_) {
1212  if (doDCAwrt000Plots_) {
1213  if (doThetaPlots_) {
1214  DistanceOfClosestApproachVsTheta->Fill(track.theta(), track.d0());
1215  }
1216  DistanceOfClosestApproachVsEta->Fill(track.eta(), track.d0());
1217  }
1218 
1219  }
1220 
1221  //Tracker Specific Histograms
1224  }
1225 
1227  std::string StateName = conf_.getParameter<std::string>("MeasurementState");
1228 
1229  if (StateName == "All") {
1230  fillHistosForState(iSetup, track, std::string("OuterSurface"));
1231  fillHistosForState(iSetup, track, std::string("InnerSurface"));
1232  fillHistosForState(iSetup, track, std::string("ImpactPoint"));
1233  } else if (
1234  StateName != "OuterSurface" &&
1235  StateName != "InnerSurface" &&
1236  StateName != "ImpactPoint" &&
1237  StateName != "default"
1238  ) {
1239  fillHistosForState(iSetup, track, std::string("default"));
1240  } else {
1241  fillHistosForState(iSetup, track, StateName);
1242  }
1243  }
1244 
1245  if ( doAllPlots_ ) {
1246  }
1247 
1248 }
1249 
1250 void TrackAnalyzer::fillHistosForEfficiencyFromHitPatter(const reco::Track & track, const std::string suffix, const float monitoring) {
1251 
1252  int mon = -1;
1253  for (int i=0; i<monQuantity::END; i++) {
1254  if (monName[i] == suffix) mon = i;
1255  }
1256 
1257  // if (track.pt() > 1.0 && track.dxy() < 0.1 and monitoring > 0) {
1258  if (track.pt() > 1.0 && track.dxy() < 0.1 and monitoring > -9.) {
1259  auto hp = track.hitPattern();
1260  // Here hit_category is meant to iterate over
1261  // reco::HitPattern::HitCategory, defined here:
1262  // http://cmslxr.fnal.gov/dxr/CMSSW/source/DataFormats/TrackReco/interface/HitPattern.h
1263  for (unsigned int category = 0; category < 3; ++category) {
1264  for (int hit = 0; hit < hp.numberOfHits((reco::HitPattern::HitCategory)(category)); ++hit) {
1265  auto pattern = hp.getHitPattern((reco::HitPattern::HitCategory)(category), hit);
1266  // Boolean bad is missing simply because it is inferred and the only missing case.
1267  bool valid = hp.validHitFilter(pattern);
1268  bool missing = hp.missingHitFilter(pattern);
1269  bool inactive = hp.inactiveHitFilter(pattern);
1270  int hit_type = -1;
1271  hit_type = valid ? 0 :
1272  ( missing ? 1 :
1273  ( inactive ? 2 : 3));
1274  if (hits_valid_.find(Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)) == hits_valid_.end()) {
1275  LogDebug("TrackAnalyzer") << "Invalid combination of detector and subdetector: ("
1276  << hp.getSubStructure(pattern) << ", "
1277  << hp.getSubSubStructure(pattern) << ", "
1278  << mon
1279  << "): ignoring it.\n";
1280  continue;
1281  }
1282  switch (hit_type) {
1283  case 0:
1284  hits_valid_[Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)]->Fill(monitoring);
1285  hits_total_[Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)]->Fill(monitoring);
1286  break;
1287  case 1:
1288  hits_missing_[Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)]->Fill(monitoring);
1289  hits_total_[Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)]->Fill(monitoring);
1290  break;
1291  case 2:
1292  hits_inactive_[Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)]->Fill(monitoring);
1293  break;
1294  case 3:
1295  hits_bad_[Key(hp.getSubStructure(pattern), hp.getSubSubStructure(pattern), mon)]->Fill(monitoring);
1296  break;
1297  default:
1298  LogDebug("TrackAnalyzer") << "Invalid hit category used " << hit_type << " ignored\n";
1299  }
1300  }
1301  }
1302  }
1303 
1304 }
1305 
1306 // book histograms at differnt measurement points
1307 // ---------------------------------------------------------------------------------//
1309 {
1310 
1311  // parameters from the configuration
1312  std::string QualName = conf_.getParameter<std::string>("Quality");
1314 
1315  // use the AlgoName and Quality Name
1316  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
1317 
1318  // get binning from the configuration
1319  double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
1320  double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
1321 
1322  int RecHitBin = conf_.getParameter<int>( "RecHitBin");
1323  double RecHitMin = conf_.getParameter<double>("RecHitMin");
1324  double RecHitMax = conf_.getParameter<double>("RecHitMax");
1325 
1326  int RecLayBin = conf_.getParameter<int>( "RecHitBin");
1327  double RecLayMin = conf_.getParameter<double>("RecHitMin");
1328  double RecLayMax = conf_.getParameter<double>("RecHitMax");
1329 
1330 
1331  int PhiBin = conf_.getParameter<int>( "PhiBin");
1332  double PhiMin = conf_.getParameter<double>("PhiMin");
1333  double PhiMax = conf_.getParameter<double>("PhiMax");
1334 
1335  int EtaBin = conf_.getParameter<int>( "EtaBin");
1336  double EtaMin = conf_.getParameter<double>("EtaMin");
1337  double EtaMax = conf_.getParameter<double>("EtaMax");
1338 
1339  int ThetaBin = conf_.getParameter<int>( "ThetaBin");
1340  double ThetaMin = conf_.getParameter<double>("ThetaMin");
1341  double ThetaMax = conf_.getParameter<double>("ThetaMax");
1342 
1343  int TrackQBin = conf_.getParameter<int>( "TrackQBin");
1344  double TrackQMin = conf_.getParameter<double>("TrackQMin");
1345  double TrackQMax = conf_.getParameter<double>("TrackQMax");
1346 
1347  int TrackPtBin = conf_.getParameter<int>( "TrackPtBin");
1348  double TrackPtMin = conf_.getParameter<double>("TrackPtMin");
1349  double TrackPtMax = conf_.getParameter<double>("TrackPtMax");
1350 
1351  int TrackPBin = conf_.getParameter<int>( "TrackPBin");
1352  double TrackPMin = conf_.getParameter<double>("TrackPMin");
1353  double TrackPMax = conf_.getParameter<double>("TrackPMax");
1354 
1355  int TrackPxBin = conf_.getParameter<int>( "TrackPxBin");
1356  double TrackPxMin = conf_.getParameter<double>("TrackPxMin");
1357  double TrackPxMax = conf_.getParameter<double>("TrackPxMax");
1358 
1359  int TrackPyBin = conf_.getParameter<int>( "TrackPyBin");
1360  double TrackPyMin = conf_.getParameter<double>("TrackPyMin");
1361  double TrackPyMax = conf_.getParameter<double>("TrackPyMax");
1362 
1363  int TrackPzBin = conf_.getParameter<int>( "TrackPzBin");
1364  double TrackPzMin = conf_.getParameter<double>("TrackPzMin");
1365  double TrackPzMax = conf_.getParameter<double>("TrackPzMax");
1366 
1367  int ptErrBin = conf_.getParameter<int>( "ptErrBin");
1368  double ptErrMin = conf_.getParameter<double>("ptErrMin");
1369  double ptErrMax = conf_.getParameter<double>("ptErrMax");
1370 
1371  int pxErrBin = conf_.getParameter<int>( "pxErrBin");
1372  double pxErrMin = conf_.getParameter<double>("pxErrMin");
1373  double pxErrMax = conf_.getParameter<double>("pxErrMax");
1374 
1375  int pyErrBin = conf_.getParameter<int>( "pyErrBin");
1376  double pyErrMin = conf_.getParameter<double>("pyErrMin");
1377  double pyErrMax = conf_.getParameter<double>("pyErrMax");
1378 
1379  int pzErrBin = conf_.getParameter<int>( "pzErrBin");
1380  double pzErrMin = conf_.getParameter<double>("pzErrMin");
1381  double pzErrMax = conf_.getParameter<double>("pzErrMax");
1382 
1383  int pErrBin = conf_.getParameter<int>( "pErrBin");
1384  double pErrMin = conf_.getParameter<double>("pErrMin");
1385  double pErrMax = conf_.getParameter<double>("pErrMax");
1386 
1387  int phiErrBin = conf_.getParameter<int>( "phiErrBin");
1388  double phiErrMin = conf_.getParameter<double>("phiErrMin");
1389  double phiErrMax = conf_.getParameter<double>("phiErrMax");
1390 
1391  int etaErrBin = conf_.getParameter<int>( "etaErrBin");
1392  double etaErrMin = conf_.getParameter<double>("etaErrMin");
1393  double etaErrMax = conf_.getParameter<double>("etaErrMax");
1394 
1395 
1396  double Chi2ProbMin = conf_.getParameter<double>("Chi2ProbMin");
1397  double Chi2ProbMax = conf_.getParameter<double>("Chi2ProbMax");
1398 
1399  ibooker.setCurrentFolder(TopFolder_);
1400 
1401  TkParameterMEs tkmes;
1402 
1403  std::string histTag = (sname == "default") ? CategoryName : sname + "_" + CategoryName;
1404 
1405  if(doAllPlots_) {
1406 
1407  // general properties
1408  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
1409 
1410  if (doThetaPlots_) {
1411  histname = "Chi2oNDFVsTheta_" + histTag;
1412  tkmes.Chi2oNDFVsTheta = ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, Chi2NDFMin, Chi2NDFMax,"");
1413  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #theta",1);
1414  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #chi^{2}/ndf",2);
1415  }
1416  histname = "Chi2oNDFVsPhi_" + histTag;
1417  tkmes.Chi2oNDFVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, Chi2NDFMin, Chi2NDFMax,"");
1418  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #phi",1);
1419  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #chi^{2}/ndf",2);
1420 
1421  histname = "Chi2ProbVsPhi_" + histTag;
1422  tkmes.Chi2ProbVsPhi = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PhiBin, PhiMin, PhiMax, Chi2ProbMin, Chi2ProbMax);
1423  tkmes.Chi2ProbVsPhi->setAxisTitle("Tracks #phi" ,1);
1424  tkmes.Chi2ProbVsPhi->setAxisTitle("Track #chi^{2} probability",2);
1425 
1426  histname = "Chi2ProbVsEta_" + histTag;
1427  tkmes.Chi2ProbVsEta = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, EtaBin, EtaMin, EtaMax, Chi2ProbMin, Chi2ProbMax);
1428  tkmes.Chi2ProbVsEta->setAxisTitle("Tracks #eta" ,1);
1429  tkmes.Chi2ProbVsEta->setAxisTitle("Track #chi^{2} probability",2);
1430 
1431  }
1432 
1433  // general properties
1434  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
1435 
1436 
1437  histname = "Chi2oNDFVsEta_" + histTag;
1438  tkmes.Chi2oNDFVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, Chi2NDFMin, Chi2NDFMax,"");
1439  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #eta",1);
1440  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #chi^{2}/ndf",2);
1441 
1442  histname = "Chi2oNDFVsPt_" + histTag;
1443  tkmes.Chi2oNDFVsPt = ibooker.bookProfile(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax, Chi2NDFMin, Chi2NDFMax,"");
1444  tkmes.Chi2oNDFVsPt->setAxisTitle("Track p_{T} (GeV/c)", 1);
1445  tkmes.Chi2oNDFVsPt->setAxisTitle("Track #chi^{2}/ndf",2);
1446 
1447  histname = "Chi2oNDFVsNHits_" + histTag;
1448  tkmes.Chi2oNDFVsNHits = ibooker.bookProfile(histname, histname, 50, 0, 50, Chi2NDFMin, Chi2NDFMax,"");
1449  tkmes.Chi2oNDFVsNHits->setAxisTitle("Track NHits", 1);
1450  tkmes.Chi2oNDFVsNHits->setAxisTitle("Track #chi^{2}/ndf",2);
1451 
1452  histname = "TrackP_" + histTag;
1453  tkmes.TrackP = ibooker.book1D(histname, histname, TrackPBin, TrackPMin, TrackPMax);
1454  tkmes.TrackP->setAxisTitle("Track |p| (GeV/c)", 1);
1455  tkmes.TrackP->setAxisTitle("Number of Tracks",2);
1456 
1457  histname = "TrackPt_" + histTag;
1458  tkmes.TrackPt = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
1459  tkmes.TrackPt->setAxisTitle("Track p_{T} (GeV/c)", 1);
1460  tkmes.TrackPt->setAxisTitle("Number of Tracks",2);
1461 
1462  if (doTrackPxPyPlots_) {
1463  histname = "TrackPx_" + histTag;
1464  tkmes.TrackPx = ibooker.book1D(histname, histname, TrackPxBin, TrackPxMin, TrackPxMax);
1465  tkmes.TrackPx->setAxisTitle("Track p_{x} (GeV/c)", 1);
1466  tkmes.TrackPx->setAxisTitle("Number of Tracks",2);
1467 
1468  histname = "TrackPy_" + histTag;
1469  tkmes.TrackPy = ibooker.book1D(histname, histname, TrackPyBin, TrackPyMin, TrackPyMax);
1470  tkmes.TrackPy->setAxisTitle("Track p_{y} (GeV/c)", 1);
1471  tkmes.TrackPy->setAxisTitle("Number of Tracks",2);
1472  }
1473  histname = "TrackPz_" + histTag;
1474  tkmes.TrackPz = ibooker.book1D(histname, histname, TrackPzBin, TrackPzMin, TrackPzMax);
1475  tkmes.TrackPz->setAxisTitle("Track p_{z} (GeV/c)", 1);
1476  tkmes.TrackPz->setAxisTitle("Number of Tracks",2);
1477 
1478  histname = "TrackPhi_" + histTag;
1479  tkmes.TrackPhi = ibooker.book1D(histname, histname, PhiBin, PhiMin, PhiMax);
1480  tkmes.TrackPhi->setAxisTitle("Track #phi", 1);
1481  tkmes.TrackPhi->setAxisTitle("Number of Tracks",2);
1482 
1483  histname = "TrackEta_" + histTag;
1484  tkmes.TrackEta = ibooker.book1D(histname, histname, EtaBin, EtaMin, EtaMax);
1485  tkmes.TrackEta->setAxisTitle("Track #eta", 1);
1486  tkmes.TrackEta->setAxisTitle("Number of Tracks",2);
1487 
1488  histname = "TrackEtaPhi_" + histTag;
1489  tkmes.TrackEtaPhi = ibooker.book2D(histname, histname, EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax);
1490  tkmes.TrackEtaPhi->setAxisTitle("Track #eta", 1);
1491  tkmes.TrackEtaPhi->setAxisTitle("Track #phi", 2);
1492 
1493  histname = "TrackEtaPhiInner_" + histTag;
1494  tkmes.TrackEtaPhiInner = ibooker.book2D(histname, histname, EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax);
1495  tkmes.TrackEtaPhiInner->setAxisTitle("Track #eta", 1);
1496  tkmes.TrackEtaPhiInner->setAxisTitle("Track #phi", 2);
1497 
1498  histname = "TrackEtaPhiOuter_" + histTag;
1499  tkmes.TrackEtaPhiOuter = ibooker.book2D(histname, histname, EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax);
1500  tkmes.TrackEtaPhiOuter->setAxisTitle("Track #eta", 1);
1501  tkmes.TrackEtaPhiOuter->setAxisTitle("Track #phi", 2);
1502 
1503 
1504 
1505  if (doThetaPlots_) {
1506  histname = "TrackTheta_" + histTag;
1507  tkmes.TrackTheta = ibooker.book1D(histname, histname, ThetaBin, ThetaMin, ThetaMax);
1508  tkmes.TrackTheta->setAxisTitle("Track #theta", 1);
1509  tkmes.TrackTheta->setAxisTitle("Number of Tracks",2);
1510  }
1511  histname = "TrackQ_" + histTag;
1512  tkmes.TrackQ = ibooker.book1D(histname, histname, TrackQBin, TrackQMin, TrackQMax);
1513  tkmes.TrackQ->setAxisTitle("Track Charge", 1);
1514  tkmes.TrackQ->setAxisTitle("Number of Tracks",2);
1515 
1516  histname = "TrackPErrOverP_" + histTag;
1517  tkmes.TrackPErr = ibooker.book1D(histname, histname, pErrBin, pErrMin, pErrMax);
1518  tkmes.TrackPErr->setAxisTitle("track error(p)/p", 1);
1519  tkmes.TrackPErr->setAxisTitle("Number of Tracks",2);
1520 
1521  histname = "TrackPtErrOverPt_" + histTag;
1522  tkmes.TrackPtErr = ibooker.book1D(histname, histname, ptErrBin, ptErrMin, ptErrMax);
1523  tkmes.TrackPtErr->setAxisTitle("track error(p_{T})/p_{T}", 1);
1524  tkmes.TrackPtErr->setAxisTitle("Number of Tracks",2);
1525 
1526  histname = "TrackPtErrOverPtVsEta_" + histTag;
1527  tkmes.TrackPtErrVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, ptErrMin, ptErrMax);
1528  tkmes.TrackPtErrVsEta->setAxisTitle("Track #eta",1);
1529  tkmes.TrackPtErrVsEta->setAxisTitle("track error(p_{T})/p_{T}", 2);
1530 
1531  if (doTrackPxPyPlots_) {
1532  histname = "TrackPxErrOverPx_" + histTag;
1533  tkmes.TrackPxErr = ibooker.book1D(histname, histname, pxErrBin, pxErrMin, pxErrMax);
1534  tkmes.TrackPxErr->setAxisTitle("track error(p_{x})/p_{x}", 1);
1535  tkmes.TrackPxErr->setAxisTitle("Number of Tracks",2);
1536 
1537  histname = "TrackPyErrOverPy_" + histTag;
1538  tkmes.TrackPyErr = ibooker.book1D(histname, histname, pyErrBin, pyErrMin, pyErrMax);
1539  tkmes.TrackPyErr->setAxisTitle("track error(p_{y})/p_{y}", 1);
1540  tkmes.TrackPyErr->setAxisTitle("Number of Tracks",2);
1541  }
1542  histname = "TrackPzErrOverPz_" + histTag;
1543  tkmes.TrackPzErr = ibooker.book1D(histname, histname, pzErrBin, pzErrMin, pzErrMax);
1544  tkmes.TrackPzErr->setAxisTitle("track error(p_{z})/p_{z}", 1);
1545  tkmes.TrackPzErr->setAxisTitle("Number of Tracks",2);
1546 
1547  histname = "TrackPhiErr_" + histTag;
1548  tkmes.TrackPhiErr = ibooker.book1D(histname, histname, phiErrBin, phiErrMin, phiErrMax);
1549  tkmes.TrackPhiErr->setAxisTitle("track error(#phi)");
1550  tkmes.TrackPhiErr->setAxisTitle("Number of Tracks",2);
1551 
1552  histname = "TrackEtaErr_" + histTag;
1553  tkmes.TrackEtaErr = ibooker.book1D(histname, histname, etaErrBin, etaErrMin, etaErrMax);
1554  tkmes.TrackEtaErr->setAxisTitle("track error(#eta)");
1555  tkmes.TrackEtaErr->setAxisTitle("Number of Tracks",2);
1556 
1557  // rec hit profiles
1558  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
1559  histname = "NumberOfRecHitsPerTrackVsPhi_" + histTag;
1560  tkmes.NumberOfRecHitsPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, RecHitBin, RecHitMin, RecHitMax,"");
1561  tkmes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Track #phi",1);
1562  tkmes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Number of RecHits in each Track",2);
1563 
1564  if (doThetaPlots_) {
1565  histname = "NumberOfRecHitsPerTrackVsTheta_" + histTag;
1566  tkmes.NumberOfRecHitsPerTrackVsTheta = ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, RecHitBin, RecHitMin, RecHitMax,"");
1567  tkmes.NumberOfRecHitsPerTrackVsTheta->setAxisTitle("Track #phi",1);
1568  tkmes.NumberOfRecHitsPerTrackVsTheta->setAxisTitle("Number of RecHits in each Track",2);
1569  }
1570  histname = "NumberOfRecHitsPerTrackVsEta_" + histTag;
1571  tkmes.NumberOfRecHitsPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, RecHitBin, RecHitMin, RecHitMax,"");
1572  tkmes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Track #eta",1);
1573  tkmes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Number of RecHits in each Track",2);
1574 
1575  histname = "NumberOfValidRecHitsPerTrackVsPhi_" + histTag;
1576  tkmes.NumberOfValidRecHitsPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, RecHitMin, RecHitMax,"");
1577  tkmes.NumberOfValidRecHitsPerTrackVsPhi->setAxisTitle("Track #phi",1);
1578  tkmes.NumberOfValidRecHitsPerTrackVsPhi->setAxisTitle("Number of valid RecHits in each Track",2);
1579 
1580  histname = "NumberOfValidRecHitsPerTrackVsEta_" + histTag;
1581  tkmes.NumberOfValidRecHitsPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, RecHitMin, RecHitMax,"");
1582  tkmes.NumberOfValidRecHitsPerTrackVsEta->setAxisTitle("Track #eta",1);
1583  tkmes.NumberOfValidRecHitsPerTrackVsEta->setAxisTitle("Number of valid RecHits in each Track",2);
1584 
1585  histname = "NumberOfValidRecHitsPerTrackVsPt_" + histTag;
1586  tkmes.NumberOfValidRecHitsPerTrackVsPt = ibooker.bookProfile(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax, RecHitMin, RecHitMax,"");
1587  tkmes.NumberOfValidRecHitsPerTrackVsPt->setAxisTitle("Track p_{T} [GeV]",1);
1588  tkmes.NumberOfValidRecHitsPerTrackVsPt->setAxisTitle("Number of valid RecHits in each Track",2);
1589 
1591  histname = "NumberOfLayersPerTrackVsPhi_" + histTag;
1592  tkmes.NumberOfLayersPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, RecLayBin, RecLayMin, RecLayMax,"");
1593  tkmes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Track #phi",1);
1594  tkmes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Number of Layers in each Track",2);
1595 
1596  if (doThetaPlots_) {
1597  histname = "NumberOfLayersPerTrackVsTheta_" + histTag;
1598  tkmes.NumberOfLayersPerTrackVsTheta = ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, RecLayBin, RecLayMin, RecLayMax,"");
1599  tkmes.NumberOfLayersPerTrackVsTheta->setAxisTitle("Track #phi",1);
1600  tkmes.NumberOfLayersPerTrackVsTheta->setAxisTitle("Number of Layers in each Track",2);
1601  }
1602  histname = "NumberOfLayersPerTrackVsEta_" + histTag;
1603  tkmes.NumberOfLayersPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, RecLayBin, RecLayMin, RecLayMax,"");
1604  tkmes.NumberOfLayersPerTrackVsEta->setAxisTitle("Track #eta",1);
1605  tkmes.NumberOfLayersPerTrackVsEta->setAxisTitle("Number of Layers in each Track",2);
1606 
1607  if (doThetaPlots_) {
1608  histname = "Chi2oNDFVsTheta_" + histTag;
1609  tkmes.Chi2oNDFVsTheta = ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, Chi2NDFMin, Chi2NDFMax,"");
1610  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #theta",1);
1611  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #chi^{2}/ndf",2);
1612  }
1613  if (doAllPlots_) {
1614  histname = "Chi2oNDFVsPhi_" + histTag;
1615  tkmes.Chi2oNDFVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, Chi2NDFMin, Chi2NDFMax,"");
1616  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #phi",1);
1617  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #chi^{2}/ndf",2);
1618 
1619  histname = "Chi2oNDFVsEta_" + histTag;
1620  tkmes.Chi2oNDFVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, Chi2NDFMin, Chi2NDFMax,"");
1621  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #eta",1);
1622  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #chi^{2}/ndf",2);
1623 
1624  histname = "Chi2ProbVsPhi_" + histTag;
1625  tkmes.Chi2ProbVsPhi = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PhiBin, PhiMin, PhiMax, Chi2ProbMin, Chi2ProbMax);
1626  tkmes.Chi2ProbVsPhi->setAxisTitle("Tracks #phi" ,1);
1627  tkmes.Chi2ProbVsPhi->setAxisTitle("Track #chi^{2} probability",2);
1628 
1629  histname = "Chi2ProbVsEta_" + histTag;
1630  tkmes.Chi2ProbVsEta = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, EtaBin, EtaMin, EtaMax, Chi2ProbMin, Chi2ProbMax);
1631  tkmes.Chi2ProbVsEta->setAxisTitle("Tracks #eta" ,1);
1632  tkmes.Chi2ProbVsEta->setAxisTitle("Track #chi^{2} probability",2);
1633  }
1634 
1635  // now put the MEs in the map
1636  TkParameterMEMap.insert( std::make_pair(sname, tkmes) );
1637 
1638 }
1639 
1640 
1641 // fill histograms at differnt measurement points
1642 // ---------------------------------------------------------------------------------//
1644 {
1645  //get the kinematic parameters
1646  double p, px, py, pz, pt, theta, phi, eta, q;
1647  double pxerror, pyerror, pzerror, pterror, perror, phierror, etaerror;
1648 
1649  auto phiIn = track.innerPosition().phi();
1650  auto etaIn = track.innerPosition().eta();
1651  auto phiOut = track.outerPosition().phi();
1652  auto etaOut = track.outerPosition().eta();
1653 
1654 
1655  if (sname == "default") {
1656 
1657  p = track.p();
1658  px = track.px();
1659  py = track.py();
1660  pz = track.pz();
1661  pt = track.pt();
1662  phi = track.phi();
1663  theta = track.theta();
1664  eta = track.eta();
1665  q = track.charge();
1666 
1667  pterror = (pt) ? track.ptError()/(pt*pt) : 0.0;
1668  pxerror = -1.0;
1669  pyerror = -1.0;
1670  pzerror = -1.0;
1671  perror = -1.0;
1672  phierror = track.phiError();
1673  etaerror = track.etaError();
1674 
1675  } else {
1676 
1678  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder",theB);
1679  reco::TransientTrack TransTrack = theB->build(track);
1680 
1682 
1683  if (sname == "OuterSurface") TSOS = TransTrack.outermostMeasurementState();
1684  else if (sname == "InnerSurface") TSOS = TransTrack.innermostMeasurementState();
1685  else if (sname == "ImpactPoint") TSOS = TransTrack.impactPointState();
1686 
1687  p = TSOS.globalMomentum().mag();
1688  px = TSOS.globalMomentum().x();
1689  py = TSOS.globalMomentum().y();
1690  pz = TSOS.globalMomentum().z();
1691  pt = TSOS.globalMomentum().perp();
1692  phi = TSOS.globalMomentum().phi();
1693  theta = TSOS.globalMomentum().theta();
1694  eta = TSOS.globalMomentum().eta();
1695  q = TSOS.charge();
1696 
1697  //get the error of the kinimatic parameters
1699  double partialPterror = errors(3,3)*pow(TSOS.globalMomentum().x(),2) + errors(4,4)*pow(TSOS.globalMomentum().y(),2);
1700  pterror = sqrt(partialPterror)/TSOS.globalMomentum().perp();
1701  pxerror = sqrt(errors(3,3))/TSOS.globalMomentum().x();
1702  pyerror = sqrt(errors(4,4))/TSOS.globalMomentum().y();
1703  pzerror = sqrt(errors(5,5))/TSOS.globalMomentum().z();
1704  perror = sqrt(partialPterror+errors(5,5)*pow(TSOS.globalMomentum().z(),2))/TSOS.globalMomentum().mag();
1705  phierror = sqrt(TSOS.curvilinearError().matrix()(2,2));
1706  etaerror = sqrt(TSOS.curvilinearError().matrix()(1,1))*fabs(sin(TSOS.globalMomentum().theta()));
1707 
1708  }
1709 
1710  std::map<std::string, TkParameterMEs>::iterator iPos = TkParameterMEMap.find(sname);
1711  if (iPos != TkParameterMEMap.end()) {
1712 
1713  TkParameterMEs tkmes = iPos->second;
1714 
1715  // momentum
1716  tkmes.TrackP->Fill(p);
1717  if (doTrackPxPyPlots_) {
1718  tkmes.TrackPx->Fill(px);
1719  tkmes.TrackPy->Fill(py);
1720  }
1721  tkmes.TrackPz->Fill(pz);
1722  tkmes.TrackPt->Fill(pt);
1723 
1724  // angles
1725  tkmes.TrackPhi->Fill(phi);
1726  tkmes.TrackEta->Fill(eta);
1727  tkmes.TrackEtaPhi->Fill(eta,phi);
1728  tkmes.TrackEtaPhiInner->Fill(etaIn,phiIn);
1729  tkmes.TrackEtaPhiOuter->Fill(etaOut,phiOut);
1730 
1731  if (doThetaPlots_) {
1732  tkmes.TrackTheta->Fill(theta);
1733  }
1734  tkmes.TrackQ->Fill(q);
1735 
1736  // errors
1737  tkmes.TrackPtErr->Fill(pterror);
1738  tkmes.TrackPtErrVsEta->Fill(eta,pterror);
1739  if (doTrackPxPyPlots_) {
1740  tkmes.TrackPxErr->Fill(pxerror);
1741  tkmes.TrackPyErr->Fill(pyerror);
1742  }
1743  tkmes.TrackPzErr->Fill(pzerror);
1744  tkmes.TrackPErr->Fill(perror);
1745  tkmes.TrackPhiErr->Fill(phierror);
1746  tkmes.TrackEtaErr->Fill(etaerror);
1747 
1748  int nRecHits = track.hitPattern().numberOfHits(reco::HitPattern::TRACK_HITS);
1749  int nValidRecHits = track.numberOfValidHits();
1750  // rec hits
1751  tkmes.NumberOfRecHitsPerTrackVsPhi->Fill(phi, nRecHits);
1752  if (doThetaPlots_) {
1753  tkmes.NumberOfRecHitsPerTrackVsTheta->Fill(theta,nRecHits);
1754  }
1755  tkmes.NumberOfRecHitsPerTrackVsEta->Fill(eta, nRecHits);
1756 
1757  tkmes.NumberOfValidRecHitsPerTrackVsPhi->Fill(phi, nValidRecHits);
1758  tkmes.NumberOfValidRecHitsPerTrackVsEta->Fill(eta, nValidRecHits);
1759  tkmes.NumberOfValidRecHitsPerTrackVsPt ->Fill(pt, nValidRecHits);
1760 
1761  int nLayers = track.hitPattern().trackerLayersWithMeasurement();
1762  // rec layers
1763  tkmes.NumberOfLayersPerTrackVsPhi->Fill(phi, nLayers);
1764  if (doThetaPlots_) {
1765  tkmes.NumberOfLayersPerTrackVsTheta->Fill(theta, nLayers);
1766  }
1767  tkmes.NumberOfLayersPerTrackVsEta->Fill(eta, nLayers);
1768 
1769  double chi2prob = TMath::Prob(track.chi2(),(int)track.ndof());
1770  double chi2oNDF = track.normalizedChi2();
1771 
1772  tkmes.Chi2oNDFVsEta->Fill(eta, chi2oNDF);
1773  tkmes.Chi2oNDFVsPt->Fill(pt, chi2oNDF);
1774  tkmes.Chi2oNDFVsNHits->Fill(nRecHits, chi2oNDF);
1775 
1776  if(doAllPlots_) {
1777 
1778  // general properties
1779  if (doThetaPlots_) {
1780  tkmes.Chi2oNDFVsTheta->Fill(theta, chi2oNDF);
1781  }
1782  tkmes.Chi2oNDFVsPhi->Fill(phi, chi2oNDF);
1783  tkmes.Chi2ProbVsPhi->Fill(phi, chi2prob);
1784  tkmes.Chi2ProbVsEta->Fill(eta, chi2prob);
1785  }
1786 
1787  }
1788 
1789 }
1790 
1791 
1793 {
1794 
1795  // parameters from the configuration
1796  std::string QualName = conf_.getParameter<std::string>("Quality");
1798 
1799  // use the AlgoName and Quality Name
1800  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
1801 
1802  int PhiBin = conf_.getParameter<int>( "PhiBin");
1803  double PhiMin = conf_.getParameter<double>("PhiMin");
1804  double PhiMax = conf_.getParameter<double>("PhiMax");
1805 
1806  int EtaBin = conf_.getParameter<int>( "EtaBin");
1807  double EtaMin = conf_.getParameter<double>("EtaMin");
1808  double EtaMax = conf_.getParameter<double>("EtaMax");
1809 
1810  // book hit property histograms
1811  // ---------------------------------------------------------------------------------//
1812  ibooker.setCurrentFolder(TopFolder_+"/HitProperties");
1813 
1814 
1815 
1816  std::vector<std::string> subdetectors = conf_.getParameter<std::vector<std::string> >("subdetectors");
1817  int detBin = conf_.getParameter<int>("subdetectorBin");
1818 
1819  for ( auto det : subdetectors ) {
1820 
1821  // hits properties
1822  ibooker.setCurrentFolder(TopFolder_+"/HitProperties/"+det);
1823 
1824  TkRecHitsPerSubDetMEs recHitsPerSubDet_mes;
1825 
1826  recHitsPerSubDet_mes.detectorTag = det;
1827  int detID = -1;
1828  if ( det == "TIB" ) detID = StripSubdetector::TIB;
1829  if ( det == "TOB" ) detID = StripSubdetector::TOB;
1830  if ( det == "TID" ) detID = StripSubdetector::TID;
1831  if ( det == "TEC" ) detID = StripSubdetector::TEC;
1832  if ( det == "PixBarrel" ) detID = PixelSubdetector::PixelBarrel;
1833  if ( det == "PixEndcap" ) detID = PixelSubdetector::PixelEndcap;
1834  recHitsPerSubDet_mes.detectorId = detID;
1835 
1836  histname = "NumberOfRecHitsPerTrack_" + det + "_" + CategoryName;
1837  recHitsPerSubDet_mes.NumberOfRecHitsPerTrack = ibooker.book1D(histname, histname, detBin, -0.5, double(detBin)-0.5);
1838  recHitsPerSubDet_mes.NumberOfRecHitsPerTrack->setAxisTitle("Number of " + det + " valid RecHits in each Track",1);
1839  recHitsPerSubDet_mes.NumberOfRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
1840 
1841  histname = "NumberOfRecHitsPerTrackVsPhi_" + det + "_" + CategoryName;
1842  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, detBin, -0.5, double(detBin)-0.5,"");
1843  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Track #phi",1);
1844  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Number of " + det + " valid RecHits in each Track",2);
1845 
1846  histname = "NumberOfRecHitsPerTrackVsEta_" + det + "_" + CategoryName;
1847  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, detBin, -0.5, double(detBin)-0.5,"");
1848  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Track #eta",1);
1849  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Number of " + det + " valid RecHits in each Track",2);
1850 
1851  histname = "NumberOfLayersPerTrack_" + det + "_" + CategoryName;
1852  recHitsPerSubDet_mes.NumberOfLayersPerTrack = ibooker.book1D(histname, histname, detBin, -0.5, double(detBin)-0.5);
1853  recHitsPerSubDet_mes.NumberOfLayersPerTrack->setAxisTitle("Number of " + det + " valid Layers in each Track",1);
1854  recHitsPerSubDet_mes.NumberOfLayersPerTrack->setAxisTitle("Number of Tracks", 2);
1855 
1856  histname = "NumberOfLayersPerTrackVsPhi_" + det + "_" + CategoryName;
1857  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, detBin, -0.5, double(detBin)-0.5,"");
1858  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Track #phi",1);
1859  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Number of " + det + " valid Layers in each Track",2);
1860 
1861  histname = "NumberOfLayersPerTrackVsEta_" + det + "_" + CategoryName;
1862  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, detBin, -0.5, double(detBin)-0.5,"");
1863  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsEta->setAxisTitle("Track #eta",1);
1864  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsEta->setAxisTitle("Number of " + det + " valid Layers in each Track",2);
1865 
1866  TkRecHitsPerSubDetMEMap.insert(std::pair<std::string,TkRecHitsPerSubDetMEs>(det,recHitsPerSubDet_mes));
1867 
1868 
1869  }
1870 
1871 
1872 }
1873 
1874 
1876 {
1877 
1878  double phi = track.phi();
1879  double eta = track.eta();
1880 
1881  for ( std::map<std::string,TkRecHitsPerSubDetMEs>::iterator it = TkRecHitsPerSubDetMEMap.begin();
1882  it != TkRecHitsPerSubDetMEMap.end(); it++ ) {
1883 
1884  int nValidLayers = 0;
1885  int nValidRecHits = 0;
1886  int substr = it->second.detectorId;
1887  switch(substr) {
1888  case StripSubdetector::TIB :
1889  nValidLayers = track.hitPattern().stripTIBLayersWithMeasurement(); // case 0: strip TIB
1890  nValidRecHits = track.hitPattern().numberOfValidStripTIBHits(); // case 0: strip TIB
1891  break;
1892  case StripSubdetector::TID :
1893  nValidLayers = track.hitPattern().stripTIDLayersWithMeasurement(); // case 0: strip TID
1894  nValidRecHits = track.hitPattern().numberOfValidStripTIDHits(); // case 0: strip TID
1895  break;
1896  case StripSubdetector::TOB :
1897  nValidLayers = track.hitPattern().stripTOBLayersWithMeasurement(); // case 0: strip TOB
1898  nValidRecHits = track.hitPattern().numberOfValidStripTOBHits(); // case 0: strip TOB
1899  break;
1900  case StripSubdetector::TEC :
1901  nValidLayers = track.hitPattern().stripTECLayersWithMeasurement(); // case 0: strip TEC
1902  nValidRecHits = track.hitPattern().numberOfValidStripTECHits(); // case 0: strip TEC
1903  break;
1905  nValidLayers = track.hitPattern().pixelBarrelLayersWithMeasurement(); // case 0: pixel PXB
1906  nValidRecHits = track.hitPattern().numberOfValidPixelBarrelHits(); // case 0: pixel PXB
1907  break;
1909  nValidLayers = track.hitPattern().pixelEndcapLayersWithMeasurement(); // case 0: pixel PXF
1910  nValidRecHits = track.hitPattern().numberOfValidPixelEndcapHits(); // case 0: pixel PXF
1911  break;
1912  default :
1913  break;
1914  }
1915 
1916  //Fill Layers and RecHits
1917  it->second.NumberOfRecHitsPerTrack -> Fill(nValidRecHits);
1918  it->second.NumberOfRecHitsPerTrackVsPhi -> Fill(phi, nValidRecHits);
1919  it->second.NumberOfRecHitsPerTrackVsEta -> Fill(eta, nValidRecHits);
1920 
1921  it->second.NumberOfLayersPerTrack -> Fill(nValidLayers);
1922  it->second.NumberOfLayersPerTrackVsPhi -> Fill(phi, nValidLayers);
1923  it->second.NumberOfLayersPerTrackVsEta -> Fill(eta, nValidLayers);
1924  }
1925 
1926 }
1927 //
1928 // -- Set Lumi Flag
1929 //
1931 
1932  TkParameterMEs tkmes;
1935 }
1936 //
1937 // -- Apply SoftReset
1938 //
1940  TkParameterMEs tkmes;
1941  dqmStore_->softReset(Chi2oNDF);
1942  dqmStore_->softReset(NumberOfRecHitsPerTrack);
1943 }
1944 //
1945 // -- Apply Reset
1946 //
1948  TkParameterMEs tkmes;
1951 }
1952 //
1953 // -- Remove SoftReset
1954 //
1956  TkParameterMEs tkmes;
1957  dqmStore_->disableSoftReset(Chi2oNDF);
1959 }
1960 
1961 
#define LogDebug(id)
MonitorElement * NumberOfRecHitsPerTrackVsPhi
MonitorElement * stoppingSourceVSphi
MonitorElement * NumberOfValidRecHitsPerTrackVsPhi
MonitorElement * Chi2ProbVsPhi
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
MonitorElement * NumberOfLayersPerTrackVsPhi
int stripTOBLayersWithMeasurement() const
Definition: HitPattern.cc:604
T getParameter(std::string const &) const
dictionary missing
Definition: combine.py:4
MonitorElement * DistanceOfClosestApproachToPVVsPhi
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:676
int i
Definition: DBlmapReader.cc:9
MonitorElement * NumberOfRecHitVsPhiVsEtaPerTrack
bool doTrackerSpecific_
Definition: TrackAnalyzer.h:84
MonitorElement * ValidFractionVsPhiVsEtaPerTrack
double d0Error() const
error on d0
Definition: TrackBase.h:797
MonitorElement * dNhitdPt_HighPurity
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
void fillHistosForTrackerSpecific(const reco::Track &track)
const_iterator end(bool update=false) const
MonitorElement * NumberOfRecHitsPerTrackVsEta
std::unordered_map< Key, MonitorElement *, KeyHasher > hits_valid_
void bookHistosForLScertification(DQMStore::IBooker &ibooker)
MonitorElement * stoppingSourceVSeta
T perp() const
Definition: PV3DBase.h:72
double validFraction() const
fraction of valid hits on the track
Definition: TrackBase.h:827
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:592
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
std::unordered_map< Key, MonitorElement *, KeyHasher > hits_bad_
MonitorElement * NumberOfValidRecHitsPerTrack
int stripTIBLayersWithMeasurement() const
Definition: HitPattern.cc:582
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:556
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
double zError() const
error on z
Definition: Vertex.h:123
MonitorElement * Chi2oNDF_lumiFlag
double theta() const
polar angle
Definition: TrackBase.h:574
double dxyError() const
error on dxy
Definition: TrackBase.h:791
MonitorElement * xPointOfClosestApproachToPV
const CurvilinearTrajectoryError & curvilinearError() const
MonitorElement * sip3dToPV
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:50
MonitorElement * NumberOfLostRecHitsPerTrack
uint8_t stopReason() const
Definition: TrackBase.h:399
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
edm::ParameterSet conf_
Definition: TrackAnalyzer.h:82
const CartesianTrajectoryError cartesianError() const
Geom::Theta< T > theta() const
bool doGeneralPropertiesPlots_
Definition: TrackAnalyzer.h:89
T y() const
Definition: PV3DBase.h:63
double etaError() const
error on eta
Definition: TrackBase.h:779
MonitorElement * Chi2oNDFVsPhi
int bunchCrossing() const
Definition: EventBase.h:64
MonitorElement * Chi2ProbVsPhi
MonitorElement * NumberOfMORecHitsPerTrackVsPt
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)
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:71
MonitorElement * DistanceOfClosestApproachVsPhi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:640
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:821
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
bool doEffFromHitPatternVsBX_
MonitorElement * sipDzToBS
std::map< std::string, TkParameterMEs > TkParameterMEMap
MonitorElement * NumberOfLayersPerTrack[4]
MonitorElement * NhitVsPhi_HighPurity
MonitorElement * NumberOfRecHitsPerTrackVsTheta
data_type const * const_iterator
Definition: DetSetNew.h:30
MonitorElement * algorithm
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:622
static const std::string StopReasonName[]
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:499
bool doHitPropertiesPlots_
Definition: TrackAnalyzer.h:91
MonitorElement * DistanceOfClosestApproach
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:65
bool doRecHitVsPhiVsEtaPerTrack_
Definition: TrackAnalyzer.h:92
MonitorElement * NumberOfLayersPerTrackVsTheta
bool doRecHitVsPtVsEtaPerTrack_
Definition: TrackAnalyzer.h:93
MonitorElement * NumberOfRecHitsPerTrack_lumiFlag
std::map< std::string, TkRecHitsPerSubDetMEs > TkRecHitsPerSubDetMEMap
int trackerLayersWithMeasurement() const
Definition: HitPattern.cc:518
const Point & position() const
position
Definition: Vertex.h:109
MonitorElement * NumberOfValidRecHitVsPhiVsEtaPerTrack
int pixelEndcapLayersWithMeasurement() const
Definition: HitPattern.cc:570
int numberOfValidStripTOBHits() const
Definition: HitPattern.h:868
bool doMeasurementStatePlots_
Definition: TrackAnalyzer.h:90
TrajectoryStateOnSurface innermostMeasurementState() const
MonitorElement * NumberOfRecHitsPerTrack
static double XSEC_PIXEL_CLUSTER
Definition: GetLumi.h:41
MonitorElement * Ptdist_HighPurity
void setLumi(const edm::Event &, const edm::EventSetup &iSetup)
void Fill(long long x)
int numberOfLostTrackerHits(HitCategory category) const
Definition: HitPattern.h:907
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:55
MonitorElement * NumberOfLayersVsPhiVsEtaPerTrack[4]
TrackAlgorithm algo() const
Definition: TrackBase.h:492
void disableSoftReset(MonitorElement *me)
Definition: DQMStore.cc:3422
MonitorElement * TESTDistanceOfClosestApproachToBSVsPhi
void fillHistosForEfficiencyFromHitPatter(const reco::Track &track, const std::string suffix, const float monitoring)
static const unsigned int lastBunchCrossing
Definition: GetLumi.h:48
MonitorElement * NumberOfValidRecHitsPerTrackVsEta
std::unordered_map< Key, MonitorElement *, KeyHasher > hits_total_
MonitorElement * Chi2oNDFVsEta
MonitorElement * TransDCASig
int iEvent
Definition: GenABIO.cc:230
MonitorElement * NumberOfMIRecHitVsPhiVsEtaPerTrack
MonitorElement * NumberOfRecHitsPerTrackVsPhi
MonitorElement * xPointOfClosestApproachVsZ0wrt000
T mag() const
Definition: PV3DBase.h:67
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:646
int numberOfValidStripLayersWithMonoAndStereo(uint16_t stripdet, uint16_t layer) const
Definition: HitPattern.cc:341
std::string qualityString_
int trackerLayersTotallyOffOrBad() const
Definition: HitPattern.h:1061
int numberOfValidPixelBarrelHits() const
Definition: HitPattern.h:843
MonitorElement * oriAlgo
bool doDCAwrt000Plots_
bool doEffFromHitPatternVsPU_
MonitorElement * NumberOfRecHitsPerTrackVsTheta
MonitorElement * NumberOfLostRecHitVsPhiVsEtaPerTrack
MonitorElement * NumberOfMIRecHitsPerTrackVsPt
MonitorElement * xPointOfClosestApproach
MonitorElement * Chi2oNDFVsTheta
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:544
MonitorElement * NumberOfMIRecHitsPerTrack
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:163
def cat
Definition: eostools.py:400
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:550
int stripTIDLayersWithMeasurement() const
Definition: HitPattern.cc:593
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
MonitorElement * NumberOfValidRecHitsPerTrackVsEta
T sqrt(T t)
Definition: SSEVec.h:18
MonitorElement * NumberOfRecHitsPerTrackVsPhi
double pt() const
track transverse momentum
Definition: TrackBase.h:616
T z() const
Definition: PV3DBase.h:64
MonitorElement * dNdPt_HighPurity
void setBX(const edm::Event &)
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:758
std::string TopFolder_
Definition: TrackAnalyzer.h:74
MonitorElement * xPointOfClosestApproachVsZ0wrtBS
double phiError() const
error on phi
Definition: TrackBase.h:785
MonitorElement * NumberOfValidRecHitsPerTrackVsPhi
MonitorElement * dNdPhi_HighPurity
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int numberOfValidStripTIDHits() const
Definition: HitPattern.h:863
TH1 * getTH1(void) const
MonitorElement * yPointOfClosestApproachToPV
const double EtaMin[kNumberCalorimeter]
MonitorElement * NumberOfRecHitsPerTrackVsEta
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:815
int numberOfValidStripTECHits() const
Definition: HitPattern.h:873
static double CM2_TO_NANOBARN
Definition: GetLumi.h:47
MonitorElement * NumberOfLostRecHitsPerTrackVsPt
MonitorElement * sip2dToPV
void softReset(MonitorElement *me)
Definition: DQMStore.cc:3414
T min(T a, T b)
Definition: MathUtil.h:58
MonitorElement * Chi2oNDFVsTheta
TrajectoryStateOnSurface outermostMeasurementState() const
std::unordered_map< Key, MonitorElement *, KeyHasher > hits_inactive_
MonitorElement * sipDzToPV
MonitorElement * sipDxyToBS
bool isValid() const
Definition: HandleBase.h:75
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
MonitorElement * NumberOfValidRecHitsPerTrackVsPt
void bookHistosForHitProperties(DQMStore::IBooker &ibooker)
MonitorElement * DistanceOfClosestApproachVsEta
MonitorElement * zPointOfClosestApproachVsPhi
const AlgebraicSymMatrix66 & matrix() const
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
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:604
MonitorElement * NumberOfLayersPerTrackVsEta
double dzError() const
error on dz
Definition: TrackBase.h:809
MonitorElement * dNdEta_HighPurity
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:664
void bookHistosForTrackerSpecific(DQMStore::IBooker &ibooker)
MonitorElement * stoppingSource
void fillHistosForState(const edm::EventSetup &iSetup, const reco::Track &track, std::string sname)
Definition: DetId.h:18
TrackAlgorithm originalAlgo() const
Definition: TrackBase.h:496
TrajectoryStateOnSurface TSOS
Definition: TestHits.cc:19
virtual ~TrackAnalyzer()
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:125
double xError() const
error on x
Definition: Vertex.h:119
MonitorElement * NumberOfLayersPerTrackVsEta
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: TrackAnalyzer.h:76
MonitorElement * sipDxyToPV
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::Track &track)
bool doEffFromHitPatternVsLUMI_
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:445
MonitorElement * xPointOfClosestApproachVsZ0wrtPV
MonitorElement * yPointOfClosestApproachVsZ0wrtBS
MonitorElement * NumberOfMIRecHitVsPtVsEtaPerTrack
const T & get() const
Definition: EventSetup.h:56
std::unordered_map< Key, MonitorElement *, KeyHasher > hits_missing_
int minNumberOfPixelsPerCluster_
int pixelBarrelLayersWithMeasurement() const
Definition: HitPattern.cc:558
T const * product() const
Definition: ESHandle.h:86
MonitorElement * DistanceOfClosestApproachVsTheta
void bookHistosForBeamSpot(DQMStore::IBooker &ibooker)
static double rXSEC_PIXEL_CLUSTER
Definition: GetLumi.h:45
MonitorElement * Chi2ProbVsEta
int numberOfValidStripTIBHits() const
Definition: HitPattern.h:858
MonitorElement * NumberOfMORecHitVsPtVsEtaPerTrack
static const std::string algoNames[]
Definition: TrackBase.h:148
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:505
unsigned int layer(const DetId &id) const
int numberOfValidPixelEndcapHits() const
Definition: HitPattern.h:848
MonitorElement * zPointOfClosestApproachToPV
T eta() const
Definition: PV3DBase.h:76
int trackerLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:535
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClustersToken_
Definition: TrackAnalyzer.h:78
MonitorElement * DistanceOfClosestApproachToPV
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:658
MonitorElement * NumberOfValidRecHitsPerTrackVsPt
const AlgebraicSymMatrix55 & matrix() const
bool doTrackPxPyPlots_
GlobalVector globalMomentum() const
MonitorElement * DistanceOfClosestApproachToBSVsPhi
bool doLayersVsPhiVsEtaPerTrack_
Definition: TrackAnalyzer.h:95
unsigned int bx_
MonitorElement * ValidFractionPerTrack
MonitorElement * NhitVsEta_HighPurity
void doSoftReset(DQMStore *dqmStore_)
int getNbinsX(void) const
get # of bins in X-axis
int stripTECLayersWithMeasurement() const
Definition: HitPattern.cc:615
MonitorElement * yPointOfClosestApproachVsZ0wrt000
unsigned int good_vertices_
MonitorElement * TrackPtErrVsEta
MonitorElement * TESTDistanceOfClosestApproachToBS
std::vector< LumiScalers > LumiScalersCollection
Definition: LumiScalers.h:160
virtual void initHisto(DQMStore::IBooker &ibooker, const edm::EventSetup &)
MonitorElement * NumberOfRecHitsPerTrackVsEta
int charge() const
track electric charge
Definition: TrackBase.h:562
const Point & position() const
position
Definition: BeamSpot.h:62
TrajectoryStateOnSurface impactPointState() const
void bookHistosForState(std::string sname, DQMStore::IBooker &ibooker)
MonitorElement * yPointOfClosestApproach
void Reset(std::vector< TH2F > &depth)
dbl *** dir
Definition: mlp_gen.cc:35
float minPixelClusterCharge_
MonitorElement * Chi2oNDFVsNHits
MonitorElement * Chi2Prob
edm::EDGetTokenT< LumiScalersCollection > lumiscalersToken_
Definition: TrackAnalyzer.h:79
MonitorElement * TrackEtaPhiOuter
Definition: Chi2.h:17
size_type size() const
Definition: DetSetNew.h:87
MonitorElement * yPointOfClosestApproachVsZ0wrtPV
void setNumberOfGoodVertices(const edm::Event &)
void bookHistosForEfficiencyFromHitPatter(DQMStore::IBooker &ibooker, const edm::EventSetup &iSetup, const std::string suffix)
MonitorElement * AbsDistanceOfClosestApproachToBS
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:586
MonitorElement * zPointOfClosestApproach
TrackAnalyzer(const edm::ParameterSet &)
T x() const
Definition: PV3DBase.h:62
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
float lumi_factor_per_bx_
Definition: TrackAnalyzer.h:80
MonitorElement * Chi2ProbVsEta
MonitorElement * NumberOfLostRecHitVsPtVsEtaPerTrack
static double FREQ_ORBIT
Definition: GetLumi.h:32
MonitorElement * TrackEtaPhiInner
MonitorElement * DistanceOfClosestApproachToBS
std::string monName[monQuantity::END]
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
MonitorElement * Chi2oNDF
double yError() const
error on y
Definition: Vertex.h:121
const_iterator begin(bool update=false) const
std::string histname
MonitorElement * Chi2oNDFVsEta
const int NBINS
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
MonitorElement * NumberOfValidRecHitVsPtVsEtaPerTrack
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:652
void undoSoftReset(DQMStore *dqmStore_)
int numberOfHits(HitCategory category) const
Definition: HitPattern.h:807
MonitorElement * NumberOfMORecHitVsPhiVsEtaPerTrack
static double SECONDS_PER_LS
Definition: GetLumi.h:33
MonitorElement * NumberOfMORecHitsPerTrack
MonitorElement * NumberOfLayersPerTrackVsPhi
MonitorElement * LongDCASig
edm::EDGetTokenT< reco::VertexCollection > pvToken_
Definition: TrackAnalyzer.h:77
MonitorElement * Chi2oNDFVsPhi