00001 #ifndef RectangularEtaPhiTrackingRegion_H
00002 #define RectangularEtaPhiTrackingRegion_H
00003
00011 #include "RecoTracker/TkTrackingRegions/interface/TrackingRegionBase.h"
00012 #include "RecoTracker/TkTrackingRegions/interface/TkTrackingRegionsMargin.h"
00013
00014 #include "RecoTracker/TkTrackingRegions/interface/HitRZConstraint.h"
00015 #include "RecoTracker/TkTrackingRegions/interface/OuterHitPhiPrediction.h"
00016 #include "FWCore/Framework/interface/EventSetup.h"
00017 class OuterEstimator;
00018 class BarrelDetLayer;
00019 class ForwardDetLayer;
00020
00021 class RectangularEtaPhiTrackingRegion : public TrackingRegionBase {
00022 public:
00023
00024 typedef TkTrackingRegionsMargin<float> Margin;
00025
00027 RectangularEtaPhiTrackingRegion() { }
00028
00054 RectangularEtaPhiTrackingRegion( const GlobalVector & dir,
00055 const GlobalPoint & vertexPos,
00056 float ptMin, float rVertex, float zVertex,
00057 float deltaEta, float deltaPhi,
00058 float whereToUseMeasurementTracker = 0.,
00059 bool precise = true,
00060 const std::string & measurementTrackerName = "")
00061 : TrackingRegionBase( dir, vertexPos, Range( -1/ptMin, 1/ptMin),
00062 rVertex, zVertex),
00063 thePhiMargin( Margin( fabs(deltaPhi),fabs(deltaPhi))),
00064 theMeasurementTrackerUsage(whereToUseMeasurementTracker), thePrecise(precise), theMeasurementTrackerName(measurementTrackerName)
00065 { initEtaRange(dir, Margin( fabs(deltaEta),fabs(deltaEta))); }
00066
00073 RectangularEtaPhiTrackingRegion( const GlobalVector & dir,
00074 const GlobalPoint & vertexPos,
00075 float ptMin, float rVertex, float zVertex,
00076 Margin etaMargin,
00077 Margin phiMargin,
00078 float whereToUseMeasurementTracker = 0., bool precise = true,
00079 const std::string & measurementTrackerName = "")
00080 : TrackingRegionBase( dir, vertexPos, Range( -1/ptMin, 1/ptMin),
00081 rVertex, zVertex), thePhiMargin( phiMargin), theMeasurementTrackerUsage(whereToUseMeasurementTracker), thePrecise(precise),
00082 theMeasurementTrackerName(measurementTrackerName)
00083 { initEtaRange(dir, etaMargin); }
00084
00089 RectangularEtaPhiTrackingRegion( const GlobalVector & dir,
00090 const GlobalPoint & vertexPos,
00091 Range invPtRange,
00092 float rVertex, float zVertex,
00093 Margin etaMargin,
00094 Margin phiMargin,
00095 float whereToUseMeasurementTracker = 0.,
00096 bool precise = true,
00097 const std::string & measurementTrackerName = "")
00098 : TrackingRegionBase( dir, vertexPos, invPtRange, rVertex, zVertex),
00099 thePhiMargin( phiMargin), theMeasurementTrackerUsage(whereToUseMeasurementTracker), thePrecise(precise),
00100 theMeasurementTrackerName(measurementTrackerName)
00101 { initEtaRange(dir, etaMargin); }
00102
00103
00105 const Range & etaRange() const { return theEtaRange; }
00106
00109 const Margin & phiMargin() const { return thePhiMargin; }
00110
00112 bool isPrecise() const { return thePrecise; }
00113
00114 virtual TrackingRegion::Hits hits(
00115 const edm::Event& ev,
00116 const edm::EventSetup& es,
00117 const ctfseeding::SeedingLayer* layer) const;
00118
00119 virtual HitRZCompatibility* checkRZ(
00120 const DetLayer* layer,
00121 const Hit & outerHit,
00122 const edm::EventSetup& iSetup) const { return checkRZOld(layer,outerHit->hit(),iSetup); }
00123
00124 virtual RectangularEtaPhiTrackingRegion* clone() const {
00125 return new RectangularEtaPhiTrackingRegion(*this);
00126 }
00127
00128 virtual std::string name() const { return "RectangularEtaPhiTrackingRegion"; }
00129 virtual std::string print() const;
00130
00131 private:
00132 HitRZCompatibility* checkRZOld(
00133 const DetLayer* layer,
00134 const TrackingRecHit* outerHit,
00135 const edm::EventSetup& iSetup) const;
00136
00137 OuterEstimator * estimator(const BarrelDetLayer* layer,const edm::EventSetup& iSetup) const;
00138 OuterEstimator * estimator(const ForwardDetLayer* layer,const edm::EventSetup& iSetup) const;
00139
00140 OuterHitPhiPrediction phiWindow(const edm::EventSetup& iSetup) const;
00141 HitRZConstraint rzConstraint() const;
00142
00143 void initEtaRange( const GlobalVector & dir, const Margin& margin);
00144
00145 private:
00146
00147 Range theEtaRange;
00148 Margin thePhiMargin;
00149 double theMeasurementTrackerUsage;
00150 bool thePrecise;
00151 std::string theMeasurementTrackerName;
00152
00153 };
00154
00155 #endif