CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
HitEtaCheck Class Referencefinal

#include <HitEtaCheck.h>

Inheritance diagram for HitEtaCheck:
HitRZCompatibility

Public Member Functions

HitEtaCheckclone () const override
 
 HitEtaCheck (bool inbarrel, const HitRZConstraint::Point &point, float cotLeftLine, float cotRightLine)
 
bool operator() (const float &r, const float &z) const override
 
Range range (const float &rORz) const override
 
- Public Member Functions inherited from HitRZCompatibility
Algo algo () const
 
 HitRZCompatibility (Algo a)
 
virtual ~HitRZCompatibility ()
 

Static Public Attributes

static constexpr Algo me = etaAlgo
 

Private Attributes

bool isBarrel
 
HitRZConstraint theRZ
 

Additional Inherited Members

- Public Types inherited from HitRZCompatibility
enum  Algo { zAlgo =0, rAlgo =1, etaAlgo =2 }
 
typedef PixelRecoRange< float > Range
 
- Public Attributes inherited from HitRZCompatibility
Algo m_algo
 

Detailed Description

Fast Implementation of HitRZCompatibility. The RZConstraint is defined by two lines and their crossing point. The r-z compatibility is tested by comparistion of cotangent given by r-z and lines crossing point with cotangents of two lines.

Definition at line 15 of file HitEtaCheck.h.

Constructor & Destructor Documentation

HitEtaCheck::HitEtaCheck ( bool  inbarrel,
const HitRZConstraint::Point point,
float  cotLeftLine,
float  cotRightLine 
)
inline

Definition at line 20 of file HitEtaCheck.h.

Referenced by clone().

24  isBarrel(inbarrel),
25  theRZ(HitRZConstraint(point, cotLeftLine, point, cotRightLine)) { }
static constexpr Algo me
Definition: HitEtaCheck.h:18
bool isBarrel
Definition: HitEtaCheck.h:40
HitRZConstraint theRZ
Definition: HitEtaCheck.h:41

Member Function Documentation

HitEtaCheck* HitEtaCheck::clone ( void  ) const
inlineoverridevirtual

Implements HitRZCompatibility.

Definition at line 38 of file HitEtaCheck.h.

References HitEtaCheck().

38 { return new HitEtaCheck(*this); }
HitEtaCheck(bool inbarrel, const HitRZConstraint::Point &point, float cotLeftLine, float cotRightLine)
Definition: HitEtaCheck.h:20
bool HitEtaCheck::operator() ( const float &  r,
const float &  z 
) const
inlineoverridevirtual

Implements HitRZCompatibility.

Definition at line 27 of file HitEtaCheck.h.

References SimpleLineRZ::cotLine(), HitRZConstraint::lineLeft(), HitRZConstraint::lineRight(), alignCSCRings::r, theRZ, and z.

27  {
28  const auto & lineLeft = theRZ.lineLeft();
29  const auto & lineRight = theRZ.lineRight();
30  float cotHit = (lineLeft.origin().z()-z)/(lineLeft.origin().r()-r);
31  return lineRight.cotLine() < cotHit && cotHit < lineLeft.cotLine();
32  }
float cotLine() const
const Line & lineRight() const
const Line & lineLeft() const
HitRZConstraint theRZ
Definition: HitEtaCheck.h:41
Range HitEtaCheck::range ( const float &  rORz) const
inlineoverridevirtual

Implements HitRZCompatibility.

Definition at line 34 of file HitEtaCheck.h.

References isBarrel, HitRCheck::range(), HitZCheck::range(), and theRZ.

34  {
35  return (isBarrel) ?
36  HitZCheck(theRZ).range(rORz) : HitRCheck(theRZ).range(rORz);
37  }
Range range(const float &radius) const override
Definition: HitZCheck.h:35
bool isBarrel
Definition: HitEtaCheck.h:40
Range range(const float &z) const override
Definition: HitRCheck.h:36
HitRZConstraint theRZ
Definition: HitEtaCheck.h:41

Member Data Documentation

bool HitEtaCheck::isBarrel
private

Definition at line 40 of file HitEtaCheck.h.

Referenced by range().

constexpr Algo HitEtaCheck::me = etaAlgo
static

Definition at line 18 of file HitEtaCheck.h.

HitRZConstraint HitEtaCheck::theRZ
private

Definition at line 41 of file HitEtaCheck.h.

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