CMS 3D CMS Logo

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 
19 
21 class BarrelDetLayer;
22 class ForwardDetLayer;
24 
26 public:
27  enum class UseMeasurementTracker { kNever = -1, kForSiStrips = 0, kAlways = 1 };
28 
30  assert(value >= -1 && value <= 1);
31  return static_cast<UseMeasurementTracker>(value);
32  }
33 
35  // mimic the old behaviour
36  if (value > 0.5)
38  if (value > -0.5)
41  }
42 
44 
46  : TrackingRegion(rh),
55 
59 
61 
88  const GlobalPoint& vertexPos,
89  float ptMin,
90  float rVertex,
91  float zVertex,
92  float deltaEta,
93  float deltaPhi,
95  bool precise = true,
97  bool etaPhiRegion = false)
99  vertexPos,
100  Range(-1 / ptMin, 1 / ptMin),
101  rVertex,
102  zVertex,
106  precise,
108  etaPhiRegion) {}
109 
117  const GlobalPoint& vertexPos,
118  float ptMin,
119  float rVertex,
120  float zVertex,
121  Margin etaMargin,
124  bool precise = true,
126  bool etaPhiRegion = false)
128  vertexPos,
129  Range(-1 / ptMin, 1 / ptMin),
130  rVertex,
131  zVertex,
132  etaMargin,
133  phiMargin,
135  precise,
137  etaPhiRegion) {}
138 
144  const GlobalPoint& vertexPos,
146  float rVertex,
147  float zVertex,
148  Margin etaMargin,
151  bool precise = true,
153  bool etaPhiRegion = false,
154  bool useMS = true)
159  theUseMS(useMS),
160  theUseEtaPhi(etaPhiRegion),
162  initEtaRange(dir, etaMargin);
163  }
164 
166  const Range& etaRange() const { return theEtaRange; }
167  const Range& tanLambdaRange() const { return theLambdaRange; }
168 
171  const Margin& phiMargin() const { return thePhiMargin; }
172 
174  bool isPrecise() const { return thePrecise; }
175 
176  TrackingRegion::Hits hits(const edm::EventSetup& es, const SeedingLayerSetsHits::SeedingLayer& layer) const override;
177 
178  std::unique_ptr<HitRZCompatibility> checkRZ(const DetLayer* layer,
179  const Hit& outerHit,
180  const edm::EventSetup& iSetup,
181  const DetLayer* outerlayer = nullptr,
182  float lr = 0,
183  float gz = 0,
184  float dr = 0,
185  float dz = 0) const override {
186  return checkRZOld(layer, outerHit, iSetup, outerlayer);
187  }
188 
189  std::unique_ptr<TrackingRegion> clone() const override {
190  return std::make_unique<RectangularEtaPhiTrackingRegion>(*this);
191  }
192 
193  std::string name() const override { return "RectangularEtaPhiTrackingRegion"; }
194  std::string print() const override;
195 
196 private:
197  std::unique_ptr<HitRZCompatibility> checkRZOld(const DetLayer* layer,
198  const Hit& outerHit,
199  const edm::EventSetup& iSetup,
200  const DetLayer* outerlayer) const;
201 
202  std::unique_ptr<MeasurementEstimator> estimator(const BarrelDetLayer* layer,
203  const edm::EventSetup& iSetup) const dso_internal;
204  std::unique_ptr<MeasurementEstimator> estimator(const ForwardDetLayer* layer,
205  const edm::EventSetup& iSetup) const dso_internal;
206 
209 
211 
212 private:
214  Range theLambdaRange; // this is actually tanLambda
219  bool theUseMS = false;
222 
224  using cacheHits = std::vector<cacheHitPointer>;
225 
226  /* wait... think!
227  * done? questions? think again, look where this region is constructed
228  * still question? study tracker code for the next couple of weeks, then we may discuss.
229  */
230  mutable cacheHits cache;
231 };
232 
233 #endif
Vector3DBase
Definition: Vector3DBase.h:8
Hit
Definition: SiPixelLorentzAngle.h:57
RectangularEtaPhiTrackingRegion::theLambdaRange
Range theLambdaRange
Definition: RectangularEtaPhiTrackingRegion.h:214
TrackingRegion::invPtRange
Range invPtRange() const
inverse pt range
Definition: TrackingRegion.h:83
RectangularEtaPhiTrackingRegion::theMeanLambda
float theMeanLambda
Definition: RectangularEtaPhiTrackingRegion.h:216
RectangularEtaPhiTrackingRegion::cacheHits
std::vector< cacheHitPointer > cacheHits
Definition: RectangularEtaPhiTrackingRegion.h:224
TkTrackingRegionsMargin.h
RectangularEtaPhiTrackingRegion
Definition: RectangularEtaPhiTrackingRegion.h:25
RectangularEtaPhiTrackingRegion::theUseEtaPhi
bool theUseEtaPhi
Definition: RectangularEtaPhiTrackingRegion.h:220
funct::false
false
Definition: Factorize.h:34
RectangularEtaPhiTrackingRegion::theEtaRange
Range theEtaRange
Definition: RectangularEtaPhiTrackingRegion.h:213
hltPixelTracks_cff.precise
precise
Definition: hltPixelTracks_cff.py:32
HLTSiStripMonitoring_cff.measurementTracker
measurementTracker
Definition: HLTSiStripMonitoring_cff.py:178
DetLayer
Definition: DetLayer.h:21
RectangularEtaPhiTrackingRegion::theMeasurementTrackerUsage
const UseMeasurementTracker theMeasurementTrackerUsage
Definition: RectangularEtaPhiTrackingRegion.h:217
HitRZConstraint.h
HLT_FULL_cff.rVertex
rVertex
Definition: HLT_FULL_cff.py:109727
cms::cuda::assert
assert(be >=bs)
mayown_ptr
Definition: mayown_ptr.h:13
RectangularEtaPhiTrackingRegion::etaRange
const Range & etaRange() const
allowed eta range [eta_min, eta_max] interval
Definition: RectangularEtaPhiTrackingRegion.h:166
RectangularEtaPhiTrackingRegion::operator=
RectangularEtaPhiTrackingRegion & operator=(RectangularEtaPhiTrackingRegion const &)=delete
RectangularEtaPhiTrackingRegion::phiMargin
const Margin & phiMargin() const
Definition: RectangularEtaPhiTrackingRegion.h:171
RectangularEtaPhiTrackingRegion::estimator
std::unique_ptr< MeasurementEstimator > estimator(const BarrelDetLayer *layer, const edm::EventSetup &iSetup) const
Definition: RectangularEtaPhiTrackingRegion.cc:140
watchdog.const
const
Definition: watchdog.py:83
RectangularEtaPhiTrackingRegion::hits
TrackingRegion::Hits hits(const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayer &layer) const override
get hits from layer compatible with region constraints
Definition: RectangularEtaPhiTrackingRegion.cc:283
HLT_FULL_cff.zVertex
zVertex
Definition: HLT_FULL_cff.py:109725
RectangularEtaPhiTrackingRegion::print
std::string print() const override
Definition: RectangularEtaPhiTrackingRegion.cc:396
RectangularEtaPhiTrackingRegion::initEtaRange
void initEtaRange(const GlobalVector &dir, const Margin &margin)
Definition: RectangularEtaPhiTrackingRegion.cc:64
RectangularEtaPhiTrackingRegion::intToUseMeasurementTracker
static UseMeasurementTracker intToUseMeasurementTracker(int value)
Definition: RectangularEtaPhiTrackingRegion.h:29
RectangularEtaPhiTrackingRegion::doubleToUseMeasurementTracker
static UseMeasurementTracker doubleToUseMeasurementTracker(double value)
Definition: RectangularEtaPhiTrackingRegion.h:34
spr::deltaEta
static const double deltaEta
Definition: CaloConstants.h:8
TrackingRegion::Hits
SeedingLayerSetsHits::Hits Hits
Definition: TrackingRegion.h:44
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
BaseTrackerRecHit
Definition: BaseTrackerRecHit.h:15
HitRZConstraint
Definition: HitRZConstraint.h:8
TrackingRegion::ptMin
float ptMin() const
minimal pt of interest
Definition: TrackingRegion.h:80
Point3DBase< float, GlobalTag >
RectangularEtaPhiTrackingRegion::clone
std::unique_ptr< TrackingRegion > clone() const override
Definition: RectangularEtaPhiTrackingRegion.h:189
RectangularEtaPhiTrackingRegion::theUseMS
bool theUseMS
Definition: RectangularEtaPhiTrackingRegion.h:219
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RectangularEtaPhiTrackingRegion::thePrecise
bool thePrecise
Definition: RectangularEtaPhiTrackingRegion.h:218
RectangularEtaPhiTrackingRegion::UseMeasurementTracker::kForSiStrips
RectangularEtaPhiTrackingRegion::RectangularEtaPhiTrackingRegion
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=nullptr, bool etaPhiRegion=false, bool useMS=true)
Definition: RectangularEtaPhiTrackingRegion.h:143
OuterHitPhiPrediction
Definition: OuterHitPhiPrediction.h:12
RectangularEtaPhiTrackingRegion::theMeasurementTracker
const MeasurementTrackerEvent * theMeasurementTracker
Definition: RectangularEtaPhiTrackingRegion.h:221
PixelRecoRange< float >
RectangularEtaPhiTrackingRegion::UseMeasurementTracker::kNever
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:15
dso_internal
#define dso_internal
Definition: Visibility.h:13
RectangularEtaPhiTrackingRegion::RectangularEtaPhiTrackingRegion
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=nullptr, bool etaPhiRegion=false)
Definition: RectangularEtaPhiTrackingRegion.h:87
RectangularEtaPhiTrackingRegion::name
std::string name() const override
Definition: RectangularEtaPhiTrackingRegion.h:193
value
Definition: value.py:1
RectangularEtaPhiTrackingRegion::RectangularEtaPhiTrackingRegion
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=nullptr, bool etaPhiRegion=false)
Definition: RectangularEtaPhiTrackingRegion.h:116
RectangularEtaPhiTrackingRegion::tanLambdaRange
const Range & tanLambdaRange() const
Definition: RectangularEtaPhiTrackingRegion.h:167
TkTrackingRegionsMargin< float >
edm::EventSetup
Definition: EventSetup.h:57
RectangularEtaPhiTrackingRegion::phiWindow
OuterHitPhiPrediction phiWindow(const edm::EventSetup &iSetup) const
Definition: RectangularEtaPhiTrackingRegion.cc:256
RectangularEtaPhiTrackingRegion::UseMeasurementTracker
UseMeasurementTracker
Definition: RectangularEtaPhiTrackingRegion.h:27
RectangularEtaPhiTrackingRegion::UseMeasurementTracker::kAlways
BarrelDetLayer
Definition: BarrelDetLayer.h:22
SeedingLayerSetsHits::SeedingLayer
Definition: SeedingLayerSetsHits.h:37
RectangularEtaPhiTrackingRegion::RectangularEtaPhiTrackingRegion
RectangularEtaPhiTrackingRegion(RectangularEtaPhiTrackingRegion const &rh)
Definition: RectangularEtaPhiTrackingRegion.h:45
BaseTrackerRecHit.h
RectangularEtaPhiTrackingRegion::cache
cacheHits cache
Definition: RectangularEtaPhiTrackingRegion.h:230
RectangularEtaPhiTrackingRegion::checkRZ
std::unique_ptr< HitRZCompatibility > checkRZ(const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup, const DetLayer *outerlayer=nullptr, float lr=0, float gz=0, float dr=0, float dz=0) const override
Definition: RectangularEtaPhiTrackingRegion.h:178
std
Definition: JetResolutionObject.h:76
mayown_ptr.h
ForwardDetLayer
Definition: ForwardDetLayer.h:22
RectangularEtaPhiTrackingRegion::checkRZOld
std::unique_ptr< HitRZCompatibility > checkRZOld(const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup, const DetLayer *outerlayer) const
Definition: RectangularEtaPhiTrackingRegion.cc:71
PVValHelper::dz
Definition: PVValidationHelpers.h:50
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
RectangularEtaPhiTrackingRegion::rzConstraint
HitRZConstraint rzConstraint() const
Definition: RectangularEtaPhiTrackingRegion.cc:264
RectangularEtaPhiTrackingRegion::isPrecise
bool isPrecise() const
is precise error calculation switched on
Definition: RectangularEtaPhiTrackingRegion.h:174
EventSetup.h
hltPixelTracks_cff.whereToUseMeasurementTracker
whereToUseMeasurementTracker
Definition: hltPixelTracks_cff.py:47
TrackingRegion
Definition: TrackingRegion.h:38
TrackingRegion.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
RectangularEtaPhiTrackingRegion::Margin
TkTrackingRegionsMargin< float > Margin
Definition: RectangularEtaPhiTrackingRegion.h:60
RectangularEtaPhiTrackingRegion::stringToUseMeasurementTracker
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
Definition: RectangularEtaPhiTrackingRegion.cc:50
RectangularEtaPhiTrackingRegion::thePhiMargin
Margin thePhiMargin
Definition: RectangularEtaPhiTrackingRegion.h:215
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
margin
Double_t margin
Definition: trackSplitPlot.h:45