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