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, const PixelRecoPointRZ &aPoint, float transverseIP=0.f)
 
 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

◆ 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())) {}

◆ 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) {}

◆ 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())) {}

Member Function Documentation

◆ addTIP()

float PixelRecoLineRZ::addTIP ( float  val) const
inlineprivate

Definition at line 48 of file PixelRecoLineRZ.h.

48 { return theTIP2 ? std::sqrt(val * val + theTIP2) : val; }

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

Referenced by origin(), and rAtZ().

◆ cotLine()

float PixelRecoLineRZ::cotLine ( ) const
inline

◆ initCot()

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

Definition at line 42 of file PixelRecoLineRZ.h.

42 { return (std::abs(dr) > 1.e-4f) ? dz / dr : 99999.f; }

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

◆ initTIP2()

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

Definition at line 43 of file PixelRecoLineRZ.h.

43  {
44  double l = y1 * (x2 - x1) - x1 * (y2 - y1);
45  return l * l / ((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
46  }

References cmsLHEtoEOSManager::l, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.

◆ origin()

LineOrigin PixelRecoLineRZ::origin ( ) const
inline

Definition at line 34 of file PixelRecoLineRZ.h.

34 { return LineOrigin(addTIP(theOrigin.r()), theOrigin.z()); }

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

◆ rAtZ()

float PixelRecoLineRZ::rAtZ ( float  z) const
inline

Definition at line 37 of file PixelRecoLineRZ.h.

37  {
38  return (std::abs(theCotLine) > 1.e-4f) ? addTIP(theOrigin.r() + (z - theOrigin.z()) / theCotLine) : 99999.f;
39  }

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

◆ subTIP()

float PixelRecoLineRZ::subTIP ( float  val) const
inlineprivate

Definition at line 49 of file PixelRecoLineRZ.h.

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

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

Referenced by zAtR().

◆ transverseIP()

float PixelRecoLineRZ::transverseIP ( ) const
inline

Definition at line 32 of file PixelRecoLineRZ.h.

32 { return std::sqrt(theTIP2); }

References mathSSE::sqrt(), and theTIP2.

◆ transverseIP2()

float PixelRecoLineRZ::transverseIP2 ( ) const
inline

Definition at line 33 of file PixelRecoLineRZ.h.

33 { return theTIP2; }

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

PixelRecoPointRZ::r
float r() const
Definition: PixelRecoPointRZ.h:10
PixelRecoLineRZ::theCotLine
float theCotLine
Definition: PixelRecoLineRZ.h:59
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
PixelRecoLineRZ::theTIP2
float theTIP2
Definition: PixelRecoLineRZ.h:57
PixelRecoPointRZ::z
float z() const
Definition: PixelRecoPointRZ.h:11
PixelRecoLineRZ::LineOrigin
PixelRecoPointRZ LineOrigin
Definition: PixelRecoLineRZ.h:14
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
PixelRecoLineRZ::initTIP2
static float initTIP2(float x1, float y1, float x2, float y2)
Definition: PixelRecoLineRZ.h:43
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
p2
double p2[4]
Definition: TauolaWrapper.h:90
PixelRecoLineRZ::subTIP
float subTIP(float val) const
Definition: PixelRecoLineRZ.h:49
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
PixelRecoLineRZ::initCot
static float initCot(float dz, float dr)
Definition: PixelRecoLineRZ.h:42
PixelRecoLineRZ::transverseIP
float transverseIP() const
Definition: PixelRecoLineRZ.h:32
p1
double p1[4]
Definition: TauolaWrapper.h:89
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
alignCSCRings.r
r
Definition: alignCSCRings.py:93
PixelRecoLineRZ::theOrigin
LineOrigin theOrigin
Definition: PixelRecoLineRZ.h:58
heppy_batch.val
val
Definition: heppy_batch.py:351
PVValHelper::dz
Definition: PVValidationHelpers.h:50
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PixelRecoLineRZ::addTIP
float addTIP(float val) const
Definition: PixelRecoLineRZ.h:48
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37