CMS 3D CMS Logo

TkGluedMeasurementDet.cc
Go to the documentation of this file.
10 #include "RecHitPropagator.h"
13 
15 #include <iostream>
16 #include <memory>
17 
18 #include <typeinfo>
19 
20 namespace {
21  inline std::pair<LocalPoint, LocalError> projectedPos(const TrackingRecHit& hit,
22  const GeomDet& det,
23  const GlobalVector& gdir,
24  const StripClusterParameterEstimator* cpe) {
25  const BoundPlane& gluedPlane = det.surface();
26  const BoundPlane& hitPlane = hit.det()->surface();
27 
28  // check if the planes are parallel
29  //const float epsilon = 1.e-7; // corresponds to about 0.3 miliradian but cannot be reduced
30  // because of float precision
31 
32  //if (fabs(gluedPlane.normalVector().dot( hitPlane.normalVector())) < 1-epsilon) {
33  // std::cout << "TkGluedMeasurementDet plane not parallel to DetUnit plane: dot product is "
34  // << gluedPlane.normalVector().dot( hitPlane.normalVector()) << endl;
35  // FIXME: throw the appropriate exception here...
36  //throw MeasurementDetException("TkGluedMeasurementDet plane not parallel to DetUnit plane");
37  //}
38 
39  double delta = gluedPlane.localZ(hitPlane.position());
40  LocalVector ldir = gluedPlane.toLocal(gdir);
41  LocalPoint lhitPos = gluedPlane.toLocal(hit.globalPosition());
42  LocalPoint projectedHitPos = lhitPos - ldir * delta / ldir.z();
43 
44  LocalVector hitXAxis = gluedPlane.toLocal(hitPlane.toGlobal(LocalVector(1, 0, 0)));
45  LocalError hitErr = hit.localPositionError();
46  if (gluedPlane.normalVector().dot(hitPlane.normalVector()) < 0) {
47  // the two planes are inverted, and the correlation element must change sign
48  hitErr = LocalError(hitErr.xx(), -hitErr.xy(), hitErr.yy());
49  }
50  LocalError rotatedError = hitErr.rotate(hitXAxis.x(), hitXAxis.y());
51 
52  return std::make_pair(projectedHitPos, rotatedError);
53  }
54 } // namespace
55 
56 // #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h"
58 
59 using namespace std;
60 
62  const SiStripRecHitMatcher* matcher,
64  : MeasurementDet(gdet),
65  theMatcher(matcher),
66  theCPE(cpe),
67  theMonoDet(nullptr),
68  theStereoDet(nullptr),
69  theTopology(nullptr) {}
70 
72  const MeasurementDet* stereoDet,
73  const TrackerTopology* tTopo) {
74  theMonoDet = dynamic_cast<const TkStripMeasurementDet*>(monoDet);
75  theStereoDet = dynamic_cast<const TkStripMeasurementDet*>(stereoDet);
76  theTopology = tTopo;
77 
78  if ((theMonoDet == nullptr) || (theStereoDet == nullptr)) {
80  "TkGluedMeasurementDet ERROR: Trying to glue a det which is not a TkStripMeasurementDet");
81  }
82 }
83 
85  const MeasurementTrackerEvent& data) const {
88  collectRecHits(ts, data, collector);
89  return result;
90 }
91 
92 // simple hits
94  const TrajectoryStateOnSurface& stateOnThisDet,
95  const MeasurementEstimator& est,
96  const MeasurementTrackerEvent& data) const {
97  if
98  UNLIKELY((!theMonoDet->isActive(data)) && (!theStereoDet->isActive(data))) return false;
99  auto oldSize = result.size();
100  HitCollectorForSimpleHits collector(&fastGeomDet(), theMatcher, theCPE, stateOnThisDet, est, result);
101  collectRecHits(stateOnThisDet, data, collector);
102 
103  return result.size() > oldSize;
104 }
105 
107  const MeasurementEstimator& est,
109  TempMeasurements& result) const {
110  if
112  // LogDebug("TkStripMeasurementDet") << " DetID " << geomDet().geographicalId().rawId() << " (glued) fully inactive";
113  result.add(theInactiveHit, 0.F);
114  return true;
115  }
116 
117  auto oldSize = result.size();
118 
119  HitCollectorForFastMeasurements collector(&fastGeomDet(), theMatcher, theCPE, stateOnThisDet, est, result);
120  collectRecHits(stateOnThisDet, data, collector);
121 
122  if (result.size() > oldSize)
123  return true;
124 
125  auto id = geomDet().geographicalId().subdetId() - 3;
126  auto l = theTopology->tobLayer(geomDet().geographicalId());
127  bool killHIP = (1 == l) && (2 == id); //TOB1
128  killHIP &= stateOnThisDet.globalMomentum().perp2() > est.minPt2ForHitRecoveryInGluedDet();
129  if (killHIP) {
130  result.add(theInactiveHit, 0.F);
131  return true;
132  }
133 
134  //LogDebug("TkStripMeasurementDet") << "No hit found on TkGlued. Testing strips... ";
135  const BoundPlane& gluedPlane = geomDet().surface();
136  if ( // sorry for the big IF, but I want to exploit short-circuiting of logic
137  stateOnThisDet.hasError() &&
138  (/* do this only if the state has uncertainties, otherwise it will throw
139  (states without uncertainties are passed to this code from seeding */
140  (theMonoDet->isActive(data) &&
141  (theMonoDet->hasAllGoodChannels() || testStrips(stateOnThisDet, gluedPlane, *theMonoDet))) /*Mono OK*/
142  && // was ||
144  (theStereoDet->hasAllGoodChannels() || testStrips(stateOnThisDet, gluedPlane, *theStereoDet))) /*Stereo OK*/
145  ) /* State has errors */
146  ) {
147  result.add(theMissingHit, 0.F);
148  return false;
149  }
150  result.add(theInactiveHit, 0.F);
151  return true;
152 }
153 
154 struct take_address {
155  template <typename T>
156  const T* operator()(const T& val) const {
157  return &val;
158  }
159 };
160 
161 #ifdef DOUBLE_MATCH
162 template <typename Collector>
165  Collector& collector) const {
166  doubleMatch(ts, data, collector);
167 }
168 #else
169 template <typename Collector>
172  Collector& collector) const {
173  //------ WARNING: here ts is used as it is on the mono/stereo surface.
174  //----- A further propagation is necessary.
175  //----- To limit the problem, the SimpleCPE should be used
176  RecHitContainer monoHits = theMonoDet->recHits(ts, data);
177  GlobalVector glbDir = (ts.isValid() ? ts.globalParameters().momentum() : position() - GlobalPoint(0, 0, 0));
178 
179  //edm::LogWarning("TkGluedMeasurementDet::recHits") << "Query-for-detid-" << theGeomDet->geographicalId().rawId();
180 
181  //checkProjection(ts, monoHits, stereoHits);
182 
183  if (monoHits.empty()) {
184  // make stereo TTRHs and project them
185  projectOnGluedDet(collector, theStereoDet->recHits(ts, data), glbDir);
186  } else {
187  // collect simple stereo hits
188  std::vector<SiStripRecHit2D> simpleSteroHitsByValue;
189  theStereoDet->simpleRecHits(ts, data, simpleSteroHitsByValue);
190 
191  if (simpleSteroHitsByValue.empty()) {
192  projectOnGluedDet(collector, monoHits, glbDir);
193  } else {
194  LocalVector tkDir = (ts.isValid() ? ts.localDirection() : surface().toLocal(position() - GlobalPoint(0, 0, 0)));
196  vsStereoHits.resize(simpleSteroHitsByValue.size());
198  simpleSteroHitsByValue.begin(), simpleSteroHitsByValue.end(), vsStereoHits.begin(), take_address());
199 
200  // convert mono hits to type expected by matcher
201  for (RecHitContainer::const_iterator monoHit = monoHits.begin(); monoHit != monoHits.end(); ++monoHit) {
202  const TrackingRecHit* tkhit = (**monoHit).hit();
203  const SiStripRecHit2D* verySpecificMonoHit = reinterpret_cast<const SiStripRecHit2D*>(tkhit);
204  theMatcher->match(verySpecificMonoHit,
205  vsStereoHits.begin(),
206  vsStereoHits.end(),
207  collector.collector(),
208  &specificGeomDet(),
209  tkDir);
210 
211  if (collector.hasNewMatchedHits()) {
212  collector.clearNewMatchedHitsFlag();
213  } else {
214  collector.addProjected(**monoHit, glbDir);
215  }
216  } // loop on mono hit
217  }
218  //GIO// std::cerr << "TkGluedMeasurementDet hits " << monoHits.size() << "/" << stereoHits.size() << " => " << result.size() << std::endl;
219  }
220 }
221 #endif
222 
223 #include <cstdint>
224 #ifdef VI_STAT
225 #include <cstdio>
226 #endif
227 namespace {
228  struct Stat {
229 #ifdef VI_STAT
230  double totCall = 0;
231  double totMono = 0;
232  double totStereo = 0;
233  double totComb = 0;
234  double totMatched = 0;
235  double filtMono = 0;
236  double filtStereo = 0;
237  double filtComb = 0;
238  double matchT = 0;
239  double matchF = 0;
240  double singleF = 0;
241  double zeroM = 0;
242  double zeroS = 0;
243 
244  void match(uint64_t t) {
245  if (t != 0)
246  ++matchT;
247  totMatched += t;
248  }
249  void operator()(uint64_t m, uint64_t s, uint64_t fm, uint64_t fs) {
250  ++totCall;
251  totMono += m;
252  totStereo += s;
253  totComb += m * s;
254  filtMono += fm;
255  filtStereo += fs;
256  filtComb += fm * fs;
257  if (fm == 0)
258  ++zeroM;
259  if (fs == 0)
260  ++zeroS;
261  if (fm != 0 && fs != 0)
262  ++matchF;
263  if (fm != 0 || fs != 0)
264  ++singleF;
265  }
266  ~Stat() {
267  if (totCall > 0)
268  printf("Matches:%d/%d/%d/%d/%d/%d : %f/%f/%f/%f/%f/%f/%f\n",
269  int(totCall),
270  int(matchF),
271  int(singleF - matchF),
272  int(matchT),
273  int(zeroM),
274  int(zeroS),
275  totMono / totCall,
276  totStereo / totCall,
277  totComb / totCall,
278  totMatched / matchT,
279  filtMono / totCall,
280  filtStereo / totCall,
281  filtComb / matchF);
282  }
283 #else
284  Stat() {}
285  void match(uint64_t) const {}
286  void operator()(uint64_t, uint64_t, uint64_t, uint64_t) const {}
287 #endif
288  };
289 #ifndef VI_STAT
290  const
291 #endif
292  Stat stat;
293 } // namespace
294 
296  const RecHitContainer& hits, const TrajectoryStateOnSurface& ts) const {
298  for (auto const& hit : hits) {
299  auto&& vl = projectedPos(*hit, fastGeomDet(), ts.globalParameters().momentum(), theCPE);
300  auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
301  vl.first, vl.second, fastGeomDet(), static_cast<SiStripRecHit2D const&>(*hit));
302  result.push_back(std::move(phit));
303  }
304  return result;
305 }
306 
307 template <typename Collector>
309  const RecHitContainer& hits,
310  const GlobalVector& gdir) const {
311  for (RecHitContainer::const_iterator ihit = hits.begin(); ihit != hits.end(); ihit++) {
312  collector.addProjected(**ihit, gdir);
313  }
314 }
315 
317  std::vector<SiStripRecHit2D> const& hits, const TrajectoryStateOnSurface& ts) const {
319  for (auto const& hit : hits) {
320  auto&& vl = projectedPos(hit, fastGeomDet(), ts.globalParameters().momentum(), theCPE);
321  auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
322  vl.first, vl.second, fastGeomDet(), static_cast<SiStripRecHit2D const&>(hit));
323  result.push_back(std::move(phit));
324  }
325  return result;
326 }
327 
328 template <typename Collector>
330  std::vector<SiStripRecHit2D> const& hits,
331  const GlobalVector& gdir) const {
332  for (auto const& hit : hits)
333  collector.addProjected(hit, gdir);
334 }
335 
337  const RecHitContainer& monoHits,
338  const RecHitContainer& stereoHits) const {
339  for (RecHitContainer::const_iterator i = monoHits.begin(); i != monoHits.end(); ++i) {
340  checkHitProjection(**i, ts, fastGeomDet());
341  }
342  for (RecHitContainer::const_iterator i = stereoHits.begin(); i != stereoHits.end(); ++i) {
343  checkHitProjection(**i, ts, fastGeomDet());
344  }
345 }
346 
348  const TrajectoryStateOnSurface& ts,
349  const GeomDet& det) const {
350  auto&& vl = projectedPos(hit, det, ts.globalParameters().momentum(), theCPE);
351  ProjectedSiStripRecHit2D projectedHit(vl.first, vl.second, det, static_cast<SiStripRecHit2D const&>(hit));
352 
353  RecHitPropagator prop;
354  TrajectoryStateOnSurface propState = prop.propagate(hit, det.surface(), ts);
355 
356  if ((projectedHit.localPosition() - propState.localPosition()).mag() > 0.0001f) {
357  std::cout << "PROBLEM: projected and propagated hit positions differ by "
358  << (projectedHit.localPosition() - propState.localPosition()).mag() << std::endl;
359  }
360 
361  LocalError le1 = projectedHit.localPositionError();
362  LocalError le2 = propState.localError().positionError();
363  double eps = 1.e-5;
364  double cutoff = 1.e-4; // if element below cutoff, use absolute instead of relative accuracy
365  double maxdiff = std::max(
366  std::max(fabs(le1.xx() - le2.xx()) / (cutoff + le1.xx()), fabs(le1.xy() - le2.xy()) / (cutoff + fabs(le1.xy()))),
367  fabs(le1.yy() - le2.yy()) / (cutoff + le1.xx()));
368  if (maxdiff > eps) {
369  std::cout << "PROBLEM: projected and propagated hit errors differ by " << maxdiff << std::endl;
370  }
371 }
372 
374  const BoundPlane& gluedPlane,
375  const TkStripMeasurementDet& mdet) const {
376  // from TrackingRecHitProjector
377  const GeomDet& det = mdet.fastGeomDet();
378  const BoundPlane& stripPlane = det.surface();
379 
380  //LocalPoint glp = tsos.localPosition();
382  /*LogDebug("TkStripMeasurementDet") <<
383  "Testing local pos glued: " << glp <<
384  " local err glued: " << tsos.localError().positionError() <<
385  " in? " << gluedPlane.bounds().inside(glp) <<
386  " in(3s)? " << gluedPlane.bounds().inside(glp, err, 3.0f);*/
387 
388  GlobalVector gdir = tsos.globalParameters().momentum();
389 
390  LocalPoint slp = stripPlane.toLocal(tsos.globalPosition());
391  LocalVector sld = stripPlane.toLocal(gdir);
392 
393  double delta = stripPlane.localZ(tsos.globalPosition());
394  LocalPoint pos = slp - sld * delta / sld.z();
395 
396  // now the error
397  LocalVector hitXAxis = stripPlane.toLocal(gluedPlane.toGlobal(LocalVector(1, 0, 0)));
398  if (stripPlane.normalVector().dot(gluedPlane.normalVector()) < 0) {
399  // the two planes are inverted, and the correlation element must change sign
400  err = LocalError(err.xx(), -err.xy(), err.yy());
401  }
402  LocalError rotatedError = err.rotate(hitXAxis.x(), hitXAxis.y());
403 
404  /* // This is probably meaningless
405  LogDebug("TkStripMeasurementDet") <<
406  "Testing local pos on strip (SLP): " << slp <<
407  " in? :" << stripPlane.bounds().inside(slp) <<
408  " in(3s)? :" << stripPlane.bounds().inside(slp, rotatedError, 3.0f);
409  // but it helps to test bugs in the formula for POS */
410  /*LogDebug("TkStripMeasurementDet") <<
411  "Testing local pos strip: " << pos <<
412  " in? " << stripPlane.bounds().inside(pos) <<
413  " in(3s)? " << stripPlane.bounds().inside(pos, rotatedError, 3.0f);*/
414 
415  // now we need to convert to MeasurementFrame
416  const StripTopology& topo = mdet.specificGeomDet().specificTopology();
417  float utraj = topo.measurementPosition(pos).x();
418  float uerr = std::sqrt(topo.measurementError(pos, rotatedError).uu());
419  return mdet.testStrips(utraj, uerr);
420 }
421 
422 #include <boost/bind.hpp>
424  const SiStripRecHitMatcher* matcher,
427  : geomDet_(geomDet),
428  matcher_(matcher),
429  cpe_(cpe),
430  target_(target),
431  collector_(boost::bind(&HitCollectorForRecHits::add, boost::ref(*this), _1)),
432  hasNewHits_(false) {}
433 
435  const GeomDet* geomDet,
436  const SiStripRecHitMatcher* matcher,
438  const TrajectoryStateOnSurface& stateOnThisDet,
439  const MeasurementEstimator& est,
441  : geomDet_(geomDet),
442  matcher_(matcher),
443  cpe_(cpe),
444  stateOnThisDet_(stateOnThisDet),
445  est_(est),
446  target_(target),
447  collector_(boost::bind(&HitCollectorForSimpleHits::add, boost::ref(*this), _1)),
448  hasNewHits_(false) {}
449 
451  auto&& vl = projectedPos(hit, *geomDet_, gdir, cpe_);
452  auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
453  vl.first, vl.second, *geomDet_, static_cast<SiStripRecHit2D const&>(hit));
454  target_.push_back(std::move(phit));
455 }
456 
458  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush // consistent with previous code
459  if (!est_.preFilter(stateOnThisDet_,
460  ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster())))
461  return;
462  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
463 
464  std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, hit2d);
465  if (diffEst.first)
466  target_.emplace_back(new SiStripMatchedRecHit2D(hit2d)); // fix to use move (really needed???)
467 }
468 
470  const GlobalVector& gdir) {
471  auto const& thit = reinterpret_cast<TrackerSingleRecHit const&>(hit);
472  if (!est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit.geographicalId(), &thit.stripCluster())))
473  return;
474 
475  // here we're ok with some extra casual new's and delete's
476  auto&& vl = projectedPos(hit, *geomDet_, gdir, cpe_);
477  std::unique_ptr<ProjectedSiStripRecHit2D> phit(
478  new ProjectedSiStripRecHit2D(vl.first, vl.second, *geomDet_, static_cast<SiStripRecHit2D const&>(hit)));
479  std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, *phit);
480  if (diffEst.first) {
481  target_.emplace_back(phit.release());
482  }
483 }
484 
486  const GeomDet* geomDet,
487  const SiStripRecHitMatcher* matcher,
489  const TrajectoryStateOnSurface& stateOnThisDet,
490  const MeasurementEstimator& est,
492  : geomDet_(geomDet),
493  matcher_(matcher),
494  cpe_(cpe),
495  stateOnThisDet_(stateOnThisDet),
496  est_(est),
497  target_(target),
498  collector_(boost::bind(&HitCollectorForFastMeasurements::add, boost::ref(*this), _1)),
499  hasNewHits_(false) {}
500 
502  //FIXME: see also what happens moving this within testAndPush // consistent with previous code...
503  hasNewHits_ = true;
504  if (!est_.preFilter(stateOnThisDet_,
505  ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster())))
506  return;
507  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
508 
509  std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, hit2d);
510  if (diffEst.first)
511  target_.add(hit2d.cloneSH(), diffEst.second);
512 }
513 
515  const GlobalVector& gdir) {
516  auto const& thit = reinterpret_cast<TrackerSingleRecHit const&>(hit);
517  if (!est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit.geographicalId(), &thit.stripCluster())))
518  return;
519 
520  // here we're ok with some extra casual new's and delete's
521  auto&& vl = projectedPos(hit, *geomDet_, gdir, cpe_);
522  auto&& phit = std::make_shared<ProjectedSiStripRecHit2D>(
523  vl.first, vl.second, *geomDet_, static_cast<SiStripRecHit2D const&>(hit));
524 
525  std::pair<bool, double> diffEst = est_.estimate(stateOnThisDet_, *phit);
526  if (diffEst.first) {
527  target_.add(phit, diffEst.second);
528  }
529 }
530 
531 #ifdef DOUBLE_MATCH
532 #include "doubleMatch.icc"
533 #endif
Vector3DBase
Definition: Vector3DBase.h:8
TkGluedMeasurementDet::HitCollectorForRecHits::HitCollectorForRecHits
HitCollectorForRecHits(const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, RecHitContainer &target)
Definition: TkGluedMeasurementDet.cc:423
TrajMeasLessEstim.h
MeasurementEstimator
Definition: MeasurementEstimator.h:19
mps_fire.i
i
Definition: mps_fire.py:355
TkStripMeasurementDet::simpleRecHits
void simpleRecHits(const TrajectoryStateOnSurface &ts, const MeasurementTrackerEvent &data, std::vector< SiStripRecHit2D > &result) const
Definition: TkStripMeasurementDet.cc:219
MessageLogger.h
TkGluedMeasurementDet.h
funct::false
false
Definition: Factorize.h:34
GeomDet
Definition: GeomDet.h:27
TkStripMeasurementDet::specificGeomDet
const StripGeomDetUnit & specificGeomDet() const
Definition: TkStripMeasurementDet.h:147
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
MeasurementDet::RecHitContainer
TrackingRecHit::ConstRecHitContainer RecHitContainer
Definition: MeasurementDet.h:19
TkGluedMeasurementDet::monoDet
const TkStripMeasurementDet * monoDet() const
Definition: TkGluedMeasurementDet.h:39
TkGluedMeasurementDet::doubleMatch
void doubleMatch(const TrajectoryStateOnSurface &ts, const MeasurementTrackerEvent &data, Collector &collector) const
SiStripMatchedRecHit2D::stereoCluster
SiStripCluster const & stereoCluster() const
Definition: SiStripMatchedRecHit2D.h:40
LocalTrajectoryError::positionError
LocalError positionError() const
Definition: LocalTrajectoryError.h:81
LocalError::xy
float xy() const
Definition: LocalError.h:23
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
qjetsadder_cfi.cutoff
cutoff
Definition: qjetsadder_cfi.py:11
RecHitPropagator.h
TrackerTopology
Definition: TrackerTopology.h:16
TrackingRecHit::hit
virtual TrackingRecHit const * hit() const
Definition: TrackingRecHit.h:75
TkGluedMeasurementDet::HitCollectorForRecHits
Definition: TkGluedMeasurementDet.h:72
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
take_address
Definition: TkGluedMeasurementDet.cc:154
TkGluedMeasurementDet::HitCollectorForSimpleHits::add
void add(SiStripMatchedRecHit2D const &hit)
Definition: TkGluedMeasurementDet.cc:457
TkGluedMeasurementDet::theStereoDet
const TkStripMeasurementDet * theStereoDet
Definition: TkGluedMeasurementDet.h:58
MeasurementDetException.h
GluedGeomDet.h
SiStripRecHit2D
Definition: SiStripRecHit2D.h:7
TrajectoryMeasurement.h
TkGluedMeasurementDet::HitCollectorForRecHits::addProjected
void addProjected(const TrackingRecHit &hit, const GlobalVector &gdir)
Definition: TkGluedMeasurementDet.cc:450
MeasurementDet
Definition: MeasurementDet.h:16
TkStripMeasurementDet::isActive
bool isActive(const MeasurementTrackerEvent &data) const override
Is this module active in reconstruction? It must be both 'setActiveThisEvent' and 'setActive'.
Definition: TkStripMeasurementDet.h:105
boost
Definition: CLHEP.h:16
TkGluedMeasurementDet::collectRecHits
void collectRecHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data, Collector &coll) const
Definition: TkGluedMeasurementDet.cc:170
tracking::TempMeasurements
Definition: TempMeasurements.h:10
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
ProjectedSiStripRecHit2D
Definition: ProjectedSiStripRecHit2D.h:8
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TkGluedMeasurementDet::theTopology
const TrackerTopology * theTopology
Definition: TkGluedMeasurementDet.h:59
MeasurementDet::position
const Surface::PositionType & position() const
Definition: MeasurementDet.h:85
StripClusterParameterEstimator
Definition: StripClusterParameterEstimator.h:25
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TrackerTopology.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
MeasurementDetException
Common base class.
Definition: MeasurementDetException.h:12
MeasurementEstimator::minPt2ForHitRecoveryInGluedDet
float minPt2ForHitRecoveryInGluedDet() const
Definition: MeasurementEstimator.h:72
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1111
ClusterFilterPayload
Definition: ClusterFilterPayload.h:7
LocalError::xx
float xx() const
Definition: LocalError.h:22
TrajectoryStateOnSurface::localDirection
LocalVector localDirection() const
Definition: TrajectoryStateOnSurface.h:76
TrajectoryStateOnSurface::hasError
bool hasError() const
Definition: TrajectoryStateOnSurface.h:56
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Topology::measurementError
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
ProjectedRecHit2D.h
Point3DBase< float, LocalTag >
take_address::operator()
const T * operator()(const T &val) const
Definition: TkGluedMeasurementDet.cc:156
OrderedSet.t
t
Definition: OrderedSet.py:90
GluedGeomDet
Definition: GluedGeomDet.h:7
GlobalTrajectoryParameters::momentum
GlobalVector momentum() const
Definition: GlobalTrajectoryParameters.h:65
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
RecHitPropagator::propagate
TrajectoryStateOnSurface propagate(const TrackingRecHit &hit, const Plane &plane, const TrajectoryStateOnSurface &ts) const
Definition: RecHitPropagator.cc:5
MeasurementDet::surface
const Surface & surface() const
Definition: MeasurementDet.h:83
TkStripMeasurementDet::hasAllGoodChannels
bool hasAllGoodChannels() const
does this module have at least one bad strip, APV or channel?
Definition: TkStripMeasurementDet.h:227
TkGluedMeasurementDet::recHits
RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const override
Definition: TkGluedMeasurementDet.cc:84
TkGluedMeasurementDet::HitCollectorForSimpleHits::HitCollectorForSimpleHits
HitCollectorForSimpleHits(const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, SimpleHitContainer &target)
Definition: TkGluedMeasurementDet.cc:434
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
TkStripMeasurementDet
Definition: TkStripMeasurementDet.h:74
TrajectoryStateOnSurface::localPosition
LocalPoint localPosition() const
Definition: TrajectoryStateOnSurface.h:74
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
runTheMatrix.err
err
Definition: runTheMatrix.py:288
MeasurementDet::SimpleHitContainer
std::vector< BaseTrackerRecHit * > SimpleHitContainer
Definition: MeasurementDet.h:21
LocalError
Definition: LocalError.h:12
PVValHelper::add
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
Definition: PVValidationHelpers.cc:12
TkGluedMeasurementDet::TkGluedMeasurementDet
TkGluedMeasurementDet(const GluedGeomDet *gdet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe)
Definition: TkGluedMeasurementDet.cc:61
PV2DBase::x
T x() const
Definition: PV2DBase.h:43
LocalError::rotate
LocalError rotate(float x, float y) const
Return a new LocalError, rotated by an angle defined by the direction (x,y)
Definition: LocalError.h:37
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TkGluedMeasurementDet::theCPE
const StripClusterParameterEstimator * theCPE
Definition: TkGluedMeasurementDet.h:56
TkGluedMeasurementDet::HitCollectorForFastMeasurements
Definition: TkGluedMeasurementDet.h:136
Topology::measurementPosition
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
TkGluedMeasurementDet::HitCollectorForFastMeasurements::add
void add(SiStripMatchedRecHit2D const &hit)
Definition: TkGluedMeasurementDet.cc:501
TkStripMeasurementDet::testStrips
bool testStrips(float utraj, float uerr) const
return true if there are 'enough' good strips in the utraj +/- 3 uerr range.
Definition: TkStripMeasurementDet.cc:274
TkGluedMeasurementDet::stereoDet
const TkStripMeasurementDet * stereoDet() const
Definition: TkGluedMeasurementDet.h:40
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
TkGluedMeasurementDet::checkProjection
void checkProjection(const TrajectoryStateOnSurface &ts, const RecHitContainer &monoHits, const RecHitContainer &stereoHits) const
Definition: TkGluedMeasurementDet.cc:336
TkGluedMeasurementDet::measurements
bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const override
Definition: TkGluedMeasurementDet.cc:106
TrackingRecHit
Definition: TrackingRecHit.h:21
TkGluedMeasurementDet::theMatcher
const SiStripRecHitMatcher * theMatcher
Definition: TkGluedMeasurementDet.h:55
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
SiStripRecHitMatcher.h
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
heppy_batch.val
val
Definition: heppy_batch.py:351
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
TkGluedMeasurementDet::theMonoDet
const TkStripMeasurementDet * theMonoDet
Definition: TkGluedMeasurementDet.h:57
TkGluedMeasurementDet::testStrips
bool testStrips(const TrajectoryStateOnSurface &tsos, const BoundPlane &gluedPlane, const TkStripMeasurementDet &mdet) const
Test the strips on one of the two dets with projection.
Definition: TkGluedMeasurementDet.cc:373
TkGluedMeasurementDet::init
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet, const TrackerTopology *tTopo)
Definition: TkGluedMeasurementDet.cc:71
SiStripRecHitMatcher::SimpleHitCollection
std::vector< const SiStripRecHit2D * > SimpleHitCollection
Definition: SiStripRecHitMatcher.h:31
TSiStripMatchedRecHit.h
SiStripMatchedRecHit2D
Definition: SiStripMatchedRecHit2D.h:8
TkGluedMeasurementDet::HitCollectorForSimpleHits
Definition: TkGluedMeasurementDet.h:105
T
long double T
Definition: Basic3DVectorLD.h:48
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
SiStripMatchedRecHit2D::monoCluster
SiStripCluster const & monoCluster() const
Definition: SiStripMatchedRecHit2D.h:41
MeasurementDet::theInactiveHit
TrackingRecHit::ConstRecHitPointer theInactiveHit
Definition: MeasurementDet.h:95
TkGluedMeasurementDet::HitCollectorForFastMeasurements::HitCollectorForFastMeasurements
HitCollectorForFastMeasurements(const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &target)
Definition: TkGluedMeasurementDet.cc:485
TkStripMeasurementDet::recHits
RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &data) const override
Definition: TkStripMeasurementDet.cc:39
BoundPlane
TkGluedMeasurementDet::HitCollectorForFastMeasurements::addProjected
void addProjected(const TrackingRecHit &hit, const GlobalVector &gdir)
Definition: TkGluedMeasurementDet.cc:514
TkGluedMeasurementDet::checkHitProjection
void checkHitProjection(const TrackingRecHit &hit, const TrajectoryStateOnSurface &ts, const GeomDet &det) const
Definition: TkGluedMeasurementDet.cc:347
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
StripGeomDetUnit::specificTopology
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
Definition: StripGeomDetUnit.cc:17
TrackingRecHitProjector.h
mps_fire.result
result
Definition: mps_fire.py:303
MeasurementError::uu
float uu() const
Definition: MeasurementError.h:14
TrajectoryStateOnSurface::globalParameters
const GlobalTrajectoryParameters & globalParameters() const
Definition: TrajectoryStateOnSurface.h:64
NonPropagatingDetMeasurements.h
SiStripMatchedRecHit2D::cloneSH
RecHitPointer cloneSH() const override
Definition: SiStripMatchedRecHit2D.h:45
SiStripRecHitMatcher
Definition: SiStripRecHitMatcher.h:25
MeasurementDet::fastGeomDet
const GeomDet & fastGeomDet() const
Definition: MeasurementDet.h:80
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
StripTopology
Definition: StripTopology.h:11
MeasurementDet::theMissingHit
TrackingRecHit::ConstRecHitPointer theMissingHit
Definition: MeasurementDet.h:94
LocalError::yy
float yy() const
Definition: LocalError.h:24
RecHitPropagator
Definition: RecHitPropagator.h:10
TkGluedMeasurementDet::projectOnGluedDet
RecHitContainer projectOnGluedDet(const std::vector< SiStripRecHit2D > &hits, const TrajectoryStateOnSurface &ts) const
Definition: TkGluedMeasurementDet.cc:316
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
PV3DBase::perp2
T perp2() const
Definition: PV3DBase.h:68
hit
Definition: SiStripHitEffFromCalibTree.cc:88
InvalidTransientRecHit.h
HLTSiStripMonitoring_cff.MeasurementTrackerEvent
MeasurementTrackerEvent
Definition: HLTSiStripMonitoring_cff.py:224
SiStripRecHitMatcher::match
std::unique_ptr< SiStripMatchedRecHit2D > match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection, bool force) const
Definition: SiStripRecHitMatcher.cc:238
TkGluedMeasurementDet::specificGeomDet
const GluedGeomDet & specificGeomDet() const
Definition: TkGluedMeasurementDet.h:32
MeasurementDet::geomDet
virtual const GeomDet & geomDet() const
Definition: MeasurementDet.h:81
TkGluedMeasurementDet::HitCollectorForSimpleHits::addProjected
void addProjected(const TrackingRecHit &hit, const GlobalVector &gdir)
Definition: TkGluedMeasurementDet.cc:469