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 
13 
18 #include <string>
19 #include "TMath.h"
20 
22  : conf_( iConfig )
23  , doTrackerSpecific_ ( conf_.getParameter<bool>("doTrackerSpecific") )
24  , doAllPlots_ ( conf_.getParameter<bool>("doAllPlots") )
25  , doBSPlots_ ( conf_.getParameter<bool>("doBeamSpotPlots") )
26  , doPVPlots_ ( conf_.getParameter<bool>("doPrimaryVertexPlots") )
27  , doDCAPlots_ ( conf_.getParameter<bool>("doDCAPlots") )
28  , doGeneralPropertiesPlots_ ( conf_.getParameter<bool>("doGeneralPropertiesPlots") )
29  , doMeasurementStatePlots_ ( conf_.getParameter<bool>("doMeasurementStatePlots") )
30  , doHitPropertiesPlots_ ( conf_.getParameter<bool>("doHitPropertiesPlots") )
31  , doRecHitVsPhiVsEtaPerTrack_ ( conf_.getParameter<bool>("doRecHitVsPhiVsEtaPerTrack") )
32  , doLayersVsPhiVsEtaPerTrack_ ( conf_.getParameter<bool>("doLayersVsPhiVsEtaPerTrack") )
33  , doRecHitsPerTrackProfile_ ( conf_.getParameter<bool>("doRecHitsPerTrackProfile") )
34  , doThetaPlots_ ( conf_.getParameter<bool>("doThetaPlots") )
35  , doTrackPxPyPlots_ ( conf_.getParameter<bool>("doTrackPxPyPlots") )
36  , doDCAwrtPVPlots_ ( conf_.getParameter<bool>("doDCAwrtPVPlots") )
37  , doDCAwrt000Plots_ ( conf_.getParameter<bool>("doDCAwrt000Plots") )
38  , doLumiAnalysis_ ( conf_.getParameter<bool>("doLumiAnalysis") )
39  , doTestPlots_ ( conf_.getParameter<bool>("doTestPlots") )
40 {
41  initHistos();
42  TopFolder_ = conf_.getParameter<std::string>("FolderName");
43 
44 }
45 
47  : TrackAnalyzer(iConfig)
48 {
49  edm::InputTag bsSrc = conf_.getParameter<edm::InputTag>("beamSpot");
50  edm::InputTag primaryVertexInputTag = conf_.getParameter<edm::InputTag>("primaryVertex");
52  pvToken_ = iC.consumes<reco::VertexCollection>(primaryVertexInputTag);
53 }
54 
56 {
57  Chi2 = NULL;
58  Chi2Prob = NULL;
61  Chi2oNDF = NULL;
68 
72 
76 
78 
81 
84 
99  algorithm = NULL;
100  // TESTING
103 
104 // by Mia in order to deal w/ LS transitions
107 
108 }
109 
111 {
112 }
113 
115 {
116 
118  bookHistosForBeamSpot(ibooker);
120 
121  // book tracker specific related histograms
122  // ---------------------------------------------------------------------------------//
124 
125  // book state related histograms
126  // ---------------------------------------------------------------------------------//
128 
129  std::string StateName = conf_.getParameter<std::string>("MeasurementState");
130 
131  if (StateName == "All") {
132  bookHistosForState("OuterSurface", ibooker);
133  bookHistosForState("InnerSurface", ibooker);
134  bookHistosForState("ImpactPoint" , ibooker);
135  } else if (
136  StateName != "OuterSurface" &&
137  StateName != "InnerSurface" &&
138  StateName != "ImpactPoint" &&
139  StateName != "default"
140  ) {
141  bookHistosForState("default", ibooker);
142 
143  } else {
144  bookHistosForState(StateName, ibooker);
145  }
146 
147  }
148 }
149 
151 
152  // parameters from the configuration
153  std::string QualName = conf_.getParameter<std::string>("Quality");
154  std::string AlgoName = conf_.getParameter<std::string>("AlgoName");
155  std::string MEBSFolderName = conf_.getParameter<std::string>("BSFolderName");
156 
157  // use the AlgoName and Quality Name
158  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
159 
160  // get binning from the configuration
161  int TKHitBin = conf_.getParameter<int>( "RecHitBin");
162  double TKHitMin = conf_.getParameter<double>("RecHitMin");
163  double TKHitMax = conf_.getParameter<double>("RecHitMax");
164 
165  int TKLostBin = conf_.getParameter<int>( "RecLostBin");
166  double TKLostMin = conf_.getParameter<double>("RecLostMin");
167  double TKLostMax = conf_.getParameter<double>("RecLostMax");
168 
169  int TKLayBin = conf_.getParameter<int>( "RecLayBin");
170  double TKLayMin = conf_.getParameter<double>("RecLayMin");
171  double TKLayMax = conf_.getParameter<double>("RecLayMax");
172 
173  int PhiBin = conf_.getParameter<int>( "PhiBin");
174  double PhiMin = conf_.getParameter<double>("PhiMin");
175  double PhiMax = conf_.getParameter<double>("PhiMax");
176 
177  int EtaBin = conf_.getParameter<int>( "EtaBin");
178  double EtaMin = conf_.getParameter<double>("EtaMin");
179  double EtaMax = conf_.getParameter<double>("EtaMax");
180 
181  int VXBin = conf_.getParameter<int>( "VXBin");
182  double VXMin = conf_.getParameter<double>("VXMin");
183  double VXMax = conf_.getParameter<double>("VXMax");
184 
185  int VYBin = conf_.getParameter<int>( "VYBin");
186  double VYMin = conf_.getParameter<double>("VYMin");
187  double VYMax = conf_.getParameter<double>("VYMax");
188 
189  int VZBin = conf_.getParameter<int>( "VZBin");
190  double VZMin = conf_.getParameter<double>("VZMin");
191  double VZMax = conf_.getParameter<double>("VZMax");
192 
193  ibooker.setCurrentFolder(TopFolder_);
194 
195  // book the Hit Property histograms
196  // ---------------------------------------------------------------------------------//
197 
198  TkParameterMEs tkmes;
200 
201  ibooker.setCurrentFolder(TopFolder_+"/HitProperties");
202 
203  histname = "NumberOfRecHitsPerTrack_";
204  NumberOfRecHitsPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKHitBin, TKHitMin, TKHitMax);
205  NumberOfRecHitsPerTrack->setAxisTitle("Number of all RecHits of each Track");
206  NumberOfRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
207 
208  histname = "NumberOfValidRecHitsPerTrack_";
209  NumberOfValidRecHitsPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKHitBin, TKHitMin, TKHitMax);
210  NumberOfValidRecHitsPerTrack->setAxisTitle("Number of valid RecHits for each Track");
211  NumberOfValidRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
212 
213  histname = "NumberOfLostRecHitsPerTrack_";
214  NumberOfLostRecHitsPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKLostBin, TKLostMin, TKLostMax);
215  NumberOfLostRecHitsPerTrack->setAxisTitle("Number of lost RecHits for each Track");
216  NumberOfLostRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
217 
218  histname = "NumberOfLayersPerTrack_";
219  NumberOfLayersPerTrack = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKLayBin, TKLayMin, TKLayMax);
220  NumberOfLayersPerTrack->setAxisTitle("Number of Layers of each Track", 1);
221  NumberOfLayersPerTrack->setAxisTitle("Number of Tracks", 2);
222 
223 
225 
226  histname = "NumberOfRecHitVsPhiVsEtaPerTrack_";
227  NumberOfRecHitVsPhiVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
228  EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax, 0, 40., "");
231  }
232 
234 
235  histname = "NumberOfLayersVsPhiVsEtaPerTrack_";
236  NumberOfLayersVsPhiVsEtaPerTrack = ibooker.bookProfile2D(histname+CategoryName, histname+CategoryName,
237  EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax, 0, 40., "");
240  }
241  }
242 
243  // book the General Property histograms
244  // ---------------------------------------------------------------------------------//
245 
247 
248  int Chi2Bin = conf_.getParameter<int>( "Chi2Bin");
249  double Chi2Min = conf_.getParameter<double>("Chi2Min");
250  double Chi2Max = conf_.getParameter<double>("Chi2Max");
251 
252  int Chi2NDFBin = conf_.getParameter<int>( "Chi2NDFBin");
253  double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
254  double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
255 
256  int Chi2ProbBin = conf_.getParameter<int>( "Chi2ProbBin");
257  double Chi2ProbMin = conf_.getParameter<double>("Chi2ProbMin");
258  double Chi2ProbMax = conf_.getParameter<double>("Chi2ProbMax");
259 
260 
261  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
262 
263  histname = "Chi2_";
264  Chi2 = ibooker.book1D(histname+CategoryName, histname+CategoryName, Chi2Bin, Chi2Min, Chi2Max);
265  Chi2->setAxisTitle("Track #chi^{2}" ,1);
266  Chi2->setAxisTitle("Number of Tracks",2);
267 
268  histname = "Chi2Prob_";
269  Chi2Prob = ibooker.book1D(histname+CategoryName, histname+CategoryName, Chi2ProbBin, Chi2ProbMin, Chi2ProbMax);
270  Chi2Prob->setAxisTitle("Track #chi^{2} probability",1);
271  Chi2Prob->setAxisTitle("Number of Tracks" ,2);
272 
273  histname = "Chi2oNDF_";
274  Chi2oNDF = ibooker.book1D(histname+CategoryName, histname+CategoryName, Chi2NDFBin, Chi2NDFMin, Chi2NDFMax);
275  Chi2oNDF->setAxisTitle("Track #chi^{2}/ndf",1);
276  Chi2oNDF->setAxisTitle("Number of Tracks" ,2);
277 
278  if (doDCAPlots_) {
279  histname = "xPointOfClosestApproach_";
280  xPointOfClosestApproach = ibooker.book1D(histname+CategoryName, histname+CategoryName, VXBin, VXMin, VXMax);
281  xPointOfClosestApproach->setAxisTitle("x component of Track PCA to beam line (cm)",1);
282  xPointOfClosestApproach->setAxisTitle("Number of Tracks",2);
283 
284  histname = "yPointOfClosestApproach_";
285  yPointOfClosestApproach = ibooker.book1D(histname+CategoryName, histname+CategoryName, VYBin, VYMin, VYMax);
286  yPointOfClosestApproach->setAxisTitle("y component of Track PCA to beam line (cm)",1);
287  yPointOfClosestApproach->setAxisTitle("Number of Tracks",2);
288 
289  histname = "zPointOfClosestApproach_";
290  zPointOfClosestApproach = ibooker.book1D(histname+CategoryName, histname+CategoryName, VZBin, VZMin, VZMax);
291  zPointOfClosestApproach->setAxisTitle("z component of Track PCA to beam line (cm)",1);
292  zPointOfClosestApproach->setAxisTitle("Number of Tracks",2);
293 
294  histname = "xPointOfClosestApproachToPV_";
295  xPointOfClosestApproachToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, VXBin, VXMin, VXMax);
296  xPointOfClosestApproachToPV->setAxisTitle("x component of Track PCA to pv (cm)",1);
297  xPointOfClosestApproachToPV->setAxisTitle("Number of Tracks",2);
298 
299  histname = "yPointOfClosestApproachToPV_";
300  yPointOfClosestApproachToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, VYBin, VYMin, VYMax);
301  yPointOfClosestApproachToPV->setAxisTitle("y component of Track PCA to pv line (cm)",1);
302  yPointOfClosestApproachToPV->setAxisTitle("Number of Tracks",2);
303 
304  histname = "zPointOfClosestApproachToPV_";
305  zPointOfClosestApproachToPV = ibooker.book1D(histname+CategoryName, histname+CategoryName, VZBin, VZMin, VZMax);
306  zPointOfClosestApproachToPV->setAxisTitle("z component of Track PCA to pv line (cm)",1);
307  zPointOfClosestApproachToPV->setAxisTitle("Number of Tracks",2);
308  }
309 
310  // See DataFormats/TrackReco/interface/TrackBase.h for track algorithm enum definition
311  // http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/DataFormats/TrackReco/interface/TrackBase.h?view=log
312  histname = "algorithm_";
313  algorithm = ibooker.book1D(histname+CategoryName, histname+CategoryName, 32, 0., 32.);
314  algorithm->setAxisTitle("Tracking algorithm",1);
315  algorithm->setAxisTitle("Number of Tracks",2);
316 
317  }
318 
319 }
320 
322 
323  // parameters from the configuration
324  std::string QualName = conf_.getParameter<std::string>("Quality");
325  std::string AlgoName = conf_.getParameter<std::string>("AlgoName");
326 
327  // use the AlgoName and Quality Name
328  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
329 
330 
331  // book LS analysis related histograms
332  // -----------------------------------
333  if ( doLumiAnalysis_ ) {
334 
335  // get binning from the configuration
336  int TKHitBin = conf_.getParameter<int>( "RecHitBin");
337  double TKHitMin = conf_.getParameter<double>("RecHitMin");
338  double TKHitMax = conf_.getParameter<double>("RecHitMax");
339 
340  int Chi2NDFBin = conf_.getParameter<int>( "Chi2NDFBin");
341  double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
342  double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
343 
344  // add by Mia in order to deal w/ LS transitions
345  ibooker.setCurrentFolder(TopFolder_+"/LSanalysis");
346 
347  histname = "NumberOfRecHitsPerTrack_lumiFlag_";
348  NumberOfRecHitsPerTrack_lumiFlag = ibooker.book1D(histname+CategoryName, histname+CategoryName, TKHitBin, TKHitMin, TKHitMax);
349  NumberOfRecHitsPerTrack_lumiFlag->setAxisTitle("Number of all RecHits of each Track");
350  NumberOfRecHitsPerTrack_lumiFlag->setAxisTitle("Number of Tracks", 2);
351 
352  histname = "Chi2oNDF_lumiFlag_";
353  Chi2oNDF_lumiFlag = ibooker.book1D(histname+CategoryName, histname+CategoryName, Chi2NDFBin, Chi2NDFMin, Chi2NDFMax);
354  Chi2oNDF_lumiFlag->setAxisTitle("Track #chi^{2}/ndf",1);
355  Chi2oNDF_lumiFlag->setAxisTitle("Number of Tracks" ,2);
356 
357  }
358 }
359 
361 
362  // parameters from the configuration
363  std::string QualName = conf_.getParameter<std::string>("Quality");
364  std::string AlgoName = conf_.getParameter<std::string>("AlgoName");
365 
366  // use the AlgoName and Quality Name
367  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
368 
369  // book the Beam Spot related histograms
370  // ---------------------------------------------------------------------------------//
371 
373 
374  int DxyBin = conf_.getParameter<int>( "DxyBin");
375  double DxyMin = conf_.getParameter<double>("DxyMin");
376  double DxyMax = conf_.getParameter<double>("DxyMax");
377 
378  int PhiBin = conf_.getParameter<int>( "PhiBin");
379  double PhiMin = conf_.getParameter<double>("PhiMin");
380  double PhiMax = conf_.getParameter<double>("PhiMax");
381 
382  int X0Bin = conf_.getParameter<int>( "X0Bin");
383  double X0Min = conf_.getParameter<double>("X0Min");
384  double X0Max = conf_.getParameter<double>("X0Max");
385 
386  int Y0Bin = conf_.getParameter<int>( "Y0Bin");
387  double Y0Min = conf_.getParameter<double>("Y0Min");
388  double Y0Max = conf_.getParameter<double>("Y0Max");
389 
390  int Z0Bin = conf_.getParameter<int>( "Z0Bin");
391  double Z0Min = conf_.getParameter<double>("Z0Min");
392  double Z0Max = conf_.getParameter<double>("Z0Max");
393 
394  int VZBinProf = conf_.getParameter<int>( "VZBinProf");
395  double VZMinProf = conf_.getParameter<double>("VZMinProf");
396  double VZMaxProf = conf_.getParameter<double>("VZMaxProf");
397 
398 
399  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
400 
401  histname = "DistanceOfClosestApproachToBS_";
402  DistanceOfClosestApproachToBS = ibooker.book1D(histname+CategoryName,histname+CategoryName,DxyBin,DxyMin,DxyMax);
403  DistanceOfClosestApproachToBS->setAxisTitle("Track d_{xy} wrt beam spot (cm)",1);
404  DistanceOfClosestApproachToBS->setAxisTitle("Number of Tracks",2);
405 
406  histname = "DistanceOfClosestApproachToBSVsPhi_";
407  DistanceOfClosestApproachToBSVsPhi = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,"");
408  DistanceOfClosestApproachToBSVsPhi->getTH1()->SetBit(TH1::kCanRebin);
410  DistanceOfClosestApproachToBSVsPhi->setAxisTitle("Track d_{xy} wrt beam spot (cm)",2);
411 
412  histname = "xPointOfClosestApproachVsZ0wrt000_";
413  xPointOfClosestApproachVsZ0wrt000 = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, X0Bin, X0Min, X0Max,"");
415  xPointOfClosestApproachVsZ0wrt000->setAxisTitle("x component of Track PCA to beam line (cm)",2);
416 
417  histname = "yPointOfClosestApproachVsZ0wrt000_";
418  yPointOfClosestApproachVsZ0wrt000 = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, Y0Bin, Y0Min, Y0Max,"");
420  yPointOfClosestApproachVsZ0wrt000->setAxisTitle("y component of Track PCA to beam line (cm)",2);
421 
422  histname = "xPointOfClosestApproachVsZ0wrtBS_";
423  xPointOfClosestApproachVsZ0wrtBS = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, X0Bin, X0Min, X0Max,"");
424  xPointOfClosestApproachVsZ0wrtBS->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)",1);
425  xPointOfClosestApproachVsZ0wrtBS->setAxisTitle("x component of Track PCA to BS (cm)",2);
426 
427  histname = "yPointOfClosestApproachVsZ0wrtBS_";
428  yPointOfClosestApproachVsZ0wrtBS = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, Y0Bin, Y0Min, Y0Max,"");
429  yPointOfClosestApproachVsZ0wrtBS->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)",1);
430  yPointOfClosestApproachVsZ0wrtBS->setAxisTitle("y component of Track PCA to BS (cm)",2);
431 
432  histname = "zPointOfClosestApproachVsPhi_";
433  zPointOfClosestApproachVsPhi = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PhiBin, PhiMin, PhiMax, VZBinProf, VZMinProf, VZMaxProf, "");
435  zPointOfClosestApproachVsPhi->setAxisTitle("y component of Track PCA to beam line (cm)",2);
436  }
437 
439 
440  int DxyBin = conf_.getParameter<int>( "DxyBin");
441  double DxyMin = conf_.getParameter<double>("DxyMin");
442  double DxyMax = conf_.getParameter<double>("DxyMax");
443 
444  int PhiBin = conf_.getParameter<int>( "PhiBin");
445  double PhiMin = conf_.getParameter<double>("PhiMin");
446  double PhiMax = conf_.getParameter<double>("PhiMax");
447 
448  int X0Bin = conf_.getParameter<int>( "X0Bin");
449  double X0Min = conf_.getParameter<double>("X0Min");
450  double X0Max = conf_.getParameter<double>("X0Max");
451 
452  int Y0Bin = conf_.getParameter<int>( "Y0Bin");
453  double Y0Min = conf_.getParameter<double>("Y0Min");
454  double Y0Max = conf_.getParameter<double>("Y0Max");
455 
456  int Z0Bin = conf_.getParameter<int>( "Z0Bin");
457  double Z0Min = conf_.getParameter<double>("Z0Min");
458  double Z0Max = conf_.getParameter<double>("Z0Max");
459 
460  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
461 
462  histname = "DistanceOfClosestApproachToPV_";
463  DistanceOfClosestApproachToPV = ibooker.book1D(histname+CategoryName,histname+CategoryName,DxyBin,DxyMin,DxyMax);
464  DistanceOfClosestApproachToPV->setAxisTitle("Track d_{xy} wrt beam spot (cm)",1);
465  DistanceOfClosestApproachToPV->setAxisTitle("Number of Tracks",2);
466 
467  histname = "DistanceOfClosestApproachToPVVsPhi_";
468  DistanceOfClosestApproachToPVVsPhi = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,"");
469  DistanceOfClosestApproachToPVVsPhi->getTH1()->SetBit(TH1::kCanRebin);
471  DistanceOfClosestApproachToPVVsPhi->setAxisTitle("Track d_{xy} wrt beam spot (cm)",2);
472 
473  histname = "xPointOfClosestApproachVsZ0wrtPV_";
474  xPointOfClosestApproachVsZ0wrtPV = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, X0Bin, X0Min, X0Max,"");
475  xPointOfClosestApproachVsZ0wrtPV->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)",1);
476  xPointOfClosestApproachVsZ0wrtPV->setAxisTitle("x component of Track PCA to PV (cm)",2);
477 
478  histname = "yPointOfClosestApproachVsZ0wrtPV_";
479  yPointOfClosestApproachVsZ0wrtPV = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, Z0Bin, Z0Min, Z0Max, Y0Bin, Y0Min, Y0Max,"");
480  yPointOfClosestApproachVsZ0wrtPV->setAxisTitle("d_{z} w.r.t. Beam Spot (cm)",1);
481  yPointOfClosestApproachVsZ0wrtPV->setAxisTitle("y component of Track PCA to PV (cm)",2);
482 
483  }
484 
485  if (doBSPlots_ || doAllPlots_) {
486  if (doTestPlots_) {
487 
488  int DxyBin = conf_.getParameter<int>( "DxyBin");
489  double DxyMin = conf_.getParameter<double>("DxyMin");
490  double DxyMax = conf_.getParameter<double>("DxyMax");
491 
492  int PhiBin = conf_.getParameter<int>( "PhiBin");
493  double PhiMin = conf_.getParameter<double>("PhiMin");
494  double PhiMax = conf_.getParameter<double>("PhiMax");
495 
496  histname = "TESTDistanceOfClosestApproachToBS_";
497  TESTDistanceOfClosestApproachToBS = ibooker.book1D(histname+CategoryName,histname+CategoryName,DxyBin,DxyMin,DxyMax);
498  TESTDistanceOfClosestApproachToBS->setAxisTitle("Track d_{xy} wrt beam spot (cm)",1);
499  TESTDistanceOfClosestApproachToBS->setAxisTitle("Number of Tracks",2);
500 
501  histname = "TESTDistanceOfClosestApproachToBSVsPhi_";
502  TESTDistanceOfClosestApproachToBSVsPhi = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,"");
503  TESTDistanceOfClosestApproachToBSVsPhi->getTH1()->SetBit(TH1::kCanRebin);
505  TESTDistanceOfClosestApproachToBSVsPhi->setAxisTitle("Track d_{xy} wrt beam spot (cm)",2);
506 
507  }
508 
509  }
510 
511  // book the Profile plots for DCA related histograms
512  // ---------------------------------------------------------------------------------//
513  if(doDCAPlots_ || doAllPlots_) {
514 
515  if (doDCAwrt000Plots_) {
516 
517  int EtaBin = conf_.getParameter<int>( "EtaBin");
518  double EtaMin = conf_.getParameter<double>("EtaMin");
519  double EtaMax = conf_.getParameter<double>("EtaMax");
520 
521  int PhiBin = conf_.getParameter<int>( "PhiBin");
522  double PhiMin = conf_.getParameter<double>("PhiMin");
523  double PhiMax = conf_.getParameter<double>("PhiMax");
524 
525  int DxyBin = conf_.getParameter<int>( "DxyBin");
526  double DxyMin = conf_.getParameter<double>("DxyMin");
527  double DxyMax = conf_.getParameter<double>("DxyMax");
528 
529  if (doThetaPlots_) {
530  int ThetaBin = conf_.getParameter<int>( "ThetaBin");
531  double ThetaMin = conf_.getParameter<double>("ThetaMin");
532  double ThetaMax = conf_.getParameter<double>("ThetaMax");
533 
534  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
535  histname = "DistanceOfClosestApproachVsTheta_";
536  DistanceOfClosestApproachVsTheta = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, ThetaBin, ThetaMin, ThetaMax, DxyMin,DxyMax,"");
538  DistanceOfClosestApproachVsTheta->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)",2);
539  }
540 
541  histname = "DistanceOfClosestApproachVsEta_";
542  DistanceOfClosestApproachVsEta = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, EtaBin, EtaMin, EtaMax, DxyMin, DxyMax,"");
544  DistanceOfClosestApproachVsEta->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)",2);
545  // temporary patch in order to put back those MEs in Muon Workspace
546 
547  histname = "DistanceOfClosestApproach_";
548  DistanceOfClosestApproach = ibooker.book1D(histname+CategoryName,histname+CategoryName,DxyBin,DxyMin,DxyMax);
549  DistanceOfClosestApproach->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)",1);
550  DistanceOfClosestApproach->setAxisTitle("Number of Tracks",2);
551 
552  histname = "DistanceOfClosestApproachVsPhi_";
553  DistanceOfClosestApproachVsPhi = ibooker.bookProfile(histname+CategoryName,histname+CategoryName, PhiBin, PhiMin, PhiMax, DxyMin,DxyMax,"");
554  DistanceOfClosestApproachVsPhi->getTH1()->SetBit(TH1::kCanRebin);
556  DistanceOfClosestApproachVsPhi->setAxisTitle("Track d_{xy} wrt (0,0,0) (cm)",2);
557  }
558  }
559 
560 }
561 
562 // -- Analyse
563 // ---------------------------------------------------------------------------------//
564 void TrackAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup, const reco::Track& track)
565 {
566  double phi = track.phi();
567  double eta = track.eta();
568 
569  int nRecHits = track.hitPattern().numberOfHits();
570  int nValidRecHits = track.numberOfValidHits();
571  int nLostRecHits = track.numberOfLostHits();
572 
573  double chi2 = track.chi2();
574  double chi2prob = TMath::Prob(track.chi2(),(int)track.ndof());
575  double chi2oNDF = track.normalizedChi2();
576 
578  // rec hits
579  NumberOfRecHitsPerTrack -> Fill(nRecHits);
580  NumberOfValidRecHitsPerTrack-> Fill(nValidRecHits);
581  NumberOfLostRecHitsPerTrack -> Fill(nLostRecHits);
582 
583  // 2D plots
585  NumberOfRecHitVsPhiVsEtaPerTrack->Fill(eta,phi,nRecHits);
586 
587  int nLayers = track.hitPattern().trackerLayersWithMeasurement();
588  // layers
589  NumberOfLayersPerTrack->Fill(nLayers);
590 
591  // 2D plots
593  NumberOfLayersVsPhiVsEtaPerTrack->Fill(eta,phi,nLayers);
594  }
595 
597  // fitting
598  Chi2 -> Fill(chi2);
599  Chi2Prob -> Fill(chi2prob);
600  Chi2oNDF -> Fill(chi2oNDF);
601 
602  // DCA
603  // temporary patch in order to put back those MEs in Muon Workspace
604  if (doDCAPlots_) {
605  if (doDCAwrt000Plots_) {
607  DistanceOfClosestApproachVsPhi->Fill(phi, track.dxy());
608  }
609 
610  // PCA
614  }
615 
616  // algorithm
617  algorithm->Fill(static_cast<double>(track.algo()));
618  }
619 
620  if ( doLumiAnalysis_ ) {
622  Chi2oNDF_lumiFlag -> Fill(chi2oNDF);
623  }
624 
626 
627  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
628  iEvent.getByToken(beamSpotToken_,recoBeamSpotHandle);
629  reco::BeamSpot bs = *recoBeamSpotHandle;
630 
632  DistanceOfClosestApproachToBSVsPhi -> Fill(track.phi(), track.dxy(bs.position()));
633  zPointOfClosestApproachVsPhi -> Fill(track.phi(), track.vz());
634  xPointOfClosestApproachVsZ0wrt000 -> Fill(track.dz(), track.vx());
635  yPointOfClosestApproachVsZ0wrt000 -> Fill(track.dz(), track.vy());
636  xPointOfClosestApproachVsZ0wrtBS -> Fill(track.dz(bs.position()),(track.vx()-bs.position(track.vz()).x()));
637  yPointOfClosestApproachVsZ0wrtBS -> Fill(track.dz(bs.position()),(track.vy()-bs.position(track.vz()).y()));
638  if (doTestPlots_) {
639  TESTDistanceOfClosestApproachToBS -> Fill(track.dxy(bs.position(track.vz())));
640  TESTDistanceOfClosestApproachToBSVsPhi -> Fill(track.phi(), track.dxy(bs.position(track.vz())));
641  }
642  }
643 
645  edm::Handle<reco::VertexCollection> recoPrimaryVerticesHandle;
646  iEvent.getByToken(pvToken_,recoPrimaryVerticesHandle);
647  if (recoPrimaryVerticesHandle->size() > 0) {
648  reco::Vertex pv = recoPrimaryVerticesHandle->at(0);
649 
651  DistanceOfClosestApproachToPVVsPhi -> Fill(track.phi(), track.dxy(pv.position()));
652  xPointOfClosestApproachVsZ0wrtPV -> Fill(track.dz(pv.position()),(track.vx()-pv.position().x()));
653  yPointOfClosestApproachVsZ0wrtPV -> Fill(track.dz(pv.position()),(track.vy()-pv.position().y()));
654  }
655  }
656 
657  if(doDCAPlots_ || doAllPlots_) {
658  if (doDCAwrt000Plots_) {
659  if (doThetaPlots_) {
660  DistanceOfClosestApproachVsTheta->Fill(track.theta(), track.d0());
661  }
662  DistanceOfClosestApproachVsEta->Fill(track.eta(), track.d0());
663  }
664 
665  }
666 
667  //Tracker Specific Histograms
670  }
671 
673  std::string StateName = conf_.getParameter<std::string>("MeasurementState");
674 
675  if (StateName == "All") {
676  fillHistosForState(iSetup, track, std::string("OuterSurface"));
677  fillHistosForState(iSetup, track, std::string("InnerSurface"));
678  fillHistosForState(iSetup, track, std::string("ImpactPoint"));
679  } else if (
680  StateName != "OuterSurface" &&
681  StateName != "InnerSurface" &&
682  StateName != "ImpactPoint" &&
683  StateName != "default"
684  ) {
685  fillHistosForState(iSetup, track, std::string("default"));
686  } else {
687  fillHistosForState(iSetup, track, StateName);
688  }
689  }
690 
691  if ( doAllPlots_ ) {
692  }
693 
694 }
695 
696 // book histograms at differnt measurement points
697 // ---------------------------------------------------------------------------------//
699 {
700 
701  // parameters from the configuration
702  std::string QualName = conf_.getParameter<std::string>("Quality");
703  std::string AlgoName = conf_.getParameter<std::string>("AlgoName");
704 
705  // use the AlgoName and Quality Name
706  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
707 
708  // get binning from the configuration
709  double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
710  double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
711 
712  int RecHitBin = conf_.getParameter<int>( "RecHitBin");
713  double RecHitMin = conf_.getParameter<double>("RecHitMin");
714  double RecHitMax = conf_.getParameter<double>("RecHitMax");
715 
716  int RecLayBin = conf_.getParameter<int>( "RecHitBin");
717  double RecLayMin = conf_.getParameter<double>("RecHitMin");
718  double RecLayMax = conf_.getParameter<double>("RecHitMax");
719 
720 
721  int PhiBin = conf_.getParameter<int>( "PhiBin");
722  double PhiMin = conf_.getParameter<double>("PhiMin");
723  double PhiMax = conf_.getParameter<double>("PhiMax");
724 
725  int EtaBin = conf_.getParameter<int>( "EtaBin");
726  double EtaMin = conf_.getParameter<double>("EtaMin");
727  double EtaMax = conf_.getParameter<double>("EtaMax");
728 
729  int ThetaBin = conf_.getParameter<int>( "ThetaBin");
730  double ThetaMin = conf_.getParameter<double>("ThetaMin");
731  double ThetaMax = conf_.getParameter<double>("ThetaMax");
732 
733  int TrackQBin = conf_.getParameter<int>( "TrackQBin");
734  double TrackQMin = conf_.getParameter<double>("TrackQMin");
735  double TrackQMax = conf_.getParameter<double>("TrackQMax");
736 
737  int TrackPtBin = conf_.getParameter<int>( "TrackPtBin");
738  double TrackPtMin = conf_.getParameter<double>("TrackPtMin");
739  double TrackPtMax = conf_.getParameter<double>("TrackPtMax");
740 
741  int TrackPBin = conf_.getParameter<int>( "TrackPBin");
742  double TrackPMin = conf_.getParameter<double>("TrackPMin");
743  double TrackPMax = conf_.getParameter<double>("TrackPMax");
744 
745  int TrackPxBin = conf_.getParameter<int>( "TrackPxBin");
746  double TrackPxMin = conf_.getParameter<double>("TrackPxMin");
747  double TrackPxMax = conf_.getParameter<double>("TrackPxMax");
748 
749  int TrackPyBin = conf_.getParameter<int>( "TrackPyBin");
750  double TrackPyMin = conf_.getParameter<double>("TrackPyMin");
751  double TrackPyMax = conf_.getParameter<double>("TrackPyMax");
752 
753  int TrackPzBin = conf_.getParameter<int>( "TrackPzBin");
754  double TrackPzMin = conf_.getParameter<double>("TrackPzMin");
755  double TrackPzMax = conf_.getParameter<double>("TrackPzMax");
756 
757  int ptErrBin = conf_.getParameter<int>( "ptErrBin");
758  double ptErrMin = conf_.getParameter<double>("ptErrMin");
759  double ptErrMax = conf_.getParameter<double>("ptErrMax");
760 
761  int pxErrBin = conf_.getParameter<int>( "pxErrBin");
762  double pxErrMin = conf_.getParameter<double>("pxErrMin");
763  double pxErrMax = conf_.getParameter<double>("pxErrMax");
764 
765  int pyErrBin = conf_.getParameter<int>( "pyErrBin");
766  double pyErrMin = conf_.getParameter<double>("pyErrMin");
767  double pyErrMax = conf_.getParameter<double>("pyErrMax");
768 
769  int pzErrBin = conf_.getParameter<int>( "pzErrBin");
770  double pzErrMin = conf_.getParameter<double>("pzErrMin");
771  double pzErrMax = conf_.getParameter<double>("pzErrMax");
772 
773  int pErrBin = conf_.getParameter<int>( "pErrBin");
774  double pErrMin = conf_.getParameter<double>("pErrMin");
775  double pErrMax = conf_.getParameter<double>("pErrMax");
776 
777  int phiErrBin = conf_.getParameter<int>( "phiErrBin");
778  double phiErrMin = conf_.getParameter<double>("phiErrMin");
779  double phiErrMax = conf_.getParameter<double>("phiErrMax");
780 
781  int etaErrBin = conf_.getParameter<int>( "etaErrBin");
782  double etaErrMin = conf_.getParameter<double>("etaErrMin");
783  double etaErrMax = conf_.getParameter<double>("etaErrMax");
784 
785 
786  double Chi2ProbMin = conf_.getParameter<double>("Chi2ProbMin");
787  double Chi2ProbMax = conf_.getParameter<double>("Chi2ProbMax");
788 
789  ibooker.setCurrentFolder(TopFolder_);
790 
791  TkParameterMEs tkmes;
792 
793  std::string histTag = (sname == "default") ? CategoryName : sname + "_" + CategoryName;
794 
795  if(doAllPlots_) {
796 
797  // general properties
798  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
799 
800  if (doThetaPlots_) {
801  histname = "Chi2oNDFVsTheta_" + histTag;
802  tkmes.Chi2oNDFVsTheta = ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, Chi2NDFMin, Chi2NDFMax,"");
803  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #theta",1);
804  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #chi^{2}/ndf",2);
805  }
806  histname = "Chi2oNDFVsPhi_" + histTag;
807  tkmes.Chi2oNDFVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, Chi2NDFMin, Chi2NDFMax,"");
808  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #phi",1);
809  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #chi^{2}/ndf",2);
810 
811  histname = "Chi2oNDFVsEta_" + histTag;
812  tkmes.Chi2oNDFVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, Chi2NDFMin, Chi2NDFMax,"");
813  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #eta",1);
814  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #chi^{2}/ndf",2);
815 
816  histname = "Chi2ProbVsPhi_" + histTag;
817  tkmes.Chi2ProbVsPhi = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PhiBin, PhiMin, PhiMax, Chi2ProbMin, Chi2ProbMax);
818  tkmes.Chi2ProbVsPhi->setAxisTitle("Tracks #phi" ,1);
819  tkmes.Chi2ProbVsPhi->setAxisTitle("Track #chi^{2} probability",2);
820 
821  histname = "Chi2ProbVsEta_" + histTag;
822  tkmes.Chi2ProbVsEta = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, EtaBin, EtaMin, EtaMax, Chi2ProbMin, Chi2ProbMax);
823  tkmes.Chi2ProbVsEta->setAxisTitle("Tracks #eta" ,1);
824  tkmes.Chi2ProbVsEta->setAxisTitle("Track #chi^{2} probability",2);
825 
826  }
827 
828  // general properties
829  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
830 
831  histname = "TrackP_" + histTag;
832  tkmes.TrackP = ibooker.book1D(histname, histname, TrackPBin, TrackPMin, TrackPMax);
833  tkmes.TrackP->setAxisTitle("Track |p| (GeV/c)", 1);
834  tkmes.TrackP->setAxisTitle("Number of Tracks",2);
835 
836  histname = "TrackPt_" + histTag;
837  tkmes.TrackPt = ibooker.book1D(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax);
838  tkmes.TrackPt->setAxisTitle("Track p_{T} (GeV/c)", 1);
839  tkmes.TrackPt->setAxisTitle("Number of Tracks",2);
840 
841  if (doTrackPxPyPlots_) {
842  histname = "TrackPx_" + histTag;
843  tkmes.TrackPx = ibooker.book1D(histname, histname, TrackPxBin, TrackPxMin, TrackPxMax);
844  tkmes.TrackPx->setAxisTitle("Track p_{x} (GeV/c)", 1);
845  tkmes.TrackPx->setAxisTitle("Number of Tracks",2);
846 
847  histname = "TrackPy_" + histTag;
848  tkmes.TrackPy = ibooker.book1D(histname, histname, TrackPyBin, TrackPyMin, TrackPyMax);
849  tkmes.TrackPy->setAxisTitle("Track p_{y} (GeV/c)", 1);
850  tkmes.TrackPy->setAxisTitle("Number of Tracks",2);
851  }
852  histname = "TrackPz_" + histTag;
853  tkmes.TrackPz = ibooker.book1D(histname, histname, TrackPzBin, TrackPzMin, TrackPzMax);
854  tkmes.TrackPz->setAxisTitle("Track p_{z} (GeV/c)", 1);
855  tkmes.TrackPz->setAxisTitle("Number of Tracks",2);
856 
857  histname = "TrackPhi_" + histTag;
858  tkmes.TrackPhi = ibooker.book1D(histname, histname, PhiBin, PhiMin, PhiMax);
859  tkmes.TrackPhi->setAxisTitle("Track #phi", 1);
860  tkmes.TrackPhi->setAxisTitle("Number of Tracks",2);
861 
862  histname = "TrackEta_" + histTag;
863  tkmes.TrackEta = ibooker.book1D(histname, histname, EtaBin, EtaMin, EtaMax);
864  tkmes.TrackEta->setAxisTitle("Track #eta", 1);
865  tkmes.TrackEta->setAxisTitle("Number of Tracks",2);
866 
867  if (doThetaPlots_) {
868  histname = "TrackTheta_" + histTag;
869  tkmes.TrackTheta = ibooker.book1D(histname, histname, ThetaBin, ThetaMin, ThetaMax);
870  tkmes.TrackTheta->setAxisTitle("Track #theta", 1);
871  tkmes.TrackTheta->setAxisTitle("Number of Tracks",2);
872  }
873  histname = "TrackQ_" + histTag;
874  tkmes.TrackQ = ibooker.book1D(histname, histname, TrackQBin, TrackQMin, TrackQMax);
875  tkmes.TrackQ->setAxisTitle("Track Charge", 1);
876  tkmes.TrackQ->setAxisTitle("Number of Tracks",2);
877 
878  histname = "TrackPErrOverP_" + histTag;
879  tkmes.TrackPErr = ibooker.book1D(histname, histname, pErrBin, pErrMin, pErrMax);
880  tkmes.TrackPErr->setAxisTitle("track error(p)/p", 1);
881  tkmes.TrackPErr->setAxisTitle("Number of Tracks",2);
882 
883  histname = "TrackPtErrOverPt_" + histTag;
884  tkmes.TrackPtErr = ibooker.book1D(histname, histname, ptErrBin, ptErrMin, ptErrMax);
885  tkmes.TrackPtErr->setAxisTitle("track error(p_{T})/p_{T}", 1);
886  tkmes.TrackPtErr->setAxisTitle("Number of Tracks",2);
887 
888  histname = "TrackPtErrOverPtVsEta_" + histTag;
889  tkmes.TrackPtErrVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, ptErrMin, ptErrMax);
890  tkmes.TrackPtErrVsEta->setAxisTitle("Track #eta",1);
891  tkmes.TrackPtErrVsEta->setAxisTitle("track error(p_{T})/p_{T}", 2);
892 
893  if (doTrackPxPyPlots_) {
894  histname = "TrackPxErrOverPx_" + histTag;
895  tkmes.TrackPxErr = ibooker.book1D(histname, histname, pxErrBin, pxErrMin, pxErrMax);
896  tkmes.TrackPxErr->setAxisTitle("track error(p_{x})/p_{x}", 1);
897  tkmes.TrackPxErr->setAxisTitle("Number of Tracks",2);
898 
899  histname = "TrackPyErrOverPy_" + histTag;
900  tkmes.TrackPyErr = ibooker.book1D(histname, histname, pyErrBin, pyErrMin, pyErrMax);
901  tkmes.TrackPyErr->setAxisTitle("track error(p_{y})/p_{y}", 1);
902  tkmes.TrackPyErr->setAxisTitle("Number of Tracks",2);
903  }
904  histname = "TrackPzErrOverPz_" + histTag;
905  tkmes.TrackPzErr = ibooker.book1D(histname, histname, pzErrBin, pzErrMin, pzErrMax);
906  tkmes.TrackPzErr->setAxisTitle("track error(p_{z})/p_{z}", 1);
907  tkmes.TrackPzErr->setAxisTitle("Number of Tracks",2);
908 
909  histname = "TrackPhiErr_" + histTag;
910  tkmes.TrackPhiErr = ibooker.book1D(histname, histname, phiErrBin, phiErrMin, phiErrMax);
911  tkmes.TrackPhiErr->setAxisTitle("track error(#phi)");
912  tkmes.TrackPhiErr->setAxisTitle("Number of Tracks",2);
913 
914  histname = "TrackEtaErr_" + histTag;
915  tkmes.TrackEtaErr = ibooker.book1D(histname, histname, etaErrBin, etaErrMin, etaErrMax);
916  tkmes.TrackEtaErr->setAxisTitle("track error(#eta)");
917  tkmes.TrackEtaErr->setAxisTitle("Number of Tracks",2);
918 
919  // rec hit profiles
920  ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");
921  histname = "NumberOfRecHitsPerTrackVsPhi_" + histTag;
922  tkmes.NumberOfRecHitsPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, RecHitBin, RecHitMin, RecHitMax,"");
923  tkmes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Track #phi",1);
924  tkmes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Number of RecHits in each Track",2);
925 
926  if (doThetaPlots_) {
927  histname = "NumberOfRecHitsPerTrackVsTheta_" + histTag;
928  tkmes.NumberOfRecHitsPerTrackVsTheta = ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, RecHitBin, RecHitMin, RecHitMax,"");
929  tkmes.NumberOfRecHitsPerTrackVsTheta->setAxisTitle("Track #phi",1);
930  tkmes.NumberOfRecHitsPerTrackVsTheta->setAxisTitle("Number of RecHits in each Track",2);
931  }
932  histname = "NumberOfRecHitsPerTrackVsEta_" + histTag;
933  tkmes.NumberOfRecHitsPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, RecHitBin, RecHitMin, RecHitMax,"");
934  tkmes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Track #eta",1);
935  tkmes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Number of RecHits in each Track",2);
936 
937  histname = "NumberOfValidRecHitsPerTrackVsPhi_" + histTag;
938  tkmes.NumberOfValidRecHitsPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, RecHitMin, RecHitMax,"");
939  tkmes.NumberOfValidRecHitsPerTrackVsPhi->setAxisTitle("Track #phi",1);
940  tkmes.NumberOfValidRecHitsPerTrackVsPhi->setAxisTitle("Number of valid RecHits in each Track",2);
941 
942  // std::cout << "[TrackAnalyzer::bookHistosForState] histTag: " << histTag << std::endl;
943  histname = "NumberOfValidRecHitsPerTrackVsEta_" + histTag;
944  tkmes.NumberOfValidRecHitsPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, RecHitMin, RecHitMax,"");
945  tkmes.NumberOfValidRecHitsPerTrackVsEta->setAxisTitle("Track #eta",1);
946  tkmes.NumberOfValidRecHitsPerTrackVsEta->setAxisTitle("Number of valid RecHits in each Track",2);
947 
949  histname = "NumberOfLayersPerTrackVsPhi_" + histTag;
950  tkmes.NumberOfLayersPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, RecLayBin, RecLayMin, RecLayMax,"");
951  tkmes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Track #phi",1);
952  tkmes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Number of Layers in each Track",2);
953 
954  if (doThetaPlots_) {
955  histname = "NumberOfLayersPerTrackVsTheta_" + histTag;
956  tkmes.NumberOfLayersPerTrackVsTheta = ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, RecLayBin, RecLayMin, RecLayMax,"");
957  tkmes.NumberOfLayersPerTrackVsTheta->setAxisTitle("Track #phi",1);
958  tkmes.NumberOfLayersPerTrackVsTheta->setAxisTitle("Number of Layers in each Track",2);
959  }
960  histname = "NumberOfLayersPerTrackVsEta_" + histTag;
961  tkmes.NumberOfLayersPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, RecLayBin, RecLayMin, RecLayMax,"");
962  tkmes.NumberOfLayersPerTrackVsEta->setAxisTitle("Track #eta",1);
963  tkmes.NumberOfLayersPerTrackVsEta->setAxisTitle("Number of Layers in each Track",2);
964 
965  if (doThetaPlots_) {
966  histname = "Chi2oNDFVsTheta_" + histTag;
967  tkmes.Chi2oNDFVsTheta = ibooker.bookProfile(histname, histname, ThetaBin, ThetaMin, ThetaMax, Chi2NDFMin, Chi2NDFMax,"");
968  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #theta",1);
969  tkmes.Chi2oNDFVsTheta->setAxisTitle("Track #chi^{2}/ndf",2);
970  }
971  if (doAllPlots_) {
972  histname = "Chi2oNDFVsPhi_" + histTag;
973  tkmes.Chi2oNDFVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, Chi2NDFMin, Chi2NDFMax,"");
974  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #phi",1);
975  tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #chi^{2}/ndf",2);
976 
977  histname = "Chi2oNDFVsEta_" + histTag;
978  tkmes.Chi2oNDFVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, Chi2NDFMin, Chi2NDFMax,"");
979  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #eta",1);
980  tkmes.Chi2oNDFVsEta->setAxisTitle("Track #chi^{2}/ndf",2);
981 
982  histname = "Chi2ProbVsPhi_" + histTag;
983  tkmes.Chi2ProbVsPhi = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PhiBin, PhiMin, PhiMax, Chi2ProbMin, Chi2ProbMax);
984  tkmes.Chi2ProbVsPhi->setAxisTitle("Tracks #phi" ,1);
985  tkmes.Chi2ProbVsPhi->setAxisTitle("Track #chi^{2} probability",2);
986 
987  histname = "Chi2ProbVsEta_" + histTag;
988  tkmes.Chi2ProbVsEta = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, EtaBin, EtaMin, EtaMax, Chi2ProbMin, Chi2ProbMax);
989  tkmes.Chi2ProbVsEta->setAxisTitle("Tracks #eta" ,1);
990  tkmes.Chi2ProbVsEta->setAxisTitle("Track #chi^{2} probability",2);
991  }
992 
993  // now put the MEs in the map
994  TkParameterMEMap.insert( std::make_pair(sname, tkmes) );
995 
996 }
997 
998 
999 // fill histograms at differnt measurement points
1000 // ---------------------------------------------------------------------------------//
1002 {
1003  //get the kinematic parameters
1004  double p, px, py, pz, pt, theta, phi, eta, q;
1005  double pxerror, pyerror, pzerror, pterror, perror, phierror, etaerror;
1006 
1007  if (sname == "default") {
1008 
1009  p = track.p();
1010  px = track.px();
1011  py = track.py();
1012  pz = track.pz();
1013  pt = track.pt();
1014  phi = track.phi();
1015  theta = track.theta();
1016  eta = track.eta();
1017  q = track.charge();
1018 
1019  pterror = (pt) ? track.ptError()/(pt*pt) : 0.0;
1020  pxerror = -1.0;
1021  pyerror = -1.0;
1022  pzerror = -1.0;
1023  perror = -1.0;
1024  phierror = track.phiError();
1025  etaerror = track.etaError();
1026 
1027  } else {
1028 
1030  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder",theB);
1031  reco::TransientTrack TransTrack = theB->build(track);
1032 
1034 
1035  if (sname == "OuterSurface") TSOS = TransTrack.outermostMeasurementState();
1036  else if (sname == "InnerSurface") TSOS = TransTrack.innermostMeasurementState();
1037  else if (sname == "ImpactPoint") TSOS = TransTrack.impactPointState();
1038 
1039  p = TSOS.globalMomentum().mag();
1040  px = TSOS.globalMomentum().x();
1041  py = TSOS.globalMomentum().y();
1042  pz = TSOS.globalMomentum().z();
1043  pt = TSOS.globalMomentum().perp();
1044  phi = TSOS.globalMomentum().phi();
1045  theta = TSOS.globalMomentum().theta();
1046  eta = TSOS.globalMomentum().eta();
1047  q = TSOS.charge();
1048 
1049  //get the error of the kinimatic parameters
1051  double partialPterror = errors(3,3)*pow(TSOS.globalMomentum().x(),2) + errors(4,4)*pow(TSOS.globalMomentum().y(),2);
1052  pterror = sqrt(partialPterror)/TSOS.globalMomentum().perp();
1053  pxerror = sqrt(errors(3,3))/TSOS.globalMomentum().x();
1054  pyerror = sqrt(errors(4,4))/TSOS.globalMomentum().y();
1055  pzerror = sqrt(errors(5,5))/TSOS.globalMomentum().z();
1056  perror = sqrt(partialPterror+errors(5,5)*pow(TSOS.globalMomentum().z(),2))/TSOS.globalMomentum().mag();
1057  phierror = sqrt(TSOS.curvilinearError().matrix()(2,2));
1058  etaerror = sqrt(TSOS.curvilinearError().matrix()(1,1))*fabs(sin(TSOS.globalMomentum().theta()));
1059 
1060  }
1061 
1062  std::map<std::string, TkParameterMEs>::iterator iPos = TkParameterMEMap.find(sname);
1063  if (iPos != TkParameterMEMap.end()) {
1064 
1065  TkParameterMEs tkmes = iPos->second;
1066 
1067  // momentum
1068  tkmes.TrackP->Fill(p);
1069  if (doTrackPxPyPlots_) {
1070  tkmes.TrackPx->Fill(px);
1071  tkmes.TrackPy->Fill(py);
1072  }
1073  tkmes.TrackPz->Fill(pz);
1074  tkmes.TrackPt->Fill(pt);
1075 
1076  // angles
1077  tkmes.TrackPhi->Fill(phi);
1078  tkmes.TrackEta->Fill(eta);
1079  if (doThetaPlots_) {
1080  tkmes.TrackTheta->Fill(theta);
1081  }
1082  tkmes.TrackQ->Fill(q);
1083 
1084  // errors
1085  tkmes.TrackPtErr->Fill(pterror);
1086  tkmes.TrackPtErrVsEta->Fill(eta,pterror);
1087  if (doTrackPxPyPlots_) {
1088  tkmes.TrackPxErr->Fill(pxerror);
1089  tkmes.TrackPyErr->Fill(pyerror);
1090  }
1091  tkmes.TrackPzErr->Fill(pzerror);
1092  tkmes.TrackPErr->Fill(perror);
1093  tkmes.TrackPhiErr->Fill(phierror);
1094  tkmes.TrackEtaErr->Fill(etaerror);
1095 
1096  int nRecHits = track.hitPattern().numberOfHits();
1097  int nValidRecHits = track.numberOfValidHits();
1098  // rec hits
1099  tkmes.NumberOfRecHitsPerTrackVsPhi->Fill(phi, nRecHits);
1100  if (doThetaPlots_) {
1101  tkmes.NumberOfRecHitsPerTrackVsTheta->Fill(theta,nRecHits);
1102  }
1103  tkmes.NumberOfRecHitsPerTrackVsEta->Fill(eta, nRecHits);
1104 
1105  tkmes.NumberOfValidRecHitsPerTrackVsPhi->Fill(phi, nValidRecHits);
1106  tkmes.NumberOfValidRecHitsPerTrackVsEta->Fill(eta, nValidRecHits);
1107 
1108  int nLayers = track.hitPattern().stripLayersWithMeasurement();
1109  // rec layers
1110  tkmes.NumberOfLayersPerTrackVsPhi->Fill(phi, nLayers);
1111  if (doThetaPlots_) {
1112  tkmes.NumberOfLayersPerTrackVsTheta->Fill(theta, nLayers);
1113  }
1114  tkmes.NumberOfLayersPerTrackVsEta->Fill(eta, nLayers);
1115 
1116  double chi2prob = TMath::Prob(track.chi2(),(int)track.ndof());
1117  double chi2oNDF = track.normalizedChi2();
1118 
1119  if(doAllPlots_) {
1120 
1121  // general properties
1122  if (doThetaPlots_) {
1123  tkmes.Chi2oNDFVsTheta->Fill(theta, chi2oNDF);
1124  }
1125  tkmes.Chi2oNDFVsPhi->Fill(phi, chi2oNDF);
1126  tkmes.Chi2oNDFVsEta->Fill(eta, chi2oNDF);
1127  tkmes.Chi2ProbVsPhi->Fill(phi, chi2prob);
1128  tkmes.Chi2ProbVsEta->Fill(eta, chi2prob);
1129  }
1130 
1131  }
1132 
1133 }
1134 
1135 
1137 {
1138 
1139  // parameters from the configuration
1140  std::string QualName = conf_.getParameter<std::string>("Quality");
1141  std::string AlgoName = conf_.getParameter<std::string>("AlgoName");
1142 
1143  // use the AlgoName and Quality Name
1144  std::string CategoryName = QualName != "" ? AlgoName + "_" + QualName : AlgoName;
1145 
1146  int PhiBin = conf_.getParameter<int>( "PhiBin");
1147  double PhiMin = conf_.getParameter<double>("PhiMin");
1148  double PhiMax = conf_.getParameter<double>("PhiMax");
1149 
1150  int EtaBin = conf_.getParameter<int>( "EtaBin");
1151  double EtaMin = conf_.getParameter<double>("EtaMin");
1152  double EtaMax = conf_.getParameter<double>("EtaMax");
1153 
1154  // book hit property histograms
1155  // ---------------------------------------------------------------------------------//
1156  ibooker.setCurrentFolder(TopFolder_+"/HitProperties");
1157 
1158 
1159 
1160  std::vector<std::string> subdetectors = conf_.getParameter<std::vector<std::string> >("subdetectors");
1161  int detBin = conf_.getParameter<int>("subdetectorBin");
1162 
1163  for ( auto det : subdetectors ) {
1164 
1165  // hits properties
1166  ibooker.setCurrentFolder(TopFolder_+"/HitProperties/"+det);
1167 
1168  TkRecHitsPerSubDetMEs recHitsPerSubDet_mes;
1169 
1170  recHitsPerSubDet_mes.detectorTag = det;
1171  int detID = -1;
1172  if ( det == "TIB" ) detID = StripSubdetector::TIB;
1173  if ( det == "TOB" ) detID = StripSubdetector::TOB;
1174  if ( det == "TID" ) detID = StripSubdetector::TID;
1175  if ( det == "TEC" ) detID = StripSubdetector::TEC;
1176  if ( det == "PixBarrel" ) detID = PixelSubdetector::PixelBarrel;
1177  if ( det == "PixEndcap" ) detID = PixelSubdetector::PixelEndcap;
1178  recHitsPerSubDet_mes.detectorId = detID;
1179 
1180  histname = "NumberOfRecHitsPerTrack_" + det + "_" + CategoryName;
1181  recHitsPerSubDet_mes.NumberOfRecHitsPerTrack = ibooker.book1D(histname, histname, detBin, -0.5, double(detBin)-0.5);
1182  recHitsPerSubDet_mes.NumberOfRecHitsPerTrack->setAxisTitle("Number of " + det + " valid RecHits in each Track",1);
1183  recHitsPerSubDet_mes.NumberOfRecHitsPerTrack->setAxisTitle("Number of Tracks", 2);
1184 
1185  histname = "NumberOfRecHitsPerTrackVsPhi_" + det + "_" + CategoryName;
1186  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, detBin, -0.5, double(detBin)-0.5,"");
1187  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Track #phi",1);
1188  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsPhi->setAxisTitle("Number of " + det + " valid RecHits in each Track",2);
1189 
1190  histname = "NumberOfRecHitsPerTrackVsEta_" + det + "_" + CategoryName;
1191  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, detBin, -0.5, double(detBin)-0.5,"");
1192  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Track #eta",1);
1193  recHitsPerSubDet_mes.NumberOfRecHitsPerTrackVsEta->setAxisTitle("Number of " + det + " valid RecHits in each Track",2);
1194 
1195  histname = "NumberOfLayersPerTrack_" + det + "_" + CategoryName;
1196  recHitsPerSubDet_mes.NumberOfLayersPerTrack = ibooker.book1D(histname, histname, detBin, -0.5, double(detBin)-0.5);
1197  recHitsPerSubDet_mes.NumberOfLayersPerTrack->setAxisTitle("Number of " + det + " valid Layers in each Track",1);
1198  recHitsPerSubDet_mes.NumberOfLayersPerTrack->setAxisTitle("Number of Tracks", 2);
1199 
1200  histname = "NumberOfLayersPerTrackVsPhi_" + det + "_" + CategoryName;
1201  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPhi = ibooker.bookProfile(histname, histname, PhiBin, PhiMin, PhiMax, detBin, -0.5, double(detBin)-0.5,"");
1202  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Track #phi",1);
1203  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsPhi->setAxisTitle("Number of " + det + " valid Layers in each Track",2);
1204 
1205  histname = "NumberOfLayersPerTrackVsEta_" + det + "_" + CategoryName;
1206  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, detBin, -0.5, double(detBin)-0.5,"");
1207  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsEta->setAxisTitle("Track #eta",1);
1208  recHitsPerSubDet_mes.NumberOfLayersPerTrackVsEta->setAxisTitle("Number of " + det + " valid Layers in each Track",2);
1209 
1210  TkRecHitsPerSubDetMEMap.insert(std::pair<std::string,TkRecHitsPerSubDetMEs>(det,recHitsPerSubDet_mes));
1211 
1212 
1213  }
1214 
1215 
1216 }
1217 
1218 
1220 {
1221 
1222  double phi = track.phi();
1223  double eta = track.eta();
1224 
1225  for ( std::map<std::string,TkRecHitsPerSubDetMEs>::iterator it = TkRecHitsPerSubDetMEMap.begin();
1226  it != TkRecHitsPerSubDetMEMap.end(); it++ ) {
1227 
1228  int nValidLayers = 0;
1229  int nValidRecHits = 0;
1230  int substr = it->second.detectorId;
1231  switch(substr) {
1232  case StripSubdetector::TIB :
1233  nValidLayers = track.hitPattern().stripTIBLayersWithMeasurement(); // case 0: strip TIB
1234  nValidRecHits = track.hitPattern().numberOfValidStripTIBHits(); // case 0: strip TIB
1235  break;
1236  case StripSubdetector::TID :
1237  nValidLayers = track.hitPattern().stripTIDLayersWithMeasurement(); // case 0: strip TID
1238  nValidRecHits = track.hitPattern().numberOfValidStripTIDHits(); // case 0: strip TID
1239  break;
1240  case StripSubdetector::TOB :
1241  nValidLayers = track.hitPattern().stripTOBLayersWithMeasurement(); // case 0: strip TOB
1242  nValidRecHits = track.hitPattern().numberOfValidStripTOBHits(); // case 0: strip TOB
1243  break;
1244  case StripSubdetector::TEC :
1245  nValidLayers = track.hitPattern().stripTECLayersWithMeasurement(); // case 0: strip TEC
1246  nValidRecHits = track.hitPattern().numberOfValidStripTECHits(); // case 0: strip TEC
1247  break;
1249  nValidLayers = track.hitPattern().pixelBarrelLayersWithMeasurement(); // case 0: pixel PXB
1250  nValidRecHits = track.hitPattern().numberOfValidPixelBarrelHits(); // case 0: pixel PXB
1251  break;
1253  nValidLayers = track.hitPattern().pixelEndcapLayersWithMeasurement(); // case 0: pixel PXF
1254  nValidRecHits = track.hitPattern().numberOfValidPixelEndcapHits(); // case 0: pixel PXF
1255  break;
1256  default :
1257  break;
1258  }
1259 
1260  //Fill Layers and RecHits
1261  it->second.NumberOfRecHitsPerTrack -> Fill(nValidRecHits);
1262  it->second.NumberOfRecHitsPerTrackVsPhi -> Fill(phi, nValidRecHits);
1263  it->second.NumberOfRecHitsPerTrackVsEta -> Fill(eta, nValidRecHits);
1264 
1265  it->second.NumberOfLayersPerTrack -> Fill(nValidLayers);
1266  it->second.NumberOfLayersPerTrackVsPhi -> Fill(phi, nValidLayers);
1267  it->second.NumberOfLayersPerTrackVsEta -> Fill(eta, nValidLayers);
1268  }
1269 
1270 }
1271 //
1272 // -- Set Lumi Flag
1273 //
1275 
1276  TkParameterMEs tkmes;
1279 }
1280 //
1281 // -- Apply SoftReset
1282 //
1284  TkParameterMEs tkmes;
1285  dqmStore_->softReset(Chi2oNDF);
1286  dqmStore_->softReset(NumberOfRecHitsPerTrack);
1287 }
1288 //
1289 // -- Apply Reset
1290 //
1292  TkParameterMEs tkmes;
1295 }
1296 //
1297 // -- Remove SoftReset
1298 //
1300  TkParameterMEs tkmes;
1301  dqmStore_->disableSoftReset(Chi2oNDF);
1303 }
1304 
1305 
MonitorElement * NumberOfRecHitsPerTrackVsPhi
MonitorElement * NumberOfValidRecHitsPerTrackVsPhi
MonitorElement * Chi2ProbVsPhi
double p() const
momentum vector magnitude
Definition: TrackBase.h:127
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
MonitorElement * NumberOfLayersPerTrackVsPhi
int stripTOBLayersWithMeasurement() const
Definition: HitPattern.cc:374
T getParameter(std::string const &) const
MonitorElement * DistanceOfClosestApproachToPVVsPhi
MonitorElement * NumberOfRecHitVsPhiVsEtaPerTrack
bool doTrackerSpecific_
Definition: TrackAnalyzer.h:66
void fillHistosForTrackerSpecific(const reco::Track &track)
MonitorElement * NumberOfRecHitsPerTrackVsEta
void bookHistosForLScertification(DQMStore::IBooker &ibooker)
T perp() const
Definition: PV3DBase.h:72
double d0() const
dxy parameter in perigee convention (d0 = - dxy)
Definition: TrackBase.h:121
MonitorElement * NumberOfValidRecHitsPerTrack
int stripTIBLayersWithMeasurement() const
Definition: HitPattern.cc:356
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:109
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:155
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
MonitorElement * Chi2oNDF_lumiFlag
double theta() const
polar angle
Definition: TrackBase.h:115
MonitorElement * xPointOfClosestApproachToPV
const CurvilinearTrajectoryError & curvilinearError() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
MonitorElement * NumberOfLostRecHitsPerTrack
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:64
const CartesianTrajectoryError cartesianError() const
Geom::Theta< T > theta() const
bool doGeneralPropertiesPlots_
Definition: TrackAnalyzer.h:71
T y() const
Definition: PV3DBase.h:63
double etaError() const
error on eta
Definition: TrackBase.h:203
MonitorElement * Chi2oNDFVsPhi
MonitorElement * Chi2ProbVsPhi
MonitorElement * DistanceOfClosestApproachVsPhi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:137
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:232
#define NULL
Definition: scimark2.h:8
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::map< std::string, TkParameterMEs > TkParameterMEMap
MonitorElement * NumberOfRecHitsPerTrackVsTheta
MonitorElement * algorithm
const double EtaMax[kNumberCalorimeter]
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:131
T eta() const
bool doHitPropertiesPlots_
Definition: TrackAnalyzer.h:73
MonitorElement * DistanceOfClosestApproach
bool doRecHitVsPhiVsEtaPerTrack_
Definition: TrackAnalyzer.h:74
MonitorElement * NumberOfLayersPerTrackVsTheta
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:151
MonitorElement * NumberOfRecHitsPerTrack_lumiFlag
std::map< std::string, TkRecHitsPerSubDetMEs > TkRecHitsPerSubDetMEMap
const Point & position() const
position
Definition: Vertex.h:106
int pixelEndcapLayersWithMeasurement() const
Definition: HitPattern.cc:346
int numberOfValidStripTOBHits() const
Definition: HitPattern.h:625
bool doMeasurementStatePlots_
Definition: TrackAnalyzer.h:72
TrajectoryStateOnSurface innermostMeasurementState() const
MonitorElement * NumberOfRecHitsPerTrack
void Fill(long long x)
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
TrackAlgorithm algo() const
Definition: TrackBase.h:330
void disableSoftReset(MonitorElement *me)
Definition: DQMStore.cc:3263
MonitorElement * TESTDistanceOfClosestApproachToBSVsPhi
MonitorElement * NumberOfValidRecHitsPerTrackVsEta
MonitorElement * Chi2oNDFVsEta
int iEvent
Definition: GenABIO.cc:230
MonitorElement * NumberOfRecHitsPerTrackVsPhi
MonitorElement * xPointOfClosestApproachVsZ0wrt000
T mag() const
Definition: PV3DBase.h:67
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:139
int numberOfValidPixelBarrelHits() const
Definition: HitPattern.h:605
bool doDCAwrt000Plots_
Definition: TrackAnalyzer.h:88
MonitorElement * NumberOfRecHitsPerTrackVsTheta
MonitorElement * xPointOfClosestApproach
MonitorElement * Chi2oNDFVsTheta
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:105
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:161
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:107
int stripTIDLayersWithMeasurement() const
Definition: HitPattern.cc:365
int trackerLayersWithMeasurement() const
Definition: HitPattern.h:740
MonitorElement * NumberOfValidRecHitsPerTrackVsEta
T sqrt(T t)
Definition: SSEVec.h:48
MonitorElement * NumberOfRecHitsPerTrackVsPhi
double pt() const
track transverse momentum
Definition: TrackBase.h:129
T z() const
Definition: PV3DBase.h:64
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:192
std::string TopFolder_
Definition: TrackAnalyzer.h:59
MonitorElement * xPointOfClosestApproachVsZ0wrtBS
double phiError() const
error on phi
Definition: TrackBase.h:205
MonitorElement * NumberOfValidRecHitsPerTrackVsPhi
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
int numberOfHits() const
Definition: HitPattern.cc:211
int numberOfValidStripTIDHits() const
Definition: HitPattern.h:621
TH1 * getTH1(void) const
MonitorElement * yPointOfClosestApproachToPV
const double EtaMin[kNumberCalorimeter]
MonitorElement * NumberOfRecHitsPerTrackVsEta
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:230
int numberOfValidStripTECHits() const
Definition: HitPattern.h:629
void softReset(MonitorElement *me)
Definition: DQMStore.cc:3255
MonitorElement * Chi2oNDFVsTheta
TrajectoryStateOnSurface outermostMeasurementState() const
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:221
void bookHistosForHitProperties(DQMStore::IBooker &ibooker)
MonitorElement * DistanceOfClosestApproachVsEta
MonitorElement * zPointOfClosestApproachVsPhi
const AlgebraicSymMatrix66 & matrix() const
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:135
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:125
MonitorElement * NumberOfLayersPerTrackVsEta
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:145
void bookHistosForTrackerSpecific(DQMStore::IBooker &ibooker)
void fillHistosForState(const edm::EventSetup &iSetup, const reco::Track &track, std::string sname)
TrajectoryStateOnSurface TSOS
Definition: TestHits.cc:19
virtual ~TrackAnalyzer()
bool doLumiAnalysis_
Definition: TrackAnalyzer.h:90
MonitorElement * NumberOfLayersPerTrackVsEta
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: TrackAnalyzer.h:61
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::Track &track)
MonitorElement * xPointOfClosestApproachVsZ0wrtPV
MonitorElement * yPointOfClosestApproachVsZ0wrtBS
MonitorElement * NumberOfLayersPerTrack
const T & get() const
Definition: EventSetup.h:55
int stripLayersWithMeasurement() const
Definition: HitPattern.h:750
int pixelBarrelLayersWithMeasurement() const
Definition: HitPattern.cc:336
MonitorElement * DistanceOfClosestApproachVsTheta
void bookHistosForBeamSpot(DQMStore::IBooker &ibooker)
virtual void initHisto(DQMStore::IBooker &ibooker)
MonitorElement * Chi2ProbVsEta
int numberOfValidStripTIBHits() const
Definition: HitPattern.h:617
int numberOfValidPixelEndcapHits() const
Definition: HitPattern.h:609
MonitorElement * zPointOfClosestApproachToPV
T eta() const
Definition: PV3DBase.h:76
MonitorElement * DistanceOfClosestApproachToPV
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:143
const AlgebraicSymMatrix55 & matrix() const
bool doTrackPxPyPlots_
Definition: TrackAnalyzer.h:84
GlobalVector globalMomentum() const
MonitorElement * DistanceOfClosestApproachToBSVsPhi
bool doLayersVsPhiVsEtaPerTrack_
Definition: TrackAnalyzer.h:76
void doSoftReset(DQMStore *dqmStore_)
int stripTECLayersWithMeasurement() const
Definition: HitPattern.cc:383
MonitorElement * yPointOfClosestApproachVsZ0wrt000
MonitorElement * TrackPtErrVsEta
MonitorElement * TESTDistanceOfClosestApproachToBS
MonitorElement * NumberOfRecHitsPerTrackVsEta
int charge() const
track electric charge
Definition: TrackBase.h:111
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)
MonitorElement * NumberOfLayersVsPhiVsEtaPerTrack
Definition: DDAxes.h:10
MonitorElement * Chi2Prob
Definition: Chi2.h:17
MonitorElement * yPointOfClosestApproachVsZ0wrtPV
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:119
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)
MonitorElement * Chi2ProbVsEta
MonitorElement * DistanceOfClosestApproachToBS
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
MonitorElement * Chi2oNDF
std::string histname
MonitorElement * Chi2oNDFVsEta
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:133
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:141
void undoSoftReset(DQMStore *dqmStore_)
MonitorElement * NumberOfLayersPerTrackVsPhi
edm::EDGetTokenT< reco::VertexCollection > pvToken_
Definition: TrackAnalyzer.h:62
Definition: DDAxes.h:10
MonitorElement * Chi2oNDFVsPhi