CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
GeometricSearchDetMeasurements Class Reference

#include <CompositeDetMeasurements.h>

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 &det, const std::vector< DetWithState > &compatDets, const TrajectoryState &ts, const Propagator &prop, const MeasurementEstimator &est) const
 
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
 

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 24 of file CompositeDetMeasurements.h.

Definition at line 26 of file GeometricSearchDetMeasurements.h.

Definition at line 25 of file CompositeDetMeasurements.h.

Definition at line 27 of file GeometricSearchDetMeasurements.h.

Definition at line 23 of file CompositeDetMeasurements.h.

Definition at line 25 of file GeometricSearchDetMeasurements.h.

Constructor & Destructor Documentation

GeometricSearchDetMeasurements::GeometricSearchDetMeasurements ( const MeasurementDetSystem detSysytem)
inline

Definition at line 27 of file CompositeDetMeasurements.h.

27  :
28  theDetSystem(detSysytem) {}
const MeasurementDetSystem * theDetSystem
GeometricSearchDetMeasurements::GeometricSearchDetMeasurements ( const MeasurementDetSystem detSysytem)
inline

Definition at line 29 of file GeometricSearchDetMeasurements.h.

29  :
30  theDetSystem(detSysytem) {}
const MeasurementDetSystem * theDetSystem

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(), F(), and TrackingRecHit::missing.

114  {
115  result.push_back( TM( ts, InvalidTransientRecHit::build(det, TrackingRecHit::missing), 0.F,0));
116  }
static RecHitPointer build(const GeomDet *geom, Type type=TrackingRecHit::missing, const DetLayer *layer=0)
tuple result
Definition: query.py:137
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
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 Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), and LayerMeasurements::measurements().

131 {
132  std::vector<TrajectoryMeasurement> result;
133  if (!compatDets.empty()) {
134  for ( std::vector<DetWithState>::const_iterator i=compatDets.begin();
135  i != compatDets.end(); i++) {
136  const MeasurementDet* mdet = theDetSystem->idToDet(i->first->geographicalId());
137  if (mdet == 0) {
138  throw MeasurementDetException( "MeasurementDet not found");
139  }
140 
141  std::vector<TM> tmp = mdet->fastMeasurements( i->second, ts, prop, est);
142  if ( !tmp.empty()) {
143  // only collect valid RecHits
144  std::vector<TM>::iterator end = (tmp.back().recHit()->isValid() ? tmp.end() : tmp.end()-1);
145  result.insert( result.end(), tmp.begin(), end);
146  }
147  }
148  // sort the final result
149  if ( result.size() > 1) {
150  sort( result.begin(), result.end(), TrajMeasLessEstim());
151  }
152 
153  /*
154  if ( !result.empty()) {
155  // invalidMeas on Det of most compatible hit
156  addInvalidMeas( result, result.front().predictedState(), &result.front().recHit().det());
157  }
158  else {
159  // invalid state on first compatible Det
160  addInvalidMeas( result, compatDets.front().second, compatDets.front().first);
161  }
162  */
163 
164  }
165  else {
166  // this case should have been handled by the caller!
167  throw MeasurementDetException("GeometricSearchDetMeasurements::get called with empty std::vector<DetWithState>");
168  }
169  return result;
170 }
int i
Definition: DBlmapReader.cc:9
const MeasurementDetSystem * theDetSystem
tuple result
Definition: query.py:137
virtual std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &startingState, const Propagator &, const MeasurementEstimator &) const =0
#define end
Definition: vmac.h:38
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
virtual const MeasurementDet * idToDet(const DetId &id) const =0
Return the pointer to the MeasurementDet corresponding to a given DetId.
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).

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

Member Data Documentation

const MeasurementDetSystem * GeometricSearchDetMeasurements::theDetSystem
private

Definition at line 119 of file CompositeDetMeasurements.h.

Referenced by get().