CMS 3D CMS Logo

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

#include <CurvilinearState.h>

Public Types

typedef double Scalar
 
typedef VectorDoublet< Vector2D, Vector3DVector
 
typedef Basic2DVector< ScalarVector2D
 
typedef Basic3DVector< ScalarVector3D
 

Public Member Functions

Scalar charge () const
 
 CurvilinearState ()
 
 CurvilinearState (const Vector &v, Scalar z, Scalar pzsign)
 
 CurvilinearState (const Vector3D &pos, const Vector3D &p, Scalar ch)
 
const Vector3D momentum () const
 
const Vectorparameters () const
 
const Vector3D position () const
 
double pzSign () const
 
Scalar z () const
 

Private Attributes

Vector par_
 
Scalar pzSign_
 sign of local pz More...
 
Scalar z_
 

Detailed Description

State for solving the equation of motion with Z as free variable. The dependent variables are x - x coordinate y - y coordinate dx/dz - derivative of x versus z dy/dz - derivative of y versus z q/p - charge over momentum magnitude

The coordinate system is externally defined

Definition at line 21 of file CurvilinearState.h.

Member Typedef Documentation

◆ Scalar

typedef double CurvilinearState::Scalar

Definition at line 23 of file CurvilinearState.h.

◆ Vector

Definition at line 26 of file CurvilinearState.h.

◆ Vector2D

Definition at line 24 of file CurvilinearState.h.

◆ Vector3D

Definition at line 25 of file CurvilinearState.h.

Constructor & Destructor Documentation

◆ CurvilinearState() [1/3]

CurvilinearState::CurvilinearState ( )
inline

Definition at line 28 of file CurvilinearState.h.

28 {}

◆ CurvilinearState() [2/3]

CurvilinearState::CurvilinearState ( const Vector v,
Scalar  z,
Scalar  pzsign 
)
inline

Definition at line 30 of file CurvilinearState.h.

30 : par_(v), z_(z), pzSign_(pzsign) {}
Scalar z() const
Scalar pzSign_
sign of local pz

◆ CurvilinearState() [3/3]

CurvilinearState::CurvilinearState ( const Vector3D pos,
const Vector3D p,
Scalar  ch 
)
inline

Definition at line 32 of file CurvilinearState.h.

33  : par_(Vector2D(pos.x(), pos.y()), Vector3D(p.x() / p.z(), p.y() / p.z(), ch / p.mag())),
34  z_(pos.z()),
35  pzSign_(p.z() > 0. ? 1. : -1.) {}
Basic2DVector< Scalar > Vector2D
Basic3DVector< Scalar > Vector3D
Scalar pzSign_
sign of local pz

Member Function Documentation

◆ charge()

Scalar CurvilinearState::charge ( void  ) const
inline

Definition at line 53 of file CurvilinearState.h.

53 { return par_.second().z() > 0 ? 1 : -1; }
const V2 & second() const
Definition: VectorDoublet.h:17
T z() const
Cartesian z coordinate.

◆ momentum()

const Vector3D CurvilinearState::momentum ( ) const
inline

Definition at line 39 of file CurvilinearState.h.

References PVValHelper::dx, dxdz, PVValHelper::dy, dydz, PVValHelper::dz, AlCaHLTBitMon_ParallelJobs::p, and mathSSE::sqrt().

39  {
40  Scalar p = 1. / fabs(par_.second().z());
41  if (p > 1.e9)
42  p = 1.e9;
43  Scalar dxdz = par_.second().x();
44  Scalar dydz = par_.second().y();
45  Scalar dz = pzSign_ / sqrt(1. + dxdz * dxdz + dydz * dydz);
46  Scalar dx = dz * dxdz;
47  Scalar dy = dz * dydz;
48  return Vector3D(dx * p, dy * p, dz * p);
49  }
float dydz
T x() const
Cartesian x coordinate.
float dxdz
T y() const
Cartesian y coordinate.
const V2 & second() const
Definition: VectorDoublet.h:17
T sqrt(T t)
Definition: SSEVec.h:19
Basic3DVector< Scalar > Vector3D
T z() const
Cartesian z coordinate.
Scalar pzSign_
sign of local pz

◆ parameters()

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

Definition at line 51 of file CurvilinearState.h.

51 { return par_; }

◆ position()

const Vector3D CurvilinearState::position ( ) const
inline

Definition at line 37 of file CurvilinearState.h.

37 { return Vector3D(par_.first().x(), par_.first().y(), z_); }
T y() const
Cartesian y coordinate.
const V1 & first() const
Definition: VectorDoublet.h:16
Basic3DVector< Scalar > Vector3D
T x() const
Cartesian x coordinate.

◆ pzSign()

double CurvilinearState::pzSign ( ) const
inline

Definition at line 57 of file CurvilinearState.h.

57 { return pzSign_; }
Scalar pzSign_
sign of local pz

◆ z()

Scalar CurvilinearState::z ( ) const
inline

Definition at line 55 of file CurvilinearState.h.

Referenced by geometryXMLparser.Alignable::pos(), and ntupleDataFormat._HitObject::r3D().

55 { return z_; }

Member Data Documentation

◆ par_

Vector CurvilinearState::par_
private

Definition at line 60 of file CurvilinearState.h.

◆ pzSign_

Scalar CurvilinearState::pzSign_
private

sign of local pz

Definition at line 62 of file CurvilinearState.h.

◆ z_

Scalar CurvilinearState::z_
private

Definition at line 61 of file CurvilinearState.h.