CMS 3D CMS Logo

OuterHitCompatibility.h
Go to the documentation of this file.
1 #ifndef RecoTracker_TkTrackingRegions_OuterHitCompatibility_H
2 #define RecoTracker_TkTrackingRegions_OuterHitCompatibility_H
3 
11 #include "OuterHitPhiPrediction.h"
17 
19 
20 template <typename Algo>
22 public:
23  OuterHitCompatibility(const OuterHitPhiPrediction& phiPrediction, const Algo& rzCompatibility)
24  : thePhiPrediction(phiPrediction), theRZCompatibility(rzCompatibility) {}
25 
26  bool operator()(const TrackingRecHit& hit) const {
27  auto hitPos = hit.globalPosition();
28  auto hitR = hitPos.perp();
29 
30  auto hitZ = hitPos.z();
31  if (!theRZCompatibility(hitR, hitZ))
32  return false;
33 
34  auto hitPhi = unsafe_atan2f<9>(hitPos.y(), hitPos.x());
35 
36  return checkPhi(hitPhi, hitR);
37  }
38 
39  bool checkPhi(float phi, float r) const {
40  auto hitPhiRange = thePhiPrediction(r);
41  bool phiOK = Geom::phiLess(hitPhiRange.min(), phi) && Geom::phiLess(phi, hitPhiRange.max());
42  return phiOK;
43  }
44 
45 private:
48 };
49 #endif
Visibility.h
VectorUtil.h
TransientTrackingRecHit.h
OuterHitCompatibility::OuterHitCompatibility
OuterHitCompatibility(const OuterHitPhiPrediction &phiPrediction, const Algo &rzCompatibility)
Definition: OuterHitCompatibility.h:23
OuterHitCompatibility::checkPhi
bool checkPhi(float phi, float r) const
Definition: OuterHitCompatibility.h:39
TrackingRecHit.h
HitRZCompatibility.h
OuterHitCompatibility::operator()
bool operator()(const TrackingRecHit &hit) const
Definition: OuterHitCompatibility.h:26
Algo
Definition: fakeMenu.h:6
hit::z
double z
Definition: SiStripHitEffFromCalibTree.cc:91
OuterHitCompatibility
Definition: OuterHitCompatibility.h:21
OuterHitPhiPrediction
Definition: OuterHitPhiPrediction.h:12
Geom::phiLess
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:18
approx_atan2.h
dso_internal
#define dso_internal
Definition: Visibility.h:13
OuterHitCompatibility::thePhiPrediction
OuterHitPhiPrediction thePhiPrediction
Definition: OuterHitCompatibility.h:46
TrackingRecHit
Definition: TrackingRecHit.h:21
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DDAxes::phi
OuterHitCompatibility::theRZCompatibility
Algo theRZCompatibility
Definition: OuterHitCompatibility.h:47
OuterHitPhiPrediction.h
EventSetup.h
GlobalPoint.h
hit
Definition: SiStripHitEffFromCalibTree.cc:88