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