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 | Private Member Functions | Static Private Member Functions | Private Attributes
PixelRecoLineRZ Class Reference

#include <PixelRecoLineRZ.h>

Public Types

typedef PixelRecoPointRZ LineOrigin
 

Public Member Functions

float cotLine () const
 
LineOrigin origin () const
 
 PixelRecoLineRZ ()
 
 PixelRecoLineRZ (const GlobalPoint &p1, const GlobalPoint &p2)
 
 PixelRecoLineRZ (const LineOrigin &aOrigin, float aCotLine, float transverseIP=0.f)
 
 PixelRecoLineRZ (const LineOrigin &aOrigin, const PixelRecoPointRZ &aPoint, float transverseIP=0.f)
 
float rAtZ (float z) const
 
float transverseIP () const
 
float transverseIP2 () const
 
float zAtR (float r) const
 

Private Member Functions

float addTIP (float val) const
 
float subTIP (float val) const
 

Static Private Member Functions

static float initCot (float dz, float dr)
 
static float initTIP2 (float x1, float y1, float x2, float y2)
 

Private Attributes

float theCotLine
 
LineOrigin theOrigin
 
float theTIP2
 

Detailed Description

two dimensional line in r-z coordinates. line is defined by the point and cotangent

Definition at line 12 of file PixelRecoLineRZ.h.

Member Typedef Documentation

Definition at line 15 of file PixelRecoLineRZ.h.

Constructor & Destructor Documentation

PixelRecoLineRZ::PixelRecoLineRZ ( )
inline

Definition at line 17 of file PixelRecoLineRZ.h.

17 { }
PixelRecoLineRZ::PixelRecoLineRZ ( const GlobalPoint p1,
const GlobalPoint p2 
)
inline

Definition at line 19 of file PixelRecoLineRZ.h.

20  : theTIP2 ( initTIP2( p1.x(), p1.y(), p2.x(), p2.y() ) ),
21  theOrigin ( LineOrigin( subTIP(p1.perp()), p1.z() ) ),
22  theCotLine ( initCot( p2.z()-theOrigin.z(), subTIP(p2.perp())-theOrigin.r() ) )
23  { }
T perp() const
Definition: PV3DBase.h:71
static float initCot(float dz, float dr)
T y() const
Definition: PV3DBase.h:62
static float initTIP2(float x1, float y1, float x2, float y2)
float subTIP(float val) const
T z() const
Definition: PV3DBase.h:63
LineOrigin theOrigin
float z() const
float r() const
PixelRecoPointRZ LineOrigin
T x() const
Definition: PV3DBase.h:61
PixelRecoLineRZ::PixelRecoLineRZ ( const LineOrigin aOrigin,
float  aCotLine,
float  transverseIP = 0.f 
)
inline

Definition at line 25 of file PixelRecoLineRZ.h.

27  theOrigin( subTIP(aOrigin.r()), aOrigin.z() ),
28  theCotLine(aCotLine) { }
float transverseIP() const
float subTIP(float val) const
LineOrigin theOrigin
PixelRecoLineRZ::PixelRecoLineRZ ( const LineOrigin aOrigin,
const PixelRecoPointRZ aPoint,
float  transverseIP = 0.f 
)
inline

Definition at line 30 of file PixelRecoLineRZ.h.

32  theOrigin( subTIP(aOrigin.r()), aOrigin.z() ),
33  theCotLine( initCot( aPoint.z()-theOrigin.z(), subTIP(aPoint.r())-theOrigin.r() ) )
34  { }
float transverseIP() const
static float initCot(float dz, float dr)
float subTIP(float val) const
LineOrigin theOrigin
float z() const
float r() const

Member Function Documentation

float PixelRecoLineRZ::addTIP ( float  val) const
inlineprivate

Definition at line 55 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), and theTIP2.

Referenced by origin(), and rAtZ().

56  { return theTIP2 ? std::sqrt(val * val + theTIP2) : val; }
T sqrt(T t)
Definition: SSEVec.h:46
float PixelRecoLineRZ::cotLine ( ) const
inline
static float PixelRecoLineRZ::initCot ( float  dz,
float  dr 
)
inlinestaticprivate

Definition at line 47 of file PixelRecoLineRZ.h.

References abs, alignCSCRings::e, and f.

48  { return (std::abs(dr) > 1.e-4f) ? dz/dr : 99999.f; }
#define abs(x)
Definition: mlp_lapack.h:159
double f[11][100]
static float PixelRecoLineRZ::initTIP2 ( float  x1,
float  y1,
float  x2,
float  y2 
)
inlinestaticprivate

Definition at line 49 of file PixelRecoLineRZ.h.

References prof2calltree::l.

50  {
51  double l = y1 * (x2 - x1) - x1 * (y2 - y1);
52  return l * l / ( (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) );
53  }
LineOrigin PixelRecoLineRZ::origin ( ) const
inline

Definition at line 39 of file PixelRecoLineRZ.h.

References addTIP(), PixelRecoPointRZ::r(), theOrigin, and PixelRecoPointRZ::z().

Referenced by HitEtaCheck::operator()().

39 { return LineOrigin( addTIP(theOrigin.r()), theOrigin.z() ); }
float addTIP(float val) const
LineOrigin theOrigin
float z() const
float r() const
PixelRecoPointRZ LineOrigin
float PixelRecoLineRZ::rAtZ ( float  z) const
inline

Definition at line 43 of file PixelRecoLineRZ.h.

References abs, addTIP(), alignCSCRings::e, f, PixelRecoPointRZ::r(), theCotLine, theOrigin, and PixelRecoPointRZ::z().

Referenced by MSLayer::crossing(), and HitRCheck::range().

44  { return (std::abs(theCotLine) > 1.e-4f) ? addTIP(theOrigin.r()+(z-theOrigin.z())/theCotLine) : 99999.f; }
#define abs(x)
Definition: mlp_lapack.h:159
double double double z
float addTIP(float val) const
double f[11][100]
LineOrigin theOrigin
float z() const
float r() const
float PixelRecoLineRZ::subTIP ( float  val) const
inlineprivate

Definition at line 57 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), and theTIP2.

Referenced by zAtR().

58  {
59  if (!theTIP2) return val;
60  double val2 = val * val;
61  return val2 > theTIP2 ? std::sqrt(val2 - theTIP2) : 0.;
62  }
T sqrt(T t)
Definition: SSEVec.h:46
float PixelRecoLineRZ::transverseIP ( ) const
inline

Definition at line 37 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), and theTIP2.

37 { return std::sqrt(theTIP2); }
T sqrt(T t)
Definition: SSEVec.h:46
float PixelRecoLineRZ::transverseIP2 ( ) const
inline

Definition at line 38 of file PixelRecoLineRZ.h.

References theTIP2.

38 { return theTIP2; }
float PixelRecoLineRZ::zAtR ( float  r) const
inline

Member Data Documentation

float PixelRecoLineRZ::theCotLine
private

Definition at line 67 of file PixelRecoLineRZ.h.

Referenced by cotLine(), rAtZ(), and zAtR().

LineOrigin PixelRecoLineRZ::theOrigin
private

Definition at line 66 of file PixelRecoLineRZ.h.

Referenced by origin(), rAtZ(), and zAtR().

float PixelRecoLineRZ::theTIP2
private

Definition at line 65 of file PixelRecoLineRZ.h.

Referenced by addTIP(), subTIP(), transverseIP(), and transverseIP2().