#include <HitRCheck.h>
Public Types | |
typedef TkTrackingRegionsMargin< float > | Margin |
Public Member Functions | |
virtual HitRCheck * | clone () const |
HitRCheck () | |
HitRCheck (const HitRZConstraint &rz, Margin margin=Margin(0, 0)) | |
virtual bool | operator() (const float &r, const float &z) const |
virtual Range | range (const float &z) const |
void | setTolerance (const Margin &tolerance) |
Private Attributes | |
HitRZConstraint | theRZ |
Margin | theTolerance |
provides allowed range of radius R from HitRZConstraint at a given Z coordinate
Definition at line 10 of file HitRCheck.h.
typedef TkTrackingRegionsMargin<float> HitRCheck::Margin |
Definition at line 13 of file HitRCheck.h.
HitRCheck::HitRCheck | ( | ) | [inline] |
HitRCheck::HitRCheck | ( | const HitRZConstraint & | rz, |
Margin | margin = Margin(0,0) |
||
) | [inline] |
Definition at line 16 of file HitRCheck.h.
: theRZ(rz), theTolerance(margin) { }
virtual HitRCheck* HitRCheck::clone | ( | void | ) | const [inline, virtual] |
Implements HitRZCompatibility.
Definition at line 24 of file HitRCheck.h.
References HitRCheck().
{ return new HitRCheck(*this); }
virtual bool HitRCheck::operator() | ( | const float & | r, |
const float & | z | ||
) | const [inline, virtual] |
Implements HitRZCompatibility.
Definition at line 19 of file HitRCheck.h.
References PixelRecoRange< T >::inside(), and range().
HitRCheck::Range HitRCheck::range | ( | const float & | z | ) | const [virtual] |
Implements HitRZCompatibility.
Definition at line 4 of file HitRCheck.cc.
References PixelRecoLineRZ::cotLine(), TkTrackingRegionsMargin< T >::left(), HitRZConstraint::lineLeft(), HitRZConstraint::lineRight(), PixelRecoLineRZ::rAtZ(), TkTrackingRegionsMargin< T >::right(), theRZ, and theTolerance.
Referenced by operator()(), and HitEtaCheck::range().
{ const float rBig = 150.; //something above the detector ranges const PixelRecoLineRZ & lineLeft = theRZ.lineLeft(); const PixelRecoLineRZ & lineRight = theRZ.lineRight(); if (z > 0.) { if (lineRight.cotLine() <= 0.) return Range(rBig, 0); //empty float rMin = lineRight.rAtZ(z); if (lineLeft.cotLine() <= 0) return Range(rMin-theTolerance.left(),rBig); float rMax = lineLeft.rAtZ(z); return Range(rMin-theTolerance.left(),rMax+theTolerance.right()); } else { if (lineLeft.cotLine() >= 0.) return Range(rBig, 0); //empty float rMin = lineLeft.rAtZ(z); if (lineRight.cotLine()>= 0) return Range(rMin-theTolerance.left(),rBig); float rMax = lineRight.rAtZ(z); return Range(rMin-theTolerance.left(),rMax+theTolerance.right()); } }
void HitRCheck::setTolerance | ( | const Margin & | tolerance | ) | [inline] |
HitRZConstraint HitRCheck::theRZ [private] |
Definition at line 29 of file HitRCheck.h.
Referenced by range().
Margin HitRCheck::theTolerance [private] |
Definition at line 30 of file HitRCheck.h.
Referenced by range(), and setTolerance().