#include <RecoTracker/MeasurementDet/interface/NonPropagatingDetMeasurements.h>
Public Member Functions | |
std::vector < TrajectoryMeasurement > | get (const MeasurementDet &det, const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est) const |
Definition at line 11 of file NonPropagatingDetMeasurements.h.
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(), MeasurementDet::geomDet(), MeasurementDet::recHits(), HLT_VtxMuL3::result, and python::multivaluedict::sort().
Referenced by TkGluedMeasurementDet::fastMeasurements().
00012 { 00013 std::vector<TrajectoryMeasurement> result; 00014 00015 MeasurementDet::RecHitContainer allHits = det.recHits( stateOnThisDet); 00016 for (MeasurementDet::RecHitContainer::const_iterator ihit=allHits.begin(); 00017 ihit != allHits.end(); ihit++) { 00018 std::pair<bool,double> diffEst = est.estimate( stateOnThisDet, **ihit); 00019 if ( diffEst.first) { 00020 result.push_back( TrajectoryMeasurement( stateOnThisDet, *ihit, 00021 diffEst.second)); 00022 } 00023 } 00024 if ( result.empty()) { 00025 // create a TrajectoryMeasurement with an invalid RecHit and zero estimate 00026 result.push_back( TrajectoryMeasurement( stateOnThisDet, 00027 InvalidTransientRecHit::build(&det.geomDet()), 0.F)); 00028 } 00029 else { 00030 // sort results according to estimator value 00031 if ( result.size() > 1) { 00032 sort( result.begin(), result.end(), TrajMeasLessEstim()); 00033 } 00034 } 00035 return result; 00036 }