CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
19 namespace {
20  inline
21  std::pair<LocalPoint,LocalError> projectedPos(const TrackingRecHit& hit,
22  const GeomDet& det,
23  const GlobalVector & gdir, const StripClusterParameterEstimator* cpe) {
24  const BoundPlane& gluedPlane = det.surface();
25  const BoundPlane& hitPlane = hit.det()->surface();
26 
27  // check if the planes are parallel
28  //const float epsilon = 1.e-7; // corresponds to about 0.3 miliradian but cannot be reduced
29  // because of float precision
30 
31  //if (fabs(gluedPlane.normalVector().dot( hitPlane.normalVector())) < 1-epsilon) {
32  // std::cout << "TkGluedMeasurementDet plane not parallel to DetUnit plane: dot product is "
33  // << gluedPlane.normalVector().dot( hitPlane.normalVector()) << endl;
34  // FIXME: throw the appropriate exception here...
35  //throw MeasurementDetException("TkGluedMeasurementDet plane not parallel to DetUnit plane");
36  //}
37 
38  double delta = gluedPlane.localZ( hitPlane.position());
39  LocalVector ldir = gluedPlane.toLocal(gdir);
40  LocalPoint lhitPos = gluedPlane.toLocal( hit.globalPosition());
41  LocalPoint projectedHitPos = lhitPos - ldir * delta/ldir.z();
42 
43  LocalVector hitXAxis = gluedPlane.toLocal( hitPlane.toGlobal( LocalVector(1,0,0)));
44  LocalError hitErr = hit.localPositionError();
45  if (gluedPlane.normalVector().dot( hitPlane.normalVector()) < 0) {
46  // the two planes are inverted, and the correlation element must change sign
47  hitErr = LocalError( hitErr.xx(), -hitErr.xy(), hitErr.yy());
48  }
49  LocalError rotatedError = hitErr.rotate( hitXAxis.x(), hitXAxis.y());
50 
51  return std::make_pair(projectedHitPos, rotatedError);
52  }
53 
54 
55  inline
56  std::pair<LocalPoint,LocalError> projectedPos(const TrackingRecHit& hit,
57  const GeomDet& det,
60  return projectedPos(hit, det, gdir, cpe);
61  }
62 }
63 
64 // #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h"
66 
67 using namespace std;
68 
70  const SiStripRecHitMatcher* matcher,
71  const StripClusterParameterEstimator* cpe) :
72  MeasurementDet(gdet),
73  theMatcher(matcher), theCPE(cpe),
74  theMonoDet(nullptr), theStereoDet(nullptr)
75 {}
76 
78  const MeasurementDet* stereoDet) {
79  theMonoDet = dynamic_cast<const TkStripMeasurementDet *>(monoDet);
80  theStereoDet = dynamic_cast<const TkStripMeasurementDet *>(stereoDet);
81 
82  if ((theMonoDet == 0) || (theStereoDet == 0)) {
83  throw MeasurementDetException("TkGluedMeasurementDet ERROR: Trying to glue a det which is not a TkStripMeasurementDet");
84  }
85 }
86 
89 {
90 
92  HitCollectorForRecHits collector( &fastGeomDet(), theMatcher, theCPE, result );
93  collectRecHits(ts, data, collector);
94  return result;
95 }
96 
97 
98 // simple hits
100  const TrajectoryStateOnSurface& stateOnThisDet,
101  const MeasurementEstimator& est, const MeasurementTrackerEvent & data) const {
102  if unlikely((!theMonoDet->isActive(data)) && (!theStereoDet->isActive(data))) return false;
103  auto oldSize = result.size();
104  HitCollectorForSimpleHits collector( &fastGeomDet(), theMatcher, theCPE, stateOnThisDet, est, result);
105  collectRecHits(stateOnThisDet, data, collector);
106 
107  return result.size()>oldSize;
108 
109 }
110 
111 
112 
113 
115  const MeasurementEstimator& est,
117  TempMeasurements & result) const {
118 
119  if unlikely((!theMonoDet->isActive(data)) && (!theStereoDet->isActive(data))) {
120  // LogDebug("TkStripMeasurementDet") << " DetID " << geomDet().geographicalId().rawId() << " (glued) fully inactive";
121  result.add(theInactiveHit, 0.F);
122  return true;
123  }
124 
125  auto oldSize = result.size();
126 
127  HitCollectorForFastMeasurements collector( &fastGeomDet(), theMatcher, theCPE, stateOnThisDet, est, result);
128  collectRecHits(stateOnThisDet, data, collector);
129 
130 
131  if (result.size()>oldSize) return true;
132 
133  //LogDebug("TkStripMeasurementDet") << "No hit found on TkGlued. Testing strips... ";
134  const BoundPlane &gluedPlane = geomDet().surface();
135  if ( // sorry for the big IF, but I want to exploit short-circuiting of logic
136  stateOnThisDet.hasError() && ( /* do this only if the state has uncertainties, otherwise it will throw
137  (states without uncertainties are passed to this code from seeding */
138  (theMonoDet->isActive(data) &&
140  testStrips(stateOnThisDet,gluedPlane,*theMonoDet)
141  )
142  ) /*Mono OK*/ ||
143  (theStereoDet->isActive(data) &&
145  testStrips(stateOnThisDet,gluedPlane,*theStereoDet)
146  )
147  ) /*Stereo OK*/
148  ) /* State has errors */
149  ) {
150  result.add(theMissingHit, 0.F);
151  return false;
152  }
153  result.add(theInactiveHit, 0.F);
154  return true;
155 
156 }
157 
158 
159 struct take_address { template<typename T> const T * operator()(const T &val) const { return &val; } };
160 
161 #ifdef DOUBLE_MATCH
162 template<typename Collector>
163 void
164 TkGluedMeasurementDet::collectRecHits( const TrajectoryStateOnSurface& ts, const MeasurementTrackerEvent & data, Collector & collector) const
165 {
166  doubleMatch(ts,data,collector);
167 }
168 #else
169 template<typename Collector>
170 void
172 {
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 
195  LocalVector tkDir = (ts.isValid() ? ts.localDirection() : surface().toLocal( position()-GlobalPoint(0,0,0)));
197  vsStereoHits.resize(simpleSteroHitsByValue.size());
198  std::transform(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();
202  monoHit != monoHits.end(); ++monoHit) {
203  const TrackingRecHit* tkhit = (**monoHit).hit();
204  const SiStripRecHit2D* verySpecificMonoHit = reinterpret_cast<const SiStripRecHit2D*>(tkhit);
205  theMatcher->match( verySpecificMonoHit, vsStereoHits.begin(), vsStereoHits.end(),
206  collector.collector(), &specificGeomDet(), tkDir);
207 
208  if (collector.hasNewMatchedHits()) {
209  collector.clearNewMatchedHitsFlag();
210  } else {
211  collector.addProjected( **monoHit, glbDir );
212  }
213  } // loop on mono hit
214  }
215  //GIO// std::cerr << "TkGluedMeasurementDet hits " << monoHits.size() << "/" << stereoHits.size() << " => " << result.size() << std::endl;
216  }
217 }
218 #endif
219 
220 #include<cstdint>
221 #include<cstdio>
222 namespace {
223  struct Stat {
224  double totCall=0;
225  double totMono=0;
226  double totStereo=0;
227  double totComb=0;
228  double totMatched=0;
229  double filtMono=0;
230  double filtStereo=0;
231  double filtComb=0;
232  double matchT=0;
233  double matchF=0;
234  double singleF=0;
235  double zeroM=0;
236  double zeroS=0;
237 
238  void match(uint64_t t) {
239  if(t!=0) ++matchT;
240  totMatched+=t;
241  }
242  void operator()(uint64_t m,uint64_t s, uint64_t fm, uint64_t fs) {
243  ++totCall;
244  totMono+=m;
245  totStereo+=s;
246  totComb += m*s;
247  filtMono+=fm;
248  filtStereo+=fs;
249  filtComb += fm*fs;
250  if(fm==0) ++zeroM;
251  if(fs==0) ++zeroS;
252  if(fm!=0&&fs!=0) ++matchF;
253  if(fm!=0||fs!=0) ++singleF;
254  }
255  ~Stat() {
256  if ( totCall>0)
257  printf("Matches:%d/%d/%d/%d/%d/%d : %f/%f/%f/%f/%f/%f/%f\n",
258  int(totCall),int(matchF),int(singleF-matchF),int(matchT),int(zeroM),int(zeroS),
259  totMono/totCall,totStereo/totCall,totComb/totCall,totMatched/matchT,
260  filtMono/totCall,filtStereo/totCall,filtComb/matchF);
261  }
262  };
263 
264  Stat stat;
265 }
266 
267 
268 
269 
272  const TrajectoryStateOnSurface& ts) const
273 {
275  for ( auto const & hit : hits) {
276  auto && vl = projectedPos(*hit, fastGeomDet(), ts.globalParameters().momentum(), theCPE);
277  auto && phit = std::make_shared<ProjectedSiStripRecHit2D> (vl.first,vl.second, fastGeomDet(), static_cast<SiStripRecHit2D const &>(*hit));
278  result.push_back(std::move(phit));
279  }
280  return result;
281 }
282 
283 template<typename Collector>
284 void
286  const RecHitContainer& hits,
287  const GlobalVector & gdir ) const
288 {
289  for ( RecHitContainer::const_iterator ihit = hits.begin(); ihit!=hits.end(); ihit++) {
290  collector.addProjected( **ihit, gdir );
291  }
292 }
293 
295 TkGluedMeasurementDet::projectOnGluedDet( std::vector<SiStripRecHit2D> const & hits,
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  std::vector<SiStripRecHit2D> const & hits,
311  const GlobalVector & gdir ) const
312 {
313  for ( auto const & hit : hits)
314  collector.addProjected(hit, gdir );
315 }
316 
317 
318 
319 
320 
322  const RecHitContainer& monoHits,
323  const RecHitContainer& stereoHits) const
324 {
325  for (RecHitContainer::const_iterator i=monoHits.begin(); i != monoHits.end(); ++i) {
326  checkHitProjection( **i, ts, fastGeomDet());
327  }
328  for (RecHitContainer::const_iterator i=stereoHits.begin(); i != stereoHits.end(); ++i) {
329  checkHitProjection( **i, ts, fastGeomDet());
330  }
331 }
332 
334  const TrajectoryStateOnSurface& ts,
335  const GeomDet& det) const
336 {
337  auto && vl = projectedPos(hit, det, ts.globalParameters().momentum(), theCPE);
338  ProjectedSiStripRecHit2D projectedHit(vl.first,vl.second, det, static_cast<SiStripRecHit2D const &>(hit));
339 
340  RecHitPropagator prop;
341  TrajectoryStateOnSurface propState = prop.propagate( hit, det.surface(), ts);
342 
343  if ((projectedHit.localPosition()-propState.localPosition()).mag() > 0.0001f) {
344  std::cout << "PROBLEM: projected and propagated hit positions differ by "
345  << (projectedHit.localPosition()-propState.localPosition()).mag() << std::endl;
346  }
347 
348  LocalError le1 = projectedHit.localPositionError();
349  LocalError le2 = propState.localError().positionError();
350  double eps = 1.e-5;
351  double cutoff = 1.e-4; // if element below cutoff, use absolute instead of relative accuracy
352  double maxdiff = std::max( std::max( fabs(le1.xx() - le2.xx())/(cutoff+le1.xx()),
353  fabs(le1.xy() - le2.xy())/(cutoff+fabs(le1.xy()))),
354  fabs(le1.yy() - le2.yy())/(cutoff+le1.xx()));
355  if (maxdiff > eps) {
356  std::cout << "PROBLEM: projected and propagated hit errors differ by "
357  << maxdiff << std::endl;
358  }
359 
360 }
361 
362 bool
364  const BoundPlane &gluedPlane,
365  const TkStripMeasurementDet &mdet) const {
366  // from TrackingRecHitProjector
367  const GeomDet &det = mdet.fastGeomDet();
368  const BoundPlane &stripPlane = det.surface();
369 
370  //LocalPoint glp = tsos.localPosition();
371  LocalError err = tsos.localError().positionError();
372  /*LogDebug("TkStripMeasurementDet") <<
373  "Testing local pos glued: " << glp <<
374  " local err glued: " << tsos.localError().positionError() <<
375  " in? " << gluedPlane.bounds().inside(glp) <<
376  " in(3s)? " << gluedPlane.bounds().inside(glp, err, 3.0f);*/
377 
378  GlobalVector gdir = tsos.globalParameters().momentum();
379 
380  LocalPoint slp = stripPlane.toLocal(tsos.globalPosition());
381  LocalVector sld = stripPlane.toLocal(gdir);
382 
383  double delta = stripPlane.localZ( tsos.globalPosition());
384  LocalPoint pos = slp - sld * delta/sld.z();
385 
386 
387  // now the error
388  LocalVector hitXAxis = stripPlane.toLocal( gluedPlane.toGlobal( LocalVector(1,0,0)));
389  if (stripPlane.normalVector().dot( gluedPlane.normalVector()) < 0) {
390  // the two planes are inverted, and the correlation element must change sign
391  err = LocalError( err.xx(), -err.xy(), err.yy());
392  }
393  LocalError rotatedError = err.rotate( hitXAxis.x(), hitXAxis.y());
394 
395  /* // This is probably meaningless
396  LogDebug("TkStripMeasurementDet") <<
397  "Testing local pos on strip (SLP): " << slp <<
398  " in? :" << stripPlane.bounds().inside(slp) <<
399  " in(3s)? :" << stripPlane.bounds().inside(slp, rotatedError, 3.0f);
400  // but it helps to test bugs in the formula for POS */
401  /*LogDebug("TkStripMeasurementDet") <<
402  "Testing local pos strip: " << pos <<
403  " in? " << stripPlane.bounds().inside(pos) <<
404  " in(3s)? " << stripPlane.bounds().inside(pos, rotatedError, 3.0f);*/
405 
406  // now we need to convert to MeasurementFrame
407  const StripTopology &topo = mdet.specificGeomDet().specificTopology();
408  float utraj = topo.measurementPosition(pos).x();
409  float uerr = std::sqrt(topo.measurementError(pos,rotatedError).uu());
410  return mdet.testStrips(utraj, uerr);
411 }
412 
413 #include<boost/bind.hpp>
415  const SiStripRecHitMatcher * matcher, const StripClusterParameterEstimator* cpe,
417  geomDet_(geomDet), matcher_(matcher), cpe_(cpe),target_(target),
418  collector_(boost::bind(&HitCollectorForRecHits::add,boost::ref(*this),_1)),
419  hasNewHits_(false)
420 {
421 }
422 
424  const GeomDet * geomDet,
425  const SiStripRecHitMatcher * matcher,
427  const TrajectoryStateOnSurface& stateOnThisDet,
428  const MeasurementEstimator& est,
430  geomDet_(geomDet), matcher_(matcher), cpe_(cpe),stateOnThisDet_(stateOnThisDet), est_(est), target_(target),
431  collector_(boost::bind(&HitCollectorForSimpleHits::add,boost::ref(*this),_1)),
432  hasNewHits_(false)
433 {
434 }
435 
436 
437 void
439  const GlobalVector & gdir)
440 {
441  auto && vl = projectedPos(hit,*geomDet_, gdir, cpe_);
442  auto && phit = std::make_shared<ProjectedSiStripRecHit2D> (vl.first,vl.second,*geomDet_, static_cast<SiStripRecHit2D const &>(hit));
443  target_.push_back(std::move(phit));
444 }
445 
446 
447 void
449 {
450  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush // consistent with previous code
451  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster()) ) ) return;
452  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
453 
454  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, hit2d);
455  if (diffEst.first)
456  target_.emplace_back(new SiStripMatchedRecHit2D(hit2d)); // fix to use move (really needed???)
457 }
458 
459 
460 
461 void
463  const GlobalVector & gdir)
464 {
465  auto const & thit = reinterpret_cast<TrackerSingleRecHit const&>(hit);
466  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit.geographicalId(), &thit.stripCluster()) ) ) return;
467 
468  // here we're ok with some extra casual new's and delete's
469  auto && vl = projectedPos(hit,*geomDet_, gdir, cpe_);
470  std::unique_ptr<ProjectedSiStripRecHit2D> phit(new ProjectedSiStripRecHit2D(vl.first,vl.second,*geomDet_, static_cast<SiStripRecHit2D const &>(hit)));
471  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, *phit);
472  if ( diffEst.first) {
473  target_.emplace_back(phit.release());
474  }
475 }
476 
477 
478 
479 
481 (const GeomDet * geomDet,
482  const SiStripRecHitMatcher * matcher, const StripClusterParameterEstimator* cpe,
483  const TrajectoryStateOnSurface& stateOnThisDet,
484  const MeasurementEstimator& est,
486  geomDet_(geomDet), matcher_(matcher), cpe_(cpe),stateOnThisDet_(stateOnThisDet), est_(est), target_(target),
487  collector_(boost::bind(&HitCollectorForFastMeasurements::add,boost::ref(*this),_1)),
488  hasNewHits_(false)
489 {
490 }
491 
492 
493 void
495 {
496  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush // consistent with previous code...
497  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster()) ) ) return;
498  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
499 
500  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, hit2d);
501  if (diffEst.first)
502  target_.add(std::move(hit2d.cloneSH()),diffEst.second);
503 }
504 
505 
506 void
508  const GlobalVector & gdir)
509 {
510  auto const & thit = reinterpret_cast<TrackerSingleRecHit const&>(hit);
511  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit.geographicalId(), &thit.stripCluster()) ) ) return;
512 
513 
514  // here we're ok with some extra casual new's and delete's
515  auto && vl = projectedPos(hit,*geomDet_, gdir, cpe_);
516  auto && phit = std::make_shared<ProjectedSiStripRecHit2D> (vl.first,vl.second,*geomDet_, static_cast<SiStripRecHit2D const &>(hit));
517 
518  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, *phit);
519  if ( diffEst.first) {
520  target_.add(phit, diffEst.second);
521  }
522 }
523 
524 
525 
526 #ifdef DOUBLE_MATCH
527 #include "doubleMatch.icc"
528 #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.
int i
Definition: DBlmapReader.cc:9
float xx() const
Definition: LocalError.h:24
const TkStripMeasurementDet * theMonoDet
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet)
void add(SiStripMatchedRecHit2D const &hit)
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
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
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:40
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
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
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
T sqrt(T t)
Definition: SSEVec.h:48
LocalPoint toLocal(const GlobalPoint &gp) const
void add(ConstRecHitPointer const &h, float d)
const GluedGeomDet & specificGeomDet() const
T z() const
Definition: PV3DBase.h:64
tuple result
Definition: query.py:137
float uu() const
virtual bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, const MeasurementTrackerEvent &data, TempMeasurements &result) const
HitCollectorForSimpleHits(const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, SimpleHitContainer &target)
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
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
RecHitContainer projectOnGluedDet(const std::vector< SiStripRecHit2D > &hits, const TrajectoryStateOnSurface &ts) const
const SiStripRecHitMatcher * theMatcher
virtual TrackingRecHit const * hit() 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
virtual LocalError localPositionError() const =0
void checkHitProjection(const TrackingRecHit &hit, const TrajectoryStateOnSurface &ts, const GeomDet &det) const
std::unique_ptr< SiStripMatchedRecHit2D > match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection, bool force=false) 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
string const
Definition: compareJSON.py:14
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
bool testStrips(float utraj, float uerr) const
return true if there are &#39;enough&#39; good strips in the utraj +/- 3 uerr range.
tuple cout
Definition: gather_cfg.py:121
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6
const TkStripMeasurementDet * stereoDet() const
DetId geographicalId() const
volatile std::atomic< bool > shutdown_flag false
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
HitCollectorForRecHits(const GeomDet *geomDet, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe, RecHitContainer &target)