CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
tkDetUtil Namespace Reference

Functions

float calculatePhiWindow (const MeasurementEstimator::Local2DVector &maxDistance, const TrajectoryStateOnSurface &ts, const Plane &plane)
 
float computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
 
bool overlapInPhi (float phi, const GeomDet &det, float phiWindow)
 
bool overlapInPhi (GlobalPoint crossPoint, const GeomDet &det, float phiWindow)
 

Function Documentation

float tkDetUtil::calculatePhiWindow ( const MeasurementEstimator::Local2DVector maxDistance,
const TrajectoryStateOnSurface ts,
const Plane plane 
)

Definition at line 22 of file TkDetUtil.cc.

References PV3DBase< T, PVType, FrameType >::barePhi(), i, TrajectoryStateOnSurface::localPosition(), Geom::phiLess(), phimax, phimin, Geom::pi(), dqm_diff::start, Surface::toGlobal(), PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::x(), PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by computeWindowSize().

25  {
26 
28  float corners[] = { plane.toGlobal(LocalPoint( start.x()+maxDistance.x(), start.y()+maxDistance.y() )).barePhi(),
29  plane.toGlobal(LocalPoint( start.x()-maxDistance.x(), start.y()+maxDistance.y() )).barePhi(),
30  plane.toGlobal(LocalPoint( start.x()-maxDistance.x(), start.y()-maxDistance.y() )).barePhi(),
31  plane.toGlobal(LocalPoint( start.x()+maxDistance.x(), start.y()-maxDistance.y() )).barePhi()
32  };
33 
34  float phimin = corners[0];
35  float phimax = phimin;
36  for ( int i = 1; i<4; i++) {
37  float cPhi = corners[i];
38  if ( Geom::phiLess(cPhi, phimin) ) { phimin = cPhi; }
39  if ( Geom::phiLess( phimax, cPhi) ) { phimax = cPhi; }
40  }
41  float phiWindow = phimax - phimin;
42  if ( phiWindow < 0.) { phiWindow += 2.*Geom::pi();}
43 
44  return phiWindow;
45  }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
int i
Definition: DBlmapReader.cc:9
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
T y() const
Definition: PV2DBase.h:46
T y() const
Definition: PV3DBase.h:63
T barePhi() const
Definition: PV3DBase.h:68
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:23
double pi()
Definition: Pi.h:31
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
T x() const
Definition: PV2DBase.h:45
T x() const
Definition: PV3DBase.h:62
float tkDetUtil::computeWindowSize ( const GeomDet det,
const TrajectoryStateOnSurface tsos,
const MeasurementEstimator est 
)

Definition at line 10 of file TkDetUtil.cc.

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

Referenced by TECLayer::groupedCompatibleDetsV(), TIDRing::groupedCompatibleDetsV(), CompositeTECWedge::groupedCompatibleDetsV(), and Phase2OTECRing::groupedCompatibleDetsV().

13  {
14  const Plane& startPlane = det->surface();
16  est.maximalLocalDisplacement( tsos, startPlane);
17  return calculatePhiWindow( maxDistance, tsos, startPlane);
18  }
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
Definition: Plane.h:17
float calculatePhiWindow(float Xmax, const GeomDet &det, const TrajectoryStateOnSurface &state)
Definition: BarrelUtil.h:16
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const
bool tkDetUtil::overlapInPhi ( float  phi,
const GeomDet det,
float  phiWindow 
)
inline

Definition at line 19 of file TkDetUtil.h.

References Surface::phiSpan(), rangesIntersect(), and GeomDet::surface().

Referenced by overlapInPhi(), CompositeTECWedge::searchNeighbors(), TIDRing::searchNeighbors(), and Phase2OTECRing::searchNeighbors().

19  {
20  std::pair<float,float> phiRange(phi-phiWindow, phi+phiWindow);
21  return rangesIntersect( phiRange, det.surface().phiSpan(), PhiLess());
22  }
std::pair< float, float > const & phiSpan() const
Definition: Surface.h:131
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
bool rangesIntersect(const Range &a, const Range &b)
Geom::Phi< T > phi() const
bool tkDetUtil::overlapInPhi ( GlobalPoint  crossPoint,
const GeomDet det,
float  phiWindow 
)
inline

Definition at line 26 of file TkDetUtil.h.

References PV3DBase< T, PVType, FrameType >::barePhi(), and overlapInPhi().

26  {
27  return overlapInPhi(crossPoint.barePhi(), det,phiWindow);
28  }
bool overlapInPhi(float phi, const GeomDet &det, float phiWindow)
Definition: TkDetUtil.h:19
T barePhi() const
Definition: PV3DBase.h:68