CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/TrackingTools/DetLayers/interface/GeometricSearchDet.h

Go to the documentation of this file.
00001 #ifndef DetLayers_GeometricSearchDet_h
00002 #define DetLayers_GeometricSearchDet_h
00003 
00004 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00005 #include "DataFormats/GeometrySurface/interface/BoundSurface.h"
00006 
00007 #include "TrackingTools/DetLayers/interface/DetGroup.h"
00008 #include "DataFormats/GeometrySurface/interface/Surface.h" 
00009 #include "TrackingTools/DetLayers/interface/GeomDetCompatibilityChecker.h"
00010 
00011 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00012 
00013 #include <vector>
00014 
00015 class MeasurementEstimator; 
00016 
00017 class GeometricSearchDet {
00018  public:
00019   typedef std::pair<const GeomDet*,TrajectoryStateOnSurface> DetWithState;
00020   typedef BoundSurface::PositionType        PositionType;
00021   typedef BoundSurface::RotationType        RotationType;
00022   typedef TrajectoryStateOnSurface          TrajectoryState;
00023   
00024   GeometricSearchDet() : theCompatibilityChecker(){};
00025   virtual ~GeometricSearchDet() {};
00026   
00028   virtual const BoundSurface& surface() const = 0;
00029   
00031   virtual const Surface::PositionType& position() const {return surface().position();}
00032 
00034   //virtual std::vector< const GeomDet*> basicComponents() const = 0;
00035 
00037   virtual const std::vector<const GeometricSearchDet*>& components() const = 0;
00038 
00039   /* Returns basic components. For the moment they are GeomDet, 
00040    * but they could become MeasurementDet
00041    */
00042   virtual const std::vector<const GeomDet*>& basicComponents() const = 0;
00043 
00044 
00053   virtual std::pair<bool, TrajectoryStateOnSurface>
00054   compatible( const TrajectoryStateOnSurface& ts, const Propagator&, 
00055               const MeasurementEstimator&) const=0;
00056 
00064   virtual std::vector<DetWithState> 
00065   compatibleDets( const TrajectoryStateOnSurface& startingState,
00066                   const Propagator& prop, 
00067                   const MeasurementEstimator& est) const;
00068   virtual void
00069   compatibleDetsV( const TrajectoryStateOnSurface& startingState,
00070                   const Propagator& prop, 
00071                    const MeasurementEstimator& est,
00072                    std::vector<DetWithState>& result) const; //=0;
00073 
00093   virtual std::vector<DetGroup> 
00094   groupedCompatibleDets( const TrajectoryStateOnSurface& startingState,
00095                          const Propagator& prop,
00096                          const MeasurementEstimator& est) const;
00097 
00098   virtual void
00099   groupedCompatibleDetsV( const TrajectoryStateOnSurface& startingState,
00100                          const Propagator& prop,
00101                          const MeasurementEstimator& est,
00102                           std::vector<DetGroup> & result) const; // = 0;
00103 
00104 
00105   virtual bool hasGroups() const = 0; 
00106 
00107  protected:
00108   GeomDetCompatibilityChecker theCompatibilityChecker;
00109  
00110 };
00111 
00112 
00113 class GeometricSearchDetWithGroups : public virtual GeometricSearchDet {
00114 public:
00115 typedef GeometricSearchDet::DetWithState DetWithState;
00116   
00117   void
00118   compatibleDetsV( const TrajectoryStateOnSurface& startingState,
00119                    const Propagator& prop, 
00120                    const MeasurementEstimator& est,
00121                    std::vector<DetWithState> & result) const;
00122 
00123   bool hasGroups() const {return true;}
00124   
00125 };
00126 
00127 #endif