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