CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TkDetUtil.h
Go to the documentation of this file.
1 #ifndef TkDetLayers_TkDetUtil_h
2 #define TkDetLayers_TkDetUtil_h
3 
9 
10 class GeomDet;
11 class Plane;
13 
14 #pragma GCC visibility push(hidden)
15 
16 namespace tkDetUtil {
17 
18  inline bool overlapInPhi(float phi, const GeomDet& det, float phiWindow) {
19  std::pair<float, float> phiRange(phi - phiWindow, phi + phiWindow);
20  return rangesIntersect(phiRange, det.surface().phiSpan(), [](auto x, auto y) { return Geom::phiLess(x, y); });
21  }
22 
23  inline bool overlapInPhi(GlobalPoint crossPoint, const GeomDet& det, float phiWindow) {
24  return overlapInPhi(crossPoint.barePhi(), det, phiWindow);
25  }
26 
27  float computeWindowSize(const GeomDet* det, const TrajectoryStateOnSurface& tsos, const MeasurementEstimator& est);
28 
30  const TrajectoryStateOnSurface& ts,
31  const Plane& plane);
32 
33 } // namespace tkDetUtil
34 
35 #pragma GCC visibility pop
36 #endif // TkDetLayers_TkDetUtil_h
bool overlapInPhi(float phi, const GeomDet &det, float phiWindow)
Definition: TkDetUtil.h:18
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
Definition: Plane.h:16
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
Definition: TkDetUtil.cc:10
T barePhi() const
Definition: PV3DBase.h:65
std::pair< float, float > const & phiSpan() const
Definition: Surface.h:90
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:18
bool rangesIntersect(const Range &a, const Range &b)
float calculatePhiWindow(const MeasurementEstimator::Local2DVector &imaxDistance, const TrajectoryStateOnSurface &ts, const Plane &plane)
Definition: TkDetUtil.cc:16