CMS 3D CMS Logo

Functions
barrelUtil Namespace Reference

Functions

float calculatePhiWindow (float Xmax, const GeomDet &det, const TrajectoryStateOnSurface &state)
 
float computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
 
bool overlap (float phi, const GeometricSearchDet &gsdet, float phiWin)
 

Function Documentation

float barrelUtil::calculatePhiWindow ( float  Xmax,
const GeomDet det,
const TrajectoryStateOnSurface state 
)
inline

Definition at line 17 of file BarrelUtil.h.

References funct::abs(), PV3DBase< T, PVType, FrameType >::barePhi(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::localPosition(), min(), edm::shift, GeomDet::surface(), and Surface::toGlobal().

Referenced by computeWindowSize().

18  {
19 
20  LocalPoint startPoint = state.localPosition();
21  LocalVector shift( Xmax , 0. , 0.);
22  LocalPoint shift1 = startPoint + shift;
23  LocalPoint shift2 = startPoint + (-shift);
24  //LocalPoint shift2( startPoint); //original code;
25  //shift2 -= shift;
26 
27  auto phi1 = det.surface().toGlobal(shift1).barePhi();
28  auto phi2 = det.surface().toGlobal(shift2).barePhi();
29  auto phiStart = state.globalPosition().barePhi();
30  auto phiWin = std::min(std::abs(phiStart-phi1),std::abs(phiStart-phi2));
31 
32  return phiWin;
33  }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
GlobalPoint globalPosition() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
T barePhi() const
Definition: PV3DBase.h:68
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
static unsigned int const shift
float barrelUtil::computeWindowSize ( const GeomDet det,
const TrajectoryStateOnSurface tsos,
const MeasurementEstimator est 
)
inline

Definition at line 36 of file BarrelUtil.h.

References calculatePhiWindow(), MeasurementEstimator::maximalLocalDisplacement(), GeomDet::surface(), and TrackerOfflineValidation_Dqm_cff::xmax.

Referenced by TBPLayer::computeWindowSize().

38  {
39  auto xmax =
40  est.maximalLocalDisplacement(tsos, det->surface()).x();
41  return calculatePhiWindow( xmax, *det, tsos);
42  }
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
float calculatePhiWindow(float Xmax, const GeomDet &det, const TrajectoryStateOnSurface &state)
Definition: BarrelUtil.h:17
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
bool barrelUtil::overlap ( float  phi,
const GeometricSearchDet gsdet,
float  phiWin 
)
inline

Definition at line 47 of file BarrelUtil.h.

References constexpr, Surface::phiSpan(), rangesIntersect(), and GeometricSearchDet::surface().

Referenced by TBPLayer::searchNeighbors().

47  {
48  // introduce offset (extrapolated point and true propagated point differ by 0.0003 - 0.00033,
49  // due to thickness of Rod of 1 cm)
50  constexpr float phiOffset = 0.00034; //...TOBE CHECKED LATER...
51  phiWin += phiOffset;
52 
53  // detector phi range
54  std::pair<float,float> phiRange(phi-phiWin, phi+phiWin);
55 
56  return rangesIntersect(phiRange, gsdet.surface().phiSpan(), PhiLess());
57  }
std::pair< float, float > const & phiSpan() const
Definition: Surface.h:123
#define constexpr
bool rangesIntersect(const Range &a, const Range &b)
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.