CMS 3D CMS Logo

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