CMS 3D CMS Logo

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

◆ LineOrigin

Definition at line 14 of file PixelRecoLineRZ.h.

Constructor & Destructor Documentation

◆ PixelRecoLineRZ() [1/4]

PixelRecoLineRZ::PixelRecoLineRZ ( )
inline

Definition at line 16 of file PixelRecoLineRZ.h.

16 {}

◆ PixelRecoLineRZ() [2/4]

PixelRecoLineRZ::PixelRecoLineRZ ( const GlobalPoint p1,
const GlobalPoint p2 
)
inline

Definition at line 18 of file PixelRecoLineRZ.h.

19  : theTIP2(initTIP2(p1.x(), p1.y(), p2.x(), p2.y())),
20  theOrigin(LineOrigin(subTIP(p1.perp()), p1.z())),
21  theCotLine(initCot(p2.z() - theOrigin.z(), subTIP(p2.perp()) - theOrigin.r())) {}
float subTIP(float val) const
static float initCot(float dz, float dr)
static float initTIP2(float x1, float y1, float x2, float y2)
LineOrigin theOrigin
float r() const
PixelRecoPointRZ LineOrigin
float z() const

◆ PixelRecoLineRZ() [3/4]

PixelRecoLineRZ::PixelRecoLineRZ ( const LineOrigin aOrigin,
float  aCotLine,
float  transverseIP = 0.f 
)
inline

Definition at line 23 of file PixelRecoLineRZ.h.

24  : theTIP2(transverseIP * transverseIP), theOrigin(subTIP(aOrigin.r()), aOrigin.z()), theCotLine(aCotLine) {}
float transverseIP() const
float subTIP(float val) const
LineOrigin theOrigin

◆ PixelRecoLineRZ() [4/4]

PixelRecoLineRZ::PixelRecoLineRZ ( const LineOrigin aOrigin,
const PixelRecoPointRZ aPoint,
float  transverseIP = 0.f 
)
inline

Definition at line 26 of file PixelRecoLineRZ.h.

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

Member Function Documentation

◆ addTIP()

float PixelRecoLineRZ::addTIP ( float  val) const
inlineprivate

Definition at line 48 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), theTIP2, and heppy_batch::val.

Referenced by origin(), and rAtZ().

48 { return theTIP2 ? std::sqrt(val * val + theTIP2) : val; }
T sqrt(T t)
Definition: SSEVec.h:19

◆ cotLine()

float PixelRecoLineRZ::cotLine ( ) const
inline

◆ initCot()

static float PixelRecoLineRZ::initCot ( float  dz,
float  dr 
)
inlinestaticprivate

Definition at line 42 of file PixelRecoLineRZ.h.

References funct::abs(), flavorHistoryFilter_cfi::dr, PVValHelper::dz, MillePedeFileConverter_cfg::e, and f.

42 { return (std::abs(dr) > 1.e-4f) ? dz / dr : 99999.f; }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]

◆ initTIP2()

static float PixelRecoLineRZ::initTIP2 ( float  x1,
float  y1,
float  x2,
float  y2 
)
inlinestaticprivate

◆ origin()

LineOrigin PixelRecoLineRZ::origin ( ) const
inline

Definition at line 34 of file PixelRecoLineRZ.h.

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

34 { return LineOrigin(addTIP(theOrigin.r()), theOrigin.z()); }
float addTIP(float val) const
LineOrigin theOrigin
float r() const
PixelRecoPointRZ LineOrigin
float z() const

◆ rAtZ()

float PixelRecoLineRZ::rAtZ ( float  z) const
inline

Definition at line 37 of file PixelRecoLineRZ.h.

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

37  {
38  return (std::abs(theCotLine) > 1.e-4f) ? addTIP(theOrigin.r() + (z - theOrigin.z()) / theCotLine) : 99999.f;
39  }
float addTIP(float val) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
LineOrigin theOrigin
float r() const
float z() const

◆ subTIP()

float PixelRecoLineRZ::subTIP ( float  val) const
inlineprivate

Definition at line 49 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), theTIP2, and heppy_batch::val.

Referenced by zAtR().

49  {
50  if (!theTIP2)
51  return val;
52  float val2 = val * val;
53  return val2 > theTIP2 ? std::sqrt(val2 - theTIP2) : 0.;
54  }
T sqrt(T t)
Definition: SSEVec.h:19

◆ transverseIP()

float PixelRecoLineRZ::transverseIP ( ) const
inline

Definition at line 32 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), and theTIP2.

32 { return std::sqrt(theTIP2); }
T sqrt(T t)
Definition: SSEVec.h:19

◆ transverseIP2()

float PixelRecoLineRZ::transverseIP2 ( ) const
inline

Definition at line 33 of file PixelRecoLineRZ.h.

References theTIP2.

33 { return theTIP2; }

◆ zAtR()

float PixelRecoLineRZ::zAtR ( float  r) const
inline

Member Data Documentation

◆ theCotLine

float PixelRecoLineRZ::theCotLine
private

Definition at line 59 of file PixelRecoLineRZ.h.

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

◆ theOrigin

LineOrigin PixelRecoLineRZ::theOrigin
private

Definition at line 58 of file PixelRecoLineRZ.h.

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

◆ theTIP2

float PixelRecoLineRZ::theTIP2
private

Definition at line 57 of file PixelRecoLineRZ.h.

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