CMS 3D CMS Logo

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

#include <HitRCheck.h>

Inheritance diagram for HitRCheck:
HitRZCompatibility

Public Types

typedef
TkTrackingRegionsMargin< float > 
Margin
 
- Public Types inherited from HitRZCompatibility
typedef PixelRecoRange< float > Range
 

Public Member Functions

virtual HitRCheckclone () const
 
 HitRCheck ()
 
virtual bool operator() (const float &r, const float &z) const
 
virtual Range range (const float &z) const
 
void setTolerance (const Margin &tolerance)
 
 theTolerance (margin)
 

Public Attributes

 __pad0__: theRZ(rz)
 

Private Attributes

HitRZConstraint theRZ
 
Margin theTolerance
 

Detailed Description

provides allowed range of radius R from HitRZConstraint at a given Z coordinate

Definition at line 10 of file HitRCheck.h.

Member Typedef Documentation

Definition at line 13 of file HitRCheck.h.

Constructor & Destructor Documentation

HitRCheck::HitRCheck ( )
inline

Definition at line 15 of file HitRCheck.h.

Referenced by clone().

15 { }

Member Function Documentation

virtual HitRCheck* HitRCheck::clone ( void  ) const
inlinevirtual

Implements HitRZCompatibility.

Definition at line 24 of file HitRCheck.h.

References HitRCheck().

24 { return new HitRCheck(*this); }
HitRCheck()
Definition: HitRCheck.h:15
virtual bool HitRCheck::operator() ( const float &  r,
const float &  z 
) const
inlinevirtual

Implements HitRZCompatibility.

Definition at line 19 of file HitRCheck.h.

References PixelRecoRange< T >::inside(), and range().

20  { return range(z).inside(r); }
virtual Range range(const float &z) const
Definition: HitRCheck.cc:4
double double double z
bool inside(const T &value) const
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().

5 {
6  const float rBig = 150.; //something above the detector ranges
7  const PixelRecoLineRZ & lineLeft = theRZ.lineLeft();
8  const PixelRecoLineRZ & lineRight = theRZ.lineRight();
9 
10  if (z > 0.) {
11  if (lineRight.cotLine() <= 0.) return Range(rBig, 0); //empty
12  float rMin = lineRight.rAtZ(z);
13  if (lineLeft.cotLine() <= 0) return Range(rMin-theTolerance.left(),rBig);
14  float rMax = lineLeft.rAtZ(z);
15  return Range(rMin-theTolerance.left(),rMax+theTolerance.right());
16  } else {
17  if (lineLeft.cotLine() >= 0.) return Range(rBig, 0); //empty
18  float rMin = lineLeft.rAtZ(z);
19  if (lineRight.cotLine()>= 0) return Range(rMin-theTolerance.left(),rBig);
20  float rMax = lineRight.rAtZ(z);
21  return Range(rMin-theTolerance.left(),rMax+theTolerance.right());
22  }
23 }
HitRZConstraint theRZ
Definition: HitRCheck.h:29
double double double z
float cotLine() const
const PixelRecoLineRZ & lineRight() const
PixelRecoRange< float > Range
float rAtZ(float z) const
Margin theTolerance
Definition: HitRCheck.h:30
const PixelRecoLineRZ & lineLeft() const
void HitRCheck::setTolerance ( const Margin tolerance)
inline

Definition at line 26 of file HitRCheck.h.

References theTolerance.

26 { theTolerance = tolerance; }
Margin theTolerance
Definition: HitRCheck.h:30
HitRCheck::theTolerance ( margin  )
inline

Definition at line 17 of file HitRCheck.h.

17 : theRZ(rz), theTolerance(margin) { }
HitRZConstraint theRZ
Definition: HitRCheck.h:29
Margin theTolerance
Definition: HitRCheck.h:30

Member Data Documentation

HitRCheck::__pad0__

Definition at line 17 of file HitRCheck.h.

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().