CMS 3D CMS Logo

HitEff.cc
Go to the documentation of this file.
1 // Package: CalibTracker/SiStripHitEfficiency
3 // Class: HitEff
4 // Original Author: Keith Ulmer--University of Colorado
5 // keith.ulmer@colorado.edu
6 //
8 
9 // system include files
10 #include <memory>
11 #include <string>
12 #include <iostream>
13 
14 // user includes
60 
61 // ROOT includes
62 #include "TMath.h"
63 #include "TH1F.h"
64 
65 // custom made printout
66 #define LOGPRINT edm::LogPrint("SiStripHitEfficiency:HitEff")
67 
68 //
69 // constructors and destructor
70 //
71 
72 using namespace std;
74  : scalerToken_(consumes<LumiScalersCollection>(conf.getParameter<edm::InputTag>("lumiScalers"))),
75  metaDataToken_(consumes<OnlineLuminosityRecord>(conf.getParameter<edm::InputTag>("metadata"))),
76  commonModeToken_(mayConsume<edm::DetSetVector<SiStripRawDigi> >(conf.getParameter<edm::InputTag>("commonMode"))),
77  siStripClusterInfo_(consumesCollector()),
78  combinatorialTracks_token_(
79  consumes<reco::TrackCollection>(conf.getParameter<edm::InputTag>("combinatorialTracks"))),
80  trajectories_token_(consumes<std::vector<Trajectory> >(conf.getParameter<edm::InputTag>("trajectories"))),
81  trajTrackAsso_token_(consumes<TrajTrackAssociationCollection>(conf.getParameter<edm::InputTag>("trajectories"))),
82  clusters_token_(
83  consumes<edmNew::DetSetVector<SiStripCluster> >(conf.getParameter<edm::InputTag>("siStripClusters"))),
84  digis_token_(consumes<DetIdCollection>(conf.getParameter<edm::InputTag>("siStripDigis"))),
85  trackerEvent_token_(consumes<MeasurementTrackerEvent>(conf.getParameter<edm::InputTag>("trackerEvent"))),
86  topoToken_(esConsumes()),
87  geomToken_(esConsumes()),
88  cpeToken_(esConsumes(edm::ESInputTag("", "StripCPEfromTrackAngle"))),
89  siStripQualityToken_(esConsumes()),
90  magFieldToken_(esConsumes()),
91  measurementTkToken_(esConsumes()),
92  chi2MeasurementEstimatorToken_(esConsumes(edm::ESInputTag("", "Chi2"))),
93  propagatorToken_(esConsumes(edm::ESInputTag("", "PropagatorWithMaterial"))),
94  conf_(conf) {
95  compSettings = conf_.getUntrackedParameter<int>("CompressionSettings", -1);
96  layers = conf_.getParameter<int>("Layer");
97  DEBUG = conf_.getParameter<bool>("Debug");
98  addLumi_ = conf_.getUntrackedParameter<bool>("addLumi", false);
99  addCommonMode_ = conf_.getUntrackedParameter<bool>("addCommonMode", false);
100  cutOnTracks_ = conf_.getUntrackedParameter<bool>("cutOnTracks", false);
101  trackMultiplicityCut_ = conf.getUntrackedParameter<unsigned int>("trackMultiplicity", 100);
102  useFirstMeas_ = conf_.getUntrackedParameter<bool>("useFirstMeas", false);
103  useLastMeas_ = conf_.getUntrackedParameter<bool>("useLastMeas", false);
105  conf_.getUntrackedParameter<bool>("useAllHitsFromTracksWithMissingHits", false);
106 }
107 
110  if (compSettings > 0) {
111  edm::LogInfo("SiStripHitEfficiency:HitEff") << "the compressions settings are:" << compSettings << std::endl;
112  fs->file().SetCompressionSettings(compSettings);
113  }
114 
115  traj = fs->make<TTree>("traj", "tree of trajectory positions");
116 #ifdef ExtendedCALIBTree
117  traj->Branch("timeDT", &timeDT, "timeDT/F");
118  traj->Branch("timeDTErr", &timeDTErr, "timeDTErr/F");
119  traj->Branch("timeDTDOF", &timeDTDOF, "timeDTDOF/I");
120  traj->Branch("timeECAL", &timeECAL, "timeECAL/F");
121  traj->Branch("dedx", &dedx, "dedx/F");
122  traj->Branch("dedxNOM", &dedxNOM, "dedxNOM/I");
123  traj->Branch("nLostHits", &nLostHits, "nLostHits/I");
124  traj->Branch("chi2", &chi2, "chi2/F");
125  traj->Branch("p", &p, "p/F");
126 #endif
127  traj->Branch("TrajGlbX", &TrajGlbX, "TrajGlbX/F");
128  traj->Branch("TrajGlbY", &TrajGlbY, "TrajGlbY/F");
129  traj->Branch("TrajGlbZ", &TrajGlbZ, "TrajGlbZ/F");
130  traj->Branch("TrajLocX", &TrajLocX, "TrajLocX/F");
131  traj->Branch("TrajLocY", &TrajLocY, "TrajLocY/F");
132  traj->Branch("TrajLocAngleX", &TrajLocAngleX, "TrajLocAngleX/F");
133  traj->Branch("TrajLocAngleY", &TrajLocAngleY, "TrajLocAngleY/F");
134  traj->Branch("TrajLocErrX", &TrajLocErrX, "TrajLocErrX/F");
135  traj->Branch("TrajLocErrY", &TrajLocErrY, "TrajLocErrY/F");
136  traj->Branch("ClusterLocX", &ClusterLocX, "ClusterLocX/F");
137  traj->Branch("ClusterLocY", &ClusterLocY, "ClusterLocY/F");
138  traj->Branch("ClusterLocErrX", &ClusterLocErrX, "ClusterLocErrX/F");
139  traj->Branch("ClusterLocErrY", &ClusterLocErrY, "ClusterLocErrY/F");
140  traj->Branch("ClusterStoN", &ClusterStoN, "ClusterStoN/F");
141  traj->Branch("ResX", &ResX, "ResX/F");
142  traj->Branch("ResXSig", &ResXSig, "ResXSig/F");
143  traj->Branch("ModIsBad", &ModIsBad, "ModIsBad/i");
144  traj->Branch("SiStripQualBad", &SiStripQualBad, "SiStripQualBad/i");
145  traj->Branch("withinAcceptance", &withinAcceptance, "withinAcceptance/O");
146  traj->Branch("nHits", &nHits, "nHits/I");
147  traj->Branch("pT", &pT, "pT/F");
148  traj->Branch("highPurity", &highPurity, "highPurity/O");
149  traj->Branch("trajHitValid", &trajHitValid, "trajHitValid/i");
150  traj->Branch("Id", &Id, "Id/i");
151  traj->Branch("run", &run, "run/i");
152  traj->Branch("event", &event, "event/i");
153  traj->Branch("layer", &whatlayer, "layer/i");
154  traj->Branch("tquality", &tquality, "tquality/I");
155  traj->Branch("bunchx", &bunchx, "bunchx/I");
156  if (addLumi_) {
157  traj->Branch("instLumi", &instLumi, "instLumi/F");
158  traj->Branch("PU", &PU, "PU/F");
159  }
160  if (addCommonMode_)
161  traj->Branch("commonMode", &commonMode, "commonMode/F");
162 
163  events = 0;
164  EventTrackCKF = 0;
165 }
166 
167 void HitEff::analyze(const edm::Event& e, const edm::EventSetup& es) {
168  //Retrieve tracker topology from geometry
169  const TrackerTopology* tTopo = &es.getData(topoToken_);
171 
172  // bool DEBUG = false;
173 
174  LogDebug("SiStripHitEfficiency:HitEff") << "beginning analyze from HitEff" << endl;
175 
176  using namespace edm;
177  using namespace reco;
178  // Step A: Get Inputs
179 
180  int run_nr = e.id().run();
181  int ev_nr = e.id().event();
182  int bunch_nr = e.bunchCrossing();
183 
184  // Luminosity informations
187 
188  instLumi = 0;
189  PU = 0;
190  if (addLumi_) {
191  if (lumiScalers.isValid() && !lumiScalers->empty()) {
192  if (lumiScalers->begin() != lumiScalers->end()) {
193  instLumi = lumiScalers->begin()->instantLumi();
194  PU = lumiScalers->begin()->pileup();
195  }
196  } else if (metaData.isValid()) {
197  instLumi = metaData->instLumi();
198  PU = metaData->avgPileUp();
199  } else {
200  edm::LogWarning("SiStripHitEfficiencyWorker") << "could not find a source for the Luminosity and PU";
201  }
202  }
203 
204  // CM
206  if (addCommonMode_)
207  e.getByToken(commonModeToken_, commonModeDigis);
208 
209  //CombinatoriaTrack
210  edm::Handle<reco::TrackCollection> trackCollectionCKF;
211  //edm::InputTag TkTagCKF = conf_.getParameter<edm::InputTag>("combinatorialTracks");
212  e.getByToken(combinatorialTracks_token_, trackCollectionCKF);
213 
214  edm::Handle<std::vector<Trajectory> > TrajectoryCollectionCKF;
215  //edm::InputTag TkTrajCKF = conf_.getParameter<edm::InputTag>("trajectories");
216  e.getByToken(trajectories_token_, TrajectoryCollectionCKF);
217 
218  edm::Handle<TrajTrackAssociationCollection> trajTrackAssociationHandle;
219  e.getByToken(trajTrackAsso_token_, trajTrackAssociationHandle);
220 
221  // Clusters
222  // get the SiStripClusters from the event
224  //e.getByLabel("siStripClusters", theClusters);
225  e.getByToken(clusters_token_, theClusters);
226 
227  //get tracker geometry
229  const TrackerGeometry* tkgeom = &(*tracker);
230 
231  //get Cluster Parameter Estimator
232  //std::string cpe = conf_.getParameter<std::string>("StripCPE");
234  const StripClusterParameterEstimator& stripcpe(*parameterestimator);
235 
236  // get the SiStripQuality records
238 
239  const MagneticField* magField_ = &es.getData(magFieldToken_);
240 
241  // get the list of module IDs with FED-detected errors
242  edm::Handle<DetIdCollection> fedErrorIds;
243  //e.getByLabel("siStripDigis", fedErrorIds );
244  e.getByToken(digis_token_, fedErrorIds);
245 
246  ESHandle<MeasurementTracker> measurementTrackerHandle = es.getHandle(measurementTkToken_);
247 
249  //e.getByLabel("MeasurementTrackerEvent", measurementTrackerEvent);
251 
253  const Propagator* thePropagator = &es.getData(propagatorToken_);
254 
255  events++;
256 
257  // *************** SiStripCluster Collection
258  const edmNew::DetSetVector<SiStripCluster>& input = *theClusters;
259 
260  //go through clusters to write out global position of good clusters for the layer understudy for comparison
261  // Loop through clusters just to print out locations
262  // Commented out to avoid discussion, should really be deleted.
263  /*
264  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter = input.begin(); DSViter != input.end(); DSViter++) {
265  // DSViter is a vector of SiStripClusters located on a single module
266  unsigned int ClusterId = DSViter->id();
267  DetId ClusterDetId(ClusterId);
268  const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)tkgeom->idToDetUnit(ClusterDetId);
269 
270  edmNew::DetSet<SiStripCluster>::const_iterator begin=DSViter->begin();
271  edmNew::DetSet<SiStripCluster>::const_iterator end =DSViter->end();
272  for(edmNew::DetSet<SiStripCluster>::const_iterator iter=begin;iter!=end;++iter) {
273  //iter is a single SiStripCluster
274  StripClusterParameterEstimator::LocalValues parameters=stripcpe.localParameters(*iter,*stripdet);
275 
276  const Surface* surface;
277  surface = &(tracker->idToDet(ClusterDetId)->surface());
278  LocalPoint lp = parameters.first;
279  GlobalPoint gp = surface->toGlobal(lp);
280  unsigned int layer = ::checkLayer(ClusterId, tTopo);
281  if(DEBUG) LOGPRINT << "Found hit in cluster collection layer = " << layer << " with id = " << ClusterId << " local X position = " << lp.x() << " +- " << sqrt(parameters.second.xx()) << " matched/stereo/rphi = " << ((ClusterId & 0x3)==0) << "/" << ((ClusterId & 0x3)==1) << "/" << ((ClusterId & 0x3)==2) << endl;
282  }
283  }
284  */
285 
286  // Tracking
287  const reco::TrackCollection* tracksCKF = trackCollectionCKF.product();
288  LogDebug("SiStripHitEfficiency:HitEff") << "number ckf tracks found = " << tracksCKF->size() << endl;
289  //if (tracksCKF->size() == 1 ){
290  if (!tracksCKF->empty()) {
291  if (cutOnTracks_ && (tracksCKF->size() >= trackMultiplicityCut_))
292  return;
293  if (cutOnTracks_)
294  LogDebug("SiStripHitEfficiency:HitEff")
295  << "starting checking good event with < " << trackMultiplicityCut_ << " tracks" << endl;
296 
297  EventTrackCKF++;
298 
299 #ifdef ExtendedCALIBTree
300  //get dEdx info if available
301  Handle<ValueMap<DeDxData> > dEdxUncalibHandle;
302  if (e.getByLabel("dedxMedianCTF", dEdxUncalibHandle)) {
303  const ValueMap<DeDxData> dEdxTrackUncalib = *dEdxUncalibHandle.product();
304 
305  reco::TrackRef itTrack = reco::TrackRef(trackCollectionCKF, 0);
306  dedx = dEdxTrackUncalib[itTrack].dEdx();
307  dedxNOM = dEdxTrackUncalib[itTrack].numberOfMeasurements();
308  } else {
309  dedx = -999.0;
310  dedxNOM = -999;
311  }
312 
313  //get muon and ecal timing info if available
315  if (e.getByLabel("muonsWitht0Correction", muH)) {
316  const MuonCollection& muonsT0 = *muH.product();
317  if (!muonsT0.empty()) {
318  MuonTime mt0 = muonsT0[0].time();
319  timeDT = mt0.timeAtIpInOut;
320  timeDTErr = mt0.timeAtIpInOutErr;
321  timeDTDOF = mt0.nDof;
322 
323  bool hasCaloEnergyInfo = muonsT0[0].isEnergyValid();
324  if (hasCaloEnergyInfo)
325  timeECAL = muonsT0[0].calEnergy().ecal_time;
326  }
327  } else {
328  timeDT = -999.0;
329  timeDTErr = -999.0;
330  timeDTDOF = -999;
331  timeECAL = -999.0;
332  }
333 
334 #endif
335  // actually should do a loop over all the tracks in the event here
336 
337  // Looping over traj-track associations to be able to get traj & track informations
338  for (TrajTrackAssociationCollection::const_iterator it = trajTrackAssociationHandle->begin();
339  it != trajTrackAssociationHandle->end();
340  it++) {
342  reco::TrackRef itrack = it->val;
343 
344  // for each track, fill some variables such as number of hits and momentum
345  nHits = itraj->foundHits();
346 #ifdef ExtendedCALIBTree
347  nLostHits = itraj->lostHits();
348  chi2 = (itraj->chiSquared() / itraj->ndof());
349  p = itraj->lastMeasurement().updatedState().globalMomentum().mag();
350 #endif
351  pT = sqrt((itraj->lastMeasurement().updatedState().globalMomentum().x() *
352  itraj->lastMeasurement().updatedState().globalMomentum().x()) +
353  (itraj->lastMeasurement().updatedState().globalMomentum().y() *
354  itraj->lastMeasurement().updatedState().globalMomentum().y()));
355 
356  // track quality
358 
359  std::vector<TrajectoryMeasurement> TMeas = itraj->measurements();
360  vector<TrajectoryMeasurement>::iterator itm;
361  double xloc = 0.;
362  double yloc = 0.;
363  double xErr = 0.;
364  double yErr = 0.;
365  double angleX = -999.;
366  double angleY = -999.;
367  double xglob, yglob, zglob;
368 
369  // Check whether the trajectory has some missing hits
370  bool hasMissingHits = false;
371  for (itm = TMeas.begin(); itm != TMeas.end(); itm++) {
372  auto theHit = (*itm).recHit();
373  if (theHit->getType() == TrackingRecHit::Type::missing)
374  hasMissingHits = true;
375  }
376 
377  // Loop on each measurement and take it into consideration
378  //--------------------------------------------------------
379 
380  for (itm = TMeas.begin(); itm != TMeas.end(); itm++) {
381  auto theInHit = (*itm).recHit();
382 
383  LogDebug("SiStripHitEfficiency:HitEff") << "theInHit is valid = " << theInHit->isValid() << endl;
384 
385  unsigned int iidd = theInHit->geographicalId().rawId();
386 
387  unsigned int TKlayers = ::checkLayer(iidd, tTopo);
388  LogDebug("SiStripHitEfficiency:HitEff") << "TKlayer from trajectory: " << TKlayers << " from module = " << iidd
389  << " matched/stereo/rphi = " << ((iidd & 0x3) == 0) << "/"
390  << ((iidd & 0x3) == 1) << "/" << ((iidd & 0x3) == 2) << endl;
391 
392  // Test first and last points of the trajectory
393  // the list of measurements starts from outer layers !!! This could change -> should add a check
394  bool isFirstMeas = (itm == (TMeas.end() - 1));
395  bool isLastMeas = (itm == (TMeas.begin()));
396 
397  if (!useFirstMeas_ && isFirstMeas)
398  continue;
399  if (!useLastMeas_ && isLastMeas)
400  continue;
401 
402  // In case of missing hit in the track, check whether to use the other hits or not.
403  if (hasMissingHits && theInHit->getType() != TrackingRecHit::Type::missing &&
405  continue;
406 
407  // If Trajectory measurement from TOB 6 or TEC 9, skip it because it's always valid they are filled later
408  if (TKlayers == 10 || TKlayers == 22) {
409  LogDebug("SiStripHitEfficiency:HitEff") << "skipping original TM for TOB 6 or TEC 9" << endl;
410  continue;
411  }
412 
413  // Make vector of TrajectoryAtInvalidHits to hold the trajectories
414  std::vector<TrajectoryAtInvalidHit> TMs;
415 
416  // Make AnalyticalPropagator to use in TAVH constructor
418 
419  // for double sided layers check both sensors--if no hit was found on either sensor surface,
420  // the trajectory measurements only have one invalid hit entry on the matched surface
421  // so get the TrajectoryAtInvalidHit for both surfaces and include them in the study
422  if (::isDoubleSided(iidd, tTopo) && ((iidd & 0x3) == 0)) {
423  // do hit eff check twice--once for each sensor
424  //add a TM for each surface
425  TMs.push_back(TrajectoryAtInvalidHit(*itm, tTopo, tkgeom, propagator, 1));
426  TMs.push_back(TrajectoryAtInvalidHit(*itm, tTopo, tkgeom, propagator, 2));
427  } else if (::isDoubleSided(iidd, tTopo) && (!::check2DPartner(iidd, TMeas))) {
428  // if only one hit was found the trajectory measurement is on that sensor surface, and the other surface from
429  // the matched layer should be added to the study as well
430  TMs.push_back(TrajectoryAtInvalidHit(*itm, tTopo, tkgeom, propagator, 1));
431  TMs.push_back(TrajectoryAtInvalidHit(*itm, tTopo, tkgeom, propagator, 2));
432  LogDebug("SiStripHitEfficiency:HitEff") << " found a hit with a missing partner" << endl;
433  } else {
434  //only add one TM for the single surface and the other will be added in the next iteration
435  TMs.push_back(TrajectoryAtInvalidHit(*itm, tTopo, tkgeom, propagator));
436  }
437 
439  //Now check for tracks at TOB6 and TEC9
440 
441  // to make sure we only propagate on the last TOB5 hit check the next entry isn't also in TOB5
442  // to avoid bias, make sure the TOB5 hit is valid (an invalid hit on TOB5 could only exist with a valid hit on TOB6)
443 
444  bool isValid = theInHit->isValid();
445  bool isLast = (itm == (TMeas.end() - 1));
446  bool isLastTOB5 = true;
447  if (!isLast) {
448  if (::checkLayer((++itm)->recHit()->geographicalId().rawId(), tTopo) == 9)
449  isLastTOB5 = false;
450  else
451  isLastTOB5 = true;
452  --itm;
453  }
454 
455  if (TKlayers == 9 && isValid && isLastTOB5) {
456  // if ( TKlayers==9 && itm==TMeas.rbegin()) {
457  // if ( TKlayers==9 && (itm==TMeas.back()) ) { // to check for only the last entry in the trajectory for propagation
458  std::vector<BarrelDetLayer const*> barrelTOBLayers =
459  measurementTrackerHandle->geometricSearchTracker()->tobLayers();
460  const DetLayer* tob6 = barrelTOBLayers[barrelTOBLayers.size() - 1];
461  const LayerMeasurements layerMeasurements{*measurementTrackerHandle, *measurementTrackerEvent};
462  const TrajectoryStateOnSurface tsosTOB5 = itm->updatedState();
463  auto tmp = layerMeasurements.measurements(*tob6, tsosTOB5, *thePropagator, *estimator);
464 
465  if (!tmp.empty()) {
466  LogDebug("SiStripHitEfficiency:HitEff") << "size of TM from propagation = " << tmp.size() << endl;
467 
468  // take the last of the TMs, which is always an invalid hit
469  // if no detId is available, ie detId==0, then no compatible layer was crossed
470  // otherwise, use that TM for the efficiency measurement
471  TrajectoryMeasurement tob6TM(tmp.back());
472  const auto& tob6Hit = tob6TM.recHit();
473 
474  if (tob6Hit->geographicalId().rawId() != 0) {
475  LogDebug("SiStripHitEfficiency:HitEff") << "tob6 hit actually being added to TM vector" << endl;
476  TMs.push_back(TrajectoryAtInvalidHit(tob6TM, tTopo, tkgeom, propagator));
477  }
478  }
479  }
480 
481  bool isLastTEC8 = true;
482  if (!isLast) {
483  if (::checkLayer((++itm)->recHit()->geographicalId().rawId(), tTopo) == 21)
484  isLastTEC8 = false;
485  else
486  isLastTEC8 = true;
487  --itm;
488  }
489 
490  if (TKlayers == 21 && isValid && isLastTEC8) {
491  std::vector<const ForwardDetLayer*> posTecLayers =
492  measurementTrackerHandle->geometricSearchTracker()->posTecLayers();
493  const DetLayer* tec9pos = posTecLayers[posTecLayers.size() - 1];
494  std::vector<const ForwardDetLayer*> negTecLayers =
495  measurementTrackerHandle->geometricSearchTracker()->negTecLayers();
496  const DetLayer* tec9neg = negTecLayers[negTecLayers.size() - 1];
497  const LayerMeasurements layerMeasurements{*measurementTrackerHandle, *measurementTrackerEvent};
498  const TrajectoryStateOnSurface tsosTEC9 = itm->updatedState();
499 
500  // check if track on positive or negative z
501  if (!(iidd == StripSubdetector::TEC))
502  LogDebug("SiStripHitEfficiency:HitEff") << "there is a problem with TEC 9 extrapolation" << endl;
503 
504  //LOGPRINT << " tec9 id = " << iidd << " and side = " << tTopo->tecSide(iidd) << endl;
505  vector<TrajectoryMeasurement> tmp;
506  if (tTopo->tecSide(iidd) == 1) {
507  tmp = layerMeasurements.measurements(*tec9neg, tsosTEC9, *thePropagator, *estimator);
508  //LOGPRINT << "on negative side" << endl;
509  }
510  if (tTopo->tecSide(iidd) == 2) {
511  tmp = layerMeasurements.measurements(*tec9pos, tsosTEC9, *thePropagator, *estimator);
512  //LOGPRINT << "on positive side" << endl;
513  }
514 
515  if (!tmp.empty()) {
516  // take the last of the TMs, which is always an invalid hit
517  // if no detId is available, ie detId==0, then no compatible layer was crossed
518  // otherwise, use that TM for the efficiency measurement
519  TrajectoryMeasurement tec9TM(tmp.back());
520  const auto& tec9Hit = tec9TM.recHit();
521 
522  unsigned int tec9id = tec9Hit->geographicalId().rawId();
523  LogDebug("SiStripHitEfficiency:HitEff")
524  << "tec9id = " << tec9id << " is Double sided = " << ::isDoubleSided(tec9id, tTopo)
525  << " and 0x3 = " << (tec9id & 0x3) << endl;
526 
527  if (tec9Hit->geographicalId().rawId() != 0) {
528  LogDebug("SiStripHitEfficiency:HitEff") << "tec9 hit actually being added to TM vector" << endl;
529  // in tec the hit can be single or doubled sided. whenever the invalid hit at the end of vector of TMs is
530  // double sided it is always on the matched surface, so we need to split it into the true sensor surfaces
531  if (::isDoubleSided(tec9id, tTopo)) {
532  TMs.push_back(TrajectoryAtInvalidHit(tec9TM, tTopo, tkgeom, propagator, 1));
533  TMs.push_back(TrajectoryAtInvalidHit(tec9TM, tTopo, tkgeom, propagator, 2));
534  } else
535  TMs.push_back(TrajectoryAtInvalidHit(tec9TM, tTopo, tkgeom, propagator));
536  }
537  } //else LOGPRINT << "tec9 tmp empty" << endl;
538  }
539 
541 
542  // Modules Constraints
543 
544  for (std::vector<TrajectoryAtInvalidHit>::const_iterator TM = TMs.begin(); TM != TMs.end(); ++TM) {
545  // --> Get trajectory from combinatedState
546  iidd = TM->monodet_id();
547  LogDebug("SiStripHitEfficiency:HitEff") << "setting iidd = " << iidd << " before checking efficiency and ";
548 
549  xloc = TM->localX();
550  yloc = TM->localY();
551 
552  angleX = atan(TM->localDxDz());
553  angleY = atan(TM->localDyDz());
554 
555  TrajLocErrX = 0.0;
556  TrajLocErrY = 0.0;
557 
558  xglob = TM->globalX();
559  yglob = TM->globalY();
560  zglob = TM->globalZ();
561  xErr = TM->localErrorX();
562  yErr = TM->localErrorY();
563 
564  TrajGlbX = 0.0;
565  TrajGlbY = 0.0;
566  TrajGlbZ = 0.0;
567  withinAcceptance = TM->withinAcceptance();
568 
569  trajHitValid = TM->validHit();
570  int TrajStrip = -1;
571 
572  // reget layer from iidd here, to account for TOB 6 and TEC 9 TKlayers being off
573  TKlayers = ::checkLayer(iidd, tTopo);
574 
575  if ((layers == TKlayers) || (layers == 0)) { // Look at the layer not used to reconstruct the track
576  whatlayer = TKlayers;
577  LogDebug("SiStripHitEfficiency:HitEff") << "Looking at layer under study" << endl;
578  ModIsBad = 2;
579  Id = 0;
580  SiStripQualBad = 0;
581  run = 0;
582  event = 0;
583  TrajLocX = 0.0;
584  TrajLocY = 0.0;
585  TrajLocAngleX = -999.0;
586  TrajLocAngleY = -999.0;
587  ResX = 0.0;
588  ResXSig = 0.0;
589  ClusterLocX = 0.0;
590  ClusterLocY = 0.0;
591  ClusterLocErrX = 0.0;
592  ClusterLocErrY = 0.0;
593  ClusterStoN = 0.0;
594  bunchx = 0;
595  commonMode = -100;
596 
597  // RPhi RecHit Efficiency
598 
599  if (!input.empty()) {
600  LogDebug("SiStripHitEfficiency:HitEff") << "Checking clusters with size = " << input.size() << endl;
601  int nClusters = 0;
602  std::vector<std::vector<float> >
603  VCluster_info; //fill with X residual, X residual pull, local X, sig(X), local Y, sig(Y), StoN
604  for (edmNew::DetSetVector<SiStripCluster>::const_iterator DSViter = input.begin(); DSViter != input.end();
605  DSViter++) {
606  // DSViter is a vector of SiStripClusters located on a single module
607  //if (DEBUG) LOGPRINT << "the ID from the DSViter = " << DSViter->id() << endl;
608  unsigned int ClusterId = DSViter->id();
609  if (ClusterId == iidd) {
610  LogDebug("SiStripHitEfficiency:HitEff")
611  << "found (ClusterId == iidd) with ClusterId = " << ClusterId << " and iidd = " << iidd << endl;
612  DetId ClusterDetId(ClusterId);
613  const StripGeomDetUnit* stripdet = (const StripGeomDetUnit*)tkgeom->idToDetUnit(ClusterDetId);
614  const StripTopology& Topo = stripdet->specificTopology();
615 
616  float hbedge = 0.0;
617  float htedge = 0.0;
618  float hapoth = 0.0;
619  float uylfac = 0.0;
620  float uxlden = 0.0;
621  if (TKlayers >= 11) {
622  const BoundPlane& plane = stripdet->surface();
623  const TrapezoidalPlaneBounds* trapezoidalBounds(
624  dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
625  std::array<const float, 4> const& parameterTrap =
626  (*trapezoidalBounds).parameters(); // el bueno aqui
627  hbedge = parameterTrap[0];
628  htedge = parameterTrap[1];
629  hapoth = parameterTrap[3];
630  uylfac = (htedge - hbedge) / (htedge + hbedge) / hapoth;
631  uxlden = 1 + yloc * uylfac;
632  }
633 
634  // Need to know position of trajectory in strip number for selecting the right APV later
635  if (TrajStrip == -1) {
636  int nstrips = Topo.nstrips();
637  float pitch = stripdet->surface().bounds().width() / nstrips;
638  TrajStrip = xloc / pitch + nstrips / 2.0;
639  // Need additionnal corrections for endcap
640  if (TKlayers >= 11) {
641  float TrajLocXMid = xloc / (1 + (htedge - hbedge) * yloc / (htedge + hbedge) /
642  hapoth); // radialy extrapolated x loc position at middle
643  TrajStrip = TrajLocXMid / pitch + nstrips / 2.0;
644  }
645  //LOGPRINT<<" Layer "<<TKlayers<<" TrajStrip: "<<nstrips<<" "<<pitch<<" "<<TrajStrip<<endl;
646  }
647 
648  for (edmNew::DetSet<SiStripCluster>::const_iterator iter = DSViter->begin(); iter != DSViter->end();
649  ++iter) {
650  //iter is a single SiStripCluster
652  float res = (parameters.first.x() - xloc);
653  float sigma = ::checkConsistency(parameters, xloc, xErr);
654  // The consistency is probably more accurately measured with the Chi2MeasurementEstimator. To use it
655  // you need a TransientTrackingRecHit instead of the cluster
656  //theEstimator= new Chi2MeasurementEstimator(30);
657  //const Chi2MeasurementEstimator *theEstimator(100);
658  //theEstimator->estimate(TM->tsos(), TransientTrackingRecHit);
659 
660  if (TKlayers >= 11) {
661  res = parameters.first.x() - xloc / uxlden; // radialy extrapolated x loc position at middle
662  sigma = abs(res) /
663  sqrt(parameters.second.xx() + xErr * xErr / uxlden / uxlden +
664  yErr * yErr * xloc * xloc * uylfac * uylfac / uxlden / uxlden / uxlden / uxlden);
665  }
666 
667  siStripClusterInfo_.setCluster(*iter, ClusterId);
668  // signal to noise from SiStripClusterInfo not working in 225. I'll fix this after the interface
669  // redesign in 300 -ku
670  //float cluster_info[7] = {res, sigma, parameters.first.x(), sqrt(parameters.second.xx()), parameters.first.y(), sqrt(parameters.second.yy()), signal_to_noise};
671  std::vector<float> cluster_info;
672  cluster_info.push_back(res);
673  cluster_info.push_back(sigma);
674  cluster_info.push_back(parameters.first.x());
675  cluster_info.push_back(sqrt(parameters.second.xx()));
676  cluster_info.push_back(parameters.first.y());
677  cluster_info.push_back(sqrt(parameters.second.yy()));
678  cluster_info.push_back(siStripClusterInfo_.signalOverNoise());
679  VCluster_info.push_back(cluster_info);
680  nClusters++;
681  LogDebug("SiStripHitEfficiency:HitEff") << "Have ID match. residual = " << VCluster_info.back()[0]
682  << " res sigma = " << VCluster_info.back()[1] << endl;
683  LogDebug("SiStripHitEfficiency:HitEff")
684  << "trajectory measurement compatability estimate = " << (*itm).estimate() << endl;
685  LogDebug("SiStripHitEfficiency:HitEff")
686  << "hit position = " << parameters.first.x() << " hit error = " << sqrt(parameters.second.xx())
687  << " trajectory position = " << xloc << " traj error = " << xErr << endl;
688  }
689  }
690  }
691  float FinalResSig = 1000.0;
692  float FinalCluster[7] = {1000.0, 1000.0, 0.0, 0.0, 0.0, 0.0, 0.0};
693  if (nClusters > 0) {
694  LogDebug("SiStripHitEfficiency:HitEff") << "found clusters > 0" << endl;
695  if (nClusters > 1) {
696  //get the smallest one
697  vector<vector<float> >::iterator ires;
698  for (ires = VCluster_info.begin(); ires != VCluster_info.end(); ires++) {
699  if (abs((*ires)[1]) < abs(FinalResSig)) {
700  FinalResSig = (*ires)[1];
701  for (unsigned int i = 0; i < ires->size(); i++) {
702  LogDebug("SiStripHitEfficiency:HitEff")
703  << "filling final cluster. i = " << i << " before fill FinalCluster[i]=" << FinalCluster[i]
704  << " and (*ires)[i] =" << (*ires)[i] << endl;
705  FinalCluster[i] = (*ires)[i];
706  LogDebug("SiStripHitEfficiency:HitEff")
707  << "filling final cluster. i = " << i << " after fill FinalCluster[i]=" << FinalCluster[i]
708  << " and (*ires)[i] =" << (*ires)[i] << endl;
709  }
710  }
711  LogDebug("SiStripHitEfficiency:HitEff")
712  << "iresidual = " << (*ires)[0] << " isigma = " << (*ires)[1]
713  << " and FinalRes = " << FinalCluster[0] << endl;
714  }
715  } else {
716  FinalResSig = VCluster_info.at(0)[1];
717  for (unsigned int i = 0; i < VCluster_info.at(0).size(); i++) {
718  FinalCluster[i] = VCluster_info.at(0)[i];
719  }
720  }
721  VCluster_info.clear();
722  }
723 
724  LogDebug("SiStripHitEfficiency:HitEff")
725  << "Final residual in X = " << FinalCluster[0] << "+-" << (FinalCluster[0] / FinalResSig) << endl;
726  LogDebug("SiStripHitEfficiency:HitEff") << "Checking location of trajectory: abs(yloc) = " << abs(yloc)
727  << " abs(xloc) = " << abs(xloc) << endl;
728  LogDebug("SiStripHitEfficiency:HitEff")
729  << "Checking location of cluster hit: yloc = " << FinalCluster[4] << "+-" << FinalCluster[5]
730  << " xloc = " << FinalCluster[2] << "+-" << FinalCluster[3] << endl;
731  LogDebug("SiStripHitEfficiency:HitEff") << "Final cluster signal to noise = " << FinalCluster[6] << endl;
732 
733  float exclusionWidth = 0.4;
734  float TOBexclusion = 0.0;
735  float TECexRing5 = -0.89;
736  float TECexRing6 = -0.56;
737  float TECexRing7 = 0.60;
738  //Added by Chris Edelmaier to do TEC bonding exclusion
739  int subdetector = ((iidd >> 25) & 0x7);
740  int ringnumber = ((iidd >> 5) & 0x7);
741 
742  //New TOB and TEC bonding region exclusion zone
743  if ((TKlayers >= 5 && TKlayers < 11) ||
744  ((subdetector == 6) && ((ringnumber >= 5) && (ringnumber <= 7)))) {
745  //There are only 2 cases that we need to exclude for
746  float highzone = 0.0;
747  float lowzone = 0.0;
748  float higherr = yloc + 5.0 * yErr;
749  float lowerr = yloc - 5.0 * yErr;
750  if (TKlayers >= 5 && TKlayers < 11) {
751  //TOB zone
752  highzone = TOBexclusion + exclusionWidth;
753  lowzone = TOBexclusion - exclusionWidth;
754  } else if (ringnumber == 5) {
755  //TEC ring 5
756  highzone = TECexRing5 + exclusionWidth;
757  lowzone = TECexRing5 - exclusionWidth;
758  } else if (ringnumber == 6) {
759  //TEC ring 6
760  highzone = TECexRing6 + exclusionWidth;
761  lowzone = TECexRing6 - exclusionWidth;
762  } else if (ringnumber == 7) {
763  //TEC ring 7
764  highzone = TECexRing7 + exclusionWidth;
765  lowzone = TECexRing7 - exclusionWidth;
766  }
767  //Now that we have our exclusion region, we just have to properly identify it
768  if ((highzone <= higherr) && (highzone >= lowerr))
769  withinAcceptance = false;
770  if ((lowzone >= lowerr) && (lowzone <= higherr))
771  withinAcceptance = false;
772  if ((higherr <= highzone) && (higherr >= lowzone))
773  withinAcceptance = false;
774  if ((lowerr >= lowzone) && (lowerr <= highzone))
775  withinAcceptance = false;
776  }
777 
778  // fill ntuple varibles
779  //get global position from module id number iidd
780  TrajGlbX = xglob;
781  TrajGlbY = yglob;
782  TrajGlbZ = zglob;
783 
784  TrajLocErrX = xErr;
785  TrajLocErrY = yErr;
786 
787  Id = iidd;
788  run = run_nr;
789  event = ev_nr;
790  bunchx = bunch_nr;
791  //if ( SiStripQuality_->IsModuleBad(iidd) ) {
792  if (SiStripQuality_->getBadApvs(iidd) != 0) {
793  SiStripQualBad = 1;
794  LogDebug("SiStripHitEfficiency:HitEff") << "strip is bad from SiStripQuality" << endl;
795  } else {
796  SiStripQualBad = 0;
797  LogDebug("SiStripHitEfficiency:HitEff") << "strip is good from SiStripQuality" << endl;
798  }
799 
800  //check for FED-detected errors and include those in SiStripQualBad
801  for (unsigned int ii = 0; ii < fedErrorIds->size(); ii++) {
802  if (iidd == (*fedErrorIds)[ii].rawId())
803  SiStripQualBad = 1;
804  }
805 
806  TrajLocX = xloc;
807  TrajLocY = yloc;
808  TrajLocAngleX = angleX;
809  TrajLocAngleY = angleY;
810  ResX = FinalCluster[0];
811  ResXSig = FinalResSig;
812  if (FinalResSig != FinalCluster[1])
813  LogDebug("SiStripHitEfficiency:HitEff")
814  << "Problem with best cluster selection because FinalResSig = " << FinalResSig
815  << " and FinalCluster[1] = " << FinalCluster[1] << endl;
816  ClusterLocX = FinalCluster[2];
817  ClusterLocY = FinalCluster[4];
818  ClusterLocErrX = FinalCluster[3];
819  ClusterLocErrY = FinalCluster[5];
820  ClusterStoN = FinalCluster[6];
821 
822  // CM of APV crossed by traj
823  if (addCommonMode_)
824  if (commonModeDigis.isValid() && TrajStrip >= 0 && TrajStrip <= 768) {
825  edm::DetSetVector<SiStripRawDigi>::const_iterator digiframe = commonModeDigis->find(iidd);
826  if (digiframe != commonModeDigis->end())
827  if ((unsigned)TrajStrip / 128 < digiframe->data.size())
828  commonMode = digiframe->data.at(TrajStrip / 128).adc();
829  }
830 
831  LogDebug("SiStripHitEfficiency:HitEff") << "before check good" << endl;
832 
833  if (FinalResSig < 999.0) { //could make requirement on track/hit consistency, but for
834  //now take anything with a hit on the module
835  LogDebug("SiStripHitEfficiency:HitEff")
836  << "hit being counted as good " << FinalCluster[0] << " FinalRecHit " << iidd << " TKlayers "
837  << TKlayers << " xloc " << xloc << " yloc " << yloc << " module " << iidd
838  << " matched/stereo/rphi = " << ((iidd & 0x3) == 0) << "/" << ((iidd & 0x3) == 1) << "/"
839  << ((iidd & 0x3) == 2) << endl;
840  ModIsBad = 0;
841  traj->Fill();
842  } else {
843  LogDebug("SiStripHitEfficiency:HitEff")
844  << "hit being counted as bad ######### Invalid RPhi FinalResX " << FinalCluster[0]
845  << " FinalRecHit " << iidd << " TKlayers " << TKlayers << " xloc " << xloc << " yloc " << yloc
846  << " module " << iidd << " matched/stereo/rphi = " << ((iidd & 0x3) == 0) << "/"
847  << ((iidd & 0x3) == 1) << "/" << ((iidd & 0x3) == 2) << endl;
848  ModIsBad = 1;
849  traj->Fill();
850 
851  LogDebug("SiStripHitEfficiency:HitEff") << " RPhi Error " << sqrt(xErr * xErr + yErr * yErr)
852  << " ErrorX " << xErr << " yErr " << yErr << endl;
853  }
854  LogDebug("SiStripHitEfficiency:HitEff") << "after good location check" << endl;
855  }
856  LogDebug("SiStripHitEfficiency:HitEff") << "after list of clusters" << endl;
857  }
858  LogDebug("SiStripHitEfficiency:HitEff") << "After layers=TKLayers if" << endl;
859  }
860  LogDebug("SiStripHitEfficiency:HitEff") << "After looping over TrajAtValidHit list" << endl;
861  }
862  LogDebug("SiStripHitEfficiency:HitEff") << "end TMeasurement loop" << endl;
863  }
864  LogDebug("SiStripHitEfficiency:HitEff") << "end of trajectories loop" << endl;
865  }
866 }
867 
869  traj->GetDirectory()->cd();
870  traj->Write();
871 
872  LogDebug("SiStripHitEfficiency:HitEff") << " Events Analysed " << events << endl;
873  LogDebug("SiStripHitEfficiency:HitEff") << " Number Of Tracked events " << EventTrackCKF << endl;
874 }
875 
876 //define this as a plug-in
std::pair< LocalPoint, LocalError > LocalValues
static constexpr auto TEC
virtual int nstrips() const =0
float TrajGlbZ
Definition: HitEff.h:116
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: HitEff.h:91
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
float ClusterLocErrX
Definition: HitEff.h:119
float ClusterLocErrY
Definition: HitEff.h:119
const edm::EDGetTokenT< OnlineLuminosityRecord > metaDataToken_
Definition: HitEff.h:65
void endJob() override
Definition: HitEff.cc:868
void setCluster(const SiStripCluster &cluster, int detId)
float TrajGlbY
Definition: HitEff.h:116
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: HitEff.h:87
float TrajLocX
Definition: HitEff.h:117
float ResXSig
Definition: HitEff.h:120
virtual void localParameters(AClusters const &clusters, ALocalValues &retValues, const GeomDetUnit &gd, const LocalTrajectoryParameters &ltp) const
bool useAllHitsFromTracksWithMissingHits_
Definition: HitEff.h:76
Definition: HitEff.h:52
TString subdetector
int compSettings
Definition: HitEff.h:101
float instLumi
Definition: HitEff.h:130
const edm::EDGetTokenT< std::vector< Trajectory > > trajectories_token_
Definition: HitEff.h:79
T const * product() const
Definition: Handle.h:70
Class to contain the online luminosity from soft FED 1022.
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
HitEff(const edm::ParameterSet &conf)
Definition: HitEff.cc:73
SiStripClusterInfo siStripClusterInfo_
Definition: HitEff.h:68
float ClusterStoN
Definition: HitEff.h:119
data_type const * const_iterator
Definition: DetSetNew.h:31
float TrajLocErrX
Definition: HitEff.h:118
float instLumi() const
Return the luminosity for the current nibble.
float commonMode
Definition: HitEff.h:131
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > siStripQualityToken_
Definition: HitEff.h:90
key_type key() const
Accessor for product key.
Definition: Ref.h:250
Definition: Electron.h:6
missing
Definition: combine.py:5
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
bool DEBUG
Definition: HitEff.h:103
const edm::EDGetTokenT< MeasurementTrackerEvent > trackerEvent_token_
Definition: HitEff.h:83
unsigned int bunchx
Definition: HitEff.h:128
static std::string const input
Definition: EdmProvDump.cc:50
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: HitEff.h:88
const_iterator end() const
last iterator over the map (read only)
float signalOverNoise() const
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: HitEff.cc:167
bool highPurity
Definition: HitEff.h:125
size_type size() const
Return the number of contained DetSets.
Definition: DetSetVector.h:259
const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusters_token_
Definition: HitEff.h:81
unsigned int tecSide(const DetId &id) const
float PU
Definition: HitEff.h:130
int nHits
Definition: HitEff.h:126
unsigned int Id
Definition: HitEff.h:122
const edm::EDGetTokenT< reco::TrackCollection > combinatorialTracks_token_
Definition: HitEff.h:78
T sqrt(T t)
Definition: SSEVec.h:19
float timeAtIpInOutErr
Definition: MuonTime.h:14
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
Definition: HitEff.h:94
const edm::EDGetTokenT< DetIdCollection > digis_token_
Definition: HitEff.h:82
int nDof
number of muon stations used
Definition: MuonTime.h:9
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned int trajHitValid
Definition: HitEff.h:128
unsigned int ModIsBad
Definition: HitEff.h:121
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
float TrajGlbX
Definition: HitEff.h:116
bool getData(T &iHolder) const
Definition: EventSetup.h:122
const edm::ESGetToken< MeasurementTracker, CkfComponentsRecord > measurementTkToken_
Definition: HitEff.h:92
bool withinAcceptance
Definition: HitEff.h:124
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
unsigned int run
Definition: HitEff.h:128
float ClusterLocX
Definition: HitEff.h:119
ii
Definition: cuy.py:589
int events
Definition: HitEff.h:99
float TrajLocAngleX
Definition: HitEff.h:117
const edm::ESGetToken< Chi2MeasurementEstimatorBase, TrackingComponentsRecord > chi2MeasurementEstimatorToken_
Definition: HitEff.h:93
Log< level::Info, false > LogInfo
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetId.h:17
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
bool useLastMeas_
Definition: HitEff.h:75
unsigned int whatlayer
Definition: HitEff.h:104
const edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > cpeToken_
Definition: HitEff.h:89
virtual const std::array< const float, 4 > parameters() const
unsigned int trackMultiplicityCut_
Definition: HitEff.h:73
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
unsigned int layers
Definition: HitEff.h:102
float pT
Definition: HitEff.h:127
float ResX
Definition: HitEff.h:120
void beginJob() override
Definition: HitEff.cc:108
bool addLumi_
Definition: HitEff.h:70
bool isValid() const
Definition: HandleBase.h:70
unsigned int SiStripQualBad
Definition: HitEff.h:123
bool addCommonMode_
Definition: HitEff.h:71
const_iterator begin() const
first iterator over the map (read only)
const edm::EDGetTokenT< TrajTrackAssociationCollection > trajTrackAsso_token_
Definition: HitEff.h:80
fixed size matrix
HLT enums.
float TrajLocErrY
Definition: HitEff.h:118
float TrajLocAngleY
Definition: HitEff.h:117
size_type size() const
Definition: EDCollection.h:82
std::vector< LumiScalers > LumiScalersCollection
Definition: LumiScalers.h:144
bool cutOnTracks_
Definition: HitEff.h:72
bool useFirstMeas_
Definition: HitEff.h:74
Log< level::Warning, false > LogWarning
float ClusterLocY
Definition: HitEff.h:119
void initEvent(const edm::EventSetup &iSetup)
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
tmp
align.sh
Definition: createJobs.py:716
const edm::EDGetTokenT< LumiScalersCollection > scalerToken_
Definition: HitEff.h:64
TTree * traj
Definition: HitEff.h:98
virtual float width() const =0
const edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > commonModeToken_
Definition: HitEff.h:66
edm::ParameterSet conf_
Definition: HitEff.h:96
float timeAtIpInOut
Definition: MuonTime.h:13
int EventTrackCKF
Definition: HitEff.h:99
float avgPileUp() const
Return the average pileup for th current nibble.
float TrajLocY
Definition: HitEff.h:117
int tquality
Definition: HitEff.h:129
Definition: event.py:1
ConstRecHitPointer const & recHit() const
#define LogDebug(id)
short getBadApvs(uint32_t detid) const
const Bounds & bounds() const
Definition: Surface.h:87