test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
OuterHitCompatibility Class Reference

#include <OuterHitCompatibility.h>

Public Member Functions

bool checkPhi (float phi, float r) const
 
OuterHitCompatibilityclone () const
 
bool operator() (const TrackingRecHit &hit) const
 
 OuterHitCompatibility (const OuterHitPhiPrediction &phiPrediction, const HitRZCompatibility &rzCompatibility)
 
 OuterHitCompatibility (const OuterHitCompatibility &ohc)
 
 ~OuterHitCompatibility ()
 

Protected Attributes

OuterHitPhiPrediction thePhiPrediction
 
const HitRZCompatibilitytheRZCompatibility
 

Detailed Description

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

Constructor & Destructor Documentation

OuterHitCompatibility::OuterHitCompatibility ( const OuterHitPhiPrediction phiPrediction,
const HitRZCompatibility rzCompatibility 
)
inline

Definition at line 23 of file OuterHitCompatibility.h.

References HitRZCompatibility::clone().

26  : thePhiPrediction(phiPrediction)
27  { theRZCompatibility = rzCompatibility.clone(); }
OuterHitPhiPrediction thePhiPrediction
const HitRZCompatibility * theRZCompatibility
virtual HitRZCompatibility * clone() const =0
OuterHitCompatibility::OuterHitCompatibility ( const OuterHitCompatibility ohc)
inline

Definition at line 29 of file OuterHitCompatibility.h.

References HitRZCompatibility::clone(), and theRZCompatibility.

OuterHitPhiPrediction thePhiPrediction
const HitRZCompatibility * theRZCompatibility
virtual HitRZCompatibility * clone() const =0
OuterHitCompatibility::~OuterHitCompatibility ( )
inline

Definition at line 33 of file OuterHitCompatibility.h.

34  { delete theRZCompatibility; }
const HitRZCompatibility * theRZCompatibility

Member Function Documentation

bool OuterHitCompatibility::checkPhi ( float  phi,
float  r 
) const
inline

Definition at line 39 of file OuterHitCompatibility.h.

References PixelRecoRange< T >::max(), PixelRecoRange< T >::min(), and phi.

Referenced by operator()().

39  {
41  PhiLess less;
42  bool phiOK = less(hitPhiRange.min(),phi) && less(phi,hitPhiRange.max());
43  return phiOK;
44  }
T max() const
T min() const
OuterHitPhiPrediction thePhiPrediction
Definition: DDAxes.h:10
OuterHitCompatibility* OuterHitCompatibility::clone ( void  ) const
inline

Definition at line 46 of file OuterHitCompatibility.h.

46  {
47  return new OuterHitCompatibility(*this);
48  }
OuterHitCompatibility(const OuterHitPhiPrediction &phiPrediction, const HitRZCompatibility &rzCompatibility)
bool OuterHitCompatibility::operator() ( const TrackingRecHit hit) const

Definition at line 12 of file OuterHitCompatibility.cc.

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

13 {
14  GlobalPoint hitPos = hit.globalPosition();
15  float hitR = hitPos.perp();
16  float hitPhi = hitPos.phi();
17 
18  if ( !checkPhi(hitPhi, hitR) ) return false;
19 
20  float hitZ = hitPos.z();
21  if ( !(*theRZCompatibility)(hitR,hitZ) ) return false;
22 
23  return true;
24 }
T perp() const
Definition: PV3DBase.h:72
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
virtual GlobalPoint globalPosition() const
const HitRZCompatibility * theRZCompatibility
T z() const
Definition: PV3DBase.h:64
bool checkPhi(float phi, float r) const

Member Data Documentation

OuterHitPhiPrediction OuterHitCompatibility::thePhiPrediction
protected

Definition at line 52 of file OuterHitCompatibility.h.

const HitRZCompatibility* OuterHitCompatibility::theRZCompatibility
protected

Definition at line 51 of file OuterHitCompatibility.h.

Referenced by operator()(), and OuterHitCompatibility().