CMS 3D CMS Logo

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
19  bool overlapInPhi( float phi, const GeomDet & det, float phiWindow) {
20  std::pair<float,float> phiRange(phi-phiWindow, phi+phiWindow);
21  return rangesIntersect( phiRange, det.surface().phiSpan(),
22  [](auto x, auto y){ return Geom::phiLess(x,y); });
23  }
24 
25 
26  inline
27  bool overlapInPhi( GlobalPoint crossPoint,const GeomDet & det, float phiWindow) {
28  return overlapInPhi(crossPoint.barePhi(), det,phiWindow);
29  }
30 
31 
32 
33  float computeWindowSize( const GeomDet* det,
34  const TrajectoryStateOnSurface& tsos,
35  const MeasurementEstimator& est);
36 
37 
38  float
40  const TrajectoryStateOnSurface& ts,
41  const Plane& plane);
42 
43 
44 }
45 
46 #pragma GCC visibility pop
47 #endif // TkDetLayers_TkDetUtil_h
std::pair< float, float > const & phiSpan() const
Definition: Surface.h:123
bool overlapInPhi(float phi, const GeomDet &det, float phiWindow)
Definition: TkDetUtil.h:19
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
Definition: Plane.h:17
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
Definition: TkDetUtil.cc:10
T barePhi() const
Definition: PV3DBase.h:68
bool rangesIntersect(const Range &a, const Range &b)
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:23
float calculatePhiWindow(const MeasurementEstimator::Local2DVector &imaxDistance, const TrajectoryStateOnSurface &ts, const Plane &plane)
Definition: TkDetUtil.cc:21