CMS 3D CMS Logo

TIBRing.h

Go to the documentation of this file.
00001 #ifndef TkDetLayers_TIBRing_h
00002 #define TkDetLayers_TIBRing_h
00003 
00004 
00005 #include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
00006 #include "DataFormats/GeometrySurface/interface/BoundCylinder.h"
00007 #include "Utilities/BinningTools/interface/PeriodicBinFinderInPhi.h"
00008 
00012 class TIBRing : public GeometricSearchDetWithGroups{
00013  public:
00014   TIBRing(std::vector<const GeomDet*>& theGeomDets);
00015   ~TIBRing();
00016   
00017   // GeometricSearchDet interface
00018   virtual const BoundSurface& surface() const {return *theCylinder;}  
00019 
00020   virtual const std::vector<const GeomDet*>& basicComponents() const {return theDets;}
00021   
00022   virtual const std::vector<const GeometricSearchDet*>& components() const;
00023 
00024 
00025   virtual std::pair<bool, TrajectoryStateOnSurface>
00026   compatible( const TrajectoryStateOnSurface& ts, const Propagator&, 
00027               const MeasurementEstimator&) const;
00028 
00029   
00030   virtual void 
00031   groupedCompatibleDetsV( const TrajectoryStateOnSurface& startingState,
00032                           const Propagator& prop,
00033                           const MeasurementEstimator& est,
00034                           std::vector<DetGroup> & result) const;
00035 
00036  
00037   //--- Extension of the interface
00038   
00040   virtual const BoundCylinder& specificSurface() const {return *theCylinder;}
00041  
00042  private:
00043   //general private methods
00044 
00045   void checkPeriodicity(std::vector<const GeomDet*>::const_iterator first,
00046                         std::vector<const GeomDet*>::const_iterator last);
00047 
00048   void checkRadius(std::vector<const GeomDet*>::const_iterator first,
00049                    std::vector<const GeomDet*>::const_iterator last);
00050   
00051   void computeHelicity();
00052 
00053   // methods for groupedCompatibleDets implementation
00054   struct SubRingCrossings {
00055     SubRingCrossings():isValid_(false){};
00056     SubRingCrossings( int ci, int ni, float nd) : 
00057       isValid_(true),closestIndex(ci), nextIndex(ni), nextDistance(nd) {}
00058     
00059     bool  isValid_;
00060     int   closestIndex;
00061     int   nextIndex;
00062     float nextDistance;
00063   };
00064 
00065 
00066   void searchNeighbors( const TrajectoryStateOnSurface& tsos,
00067                         const Propagator& prop,
00068                         const MeasurementEstimator& est,
00069                         const SubRingCrossings& crossings,
00070                         float window, 
00071                         std::vector<DetGroup>& result) const;
00072 
00073   SubRingCrossings 
00074   computeCrossings( const TrajectoryStateOnSurface& startingState,
00075                     PropagationDirection propDir) const;
00076 
00077   float computeWindowSize( const GeomDet* det, 
00078                            const TrajectoryStateOnSurface& tsos, 
00079                            const MeasurementEstimator& est) const;
00080 
00081 
00082 
00083 
00084  private:
00085   typedef PeriodicBinFinderInPhi<double>   BinFinderType;
00086   BinFinderType    theBinFinder;
00087 
00088   std::vector<const GeomDet*> theDets;
00089   ReferenceCountingPointer<BoundCylinder>  theCylinder;
00090   int              theHelicity;    
00091 };
00092 
00093 
00094 #endif 

Generated on Tue Jun 9 17:45:46 2009 for CMSSW by  doxygen 1.5.4