CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OuterTrackerMonitorTrackingParticles.cc
Go to the documentation of this file.
1 // Package: SiOuterTrackerV
2 // Class: SiOuterTrackerV
3 
4 // Original Author: Emily MacDonald
5 //
6 
7 // system include files
8 #include <fstream>
9 #include <iostream>
10 #include <memory>
11 #include <numeric>
12 #include <vector>
13 
14 // user include files
35 
36 //
37 // constructors and destructor
38 //
40  : conf_(iConfig) {
41  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
43  consumes<std::vector<TrackingParticle>>(conf_.getParameter<edm::InputTag>("trackingParticleToken"));
45  consumes<TTStubAssociationMap<Ref_Phase2TrackerDigi_>>(conf_.getParameter<edm::InputTag>("MCTruthStubInputTag"));
46  ttClusterMCTruthToken_ = consumes<TTClusterAssociationMap<Ref_Phase2TrackerDigi_>>(
47  conf_.getParameter<edm::InputTag>("MCTruthClusterInputTag"));
48  ttTrackMCTruthToken_ = consumes<TTTrackAssociationMap<Ref_Phase2TrackerDigi_>>(
49  conf_.getParameter<edm::InputTag>("MCTruthTrackInputTag"));
50  ttStubToken_ =
51  consumes<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>>(conf_.getParameter<edm::InputTag>("StubInputTag"));
53  consumes<std::vector<TTTrack<Ref_Phase2TrackerDigi_>>>(conf_.getParameter<edm::InputTag>("TTTracksTag"));
54  L1Tk_nPar = conf_.getParameter<int>("L1Tk_nPar"); // 4 or 5(d0) track parameters
55  L1Tk_minNStub = conf_.getParameter<int>("L1Tk_minNStub"); // min number of stubs in the track
56  L1Tk_maxChi2 = conf_.getParameter<double>("L1Tk_maxChi2"); // maximum chi2 of the track
57  L1Tk_maxChi2dof = conf_.getParameter<double>("L1Tk_maxChi2dof"); // maximum chi2/dof of the track
58  TP_minNStub = conf_.getParameter<int>("TP_minNStub"); // min number of stubs in the tracking particle to
59  // consider matching
60  TP_minPt = conf_.getParameter<double>("TP_minPt"); // min pT to consider matching
61  TP_maxPt = conf_.getParameter<double>("TP_maxPt"); // max pT to consider matching
62  TP_maxEta = conf_.getParameter<double>("TP_maxEta"); // max eta to consider matching
63  TP_maxVtxZ = conf_.getParameter<double>("TP_maxVtxZ"); // max vertZ (or z0) to consider matching
64  TP_select_eventid = conf_.getParameter<int>("TP_select_eventid");
65 } // PI or not
66 
68  // do anything here that needs to be done at desctruction time
69  // (e.g. close files, deallocate resources etc.)
70 }
71 
72 // member functions
73 
74 // ------------ method called for each event ------------
76  typename edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>::const_iterator inputIter;
77  typename edmNew::DetSet<TTStub<Ref_Phase2TrackerDigi_>>::const_iterator contentIter;
78  typedef std::vector<TrackingParticle> TrackingParticleCollection;
79 
80  // Tracking Particles
81  edm::Handle<std::vector<TrackingParticle>> trackingParticleHandle;
82  iEvent.getByToken(trackingParticleToken_, trackingParticleHandle);
83 
84  // L1 Primaries
86  iEvent.getByToken(ttStubToken_, TTStubHandle);
88  iEvent.getByToken(ttTrackToken_, TTTrackHandle);
89 
90  // Truth Association Maps
92  iEvent.getByToken(ttTrackMCTruthToken_, MCTruthTTTrackHandle);
94  iEvent.getByToken(ttClusterMCTruthToken_, MCTruthTTClusterHandle);
96  iEvent.getByToken(ttStubMCTruthToken_, MCTruthTTStubHandle);
97 
98  // Geometries
99  edm::ESHandle<TrackerGeometry> tGeometryHandle;
100  const TrackerGeometry *theTrackerGeometry;
101  iSetup.get<TrackerDigiGeometryRecord>().get(tGeometryHandle);
102  theTrackerGeometry = tGeometryHandle.product();
103 
104  // Stub info
105  std::vector<float> TTStubs_x;
106  std::vector<float> TTStubs_y;
107  std::vector<float> TTStubs_z;
108  std::vector<float> TTStubs_r;
109  std::vector<float> TTStubs_eta;
110  std::vector<float> TTStubs_phi;
111  std::vector<int> TTStubs_tpId; // Relates the stub to its tracking particle
112 
113  // Tracking particle distribution, to be used for 1D distribution plots with
114  // pT>2, abs(eta)<2.4, and num layers hit >=4 These are slightly different
115  // quantitites than those used in the track matching!! They have different
116  // cuts
117  std::vector<float> v_tp_pt;
118  std::vector<float> v_tp_eta;
119  std::vector<float> v_tp_phi;
120  std::vector<float> v_tp_nLayers; // Calculated as the number of layers hit
121 
122  // Add protection
123  if (!TTStubHandle.isValid())
124  return;
125 
126  // Loop through stubs to determine a link to each stub's tracking particle
127  for (inputIter = TTStubHandle->begin(); inputIter != TTStubHandle->end(); ++inputIter) {
128  for (contentIter = inputIter->begin(); contentIter != inputIter->end(); ++contentIter) {
130  edmNew::makeRefTo(TTStubHandle, contentIter);
131 
132  DetId detIdStub = theTrackerGeometry->idToDet((tempStubRef->getClusterRef(0))->getDetId())->geographicalId();
133  const MeasurementPoint &mp = (tempStubRef->getClusterRef(0))->findAverageLocalCoordinates();
134  const GeomDet *theGeomDet = theTrackerGeometry->idToDet(detIdStub);
135  Global3DPoint posStub = theGeomDet->surface().toGlobal(theGeomDet->topology().localPosition(mp));
136 
138  edmNew::makeRefTo(TTStubHandle, contentIter);
139 
140  float stubs_x = posStub.x();
141  float stubs_y = posStub.y();
142  float stubs_z = posStub.z();
143  float stubs_r = posStub.perp();
144  float stubs_eta = posStub.eta();
145  float stubs_phi = posStub.phi();
146  TTStubs_x.push_back(stubs_x);
147  TTStubs_y.push_back(stubs_y);
148  TTStubs_z.push_back(stubs_z);
149  TTStubs_r.push_back(stubs_r);
150  TTStubs_eta.push_back(stubs_eta);
151  TTStubs_phi.push_back(stubs_phi);
152 
153  // Set to dummy values first, in case the tp Id cannot be determined
154  TTStubs_tpId.push_back(-1);
155 
156  // Retrieve MC association
157  bool genuineStub = false;
158  if (MCTruthTTStubHandle.isValid()) {
159  genuineStub = MCTruthTTStubHandle->isGenuine(tempStubPtr);
160  }
161  if (genuineStub) {
162  edm::Ptr<TrackingParticle> tpPtr = MCTruthTTStubHandle->findTrackingParticlePtr(tempStubPtr);
163  if (tpPtr.isNonnull()) {
164  float x = tpPtr->vertex().x();
165  float y = tpPtr->vertex().y();
166  float z = tpPtr->vertex().z();
167  float px = tpPtr->p4().px();
168  float py = tpPtr->p4().py();
169  float pz = tpPtr->p4().pz();
170  int idx = -1;
171  int counter = 0;
172  // Determine to which tracking particle the stub is associated
173  for (auto it : *trackingParticleHandle) { // Loop over TPs
174  counter++;
175  float allowedRes = 0.001;
176  if (std::fabs(it.vx() - x) > allowedRes)
177  continue;
178  if (std::fabs(it.vy() - y) > allowedRes)
179  continue;
180  if (std::fabs(it.vz() - z) > allowedRes)
181  continue;
182  if (std::fabs(it.px() - px) > allowedRes)
183  continue;
184  if (std::fabs(it.py() - py) > allowedRes)
185  continue;
186  if (std::fabs(it.pz() - pz) > allowedRes)
187  continue;
188 
189  idx = counter;
190  }
191  TTStubs_tpId.back() = idx; // Set the tpId: a link between the stub
192  // and its tracking particle
193  }
194  }
195  } // End content iterator
196  } // End input iterator
197 
198  // Effectively, a loop through all tracking particles through their stubs
199  // For each tracking particle, will determine whether the layer has a stub
200  // (true) or not (false)
201  std::vector<TpStruct> TPStructs;
202  for (unsigned j = 0; j < TTStubs_tpId.size(); j++) { // Loop over all stubs
203  const int ID = TTStubs_tpId[j];
204  if (ID < 0)
205  continue;
206  int pos = -1;
207  int p = 0; // Counter
208  for (auto thisStruct : TPStructs) { // make sure you only assign one
209  // tracking particle to one TpStruct
210  if (ID == thisStruct.TpId) {
211  pos = p;
212  break;
213  }
214  p++;
215  }
216 
217  if (pos < 0) { // if you have not yet looped through this tracking particle...
218  TpStruct thisTPStruct;
219  thisTPStruct.TpId = ID;
220  int totalLayers = 11;
221  std::vector<bool> layerElement(totalLayers, false); // set each layer's "hit" status to false
222  thisTPStruct.layer = layerElement;
223  TPStructs.push_back(thisTPStruct);
224  pos = TPStructs.size() - 1;
225  }
226  int l = Layer(TTStubs_r[j],
227  TTStubs_z[j]); // Send through function Layer, which
228  // determines which layer the stub is in
229  if (l >= 0)
230  TPStructs[pos].layer[l] = true; // Set the layer that is "hit" to true
231  } // End loop over stubs
232 
233  // Fill the tracking particle quantities
234  // std::vector< TrackingParticle >::const_iterator iterTP1;
235  for (auto iterTP1 : *trackingParticleHandle) {
236  v_tp_pt.push_back(iterTP1.pt());
237  v_tp_eta.push_back(iterTP1.eta());
238  v_tp_phi.push_back(iterTP1.phi());
239  v_tp_nLayers.push_back(-1); // Set to dummy values first
240  }
241 
242  // Fill nLayers variable for tracking particles
243  // Loop through tracking particles in special container (TPStructs), add up
244  // the number of layers set "true" as an integer value
245  for (auto thisStruct : TPStructs) {
246  int id = thisStruct.TpId;
247  v_tp_nLayers.at(id - 1) = thisStruct.Nlayers();
248  }
249  // Includes all tracking particles, different cuts than those used in the
250  // efficiency
251  for (unsigned j = 0; j < v_tp_eta.size(); j++) { // Over all TPs
252  double trkParts_eta = v_tp_eta[j];
253  double trkParts_pt = v_tp_pt[j];
254  double trkParts_phi = v_tp_phi[j];
255  double trkParts_nLayers = v_tp_nLayers[j]; // the number of layers hit for each tracking particle
256 
257  // Fill the 1D distribution plots for tracking particles, to monitor change
258  // in stub definition
259  if (std::fabs(trkParts_eta) < 2.4 && trkParts_pt > 2 && trkParts_nLayers >= 4) {
260  // Fill 1D distributions
261  trackParts_Pt->Fill(trkParts_pt);
262  trackParts_Eta->Fill(trkParts_eta);
263  trackParts_Phi->Fill(trkParts_phi);
264  }
265  }
266 
267  // Efficiency and resolution for the L1 tracks
268  std::vector<float> trkParts_eta;
269  std::vector<float> trkParts_phi;
270  std::vector<float> trkParts_pt;
271  std::vector<float> trkParts_VtxZ;
272  std::vector<float> trkParts_d0;
273  std::vector<float> trkParts_VtxR;
274  std::vector<int> trkParts_pdgId;
275  std::vector<int> trkParts_nMatch;
276  std::vector<int> trkParts_nStub;
277  std::vector<int> trkParts_eventId;
278  std::vector<float> matchTrk_pt;
279  std::vector<float> matchTrk_eta;
280  std::vector<float> matchTrk_phi;
281  std::vector<float> matchTrk_VtxZ;
282  std::vector<float> matchTrk_d0;
283  std::vector<float> matchTrk_chi2;
284  std::vector<int> matchTrk_nStub;
285 
286  // Add protection
287  if (!TTTrackHandle.isValid())
288  return;
289 
290  // Loop over tracking particles
291  int this_tp = 0;
292  // std::vector< TrackingParticle >::const_iterator iterTP;
293  for (auto iterTP : *trackingParticleHandle) {
294  edm::Ptr<TrackingParticle> tp_ptr(trackingParticleHandle, this_tp);
295  this_tp++;
296 
297  int tmp_eventid = iterTP.eventId().event();
298  float tmp_tp_pt = iterTP.pt();
299  float tmp_tp_phi = iterTP.phi();
300  float tmp_tp_eta = iterTP.eta();
301  float tmp_tp_vz = iterTP.vz();
302  float tmp_tp_vx = iterTP.vx();
303  float tmp_tp_vy = iterTP.vy();
304  float tmp_tp_charge = tp_ptr->charge();
305  int tmp_tp_pdgid = iterTP.pdgId();
306 
307  // ----------------------------------------------------------------------------------------------
308  // calculate d0 and VtxZ propagated back to the IP, pass if greater than max
309  // VtxZ
310  float tmp_tp_t = tan(2.0 * atan(1.0) - 2.0 * atan(exp(-tmp_tp_eta)));
311  float delx = -tmp_tp_vx;
312  float dely = -tmp_tp_vy;
313  float K = 0.01 * 0.5696 / tmp_tp_pt * tmp_tp_charge; // curvature correction
314  float A = 1. / (2. * K);
315  float tmp_tp_x0p = delx - A * sin(tmp_tp_phi);
316  float tmp_tp_y0p = dely + A * cos(tmp_tp_phi);
317  float tmp_tp_rp = sqrt(tmp_tp_x0p * tmp_tp_x0p + tmp_tp_y0p * tmp_tp_y0p);
318  static double pi = 4.0 * atan(1.0);
319  float delphi = tmp_tp_phi - atan2(-K * tmp_tp_x0p, K * tmp_tp_y0p);
320  if (delphi < -pi)
321  delphi += 2.0 * pi;
322  if (delphi > pi)
323  delphi -= 2.0 * pi;
324 
325  float tmp_tp_VtxZ = tmp_tp_vz + tmp_tp_t * delphi / (2.0 * K);
326  float VtxR = sqrt(tmp_tp_vx * tmp_tp_vx + tmp_tp_vy * tmp_tp_vy);
327  float tmp_tp_VtxR = VtxR;
328  float tmp_tp_d0 = tmp_tp_charge * tmp_tp_rp - (1. / (2. * K));
329 
330  // simpler formula for d0, in cases where the charge is zero:
331  // https://github.com/cms-sw/cmssw/blob/master/DataFormats/TrackReco/interface/TrackBase.h
332  float other_d0 = -tmp_tp_vx * sin(tmp_tp_phi) + tmp_tp_vy * cos(tmp_tp_phi);
333  tmp_tp_d0 = tmp_tp_d0 * (-1); // fix d0 sign
334  if (K == 0) {
335  tmp_tp_d0 = other_d0;
336  tmp_tp_VtxZ = tmp_tp_vz;
337  }
338  int nStubTP = -1;
339  if (MCTruthTTStubHandle.isValid()) {
340  std::vector<edm::Ref<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>, TTStub<Ref_Phase2TrackerDigi_>>>
341  theStubRefs = MCTruthTTStubHandle->findTTStubRefs(tp_ptr);
342  nStubTP = (int)theStubRefs.size();
343  }
344 
345  // ----------------------------------------------------------------------------------------------
346  // look for L1 tracks matched to the tracking particle
347  if (tmp_eventid > 0)
348  continue; // only care about tracking particles from the primary
349  // interaction
350  if (std::fabs(tmp_tp_eta) > TP_maxEta)
351  continue;
352  if (std::fabs(tmp_tp_VtxZ) > TP_maxVtxZ)
353  continue;
354 
355  // ----------------------------------------------------------------------------------------------
356  // only consider TPs with >= X stubs (configurable option)
357  if (MCTruthTTClusterHandle.isValid()) {
358  if (MCTruthTTClusterHandle->findTTClusterRefs(tp_ptr).empty())
359  continue;
360  }
361 
362  // To make efficiency plots where the denominator has NO stub cuts
363  if (VtxR < 1.0) {
364  tp_pt->Fill(tmp_tp_pt); // pT efficiency has no cut on pT, but includes VtxR cut
365  if (tmp_tp_pt > 0 && tmp_tp_pt <= 10)
366  tp_pt_zoom->Fill(tmp_tp_pt); // pT efficiency has no cut on pT, but includes VtxR cut
367  }
368  if (tmp_tp_pt < TP_minPt)
369  continue;
370  tp_VtxR->Fill(tmp_tp_VtxR); // VtxR efficiency has no cut on VtxR
371  if (VtxR > 1.0)
372  continue;
373  tp_eta->Fill(tmp_tp_eta);
374  tp_d0->Fill(tmp_tp_d0);
375  tp_VtxZ->Fill(tmp_tp_VtxZ);
376 
377  if (nStubTP < TP_minNStub)
378  continue;
379  if (!MCTruthTTTrackHandle.isValid())
380  continue;
381  std::vector<edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>>> matchedTracks =
382  MCTruthTTTrackHandle->findTTTrackPtrs(tp_ptr);
383 
384  int nMatch = 0;
385  int i_track = -1;
386  float i_chi2dof = 99999;
387 
388  // ----------------------------------------------------------------------------------------------
389  // loop over matched L1 tracks
390  // here, "match" means tracks that can be associated to a TrackingParticle
391  // with at least one hit of at least one of its clusters
392  // https://twiki.cern.ch/twiki/bin/viewauth/CMS/SLHCTrackerTriggerSWTools#MC_truth_for_TTTrack
393  int trkCounter = 0;
394  for (auto thisTrack : matchedTracks) {
395  bool tmp_trk_genuine = false;
396  if (MCTruthTTTrackHandle->isGenuine(thisTrack))
397  tmp_trk_genuine = true;
398  if (!tmp_trk_genuine)
399  continue;
400  // ----------------------------------------------------------------------------------------------
401  // further require L1 track to be (loosely) genuine, that there is only
402  // one TP matched to the track
403  // + have >= L1Tk_minNStub stubs for it to be a valid match
404  int tmp_trk_nstub = thisTrack->getStubRefs().size();
405  if (tmp_trk_nstub < L1Tk_minNStub)
406  continue;
407  float dmatch_pt = 999;
408  float dmatch_eta = 999;
409  float dmatch_phi = 999;
410  int match_id = 999;
411 
412  edm::Ptr<TrackingParticle> my_tp = MCTruthTTTrackHandle->findTrackingParticlePtr(thisTrack);
413  dmatch_pt = std::fabs(my_tp->p4().pt() - tmp_tp_pt);
414  dmatch_eta = std::fabs(my_tp->p4().eta() - tmp_tp_eta);
415  dmatch_phi = std::fabs(my_tp->p4().phi() - tmp_tp_phi);
416  match_id = my_tp->pdgId();
417  float tmp_trk_chi2dof = (thisTrack->getChi2(L1Tk_nPar)) / (2 * tmp_trk_nstub - L1Tk_nPar);
418 
419  // ensure that track is uniquely matched to the TP we are looking at!
420  if (dmatch_pt < 0.1 && dmatch_eta < 0.1 && dmatch_phi < 0.1 && tmp_tp_pdgid == match_id) {
421  nMatch++;
422  if (i_track < 0 || tmp_trk_chi2dof < i_chi2dof) {
423  i_track = trkCounter;
424  i_chi2dof = tmp_trk_chi2dof;
425  }
426  }
427  trkCounter++;
428  } // end loop over matched L1 tracks
429  // ----------------------------------------------------------------------------------------------
430 
431  // Get information on the matched tracks
432  float tmp_matchtrk_pt = -999;
433  float tmp_matchtrk_eta = -999;
434  float tmp_matchtrk_phi = -999;
435  float tmp_matchtrk_VtxZ = -999;
436  float tmp_matchtrk_chi2 = -999;
437  float tmp_matchtrk_chi2R = -999;
438  int tmp_matchTrk_nStub = -999;
439  float tmp_matchtrk_d0 = -999;
440 
441  if (nMatch > 0) {
442  tmp_matchtrk_pt = matchedTracks[i_track]->getMomentum(L1Tk_nPar).perp();
443  tmp_matchtrk_eta = matchedTracks[i_track]->getMomentum(L1Tk_nPar).eta();
444  tmp_matchtrk_phi = matchedTracks[i_track]->getMomentum(L1Tk_nPar).phi();
445  tmp_matchtrk_VtxZ = matchedTracks[i_track]->getPOCA(L1Tk_nPar).z();
446  tmp_matchtrk_chi2 = matchedTracks[i_track]->getChi2(L1Tk_nPar);
447  tmp_matchtrk_chi2R = matchedTracks[i_track]->getChi2Red(L1Tk_nPar);
448  tmp_matchTrk_nStub = (int)matchedTracks[i_track]->getStubRefs().size();
449 
450  Track_MatchedChi2->Fill(tmp_matchtrk_chi2);
451  Track_MatchedChi2Red->Fill(tmp_matchtrk_chi2R);
452 
453  // for d0
454  float tmp_matchtrk_x0 = matchedTracks[i_track]->getPOCA(L1Tk_nPar).x();
455  float tmp_matchtrk_y0 = matchedTracks[i_track]->getPOCA(L1Tk_nPar).y();
456  tmp_matchtrk_d0 = -tmp_matchtrk_x0 * sin(tmp_matchtrk_phi) + tmp_matchtrk_y0 * cos(tmp_matchtrk_phi);
457  }
458 
459  trkParts_pt.push_back(tmp_tp_pt);
460  trkParts_eta.push_back(tmp_tp_eta);
461  trkParts_phi.push_back(tmp_tp_phi);
462  trkParts_d0.push_back(tmp_tp_d0);
463  trkParts_VtxZ.push_back(tmp_tp_VtxZ);
464 
465  trkParts_pdgId.push_back(tmp_tp_pdgid);
466  trkParts_VtxR.push_back(tmp_tp_VtxR);
467  trkParts_nMatch.push_back(nMatch);
468  trkParts_nStub.push_back(nStubTP);
469  trkParts_eventId.push_back(tmp_eventid);
470 
471  matchTrk_pt.push_back(tmp_matchtrk_pt);
472  matchTrk_eta.push_back(tmp_matchtrk_eta);
473  matchTrk_phi.push_back(tmp_matchtrk_phi);
474  matchTrk_VtxZ.push_back(tmp_matchtrk_VtxZ);
475  matchTrk_d0.push_back(tmp_matchtrk_d0);
476 
477  matchTrk_chi2.push_back(tmp_matchtrk_chi2);
478  matchTrk_nStub.push_back(tmp_matchTrk_nStub);
479  } // End loop over tracking particles
480 
481  for (unsigned j = 0; j < trkParts_eta.size(); j++) { // Over all TPs
482  float eta = trkParts_eta[j];
483  float pt = trkParts_pt[j];
484  float VtxR = trkParts_VtxR[j];
485  float d0 = trkParts_d0[j];
486  float VtxZ = trkParts_VtxZ[j];
487  float eventId = trkParts_eventId[j];
488 
489  // cut on event ID (eventid=0 means the TP is from the primary interaction,
490  // so *not* selecting only eventid=0 means including stuff from pileup)
491  if (TP_select_eventid == 0 && eventId != 0)
492  continue;
493  if (VtxR > 1)
494  continue;
495  if (pt < 2)
496  continue;
497  if (pt > TP_maxPt)
498  continue;
499  if (std::fabs(eta) > TP_maxEta)
500  continue;
501  if (trkParts_nMatch[j] < 1)
502  continue; // was the tracking particle matched to a L1 track?
503  if (matchTrk_nStub[j] < L1Tk_minNStub)
504  continue; // use only tracks with min X stubs
505 
506  // for matched track, retain info on chi2 and chi2/dof
507  float chi2 = matchTrk_chi2[j];
508  int ndof = 2 * matchTrk_nStub[j] - 4;
509  float chi2dof = (float)chi2 / ndof;
510 
511  if (chi2 > L1Tk_maxChi2)
512  continue; // cut on chi2
513  if (chi2dof > L1Tk_maxChi2dof)
514  continue;
515 
516  // fill matched track histograms (if passes all criteria)
517  match_tp_pt->Fill(pt);
518  if (pt > 0 && pt <= 10)
519  match_tp_pt_zoom->Fill(pt);
520  match_tp_eta->Fill(eta);
521  match_tp_d0->Fill(d0);
522  match_tp_VtxR->Fill(VtxR);
523  match_tp_VtxZ->Fill(VtxZ);
524 
525  if (pt < TP_minPt)
526  continue; // only consider TPs with pt > TP_minPt
527  // fill total resolution histograms
528  res_pt->Fill(matchTrk_pt[j] - trkParts_pt[j]);
529  res_ptRel->Fill((matchTrk_pt[j] - trkParts_pt[j]) / trkParts_pt[j]);
530  res_eta->Fill(matchTrk_eta[j] - trkParts_eta[j]);
531 
532  // Eta and pT histograms for resolution
533  float pt_res = (matchTrk_pt[j] - trkParts_pt[j]) / trkParts_pt[j];
534  float eta_res = matchTrk_eta[j] - trkParts_eta[j];
535  float phi_res = matchTrk_phi[j] - trkParts_phi[j];
536  float VtxZ_res = matchTrk_VtxZ[j] - trkParts_VtxZ[j];
537  float d0_res = matchTrk_d0[j] - trkParts_d0[j];
538 
539  float tP_eta = trkParts_eta[j];
540  float tP_pt = trkParts_pt[j];
541 
542  // Fill resolution plots for different abs(eta) bins:
543  // (0, 0.7), (0.7, 1.0), (1.0, 1.2), (1.2, 1.6), (1.6, 2.0), (2.0, 2.4)
544  if (std::fabs(tP_eta) >= 0 && std::fabs(tP_eta) < 0.7) {
545  reseta_eta0to0p7->Fill(eta_res);
546  resphi_eta0to0p7->Fill(phi_res);
547  resVtxZ_eta0to0p7->Fill(VtxZ_res);
548  resd0_eta0to0p7->Fill(d0_res);
549  if (tP_pt >= 2 && tP_pt < 3)
550  respt_eta0to0p7_pt2to3->Fill(pt_res);
551  else if (tP_pt >= 3 && tP_pt < 8)
552  respt_eta0to0p7_pt3to8->Fill(pt_res);
553  else if (tP_pt >= 8)
555  } else if (std::fabs(tP_eta) >= 0.7 && std::fabs(tP_eta) < 1.0) {
556  reseta_eta0p7to1->Fill(eta_res);
557  resphi_eta0p7to1->Fill(phi_res);
558  resVtxZ_eta0p7to1->Fill(VtxZ_res);
559  resd0_eta0p7to1->Fill(d0_res);
560  if (tP_pt >= 2 && tP_pt < 3)
561  respt_eta0p7to1_pt2to3->Fill(pt_res);
562  else if (tP_pt >= 3 && tP_pt < 8)
563  respt_eta0p7to1_pt3to8->Fill(pt_res);
564  else if (tP_pt >= 8)
566  } else if (std::fabs(tP_eta) >= 1.0 && std::fabs(tP_eta) < 1.2) {
567  reseta_eta1to1p2->Fill(eta_res);
568  resphi_eta1to1p2->Fill(phi_res);
569  resVtxZ_eta1to1p2->Fill(VtxZ_res);
570  resd0_eta1to1p2->Fill(d0_res);
571  if (tP_pt >= 2 && tP_pt < 3)
572  respt_eta1to1p2_pt2to3->Fill(pt_res);
573  else if (tP_pt >= 3 && tP_pt < 8)
574  respt_eta1to1p2_pt3to8->Fill(pt_res);
575  else if (tP_pt >= 8)
577  } else if (std::fabs(tP_eta) >= 1.2 && std::fabs(tP_eta) < 1.6) {
578  reseta_eta1p2to1p6->Fill(eta_res);
579  resphi_eta1p2to1p6->Fill(phi_res);
580  resVtxZ_eta1p2to1p6->Fill(VtxZ_res);
581  resd0_eta1p2to1p6->Fill(d0_res);
582  if (tP_pt >= 2 && tP_pt < 3)
584  else if (tP_pt >= 3 && tP_pt < 8)
586  else if (tP_pt >= 8)
588  } else if (std::fabs(tP_eta) >= 1.6 && std::fabs(tP_eta) < 2.0) {
589  reseta_eta1p6to2->Fill(eta_res);
590  resphi_eta1p6to2->Fill(phi_res);
591  resVtxZ_eta1p6to2->Fill(VtxZ_res);
592  resd0_eta1p6to2->Fill(d0_res);
593  if (tP_pt >= 2 && tP_pt < 3)
594  respt_eta1p6to2_pt2to3->Fill(pt_res);
595  else if (tP_pt >= 3 && tP_pt < 8)
596  respt_eta1p6to2_pt3to8->Fill(pt_res);
597  else if (tP_pt >= 8)
599  } else if (std::fabs(tP_eta) >= 2.0 && std::fabs(tP_eta) <= 2.4) {
600  reseta_eta2to2p4->Fill(eta_res);
601  resphi_eta2to2p4->Fill(phi_res);
602  resVtxZ_eta2to2p4->Fill(VtxZ_res);
603  resd0_eta2to2p4->Fill(d0_res);
604  if (tP_pt >= 2 && tP_pt < 3)
605  respt_eta2to2p4_pt2to3->Fill(pt_res);
606  else if (tP_pt >= 3 && tP_pt < 8)
607  respt_eta2to2p4_pt3to8->Fill(pt_res);
608  else if (tP_pt >= 8)
610  }
611  }
612 
613  // Clear all vectors
614  TTStubs_x.clear();
615  TTStubs_y.clear();
616  TTStubs_z.clear();
617  TTStubs_r.clear();
618  TTStubs_eta.clear();
619  TTStubs_phi.clear();
620  TTStubs_tpId.clear();
621  v_tp_pt.clear();
622  v_tp_eta.clear();
623  v_tp_phi.clear();
624  v_tp_nLayers.clear();
625  trkParts_pt.clear();
626  trkParts_eta.clear();
627  trkParts_phi.clear();
628  trkParts_d0.clear();
629  trkParts_VtxZ.clear();
630  trkParts_VtxR.clear();
631  trkParts_pdgId.clear();
632  trkParts_nMatch.clear();
633  trkParts_nStub.clear();
634  trkParts_eventId.clear();
635  matchTrk_pt.clear();
636  matchTrk_eta.clear();
637  matchTrk_phi.clear();
638  matchTrk_d0.clear();
639  matchTrk_VtxZ.clear();
640  matchTrk_chi2.clear();
641  matchTrk_nStub.clear();
642 } // end of method
643 
644 // ------------ method called once each job just before starting event loop
645 // ------------
647  edm::Run const &run,
648  edm::EventSetup const &es) {
649  // Histogram setup and definitions
651  iBooker.setCurrentFolder(topFolderName_ + "/trackParticles");
652 
653  // 1D: pT
654  edm::ParameterSet psTrackParts_Pt = conf_.getParameter<edm::ParameterSet>("TH1TrackParts_Pt");
655  HistoName = "trackParts_Pt";
656  trackParts_Pt = iBooker.book1D(HistoName,
657  HistoName,
658  psTrackParts_Pt.getParameter<int32_t>("Nbinsx"),
659  psTrackParts_Pt.getParameter<double>("xmin"),
660  psTrackParts_Pt.getParameter<double>("xmax"));
661  trackParts_Pt->setAxisTitle("p_{T} [GeV]", 1);
662  trackParts_Pt->setAxisTitle("# tracking particles", 2);
663 
664  // 1D: eta
665  edm::ParameterSet psTrackParts_Eta = conf_.getParameter<edm::ParameterSet>("TH1TrackParts_Eta");
666  HistoName = "trackParts_Eta";
667  trackParts_Eta = iBooker.book1D(HistoName,
668  HistoName,
669  psTrackParts_Eta.getParameter<int32_t>("Nbinsx"),
670  psTrackParts_Eta.getParameter<double>("xmin"),
671  psTrackParts_Eta.getParameter<double>("xmax"));
672  trackParts_Eta->setAxisTitle("#eta", 1);
673  trackParts_Eta->setAxisTitle("# tracking particles", 2);
674 
675  // 1D: phi
676  edm::ParameterSet psTrackParts_Phi = conf_.getParameter<edm::ParameterSet>("TH1TrackParts_Phi");
677  HistoName = "trackParts_Phi";
678  trackParts_Phi = iBooker.book1D(HistoName,
679  HistoName,
680  psTrackParts_Phi.getParameter<int32_t>("Nbinsx"),
681  psTrackParts_Phi.getParameter<double>("xmin"),
682  psTrackParts_Phi.getParameter<double>("xmax"));
683  trackParts_Phi->setAxisTitle("#phi", 1);
684  trackParts_Phi->setAxisTitle("# tracking particles", 2);
685 
686  // For tracks correctly matched to truth-level track
687  iBooker.setCurrentFolder(topFolderName_ + "/Tracks");
688  // chi2
689  edm::ParameterSet psTrack_Chi2 = conf_.getParameter<edm::ParameterSet>("TH1_Track_Chi2");
690  HistoName = "Track_MatchedChi2";
691  Track_MatchedChi2 = iBooker.book1D(HistoName,
692  HistoName,
693  psTrack_Chi2.getParameter<int32_t>("Nbinsx"),
694  psTrack_Chi2.getParameter<double>("xmin"),
695  psTrack_Chi2.getParameter<double>("xmax"));
696  Track_MatchedChi2->setAxisTitle("L1 Track #chi^{2}", 1);
697  Track_MatchedChi2->setAxisTitle("# Correctly Matched L1 Tracks", 2);
698 
699  // chi2Red
700  edm::ParameterSet psTrack_Chi2Red = conf_.getParameter<edm::ParameterSet>("TH1_Track_Chi2R");
701  HistoName = "Track_MatchedChi2Red";
702  Track_MatchedChi2Red = iBooker.book1D(HistoName,
703  HistoName,
704  psTrack_Chi2Red.getParameter<int32_t>("Nbinsx"),
705  psTrack_Chi2Red.getParameter<double>("xmin"),
706  psTrack_Chi2Red.getParameter<double>("xmax"));
707  Track_MatchedChi2Red->setAxisTitle("L1 Track #chi^{2}/ndf", 1);
708  Track_MatchedChi2Red->setAxisTitle("# Correctly Matched L1 Tracks", 2);
709 
710  // 1D plots for efficiency
711  iBooker.setCurrentFolder(topFolderName_ + "/Tracks/Efficiency");
712  // pT
713  edm::ParameterSet psEffic_pt = conf_.getParameter<edm::ParameterSet>("TH1Effic_pt");
714  HistoName = "tp_pt";
715  tp_pt = iBooker.book1D(HistoName,
716  HistoName,
717  psEffic_pt.getParameter<int32_t>("Nbinsx"),
718  psEffic_pt.getParameter<double>("xmin"),
719  psEffic_pt.getParameter<double>("xmax"));
720  tp_pt->setAxisTitle("p_{T} [GeV]", 1);
721  tp_pt->setAxisTitle("# tracking particles", 2);
722 
723  // Matched TP's pT
724  HistoName = "match_tp_pt";
725  match_tp_pt = iBooker.book1D(HistoName,
726  HistoName,
727  psEffic_pt.getParameter<int32_t>("Nbinsx"),
728  psEffic_pt.getParameter<double>("xmin"),
729  psEffic_pt.getParameter<double>("xmax"));
730  match_tp_pt->setAxisTitle("p_{T} [GeV]", 1);
731  match_tp_pt->setAxisTitle("# matched tracking particles", 2);
732 
733  // pT zoom (0-10 GeV)
734  edm::ParameterSet psEffic_pt_zoom = conf_.getParameter<edm::ParameterSet>("TH1Effic_pt_zoom");
735  HistoName = "tp_pt_zoom";
736  tp_pt_zoom = iBooker.book1D(HistoName,
737  HistoName,
738  psEffic_pt_zoom.getParameter<int32_t>("Nbinsx"),
739  psEffic_pt_zoom.getParameter<double>("xmin"),
740  psEffic_pt_zoom.getParameter<double>("xmax"));
741  tp_pt_zoom->setAxisTitle("p_{T} [GeV]", 1);
742  tp_pt_zoom->setAxisTitle("# tracking particles", 2);
743 
744  // Matched pT zoom (0-10 GeV)
745  HistoName = "match_tp_pt_zoom";
746  match_tp_pt_zoom = iBooker.book1D(HistoName,
747  HistoName,
748  psEffic_pt_zoom.getParameter<int32_t>("Nbinsx"),
749  psEffic_pt_zoom.getParameter<double>("xmin"),
750  psEffic_pt_zoom.getParameter<double>("xmax"));
751  match_tp_pt_zoom->setAxisTitle("p_{T} [GeV]", 1);
752  match_tp_pt_zoom->setAxisTitle("# matched tracking particles", 2);
753 
754  // eta
755  edm::ParameterSet psEffic_eta = conf_.getParameter<edm::ParameterSet>("TH1Effic_eta");
756  HistoName = "tp_eta";
757  tp_eta = iBooker.book1D(HistoName,
758  HistoName,
759  psEffic_eta.getParameter<int32_t>("Nbinsx"),
760  psEffic_eta.getParameter<double>("xmin"),
761  psEffic_eta.getParameter<double>("xmax"));
762  tp_eta->setAxisTitle("#eta", 1);
763  tp_eta->setAxisTitle("# tracking particles", 2);
764 
765  // Matched eta
766  HistoName = "match_tp_eta";
767  match_tp_eta = iBooker.book1D(HistoName,
768  HistoName,
769  psEffic_eta.getParameter<int32_t>("Nbinsx"),
770  psEffic_eta.getParameter<double>("xmin"),
771  psEffic_eta.getParameter<double>("xmax"));
772  match_tp_eta->setAxisTitle("#eta", 1);
773  match_tp_eta->setAxisTitle("# matched tracking particles", 2);
774 
775  // d0
776  edm::ParameterSet psEffic_d0 = conf_.getParameter<edm::ParameterSet>("TH1Effic_d0");
777  HistoName = "tp_d0";
778  tp_d0 = iBooker.book1D(HistoName,
779  HistoName,
780  psEffic_d0.getParameter<int32_t>("Nbinsx"),
781  psEffic_d0.getParameter<double>("xmin"),
782  psEffic_d0.getParameter<double>("xmax"));
783  tp_d0->setAxisTitle("d_{0} [cm]", 1);
784  tp_d0->setAxisTitle("# tracking particles", 2);
785 
786  // Matched d0
787  HistoName = "match_tp_d0";
788  match_tp_d0 = iBooker.book1D(HistoName,
789  HistoName,
790  psEffic_d0.getParameter<int32_t>("Nbinsx"),
791  psEffic_d0.getParameter<double>("xmin"),
792  psEffic_d0.getParameter<double>("xmax"));
793  match_tp_d0->setAxisTitle("d_{0} [cm]", 1);
794  match_tp_d0->setAxisTitle("# matched tracking particles", 2);
795 
796  // VtxR (also known as vxy)
797  edm::ParameterSet psEffic_VtxR = conf_.getParameter<edm::ParameterSet>("TH1Effic_VtxR");
798  HistoName = "tp_VtxR";
799  tp_VtxR = iBooker.book1D(HistoName,
800  HistoName,
801  psEffic_VtxR.getParameter<int32_t>("Nbinsx"),
802  psEffic_VtxR.getParameter<double>("xmin"),
803  psEffic_VtxR.getParameter<double>("xmax"));
804  tp_VtxR->setAxisTitle("d_{xy} [cm]", 1);
805  tp_VtxR->setAxisTitle("# tracking particles", 2);
806 
807  // Matched VtxR
808  HistoName = "match_tp_VtxR";
809  match_tp_VtxR = iBooker.book1D(HistoName,
810  HistoName,
811  psEffic_VtxR.getParameter<int32_t>("Nbinsx"),
812  psEffic_VtxR.getParameter<double>("xmin"),
813  psEffic_VtxR.getParameter<double>("xmax"));
814  match_tp_VtxR->setAxisTitle("d_{xy} [cm]", 1);
815  match_tp_VtxR->setAxisTitle("# matched tracking particles", 2);
816 
817  // VtxZ
818  edm::ParameterSet psEffic_VtxZ = conf_.getParameter<edm::ParameterSet>("TH1Effic_VtxZ");
819  HistoName = "tp_VtxZ";
820  tp_VtxZ = iBooker.book1D(HistoName,
821  HistoName,
822  psEffic_VtxZ.getParameter<int32_t>("Nbinsx"),
823  psEffic_VtxZ.getParameter<double>("xmin"),
824  psEffic_VtxZ.getParameter<double>("xmax"));
825  tp_VtxZ->setAxisTitle("z_{0} [cm]", 1);
826  tp_VtxZ->setAxisTitle("# tracking particles", 2);
827 
828  // Matched d0
829  HistoName = "match_tp_VtxZ";
830  match_tp_VtxZ = iBooker.book1D(HistoName,
831  HistoName,
832  psEffic_VtxZ.getParameter<int32_t>("Nbinsx"),
833  psEffic_VtxZ.getParameter<double>("xmin"),
834  psEffic_VtxZ.getParameter<double>("xmax"));
835  match_tp_VtxZ->setAxisTitle("z_{0} [cm]", 1);
836  match_tp_VtxZ->setAxisTitle("# matched tracking particles", 2);
837 
838  // 1D plots for resolution
839  iBooker.setCurrentFolder(topFolderName_ + "/Tracks/Resolution");
840  // full pT
841  edm::ParameterSet psRes_pt = conf_.getParameter<edm::ParameterSet>("TH1Res_pt");
842  HistoName = "res_pt";
843  res_pt = iBooker.book1D(HistoName,
844  HistoName,
845  psRes_pt.getParameter<int32_t>("Nbinsx"),
846  psRes_pt.getParameter<double>("xmin"),
847  psRes_pt.getParameter<double>("xmax"));
848  res_pt->setAxisTitle("p_{T} [GeV]", 1);
849  res_pt->setAxisTitle("# tracking particles", 2);
850 
851  // Full eta
852  edm::ParameterSet psRes_eta = conf_.getParameter<edm::ParameterSet>("TH1Res_eta");
853  HistoName = "res_eta";
854  res_eta = iBooker.book1D(HistoName,
855  HistoName,
856  psRes_eta.getParameter<int32_t>("Nbinsx"),
857  psRes_eta.getParameter<double>("xmin"),
858  psRes_eta.getParameter<double>("xmax"));
859  res_eta->setAxisTitle("#eta", 1);
860  res_eta->setAxisTitle("# tracking particles", 2);
861 
862  // Relative pT
863  edm::ParameterSet psRes_ptRel = conf_.getParameter<edm::ParameterSet>("TH1Res_ptRel");
864  HistoName = "res_ptRel";
865  res_ptRel = iBooker.book1D(HistoName,
866  HistoName,
867  psRes_ptRel.getParameter<int32_t>("Nbinsx"),
868  psRes_ptRel.getParameter<double>("xmin"),
869  psRes_ptRel.getParameter<double>("xmax"));
870  res_ptRel->setAxisTitle("Relative p_{T} [GeV]", 1);
871  res_ptRel->setAxisTitle("# tracking particles", 2);
872 
873  // Eta parts (for resolution)
874  // Eta 1 (0 to 0.7)
875  HistoName = "reseta_eta0to0p7";
876  reseta_eta0to0p7 = iBooker.book1D(HistoName,
877  HistoName,
878  psRes_eta.getParameter<int32_t>("Nbinsx"),
879  psRes_eta.getParameter<double>("xmin"),
880  psRes_eta.getParameter<double>("xmax"));
881  reseta_eta0to0p7->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
882  reseta_eta0to0p7->setAxisTitle("# tracking particles", 2);
883 
884  // Eta 2 (0.7 to 1.0)
885  HistoName = "reseta_eta0p7to1";
886  reseta_eta0p7to1 = iBooker.book1D(HistoName,
887  HistoName,
888  psRes_eta.getParameter<int32_t>("Nbinsx"),
889  psRes_eta.getParameter<double>("xmin"),
890  psRes_eta.getParameter<double>("xmax"));
891  reseta_eta0p7to1->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
892  reseta_eta0p7to1->setAxisTitle("# tracking particles", 2);
893 
894  // Eta 3 (1.0 to 1.2)
895  HistoName = "reseta_eta1to1p2";
896  reseta_eta1to1p2 = iBooker.book1D(HistoName,
897  HistoName,
898  psRes_eta.getParameter<int32_t>("Nbinsx"),
899  psRes_eta.getParameter<double>("xmin"),
900  psRes_eta.getParameter<double>("xmax"));
901  reseta_eta1to1p2->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
902  reseta_eta1to1p2->setAxisTitle("# tracking particles", 2);
903 
904  // Eta 4 (1.2 to 1.6)
905  HistoName = "reseta_eta1p2to1p6";
906  reseta_eta1p2to1p6 = iBooker.book1D(HistoName,
907  HistoName,
908  psRes_eta.getParameter<int32_t>("Nbinsx"),
909  psRes_eta.getParameter<double>("xmin"),
910  psRes_eta.getParameter<double>("xmax"));
911  reseta_eta1p2to1p6->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
912  reseta_eta1p2to1p6->setAxisTitle("# tracking particles", 2);
913 
914  // Eta 5 (1.6 to 2.0)
915  HistoName = "reseta_eta1p6to2";
916  reseta_eta1p6to2 = iBooker.book1D(HistoName,
917  HistoName,
918  psRes_eta.getParameter<int32_t>("Nbinsx"),
919  psRes_eta.getParameter<double>("xmin"),
920  psRes_eta.getParameter<double>("xmax"));
921  reseta_eta1p6to2->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
922  reseta_eta1p6to2->setAxisTitle("# tracking particles", 2);
923 
924  // Eta 6 (2.0 to 2.4)
925  HistoName = "reseta_eta2to2p4";
926  reseta_eta2to2p4 = iBooker.book1D(HistoName,
927  HistoName,
928  psRes_eta.getParameter<int32_t>("Nbinsx"),
929  psRes_eta.getParameter<double>("xmin"),
930  psRes_eta.getParameter<double>("xmax"));
931  reseta_eta2to2p4->setAxisTitle("#eta_{trk} - #eta_{tp}", 1);
932  reseta_eta2to2p4->setAxisTitle("# tracking particles", 2);
933 
934  // pT parts for resolution (pT res vs eta)
935  // pT a (2 to 3 GeV)
936  // Eta 1 (0 to 0.7)
937  HistoName = "respt_eta0to0p7_pt2to3";
938  respt_eta0to0p7_pt2to3 = iBooker.book1D(HistoName,
939  HistoName,
940  psRes_pt.getParameter<int32_t>("Nbinsx"),
941  psRes_pt.getParameter<double>("xmin"),
942  psRes_pt.getParameter<double>("xmax"));
943  respt_eta0to0p7_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
944  respt_eta0to0p7_pt2to3->setAxisTitle("# tracking particles", 2);
945 
946  // Eta 2 (0.7 to 1.0)
947  HistoName = "respt_eta0p7to1_pt2to3";
948  respt_eta0p7to1_pt2to3 = iBooker.book1D(HistoName,
949  HistoName,
950  psRes_pt.getParameter<int32_t>("Nbinsx"),
951  psRes_pt.getParameter<double>("xmin"),
952  psRes_pt.getParameter<double>("xmax"));
953  respt_eta0p7to1_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
954  respt_eta0p7to1_pt2to3->setAxisTitle("# tracking particles", 2);
955 
956  // Eta 3 (1.0 to 1.2)
957  HistoName = "respt_eta1to1p2_pt2to3";
958  respt_eta1to1p2_pt2to3 = iBooker.book1D(HistoName,
959  HistoName,
960  psRes_pt.getParameter<int32_t>("Nbinsx"),
961  psRes_pt.getParameter<double>("xmin"),
962  psRes_pt.getParameter<double>("xmax"));
963  respt_eta1to1p2_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
964  respt_eta1to1p2_pt2to3->setAxisTitle("# tracking particles", 2);
965 
966  // Eta 4 (1.2 to 1.6)
967  HistoName = "respt_eta1p2to1p6_pt2to3";
968  respt_eta1p2to1p6_pt2to3 = iBooker.book1D(HistoName,
969  HistoName,
970  psRes_pt.getParameter<int32_t>("Nbinsx"),
971  psRes_pt.getParameter<double>("xmin"),
972  psRes_pt.getParameter<double>("xmax"));
973  respt_eta1p2to1p6_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
974  respt_eta1p2to1p6_pt2to3->setAxisTitle("# tracking particles", 2);
975 
976  // Eta 5 (1.6 to 2.0)
977  HistoName = "respt_eta1p6to2_pt2to3";
978  respt_eta1p6to2_pt2to3 = iBooker.book1D(HistoName,
979  HistoName,
980  psRes_pt.getParameter<int32_t>("Nbinsx"),
981  psRes_pt.getParameter<double>("xmin"),
982  psRes_pt.getParameter<double>("xmax"));
983  respt_eta1p6to2_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
984  respt_eta1p6to2_pt2to3->setAxisTitle("# tracking particles", 2);
985 
986  // Eta 6 (2.0 to 2.4)
987  HistoName = "respt_eta2to2p4_pt2to3";
988  respt_eta2to2p4_pt2to3 = iBooker.book1D(HistoName,
989  HistoName,
990  psRes_pt.getParameter<int32_t>("Nbinsx"),
991  psRes_pt.getParameter<double>("xmin"),
992  psRes_pt.getParameter<double>("xmax"));
993  respt_eta2to2p4_pt2to3->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
994  respt_eta2to2p4_pt2to3->setAxisTitle("# tracking particles", 2);
995 
996  // pT b (3 to 8 GeV)
997  // Eta 1 (0 to 0.7)
998  HistoName = "respt_eta0to0p7_pt3to8";
999  respt_eta0to0p7_pt3to8 = iBooker.book1D(HistoName,
1000  HistoName,
1001  psRes_pt.getParameter<int32_t>("Nbinsx"),
1002  psRes_pt.getParameter<double>("xmin"),
1003  psRes_pt.getParameter<double>("xmax"));
1004  respt_eta0to0p7_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1005  respt_eta0to0p7_pt3to8->setAxisTitle("# tracking particles", 2);
1006 
1007  // Eta 2 (0.7 to 1.0)
1008  HistoName = "respt_eta0p7to1_pt3to8";
1009  respt_eta0p7to1_pt3to8 = iBooker.book1D(HistoName,
1010  HistoName,
1011  psRes_pt.getParameter<int32_t>("Nbinsx"),
1012  psRes_pt.getParameter<double>("xmin"),
1013  psRes_pt.getParameter<double>("xmax"));
1014  respt_eta0p7to1_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1015  respt_eta0p7to1_pt3to8->setAxisTitle("# tracking particles", 2);
1016 
1017  // Eta 3 (1.0 to 1.2)
1018  HistoName = "respt_eta1to1p2_pt3to8";
1019  respt_eta1to1p2_pt3to8 = iBooker.book1D(HistoName,
1020  HistoName,
1021  psRes_pt.getParameter<int32_t>("Nbinsx"),
1022  psRes_pt.getParameter<double>("xmin"),
1023  psRes_pt.getParameter<double>("xmax"));
1024  respt_eta1to1p2_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1025  respt_eta1to1p2_pt3to8->setAxisTitle("# tracking particles", 2);
1026 
1027  // Eta 4 (1.2 to 1.6)
1028  HistoName = "respt_eta1p2to1p6_pt3to8";
1029  respt_eta1p2to1p6_pt3to8 = iBooker.book1D(HistoName,
1030  HistoName,
1031  psRes_pt.getParameter<int32_t>("Nbinsx"),
1032  psRes_pt.getParameter<double>("xmin"),
1033  psRes_pt.getParameter<double>("xmax"));
1034  respt_eta1p2to1p6_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1035  respt_eta1p2to1p6_pt3to8->setAxisTitle("# tracking particles", 2);
1036 
1037  // Eta 5 (1.6 to 2.0)
1038  HistoName = "respt_eta1p6to2_pt3to8";
1039  respt_eta1p6to2_pt3to8 = iBooker.book1D(HistoName,
1040  HistoName,
1041  psRes_pt.getParameter<int32_t>("Nbinsx"),
1042  psRes_pt.getParameter<double>("xmin"),
1043  psRes_pt.getParameter<double>("xmax"));
1044  respt_eta1p6to2_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1045  respt_eta1p6to2_pt3to8->setAxisTitle("# tracking particles", 2);
1046 
1047  // Eta 6 (2.0 to 2.4)
1048  HistoName = "respt_eta2to2p4_pt3to8";
1049  respt_eta2to2p4_pt3to8 = iBooker.book1D(HistoName,
1050  HistoName,
1051  psRes_pt.getParameter<int32_t>("Nbinsx"),
1052  psRes_pt.getParameter<double>("xmin"),
1053  psRes_pt.getParameter<double>("xmax"));
1054  respt_eta2to2p4_pt3to8->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1055  respt_eta2to2p4_pt3to8->setAxisTitle("# tracking particles", 2);
1056 
1057  // pT c (>8 GeV)
1058  // Eta 1 (0 to 0.7)
1059  HistoName = "respt_eta0to0p7_pt8toInf";
1060  respt_eta0to0p7_pt8toInf = iBooker.book1D(HistoName,
1061  HistoName,
1062  psRes_pt.getParameter<int32_t>("Nbinsx"),
1063  psRes_pt.getParameter<double>("xmin"),
1064  psRes_pt.getParameter<double>("xmax"));
1065  respt_eta0to0p7_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1066  respt_eta0to0p7_pt8toInf->setAxisTitle("# tracking particles", 2);
1067 
1068  // Eta 2 (0.7 to 1.0)
1069  HistoName = "respt_eta0p7to1_pt8toInf";
1070  respt_eta0p7to1_pt8toInf = iBooker.book1D(HistoName,
1071  HistoName,
1072  psRes_pt.getParameter<int32_t>("Nbinsx"),
1073  psRes_pt.getParameter<double>("xmin"),
1074  psRes_pt.getParameter<double>("xmax"));
1075  respt_eta0p7to1_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1076  respt_eta0p7to1_pt8toInf->setAxisTitle("# tracking particles", 2);
1077 
1078  // Eta 3 (1.0 to 1.2)
1079  HistoName = "respt_eta1to1p2_pt8toInf";
1080  respt_eta1to1p2_pt8toInf = iBooker.book1D(HistoName,
1081  HistoName,
1082  psRes_pt.getParameter<int32_t>("Nbinsx"),
1083  psRes_pt.getParameter<double>("xmin"),
1084  psRes_pt.getParameter<double>("xmax"));
1085  respt_eta1to1p2_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1086  respt_eta1to1p2_pt8toInf->setAxisTitle("# tracking particles", 2);
1087 
1088  // Eta 4 (1.2 to 1.6)
1089  HistoName = "respt_eta1p2to1p6_pt8toInf";
1090  respt_eta1p2to1p6_pt8toInf = iBooker.book1D(HistoName,
1091  HistoName,
1092  psRes_pt.getParameter<int32_t>("Nbinsx"),
1093  psRes_pt.getParameter<double>("xmin"),
1094  psRes_pt.getParameter<double>("xmax"));
1095  respt_eta1p2to1p6_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1096  respt_eta1p2to1p6_pt8toInf->setAxisTitle("# tracking particles", 2);
1097 
1098  // Eta 5 (1.6 to 2.0)
1099  HistoName = "respt_eta1p6to2_pt8toInf";
1100  respt_eta1p6to2_pt8toInf = iBooker.book1D(HistoName,
1101  HistoName,
1102  psRes_pt.getParameter<int32_t>("Nbinsx"),
1103  psRes_pt.getParameter<double>("xmin"),
1104  psRes_pt.getParameter<double>("xmax"));
1105  respt_eta1p6to2_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1106  respt_eta1p6to2_pt8toInf->setAxisTitle("# tracking particles", 2);
1107 
1108  // Eta 6 (2.0 to 2.4)
1109  HistoName = "respt_eta2to2p4_pt8toInf";
1110  respt_eta2to2p4_pt8toInf = iBooker.book1D(HistoName,
1111  HistoName,
1112  psRes_pt.getParameter<int32_t>("Nbinsx"),
1113  psRes_pt.getParameter<double>("xmin"),
1114  psRes_pt.getParameter<double>("xmax"));
1115  respt_eta2to2p4_pt8toInf->setAxisTitle("(p_{T}(trk) - p_{T}(tp))/p_{T}(tp)", 1);
1116  respt_eta2to2p4_pt8toInf->setAxisTitle("# tracking particles", 2);
1117 
1118  // Phi parts (for resolution)
1119  // Eta 1 (0 to 0.7)
1120  edm::ParameterSet psRes_phi = conf_.getParameter<edm::ParameterSet>("TH1Res_phi");
1121  HistoName = "resphi_eta0to0p7";
1122  resphi_eta0to0p7 = iBooker.book1D(HistoName,
1123  HistoName,
1124  psRes_phi.getParameter<int32_t>("Nbinsx"),
1125  psRes_phi.getParameter<double>("xmin"),
1126  psRes_phi.getParameter<double>("xmax"));
1127  resphi_eta0to0p7->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
1128  resphi_eta0to0p7->setAxisTitle("# tracking particles", 2);
1129 
1130  // Eta 2 (0.7 to 1.0)
1131  HistoName = "resphi_eta0p7to1";
1132  resphi_eta0p7to1 = iBooker.book1D(HistoName,
1133  HistoName,
1134  psRes_phi.getParameter<int32_t>("Nbinsx"),
1135  psRes_phi.getParameter<double>("xmin"),
1136  psRes_phi.getParameter<double>("xmax"));
1137  resphi_eta0p7to1->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
1138  resphi_eta0p7to1->setAxisTitle("# tracking particles", 2);
1139 
1140  // Eta 3 (1.0 to 1.2)
1141  HistoName = "resphi_eta1to1p2";
1142  resphi_eta1to1p2 = iBooker.book1D(HistoName,
1143  HistoName,
1144  psRes_phi.getParameter<int32_t>("Nbinsx"),
1145  psRes_phi.getParameter<double>("xmin"),
1146  psRes_phi.getParameter<double>("xmax"));
1147  resphi_eta1to1p2->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
1148  resphi_eta1to1p2->setAxisTitle("# tracking particles", 2);
1149 
1150  // Eta 4 (1.2 to 1.6)
1151  HistoName = "resphi_eta1p2to1p6";
1152  resphi_eta1p2to1p6 = iBooker.book1D(HistoName,
1153  HistoName,
1154  psRes_phi.getParameter<int32_t>("Nbinsx"),
1155  psRes_phi.getParameter<double>("xmin"),
1156  psRes_phi.getParameter<double>("xmax"));
1157  resphi_eta1p2to1p6->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
1158  resphi_eta1p2to1p6->setAxisTitle("# tracking particles", 2);
1159 
1160  // Eta 5 (1.6 to 2.0)
1161  HistoName = "resphi_eta1p6to2";
1162  resphi_eta1p6to2 = iBooker.book1D(HistoName,
1163  HistoName,
1164  psRes_phi.getParameter<int32_t>("Nbinsx"),
1165  psRes_phi.getParameter<double>("xmin"),
1166  psRes_phi.getParameter<double>("xmax"));
1167  resphi_eta1p6to2->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
1168  resphi_eta1p6to2->setAxisTitle("# tracking particles", 2);
1169 
1170  // Eta 6 (2.0 to 2.4)
1171  HistoName = "resphi_eta2to2p4";
1172  resphi_eta2to2p4 = iBooker.book1D(HistoName,
1173  HistoName,
1174  psRes_phi.getParameter<int32_t>("Nbinsx"),
1175  psRes_phi.getParameter<double>("xmin"),
1176  psRes_phi.getParameter<double>("xmax"));
1177  resphi_eta2to2p4->setAxisTitle("#phi_{trk} - #phi_{tp}", 1);
1178  resphi_eta2to2p4->setAxisTitle("# tracking particles", 2);
1179 
1180  // VtxZ parts (for resolution)
1181  // Eta 1 (0 to 0.7)
1182  edm::ParameterSet psRes_VtxZ = conf_.getParameter<edm::ParameterSet>("TH1Res_VtxZ");
1183  HistoName = "resVtxZ_eta0to0p7";
1184  resVtxZ_eta0to0p7 = iBooker.book1D(HistoName,
1185  HistoName,
1186  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
1187  psRes_VtxZ.getParameter<double>("xmin"),
1188  psRes_VtxZ.getParameter<double>("xmax"));
1189  resVtxZ_eta0to0p7->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
1190  resVtxZ_eta0to0p7->setAxisTitle("# tracking particles", 2);
1191 
1192  // Eta 2 (0.7 to 1.0)
1193  HistoName = "resVtxZ_eta0p7to1";
1194  resVtxZ_eta0p7to1 = iBooker.book1D(HistoName,
1195  HistoName,
1196  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
1197  psRes_VtxZ.getParameter<double>("xmin"),
1198  psRes_VtxZ.getParameter<double>("xmax"));
1199  resVtxZ_eta0p7to1->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
1200  resVtxZ_eta0p7to1->setAxisTitle("# tracking particles", 2);
1201 
1202  // Eta 3 (1.0 to 1.2)
1203  HistoName = "resVtxZ_eta1to1p2";
1204  resVtxZ_eta1to1p2 = iBooker.book1D(HistoName,
1205  HistoName,
1206  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
1207  psRes_VtxZ.getParameter<double>("xmin"),
1208  psRes_VtxZ.getParameter<double>("xmax"));
1209  resVtxZ_eta1to1p2->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
1210  resVtxZ_eta1to1p2->setAxisTitle("# tracking particles", 2);
1211 
1212  // Eta 4 (1.2 to 1.6)
1213  HistoName = "resVtxZ_eta1p2to1p6";
1214  resVtxZ_eta1p2to1p6 = iBooker.book1D(HistoName,
1215  HistoName,
1216  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
1217  psRes_VtxZ.getParameter<double>("xmin"),
1218  psRes_VtxZ.getParameter<double>("xmax"));
1219  resVtxZ_eta1p2to1p6->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
1220  resVtxZ_eta1p2to1p6->setAxisTitle("# tracking particles", 2);
1221 
1222  // Eta 5 (1.6 to 2.0)
1223  HistoName = "resVtxZ_eta1p6to2";
1224  resVtxZ_eta1p6to2 = iBooker.book1D(HistoName,
1225  HistoName,
1226  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
1227  psRes_VtxZ.getParameter<double>("xmin"),
1228  psRes_VtxZ.getParameter<double>("xmax"));
1229  resVtxZ_eta1p6to2->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
1230  resVtxZ_eta1p6to2->setAxisTitle("# tracking particles", 2);
1231 
1232  // Eta 6 (2.0 to 2.4)
1233  HistoName = "resVtxZ_eta2to2p4";
1234  resVtxZ_eta2to2p4 = iBooker.book1D(HistoName,
1235  HistoName,
1236  psRes_VtxZ.getParameter<int32_t>("Nbinsx"),
1237  psRes_VtxZ.getParameter<double>("xmin"),
1238  psRes_VtxZ.getParameter<double>("xmax"));
1239  resVtxZ_eta2to2p4->setAxisTitle("VtxZ_{trk} - VtxZ_{tp} [cm]", 1);
1240  resVtxZ_eta2to2p4->setAxisTitle("# tracking particles", 2);
1241 
1242  // d0 parts (for resolution)
1243  // Eta 1 (0 to 0.7)
1244  edm::ParameterSet psRes_d0 = conf_.getParameter<edm::ParameterSet>("TH1Res_d0");
1245  HistoName = "resd0_eta0to0p7";
1246  resd0_eta0to0p7 = iBooker.book1D(HistoName,
1247  HistoName,
1248  psRes_d0.getParameter<int32_t>("Nbinsx"),
1249  psRes_d0.getParameter<double>("xmin"),
1250  psRes_d0.getParameter<double>("xmax"));
1251  resd0_eta0to0p7->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
1252  resd0_eta0to0p7->setAxisTitle("# tracking particles", 2);
1253 
1254  // Eta 2 (0.7 to 1.0)
1255  HistoName = "resd0_eta0p7to1";
1256  resd0_eta0p7to1 = iBooker.book1D(HistoName,
1257  HistoName,
1258  psRes_d0.getParameter<int32_t>("Nbinsx"),
1259  psRes_d0.getParameter<double>("xmin"),
1260  psRes_d0.getParameter<double>("xmax"));
1261  resd0_eta0p7to1->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
1262  resd0_eta0p7to1->setAxisTitle("# tracking particles", 2);
1263 
1264  // Eta 3 (1.0 to 1.2)
1265  HistoName = "resd0_eta1to1p2";
1266  resd0_eta1to1p2 = iBooker.book1D(HistoName,
1267  HistoName,
1268  psRes_d0.getParameter<int32_t>("Nbinsx"),
1269  psRes_d0.getParameter<double>("xmin"),
1270  psRes_d0.getParameter<double>("xmax"));
1271  resd0_eta1to1p2->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
1272  resd0_eta1to1p2->setAxisTitle("# tracking particles", 2);
1273 
1274  // Eta 4 (1.2 to 1.6)
1275  HistoName = "resd0_eta1p2to1p6";
1276  resd0_eta1p2to1p6 = iBooker.book1D(HistoName,
1277  HistoName,
1278  psRes_d0.getParameter<int32_t>("Nbinsx"),
1279  psRes_d0.getParameter<double>("xmin"),
1280  psRes_d0.getParameter<double>("xmax"));
1281  resd0_eta1p2to1p6->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
1282  resd0_eta1p2to1p6->setAxisTitle("# tracking particles", 2);
1283 
1284  // Eta 5 (1.6 to 2.0)
1285  HistoName = "resd0_eta1p6to2";
1286  resd0_eta1p6to2 = iBooker.book1D(HistoName,
1287  HistoName,
1288  psRes_d0.getParameter<int32_t>("Nbinsx"),
1289  psRes_d0.getParameter<double>("xmin"),
1290  psRes_d0.getParameter<double>("xmax"));
1291  resd0_eta1p6to2->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
1292  resd0_eta1p6to2->setAxisTitle("# tracking particles", 2);
1293 
1294  // Eta 6 (2.0 to 2.4)
1295  HistoName = "resd0_eta2to2p4";
1296  resd0_eta2to2p4 = iBooker.book1D(HistoName,
1297  HistoName,
1298  psRes_d0.getParameter<int32_t>("Nbinsx"),
1299  psRes_d0.getParameter<double>("xmin"),
1300  psRes_d0.getParameter<double>("xmax"));
1301  resd0_eta2to2p4->setAxisTitle("d0_{trk} - d0_{tp} [cm]", 1);
1302  resd0_eta2to2p4->setAxisTitle("# tracking particles", 2);
1303 
1304 } // end of method
1305 
1306 // Function to determine which layer of the detector the stub is in
1307 int OuterTrackerMonitorTrackingParticles::Layer(const float R_, const float Z_) const {
1308  const int sectionNum = 6; // 6 layers, 5 discs (per EC) + 1 "disc" for barrel
1309  const float Rmin[sectionNum] = {20., 33., 48., 65., 82., 105.};
1310  const float Rmax[sectionNum] = {30., 40., 58., 75., 91., 120.};
1311  const float zMin[sectionNum] = {0., 125., 145., 165., 200., 240.};
1312  int layer = -1;
1313  for (int i = 5; i >= 0; --i) {
1314  if (std::fabs(Z_) >= zMin[i]) {
1315  layer = 5 + i;
1316  break;
1317  }
1318  }
1319  if (layer == 5)
1320  for (unsigned i = 0; i < unsigned(sectionNum); ++i) {
1321  if (R_ > Rmin[i] && R_ < Rmax[i]) {
1322  layer = i;
1323  break;
1324  }
1325  }
1326  return layer;
1327 }
1328 
const LorentzVector & p4() const
Four-momentum Lorentz vector. Note this is taken from the first SimTrack only.
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
T getParameter(std::string const &) const
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
const_iterator end(bool update=false) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
T perp() const
Definition: PV3DBase.h:72
std::vector< TrackingParticle > TrackingParticleCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
virtual const Topology & topology() const
Definition: GeomDet.cc:81
int pdgId() const
PDG ID.
uint32_t ID
Definition: Definitions.h:26
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
int Layer(const float R_, const float Z_) const
edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > ttTrackToken_
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
void Fill(long long x)
const Double_t pi
edm::EDGetTokenT< std::vector< TrackingParticle > > trackingParticleToken_
float charge() const
Electric charge. Note this is taken from the first SimTrack only.
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
edm::EDGetTokenT< TTTrackAssociationMap< Ref_Phase2TrackerDigi_ > > ttTrackMCTruthToken_
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
edm::EDGetTokenT< TTClusterAssociationMap< Ref_Phase2TrackerDigi_ > > ttClusterMCTruthToken_
bool isValid() const
Definition: HandleBase.h:74
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
edm::EDGetTokenT< TTStubAssociationMap< Ref_Phase2TrackerDigi_ > > ttStubMCTruthToken_
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
Definition: DetId.h:18
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
std::string HistoName
void analyze(const edm::Event &, const edm::EventSetup &) override
Point vertex() const
Parent vertex position.
T eta() const
Definition: PV3DBase.h:76
edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > ttStubToken_
static std::atomic< unsigned int > counter
T get() const
Definition: EventSetup.h:71
const TrackerGeomDet * idToDet(DetId) const override
const double Rmax[kNumberCalorimeter]
T x() const
Definition: PV3DBase.h:62
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
T const * product() const
Definition: ESHandle.h:86
const double Rmin[kNumberCalorimeter]
const_iterator begin(bool update=false) const
Definition: Run.h:45