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 23 of file OuterHitCompatibility.h.

Constructor & Destructor Documentation

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

Definition at line 26 of file OuterHitCompatibility.h.

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

Member Function Documentation

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

Definition at line 46 of file OuterHitCompatibility.h.

References phi.

46  {
47  auto hitPhiRange = thePhiPrediction(r);
48  PhiLess less;
49  bool phiOK = less(hitPhiRange.min(),phi) && less(phi,hitPhiRange.max());
50  return phiOK;
51  }
OuterHitPhiPrediction thePhiPrediction
template<typename Algo >
bool OuterHitCompatibility< Algo >::operator() ( const TrackingRecHit hit) const
inline

Definition at line 32 of file OuterHitCompatibility.h.

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

32  {
33 
34  auto hitPos = hit.globalPosition();
35  auto hitR = hitPos.perp();
36 
37  auto hitZ = hitPos.z();
38  if ( !theRZCompatibility(hitR,hitZ) ) return false;
39 
40  auto hitPhi = unsafe_atan2f<9>(hitPos.y(),hitPos.x());
41 
42  return checkPhi(hitPhi, hitR);
43  }
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 54 of file OuterHitCompatibility.h.

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

Definition at line 55 of file OuterHitCompatibility.h.