CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

SimpleDAFHitCollector Class Reference

#include <SimpleDAFHitCollector.h>

Inheritance diagram for SimpleDAFHitCollector:
MultiRecHitCollector

List of all members.

Public Member Functions

const MeasurementEstimatorgetEstimator () const
const PropagatorgetPropagator () const
const SiTrackerMultiRecHitUpdatorgetUpdator () const
virtual std::vector
< TrajectoryMeasurement
recHits (const Trajectory &) const
 SimpleDAFHitCollector (const MeasurementTracker *measurementTracker, const SiTrackerMultiRecHitUpdator *updator, const MeasurementEstimator *est, const Propagator *propagator)
virtual ~SimpleDAFHitCollector ()

Private Member Functions

void buildMultiRecHits (const std::vector< TrajectoryMeasurement > &measgroup, std::vector< TrajectoryMeasurement > &result) const

Private Attributes

const MeasurementEstimatortheEstimator
const PropagatorthePropagator
const SiTrackerMultiRecHitUpdatortheUpdator

Detailed Description

Definition at line 10 of file SimpleDAFHitCollector.h.


Constructor & Destructor Documentation

SimpleDAFHitCollector::SimpleDAFHitCollector ( const MeasurementTracker measurementTracker,
const SiTrackerMultiRecHitUpdator updator,
const MeasurementEstimator est,
const Propagator propagator 
) [inline, explicit]

Definition at line 12 of file SimpleDAFHitCollector.h.

                                  :MultiRecHitCollector(measurementTracker), theUpdator(updator), theEstimator(est), thePropagator(propagator){}
virtual SimpleDAFHitCollector::~SimpleDAFHitCollector ( ) [inline, virtual]

Definition at line 19 of file SimpleDAFHitCollector.h.

{}

Member Function Documentation

void SimpleDAFHitCollector::buildMultiRecHits ( const std::vector< TrajectoryMeasurement > &  measgroup,
std::vector< TrajectoryMeasurement > &  result 
) const [private]
const MeasurementEstimator* SimpleDAFHitCollector::getEstimator ( ) const [inline]

Definition at line 31 of file SimpleDAFHitCollector.h.

References theEstimator.

{return theEstimator;}
const Propagator* SimpleDAFHitCollector::getPropagator ( ) const [inline]

Definition at line 32 of file SimpleDAFHitCollector.h.

References thePropagator.

{return thePropagator;}
const SiTrackerMultiRecHitUpdator* SimpleDAFHitCollector::getUpdator ( ) const [inline]

Definition at line 30 of file SimpleDAFHitCollector.h.

References theUpdator.

{return theUpdator;}
vector< TrajectoryMeasurement > SimpleDAFHitCollector::recHits ( const Trajectory traj) const [virtual]

Implements MultiRecHitCollector.

Definition at line 16 of file SimpleDAFHitCollector.cc.

References LogTrace, Trajectory::measurements(), and query::result.

                                                                                        {

        //it assumes that the measurements are sorted in the smoothing direction
        vector<TrajectoryMeasurement> meas = traj.measurements();
        if (meas.empty()) //return TransientTrackingRecHit::ConstRecHitContainer();     
                return vector<TrajectoryMeasurement>();


        //TransientTrackingRecHit::ConstRecHitContainer result;
        vector<TrajectoryMeasurement> result;

        for(vector<TrajectoryMeasurement>::reverse_iterator imeas = meas.rbegin(); imeas != meas.rend(); imeas++) {
                //if the rechit is associated to a valid detId  
                if(imeas->recHit()->geographicalId().rawId()){
                        vector<TrajectoryMeasurement> currentLayerMeas = getMeasurementTracker()->idToDet(imeas->recHit()->geographicalId().rawId())->fastMeasurements(imeas->updatedState(), imeas->updatedState(), *thePropagator, *(getEstimator()));
                        buildMultiRecHits(currentLayerMeas, result);
                } else {
                        result.push_back(*imeas);
                }
        }
        LogTrace("MultiRecHitCollector") << "Original Measurement size "  << meas.size() << " SimpleDAFHitCollector returned " << result.size() << " rechits";
        //results are sorted in the fitting direction
        return result;  
}

Member Data Documentation

Definition at line 40 of file SimpleDAFHitCollector.h.

Referenced by getEstimator().

Definition at line 42 of file SimpleDAFHitCollector.h.

Referenced by getPropagator().

Definition at line 39 of file SimpleDAFHitCollector.h.

Referenced by getUpdator().