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