CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

PixelRecoLineRZ Class Reference

#include <PixelRecoLineRZ.h>

List of all members.

Public Types

typedef PixelRecoPointRZ LineOrigin

Public Member Functions

float cotLine () const
LineOrigin origin () const
 PixelRecoLineRZ ()
 PixelRecoLineRZ (const LineOrigin &aOrigin, const PixelRecoPointRZ &aPoint, float transverseIP=0.f)
 PixelRecoLineRZ (const GlobalPoint &p1, const GlobalPoint &p2)
 PixelRecoLineRZ (const LineOrigin &aOrigin, float aCotLine, 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.

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

Definition at line 19 of file PixelRecoLineRZ.h.

    : theTIP2 ( initTIP2( p1.x(), p1.y(), p2.x(), p2.y() ) ),
      theOrigin ( LineOrigin( subTIP(p1.perp()), p1.z() ) ),
      theCotLine ( initCot( p2.z()-theOrigin.z(), subTIP(p2.perp())-theOrigin.r() ) )
    { }
PixelRecoLineRZ::PixelRecoLineRZ ( const LineOrigin aOrigin,
float  aCotLine,
float  transverseIP = 0.f 
) [inline]

Definition at line 25 of file PixelRecoLineRZ.h.

    : theTIP2( transverseIP*transverseIP ),
      theOrigin( subTIP(aOrigin.r()), aOrigin.z() ),
      theCotLine(aCotLine) { }
PixelRecoLineRZ::PixelRecoLineRZ ( const LineOrigin aOrigin,
const PixelRecoPointRZ aPoint,
float  transverseIP = 0.f 
) [inline]

Definition at line 30 of file PixelRecoLineRZ.h.

    : theTIP2( transverseIP*transverseIP ),
      theOrigin( subTIP(aOrigin.r()), aOrigin.z() ),
      theCotLine( initCot( aPoint.z()-theOrigin.z(), subTIP(aPoint.r())-theOrigin.r() ) )
    { } 

Member Function Documentation

float PixelRecoLineRZ::addTIP ( float  val) const [inline, private]

Definition at line 55 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), and theTIP2.

Referenced by origin(), and rAtZ().

    { return theTIP2 ? std::sqrt(val * val + theTIP2) : val; }
float PixelRecoLineRZ::cotLine ( ) const [inline]
static float PixelRecoLineRZ::initCot ( float  dz,
float  dr 
) [inline, static, private]

Definition at line 47 of file PixelRecoLineRZ.h.

References abs, alignCSCRings::e, and f.

    { return (std::abs(dr) > 1.e-4f)  ? dz/dr : 99999.f; }
static float PixelRecoLineRZ::initTIP2 ( float  x1,
float  y1,
float  x2,
float  y2 
) [inline, static, private]

Definition at line 49 of file PixelRecoLineRZ.h.

References prof2calltree::l.

    {
      double l = y1 * (x2 - x1) - x1 * (y2 - y1);
      return l * l / ( (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) );
    }
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()().

{ return LineOrigin( addTIP(theOrigin.r()), theOrigin.z() ); }
float PixelRecoLineRZ::rAtZ ( float  z) const [inline]
float PixelRecoLineRZ::subTIP ( float  val) const [inline, private]

Definition at line 57 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), and theTIP2.

Referenced by zAtR().

    {
      if (!theTIP2) return val;
      double val2 = val * val;
      return val2 > theTIP2 ? std::sqrt(val2 - theTIP2) : 0.;
    }
float PixelRecoLineRZ::transverseIP ( ) const [inline]

Definition at line 37 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), and theTIP2.

{ return std::sqrt(theTIP2); }
float PixelRecoLineRZ::transverseIP2 ( ) const [inline]

Definition at line 38 of file PixelRecoLineRZ.h.

References theTIP2.

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

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