CMS 3D CMS Logo

OuterTrackerMonitorTrackingParticles.cc
Go to the documentation of this file.
1 // Package: SiOuterTrackerV
2 // Class: SiOuterTrackerV
3 
4 // Original Author: Emily MacDonald
5 
6 // system include files
7 #include <fstream>
8 #include <iostream>
9 #include <memory>
10 #include <numeric>
11 #include <vector>
12 
13 // user include files
34 
36 
37 //
38 // constructors and destructor
39 //
41  : m_topoToken(esConsumes()), conf_(iConfig) {
42  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
44  consumes<std::vector<TrackingParticle>>(conf_.getParameter<edm::InputTag>("trackingParticleToken"));
46  consumes<TTStubAssociationMap<Ref_Phase2TrackerDigi_>>(conf_.getParameter<edm::InputTag>("MCTruthStubInputTag"));
47  ttClusterMCTruthToken_ = consumes<TTClusterAssociationMap<Ref_Phase2TrackerDigi_>>(
48  conf_.getParameter<edm::InputTag>("MCTruthClusterInputTag"));
49  ttTrackMCTruthToken_ = consumes<TTTrackAssociationMap<Ref_Phase2TrackerDigi_>>(
50  conf_.getParameter<edm::InputTag>("MCTruthTrackInputTag"));
51  L1Tk_minNStub = conf_.getParameter<int>("L1Tk_minNStub"); // min number of stubs in the track
52  L1Tk_maxChi2dof = conf_.getParameter<double>("L1Tk_maxChi2dof"); // maximum chi2/dof of the track
53  TP_minNStub = conf_.getParameter<int>("TP_minNStub"); // min number of stubs in the tracking particle to
54  //min number of layers with stubs in the tracking particle to consider matching
55  TP_minNLayersStub = conf_.getParameter<int>("TP_minNLayersStub");
56  TP_minPt = conf_.getParameter<double>("TP_minPt"); // min pT to consider matching
57  TP_maxEta = conf_.getParameter<double>("TP_maxEta"); // max eta to consider matching
58  TP_maxVtxZ = conf_.getParameter<double>("TP_maxVtxZ"); // max vertZ (or z0) to consider matching
59 }
60 
62 
63 // member functions
64 
65 // ------------ method called for each event ------------
67  // Tracking Particles
68  edm::Handle<std::vector<TrackingParticle>> trackingParticleHandle;
69  iEvent.getByToken(trackingParticleToken_, trackingParticleHandle);
70 
71  // Truth Association Maps
73  iEvent.getByToken(ttTrackMCTruthToken_, MCTruthTTTrackHandle);
75  iEvent.getByToken(ttClusterMCTruthToken_, MCTruthTTClusterHandle);
77  iEvent.getByToken(ttStubMCTruthToken_, MCTruthTTStubHandle);
78 
79  // Geometries
80  const TrackerTopology *const tTopo = &iSetup.getData(m_topoToken);
81 
82  // Loop over tracking particles
83  int this_tp = 0;
84  for (const auto &iterTP : *trackingParticleHandle) {
85  edm::Ptr<TrackingParticle> tp_ptr(trackingParticleHandle, this_tp);
86  this_tp++;
87 
88  // int tmp_eventid = iterTP.eventId().event();
89  float tmp_tp_pt = iterTP.pt();
90  float tmp_tp_phi = iterTP.phi();
91  float tmp_tp_eta = iterTP.eta();
92 
93  //Calculate nLayers variable
94  std::vector<edm::Ref<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>, TTStub<Ref_Phase2TrackerDigi_>>>
95  theStubRefs = MCTruthTTStubHandle->findTTStubRefs(tp_ptr);
96 
97  int hasStubInLayer[11] = {0};
98  for (unsigned int is = 0; is < theStubRefs.size(); is++) {
99  DetId detid(theStubRefs.at(is)->getDetId());
100  int layer = -1;
101  if (detid.subdetId() == StripSubdetector::TOB)
102  layer = static_cast<int>(tTopo->layer(detid)) - 1; //fill in array as entries 0-5
103  else if (detid.subdetId() == StripSubdetector::TID)
104  layer = static_cast<int>(tTopo->layer(detid)) + 5; //fill in array as entries 6-10
105 
106  //treat genuine stubs separately (==2 is genuine, ==1 is not)
107  if (MCTruthTTStubHandle->findTrackingParticlePtr(theStubRefs.at(is)).isNull() && hasStubInLayer[layer] < 2)
108  hasStubInLayer[layer] = 1;
109  else
110  hasStubInLayer[layer] = 2;
111  }
112 
113  int nStubLayerTP = 0;
114  for (int isum = 0; isum < 11; isum++) {
115  if (hasStubInLayer[isum] >= 1)
116  nStubLayerTP += 1;
117  }
118 
119  if (std::fabs(tmp_tp_eta) > TP_maxEta)
120  continue;
121  // Fill the 1D distribution plots for tracking particles, to monitor change in stub definition
122  if (tmp_tp_pt > TP_minPt && nStubLayerTP >= TP_minNLayersStub) {
123  trackParts_Pt->Fill(tmp_tp_pt);
124  trackParts_Eta->Fill(tmp_tp_eta);
125  trackParts_Phi->Fill(tmp_tp_phi);
126  }
127 
128  // if (TP_select_eventid == 0 && tmp_eventid != 0)
129  // continue; //only care about tracking particles from the primary interaction for efficiency/resolution
130  int nStubTP = -1;
131  if (MCTruthTTStubHandle.isValid()) {
132  std::vector<edm::Ref<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>, TTStub<Ref_Phase2TrackerDigi_>>>
133  theStubRefs = MCTruthTTStubHandle->findTTStubRefs(tp_ptr);
134  nStubTP = (int)theStubRefs.size();
135  }
136  if (MCTruthTTClusterHandle.isValid() && MCTruthTTClusterHandle->findTTClusterRefs(tp_ptr).empty())
137  continue;
138 
139  float tmp_tp_vz = iterTP.vz();
140  float tmp_tp_vx = iterTP.vx();
141  float tmp_tp_vy = iterTP.vy();
142  float tmp_tp_charge = tp_ptr->charge();
143  int tmp_tp_pdgid = iterTP.pdgId();
144 
145  // ----------------------------------------------------------------------------------------------
146  // calculate d0 and VtxZ propagated back to the IP, pass if greater than max
147  // VtxZ
148  float tmp_tp_t = tan(2.0 * atan(1.0) - 2.0 * atan(exp(-tmp_tp_eta)));
149  float delx = -tmp_tp_vx;
150  float dely = -tmp_tp_vy;
151  float K = 0.01 * 0.5696 / tmp_tp_pt * tmp_tp_charge; // curvature correction
152  float A = 1. / (2. * K);
153  float tmp_tp_x0p = delx - A * sin(tmp_tp_phi);
154  float tmp_tp_y0p = dely + A * cos(tmp_tp_phi);
155  float tmp_tp_rp = sqrt(tmp_tp_x0p * tmp_tp_x0p + tmp_tp_y0p * tmp_tp_y0p);
156  static double pi = 4.0 * atan(1.0);
157  float delphi = tmp_tp_phi - atan2(-K * tmp_tp_x0p, K * tmp_tp_y0p);
158  if (delphi < -pi)
159  delphi += 2.0 * pi;
160  if (delphi > pi)
161  delphi -= 2.0 * pi;
162 
163  float tmp_tp_VtxZ = tmp_tp_vz + tmp_tp_t * delphi / (2.0 * K);
164  float tmp_tp_VtxR = sqrt(tmp_tp_vx * tmp_tp_vx + tmp_tp_vy * tmp_tp_vy);
165  float tmp_tp_d0 = tmp_tp_charge * tmp_tp_rp - (1. / (2. * K));
166 
167  // simpler formula for d0, in cases where the charge is zero:
168  // https://github.com/cms-sw/cmssw/blob/master/DataFormats/TrackReco/interface/TrackBase.h
169  float other_d0 = -tmp_tp_vx * sin(tmp_tp_phi) + tmp_tp_vy * cos(tmp_tp_phi);
170  tmp_tp_d0 = tmp_tp_d0 * (-1); // fix d0 sign
171  if (K == 0) {
172  tmp_tp_d0 = other_d0;
173  tmp_tp_VtxZ = tmp_tp_vz;
174  }
175  if (std::fabs(tmp_tp_VtxZ) > TP_maxVtxZ)
176  continue;
177 
178  // To make efficiency plots where the denominator has NO stub cuts
179  if (tmp_tp_VtxR < 1.0) {
180  tp_pt->Fill(tmp_tp_pt); //pT effic, no cut on pT, but VtxR cut
181  if (tmp_tp_pt <= 10)
182  tp_pt_zoom->Fill(tmp_tp_pt); //pT effic, no cut on pT, but VtxR cut
183  }
184  if (tmp_tp_pt < TP_minPt)
185  continue;
186  tp_VtxR->Fill(tmp_tp_VtxR); // VtxR efficiency has no cut on VtxR
187  if (tmp_tp_VtxR > 1.0)
188  continue;
189  tp_eta->Fill(tmp_tp_eta);
190  tp_d0->Fill(tmp_tp_d0);
191  tp_VtxZ->Fill(tmp_tp_VtxZ);
192 
193  if (nStubTP < TP_minNStub || nStubLayerTP < TP_minNLayersStub)
194  continue; //nStub cut not included in denominator of efficiency plots
195 
196  // ----------------------------------------------------------------------------------------------
197  // look for L1 tracks matched to the tracking particle
198  int tp_nMatch = 0;
199  int i_track = -1;
200  float i_chi2dof = 99999;
201  if (MCTruthTTTrackHandle.isValid()) {
202  std::vector<edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>>> matchedTracks =
203  MCTruthTTTrackHandle->findTTTrackPtrs(tp_ptr);
204 
205  // ----------------------------------------------------------------------------------------------
206  // loop over matched L1 tracks
207  // here, "match" means tracks that can be associated to a TrackingParticle
208  // with at least one hit of at least one of its clusters
209  // https://twiki.cern.ch/twiki/bin/viewauth/CMS/SLHCTrackerTriggerSWTools#MC_truth_for_TTTrack
210  int trkCounter = 0;
211  for (const auto &thisTrack : matchedTracks) {
212  if (!MCTruthTTTrackHandle->isGenuine(thisTrack))
213  continue;
214  // ----------------------------------------------------------------------------------------------
215  // further require L1 track to be (loosely) genuine, that there is only
216  // one TP matched to the track
217  // + have >= L1Tk_minNStub stubs for it to be a valid match
218  int tmp_trk_nstub = thisTrack->getStubRefs().size();
219  if (tmp_trk_nstub < L1Tk_minNStub)
220  continue;
221  float dmatch_pt = 999;
222  float dmatch_eta = 999;
223  float dmatch_phi = 999;
224  int match_id = 999;
225 
226  edm::Ptr<TrackingParticle> my_tp = MCTruthTTTrackHandle->findTrackingParticlePtr(thisTrack);
227  dmatch_pt = std::fabs(my_tp->p4().pt() - tmp_tp_pt);
228  dmatch_eta = std::fabs(my_tp->p4().eta() - tmp_tp_eta);
229  dmatch_phi = std::fabs(my_tp->p4().phi() - tmp_tp_phi);
230  match_id = my_tp->pdgId();
231  float tmp_trk_chi2dof = thisTrack->chi2Red();
232 
233  // ensure that track is uniquely matched to the TP we are looking at!
234  if (dmatch_pt < 0.1 && dmatch_eta < 0.1 && dmatch_phi < 0.1 && tmp_tp_pdgid == match_id) {
235  tp_nMatch++;
236  if (i_track < 0 || tmp_trk_chi2dof < i_chi2dof) {
237  i_track = trkCounter;
238  i_chi2dof = tmp_trk_chi2dof;
239  }
240  }
241  trkCounter++;
242  } // end loop over matched L1 tracks
243 
244  if (tp_nMatch < 1)
245  continue;
246  // Get information on the matched tracks
247  float tmp_matchtrk_pt = -999;
248  float tmp_matchtrk_eta = -999;
249  float tmp_matchtrk_phi = -999;
250  float tmp_matchtrk_VtxZ = -999;
251  float tmp_matchtrk_chi2dof = -999;
252  int tmp_matchTrk_nStub = -999;
253  float tmp_matchtrk_d0 = -999;
254 
255  tmp_matchtrk_pt = matchedTracks[i_track]->momentum().perp();
256  tmp_matchtrk_eta = matchedTracks[i_track]->momentum().eta();
257  tmp_matchtrk_phi = matchedTracks[i_track]->momentum().phi();
258  tmp_matchtrk_VtxZ = matchedTracks[i_track]->z0();
259  tmp_matchtrk_chi2dof = matchedTracks[i_track]->chi2Red();
260  tmp_matchTrk_nStub = (int)matchedTracks[i_track]->getStubRefs().size();
261 
262  //for d0
263  float tmp_matchtrk_x0 = matchedTracks[i_track]->POCA().x();
264  float tmp_matchtrk_y0 = matchedTracks[i_track]->POCA().y();
265  tmp_matchtrk_d0 = -tmp_matchtrk_x0 * sin(tmp_matchtrk_phi) + tmp_matchtrk_y0 * cos(tmp_matchtrk_phi);
266 
267  //Add cuts for the matched tracks, numerator
268  if (tmp_matchTrk_nStub < L1Tk_minNStub || tmp_matchtrk_chi2dof > L1Tk_maxChi2dof)
269  continue;
270 
271  // fill matched track histograms (if passes all criteria)
272  match_tp_pt->Fill(tmp_tp_pt);
273  if (tmp_tp_pt > 0 && tmp_tp_pt <= 10)
274  match_tp_pt_zoom->Fill(tmp_tp_pt);
275  match_tp_eta->Fill(tmp_tp_eta);
276  match_tp_d0->Fill(tmp_tp_d0);
277  match_tp_VtxR->Fill(tmp_tp_VtxR);
278  match_tp_VtxZ->Fill(tmp_tp_VtxZ);
279 
280  // Eta and pT histograms for resolution
281  float pt_diff = tmp_matchtrk_pt - tmp_tp_pt;
282  float pt_res = pt_diff / tmp_tp_pt;
283  float eta_res = tmp_matchtrk_eta - tmp_tp_eta;
284  float phi_res = tmp_matchtrk_phi - tmp_tp_phi;
285  float VtxZ_res = tmp_matchtrk_VtxZ - tmp_tp_VtxZ;
286  float d0_res = tmp_matchtrk_d0 - tmp_tp_d0;
287 
288  // fill total resolution histograms
289  res_pt->Fill(pt_diff);
290  res_ptRel->Fill(pt_res);
291  res_eta->Fill(eta_res);
292 
293  // Fill resolution plots for different abs(eta) bins:
294  // (0, 0.7), (0.7, 1.0), (1.0, 1.2), (1.2, 1.6), (1.6, 2.0), (2.0, 2.4)
295  if (std::fabs(tmp_tp_eta) >= 0 && std::fabs(tmp_tp_eta) < 0.7) {
296  reseta_eta0to0p7->Fill(eta_res);
297  resphi_eta0to0p7->Fill(phi_res);
298  resVtxZ_eta0to0p7->Fill(VtxZ_res);
299  resd0_eta0to0p7->Fill(d0_res);
300  if (tmp_tp_pt >= 2 && tmp_tp_pt < 3)
301  respt_eta0to0p7_pt2to3->Fill(pt_res);
302  else if (tmp_tp_pt >= 3 && tmp_tp_pt < 8)
303  respt_eta0to0p7_pt3to8->Fill(pt_res);
304  else if (tmp_tp_pt >= 8)
306  } else if (std::fabs(tmp_tp_eta) >= 0.7 && std::fabs(tmp_tp_eta) < 1.0) {
307  reseta_eta0p7to1->Fill(eta_res);
308  resphi_eta0p7to1->Fill(phi_res);
309  resVtxZ_eta0p7to1->Fill(VtxZ_res);
310  resd0_eta0p7to1->Fill(d0_res);
311  if (tmp_tp_pt >= 2 && tmp_tp_pt < 3)
312  respt_eta0p7to1_pt2to3->Fill(pt_res);
313  else if (tmp_tp_pt >= 3 && tmp_tp_pt < 8)
314  respt_eta0p7to1_pt3to8->Fill(pt_res);
315  else if (tmp_tp_pt >= 8)
317  } else if (std::fabs(tmp_tp_eta) >= 1.0 && std::fabs(tmp_tp_eta) < 1.2) {
318  reseta_eta1to1p2->Fill(eta_res);
319  resphi_eta1to1p2->Fill(phi_res);
320  resVtxZ_eta1to1p2->Fill(VtxZ_res);
321  resd0_eta1to1p2->Fill(d0_res);
322  if (tmp_tp_pt >= 2 && tmp_tp_pt < 3)
323  respt_eta1to1p2_pt2to3->Fill(pt_res);
324  else if (tmp_tp_pt >= 3 && tmp_tp_pt < 8)
325  respt_eta1to1p2_pt3to8->Fill(pt_res);
326  else if (tmp_tp_pt >= 8)
328  } else if (std::fabs(tmp_tp_eta) >= 1.2 && std::fabs(tmp_tp_eta) < 1.6) {
329  reseta_eta1p2to1p6->Fill(eta_res);
330  resphi_eta1p2to1p6->Fill(phi_res);
331  resVtxZ_eta1p2to1p6->Fill(VtxZ_res);
332  resd0_eta1p2to1p6->Fill(d0_res);
333  if (tmp_tp_pt >= 2 && tmp_tp_pt < 3)
335  else if (tmp_tp_pt >= 3 && tmp_tp_pt < 8)
337  else if (tmp_tp_pt >= 8)
339  } else if (std::fabs(tmp_tp_eta) >= 1.6 && std::fabs(tmp_tp_eta) < 2.0) {
340  reseta_eta1p6to2->Fill(eta_res);
341  resphi_eta1p6to2->Fill(phi_res);
342  resVtxZ_eta1p6to2->Fill(VtxZ_res);
343  resd0_eta1p6to2->Fill(d0_res);
344  if (tmp_tp_pt >= 2 && tmp_tp_pt < 3)
345  respt_eta1p6to2_pt2to3->Fill(pt_res);
346  else if (tmp_tp_pt >= 3 && tmp_tp_pt < 8)
347  respt_eta1p6to2_pt3to8->Fill(pt_res);
348  else if (tmp_tp_pt >= 8)
350  } else if (std::fabs(tmp_tp_eta) >= 2.0 && std::fabs(tmp_tp_eta) <= 2.4) {
351  reseta_eta2to2p4->Fill(eta_res);
352  resphi_eta2to2p4->Fill(phi_res);
353  resVtxZ_eta2to2p4->Fill(VtxZ_res);
354  resd0_eta2to2p4->Fill(d0_res);
355  if (tmp_tp_pt >= 2 && tmp_tp_pt < 3)
356  respt_eta2to2p4_pt2to3->Fill(pt_res);
357  else if (tmp_tp_pt >= 3 && tmp_tp_pt < 8)
358  respt_eta2to2p4_pt3to8->Fill(pt_res);
359  else if (tmp_tp_pt >= 8)
361  }
362  } //if MC TTTrack handle is valid
363  } //end loop over tracking particles
364 } // end of method
365 
366 // ------------ method called once each job just before starting event loop
367 // ------------
369  edm::Run const &run,
370  edm::EventSetup const &es) {
371  // Histogram setup and definitions
373  iBooker.setCurrentFolder(topFolderName_ + "/trackParticles");
374 
375  // 1D: pT
376  edm::ParameterSet psTrackParts_Pt = conf_.getParameter<edm::ParameterSet>("TH1TrackParts_Pt");
377  HistoName = "trackParts_Pt";
378  trackParts_Pt = iBooker.book1D(HistoName,
379  HistoName,
380  psTrackParts_Pt.getParameter<int32_t>("Nbinsx"),
381  psTrackParts_Pt.getParameter<double>("xmin"),
382  psTrackParts_Pt.getParameter<double>("xmax"));
383  trackParts_Pt->setAxisTitle("p_{T} [GeV]", 1);
384  trackParts_Pt->setAxisTitle("# tracking particles", 2);
385 
386  // 1D: eta
387  edm::ParameterSet psTrackParts_Eta = conf_.getParameter<edm::ParameterSet>("TH1TrackParts_Eta");
388  HistoName = "trackParts_Eta";
389  trackParts_Eta = iBooker.book1D(HistoName,
390  HistoName,
391  psTrackParts_Eta.getParameter<int32_t>("Nbinsx"),
392  psTrackParts_Eta.getParameter<double>("xmin"),
393  psTrackParts_Eta.getParameter<double>("xmax"));
394  trackParts_Eta->setAxisTitle("#eta", 1);
395  trackParts_Eta->setAxisTitle("# tracking particles", 2);
396 
397  // 1D: phi
398  edm::ParameterSet psTrackParts_Phi = conf_.getParameter<edm::ParameterSet>("TH1TrackParts_Phi");
399  HistoName = "trackParts_Phi";
400  trackParts_Phi = iBooker.book1D(HistoName,
401  HistoName,
402  psTrackParts_Phi.getParameter<int32_t>("Nbinsx"),
403  psTrackParts_Phi.getParameter<double>("xmin"),
404  psTrackParts_Phi.getParameter<double>("xmax"));
405  trackParts_Phi->setAxisTitle("#phi", 1);
406  trackParts_Phi->setAxisTitle("# tracking particles", 2);
407 
408  // 1D plots for efficiency
409  iBooker.setCurrentFolder(topFolderName_ + "/Tracks/Efficiency");
410  // pT
411  edm::ParameterSet psEffic_pt = conf_.getParameter<edm::ParameterSet>("TH1Effic_pt");
412  HistoName = "tp_pt";
413  tp_pt = iBooker.book1D(HistoName,
414  HistoName,
415  psEffic_pt.getParameter<int32_t>("Nbinsx"),
416  psEffic_pt.getParameter<double>("xmin"),
417  psEffic_pt.getParameter<double>("xmax"));
418  tp_pt->setAxisTitle("p_{T} [GeV]", 1);
419  tp_pt->setAxisTitle("# tracking particles", 2);
420 
421  // Matched TP's pT
422  HistoName = "match_tp_pt";
423  match_tp_pt = iBooker.book1D(HistoName,
424  HistoName,
425  psEffic_pt.getParameter<int32_t>("Nbinsx"),
426  psEffic_pt.getParameter<double>("xmin"),
427  psEffic_pt.getParameter<double>("xmax"));
428  match_tp_pt->setAxisTitle("p_{T} [GeV]", 1);
429  match_tp_pt->setAxisTitle("# matched tracking particles", 2);
430 
431  // pT zoom (0-10 GeV)
432  edm::ParameterSet psEffic_pt_zoom = conf_.getParameter<edm::ParameterSet>("TH1Effic_pt_zoom");
433  HistoName = "tp_pt_zoom";
434  tp_pt_zoom = iBooker.book1D(HistoName,
435  HistoName,
436  psEffic_pt_zoom.getParameter<int32_t>("Nbinsx"),
437  psEffic_pt_zoom.getParameter<double>("xmin"),
438  psEffic_pt_zoom.getParameter<double>("xmax"));
439  tp_pt_zoom->setAxisTitle("p_{T} [GeV]", 1);
440  tp_pt_zoom->setAxisTitle("# tracking particles", 2);
441 
442  // Matched pT zoom (0-10 GeV)
443  HistoName = "match_tp_pt_zoom";
445  HistoName,
446  psEffic_pt_zoom.getParameter<int32_t>("Nbinsx"),
447  psEffic_pt_zoom.getParameter<double>("xmin"),
448  psEffic_pt_zoom.getParameter<double>("xmax"));
449  match_tp_pt_zoom->setAxisTitle("p_{T} [GeV]", 1);
450  match_tp_pt_zoom->setAxisTitle("# matched tracking particles", 2);
451 
452  // eta
453  edm::ParameterSet psEffic_eta = conf_.getParameter<edm::ParameterSet>("TH1Effic_eta");
454  HistoName = "tp_eta";
455  tp_eta = iBooker.book1D(HistoName,
456  HistoName,
457  psEffic_eta.getParameter<int32_t>("Nbinsx"),
458  psEffic_eta.getParameter<double>("xmin"),
459  psEffic_eta.getParameter<double>("xmax"));
460  tp_eta->setAxisTitle("#eta", 1);
461  tp_eta->setAxisTitle("# tracking particles", 2);
462 
463  // Matched eta
464  HistoName = "match_tp_eta";
465  match_tp_eta = iBooker.book1D(HistoName,
466  HistoName,
467  psEffic_eta.getParameter<int32_t>("Nbinsx"),
468  psEffic_eta.getParameter<double>("xmin"),
469  psEffic_eta.getParameter<double>("xmax"));
470  match_tp_eta->setAxisTitle("#eta", 1);
471  match_tp_eta->setAxisTitle("# matched tracking particles", 2);
472 
473  // d0
474  edm::ParameterSet psEffic_d0 = conf_.getParameter<edm::ParameterSet>("TH1Effic_d0");
475  HistoName = "tp_d0";
476  tp_d0 = iBooker.book1D(HistoName,
477  HistoName,
478  psEffic_d0.getParameter<int32_t>("Nbinsx"),
479  psEffic_d0.getParameter<double>("xmin"),
480  psEffic_d0.getParameter<double>("xmax"));
481  tp_d0->setAxisTitle("d_{0} [cm]", 1);
482  tp_d0->setAxisTitle("# tracking particles", 2);
483 
484  // Matched d0
485  HistoName = "match_tp_d0";
486  match_tp_d0 = iBooker.book1D(HistoName,
487  HistoName,
488  psEffic_d0.getParameter<int32_t>("Nbinsx"),
489  psEffic_d0.getParameter<double>("xmin"),
490  psEffic_d0.getParameter<double>("xmax"));
491  match_tp_d0->setAxisTitle("d_{0} [cm]", 1);
492  match_tp_d0->setAxisTitle("# matched tracking particles", 2);
493 
494  // VtxR (also known as vxy)
495  edm::ParameterSet psEffic_VtxR = conf_.getParameter<edm::ParameterSet>("TH1Effic_VtxR");
496  HistoName = "tp_VtxR";
497  tp_VtxR = iBooker.book1D(HistoName,
498  HistoName,
499  psEffic_VtxR.getParameter<int32_t>("Nbinsx"),
500  psEffic_VtxR.getParameter<double>("xmin"),
501  psEffic_VtxR.getParameter<double>("xmax"));
502  tp_VtxR->setAxisTitle("d_{xy} [cm]", 1);
503  tp_VtxR->setAxisTitle("# tracking particles", 2);
504 
505  // Matched VtxR
506  HistoName = "match_tp_VtxR";
507  match_tp_VtxR = iBooker.book1D(HistoName,
508  HistoName,
509  psEffic_VtxR.getParameter<int32_t>("Nbinsx"),
510  psEffic_VtxR.getParameter<double>("xmin"),
511  psEffic_VtxR.getParameter<double>("xmax"));
512  match_tp_VtxR->setAxisTitle("d_{xy} [cm]", 1);
513  match_tp_VtxR->setAxisTitle("# matched tracking particles", 2);
514 
515  // VtxZ
516  edm::ParameterSet psEffic_VtxZ = conf_.getParameter<edm::ParameterSet>("TH1Effic_VtxZ");
517  HistoName = "tp_VtxZ";
518  tp_VtxZ = iBooker.book1D(HistoName,
519  HistoName,
520  psEffic_VtxZ.getParameter<int32_t>("Nbinsx"),
521  psEffic_VtxZ.getParameter<double>("xmin"),
522  psEffic_VtxZ.getParameter<double>("xmax"));
523  tp_VtxZ->setAxisTitle("z_{0} [cm]", 1);
524  tp_VtxZ->setAxisTitle("# tracking particles", 2);
525 
526  // Matched d0
527  HistoName = "match_tp_VtxZ";
528  match_tp_VtxZ = iBooker.book1D(HistoName,
529  HistoName,
530  psEffic_VtxZ.getParameter<int32_t>("Nbinsx"),
531  psEffic_VtxZ.getParameter<double>("xmin"),
532  psEffic_VtxZ.getParameter<double>("xmax"));
533  match_tp_VtxZ->setAxisTitle("z_{0} [cm]", 1);
534  match_tp_VtxZ->setAxisTitle("# matched tracking particles", 2);
535 
536  // 1D plots for resolution
537  iBooker.setCurrentFolder(topFolderName_ + "/Tracks/Resolution");
538  // full pT
539  edm::ParameterSet psRes_pt = conf_.getParameter<edm::ParameterSet>("TH1Res_pt");
540  HistoName = "res_pt";
541  res_pt = iBooker.book1D(HistoName,
542  HistoName,
543  psRes_pt.getParameter<int32_t>("Nbinsx"),
544  psRes_pt.getParameter<double>("xmin"),
545  psRes_pt.getParameter<double>("xmax"));
546  res_pt->setAxisTitle("p_{T} [GeV]", 1);
547  res_pt->setAxisTitle("# tracking particles", 2);
548 
549  // Full eta
550  edm::ParameterSet psRes_eta = conf_.getParameter<edm::ParameterSet>("TH1Res_eta");
551  HistoName = "res_eta";
552  res_eta = iBooker.book1D(HistoName,
553  HistoName,
554  psRes_eta.getParameter<int32_t>("Nbinsx"),
555  psRes_eta.getParameter<double>("xmin"),
556  psRes_eta.getParameter<double>("xmax"));
557  res_eta->setAxisTitle("#eta", 1);
558  res_eta->setAxisTitle("# tracking particles", 2);
559 
560  // Relative pT
561  edm::ParameterSet psRes_ptRel = conf_.getParameter<edm::ParameterSet>("TH1Res_ptRel");
562  HistoName = "res_ptRel";
563  res_ptRel = iBooker.book1D(HistoName,
564  HistoName,
565  psRes_ptRel.getParameter<int32_t>("Nbinsx"),
566  psRes_ptRel.getParameter<double>("xmin"),
567  psRes_ptRel.getParameter<double>("xmax"));
568  res_ptRel->setAxisTitle("Relative p_{T} [GeV]", 1);
569  res_ptRel->setAxisTitle("# tracking particles", 2);
570 
571  // Eta parts (for resolution)
572  // Eta 1 (0 to 0.7)
573  HistoName = "reseta_eta0to0p7";
575  HistoName,
576  psRes_eta.getParameter<int32_t>("Nbinsx"),
577  psRes_eta.getParameter<double>("xmin"),
578  psRes_eta.getParameter<double>("xmax"));
579  reseta_eta0to0p7->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
580  reseta_eta0to0p7->setAxisTitle("# tracking particles", 2);
581 
582  // Eta 2 (0.7 to 1.0)
583  HistoName = "reseta_eta0p7to1";
585  HistoName,
586  psRes_eta.getParameter<int32_t>("Nbinsx"),
587  psRes_eta.getParameter<double>("xmin"),
588  psRes_eta.getParameter<double>("xmax"));
589  reseta_eta0p7to1->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
590  reseta_eta0p7to1->setAxisTitle("# tracking particles", 2);
591 
592  // Eta 3 (1.0 to 1.2)
593  HistoName = "reseta_eta1to1p2";
595  HistoName,
596  psRes_eta.getParameter<int32_t>("Nbinsx"),
597  psRes_eta.getParameter<double>("xmin"),
598  psRes_eta.getParameter<double>("xmax"));
599  reseta_eta1to1p2->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
600  reseta_eta1to1p2->setAxisTitle("# tracking particles", 2);
601 
602  // Eta 4 (1.2 to 1.6)
603  HistoName = "reseta_eta1p2to1p6";
605  HistoName,
606  psRes_eta.getParameter<int32_t>("Nbinsx"),
607  psRes_eta.getParameter<double>("xmin"),
608  psRes_eta.getParameter<double>("xmax"));
609  reseta_eta1p2to1p6->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
610  reseta_eta1p2to1p6->setAxisTitle("# tracking particles", 2);
611 
612  // Eta 5 (1.6 to 2.0)
613  HistoName = "reseta_eta1p6to2";
615  HistoName,
616  psRes_eta.getParameter<int32_t>("Nbinsx"),
617  psRes_eta.getParameter<double>("xmin"),
618  psRes_eta.getParameter<double>("xmax"));
619  reseta_eta1p6to2->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
620  reseta_eta1p6to2->setAxisTitle("# tracking particles", 2);
621 
622  // Eta 6 (2.0 to 2.4)
623  HistoName = "reseta_eta2to2p4";
625  HistoName,
626  psRes_eta.getParameter<int32_t>("Nbinsx"),
627  psRes_eta.getParameter<double>("xmin"),
628  psRes_eta.getParameter<double>("xmax"));
629  reseta_eta2to2p4->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
630  reseta_eta2to2p4->setAxisTitle("# tracking particles", 2);
631 
632  // pT parts for resolution (pT res vs eta)
633  // pT a (2 to 3 GeV)
634  // Eta 1 (0 to 0.7)
635  HistoName = "respt_eta0to0p7_pt2to3";
637  HistoName,
638  psRes_pt.getParameter<int32_t>("Nbinsx"),
639  psRes_pt.getParameter<double>("xmin"),
640  psRes_pt.getParameter<double>("xmax"));
641  respt_eta0to0p7_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
642  respt_eta0to0p7_pt2to3->setAxisTitle("# tracking particles", 2);
643 
644  // Eta 2 (0.7 to 1.0)
645  HistoName = "respt_eta0p7to1_pt2to3";
647  HistoName,
648  psRes_pt.getParameter<int32_t>("Nbinsx"),
649  psRes_pt.getParameter<double>("xmin"),
650  psRes_pt.getParameter<double>("xmax"));
651  respt_eta0p7to1_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
652  respt_eta0p7to1_pt2to3->setAxisTitle("# tracking particles", 2);
653 
654  // Eta 3 (1.0 to 1.2)
655  HistoName = "respt_eta1to1p2_pt2to3";
657  HistoName,
658  psRes_pt.getParameter<int32_t>("Nbinsx"),
659  psRes_pt.getParameter<double>("xmin"),
660  psRes_pt.getParameter<double>("xmax"));
661  respt_eta1to1p2_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
662  respt_eta1to1p2_pt2to3->setAxisTitle("# tracking particles", 2);
663 
664  // Eta 4 (1.2 to 1.6)
665  HistoName = "respt_eta1p2to1p6_pt2to3";
667  HistoName,
668  psRes_pt.getParameter<int32_t>("Nbinsx"),
669  psRes_pt.getParameter<double>("xmin"),
670  psRes_pt.getParameter<double>("xmax"));
671  respt_eta1p2to1p6_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
672  respt_eta1p2to1p6_pt2to3->setAxisTitle("# tracking particles", 2);
673 
674  // Eta 5 (1.6 to 2.0)
675  HistoName = "respt_eta1p6to2_pt2to3";
677  HistoName,
678  psRes_pt.getParameter<int32_t>("Nbinsx"),
679  psRes_pt.getParameter<double>("xmin"),
680  psRes_pt.getParameter<double>("xmax"));
681  respt_eta1p6to2_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
682  respt_eta1p6to2_pt2to3->setAxisTitle("# tracking particles", 2);
683 
684  // Eta 6 (2.0 to 2.4)
685  HistoName = "respt_eta2to2p4_pt2to3";
687  HistoName,
688  psRes_pt.getParameter<int32_t>("Nbinsx"),
689  psRes_pt.getParameter<double>("xmin"),
690  psRes_pt.getParameter<double>("xmax"));
691  respt_eta2to2p4_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
692  respt_eta2to2p4_pt2to3->setAxisTitle("# tracking particles", 2);
693 
694  // pT b (3 to 8 GeV)
695  // Eta 1 (0 to 0.7)
696  HistoName = "respt_eta0to0p7_pt3to8";
698  HistoName,
699  psRes_pt.getParameter<int32_t>("Nbinsx"),
700  psRes_pt.getParameter<double>("xmin"),
701  psRes_pt.getParameter<double>("xmax"));
702  respt_eta0to0p7_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
703  respt_eta0to0p7_pt3to8->setAxisTitle("# tracking particles", 2);
704 
705  // Eta 2 (0.7 to 1.0)
706  HistoName = "respt_eta0p7to1_pt3to8";
708  HistoName,
709  psRes_pt.getParameter<int32_t>("Nbinsx"),
710  psRes_pt.getParameter<double>("xmin"),
711  psRes_pt.getParameter<double>("xmax"));
712  respt_eta0p7to1_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
713  respt_eta0p7to1_pt3to8->setAxisTitle("# tracking particles", 2);
714 
715  // Eta 3 (1.0 to 1.2)
716  HistoName = "respt_eta1to1p2_pt3to8";
718  HistoName,
719  psRes_pt.getParameter<int32_t>("Nbinsx"),
720  psRes_pt.getParameter<double>("xmin"),
721  psRes_pt.getParameter<double>("xmax"));
722  respt_eta1to1p2_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
723  respt_eta1to1p2_pt3to8->setAxisTitle("# tracking particles", 2);
724 
725  // Eta 4 (1.2 to 1.6)
726  HistoName = "respt_eta1p2to1p6_pt3to8";
728  HistoName,
729  psRes_pt.getParameter<int32_t>("Nbinsx"),
730  psRes_pt.getParameter<double>("xmin"),
731  psRes_pt.getParameter<double>("xmax"));
732  respt_eta1p2to1p6_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
733  respt_eta1p2to1p6_pt3to8->setAxisTitle("# tracking particles", 2);
734 
735  // Eta 5 (1.6 to 2.0)
736  HistoName = "respt_eta1p6to2_pt3to8";
738  HistoName,
739  psRes_pt.getParameter<int32_t>("Nbinsx"),
740  psRes_pt.getParameter<double>("xmin"),
741  psRes_pt.getParameter<double>("xmax"));
742  respt_eta1p6to2_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
743  respt_eta1p6to2_pt3to8->setAxisTitle("# tracking particles", 2);
744 
745  // Eta 6 (2.0 to 2.4)
746  HistoName = "respt_eta2to2p4_pt3to8";
748  HistoName,
749  psRes_pt.getParameter<int32_t>("Nbinsx"),
750  psRes_pt.getParameter<double>("xmin"),
751  psRes_pt.getParameter<double>("xmax"));
752  respt_eta2to2p4_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
753  respt_eta2to2p4_pt3to8->setAxisTitle("# tracking particles", 2);
754 
755  // pT c (>8 GeV)
756  // Eta 1 (0 to 0.7)
757  HistoName = "respt_eta0to0p7_pt8toInf";
759  HistoName,
760  psRes_pt.getParameter<int32_t>("Nbinsx"),
761  psRes_pt.getParameter<double>("xmin"),
762  psRes_pt.getParameter<double>("xmax"));
763  respt_eta0to0p7_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
764  respt_eta0to0p7_pt8toInf->setAxisTitle("# tracking particles", 2);
765 
766  // Eta 2 (0.7 to 1.0)
767  HistoName = "respt_eta0p7to1_pt8toInf";
769  HistoName,
770  psRes_pt.getParameter<int32_t>("Nbinsx"),
771  psRes_pt.getParameter<double>("xmin"),
772  psRes_pt.getParameter<double>("xmax"));
773  respt_eta0p7to1_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
774  respt_eta0p7to1_pt8toInf->setAxisTitle("# tracking particles", 2);
775 
776  // Eta 3 (1.0 to 1.2)
777  HistoName = "respt_eta1to1p2_pt8toInf";
779  HistoName,
780  psRes_pt.getParameter<int32_t>("Nbinsx"),
781  psRes_pt.getParameter<double>("xmin"),
782  psRes_pt.getParameter<double>("xmax"));
783  respt_eta1to1p2_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
784  respt_eta1to1p2_pt8toInf->setAxisTitle("# tracking particles", 2);
785 
786  // Eta 4 (1.2 to 1.6)
787  HistoName = "respt_eta1p2to1p6_pt8toInf";
789  HistoName,
790  psRes_pt.getParameter<int32_t>("Nbinsx"),
791  psRes_pt.getParameter<double>("xmin"),
792  psRes_pt.getParameter<double>("xmax"));
793  respt_eta1p2to1p6_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
794  respt_eta1p2to1p6_pt8toInf->setAxisTitle("# tracking particles", 2);
795 
796  // Eta 5 (1.6 to 2.0)
797  HistoName = "respt_eta1p6to2_pt8toInf";
799  HistoName,
800  psRes_pt.getParameter<int32_t>("Nbinsx"),
801  psRes_pt.getParameter<double>("xmin"),
802  psRes_pt.getParameter<double>("xmax"));
803  respt_eta1p6to2_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
804  respt_eta1p6to2_pt8toInf->setAxisTitle("# tracking particles", 2);
805 
806  // Eta 6 (2.0 to 2.4)
807  HistoName = "respt_eta2to2p4_pt8toInf";
809  HistoName,
810  psRes_pt.getParameter<int32_t>("Nbinsx"),
811  psRes_pt.getParameter<double>("xmin"),
812  psRes_pt.getParameter<double>("xmax"));
813  respt_eta2to2p4_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
814  respt_eta2to2p4_pt8toInf->setAxisTitle("# tracking particles", 2);
815 
816  // Phi parts (for resolution)
817  // Eta 1 (0 to 0.7)
818  edm::ParameterSet psRes_phi = conf_.getParameter<edm::ParameterSet>("TH1Res_phi");
819  HistoName = "resphi_eta0to0p7";
821  HistoName,
822  psRes_phi.getParameter<int32_t>("Nbinsx"),
823  psRes_phi.getParameter<double>("xmin"),
824  psRes_phi.getParameter<double>("xmax"));
825  resphi_eta0to0p7->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
826  resphi_eta0to0p7->setAxisTitle("# tracking particles", 2);
827 
828  // Eta 2 (0.7 to 1.0)
829  HistoName = "resphi_eta0p7to1";
831  HistoName,
832  psRes_phi.getParameter<int32_t>("Nbinsx"),
833  psRes_phi.getParameter<double>("xmin"),
834  psRes_phi.getParameter<double>("xmax"));
835  resphi_eta0p7to1->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
836  resphi_eta0p7to1->setAxisTitle("# tracking particles", 2);
837 
838  // Eta 3 (1.0 to 1.2)
839  HistoName = "resphi_eta1to1p2";
841  HistoName,
842  psRes_phi.getParameter<int32_t>("Nbinsx"),
843  psRes_phi.getParameter<double>("xmin"),
844  psRes_phi.getParameter<double>("xmax"));
845  resphi_eta1to1p2->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
846  resphi_eta1to1p2->setAxisTitle("# tracking particles", 2);
847 
848  // Eta 4 (1.2 to 1.6)
849  HistoName = "resphi_eta1p2to1p6";
851  HistoName,
852  psRes_phi.getParameter<int32_t>("Nbinsx"),
853  psRes_phi.getParameter<double>("xmin"),
854  psRes_phi.getParameter<double>("xmax"));
855  resphi_eta1p2to1p6->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
856  resphi_eta1p2to1p6->setAxisTitle("# tracking particles", 2);
857 
858  // Eta 5 (1.6 to 2.0)
859  HistoName = "resphi_eta1p6to2";
861  HistoName,
862  psRes_phi.getParameter<int32_t>("Nbinsx"),
863  psRes_phi.getParameter<double>("xmin"),
864  psRes_phi.getParameter<double>("xmax"));
865  resphi_eta1p6to2->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
866  resphi_eta1p6to2->setAxisTitle("# tracking particles", 2);
867 
868  // Eta 6 (2.0 to 2.4)
869  HistoName = "resphi_eta2to2p4";
871  HistoName,
872  psRes_phi.getParameter<int32_t>("Nbinsx"),
873  psRes_phi.getParameter<double>("xmin"),
874  psRes_phi.getParameter<double>("xmax"));
875  resphi_eta2to2p4->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
876  resphi_eta2to2p4->setAxisTitle("# tracking particles", 2);
877 
878  // VtxZ parts (for resolution)
879  // Eta 1 (0 to 0.7)
880  edm::ParameterSet psRes_VtxZ = conf_.getParameter<edm::ParameterSet>("TH1Res_VtxZ");
881  HistoName = "resVtxZ_eta0to0p7";
883  HistoName,
884  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
885  psRes_VtxZ.getParameter<double>("xmin"),
886  psRes_VtxZ.getParameter<double>("xmax"));
887  resVtxZ_eta0to0p7->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
888  resVtxZ_eta0to0p7->setAxisTitle("# tracking particles", 2);
889 
890  // Eta 2 (0.7 to 1.0)
891  HistoName = "resVtxZ_eta0p7to1";
893  HistoName,
894  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
895  psRes_VtxZ.getParameter<double>("xmin"),
896  psRes_VtxZ.getParameter<double>("xmax"));
897  resVtxZ_eta0p7to1->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
898  resVtxZ_eta0p7to1->setAxisTitle("# tracking particles", 2);
899 
900  // Eta 3 (1.0 to 1.2)
901  HistoName = "resVtxZ_eta1to1p2";
903  HistoName,
904  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
905  psRes_VtxZ.getParameter<double>("xmin"),
906  psRes_VtxZ.getParameter<double>("xmax"));
907  resVtxZ_eta1to1p2->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
908  resVtxZ_eta1to1p2->setAxisTitle("# tracking particles", 2);
909 
910  // Eta 4 (1.2 to 1.6)
911  HistoName = "resVtxZ_eta1p2to1p6";
913  HistoName,
914  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
915  psRes_VtxZ.getParameter<double>("xmin"),
916  psRes_VtxZ.getParameter<double>("xmax"));
917  resVtxZ_eta1p2to1p6->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
918  resVtxZ_eta1p2to1p6->setAxisTitle("# tracking particles", 2);
919 
920  // Eta 5 (1.6 to 2.0)
921  HistoName = "resVtxZ_eta1p6to2";
923  HistoName,
924  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
925  psRes_VtxZ.getParameter<double>("xmin"),
926  psRes_VtxZ.getParameter<double>("xmax"));
927  resVtxZ_eta1p6to2->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
928  resVtxZ_eta1p6to2->setAxisTitle("# tracking particles", 2);
929 
930  // Eta 6 (2.0 to 2.4)
931  HistoName = "resVtxZ_eta2to2p4";
933  HistoName,
934  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
935  psRes_VtxZ.getParameter<double>("xmin"),
936  psRes_VtxZ.getParameter<double>("xmax"));
937  resVtxZ_eta2to2p4->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
938  resVtxZ_eta2to2p4->setAxisTitle("# tracking particles", 2);
939 
940  // d0 parts (for resolution)
941  // Eta 1 (0 to 0.7)
942  edm::ParameterSet psRes_d0 = conf_.getParameter<edm::ParameterSet>("TH1Res_d0");
943  HistoName = "resd0_eta0to0p7";
944  resd0_eta0to0p7 = iBooker.book1D(HistoName,
945  HistoName,
946  psRes_d0.getParameter<int32_t>("Nbinsx"),
947  psRes_d0.getParameter<double>("xmin"),
948  psRes_d0.getParameter<double>("xmax"));
949  resd0_eta0to0p7->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
950  resd0_eta0to0p7->setAxisTitle("# tracking particles", 2);
951 
952  // Eta 2 (0.7 to 1.0)
953  HistoName = "resd0_eta0p7to1";
954  resd0_eta0p7to1 = iBooker.book1D(HistoName,
955  HistoName,
956  psRes_d0.getParameter<int32_t>("Nbinsx"),
957  psRes_d0.getParameter<double>("xmin"),
958  psRes_d0.getParameter<double>("xmax"));
959  resd0_eta0p7to1->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
960  resd0_eta0p7to1->setAxisTitle("# tracking particles", 2);
961 
962  // Eta 3 (1.0 to 1.2)
963  HistoName = "resd0_eta1to1p2";
964  resd0_eta1to1p2 = iBooker.book1D(HistoName,
965  HistoName,
966  psRes_d0.getParameter<int32_t>("Nbinsx"),
967  psRes_d0.getParameter<double>("xmin"),
968  psRes_d0.getParameter<double>("xmax"));
969  resd0_eta1to1p2->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
970  resd0_eta1to1p2->setAxisTitle("# tracking particles", 2);
971 
972  // Eta 4 (1.2 to 1.6)
973  HistoName = "resd0_eta1p2to1p6";
975  HistoName,
976  psRes_d0.getParameter<int32_t>("Nbinsx"),
977  psRes_d0.getParameter<double>("xmin"),
978  psRes_d0.getParameter<double>("xmax"));
979  resd0_eta1p2to1p6->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
980  resd0_eta1p2to1p6->setAxisTitle("# tracking particles", 2);
981 
982  // Eta 5 (1.6 to 2.0)
983  HistoName = "resd0_eta1p6to2";
984  resd0_eta1p6to2 = iBooker.book1D(HistoName,
985  HistoName,
986  psRes_d0.getParameter<int32_t>("Nbinsx"),
987  psRes_d0.getParameter<double>("xmin"),
988  psRes_d0.getParameter<double>("xmax"));
989  resd0_eta1p6to2->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
990  resd0_eta1p6to2->setAxisTitle("# tracking particles", 2);
991 
992  // Eta 6 (2.0 to 2.4)
993  HistoName = "resd0_eta2to2p4";
994  resd0_eta2to2p4 = iBooker.book1D(HistoName,
995  HistoName,
996  psRes_d0.getParameter<int32_t>("Nbinsx"),
997  psRes_d0.getParameter<double>("xmin"),
998  psRes_d0.getParameter<double>("xmax"));
999  resd0_eta2to2p4->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
1000  resd0_eta2to2p4->setAxisTitle("# tracking particles", 2);
1001 
1002 } // end of method
1003 
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
int pdgId() const
PDG ID.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double isum
unsigned int layer(const DetId &id) const
constexpr std::array< uint8_t, layerIndexSize > layer
const Double_t pi
edm::EDGetTokenT< std::vector< TrackingParticle > > trackingParticleToken_
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< TTTrackAssociationMap< Ref_Phase2TrackerDigi_ > > ttTrackMCTruthToken_
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
edm::EDGetTokenT< TTClusterAssociationMap< Ref_Phase2TrackerDigi_ > > ttClusterMCTruthToken_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
static constexpr auto TOB
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
edm::EDGetTokenT< TTStubAssociationMap< Ref_Phase2TrackerDigi_ > > ttStubMCTruthToken_
Definition: DetId.h:17
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > m_topoToken
const LorentzVector & p4() const
Four-momentum Lorentz vector. Note this is taken from the first SimTrack only.
std::string HistoName
bool isValid() const
Definition: HandleBase.h:70
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: APVGainStruct.h:7
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
static constexpr auto TID
Definition: Run.h:45
float charge() const
Electric charge. Note this is taken from the first SimTrack only.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)