CMS 3D CMS Logo

GeometricSearchDetMeasurements Class Reference

Concrete implementation of the Det::measurements method for GeometricSearchDets. More...

#include <TrackingTools/MeasurementDet/interface/CompositeDetMeasurements.h>

List of all members.

Public Types

typedef
GeometricSearchDet::DetWithState 
DetWithState
typedef
GeometricSearchDet::DetWithState 
DetWithState
typedef TrajectoryMeasurement TM
typedef TrajectoryMeasurement TM
typedef TrajectoryMeasurementGroup TMG
typedef TrajectoryMeasurementGroup TMG
typedef TrajectoryStateOnSurface TSOS
typedef TrajectoryStateOnSurface TSOS

Public Member Functions

void addInvalidMeas (std::vector< TrajectoryMeasurement > &result, const TrajectoryStateOnSurface &ts, const GeomDet *det) const
 GeometricSearchDetMeasurements (const MeasurementDetSystem *detSysytem)
 GeometricSearchDetMeasurements (const MeasurementDetSystem *detSysytem)
template<class TrajectoryState>
std::vector
< TrajectoryMeasurement
get (const GeometricSearchDet &layer, const std::vector< DetWithState > &compatDets, const TrajectoryState &ts, const Propagator &prop, const MeasurementEstimator &est) const
 The std::vector<DetWithState> passed to this method should not be empty.
template<class TrajectoryState>
std::vector
< TrajectoryMeasurement
get (const GeometricSearchDet &det, const std::vector< DetWithState > &compatDets, const TrajectoryState &ts, const Propagator &prop, const MeasurementEstimator &est) const
 The std::vector<DetWithState> passed to this method should not be empty.

Private Attributes

const MeasurementDetSystemtheDetSystem
const MeasurementDetSystemtheDetSystem


Detailed Description

Concrete implementation of the Det::measurements method for GeometricSearchDets.

It is done in a separate class to facilitate it's reuse from the various GeometricSearchDets.

Definition at line 19 of file CompositeDetMeasurements.h.


Member Typedef Documentation

typedef GeometricSearchDet::DetWithState GeometricSearchDetMeasurements::DetWithState

Definition at line 24 of file GeometricSearchDetMeasurements.h.

typedef GeometricSearchDet::DetWithState GeometricSearchDetMeasurements::DetWithState

Definition at line 22 of file CompositeDetMeasurements.h.

typedef TrajectoryMeasurement GeometricSearchDetMeasurements::TM

Definition at line 26 of file GeometricSearchDetMeasurements.h.

typedef TrajectoryMeasurement GeometricSearchDetMeasurements::TM

Definition at line 24 of file CompositeDetMeasurements.h.

typedef TrajectoryMeasurementGroup GeometricSearchDetMeasurements::TMG

Definition at line 27 of file GeometricSearchDetMeasurements.h.

typedef TrajectoryMeasurementGroup GeometricSearchDetMeasurements::TMG

Definition at line 25 of file CompositeDetMeasurements.h.

typedef TrajectoryStateOnSurface GeometricSearchDetMeasurements::TSOS

Definition at line 25 of file GeometricSearchDetMeasurements.h.

typedef TrajectoryStateOnSurface GeometricSearchDetMeasurements::TSOS

Definition at line 23 of file CompositeDetMeasurements.h.


Constructor & Destructor Documentation

GeometricSearchDetMeasurements::GeometricSearchDetMeasurements ( const MeasurementDetSystem detSysytem  )  [inline]

Definition at line 27 of file CompositeDetMeasurements.h.

00027                                                                           :
00028     theDetSystem(detSysytem) {}

GeometricSearchDetMeasurements::GeometricSearchDetMeasurements ( const MeasurementDetSystem detSysytem  )  [inline]

Definition at line 29 of file GeometricSearchDetMeasurements.h.

00029                                                                           :
00030     theDetSystem(detSysytem) {}


Member Function Documentation

