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

typedef double CurvilinearState::Scalar

Definition at line 23 of file CurvilinearState.h.

Definition at line 26 of file CurvilinearState.h.

Definition at line 24 of file CurvilinearState.h.

Definition at line 25 of file CurvilinearState.h.

Constructor & Destructor Documentation

CurvilinearState::CurvilinearState ( )
inline

Definition at line 28 of file CurvilinearState.h.

28 {}
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::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

Scalar CurvilinearState::charge ( void  ) const
inline

Definition at line 53 of file CurvilinearState.h.

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

Definition at line 39 of file CurvilinearState.h.

References PVValHelper::dx, BeamSpotFakeParameters_cfi::dxdz, PVValHelper::dy, BeamSpotFakeParameters_cfi::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  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
T sqrt(T t)
Definition: SSEVec.h:19
Basic3DVector< Scalar > Vector3D
const V2 & second() const
Definition: VectorDoublet.h:17
Scalar pzSign_
sign of local pz
const Vector& CurvilinearState::parameters ( void  ) const
inline

Definition at line 51 of file CurvilinearState.h.

Referenced by operator*(), operator+(), operator-(), and operator/().

51 { return par_; }
const Vector3D CurvilinearState::position ( ) const
inline

Definition at line 37 of file CurvilinearState.h.

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

Definition at line 57 of file CurvilinearState.h.

Referenced by operator*(), operator+(), operator-(), and operator/().

57 { return pzSign_; }
Scalar pzSign_
sign of local pz
Scalar CurvilinearState::z ( ) const
inline

Member Data Documentation

Vector CurvilinearState::par_
private

Definition at line 60 of file CurvilinearState.h.

Scalar CurvilinearState::pzSign_
private

sign of local pz

Definition at line 62 of file CurvilinearState.h.

Scalar CurvilinearState::z_
private

Definition at line 61 of file CurvilinearState.h.