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 bool etaPhiRegion=false)
00062 : TrackingRegionBase( dir, vertexPos, Range( -1/ptMin, 1/ptMin),
00063 rVertex, zVertex),
00064 thePhiMargin( Margin( fabs(deltaPhi),fabs(deltaPhi))),
00065 theMeasurementTrackerUsage(whereToUseMeasurementTracker), thePrecise(precise), theMeasurementTrackerName(measurementTrackerName),
00066 theUseEtaPhi(etaPhiRegion)
00067 { initEtaRange(dir, Margin( fabs(deltaEta),fabs(deltaEta))); }
00068
00075 RectangularEtaPhiTrackingRegion( const GlobalVector & dir,
00076 const GlobalPoint & vertexPos,
00077 float ptMin, float rVertex, float zVertex,
00078 Margin etaMargin,
00079 Margin phiMargin,
00080 float whereToUseMeasurementTracker = 0.,
00081 bool precise = true,
00082 const std::string & measurementTrackerName = "",
00083 bool etaPhiRegion=false)
00084 : TrackingRegionBase( dir, vertexPos, Range( -1/ptMin, 1/ptMin),
00085 rVertex, zVertex), thePhiMargin( phiMargin), theMeasurementTrackerUsage(whereToUseMeasurementTracker), thePrecise(precise),
00086 theMeasurementTrackerName(measurementTrackerName),
00087 theUseEtaPhi(etaPhiRegion)
00088 { initEtaRange(dir, etaMargin); }
00089
00094 RectangularEtaPhiTrackingRegion( const GlobalVector & dir,
00095 const GlobalPoint & vertexPos,
00096 Range invPtRange,
00097 float rVertex, float zVertex,
00098 Margin etaMargin,
00099 Margin phiMargin,
00100 float whereToUseMeasurementTracker = 0.,
00101 bool precise = true,
00102 const std::string & measurementTrackerName = "",
00103 bool etaPhiRegion=false)
00104 : TrackingRegionBase( dir, vertexPos, invPtRange, rVertex, zVertex),
00105 thePhiMargin( phiMargin), theMeasurementTrackerUsage(whereToUseMeasurementTracker), thePrecise(precise),
00106 theMeasurementTrackerName(measurementTrackerName),
00107 theUseEtaPhi(etaPhiRegion)
00108 { initEtaRange(dir, etaMargin); }
00109
00110
00112 const Range & etaRange() const { return theEtaRange; }
00113
00116 const Margin & phiMargin() const { return thePhiMargin; }
00117
00119 bool isPrecise() const { return thePrecise; }
00120
00121 virtual TrackingRegion::Hits hits(
00122 const edm::Event& ev,
00123 const edm::EventSetup& es,
00124 const ctfseeding::SeedingLayer* layer) const;
00125
00126 virtual HitRZCompatibility* checkRZ(
00127 const DetLayer* layer,
00128 const Hit & outerHit,
00129 const edm::EventSetup& iSetup) const { return checkRZOld(layer,outerHit->hit(),iSetup); }
00130
00131 virtual RectangularEtaPhiTrackingRegion* clone() const {
00132 return new RectangularEtaPhiTrackingRegion(*this);
00133 }
00134
00135 virtual std::string name() const { return "RectangularEtaPhiTrackingRegion"; }
00136 virtual std::string print() const;
00137
00138 private:
00139 HitRZCompatibility* checkRZOld(
00140 const DetLayer* layer,
00141 const TrackingRecHit* outerHit,
00142 const edm::EventSetup& iSetup) const;
00143
00144 OuterEstimator * estimator(const BarrelDetLayer* layer,const edm::EventSetup& iSetup) const;
00145 OuterEstimator * estimator(const ForwardDetLayer* layer,const edm::EventSetup& iSetup) const;
00146
00147 OuterHitPhiPrediction phiWindow(const edm::EventSetup& iSetup) const;
00148 HitRZConstraint rzConstraint() const;
00149
00150 void initEtaRange( const GlobalVector & dir, const Margin& margin);
00151
00152 private:
00153
00154 Range theEtaRange;
00155 Margin thePhiMargin;
00156 double theMeasurementTrackerUsage;
00157 bool thePrecise;
00158 std::string theMeasurementTrackerName;
00159 bool theUseEtaPhi;
00160 };
00161
00162 #endif