CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

GeometricSearchDetMeasurements Class Reference

#include <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
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

Private Attributes

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

Definition at line 22 of file CompositeDetMeasurements.h.

Definition at line 24 of file GeometricSearchDetMeasurements.h.

Definition at line 26 of file GeometricSearchDetMeasurements.h.

Definition at line 24 of file CompositeDetMeasurements.h.

Definition at line 25 of file CompositeDetMeasurements.h.

Definition at line 27 of file GeometricSearchDetMeasurements.h.

Definition at line 25 of file GeometricSearchDetMeasurements.h.

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.

                                                                          :
    theDetSystem(detSysytem) {}
GeometricSearchDetMeasurements::GeometricSearchDetMeasurements ( const MeasurementDetSystem detSysytem) [inline]

Definition at line 29 of file GeometricSearchDetMeasurements.h.

                                                                          :
    theDetSystem(detSysytem) {}

Member Function Documentation

void GeometricSearchDetMeasurements::addInvalidMeas ( std::vector< TrajectoryMeasurement > &  result,
const TrajectoryStateOnSurface ts,
const GeomDet det 
) const [inline]
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

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(), query::result, python::multivaluedict::sort(), theDetSystem, and tmp.

Referenced by LayerMeasurements::measurements().

{
  std::vector<TrajectoryMeasurement> result;
  if (!compatDets.empty()) {
    for ( std::vector<DetWithState>::const_iterator i=compatDets.begin();
          i != compatDets.end(); i++) {
      const MeasurementDet* mdet = theDetSystem->idToDet(i->first->geographicalId());
      if (mdet == 0) {
        throw MeasurementDetException( "MeasurementDet not found");
      }

      std::vector<TM> tmp = mdet->fastMeasurements( i->second, ts, prop, est);
      if ( !tmp.empty()) {
        // only collect valid RecHits
        std::vector<TM>::iterator end = (tmp.back().recHit()->isValid() ? tmp.end() : tmp.end()-1);
        result.insert( result.end(), tmp.begin(), end);
      }
    }
    // sort the final result
    if ( result.size() > 1) {
      sort( result.begin(), result.end(), TrajMeasLessEstim());
    }

    /*
    if ( !result.empty()) {
      // invalidMeas on Det of most compatible hit
      addInvalidMeas( result, result.front().predictedState(), &result.front().recHit().det());
    }
    else {
      // invalid state on first compatible Det
      addInvalidMeas( result, compatDets.front().second, compatDets.front().first);
    }
    */

  }
  else {
    // this case should have been handled by the caller!
    throw MeasurementDetException("GeometricSearchDetMeasurements::get called with empty std::vector<DetWithState>");
  }
  return result;
}
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

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).


Member Data Documentation

Definition at line 119 of file CompositeDetMeasurements.h.

Referenced by get().