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 
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  bool addMissingHit = false;
149  if(est.minPt2ForHitRecoveryInGluedDet() < 1e9f) {// HIP mitigation is active
150  // sorry for duplicating the big IF below, but to keep exloiting
151  // short-circuiting logic that's the easiest
152  addMissingHit = stateOnThisDet.hasError() && ( /* do this only if the state has uncertainties, otherwise it will throw
153  (states without uncertainties are passed to this code from seeding */
154  (theMonoDet->isActive(data) &&
156  testStrips(stateOnThisDet,gluedPlane,*theMonoDet)
157  )
158  ) /*Mono OK*/ &&
159  (theStereoDet->isActive(data) &&
161  testStrips(stateOnThisDet,gluedPlane,*theStereoDet)
162  )
163  ) /*Stereo OK*/
164  ); /* State has errors */
165  }
166  else {
167  // sorry for the big IF, but I want to exploit short-circuiting of logic
168  addMissingHit = stateOnThisDet.hasError() && ( /* do this only if the state has uncertainties, otherwise it will throw
169  (states without uncertainties are passed to this code from seeding */
170  (theMonoDet->isActive(data) &&
172  testStrips(stateOnThisDet,gluedPlane,*theMonoDet)
173  )
174  ) /*Mono OK*/ ||
175  (theStereoDet->isActive(data) &&
177  testStrips(stateOnThisDet,gluedPlane,*theStereoDet)
178  )
179  ) /*Stereo OK*/
180  ); /* State has errors */
181  }
182  if(addMissingHit) {
183  result.add(theMissingHit, 0.F);
184  return false;
185  }
186  result.add(theInactiveHit, 0.F);
187  return true;
188 
189 }
190 
191 
192 struct take_address { template<typename T> const T * operator()(const T &val) const { return &val; } };
193 
194 #ifdef DOUBLE_MATCH
195 template<typename Collector>
196 void
197 TkGluedMeasurementDet::collectRecHits( const TrajectoryStateOnSurface& ts, const MeasurementTrackerEvent & data, Collector & collector) const
198 {
199  doubleMatch(ts,data,collector);
200 }
201 #else
202 template<typename Collector>
203 void
205 {
206  //------ WARNING: here ts is used as it is on the mono/stereo surface.
207  //----- A further propagation is necessary.
208  //----- To limit the problem, the SimpleCPE should be used
209  RecHitContainer monoHits = theMonoDet->recHits( ts, data );
210  GlobalVector glbDir = (ts.isValid() ? ts.globalParameters().momentum() : position()-GlobalPoint(0,0,0));
211 
212  //edm::LogWarning("TkGluedMeasurementDet::recHits") << "Query-for-detid-" << theGeomDet->geographicalId().rawId();
213 
214  //checkProjection(ts, monoHits, stereoHits);
215 
216  if (monoHits.empty()) {
217  // make stereo TTRHs and project them
218  projectOnGluedDet( collector, theStereoDet->recHits(ts, data), glbDir);
219  } else {
220  // collect simple stereo hits
221  std::vector<SiStripRecHit2D> simpleSteroHitsByValue;
222  theStereoDet->simpleRecHits(ts, data, simpleSteroHitsByValue);
223 
224  if (simpleSteroHitsByValue.empty()) {
225  projectOnGluedDet( collector, monoHits, glbDir);
226  } else {
227 
228  LocalVector tkDir = (ts.isValid() ? ts.localDirection() : surface().toLocal( position()-GlobalPoint(0,0,0)));
230  vsStereoHits.resize(simpleSteroHitsByValue.size());
231  std::transform(simpleSteroHitsByValue.begin(), simpleSteroHitsByValue.end(), vsStereoHits.begin(), take_address());
232 
233  // convert mono hits to type expected by matcher
234  for (RecHitContainer::const_iterator monoHit = monoHits.begin();
235  monoHit != monoHits.end(); ++monoHit) {
236  const TrackingRecHit* tkhit = (**monoHit).hit();
237  const SiStripRecHit2D* verySpecificMonoHit = reinterpret_cast<const SiStripRecHit2D*>(tkhit);
238  theMatcher->match( verySpecificMonoHit, vsStereoHits.begin(), vsStereoHits.end(),
239  collector.collector(), &specificGeomDet(), tkDir);
240 
241  if (collector.hasNewMatchedHits()) {
242  collector.clearNewMatchedHitsFlag();
243  } else {
244  collector.addProjected( **monoHit, glbDir );
245  }
246  } // loop on mono hit
247  }
248  //GIO// std::cerr << "TkGluedMeasurementDet hits " << monoHits.size() << "/" << stereoHits.size() << " => " << result.size() << std::endl;
249  }
250 }
251 #endif
252 
253 #include<cstdint>
254 #include<cstdio>
255 namespace {
256  struct Stat {
257  double totCall=0;
258  double totMono=0;
259  double totStereo=0;
260  double totComb=0;
261  double totMatched=0;
262  double filtMono=0;
263  double filtStereo=0;
264  double filtComb=0;
265  double matchT=0;
266  double matchF=0;
267  double singleF=0;
268  double zeroM=0;
269  double zeroS=0;
270 
271  void match(uint64_t t) {
272  if(t!=0) ++matchT;
273  totMatched+=t;
274  }
275  void operator()(uint64_t m,uint64_t s, uint64_t fm, uint64_t fs) {
276  ++totCall;
277  totMono+=m;
278  totStereo+=s;
279  totComb += m*s;
280  filtMono+=fm;
281  filtStereo+=fs;
282  filtComb += fm*fs;
283  if(fm==0) ++zeroM;
284  if(fs==0) ++zeroS;
285  if(fm!=0&&fs!=0) ++matchF;
286  if(fm!=0||fs!=0) ++singleF;
287  }
288  ~Stat() {
289  if ( totCall>0)
290  printf("Matches:%d/%d/%d/%d/%d/%d : %f/%f/%f/%f/%f/%f/%f\n",
291  int(totCall),int(matchF),int(singleF-matchF),int(matchT),int(zeroM),int(zeroS),
292  totMono/totCall,totStereo/totCall,totComb/totCall,totMatched/matchT,
293  filtMono/totCall,filtStereo/totCall,filtComb/matchF);
294  }
295  };
296 
297  Stat stat;
298 }
299 
300 
301 
302 
305  const TrajectoryStateOnSurface& ts) const
306 {
308  for ( auto const & hit : hits) {
309  auto && vl = projectedPos(*hit, fastGeomDet(), ts.globalParameters().momentum(), theCPE);
310  auto && phit = std::make_shared<ProjectedSiStripRecHit2D> (vl.first,vl.second, fastGeomDet(), static_cast<SiStripRecHit2D const &>(*hit));
311  result.push_back(std::move(phit));
312  }
313  return result;
314 }
315 
316 template<typename Collector>
317 void
319  const RecHitContainer& hits,
320  const GlobalVector & gdir ) const
321 {
322  for ( RecHitContainer::const_iterator ihit = hits.begin(); ihit!=hits.end(); ihit++) {
323  collector.addProjected( **ihit, gdir );
324  }
325 }
326 
328 TkGluedMeasurementDet::projectOnGluedDet( std::vector<SiStripRecHit2D> const & hits,
329  const TrajectoryStateOnSurface& ts) const
330 {
332  for ( auto const & hit : hits) {
333  auto && vl = projectedPos(hit, fastGeomDet(), ts.globalParameters().momentum(), theCPE);
334  auto && phit = std::make_shared<ProjectedSiStripRecHit2D> (vl.first,vl.second,fastGeomDet(), static_cast<SiStripRecHit2D const &>(hit));
335  result.push_back(std::move(phit));
336  }
337  return result;
338 }
339 
340 template<typename Collector>
341 void
343  std::vector<SiStripRecHit2D> const & hits,
344  const GlobalVector & gdir ) const
345 {
346  for ( auto const & hit : hits)
347  collector.addProjected(hit, gdir );
348 }
349 
350 
351 
352 
353 
355  const RecHitContainer& monoHits,
356  const RecHitContainer& stereoHits) const
357 {
358  for (RecHitContainer::const_iterator i=monoHits.begin(); i != monoHits.end(); ++i) {
359  checkHitProjection( **i, ts, fastGeomDet());
360  }
361  for (RecHitContainer::const_iterator i=stereoHits.begin(); i != stereoHits.end(); ++i) {
362  checkHitProjection( **i, ts, fastGeomDet());
363  }
364 }
365 
367  const TrajectoryStateOnSurface& ts,
368  const GeomDet& det) const
369 {
370  auto && vl = projectedPos(hit, det, ts.globalParameters().momentum(), theCPE);
371  ProjectedSiStripRecHit2D projectedHit(vl.first,vl.second, det, static_cast<SiStripRecHit2D const &>(hit));
372 
373  RecHitPropagator prop;
374  TrajectoryStateOnSurface propState = prop.propagate( hit, det.surface(), ts);
375 
376  if ((projectedHit.localPosition()-propState.localPosition()).mag() > 0.0001f) {
377  std::cout << "PROBLEM: projected and propagated hit positions differ by "
378  << (projectedHit.localPosition()-propState.localPosition()).mag() << std::endl;
379  }
380 
381  LocalError le1 = projectedHit.localPositionError();
382  LocalError le2 = propState.localError().positionError();
383  double eps = 1.e-5;
384  double cutoff = 1.e-4; // if element below cutoff, use absolute instead of relative accuracy
385  double maxdiff = std::max( std::max( fabs(le1.xx() - le2.xx())/(cutoff+le1.xx()),
386  fabs(le1.xy() - le2.xy())/(cutoff+fabs(le1.xy()))),
387  fabs(le1.yy() - le2.yy())/(cutoff+le1.xx()));
388  if (maxdiff > eps) {
389  std::cout << "PROBLEM: projected and propagated hit errors differ by "
390  << maxdiff << std::endl;
391  }
392 
393 }
394 
395 bool
397  const BoundPlane &gluedPlane,
398  const TkStripMeasurementDet &mdet) const {
399  // from TrackingRecHitProjector
400  const GeomDet &det = mdet.fastGeomDet();
401  const BoundPlane &stripPlane = det.surface();
402 
403  //LocalPoint glp = tsos.localPosition();
404  LocalError err = tsos.localError().positionError();
405  /*LogDebug("TkStripMeasurementDet") <<
406  "Testing local pos glued: " << glp <<
407  " local err glued: " << tsos.localError().positionError() <<
408  " in? " << gluedPlane.bounds().inside(glp) <<
409  " in(3s)? " << gluedPlane.bounds().inside(glp, err, 3.0f);*/
410 
411  GlobalVector gdir = tsos.globalParameters().momentum();
412 
413  LocalPoint slp = stripPlane.toLocal(tsos.globalPosition());
414  LocalVector sld = stripPlane.toLocal(gdir);
415 
416  double delta = stripPlane.localZ( tsos.globalPosition());
417  LocalPoint pos = slp - sld * delta/sld.z();
418 
419 
420  // now the error
421  LocalVector hitXAxis = stripPlane.toLocal( gluedPlane.toGlobal( LocalVector(1,0,0)));
422  if (stripPlane.normalVector().dot( gluedPlane.normalVector()) < 0) {
423  // the two planes are inverted, and the correlation element must change sign
424  err = LocalError( err.xx(), -err.xy(), err.yy());
425  }
426  LocalError rotatedError = err.rotate( hitXAxis.x(), hitXAxis.y());
427 
428  /* // This is probably meaningless
429  LogDebug("TkStripMeasurementDet") <<
430  "Testing local pos on strip (SLP): " << slp <<
431  " in? :" << stripPlane.bounds().inside(slp) <<
432  " in(3s)? :" << stripPlane.bounds().inside(slp, rotatedError, 3.0f);
433  // but it helps to test bugs in the formula for POS */
434  /*LogDebug("TkStripMeasurementDet") <<
435  "Testing local pos strip: " << pos <<
436  " in? " << stripPlane.bounds().inside(pos) <<
437  " in(3s)? " << stripPlane.bounds().inside(pos, rotatedError, 3.0f);*/
438 
439  // now we need to convert to MeasurementFrame
440  const StripTopology &topo = mdet.specificGeomDet().specificTopology();
441  float utraj = topo.measurementPosition(pos).x();
442  float uerr = std::sqrt(topo.measurementError(pos,rotatedError).uu());
443  return mdet.testStrips(utraj, uerr);
444 }
445 
446 #include<boost/bind.hpp>
448  const SiStripRecHitMatcher * matcher, const StripClusterParameterEstimator* cpe,
450  geomDet_(geomDet), matcher_(matcher), cpe_(cpe),target_(target),
451  collector_(boost::bind(&HitCollectorForRecHits::add,boost::ref(*this),_1)),
452  hasNewHits_(false)
453 {
454 }
455 
457  const GeomDet * geomDet,
458  const SiStripRecHitMatcher * matcher,
460  const TrajectoryStateOnSurface& stateOnThisDet,
461  const MeasurementEstimator& est,
463  geomDet_(geomDet), matcher_(matcher), cpe_(cpe),stateOnThisDet_(stateOnThisDet), est_(est), target_(target),
464  collector_(boost::bind(&HitCollectorForSimpleHits::add,boost::ref(*this),_1)),
465  hasNewHits_(false)
466 {
467 }
468 
469 
470 void
472  const GlobalVector & gdir)
473 {
474  auto && vl = projectedPos(hit,*geomDet_, gdir, cpe_);
475  auto && phit = std::make_shared<ProjectedSiStripRecHit2D> (vl.first,vl.second,*geomDet_, static_cast<SiStripRecHit2D const &>(hit));
476  target_.push_back(std::move(phit));
477 }
478 
479 
480 void
482 {
483  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush // consistent with previous code
484  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster()) ) ) return;
485  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
486 
487  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, hit2d);
488  if (diffEst.first)
489  target_.emplace_back(new SiStripMatchedRecHit2D(hit2d)); // fix to use move (really needed???)
490 }
491 
492 
493 
494 void
496  const GlobalVector & gdir)
497 {
498  auto const & thit = reinterpret_cast<TrackerSingleRecHit const&>(hit);
499  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit.geographicalId(), &thit.stripCluster()) ) ) return;
500 
501  // here we're ok with some extra casual new's and delete's
502  auto && vl = projectedPos(hit,*geomDet_, gdir, cpe_);
503  std::unique_ptr<ProjectedSiStripRecHit2D> phit(new ProjectedSiStripRecHit2D(vl.first,vl.second,*geomDet_, static_cast<SiStripRecHit2D const &>(hit)));
504  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, *phit);
505  if ( diffEst.first) {
506  target_.emplace_back(phit.release());
507  }
508 }
509 
510 
511 
512 
514 (const GeomDet * geomDet,
515  const SiStripRecHitMatcher * matcher, const StripClusterParameterEstimator* cpe,
516  const TrajectoryStateOnSurface& stateOnThisDet,
517  const MeasurementEstimator& est,
519  geomDet_(geomDet), matcher_(matcher), cpe_(cpe),stateOnThisDet_(stateOnThisDet), est_(est), target_(target),
520  collector_(boost::bind(&HitCollectorForFastMeasurements::add,boost::ref(*this),_1)),
521  hasNewHits_(false)
522 {
523 }
524 
525 
526 void
528 {
529  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush // consistent with previous code...
530  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit2d.geographicalId(), &hit2d.monoCluster(), &hit2d.stereoCluster()) ) ) return;
531  hasNewHits_ = true; //FIXME: see also what happens moving this within testAndPush
532 
533  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, hit2d);
534  if (diffEst.first)
535  target_.add(std::move(hit2d.cloneSH()),diffEst.second);
536 }
537 
538 
539 void
541  const GlobalVector & gdir)
542 {
543  auto const & thit = reinterpret_cast<TrackerSingleRecHit const&>(hit);
544  if ( !est_.preFilter(stateOnThisDet_, ClusterFilterPayload(hit.geographicalId(), &thit.stripCluster()) ) ) return;
545 
546 
547  // here we're ok with some extra casual new's and delete's
548  auto && vl = projectedPos(hit,*geomDet_, gdir, cpe_);
549  auto && phit = std::make_shared<ProjectedSiStripRecHit2D> (vl.first,vl.second,*geomDet_, static_cast<SiStripRecHit2D const &>(hit));
550 
551  std::pair<bool,double> diffEst = est_.estimate( stateOnThisDet_, *phit);
552  if ( diffEst.first) {
553  target_.add(phit, diffEst.second);
554  }
555 }
556 
557 
558 
559 #ifdef DOUBLE_MATCH
560 #include "doubleMatch.icc"
561 #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)
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
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
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)
tuple result
Definition: mps_fire.py:84
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: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
def move
Definition: eostools.py:510
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)
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?
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
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
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.
tuple cout
Definition: gather_cfg.py:145
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
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)