CMS 3D CMS Logo

Public Member Functions

NonPropagatingDetMeasurements Class Reference

#include <NonPropagatingDetMeasurements.h>

List of all members.

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 newFWLiteAna::build, MeasurementEstimator::estimate(), Exception, F(), MeasurementDet::geomDet(), MeasurementDet::recHits(), query::result, and python::multivaluedict::sort().

{
  throw cms::Exception("THIS SHOULD NOT BE CALLED");
  std::vector<TrajectoryMeasurement> result;

  MeasurementDet::RecHitContainer allHits = det.recHits( stateOnThisDet);
  for (MeasurementDet::RecHitContainer::const_iterator ihit=allHits.begin();
       ihit != allHits.end(); ihit++) {
    std::pair<bool,double> diffEst = est.estimate( stateOnThisDet, **ihit);
    if ( diffEst.first) {
      result.push_back( TrajectoryMeasurement( stateOnThisDet, *ihit, 
                                               diffEst.second));
    }
  }
  //GIO// std::cerr << "NonPropagatingDetMeasurements: " << allHits.size() << " => " << result.size() << std::endl;
  if ( result.empty()) {
    // create a TrajectoryMeasurement with an invalid RecHit and zero estimate
    result.push_back( TrajectoryMeasurement( stateOnThisDet, 
                                             InvalidTransientRecHit::build(&det.geomDet()), 0.F)); 
  }
  else {
    // sort results according to estimator value
    if ( result.size() > 1) {
      sort( result.begin(), result.end(), TrajMeasLessEstim());
    }
  }
  return result;
}