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