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

Constructor & Destructor Documentation

◆ OuterHitCompatibility()

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

Definition at line 23 of file OuterHitCompatibility.h.

24  : thePhiPrediction(phiPrediction), theRZCompatibility(rzCompatibility) {}
OuterHitPhiPrediction thePhiPrediction

Member Function Documentation

◆ checkPhi()

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

Definition at line 39 of file OuterHitCompatibility.h.

References phi, Geom::phiLess(), and alignCSCRings::r.

39  {
40  auto hitPhiRange = thePhiPrediction(r);
41  bool phiOK = Geom::phiLess(hitPhiRange.min(), phi) && Geom::phiLess(phi, hitPhiRange.max());
42  return phiOK;
43  }
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:18
OuterHitPhiPrediction thePhiPrediction

◆ operator()()

template<typename Algo >
bool OuterHitCompatibility< Algo >::operator() ( const TrackingRecHit hit) const
inline

Definition at line 26 of file OuterHitCompatibility.h.

References hit::z.

26  {
27  auto hitPos = hit.globalPosition();
28  auto hitR = hitPos.perp();
29 
30  auto hitZ = hitPos.z();
31  if (!theRZCompatibility(hitR, hitZ))
32  return false;
33 
34  auto hitPhi = unsafe_atan2f<9>(hitPos.y(), hitPos.x());
35 
36  return checkPhi(hitPhi, hitR);
37  }
bool checkPhi(float phi, float r) const

Member Data Documentation

◆ thePhiPrediction

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

Definition at line 46 of file OuterHitCompatibility.h.

◆ theRZCompatibility

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

Definition at line 47 of file OuterHitCompatibility.h.