CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
OuterHitCompatibility< Algo > Class Template Reference

#include <OuterHitCompatibility.h>

Public Member Functions

bool checkPhi (float phi, float r) const
 
bool operator() (const TrackingRecHit &hit) const
 
 OuterHitCompatibility (const OuterHitPhiPrediction &phiPrediction, const Algo &rzCompatibility)
 

Private Attributes

OuterHitPhiPrediction thePhiPrediction
 
Algo theRZCompatibility
 

Detailed Description

template<typename Algo>
class OuterHitCompatibility< Algo >

test compatibility of RecHit. The phi and r-z are checked in independent way. The phi of a RecHit hit is tested if it is in the range defined by OuterHitPhiPrediction. The r-z checking is done with a help of HitRZCompatibility checker

Definition at line 22 of file OuterHitCompatibility.h.

Constructor & Destructor Documentation

template<typename Algo >
OuterHitCompatibility< Algo >::OuterHitCompatibility ( const OuterHitPhiPrediction phiPrediction,
const Algo rzCompatibility 
)
inline

Definition at line 25 of file OuterHitCompatibility.h.

28  : thePhiPrediction(phiPrediction),
29  theRZCompatibility(rzCompatibility) {}
OuterHitPhiPrediction thePhiPrediction

Member Function Documentation

template<typename Algo >
bool OuterHitCompatibility< Algo >::checkPhi ( float  phi,
float  r 
) const
inline

Definition at line 45 of file OuterHitCompatibility.h.

References phi, and Geom::phiLess().

45  {
46  auto hitPhiRange = thePhiPrediction(r);
47  bool phiOK = Geom::phiLess(hitPhiRange.min(),phi) && Geom::phiLess(phi,hitPhiRange.max());
48  return phiOK;
49  }
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:23
OuterHitPhiPrediction thePhiPrediction
template<typename Algo >
bool OuterHitCompatibility< Algo >::operator() ( const TrackingRecHit hit) const
inline

Definition at line 31 of file OuterHitCompatibility.h.

References TrackingRecHit::globalPosition(), and PV3DBase< T, PVType, FrameType >::perp().

31  {
32 
33  auto hitPos = hit.globalPosition();
34  auto hitR = hitPos.perp();
35 
36  auto hitZ = hitPos.z();
37  if ( !theRZCompatibility(hitR,hitZ) ) return false;
38 
39  auto hitPhi = unsafe_atan2f<9>(hitPos.y(),hitPos.x());
40 
41  return checkPhi(hitPhi, hitR);
42  }
T perp() const
Definition: PV3DBase.h:72
virtual GlobalPoint globalPosition() const
bool checkPhi(float phi, float r) const

Member Data Documentation

template<typename Algo >
OuterHitPhiPrediction OuterHitCompatibility< Algo >::thePhiPrediction
private

Definition at line 52 of file OuterHitCompatibility.h.

template<typename Algo >
Algo OuterHitCompatibility< Algo >::theRZCompatibility
private

Definition at line 53 of file OuterHitCompatibility.h.