CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
CylindricalState Class Reference

#include <CylindricalState.h>

Public Types

typedef double Scalar
 
typedef RKSmallVector< Scalar, 5 > Vector
 

Public Member Functions

Scalar charge () const
 
 CylindricalState ()
 
 CylindricalState (const LocalPoint &pos, const LocalVector &mom, Scalar ch)
 
 CylindricalState (Scalar rho, const Vector &par, Scalar prSign)
 
const LocalVector momentum () const
 
const Vectorparameters () const
 
const LocalPoint position () const
 
double prSign () const
 
Scalar rho () const
 

Private Attributes

Vector par_
 
Scalar prSign_
 sign of local p_r More...
 
Scalar rho_
 

Detailed Description

State for solving the equation of motion with radius (in cylindrical coordinates) as free variable. The dependent variables are phi - azimuthal angle z - z coordinate dphi/dr - derivative of phi versus r dz/dr - derivative of z versus r q/p - charge over momentum magnitude

The coordinate system is externally defined

Definition at line 23 of file CylindricalState.h.

Member Typedef Documentation

◆ Scalar

typedef double CylindricalState::Scalar

Definition at line 25 of file CylindricalState.h.

◆ Vector

Definition at line 26 of file CylindricalState.h.

Constructor & Destructor Documentation

◆ CylindricalState() [1/3]

CylindricalState::CylindricalState ( )
inline

Definition at line 28 of file CylindricalState.h.

28 {}

◆ CylindricalState() [2/3]

CylindricalState::CylindricalState ( const LocalPoint pos,
const LocalVector mom,
Scalar  ch 
)
inline

Definition at line 30 of file CylindricalState.h.

30  {
31  rho_ = pos.perp();
32  Scalar cosphi = pos.x() / rho_;
33  Scalar sinphi = pos.y() / rho_;
34  Scalar p_rho = mom.x() * cosphi + mom.y() * sinphi;
35  Scalar p_phi = -mom.x() * sinphi + mom.y() * cosphi;
36 
37  par_(0) = pos.phi();
38  par_(1) = pos.z();
39  par_(2) = p_phi / (p_rho * rho_);
40  par_(3) = mom.z() / p_rho;
41  par_(4) = ch / mom.mag();
42 
43  prSign_ = p_rho > 0 ? 1.0 : -1.0;
44 
45  std::cout << "CylindricalState built from pos " << pos << " mom " << mom << " charge " << ch << std::endl;
46  std::cout << "p_rho " << p_rho << " p_phi " << p_phi << " dphi_drho " << par_(2) << std::endl;
47  std::cout << "Which results in " << position() << " mom " << momentum() << " charge " << charge()
48  << std::endl;
49  }

References ALCARECOTkAlJpsiMuMu_cff::charge, gather_cfg::cout, PV3DBase< T, PVType, FrameType >::mag(), position, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ CylindricalState() [3/3]

CylindricalState::CylindricalState ( Scalar  rho,
const Vector par,
Scalar  prSign 
)
inline

Definition at line 51 of file CylindricalState.h.

51 : par_(par), rho_(rho), prSign_(prSign) {}

Member Function Documentation

◆ charge()

Scalar CylindricalState::charge ( void  ) const
inline

Definition at line 69 of file CylindricalState.h.

69 { return par_(4) > 0 ? 1 : -1; }

◆ momentum()

const LocalVector CylindricalState::momentum ( ) const
inline

Definition at line 55 of file CylindricalState.h.

55  {
56  Scalar cosphi = cos(par_(0));
57  Scalar sinphi = sin(par_(0));
58  Scalar Q = sqrt(1 + rho_ * rho_ * par_(2) * par_(2) + par_(3) * par_(3));
59  Scalar P = std::abs(1. / par_(4));
60  Scalar p_rho = prSign_ * P / Q;
61  Scalar p_phi = rho_ * par_(2) * p_rho;
62  Scalar p_z = par_(3) * p_rho;
63  LocalVector result(p_rho * cosphi - p_phi * sinphi, p_rho * sinphi + p_phi * cosphi, p_z);
64  return result;
65  }

References funct::abs(), funct::cos(), mps_fire::result, funct::sin(), and mathSSE::sqrt().

Referenced by RKCylindricalDistance< T, N >::operator()().

◆ parameters()

const Vector& CylindricalState::parameters ( void  ) const
inline

Definition at line 67 of file CylindricalState.h.

67 { return par_; }

◆ position()

const LocalPoint CylindricalState::position ( ) const
inline

Definition at line 53 of file CylindricalState.h.

53 { return LocalPoint(LocalPoint::Cylindrical(rho_, par_(0), par_(1))); }

Referenced by RKCylindricalDistance< T, N >::operator()().

◆ prSign()

double CylindricalState::prSign ( ) const
inline

Definition at line 73 of file CylindricalState.h.

73 { return prSign_; }

◆ rho()

Scalar CylindricalState::rho ( ) const
inline

Definition at line 71 of file CylindricalState.h.

71 { return rho_; }

Referenced by Lepton.Lepton::absIsoFromEA(), and Muon.Muon::absIsoWithFSR().

Member Data Documentation

◆ par_

Vector CylindricalState::par_
private

Definition at line 76 of file CylindricalState.h.

◆ prSign_

Scalar CylindricalState::prSign_
private

sign of local p_r

Definition at line 78 of file CylindricalState.h.

◆ rho_

Scalar CylindricalState::rho_
private

Definition at line 77 of file CylindricalState.h.

Vector3DBase< float, LocalTag >
CylindricalState::rho
Scalar rho() const
Definition: CylindricalState.h:71
CylindricalState::Scalar
double Scalar
Definition: CylindricalState.h:25
CylindricalState::rho_
Scalar rho_
Definition: CylindricalState.h:77
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
CylindricalState::charge
Scalar charge() const
Definition: CylindricalState.h:69
CylindricalState::par_
Vector par_
Definition: CylindricalState.h:76
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
CylindricalState::momentum
const LocalVector momentum() const
Definition: CylindricalState.h:55
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Geom::Cylindrical2Cartesian
Definition: CoordinateSets.h:34
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
CylindricalState::prSign_
Scalar prSign_
sign of local p_r
Definition: CylindricalState.h:78
CylindricalState::prSign
double prSign() const
Definition: CylindricalState.h:73
CylindricalState::position
const LocalPoint position() const
Definition: CylindricalState.h:53
mps_fire.result
result
Definition: mps_fire.py:311
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
P
std::pair< OmniClusterRef, TrackingParticleRef > P
Definition: BDHadronTrackMonitoringAnalyzer.cc:203