00001 #ifndef TkDetLayers_TOBLayer_h
00002 #define TkDetLayers_TOBLayer_h
00003
00004
00005 #include "TrackingTools/DetLayers/interface/RodBarrelLayer.h"
00006 #include "RecoTracker/TkDetLayers/interface/TOBRod.h"
00007 #include "Utilities/BinningTools/interface/PeriodicBinFinderInPhi.h"
00008 #include "RecoTracker/TkDetLayers/interface/SubLayerCrossings.h"
00009
00014 class TOBLayer : public RodBarrelLayer, public GeometricSearchDetWithGroups{
00015 public:
00016 typedef PeriodicBinFinderInPhi<double> BinFinderType;
00017
00018
00019 TOBLayer(std::vector<const TOBRod*>& innerRods,
00020 std::vector<const TOBRod*>& outerRods);
00021 ~TOBLayer();
00022
00023
00024
00025 virtual const std::vector<const GeomDet*>& basicComponents() const {return theBasicComps;}
00026
00027 virtual const std::vector<const GeometricSearchDet*>& components() const {return theComps;}
00028
00029 void groupedCompatibleDetsV( const TrajectoryStateOnSurface& tsos,
00030 const Propagator& prop,
00031 const MeasurementEstimator& est,
00032 std::vector<DetGroup> & result) const;
00033
00034
00035
00036 virtual SubDetector subDetector() const {return GeomDetEnumerators::TOB;}
00037
00038
00039 private:
00040
00041
00042 SubLayerCrossings computeCrossings( const TrajectoryStateOnSurface& tsos,
00043 PropagationDirection propDir) const;
00044
00045 bool addClosest( const TrajectoryStateOnSurface& tsos,
00046 const Propagator& prop,
00047 const MeasurementEstimator& est,
00048 const SubLayerCrossing& crossing,
00049 std::vector<DetGroup>& result) const;
00050
00051 float computeWindowSize( const GeomDet* det,
00052 const TrajectoryStateOnSurface& tsos,
00053 const MeasurementEstimator& est) const;
00054
00055 double calculatePhiWindow( double Xmax, const GeomDet& det,
00056 const TrajectoryStateOnSurface& state) const;
00057
00058 bool overlap( const GlobalPoint& gpos, const GeometricSearchDet& rod, float phiWin) const;
00059
00060
00061 void searchNeighbors( const TrajectoryStateOnSurface& tsos,
00062 const Propagator& prop,
00063 const MeasurementEstimator& est,
00064 const SubLayerCrossing& crossing,
00065 float window,
00066 std::vector<DetGroup>& result,
00067 bool checkClosest) const;
00068
00069 const std::vector<const GeometricSearchDet*>& subLayer( int ind) const {
00070 return (ind==0 ? theInnerComps : theOuterComps);}
00071
00072 BoundCylinder* cylinder( const std::vector<const GeometricSearchDet*>& rods) const ;
00073
00074
00075 private:
00076 std::vector<const GeometricSearchDet*> theComps;
00077 std::vector<const GeometricSearchDet*> theInnerComps;
00078 std::vector<const GeometricSearchDet*> theOuterComps;
00079 std::vector<const GeomDet*> theBasicComps;
00080
00081 BinFinderType theInnerBinFinder;
00082 BinFinderType theOuterBinFinder;
00083
00084 ReferenceCountingPointer<BoundCylinder> theInnerCylinder;
00085 ReferenceCountingPointer<BoundCylinder> theOuterCylinder;
00086
00087 };
00088
00089
00090 #endif