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 #pragma GCC visibility push(hidden)
00013 class TIBRing GCC11_FINAL : public GeometricSearchDetWithGroups{
00014 public:
00015 TIBRing(std::vector<const GeomDet*>& theGeomDets);
00016 ~TIBRing();
00017
00018
00019 virtual const BoundSurface& surface() const {return *theCylinder;}
00020
00021 virtual const std::vector<const GeomDet*>& basicComponents() const {return theDets;}
00022
00023 virtual const std::vector<const GeometricSearchDet*>& components() const;
00024
00025
00026 virtual std::pair<bool, TrajectoryStateOnSurface>
00027 compatible( const TrajectoryStateOnSurface& ts, const Propagator&,
00028 const MeasurementEstimator&) const;
00029
00030
00031 virtual void
00032 groupedCompatibleDetsV( const TrajectoryStateOnSurface& startingState,
00033 const Propagator& prop,
00034 const MeasurementEstimator& est,
00035 std::vector<DetGroup> & result) const;
00036
00037
00038
00039
00041 virtual const BoundCylinder& specificSurface() const {return *theCylinder;}
00042
00043 private:
00044
00045
00046 void checkPeriodicity(std::vector<const GeomDet*>::const_iterator first,
00047 std::vector<const GeomDet*>::const_iterator last);
00048
00049 void checkRadius(std::vector<const GeomDet*>::const_iterator first,
00050 std::vector<const GeomDet*>::const_iterator last);
00051
00052 void computeHelicity();
00053
00054
00055 struct SubRingCrossings {
00056 SubRingCrossings():isValid_(false){};
00057 SubRingCrossings( int ci, int ni, float nd) :
00058 isValid_(true),closestIndex(ci), nextIndex(ni), nextDistance(nd) {}
00059
00060 bool isValid_;
00061 int closestIndex;
00062 int nextIndex;
00063 float nextDistance;
00064 };
00065
00066
00067 void searchNeighbors( const TrajectoryStateOnSurface& tsos,
00068 const Propagator& prop,
00069 const MeasurementEstimator& est,
00070 const SubRingCrossings& crossings,
00071 float window,
00072 std::vector<DetGroup>& result) const;
00073
00074 SubRingCrossings
00075 computeCrossings( const TrajectoryStateOnSurface& startingState,
00076 PropagationDirection propDir) const;
00077
00078 float computeWindowSize( const GeomDet* det,
00079 const TrajectoryStateOnSurface& tsos,
00080 const MeasurementEstimator& est) const;
00081
00082
00083
00084
00085 private:
00086 typedef PeriodicBinFinderInPhi<double> BinFinderType;
00087 BinFinderType theBinFinder;
00088
00089 std::vector<const GeomDet*> theDets;
00090 ReferenceCountingPointer<BoundCylinder> theCylinder;
00091 int theHelicity;
00092 };
00093
00094
00095 #pragma GCC visibility pop
00096 #endif