CMS 3D CMS Logo

Public Member Functions | Private Attributes

HitEtaCheck Class Reference

#include <HitEtaCheck.h>

Inheritance diagram for HitEtaCheck:
HitRZCompatibility

List of all members.

Public Member Functions

virtual HitEtaCheckclone () const
 HitEtaCheck (bool inbarrel, const PixelRecoLineRZ::LineOrigin &point, float cotLeftLine, float cotRightLine)
virtual bool operator() (const float &r, const float &z) const
virtual Range range (const float &rORz) const

Private Attributes

bool isBarrel
HitRZConstraint theRZ

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 PixelRecoLineRZ::LineOrigin point,
float  cotLeftLine,
float  cotRightLine 
) [inline]

Definition at line 17 of file HitEtaCheck.h.

Referenced by clone().

    : isBarrel(inbarrel), 
      theRZ(HitRZConstraint(point, cotLeftLine, point, cotRightLine)) { }

Member Function Documentation

virtual HitEtaCheck* HitEtaCheck::clone ( void  ) const [inline, virtual]

Implements HitRZCompatibility.

Definition at line 34 of file HitEtaCheck.h.

References HitEtaCheck().

{ return new HitEtaCheck(*this); }
virtual bool HitEtaCheck::operator() ( const float &  r,
const float &  z 
) const [inline, virtual]

Implements HitRZCompatibility.

Definition at line 23 of file HitEtaCheck.h.

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

                                                                   {
    const PixelRecoLineRZ & lineLeft = theRZ.lineLeft();
    const PixelRecoLineRZ & lineRight = theRZ.lineRight();
    float cotHit = (lineLeft.origin().z()-z)/(lineLeft.origin().r()-r);
    return lineRight.cotLine() < cotHit && cotHit < lineLeft.cotLine();
  }
virtual Range HitEtaCheck::range ( const float &  rORz) const [inline, virtual]

Implements HitRZCompatibility.

Definition at line 30 of file HitEtaCheck.h.

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

                                                {
    return (isBarrel) ? 
        HitZCheck(theRZ).range(rORz) : HitRCheck(theRZ).range(rORz);
  }

Member Data Documentation

bool HitEtaCheck::isBarrel [private]

Definition at line 36 of file HitEtaCheck.h.

Referenced by range().

Definition at line 37 of file HitEtaCheck.h.

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