CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
NonPropagatingDetMeasurements Class Reference

#include <NonPropagatingDetMeasurements.h>

Public Member Functions

std::vector
< TrajectoryMeasurement
get (const MeasurementDet &det, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est) const
 

Detailed Description

Definition at line 11 of file NonPropagatingDetMeasurements.h.

Member Function Documentation

std::vector< TrajectoryMeasurement > NonPropagatingDetMeasurements::get ( const MeasurementDet det,
const TrajectoryStateOnSurface stateOnThisDet,
const MeasurementEstimator est 
) const

Definition at line 9 of file NonPropagatingDetMeasurements.cc.

References InvalidTransientRecHit::build(), MeasurementEstimator::estimate(), edm::hlt::Exception, F(), MeasurementDet::geomDet(), MeasurementDet::recHits(), query::result, and python.multivaluedict::sort().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

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