CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 14 of file PixelRecoLineRZ.h.

Constructor & Destructor Documentation

PixelRecoLineRZ::PixelRecoLineRZ ( )
inline

Definition at line 16 of file PixelRecoLineRZ.h.

16 {}
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())) {}
T perp() const
Definition: PV3DBase.h:69
static float initCot(float dz, float dr)
T y() const
Definition: PV3DBase.h:60
static float initTIP2(float x1, float y1, float x2, float y2)
float subTIP(float val) const
T z() const
Definition: PV3DBase.h:61
LineOrigin theOrigin
float z() const
float r() const
PixelRecoPointRZ LineOrigin
T x() const
Definition: PV3DBase.h:59
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::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
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 48 of file PixelRecoLineRZ.h.

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

Referenced by origin(), and rAtZ().

float PixelRecoLineRZ::cotLine ( ) const
inline
static float PixelRecoLineRZ::initCot ( float  dz,
float  dr 
)
inlinestaticprivate

Definition at line 42 of file PixelRecoLineRZ.h.

References funct::abs(), alignCSCRings::e, and validate-o2o-wbm::f.

42 { return (std::abs(dr) > 1.e-4f) ? dz / dr : 99999.f; }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static float PixelRecoLineRZ::initTIP2 ( float  x1,
float  y1,
float  x2,
float  y2 
)
inlinestaticprivate

Definition at line 43 of file PixelRecoLineRZ.h.

References cmsLHEtoEOSManager::l.

43  {
44  double l = y1 * (x2 - x1) - x1 * (y2 - y1);
45  return l * l / ((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
46  }
LineOrigin PixelRecoLineRZ::origin ( ) const
inline

Definition at line 34 of file PixelRecoLineRZ.h.

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

Referenced by PixelTripletLargeTipGenerator::hitTriplets().

34 { 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 37 of file PixelRecoLineRZ.h.

References funct::abs(), addTIP(), alignCSCRings::e, validate-o2o-wbm::f, PixelRecoPointRZ::r(), theCotLine, theOrigin, and PixelRecoPointRZ::z().

Referenced by MSLayer::crossing().

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
LineOrigin theOrigin
float z() const
float r() const
float PixelRecoLineRZ::subTIP ( float  val) const
inlineprivate

Definition at line 49 of file PixelRecoLineRZ.h.

References mathSSE::sqrt(), theTIP2, and hgcalPerformanceValidation::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
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
float PixelRecoLineRZ::transverseIP2 ( ) const
inline

Definition at line 33 of file PixelRecoLineRZ.h.

References theTIP2.

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

Definition at line 36 of file PixelRecoLineRZ.h.

References PixelRecoPointRZ::r(), subTIP(), theCotLine, theOrigin, and PixelRecoPointRZ::z().

Referenced by RectangularEtaPhiTrackingRegion::checkRZOld(), and MSLayer::crossing().

36 { return theOrigin.z() + (subTIP(r) - theOrigin.r()) * theCotLine; }
float subTIP(float val) const
LineOrigin theOrigin
float z() const
float r() const

Member Data Documentation

float PixelRecoLineRZ::theCotLine
private

Definition at line 59 of file PixelRecoLineRZ.h.

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

LineOrigin PixelRecoLineRZ::theOrigin
private

Definition at line 58 of file PixelRecoLineRZ.h.

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

float PixelRecoLineRZ::theTIP2
private

Definition at line 57 of file PixelRecoLineRZ.h.

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