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