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 MeasurementTrackerEvent &data) const
 

Detailed Description

Definition at line 12 of file NonPropagatingDetMeasurements.h.

Member Function Documentation

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

Definition at line 9 of file NonPropagatingDetMeasurements.cc.

References newFWLiteAna::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().

13 {
14  throw cms::Exception("THIS SHOULD NOT BE CALLED");
15  std::vector<TrajectoryMeasurement> result;
16 
17  MeasurementDet::RecHitContainer allHits = det.recHits(stateOnThisDet, data);
18  for (MeasurementDet::RecHitContainer::const_iterator ihit=allHits.begin();
19  ihit != allHits.end(); ihit++) {
20  std::pair<bool,double> diffEst = est.estimate( stateOnThisDet, **ihit);
21  if ( diffEst.first) {
22  result.push_back( TrajectoryMeasurement( stateOnThisDet, *ihit,
23  diffEst.second));
24  }
25  }
26  //GIO// std::cerr << "NonPropagatingDetMeasurements: " << allHits.size() << " => " << result.size() << std::endl;
27  if ( result.empty()) {
28  // create a TrajectoryMeasurement with an invalid RecHit and zero estimate
29  result.push_back( TrajectoryMeasurement( stateOnThisDet,
31  }
32  else {
33  // sort results according to estimator value
34  if ( result.size() > 1) {
35  sort( result.begin(), result.end(), TrajMeasLessEstim());
36  }
37  }
38  return result;
39 }
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const =0
TransientTrackingRecHit::ConstRecHitContainer RecHitContainer
virtual const GeomDet & geomDet() const
tuple result
Definition: query.py:137
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281