CMS 3D CMS Logo

OuterTrackerMonitorTTTrack.cc
Go to the documentation of this file.
1 // Package: SiOuterTracker
2 // Class: SiOuterTracker
3 //
4 // Original Author: Isis Marina Van Parijs
5 // Modified by: Emily MacDonald (emily.kaelyn.macdonald@cern.ch)
6 
7 // system include files
8 #include <fstream>
9 #include <iostream>
10 #include <memory>
11 #include <numeric>
12 #include <string>
13 #include <vector>
14 #include <bitset>
15 
16 // user include files
48 
50 public:
52  ~OuterTrackerMonitorTTTrack() override;
53  void analyze(const edm::Event &, const edm::EventSetup &) override;
54  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
55 
57  MonitorElement *Track_All_N = nullptr; // Number of tracks per event
58  MonitorElement *Track_All_NStubs = nullptr; // Number of stubs per track
59  MonitorElement *Track_All_NLayersMissed = nullptr; // Number of layers missed per track
60  MonitorElement *Track_All_Eta_NStubs = nullptr; // Number of stubs per track vs eta
61  MonitorElement *Track_All_Pt = nullptr; // pT distrubtion for tracks
62  MonitorElement *Track_All_Eta = nullptr; // eta distrubtion for tracks
63  MonitorElement *Track_All_Phi = nullptr; // phi distrubtion for tracks
64  MonitorElement *Track_All_D0 = nullptr; // d0 distrubtion for tracks
65  MonitorElement *Track_All_VtxZ = nullptr; // z0 distrubtion for tracks
66  MonitorElement *Track_All_BendChi2 = nullptr; // Bendchi2 distrubtion for tracks
67  MonitorElement *Track_All_Chi2 = nullptr; // chi2 distrubtion for tracks
68  MonitorElement *Track_All_Chi2Red = nullptr; // chi2/dof distrubtion for tracks
69  MonitorElement *Track_All_Chi2RZ = nullptr; // chi2 r-phi distrubtion for tracks
70  MonitorElement *Track_All_Chi2RPhi = nullptr; // chi2 r-z distrubtion for tracks
71  MonitorElement *Track_All_Chi2Red_NStubs = nullptr; // chi2/dof vs number of stubs
72  MonitorElement *Track_All_Chi2Red_Eta = nullptr; // chi2/dof vs eta of track
73  MonitorElement *Track_All_Eta_BarrelStubs = nullptr; // eta vs number of stubs in barrel
74  MonitorElement *Track_All_Eta_ECStubs = nullptr; // eta vs number of stubs in end caps
75  MonitorElement *Track_All_Chi2_Probability = nullptr; // chi2 probability
76 
78  // Quality cuts: chi2/dof<10, bendchi2<2.2 (Prompt), default in config
79  // Quality cuts: chi2/dof<40, bendchi2<2.4 (Extended/Displaced tracks)
80  MonitorElement *Track_HQ_N = nullptr; // Number of tracks per event
81  MonitorElement *Track_HQ_NStubs = nullptr; // Number of stubs per track
82  MonitorElement *Track_HQ_NLayersMissed = nullptr; // Number of layers missed per track
83  MonitorElement *Track_HQ_Eta_NStubs = nullptr; // Number of stubs per track vs eta
84  MonitorElement *Track_HQ_Pt = nullptr; // pT distrubtion for tracks
85  MonitorElement *Track_HQ_Eta = nullptr; // eta distrubtion for tracks
86  MonitorElement *Track_HQ_Phi = nullptr; // phi distrubtion for tracks
87  MonitorElement *Track_HQ_D0 = nullptr; // d0 distrubtion for tracks
88  MonitorElement *Track_HQ_VtxZ = nullptr; // z0 distrubtion for tracks
89  MonitorElement *Track_HQ_BendChi2 = nullptr; // Bendchi2 distrubtion for tracks
90  MonitorElement *Track_HQ_Chi2 = nullptr; // chi2 distrubtion for tracks
91  MonitorElement *Track_HQ_Chi2Red = nullptr; // chi2/dof distrubtion for tracks
92  MonitorElement *Track_HQ_Chi2RZ = nullptr; // chi2 r-z distrubtion for tracks
93  MonitorElement *Track_HQ_Chi2RPhi = nullptr; // chi2 r-phi distrubtion for tracks
94  MonitorElement *Track_HQ_Chi2Red_NStubs = nullptr; // chi2/dof vs number of stubs
95  MonitorElement *Track_HQ_Chi2Red_Eta = nullptr; // chi2/dof vs eta of track
96  MonitorElement *Track_HQ_Eta_BarrelStubs = nullptr; // eta vs number of stubs in barrel
97  MonitorElement *Track_HQ_Eta_ECStubs = nullptr; // eta vs number of stubs in end caps
98  MonitorElement *Track_HQ_Chi2_Probability = nullptr; // chi2 probability
99 
100 private:
103 
104  unsigned int HQNStubs_;
105  double HQChi2dof_;
106  double HQBendChi2_;
108 };
109 
110 // constructors and destructor
112  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
113  ttTrackToken_ =
114  consumes<std::vector<TTTrack<Ref_Phase2TrackerDigi_>>>(conf_.getParameter<edm::InputTag>("TTTracksTag"));
115  HQNStubs_ = conf_.getParameter<int>("HQNStubs");
116  HQChi2dof_ = conf_.getParameter<double>("HQChi2dof");
117  HQBendChi2_ = conf_.getParameter<double>("HQBendChi2");
118 }
119 
121  // do anything here that needs to be done at desctruction time
122  // (e.g. close files, deallocate resources etc.)
123 }
124 
125 // member functions
126 
127 // ------------ method called for each event ------------
129  // L1 Primaries
131  iEvent.getByToken(ttTrackToken_, TTTrackHandle);
132 
134  unsigned int numAllTracks = 0;
135  unsigned int numHQTracks = 0;
136 
137  // Adding protection
138  if (!TTTrackHandle.isValid())
139  return;
140 
142  unsigned int tkCnt = 0;
143  for (const auto &iterTTTrack : *TTTrackHandle) {
144  edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>> tempTrackPtr(TTTrackHandle, tkCnt++);
145 
146  unsigned int nStubs = tempTrackPtr->getStubRefs().size();
147  int nBarrelStubs = 0;
148  int nECStubs = 0;
149 
150  float track_eta = tempTrackPtr->momentum().eta();
151  float track_d0 = tempTrackPtr->d0();
152  float track_bendchi2 = tempTrackPtr->stubPtConsistency();
153  float track_chi2 = tempTrackPtr->chi2();
154  float track_chi2dof = tempTrackPtr->chi2Red();
155  float track_chi2rz = tempTrackPtr->chi2Z();
156  float track_chi2rphi = tempTrackPtr->chi2XY();
157  int nLayersMissed = 0;
158  unsigned int hitPattern_ = (unsigned int)tempTrackPtr->hitPattern();
159 
160  int nbits = floor(log2(hitPattern_)) + 1;
161  int lay_i = 0;
162  bool seq = false;
163  for (int i = 0; i < nbits; i++) {
164  lay_i = ((1 << i) & hitPattern_) >> i; //0 or 1 in ith bit (right to left)
165  if (lay_i && !seq)
166  seq = true; //sequence starts when first 1 found
167  if (!lay_i && seq)
168  nLayersMissed++;
169  }
170 
171  std::vector<edm::Ref<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>, TTStub<Ref_Phase2TrackerDigi_>>>
172  theStubs = iterTTTrack.getStubRefs();
173  for (const auto &istub : theStubs) {
174  bool inBarrel = false;
175  bool inEC = false;
176 
177  if (istub->getDetId().subdetId() == StripSubdetector::TOB)
178  inBarrel = true;
179  else if (istub->getDetId().subdetId() == StripSubdetector::TID)
180  inEC = true;
181  if (inBarrel)
182  nBarrelStubs++;
183  else if (inEC)
184  nECStubs++;
185  } // end loop over stubs
186 
187  // HQ tracks: bendchi2<2.2 and chi2/dof<10
188  if (nStubs >= HQNStubs_ && track_chi2dof <= HQChi2dof_ && track_bendchi2 <= HQBendChi2_) {
189  numHQTracks++;
190 
191  Track_HQ_NStubs->Fill(nStubs);
192  Track_HQ_NLayersMissed->Fill(nLayersMissed);
193  Track_HQ_Eta_NStubs->Fill(track_eta, nStubs);
194  Track_HQ_Pt->Fill(tempTrackPtr->momentum().perp());
195  Track_HQ_Eta->Fill(track_eta);
196  Track_HQ_Phi->Fill(tempTrackPtr->momentum().phi());
197  Track_HQ_D0->Fill(track_d0);
198  Track_HQ_VtxZ->Fill(tempTrackPtr->z0());
199  Track_HQ_BendChi2->Fill(track_bendchi2);
200  Track_HQ_Chi2->Fill(track_chi2);
201  Track_HQ_Chi2RZ->Fill(track_chi2rz);
202  Track_HQ_Chi2RPhi->Fill(track_chi2rphi);
203  Track_HQ_Chi2Red->Fill(track_chi2dof);
204  Track_HQ_Chi2Red_NStubs->Fill(nStubs, track_chi2dof);
205  Track_HQ_Chi2Red_Eta->Fill(track_eta, track_chi2dof);
206  Track_HQ_Eta_BarrelStubs->Fill(track_eta, nBarrelStubs);
207  Track_HQ_Eta_ECStubs->Fill(track_eta, nECStubs);
209  }
210 
211  // All tracks (including HQ tracks)
212  numAllTracks++;
213  Track_All_NStubs->Fill(nStubs);
214  Track_All_NLayersMissed->Fill(nLayersMissed);
215  Track_All_Eta_NStubs->Fill(track_eta, nStubs);
216  Track_All_Pt->Fill(tempTrackPtr->momentum().perp());
217  Track_All_Eta->Fill(track_eta);
218  Track_All_Phi->Fill(tempTrackPtr->momentum().phi());
219  Track_All_D0->Fill(track_d0);
220  Track_All_VtxZ->Fill(tempTrackPtr->z0());
221  Track_All_BendChi2->Fill(track_bendchi2);
222  Track_All_Chi2->Fill(track_chi2);
223  Track_All_Chi2RZ->Fill(track_chi2rz);
224  Track_All_Chi2RPhi->Fill(track_chi2rphi);
225  Track_All_Chi2Red->Fill(track_chi2dof);
226  Track_All_Chi2Red_NStubs->Fill(nStubs, track_chi2dof);
227  Track_All_Chi2Red_Eta->Fill(track_eta, track_chi2dof);
228  Track_All_Eta_BarrelStubs->Fill(track_eta, nBarrelStubs);
229  Track_All_Eta_ECStubs->Fill(track_eta, nECStubs);
231 
232  } // End of loop over TTTracks
233 
234  Track_HQ_N->Fill(numHQTracks);
235  Track_All_N->Fill(numAllTracks);
236 } // end of method
237 
238 // ------------ method called once each job just before starting event loop
239 // ------------
240 // Creating all histograms for DQM file output
242  edm::Run const &run,
243  edm::EventSetup const &es) {
245 
247  iBooker.setCurrentFolder(topFolderName_ + "/Tracks/All");
248  // Nb of L1Tracks
249  HistoName = "Track_All_N";
250  edm::ParameterSet psTrack_N = conf_.getParameter<edm::ParameterSet>("TH1_NTracks");
251  Track_All_N = iBooker.book1D(HistoName,
252  HistoName,
253  psTrack_N.getParameter<int32_t>("Nbinsx"),
254  psTrack_N.getParameter<double>("xmin"),
255  psTrack_N.getParameter<double>("xmax"));
256  Track_All_N->setAxisTitle("# L1 Tracks", 1);
257  Track_All_N->setAxisTitle("# Events", 2);
258 
259  // Number of stubs
260  edm::ParameterSet psTrack_NStubs = conf_.getParameter<edm::ParameterSet>("TH1_NStubs");
261  HistoName = "Track_All_NStubs";
263  HistoName,
264  psTrack_NStubs.getParameter<int32_t>("Nbinsx"),
265  psTrack_NStubs.getParameter<double>("xmin"),
266  psTrack_NStubs.getParameter<double>("xmax"));
267  Track_All_NStubs->setAxisTitle("# L1 Stubs per L1 Track", 1);
268  Track_All_NStubs->setAxisTitle("# L1 Tracks", 2);
269 
270  // Number of layers missed
271  HistoName = "Track_All_NLayersMissed";
273  HistoName,
274  psTrack_NStubs.getParameter<int32_t>("Nbinsx"),
275  psTrack_NStubs.getParameter<double>("xmin"),
276  psTrack_NStubs.getParameter<double>("xmax"));
277  Track_All_NLayersMissed->setAxisTitle("# Layers missed", 1);
278  Track_All_NLayersMissed->setAxisTitle("# L1 Tracks", 2);
279 
280  edm::ParameterSet psTrack_Eta_NStubs = conf_.getParameter<edm::ParameterSet>("TH2_Track_Eta_NStubs");
281  HistoName = "Track_All_Eta_NStubs";
283  HistoName,
284  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsx"),
285  psTrack_Eta_NStubs.getParameter<double>("xmin"),
286  psTrack_Eta_NStubs.getParameter<double>("xmax"),
287  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsy"),
288  psTrack_Eta_NStubs.getParameter<double>("ymin"),
289  psTrack_Eta_NStubs.getParameter<double>("ymax"));
291  Track_All_Eta_NStubs->setAxisTitle("# L1 Stubs", 2);
292 
293  // Pt of the tracks
294  edm::ParameterSet psTrack_Pt = conf_.getParameter<edm::ParameterSet>("TH1_Track_Pt");
295  HistoName = "Track_All_Pt";
296  Track_All_Pt = iBooker.book1D(HistoName,
297  HistoName,
298  psTrack_Pt.getParameter<int32_t>("Nbinsx"),
299  psTrack_Pt.getParameter<double>("xmin"),
300  psTrack_Pt.getParameter<double>("xmax"));
301  Track_All_Pt->setAxisTitle("p_{T} [GeV]", 1);
302  Track_All_Pt->setAxisTitle("# L1 Tracks", 2);
303 
304  // Phi
305  edm::ParameterSet psTrack_Phi = conf_.getParameter<edm::ParameterSet>("TH1_Track_Phi");
306  HistoName = "Track_All_Phi";
307  Track_All_Phi = iBooker.book1D(HistoName,
308  HistoName,
309  psTrack_Phi.getParameter<int32_t>("Nbinsx"),
310  psTrack_Phi.getParameter<double>("xmin"),
311  psTrack_Phi.getParameter<double>("xmax"));
312  Track_All_Phi->setAxisTitle("#phi", 1);
313  Track_All_Phi->setAxisTitle("# L1 Tracks", 2);
314 
315  // D0
316  edm::ParameterSet psTrack_D0 = conf_.getParameter<edm::ParameterSet>("TH1_Track_D0");
317  HistoName = "Track_All_D0";
318  Track_All_D0 = iBooker.book1D(HistoName,
319  HistoName,
320  psTrack_D0.getParameter<int32_t>("Nbinsx"),
321  psTrack_D0.getParameter<double>("xmin"),
322  psTrack_D0.getParameter<double>("xmax"));
323  Track_All_D0->setAxisTitle("Track D0", 1);
324  Track_All_D0->setAxisTitle("# L1 Tracks", 2);
325 
326  // Eta
327  edm::ParameterSet psTrack_Eta = conf_.getParameter<edm::ParameterSet>("TH1_Track_Eta");
328  HistoName = "Track_All_Eta";
329  Track_All_Eta = iBooker.book1D(HistoName,
330  HistoName,
331  psTrack_Eta.getParameter<int32_t>("Nbinsx"),
332  psTrack_Eta.getParameter<double>("xmin"),
333  psTrack_Eta.getParameter<double>("xmax"));
334  Track_All_Eta->setAxisTitle("#eta", 1);
335  Track_All_Eta->setAxisTitle("# L1 Tracks", 2);
336 
337  // VtxZ
338  edm::ParameterSet psTrack_VtxZ = conf_.getParameter<edm::ParameterSet>("TH1_Track_VtxZ");
339  HistoName = "Track_All_VtxZ";
340  Track_All_VtxZ = iBooker.book1D(HistoName,
341  HistoName,
342  psTrack_VtxZ.getParameter<int32_t>("Nbinsx"),
343  psTrack_VtxZ.getParameter<double>("xmin"),
344  psTrack_VtxZ.getParameter<double>("xmax"));
345  Track_All_VtxZ->setAxisTitle("L1 Track vertex position z [cm]", 1);
346  Track_All_VtxZ->setAxisTitle("# L1 Tracks", 2);
347 
348  // chi2
349  edm::ParameterSet psTrack_Chi2 = conf_.getParameter<edm::ParameterSet>("TH1_Track_Chi2");
350  HistoName = "Track_All_Chi2";
351  Track_All_Chi2 = iBooker.book1D(HistoName,
352  HistoName,
353  psTrack_Chi2.getParameter<int32_t>("Nbinsx"),
354  psTrack_Chi2.getParameter<double>("xmin"),
355  psTrack_Chi2.getParameter<double>("xmax"));
356  Track_All_Chi2->setAxisTitle("L1 Track #chi^{2}", 1);
357  Track_All_Chi2->setAxisTitle("# L1 Tracks", 2);
358 
359  // chi2 r-z
360  HistoName = "Track_All_Chi2RZ";
362  HistoName,
363  psTrack_Chi2.getParameter<int32_t>("Nbinsx"),
364  psTrack_Chi2.getParameter<double>("xmin"),
365  psTrack_Chi2.getParameter<double>("xmax"));
366  Track_All_Chi2RZ->setAxisTitle("L1 Track #chi^{2} r-z", 1);
367  Track_All_Chi2RZ->setAxisTitle("# L1 Tracks", 2);
368 
369  // chi2 r-phi
370  HistoName = "Track_All_Chi2RPhi";
372  HistoName,
373  psTrack_Chi2.getParameter<int32_t>("Nbinsx"),
374  psTrack_Chi2.getParameter<double>("xmin"),
375  psTrack_Chi2.getParameter<double>("xmax"));
376  Track_All_Chi2RPhi->setAxisTitle("L1 Track #chi^{2}", 1);
377  Track_All_Chi2RPhi->setAxisTitle("# L1 Tracks", 2);
378 
379  // Bendchi2
380  edm::ParameterSet psTrack_Chi2R = conf_.getParameter<edm::ParameterSet>("TH1_Track_Chi2R");
381  HistoName = "Track_All_BendChi2";
383  HistoName,
384  psTrack_Chi2R.getParameter<int32_t>("Nbinsx"),
385  psTrack_Chi2R.getParameter<double>("xmin"),
386  psTrack_Chi2R.getParameter<double>("xmax"));
387  Track_All_BendChi2->setAxisTitle("L1 Track Bend #chi^{2}", 1);
388  Track_All_BendChi2->setAxisTitle("# L1 Tracks", 2);
389 
390  // chi2Red
391  edm::ParameterSet psTrack_Chi2Red = conf_.getParameter<edm::ParameterSet>("TH1_Track_Chi2R");
392  HistoName = "Track_All_Chi2Red";
394  HistoName,
395  psTrack_Chi2R.getParameter<int32_t>("Nbinsx"),
396  psTrack_Chi2R.getParameter<double>("xmin"),
397  psTrack_Chi2R.getParameter<double>("xmax"));
398  Track_All_Chi2Red->setAxisTitle("L1 Track #chi^{2}/ndf", 1);
399  Track_All_Chi2Red->setAxisTitle("# L1 Tracks", 2);
400 
401  // Chi2 prob
402  edm::ParameterSet psTrack_Chi2_Probability = conf_.getParameter<edm::ParameterSet>("TH1_Track_Chi2_Probability");
403  HistoName = "Track_All_Chi2_Probability";
405  HistoName,
406  psTrack_Chi2_Probability.getParameter<int32_t>("Nbinsx"),
407  psTrack_Chi2_Probability.getParameter<double>("xmin"),
408  psTrack_Chi2_Probability.getParameter<double>("xmax"));
409  Track_All_Chi2_Probability->setAxisTitle("#chi^{2} probability", 1);
410  Track_All_Chi2_Probability->setAxisTitle("# L1 Tracks", 2);
411 
412  // Reduced chi2 vs #stubs
413  edm::ParameterSet psTrack_Chi2R_NStubs = conf_.getParameter<edm::ParameterSet>("TH2_Track_Chi2R_NStubs");
414  HistoName = "Track_All_Chi2Red_NStubs";
416  HistoName,
417  psTrack_Chi2R_NStubs.getParameter<int32_t>("Nbinsx"),
418  psTrack_Chi2R_NStubs.getParameter<double>("xmin"),
419  psTrack_Chi2R_NStubs.getParameter<double>("xmax"),
420  psTrack_Chi2R_NStubs.getParameter<int32_t>("Nbinsy"),
421  psTrack_Chi2R_NStubs.getParameter<double>("ymin"),
422  psTrack_Chi2R_NStubs.getParameter<double>("ymax"));
423  Track_All_Chi2Red_NStubs->setAxisTitle("# L1 Stubs", 1);
424  Track_All_Chi2Red_NStubs->setAxisTitle("L1 Track #chi^{2}/ndf", 2);
425 
426  // chi2/dof vs eta
427  edm::ParameterSet psTrack_Chi2R_Eta = conf_.getParameter<edm::ParameterSet>("TH2_Track_Chi2R_Eta");
428  HistoName = "Track_All_Chi2Red_Eta";
430  HistoName,
431  psTrack_Chi2R_Eta.getParameter<int32_t>("Nbinsx"),
432  psTrack_Chi2R_Eta.getParameter<double>("xmin"),
433  psTrack_Chi2R_Eta.getParameter<double>("xmax"),
434  psTrack_Chi2R_Eta.getParameter<int32_t>("Nbinsy"),
435  psTrack_Chi2R_Eta.getParameter<double>("ymin"),
436  psTrack_Chi2R_Eta.getParameter<double>("ymax"));
438  Track_All_Chi2Red_Eta->setAxisTitle("L1 Track #chi^{2}/ndf", 2);
439 
440  // Eta vs #stubs in barrel
441  HistoName = "Track_All_Eta_BarrelStubs";
443  HistoName,
444  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsx"),
445  psTrack_Eta_NStubs.getParameter<double>("xmin"),
446  psTrack_Eta_NStubs.getParameter<double>("xmax"),
447  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsy"),
448  psTrack_Eta_NStubs.getParameter<double>("ymin"),
449  psTrack_Eta_NStubs.getParameter<double>("ymax"));
451  Track_All_Eta_BarrelStubs->setAxisTitle("# L1 Barrel Stubs", 2);
452 
453  // Eta vs #stubs in EC
454  HistoName = "Track_LQ_Eta_ECStubs";
456  HistoName,
457  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsx"),
458  psTrack_Eta_NStubs.getParameter<double>("xmin"),
459  psTrack_Eta_NStubs.getParameter<double>("xmax"),
460  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsy"),
461  psTrack_Eta_NStubs.getParameter<double>("ymin"),
462  psTrack_Eta_NStubs.getParameter<double>("ymax"));
464  Track_All_Eta_ECStubs->setAxisTitle("# L1 EC Stubs", 2);
465 
467  iBooker.setCurrentFolder(topFolderName_ + "/Tracks/HQ");
468  // Nb of L1Tracks
469  HistoName = "Track_HQ_N";
470  Track_HQ_N = iBooker.book1D(HistoName,
471  HistoName,
472  psTrack_N.getParameter<int32_t>("Nbinsx"),
473  psTrack_N.getParameter<double>("xmin"),
474  psTrack_N.getParameter<double>("xmax"));
475  Track_HQ_N->setAxisTitle("# L1 Tracks", 1);
476  Track_HQ_N->setAxisTitle("# Events", 2);
477 
478  // Number of stubs
479  HistoName = "Track_HQ_NStubs";
480  Track_HQ_NStubs = iBooker.book1D(HistoName,
481  HistoName,
482  psTrack_NStubs.getParameter<int32_t>("Nbinsx"),
483  psTrack_NStubs.getParameter<double>("xmin"),
484  psTrack_NStubs.getParameter<double>("xmax"));
485  Track_HQ_NStubs->setAxisTitle("# L1 Stubs per L1 Track", 1);
486  Track_HQ_NStubs->setAxisTitle("# L1 Tracks", 2);
487 
488  // Number of layers missed
489  HistoName = "Track_HQ_NLayersMissed";
491  HistoName,
492  psTrack_NStubs.getParameter<int32_t>("Nbinsx"),
493  psTrack_NStubs.getParameter<double>("xmin"),
494  psTrack_NStubs.getParameter<double>("xmax"));
495  Track_HQ_NLayersMissed->setAxisTitle("# Layers missed", 1);
496  Track_HQ_NLayersMissed->setAxisTitle("# L1 Tracks", 2);
497 
498  // Track eta vs #stubs
499  HistoName = "Track_HQ_Eta_NStubs";
501  HistoName,
502  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsx"),
503  psTrack_Eta_NStubs.getParameter<double>("xmin"),
504  psTrack_Eta_NStubs.getParameter<double>("xmax"),
505  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsy"),
506  psTrack_Eta_NStubs.getParameter<double>("ymin"),
507  psTrack_Eta_NStubs.getParameter<double>("ymax"));
508  Track_HQ_Eta_NStubs->setAxisTitle("#eta", 1);
509  Track_HQ_Eta_NStubs->setAxisTitle("# L1 Stubs", 2);
510 
511  // Pt of the tracks
512  HistoName = "Track_HQ_Pt";
513  Track_HQ_Pt = iBooker.book1D(HistoName,
514  HistoName,
515  psTrack_Pt.getParameter<int32_t>("Nbinsx"),
516  psTrack_Pt.getParameter<double>("xmin"),
517  psTrack_Pt.getParameter<double>("xmax"));
518  Track_HQ_Pt->setAxisTitle("p_{T} [GeV]", 1);
519  Track_HQ_Pt->setAxisTitle("# L1 Tracks", 2);
520 
521  // Phi
522  HistoName = "Track_HQ_Phi";
523  Track_HQ_Phi = iBooker.book1D(HistoName,
524  HistoName,
525  psTrack_Phi.getParameter<int32_t>("Nbinsx"),
526  psTrack_Phi.getParameter<double>("xmin"),
527  psTrack_Phi.getParameter<double>("xmax"));
528  Track_HQ_Phi->setAxisTitle("#phi", 1);
529  Track_HQ_Phi->setAxisTitle("# L1 Tracks", 2);
530 
531  // D0
532  HistoName = "Track_HQ_D0";
533  Track_HQ_D0 = iBooker.book1D(HistoName,
534  HistoName,
535  psTrack_D0.getParameter<int32_t>("Nbinsx"),
536  psTrack_D0.getParameter<double>("xmin"),
537  psTrack_D0.getParameter<double>("xmax"));
538  Track_HQ_D0->setAxisTitle("Track D0", 1);
539  Track_HQ_D0->setAxisTitle("# L1 Tracks", 2);
540 
541  // Eta
542  HistoName = "Track_HQ_Eta";
543  Track_HQ_Eta = iBooker.book1D(HistoName,
544  HistoName,
545  psTrack_Eta.getParameter<int32_t>("Nbinsx"),
546  psTrack_Eta.getParameter<double>("xmin"),
547  psTrack_Eta.getParameter<double>("xmax"));
548  Track_HQ_Eta->setAxisTitle("#eta", 1);
549  Track_HQ_Eta->setAxisTitle("# L1 Tracks", 2);
550 
551  // VtxZ
552  HistoName = "Track_HQ_VtxZ";
553  Track_HQ_VtxZ = iBooker.book1D(HistoName,
554  HistoName,
555  psTrack_VtxZ.getParameter<int32_t>("Nbinsx"),
556  psTrack_VtxZ.getParameter<double>("xmin"),
557  psTrack_VtxZ.getParameter<double>("xmax"));
558  Track_HQ_VtxZ->setAxisTitle("L1 Track vertex position z [cm]", 1);
559  Track_HQ_VtxZ->setAxisTitle("# L1 Tracks", 2);
560 
561  // chi2
562  HistoName = "Track_HQ_Chi2";
563  Track_HQ_Chi2 = iBooker.book1D(HistoName,
564  HistoName,
565  psTrack_Chi2.getParameter<int32_t>("Nbinsx"),
566  psTrack_Chi2.getParameter<double>("xmin"),
567  psTrack_Chi2.getParameter<double>("xmax"));
568  Track_HQ_Chi2->setAxisTitle("L1 Track #chi^{2}", 1);
569  Track_HQ_Chi2->setAxisTitle("# L1 Tracks", 2);
570 
571  // Bendchi2
572  HistoName = "Track_HQ_BendChi2";
574  HistoName,
575  psTrack_Chi2R.getParameter<int32_t>("Nbinsx"),
576  psTrack_Chi2R.getParameter<double>("xmin"),
577  psTrack_Chi2R.getParameter<double>("xmax"));
578  Track_HQ_BendChi2->setAxisTitle("L1 Track Bend #chi^{2}", 1);
579  Track_HQ_BendChi2->setAxisTitle("# L1 Tracks", 2);
580 
581  // chi2 r-z
582  HistoName = "Track_HQ_Chi2RZ";
583  Track_HQ_Chi2RZ = iBooker.book1D(HistoName,
584  HistoName,
585  psTrack_Chi2.getParameter<int32_t>("Nbinsx"),
586  psTrack_Chi2.getParameter<double>("xmin"),
587  psTrack_Chi2.getParameter<double>("xmax"));
588  Track_HQ_Chi2RZ->setAxisTitle("L1 Track #chi^{2} r-z", 1);
589  Track_HQ_Chi2RZ->setAxisTitle("# L1 Tracks", 2);
590 
591  HistoName = "Track_HQ_Chi2RPhi";
593  HistoName,
594  psTrack_Chi2.getParameter<int32_t>("Nbinsx"),
595  psTrack_Chi2.getParameter<double>("xmin"),
596  psTrack_Chi2.getParameter<double>("xmax"));
597  Track_HQ_Chi2RPhi->setAxisTitle("L1 Track #chi^{2} r-phi", 1);
598  Track_HQ_Chi2RPhi->setAxisTitle("# L1 Tracks", 2);
599 
600  // chi2Red
601  HistoName = "Track_HQ_Chi2Red";
603  HistoName,
604  psTrack_Chi2R.getParameter<int32_t>("Nbinsx"),
605  psTrack_Chi2R.getParameter<double>("xmin"),
606  psTrack_Chi2R.getParameter<double>("xmax"));
607  Track_HQ_Chi2Red->setAxisTitle("L1 Track #chi^{2}/ndf", 1);
608  Track_HQ_Chi2Red->setAxisTitle("# L1 Tracks", 2);
609 
610  // Chi2 prob
611  HistoName = "Track_HQ_Chi2_Probability";
613  HistoName,
614  psTrack_Chi2_Probability.getParameter<int32_t>("Nbinsx"),
615  psTrack_Chi2_Probability.getParameter<double>("xmin"),
616  psTrack_Chi2_Probability.getParameter<double>("xmax"));
617  Track_HQ_Chi2_Probability->setAxisTitle("#chi^{2} probability", 1);
618  Track_HQ_Chi2_Probability->setAxisTitle("# L1 Tracks", 2);
619 
620  // Reduced chi2 vs #stubs
621  HistoName = "Track_HQ_Chi2Red_NStubs";
623  HistoName,
624  psTrack_Chi2R_NStubs.getParameter<int32_t>("Nbinsx"),
625  psTrack_Chi2R_NStubs.getParameter<double>("xmin"),
626  psTrack_Chi2R_NStubs.getParameter<double>("xmax"),
627  psTrack_Chi2R_NStubs.getParameter<int32_t>("Nbinsy"),
628  psTrack_Chi2R_NStubs.getParameter<double>("ymin"),
629  psTrack_Chi2R_NStubs.getParameter<double>("ymax"));
630  Track_HQ_Chi2Red_NStubs->setAxisTitle("# L1 Stubs", 1);
631  Track_HQ_Chi2Red_NStubs->setAxisTitle("L1 Track #chi^{2}/ndf", 2);
632 
633  // chi2/dof vs eta
634  HistoName = "Track_HQ_Chi2Red_Eta";
636  HistoName,
637  psTrack_Chi2R_Eta.getParameter<int32_t>("Nbinsx"),
638  psTrack_Chi2R_Eta.getParameter<double>("xmin"),
639  psTrack_Chi2R_Eta.getParameter<double>("xmax"),
640  psTrack_Chi2R_Eta.getParameter<int32_t>("Nbinsy"),
641  psTrack_Chi2R_Eta.getParameter<double>("ymin"),
642  psTrack_Chi2R_Eta.getParameter<double>("ymax"));
644  Track_HQ_Chi2Red_Eta->setAxisTitle("L1 Track #chi^{2}/ndf", 2);
645 
646  // eta vs #stubs in barrel
647  HistoName = "Track_HQ_Eta_BarrelStubs";
649  HistoName,
650  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsx"),
651  psTrack_Eta_NStubs.getParameter<double>("xmin"),
652  psTrack_Eta_NStubs.getParameter<double>("xmax"),
653  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsy"),
654  psTrack_Eta_NStubs.getParameter<double>("ymin"),
655  psTrack_Eta_NStubs.getParameter<double>("ymax"));
657  Track_HQ_Eta_BarrelStubs->setAxisTitle("# L1 Barrel Stubs", 2);
658 
659  // eta vs #stubs in EC
660  HistoName = "Track_HQ_Eta_ECStubs";
662  HistoName,
663  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsx"),
664  psTrack_Eta_NStubs.getParameter<double>("xmin"),
665  psTrack_Eta_NStubs.getParameter<double>("xmax"),
666  psTrack_Eta_NStubs.getParameter<int32_t>("Nbinsy"),
667  psTrack_Eta_NStubs.getParameter<double>("ymin"),
668  psTrack_Eta_NStubs.getParameter<double>("ymax"));
670  Track_HQ_Eta_ECStubs->setAxisTitle("# L1 EC Stubs", 2);
671 
672 } // end of method
673 
OuterTrackerMonitorTTTrack::Track_HQ_Eta_BarrelStubs
MonitorElement * Track_HQ_Eta_BarrelStubs
Definition: OuterTrackerMonitorTTTrack.cc:96
OuterTrackerMonitorTTTrack::Track_All_NStubs
MonitorElement * Track_All_NStubs
Definition: OuterTrackerMonitorTTTrack.cc:58
OuterTrackerMonitorTTTrack::Track_HQ_Chi2Red_NStubs
MonitorElement * Track_HQ_Chi2Red_NStubs
Definition: OuterTrackerMonitorTTTrack.cc:94
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
OuterTrackerMonitorTTTrack::Track_HQ_N
MonitorElement * Track_HQ_N
High-quality TTTracks; different depending on prompt vs displaced tracks.
Definition: OuterTrackerMonitorTTTrack.cc:80
mps_fire.i
i
Definition: mps_fire.py:428
StripGeomDetUnit.h
MessageLogger.h
OuterTrackerMonitorTTTrack::Track_HQ_BendChi2
MonitorElement * Track_HQ_BendChi2
Definition: OuterTrackerMonitorTTTrack.cc:89
cmsswSequenceInfo.seq
seq
Definition: cmsswSequenceInfo.py:539
TrackerGeometry.h
OuterTrackerMonitorTTTrack::Track_HQ_Chi2Red
MonitorElement * Track_HQ_Chi2Red
Definition: OuterTrackerMonitorTTTrack.cc:91
OuterTrackerMonitorTTTrack::Track_HQ_Eta_ECStubs
MonitorElement * Track_HQ_Eta_ECStubs
Definition: OuterTrackerMonitorTTTrack.cc:97
ESHandle.h
OuterTrackerMonitorTTTrack::Track_HQ_Chi2_Probability
MonitorElement * Track_HQ_Chi2_Probability
Definition: OuterTrackerMonitorTTTrack.cc:98
OuterTrackerMonitorTTTrack::HQChi2dof_
double HQChi2dof_
Definition: OuterTrackerMonitorTTTrack.cc:105
TTTypes.h
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
ChiSquaredProbability
float ChiSquaredProbability(double chiSquared, double nrDOF)
Definition: ChiSquaredProbability.cc:13
OuterTrackerMonitorTTTrack::Track_All_Chi2Red_Eta
MonitorElement * Track_All_Chi2Red_Eta
Definition: OuterTrackerMonitorTTTrack.cc:72
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
OuterTrackerMonitorTTTrack::Track_All_Phi
MonitorElement * Track_All_Phi
Definition: OuterTrackerMonitorTTTrack.cc:63
ChiSquaredProbability.h
OuterTrackerMonitorTTTrack::topFolderName_
std::string topFolderName_
Definition: OuterTrackerMonitorTTTrack.cc:107
DQMStore.h
EDAnalyzer.h
OuterTrackerMonitorTTTrack::Track_All_Eta_NStubs
MonitorElement * Track_All_Eta_NStubs
Definition: OuterTrackerMonitorTTTrack.cc:60
OuterTrackerMonitorTTTrack
Definition: OuterTrackerMonitorTTTrack.cc:49
edm::Handle
Definition: AssociativeIterator.h:50
TTClusterAssociationMap.h
OuterTrackerMonitorTTTrack::Track_HQ_Chi2RZ
MonitorElement * Track_HQ_Chi2RZ
Definition: OuterTrackerMonitorTTTrack.cc:92
OuterTrackerMonitorTTTrack::Track_All_Chi2Red_NStubs
MonitorElement * Track_All_Chi2Red_NStubs
Definition: OuterTrackerMonitorTTTrack.cc:71
OuterTrackerMonitorTTTrack::Track_HQ_Eta
MonitorElement * Track_HQ_Eta
Definition: OuterTrackerMonitorTTTrack.cc:85
OuterTrackerMonitorTTTrack::Track_HQ_Chi2
MonitorElement * Track_HQ_Chi2
Definition: OuterTrackerMonitorTTTrack.cc:90
MakerMacros.h
TrackerTopology.h
OuterTrackerMonitorTTTrack::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: OuterTrackerMonitorTTTrack.cc:241
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
OuterTrackerMonitorTTTrack::Track_All_BendChi2
MonitorElement * Track_All_BendChi2
Definition: OuterTrackerMonitorTTTrack.cc:66
OuterTrackerMonitorTTTrack::Track_HQ_NStubs
MonitorElement * Track_HQ_NStubs
Definition: OuterTrackerMonitorTTTrack.cc:81
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
TTStub
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
OuterTrackerMonitorTTTrack::Track_HQ_VtxZ
MonitorElement * Track_HQ_VtxZ
Definition: OuterTrackerMonitorTTTrack.cc:88
OuterTrackerMonitorTTTrack::Track_HQ_NLayersMissed
MonitorElement * Track_HQ_NLayersMissed
Definition: OuterTrackerMonitorTTTrack.cc:82
OuterTrackerMonitorTTTrack::Track_HQ_Chi2RPhi
MonitorElement * Track_HQ_Chi2RPhi
Definition: OuterTrackerMonitorTTTrack.cc:93
TTTrack.h
EDGetToken.h
DQMEDAnalyzer.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
OuterTrackerMonitorTTTrack::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: OuterTrackerMonitorTTTrack.cc:128
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
OuterTrackerMonitorTTTrack::Track_All_Eta_BarrelStubs
MonitorElement * Track_All_Eta_BarrelStubs
Definition: OuterTrackerMonitorTTTrack.cc:73
OuterTrackerMonitorTTTrack::HQNStubs_
unsigned int HQNStubs_
Definition: OuterTrackerMonitorTTTrack.cc:104
TrackerDigiGeometryRecord.h
OuterTrackerMonitorTTTrack::OuterTrackerMonitorTTTrack
OuterTrackerMonitorTTTrack(const edm::ParameterSet &)
Definition: OuterTrackerMonitorTTTrack.cc:111
OuterTrackerMonitorTTTrack::Track_All_Chi2Red
MonitorElement * Track_All_Chi2Red
Definition: OuterTrackerMonitorTTTrack.cc:68
OuterTrackerMonitorTTTrack::Track_All_Chi2_Probability
MonitorElement * Track_All_Chi2_Probability
Definition: OuterTrackerMonitorTTTrack.cc:75
edm::ParameterSet
Definition: ParameterSet.h:47
OuterTrackerMonitorTTTrack::Track_All_D0
MonitorElement * Track_All_D0
Definition: OuterTrackerMonitorTTTrack.cc:64
OuterTrackerMonitorTTTrack::Track_All_Chi2RZ
MonitorElement * Track_All_Chi2RZ
Definition: OuterTrackerMonitorTTTrack.cc:69
OuterTrackerMonitorTTTrack::Track_HQ_Pt
MonitorElement * Track_HQ_Pt
Definition: OuterTrackerMonitorTTTrack.cc:84
Event.h
OuterTrackerMonitorTTTrack::Track_All_Chi2
MonitorElement * Track_All_Chi2
Definition: OuterTrackerMonitorTTTrack.cc:67
OuterTrackerMonitorTTTrack::Track_All_Pt
MonitorElement * Track_All_Pt
Definition: OuterTrackerMonitorTTTrack.cc:61
OuterTrackerMonitorTTTrack::Track_HQ_Phi
MonitorElement * Track_HQ_Phi
Definition: OuterTrackerMonitorTTTrack.cc:86
OuterTrackerMonitorTTTrack::Track_All_Eta_ECStubs
MonitorElement * Track_All_Eta_ECStubs
Definition: OuterTrackerMonitorTTTrack.cc:74
Ptr.h
createfilelist.int
int
Definition: createfilelist.py:10
OuterTrackerMonitorTTTrack::Track_All_Chi2RPhi
MonitorElement * Track_All_Chi2RPhi
Definition: OuterTrackerMonitorTTTrack.cc:70
iEvent
int iEvent
Definition: GenABIO.cc:224
TTStubAssociationMap.h
cscdqm::HistoName
std::string HistoName
Definition: CSCDQM_HistoDef.h:32
edm::EventSetup
Definition: EventSetup.h:57
DetSetVector.h
OuterTrackerMonitorTTTrack::Track_All_NLayersMissed
MonitorElement * Track_All_NLayersMissed
Definition: OuterTrackerMonitorTTTrack.cc:59
OuterTrackerMonitorTTTrack::Track_HQ_D0
MonitorElement * Track_HQ_D0
Definition: OuterTrackerMonitorTTTrack.cc:87
OuterTrackerMonitorTTTrack::~OuterTrackerMonitorTTTrack
~OuterTrackerMonitorTTTrack() override
Definition: OuterTrackerMonitorTTTrack.cc:120
TTCluster.h
edm::Ptr
Definition: AssociationVector.h:31
OuterTrackerMonitorTTTrack::Track_All_VtxZ
MonitorElement * Track_All_VtxZ
Definition: OuterTrackerMonitorTTTrack.cc:65
TrackingParticle.h
GeomDet.h
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Ref.h
TTTrackAssociationMap.h
Frameworkfwd.h
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
OuterTrackerMonitorTTTrack::HQBendChi2_
double HQBendChi2_
Definition: OuterTrackerMonitorTTTrack.cc:106
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
OuterTrackerMonitorTTTrack::conf_
edm::ParameterSet conf_
Definition: OuterTrackerMonitorTTTrack.cc:101
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
TTStub.h
OuterTrackerMonitorTTTrack::Track_All_Eta
MonitorElement * Track_All_Eta
Definition: OuterTrackerMonitorTTTrack.cc:62
ParameterSet.h
OuterTrackerMonitorTTTrack::Track_HQ_Eta_NStubs
MonitorElement * Track_HQ_Eta_NStubs
Definition: OuterTrackerMonitorTTTrack.cc:83
OuterTrackerMonitorTTTrack::ttTrackToken_
edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > ttTrackToken_
Definition: OuterTrackerMonitorTTTrack.cc:102
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
StripSubdetector.h
DetSetVectorNew.h
edm::InputTag
Definition: InputTag.h:15
OuterTrackerMonitorTTTrack::Track_All_N
MonitorElement * Track_All_N
Low-quality TTTracks (All tracks)
Definition: OuterTrackerMonitorTTTrack.cc:57
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
OuterTrackerMonitorTTTrack::Track_HQ_Chi2Red_Eta
MonitorElement * Track_HQ_Chi2Red_Eta
Definition: OuterTrackerMonitorTTTrack.cc:95