00001 #ifndef TkDetLayers_PixelBlade_h
00002 #define TkDetLayers_PixelBlade_h
00003
00004 #include "RecoTracker/TkDetLayers/interface/BoundDiskSector.h"
00005 #include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
00006
00007 #include "TrackingTools/DetLayers/interface/PeriodicBinFinderInZ.h"
00008 #include "RecoTracker/TkDetLayers/interface/SubLayerCrossings.h"
00009
00010
00014 class PixelBlade : public GeometricSearchDetWithGroups {
00015 public:
00016
00017 PixelBlade(std::vector<const GeomDet*>& frontDets,
00018 std::vector<const GeomDet*>& backDets );
00019
00020 ~PixelBlade(){};
00021
00022
00023 virtual const BoundSurface& surface() const {return *theDiskSector;}
00024
00025 virtual const std::vector<const GeomDet*>& basicComponents() const {return theDets;}
00026
00027 virtual const std::vector<const GeometricSearchDet*>& components() const;
00028
00029 std::pair<bool, TrajectoryStateOnSurface>
00030 compatible( const TrajectoryStateOnSurface& ts, const Propagator&,
00031 const MeasurementEstimator&) const;
00032
00033 virtual void
00034 groupedCompatibleDetsV( const TrajectoryStateOnSurface& tsos,
00035 const Propagator& prop,
00036 const MeasurementEstimator& est,
00037 std::vector<DetGroup> & result) const;
00038
00039
00040 virtual const BoundDiskSector& specificSurface() const {return *theDiskSector;}
00041
00042 private:
00043
00044
00045 SubLayerCrossings computeCrossings( const TrajectoryStateOnSurface& tsos,
00046 PropagationDirection propDir) const;
00047
00048 bool addClosest( const TrajectoryStateOnSurface& tsos,
00049 const Propagator& prop,
00050 const MeasurementEstimator& est,
00051 const SubLayerCrossing& crossing,
00052 std::vector<DetGroup>& result) const;
00053
00054 float computeWindowSize( const GeomDet* det,
00055 const TrajectoryStateOnSurface& tsos,
00056 const MeasurementEstimator& est) const;
00057
00058
00059 void searchNeighbors( const TrajectoryStateOnSurface& tsos,
00060 const Propagator& prop,
00061 const MeasurementEstimator& est,
00062 const SubLayerCrossing& crossing,
00063 float window,
00064 std::vector<DetGroup>& result,
00065 bool checkClosest) const;
00066
00067 bool overlap( const GlobalPoint& gpos, const GeomDet& det, float phiWin) const;
00068
00069
00070
00071
00072 int findBin( float R,int layer) const;
00073
00074 GlobalPoint findPosition(int index,int diskSectorIndex) const ;
00075
00076 const std::vector<const GeomDet*>& subBlade( int ind) const {
00077 return (ind==0 ? theFrontDets : theBackDets);
00078 }
00079
00080
00081
00082 private:
00083 std::vector<const GeomDet*> theDets;
00084 std::vector<const GeomDet*> theFrontDets;
00085 std::vector<const GeomDet*> theBackDets;
00086
00087 ReferenceCountingPointer<BoundDiskSector> theDiskSector;
00088 ReferenceCountingPointer<BoundDiskSector> theFrontDiskSector;
00089 ReferenceCountingPointer<BoundDiskSector> theBackDiskSector;
00090 };
00091
00092
00093 #endif