CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RectangularEtaPhiTrackingRegion.h
Go to the documentation of this file.
1 #ifndef RectangularEtaPhiTrackingRegion_H
2 #define RectangularEtaPhiTrackingRegion_H
3 
13 //#include "CommonDet/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h"
16 
17 
20 
21 
22 
24 class OuterEstimator;
25 class BarrelDetLayer;
26 class ForwardDetLayer;
28 
30 public:
31  enum class UseMeasurementTracker {
32  kNever = -1,
33  kForSiStrips = 0,
34  kAlways = 1
35  };
36 
38  assert(value >= -1 && value <= 1);
39  return static_cast<UseMeasurementTracker>(value);
40  }
41 
43  // mimic the old behaviour
44  if(value > 0.5) return UseMeasurementTracker::kAlways;
45  if(value > -0.5) return UseMeasurementTracker::kForSiStrips;
47  }
48 
50 
52  TrackingRegion(rh),
61 
65 
67 
94  const GlobalPoint & vertexPos,
95  float ptMin, float rVertex, float zVertex,
96  float deltaEta, float deltaPhi,
98  bool precise = true,
100  bool etaPhiRegion=false)
101  : RectangularEtaPhiTrackingRegion(dir, vertexPos, Range( -1/ptMin, 1/ptMin), rVertex, zVertex,
102  Margin(std::abs(deltaEta), std::abs(deltaEta)),
103  Margin(std::abs(deltaPhi), std::abs(deltaPhi)),
105  measurementTracker, etaPhiRegion)
106  {}
107 
115  const GlobalPoint & vertexPos,
116  float ptMin, float rVertex, float zVertex,
117  Margin etaMargin,
120  bool precise = true,
122  bool etaPhiRegion=false)
123  : RectangularEtaPhiTrackingRegion(dir, vertexPos, Range( -1/ptMin, 1/ptMin), rVertex, zVertex,
124  etaMargin, phiMargin,
126  measurementTracker, etaPhiRegion)
127  {}
128 
134  const GlobalPoint & vertexPos,
135  Range invPtRange,
136  float rVertex, float zVertex,
137  Margin etaMargin,
140  bool precise = true,
142  bool etaPhiRegion=false)
143  : TrackingRegionBase( dir, vertexPos, invPtRange, rVertex, zVertex),
146  { initEtaRange(dir, etaMargin); }
147 
148 
150  const Range & etaRange() const { return theEtaRange; }
151 
154  const Margin & phiMargin() const { return thePhiMargin; }
155 
157  bool isPrecise() const { return thePrecise; }
158 
159  virtual TrackingRegion::Hits hits(
160  const edm::Event& ev,
161  const edm::EventSetup& es,
162  const SeedingLayerSetsHits::SeedingLayer& layer) const override;
163 
164  virtual HitRZCompatibility * checkRZ(const DetLayer* layer,
165  const Hit & outerHit,
166  const edm::EventSetup& iSetup,
167  const DetLayer* outerlayer=0,
168  float lr=0, float gz=0, float dr=0, float dz=0) const
169  { return checkRZOld(layer,outerHit->hit(),iSetup); }
170 
172  return new RectangularEtaPhiTrackingRegion(*this);
173  }
174 
175  virtual std::string name() const { return "RectangularEtaPhiTrackingRegion"; }
176  virtual std::string print() const;
177 
178 private:
180  const DetLayer* layer,
181  const TrackingRecHit* outerHit,
182  const edm::EventSetup& iSetup) const;
183 
184  std::unique_ptr<OuterEstimator> estimator(const BarrelDetLayer* layer,const edm::EventSetup& iSetup) const dso_internal;
185  std::unique_ptr<OuterEstimator> estimator(const ForwardDetLayer* layer,const edm::EventSetup& iSetup) const dso_internal;
186 
189 
191 
192 private:
193 
202 
203 
204 
206  using cacheHits=std::vector<cacheHitPointer>;
207 
208 
209 
210  /* wait... think!
211  * done? questions? think again, look where this region is constructed
212  * still question? study tracker code for the next couple of weeks, then we may discuss.
213  */
214  mutable cacheHits cache;
215 
216 };
217 
218 #endif
#define GCC11_FINAL
std::unique_ptr< OuterEstimator > estimator(const BarrelDetLayer *layer, const edm::EventSetup &iSetup) const
RectangularEtaPhiTrackingRegion & operator=(RectangularEtaPhiTrackingRegion const &)=delete
virtual HitRZCompatibility * checkRZ(const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup, const DetLayer *outerlayer=0, float lr=0, float gz=0, float dr=0, float dz=0) const
assert(m_qm.get())
const UseMeasurementTracker theMeasurementTrackerUsage
bool ev
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
HitRZCompatibility * checkRZOld(const DetLayer *layer, const TrackingRecHit *outerHit, const edm::EventSetup &iSetup) const
const MeasurementTrackerEvent * theMeasurementTracker
void initEtaRange(const GlobalVector &dir, const Margin &margin)
virtual RectangularEtaPhiTrackingRegion * clone() const
virtual TrackingRegion::Hits hits(const edm::Event &ev, const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayer &layer) const override
get hits from layer compatible with region constraints
Double_t margin
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define private
Definition: FWEveView.cc:22
OuterHitPhiPrediction phiWindow(const edm::EventSetup &iSetup) const
static UseMeasurementTracker doubleToUseMeasurementTracker(double value)
SeedingLayerSetsHits::Hits Hits
float ptMin() const
minimal pt of interest
string const
Definition: compareJSON.py:14
#define dso_internal
RectangularEtaPhiTrackingRegion(const GlobalVector &dir, const GlobalPoint &vertexPos, float ptMin, float rVertex, float zVertex, Margin etaMargin, Margin phiMargin, UseMeasurementTracker whereToUseMeasurementTracker=UseMeasurementTracker::kNever, bool precise=true, const MeasurementTrackerEvent *measurementTracker=0, bool etaPhiRegion=false)
RectangularEtaPhiTrackingRegion(const GlobalVector &dir, const GlobalPoint &vertexPos, float ptMin, float rVertex, float zVertex, float deltaEta, float deltaPhi, UseMeasurementTracker whereToUseMeasurementTracker=UseMeasurementTracker::kNever, bool precise=true, const MeasurementTrackerEvent *measurementTracker=0, bool etaPhiRegion=false)
RectangularEtaPhiTrackingRegion(const GlobalVector &dir, const GlobalPoint &vertexPos, Range invPtRange, float rVertex, float zVertex, Margin etaMargin, Margin phiMargin, UseMeasurementTracker whereToUseMeasurementTracker=UseMeasurementTracker::kNever, bool precise=true, const MeasurementTrackerEvent *measurementTracker=0, bool etaPhiRegion=false)
Range invPtRange() const
inverse pt range
RectangularEtaPhiTrackingRegion(RectangularEtaPhiTrackingRegion const &rh)
bool isPrecise() const
is precise error calculation switched on
static UseMeasurementTracker intToUseMeasurementTracker(int value)
dbl *** dir
Definition: mlp_gen.cc:35
TkTrackingRegionsMargin< float > Margin
const Range & etaRange() const
allowed eta range [eta_min, eta_max] interval