CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
NonPropagatingDetMeasurements.cc
Go to the documentation of this file.
7 
8 std::vector<TrajectoryMeasurement>
10  const TrajectoryStateOnSurface& stateOnThisDet,
11  const MeasurementEstimator& est) const
12 {
13  throw cms::Exception("THIS SHOULD NOT BE CALLED");
14  std::vector<TrajectoryMeasurement> result;
15 
16  MeasurementDet::RecHitContainer allHits = det.recHits( stateOnThisDet);
17  for (MeasurementDet::RecHitContainer::const_iterator ihit=allHits.begin();
18  ihit != allHits.end(); ihit++) {
19  std::pair<bool,double> diffEst = est.estimate( stateOnThisDet, **ihit);
20  if ( diffEst.first) {
21  result.push_back( TrajectoryMeasurement( stateOnThisDet, *ihit,
22  diffEst.second));
23  }
24  }
25  //GIO// std::cerr << "NonPropagatingDetMeasurements: " << allHits.size() << " => " << result.size() << std::endl;
26  if ( result.empty()) {
27  // create a TrajectoryMeasurement with an invalid RecHit and zero estimate
28  result.push_back( TrajectoryMeasurement( stateOnThisDet,
30  }
31  else {
32  // sort results according to estimator value
33  if ( result.size() > 1) {
34  sort( result.begin(), result.end(), TrajMeasLessEstim());
35  }
36  }
37  return result;
38 }
static RecHitPointer build(const GeomDet *geom, Type type=TrackingRecHit::missing, const DetLayer *layer=0)
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const =0
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
virtual const GeomDet & geomDet() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &) const =0
tuple result
Definition: query.py:137
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
std::vector< TrajectoryMeasurement > get(const MeasurementDet &det, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est) const