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 
177 
180  void checkTracks(reco::TrackCollection const& tracks, std::vector<bool>& mask) const override;
181 
182  std::unique_ptr<HitRZCompatibility> checkRZ(const DetLayer* layer,
183  const Hit& outerHit,
184  const edm::EventSetup& iSetup,
185  const DetLayer* outerlayer = nullptr,
186  float lr = 0,
187  float gz = 0,
188  float dr = 0,
189  float dz = 0) const override {
190  return checkRZOld(layer, outerHit, iSetup, outerlayer);
191  }
192 
193  std::unique_ptr<TrackingRegion> clone() const override {
194  return std::make_unique<RectangularEtaPhiTrackingRegion>(*this);
195  }
196 
197  std::string name() const override { return "RectangularEtaPhiTrackingRegion"; }
198  std::string print() const override;
199 
200 private:
201  std::unique_ptr<HitRZCompatibility> checkRZOld(const DetLayer* layer,
202  const Hit& outerHit,
203  const edm::EventSetup& iSetup,
204  const DetLayer* outerlayer) const;
205 
206  std::unique_ptr<MeasurementEstimator> estimator(const BarrelDetLayer* layer,
207  const edm::EventSetup& iSetup) const dso_internal;
208  std::unique_ptr<MeasurementEstimator> estimator(const ForwardDetLayer* layer,
209  const edm::EventSetup& iSetup) const dso_internal;
210 
213 
215 
216 private:
218  Range theLambdaRange; // this is actually tanLambda
223  bool theUseMS = false;
226 
229 
230  /* wait... think!
231  * done? questions? think again, look where this region is constructed
232  * still question? study tracker code for the next couple of weeks, then we may discuss.
233  */
234  mutable cacheHits cache;
235 };
236 
237 #endif
Vector3DBase
Definition: Vector3DBase.h:8
Hit
Definition: HitCollection.h:12
RectangularEtaPhiTrackingRegion::theLambdaRange
Range theLambdaRange
Definition: RectangularEtaPhiTrackingRegion.h:218
TrackingRegion::invPtRange
Range invPtRange() const
inverse pt range
Definition: TrackingRegion.h:86
RectangularEtaPhiTrackingRegion::theMeanLambda
float theMeanLambda
Definition: RectangularEtaPhiTrackingRegion.h:220
RectangularEtaPhiTrackingRegion::cacheHits
std::vector< cacheHitPointer > cacheHits
Definition: RectangularEtaPhiTrackingRegion.h:228
TkTrackingRegionsMargin.h
RectangularEtaPhiTrackingRegion
Definition: RectangularEtaPhiTrackingRegion.h:25
RectangularEtaPhiTrackingRegion::theUseEtaPhi
bool theUseEtaPhi
Definition: RectangularEtaPhiTrackingRegion.h:224
funct::false
false
Definition: Factorize.h:29
RectangularEtaPhiTrackingRegion::theEtaRange
Range theEtaRange
Definition: RectangularEtaPhiTrackingRegion.h:217
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:221
HitRZConstraint.h
HLT_FULL_cff.rVertex
rVertex
Definition: HLT_FULL_cff.py:113805
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:172
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:315
HLT_FULL_cff.zVertex
zVertex
Definition: HLT_FULL_cff.py:113803
RectangularEtaPhiTrackingRegion::print
std::string print() const override
Definition: RectangularEtaPhiTrackingRegion.cc:428
RectangularEtaPhiTrackingRegion::initEtaRange
void initEtaRange(const GlobalVector &dir, const Margin &margin)
Definition: RectangularEtaPhiTrackingRegion.cc:96
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:47
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:83
Point3DBase< float, GlobalTag >
RectangularEtaPhiTrackingRegion::clone
std::unique_ptr< TrackingRegion > clone() const override
Definition: RectangularEtaPhiTrackingRegion.h:193
RectangularEtaPhiTrackingRegion::theUseMS
bool theUseMS
Definition: RectangularEtaPhiTrackingRegion.h:223
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
RectangularEtaPhiTrackingRegion::thePrecise
bool thePrecise
Definition: RectangularEtaPhiTrackingRegion.h:222
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:225
PixelRecoRange< float >
RectangularEtaPhiTrackingRegion::UseMeasurementTracker::kNever
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:16
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:176
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:197
value
Definition: value.py:1
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
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:58
RectangularEtaPhiTrackingRegion::phiWindow
OuterHitPhiPrediction phiWindow(const edm::EventSetup &iSetup) const
Definition: RectangularEtaPhiTrackingRegion.cc:288
RectangularEtaPhiTrackingRegion::UseMeasurementTracker
UseMeasurementTracker
Definition: RectangularEtaPhiTrackingRegion.h:27
RectangularEtaPhiTrackingRegion::UseMeasurementTracker::kAlways
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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:234
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:182
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:103
PVValHelper::dz
Definition: PVValidationHelpers.h:51
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
RectangularEtaPhiTrackingRegion::checkTracks
void checkTracks(reco::TrackCollection const &tracks, std::vector< bool > &mask) const override
Definition: RectangularEtaPhiTrackingRegion.cc:51
RectangularEtaPhiTrackingRegion::rzConstraint
HitRZConstraint rzConstraint() const
Definition: RectangularEtaPhiTrackingRegion.cc:296
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:41
TrackingRegion.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
RectangularEtaPhiTrackingRegion::Margin
TkTrackingRegionsMargin< float > Margin
Definition: RectangularEtaPhiTrackingRegion.h:60
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
RectangularEtaPhiTrackingRegion::stringToUseMeasurementTracker
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
Definition: RectangularEtaPhiTrackingRegion.cc:82
RectangularEtaPhiTrackingRegion::thePhiMargin
Margin thePhiMargin
Definition: RectangularEtaPhiTrackingRegion.h:219
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
margin
Double_t margin
Definition: trackSplitPlot.h:45