CMS 3D CMS Logo

SiPixelPhase1TrackEfficiency.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiPixelPhase1TrackEfficiency
4 // Class: SiPixelPhase1TrackEfficiency
5 //
6 
7 // Original Author: Marcel Schneider
8 
14 
31 
39 
40 
42 
43 namespace {
44 
45 class SiPixelPhase1TrackEfficiency final : public SiPixelPhase1Base {
46  enum {
47  VALID,
48  MISSING,
49  INACTIVE,
50  EFFICIENCY,
51  VERTICES
52  };
53 
54  public:
55  explicit SiPixelPhase1TrackEfficiency(const edm::ParameterSet& conf);
56  void analyze(const edm::Event&, const edm::EventSetup&) override;
57 
58  private:
62  edm::EDGetTokenT<TrajTrackAssociationCollection> trajTrackCollectionToken_;
64  bool applyVertexCut_;
65 
66  const TrackerTopology* trackerTopology_;
67  const Propagator* trackerPropagator_;
68  const MeasurementEstimator* chi2MeasurementEstimator_;
69 };
70 
71 SiPixelPhase1TrackEfficiency::SiPixelPhase1TrackEfficiency(const edm::ParameterSet& iConfig) :
72  SiPixelPhase1Base(iConfig)//,
73  {
74  tracker_ = consumes<MeasurementTrackerEvent>(iConfig.getParameter<edm::InputTag>("tracker"));
75  tracksToken_ = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"));
76  vtxToken_ = consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("primaryvertices"));
77  applyVertexCut_=iConfig.getUntrackedParameter<bool>("VertexCut",true);
78  trajTrackCollectionToken_ = consumes<TrajTrackAssociationCollection>(iConfig.getParameter<edm::InputTag>("trajectoryInput")); clustersToken_=consumes<edmNew::DetSetVector<SiPixelCluster> >(iConfig.getParameter<edm::InputTag>("clusters"));
79 }
80 
82  if( !checktrigger(iEvent,iSetup,DCS) ) return;
83 
84  // get geometry
86  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
87  assert(tracker.isValid());
88 
89  // get primary vertex
91  iEvent.getByToken( vtxToken_, vertices);
92 
93  // TrackerTopology for module informations
94  edm::ESHandle<TrackerTopology> trackerTopologyHandle;
95  iSetup.get<TrackerTopologyRcd>().get(trackerTopologyHandle);
96  trackerTopology_ = trackerTopologyHandle.product();
97 
98  // Tracker propagator for propagating tracks to other layers
99  edm::ESHandle<Propagator> propagatorHandle;
100  iSetup.get<TrackingComponentsRecord>().get("PropagatorWithMaterial", propagatorHandle);
101  std::unique_ptr<Propagator> propagatorUniquePtr(propagatorHandle.product() -> clone());
102  trackerPropagator_ = propagatorUniquePtr.get();
103  const_cast<Propagator*>(trackerPropagator_) -> setPropagationDirection(oppositeToMomentum);
104 
105  // Measurement estimator
106  edm::ESHandle<Chi2MeasurementEstimatorBase> chi2MeasurementEstimatorHandle;
107  iSetup.get<TrackingComponentsRecord>().get("Chi2", chi2MeasurementEstimatorHandle);
108  chi2MeasurementEstimator_ = chi2MeasurementEstimatorHandle.product();
109 
110  //Tracker
112  iEvent.getByToken(tracker_, trackerMeas);
113 
114  edm::ESHandle<MeasurementTracker> measurementTrackerHandle;
115  iSetup.get<CkfComponentsRecord>().get(measurementTrackerHandle);
116 
117  //vertices
118  if (!vertices.isValid()) return;
119  histo[VERTICES].fill(vertices->size(),DetId(0),&iEvent);
120  if (applyVertexCut_ && vertices->empty()) return;
121 
122  // should be used for weird cuts
123  //const auto primaryVertex = vertices->at(0);
124 
125  // get the map
127  iEvent.getByToken( tracksToken_, tracks);
128  if (!tracks.isValid()) return;
129 
130  //new
131  edm::Handle<TrajTrackAssociationCollection> trajTrackCollectionHandle;
132  iEvent.getByToken(trajTrackCollectionToken_, trajTrackCollectionHandle);
133  if (!trajTrackCollectionHandle.isValid()) return;
134 
135  //Access Pixel Clusters
137  iEvent.getByToken(clustersToken_, siPixelClusters);
138  if(!siPixelClusters.isValid()) return;
139 //
140 
142  iSetup.get<TkPixelCPERecord>().get("PixelCPEGeneric", cpEstimator);
143  if(!cpEstimator.isValid()) return;
144 
145  const PixelClusterParameterEstimator &cpe(*cpEstimator);
146  const TrackerGeometry *tkgeom=&(*tracker);
147 
149 
150  // Hp cut
151  int TRACK_QUALITY_HIGH_PURITY_BIT = 2;
152  int TRACK_QUALITY_HIGH_PURITY_MASK = 1 << TRACK_QUALITY_HIGH_PURITY_BIT;
153 
154  // Pt cut
155  float TRACK_PT_CUT_VAL = 1.0f;
156 
157  // Nstrip cut
158  int TRACK_NSTRIP_CUT_VAL = 10;
159 
160  //D0
161  std::array<float, 4> TRACK_D0_CUT_BARREL_VAL = {{0.01f, 0.02f, 0.02f, 0.02f}};
162  float TRACK_D0_CUT_FORWARD_VAL = 0.05f;
163 
164  //Dz
165  float TRACK_DZ_CUT_BARREL_VAL = 0.01f;
166  float TRACK_DZ_CUT_FORWARD_VAL = 0.5f;
167 
168  bool isBpixtrack = false, isFpixtrack = false;
169  int nStripHits = 0;
170  int nBpixL1Hits = 0;
171  int nBpixL2Hits = 0;
172  int nBpixL3Hits = 0;
173  int nBpixL4Hits = 0;
174  int nFpixD1Hits = 0;
175  int nFpixD2Hits = 0;
176  int nFpixD3Hits = 0;
177  bool passcuts = true;
178  bool passcuts_hit = true;
179 
180 
181  TrajectoryStateOnSurface tsosPXB2;
182  bool valid_layerFrom = false;
183 
184 
185  const GeometricSearchTracker * gst_ = trackerMeas->geometricSearchTracker();
186  const auto *pxbLayer1_ = gst_->pixelBarrelLayers().front();
187  const LayerMeasurements* theLayerMeasurements_ = new LayerMeasurements(*measurementTrackerHandle, *trackerMeas);
188 
189  std::vector<TrajectoryMeasurement> expTrajMeasurements;
190  std::vector<std::pair<int,bool[3]>> eff_pxb1_vector;
191 
192 
193  for(const auto &pair: *trajTrackCollectionHandle) {
194  const edm::Ref<std::vector<Trajectory>> traj = pair.key;
195  const reco::TrackRef track = pair.val;
196 
197  expTrajMeasurements.clear();
198  eff_pxb1_vector.clear();
199  //this cut is needed to be consisten with residuals calculation
200  if (applyVertexCut_ && (track->pt() < 0.75 || std::abs( track->dxy(vertices->at(0).position()) ) > 5*track->dxyError())) continue;
201 
202  isBpixtrack = false, isFpixtrack = false;
203  nStripHits = 0;
204  nBpixL1Hits = 0;
205  nBpixL2Hits = 0;
206  nBpixL3Hits = 0;
207  nBpixL4Hits = 0;
208  nFpixD1Hits = 0;
209  nFpixD2Hits = 0;
210  nFpixD3Hits = 0;
211  passcuts = true;
212  passcuts_hit = true;
213 
214  // first, look at the full track to see whether it is good
215  // auto const & trajParams = track.extra()->trajParams();
216 
217 
218 
219  auto hb = track->recHitsBegin();
220  for(unsigned int h=0;h<track->recHitsSize();h++){
221 
222  auto hit = *(hb+h);
223  if(!hit->isValid()) continue;
224 
225  DetId id = hit->geographicalId();
226  uint32_t subdetid = (id.subdetId());
227 
228  //Check the location of valid hit
229  if (subdetid == PixelSubdetector::PixelBarrel && hit->isValid())
230  {
231  isBpixtrack = true;
232  if(trackerTopology_ -> pxbLayer(id) == 1) nBpixL1Hits++;
233  if(trackerTopology_ -> pxbLayer(id) == 2) nBpixL2Hits++;
234  if(trackerTopology_ -> pxbLayer(id) == 3) nBpixL3Hits++;
235  if(trackerTopology_ -> pxbLayer(id) == 4) nBpixL4Hits++;
236  }
237  if (subdetid == PixelSubdetector::PixelEndcap && hit->isValid())
238  {
239  isFpixtrack = true;
240  if(trackerTopology_ -> pxfDisk(id) == 1) nFpixD1Hits++;
241  if(trackerTopology_ -> pxfDisk(id) == 2) nFpixD2Hits++;
242  if(trackerTopology_ -> pxfDisk(id) == 3) nFpixD3Hits++;
243  }
244 
245  // count strip hits
246  if(subdetid==StripSubdetector::TIB) nStripHits++;
247  if(subdetid==StripSubdetector::TOB) nStripHits++;
248  if(subdetid==StripSubdetector::TID) nStripHits++;
249  if(subdetid==StripSubdetector::TEC) nStripHits++;
250 
251  // check that we are in the pixel
252  // if (subdetid == PixelSubdetector::PixelBarrel) isBpixtrack = true;
253  // if (subdetid == PixelSubdetector::PixelEndcap) isFpixtrack = true;
254  }
255 
256  if (!isBpixtrack && !isFpixtrack) continue;
257 
258  // Hp cut
259  if(!((track->qualityMask() & TRACK_QUALITY_HIGH_PURITY_MASK) >> TRACK_QUALITY_HIGH_PURITY_BIT)) passcuts = false;
260 
261  // Pt cut
262  if(!(TRACK_PT_CUT_VAL < track->pt())) passcuts = false;
263 
264  // Nstrip cut
265  if(!(TRACK_NSTRIP_CUT_VAL < nStripHits)) passcuts = false;
266 
267 
268  // then, look at each hit
269  for(unsigned int h=0;h<track->recHitsSize();h++){
270 
271  passcuts_hit=true;
272  auto hit = *(hb+h);
273 
274  DetId id = hit->geographicalId();
275  uint32_t subdetid = (id.subdetId());
276  if ( subdetid != PixelSubdetector::PixelBarrel
277  && subdetid != PixelSubdetector::PixelEndcap) continue;
278 
279  bool isHitValid = hit->getType()==TrackingRecHit::valid;
280  bool isHitMissing = hit->getType()==TrackingRecHit::missing;
281  bool isHitInactive = hit->getType()==TrackingRecHit::inactive;
282 
283 
284  //D0
285  if(subdetid == PixelSubdetector::PixelBarrel)
286  { if(!((std::abs( track->dxy(vertices->at(0).position()) ) * -1.0) < TRACK_D0_CUT_BARREL_VAL[trackerTopology_ -> pxbLayer(id) -1])) passcuts_hit = false;}
287  if(subdetid == PixelSubdetector::PixelEndcap)
288  { if(!((std::abs( track->dxy(vertices->at(0).position()) ) * -1.0) < TRACK_D0_CUT_FORWARD_VAL)) passcuts_hit = false;}
289 
290 
291  //Dz
292  if(subdetid == PixelSubdetector::PixelBarrel)
293  { if(!(std::abs( track->dz(vertices->at(0).position())) < TRACK_DZ_CUT_BARREL_VAL)) passcuts_hit = false;}
294  if(subdetid == PixelSubdetector::PixelEndcap)
295  { if(!(std::abs( track->dz(vertices->at(0).position())) < TRACK_DZ_CUT_FORWARD_VAL)) passcuts_hit = false;}
296 
297 
298 
299  // Pixhit cut
300  if(subdetid == PixelSubdetector::PixelBarrel)
301  {
302  if(trackerTopology_ -> pxbLayer(id) == 1) if(!(
303  (nBpixL2Hits > 0 && nBpixL3Hits > 0 && nBpixL4Hits > 0) ||
304  (nBpixL2Hits > 0 && nBpixL3Hits > 0 && nFpixD1Hits > 0) ||
305  (nBpixL2Hits > 0 && nFpixD1Hits > 0 && nFpixD2Hits > 0) ||
306  (nFpixD1Hits > 0 && nFpixD2Hits > 0 && nFpixD3Hits > 0))) passcuts_hit = false;
307  if(trackerTopology_ -> pxbLayer(id) == 2) if(!(
308  (nBpixL1Hits > 0 && nBpixL3Hits > 0 && nBpixL4Hits > 0) ||
309  (nBpixL1Hits > 0 && nBpixL3Hits > 0 && nFpixD1Hits > 0) ||
310  (nBpixL1Hits > 0 && nFpixD1Hits > 0 && nFpixD2Hits > 0))) passcuts_hit = false;
311  if(trackerTopology_ -> pxbLayer(id) == 3) if(!(
312  (nBpixL1Hits > 0 && nBpixL2Hits > 0 && nBpixL4Hits > 0) ||
313  (nBpixL1Hits > 0 && nBpixL2Hits > 0 && nFpixD1Hits > 0))) passcuts_hit = false;
314  if(trackerTopology_ -> pxbLayer(id) == 4) if(!(
315  (nBpixL1Hits > 0 && nBpixL2Hits > 0 && nBpixL3Hits > 0))) passcuts_hit = false;
316  }
317  if(subdetid == PixelSubdetector::PixelEndcap)
318  {
319  if(trackerTopology_ -> pxfDisk(id) == 1) if(!(
320  (nBpixL1Hits > 0 && nBpixL2Hits > 0 && nBpixL3Hits > 0) ||
321  (nBpixL1Hits > 0 && nBpixL2Hits > 0 && nFpixD2Hits > 0) ||
322  (nBpixL1Hits > 0 && nFpixD2Hits > 0 && nFpixD3Hits > 0))) passcuts_hit = false;
323  if(trackerTopology_ -> pxfDisk(id) == 2) if(!(
324  (nBpixL1Hits > 0 && nBpixL2Hits > 0 && nFpixD1Hits > 0) ||
325  (nBpixL1Hits > 0 && nFpixD1Hits > 0 && nFpixD3Hits > 0))) passcuts_hit = false;
326  if(trackerTopology_ -> pxfDisk(id) == 3) if(!(
327  (nBpixL1Hits > 0 && nFpixD1Hits > 0 && nFpixD2Hits > 0))) passcuts_hit = false;
328  }
329  /*
330  //Fiducial Cut - will work on it later
331  const SiPixelRecHit* pixhit = dynamic_cast<const SiPixelRecHit*>(hit);
332  const PixelGeomDetUnit* geomdetunit = dynamic_cast<const PixelGeomDetUnit*> ( tracker->idToDet(id) );
333  const PixelTopology& topol = geomdetunit->specificTopology();
334 
335  LocalPoint lp;
336  if (pixhit) {
337  lp = pixhit->localPosition();
338  }
339 
340  MeasurementPoint mp = topol.measurementPosition(lp);
341  int row = (int) mp.x() % 80;
342  int col = (int) mp.y() % 52;
343 
344  int centerrow = 40;
345  int centercol = 26;
346 
347  if (!((col < (centercol + 10)) && (col > (centercol - 10)) && (row < (centerrow + 10)) && (row > (centerrow -10 )))) passcuts_hit = false;
348  */
349 
350 
351  if (passcuts_hit ==true && passcuts){
352 
353  if ( !(subdetid == PixelSubdetector::PixelBarrel && trackerTopology_ -> pxbLayer(id) == 1) ){
354 
355  if (isHitValid) {
356  histo[VALID].fill(id, &iEvent);
357  histo[EFFICIENCY].fill(1, id, &iEvent);
358  }
359  if (isHitMissing) {
360  histo[MISSING].fill(id, &iEvent);
361  histo[EFFICIENCY].fill(0, id, &iEvent);
362  }
363  if (isHitInactive) {
364  histo[INACTIVE].fill(id, &iEvent);
365  }
366  }
367 
368  }
369 
370  }
371 
372 
373 
375  valid_layerFrom = false;
376 
377  //propagation only from PXB2 and PXD1, more cuts later
378  for (const auto &tm : traj->measurements()) {
379  if (tm.recHit().get() && tm.recHitR().isValid()) {
380  DetId where = tm.recHitR().geographicalId();
381  int source_det = where.subdetId();
382 
384  int source_layer = trackerTopology_ -> pxbLayer(where);
385  if (source_layer==2){
386  if (tm.updatedState().isValid()) {tsosPXB2 = tm.updatedState(); valid_layerFrom=true;}
387  }
388  }
389 
391  int source_layer = trackerTopology_ -> pxfDisk(where);
392  if (source_layer==1){
393  if (tm.updatedState().isValid()) {tsosPXB2 = tm.updatedState(); valid_layerFrom=true;}
394 
395  }
396  }
397  }
398  } //uodated tsosPXB2 here
399 
400 
401 
402  if (!valid_layerFrom) continue;
403  if (!tsosPXB2.isValid()) continue;
404 
405 
406 
407  //propagation A: Calculate the efficiency by the distance to the closest cluster
408  expTrajMeasurements = theLayerMeasurements_->measurements(*pxbLayer1_, tsosPXB2, *trackerPropagator_, *chi2MeasurementEstimator_);
409  auto compDets = pxbLayer1_->compatibleDets(tsosPXB2, *trackerPropagator_, *chi2MeasurementEstimator_);
410  std::pair<int,bool[3]> eff_map;
411  bool valid = false;
412  bool missing = false;
413  passcuts_hit = true;
414 
415 
416  //Fiducial Cut, only calculate the efficiency of the central pixels
417  for(uint p=0; p<expTrajMeasurements.size();p++){
418 
419  TrajectoryMeasurement pxb1TM(expTrajMeasurements[p]);
420  const auto& pxb1Hit = pxb1TM.recHit();
421  int detidHit= pxb1Hit->geographicalId();
422  if (detidHit==0) continue;
423 
424  const SiPixelRecHit* pixhit = dynamic_cast<const SiPixelRecHit*>(pxb1Hit->hit());
425  const PixelGeomDetUnit* geomdetunit = dynamic_cast<const PixelGeomDetUnit*> ( tracker->idToDet(detidHit) );
426  const PixelTopology& topol = geomdetunit->specificTopology();
427 
428  LocalPoint lp;
429  if (pixhit) {
430  lp = pixhit->localPosition();
431  }
432 
433  MeasurementPoint mp = topol.measurementPosition(lp);
434  int row = (int) mp.x() % 80;
435  int col = (int) mp.y() % 52;
436 
437  int centerrow = 40;
438  int centercol = 26;
439 
440  if (!((col < (centercol + 10)) && (col > (centercol - 10)) && (row < (centerrow + 10)) && (row > (centerrow - 10 )))) passcuts_hit = false;
441 
442 
443  //Access the distance to the closest cluster
444  for (const auto & detAndState : compDets) {
445 
446  const auto & pXb1_lpos = detAndState.second.localPosition();
447  int detid = detAndState.first->geographicalId().rawId();
448  for (edmNew::DetSetVector<SiPixelCluster>::const_iterator iter_cl=siPixelClusters->begin(); iter_cl!=siPixelClusters->end(); iter_cl++ ){
449  DetId detId(iter_cl->id());
450  float minD[2]; minD[0]=minD[1]=10000.;
451  if(detId.rawId()!=detAndState.first->geographicalId().rawId()) continue;
452  if(pxb1Hit->geographicalId().rawId()!=detAndState.first->geographicalId().rawId()) continue;
453  const PixelGeomDetUnit *pixdet=(const PixelGeomDetUnit*) tkgeom->idToDetUnit(detId);
454  edmNew::DetSet<SiPixelCluster>::const_iterator itCluster=iter_cl->begin();
455  if (passcuts_hit){
456  for( ; itCluster!=iter_cl->end(); ++itCluster){
457 
458  LocalPoint lp(itCluster->x(), itCluster->y(), 0.);
459  PixelClusterParameterEstimator::ReturnType params=cpe.getParameters(*itCluster,*pixdet);
460  lp=std::get<0>(params);
461 
462  float Xdist = abs(lp.x()-pXb1_lpos.x());
463  float Ydist = abs(lp.y()-pXb1_lpos.y());
464  if(Xdist<minD[0]){
465  minD[0]=Xdist;
466  }
467  if(Ydist<minD[1]){
468  minD[1]=Ydist;
469  }
470  }
471 
472  if ((minD[0] < 0.02) && (minD[1] < 0.02)) {
473  valid = true;
474  missing =false;
475 
476  } else{
477  missing =true;
478  valid = false;
479 
480  }
481  }
482  }
483 
484  //cuts: exactly the same as for other hits but assuming PXB1
485 
486  //D0
487  if(!((std::abs( track->dxy(vertices->at(0).position()) ) * -1.0) < TRACK_D0_CUT_BARREL_VAL[trackerTopology_ -> pxbLayer(detid) -1])) passcuts_hit = false;
488  //Dz
489  if(!(std::abs( track->dz(vertices->at(0).position())) < TRACK_DZ_CUT_BARREL_VAL)) passcuts_hit = false;
490  // Pixhit cut
491  if(!((nBpixL2Hits > 0 && nBpixL3Hits > 0 && nBpixL4Hits > 0) || (nBpixL2Hits > 0 && nBpixL3Hits > 0 && nFpixD1Hits > 0) ||
492  (nBpixL2Hits > 0 && nFpixD1Hits > 0 && nFpixD2Hits > 0) || (nFpixD1Hits > 0 && nFpixD2Hits > 0 && nFpixD3Hits > 0))) passcuts_hit = false;
493  bool found_det = false;
494 
495  if (passcuts && passcuts_hit){
496  for (unsigned int i_eff=0; i_eff<eff_pxb1_vector.size(); i_eff++){
497  //in case found hit in the same det, take only the valid hit
498  if (eff_pxb1_vector[i_eff].first==detid){
499 
500  found_det=true;
501  if (eff_pxb1_vector[i_eff].second[0]==false && valid==true){
502  eff_pxb1_vector[i_eff].second[0]=valid;
503  eff_pxb1_vector[i_eff].second[1]=missing;
504 
505  }
506  }
507 
508  }
509  if (!found_det) {
510 
511  eff_map.first=detid;
512  eff_map.second[0]=valid;
513  eff_map.second[1]=missing;
514  eff_pxb1_vector.push_back(eff_map);
515 
516  }
517  }
518 
519  }
520  }
521 
522  //propagation B: filling inactive hits
523 
524  for(uint p=0; p<expTrajMeasurements.size();p++){
525 
526  TrajectoryMeasurement pxb1TM(expTrajMeasurements[p]);
527  const auto& pxb1Hit = pxb1TM.recHit();
528  bool inactive = (pxb1Hit->getType()==TrackingRecHit::inactive);
529  int detid= pxb1Hit->geographicalId();
530  bool found_det = false;
531 
532  if (passcuts && passcuts_hit){
533  for (unsigned int i_eff=0; i_eff<eff_pxb1_vector.size(); i_eff++){
534  //in case found hit in the same det, take only the valid hit
535  if (eff_pxb1_vector[i_eff].first==detid){
536 
537  found_det=true;
538  if (eff_pxb1_vector[i_eff].second[0]==false && valid==true){
539  eff_pxb1_vector[i_eff].second[2]=inactive;
540  }
541  }
542 
543  }
544 
545  //if no other hit in det
546  if (!found_det) {
547 
548  eff_map.first=detid;
549  eff_map.second[2]=inactive;
550  eff_pxb1_vector.push_back(eff_map);
551 
552  }
553 
554  }
555 
556  }//traj loop
557 
558 
559 
560  if (eff_pxb1_vector.size() == 1) {
561 
562  //eff map is filled -> decide what to do for double hits, ie eff_pxb1_vector.size>1 ... if 1 just use MISSING and VALID as usual
563 
564  if (eff_pxb1_vector[0].second[0]) {
565  histo[VALID].fill(eff_pxb1_vector[0].first, &iEvent);
566  histo[EFFICIENCY].fill(1, eff_pxb1_vector[0].first, &iEvent);
567 
568  }
569  if (eff_pxb1_vector[0].second[1]) {
570  histo[MISSING].fill(eff_pxb1_vector[0].first, &iEvent);
571  histo[EFFICIENCY].fill(0, eff_pxb1_vector[0].first, &iEvent);
572 
573  }
574 
575  if (eff_pxb1_vector[0].second[2]) {
576  histo[INACTIVE].fill(eff_pxb1_vector[0].first, &iEvent);
577 
578  }
579 
580  }
581 
582  }//trajTrackHandle
583 
584 
585  histo[VALID ].executePerEventHarvesting(&iEvent);
586  histo[MISSING ].executePerEventHarvesting(&iEvent);
587  histo[INACTIVE].executePerEventHarvesting(&iEvent);
588 }
589 
590 } // namespace
591 
592 DEFINE_FWK_MODULE(SiPixelPhase1TrackEfficiency);
T getParameter(std::string const &) const
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
static const char tracker_[]
T y() const
Definition: PV2DBase.h:46
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
T y() const
Definition: PV3DBase.h:63
data_type const * const_iterator
Definition: DetSetNew.h:30
key_type key() const
Accessor for product key.
Definition: Ref.h:265
U second(std::pair< T, U > const &p)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
int iEvent
Definition: GenABIO.cc:230
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< BarrelDetLayer const * > const & pixelBarrelLayers() const
bool isValid() const
Definition: HandleBase.h:74
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override=0
Definition: DetId.h:18
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
def uint(string)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
iterator end()
Definition: DetSetNew.h:70
T get() const
Definition: EventSetup.h:63
col
Definition: cuy.py:1009
const TrackerGeomDet * idToDet(DetId) const override
LocalPoint localPosition() const final
std::tuple< LocalPoint, LocalError, SiPixelRecHitQuality::QualWordType > ReturnType
bool isValid() const
Definition: ESHandle.h:47
T x() const
Definition: PV2DBase.h:45
T x() const
Definition: PV3DBase.h:62
T const * product() const
Definition: ESHandle.h:86
const GeometricSearchTracker * geometricSearchTracker() const
Our base class.
Definition: SiPixelRecHit.h:23