void GeometricSearchDetMeasurements::addInvalidMeas ( std::vector< TrajectoryMeasurement > &  result,
const TrajectoryStateOnSurface ts,
const GeomDet det 
) const [inline]

Definition at line 113 of file GeometricSearchDetMeasurements.h.

References InvalidTransientRecHit::build(), and TrackingRecHit::missing.

00114                                                                                      {
00115     result.push_back( TM( ts, InvalidTransientRecHit::build(det, TrackingRecHit::missing), 0.F,0));
00116   }

template<class TrajectoryState>
std::vector<TrajectoryMeasurement> GeometricSearchDetMeasurements::get ( const GeometricSearchDet layer,
const std::vector< DetWithState > &  compatDets,
const TrajectoryState &  ts,
const Propagator prop,
const MeasurementEstimator est 
) const [inline]

The std::vector<DetWithState> passed to this method should not be empty.

In case of no compatible dets the result should be either an empty container if the det is itself incompatible, or a container with one invalid measurement on the det surface. The method does not have enough information to do this efficiently, so it should be done by the caller, or an exception will be thrown (DetLogicError).

template<class TrajectoryState>
std::vector< TrajectoryMeasurement > GeometricSearchDetMeasurements::get ( const GeometricSearchDet det,
const std::vector< DetWithState > &  compatDets,
const TrajectoryState &  ts,
const Propagator prop,
const MeasurementEstimator est 
) const [inline]

The std::vector<DetWithState> passed to this method should not be empty.

In case of no compatible dets the result should be either an empty container if the det is itself incompatible, or a container with one invalid measurement on the det surface. The method does not have enough information to do this efficiently, so it should be done by the caller, or an exception will be thrown (DetLogicError).

Definition at line 126 of file CompositeDetMeasurements.h.

References end, MeasurementDet::fastMeasurements(), i, MeasurementDetSystem::idToDet(), HLT_VtxMuL3::result, python::multivaluedict::sort(), theDetSystem, and tmp.

Referenced by LayerMeasurements::measurements().

00131 {
00132   std::vector<TrajectoryMeasurement> result;
00133   if (!compatDets.empty()) {
00134     for ( std::vector<DetWithState>::const_iterator i=compatDets.begin();
00135           i != compatDets.end(); i++) {
00136       const MeasurementDet* mdet = theDetSystem->idToDet(i->first->geographicalId());
00137       if (mdet == 0) {
00138         throw MeasurementDetException( "MeasurementDet not found");
00139       }
00140 
00141       std::vector<TM> tmp = mdet->fastMeasurements( i->second, ts, prop, est);
00142       if ( !tmp.empty()) {
00143         // only collect valid RecHits
00144         std::vector<TM>::iterator end = (tmp.back().recHit()->isValid() ? tmp.end() : tmp.end()-1);
00145         result.insert( result.end(), tmp.begin(), end);
00146       }
00147     }
00148     // sort the final result
00149     if ( result.size() > 1) {
00150       sort( result.begin(), result.end(), TrajMeasLessEstim());
00151     }
00152 
00153     /*
00154     if ( !result.empty()) {
00155       // invalidMeas on Det of most compatible hit
00156       addInvalidMeas( result, result.front().predictedState(), &result.front().recHit().det());
00157     }
00158     else {
00159       // invalid state on first compatible Det
00160       addInvalidMeas( result, compatDets.front().second, compatDets.front().first);
00161     }
00162     */
00163 
00164   }
00165   else {
00166     // this case should have been handled by the caller!
00167     throw MeasurementDetException("GeometricSearchDetMeasurements::get called with empty std::vector<DetWithState>");
00168   }
00169   return result;
00170 }


Member Data Documentation

const MeasurementDetSystem* GeometricSearchDetMeasurements::theDetSystem [private]

Definition at line 121 of file GeometricSearchDetMeasurements.h.

const MeasurementDetSystem* GeometricSearchDetMeasurements::theDetSystem [private]

Definition at line 119 of file CompositeDetMeasurements.h.

Referenced by get().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:21:23 2009 for CMSSW by  doxygen 1.5.4