CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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, Vector3D
Vector
 
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 24 of file CurvilinearState.h.

Definition at line 27 of file CurvilinearState.h.

Definition at line 25 of file CurvilinearState.h.

Definition at line 26 of file CurvilinearState.h.

Constructor & Destructor Documentation

CurvilinearState::CurvilinearState ( )
inline

Definition at line 29 of file CurvilinearState.h.

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

Definition at line 31 of file CurvilinearState.h.

31  :
32  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 34 of file CurvilinearState.h.

34  :
35  par_(Vector2D(pos.x(),pos.y()), Vector3D( p.x()/p.z(), p.y()/p.z(), ch/p.mag())),
36  z_(pos.z()), 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 55 of file CurvilinearState.h.

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

Definition at line 42 of file CurvilinearState.h.

References AlCaHLTBitMon_ParallelJobs::p, and mathSSE::sqrt().

42  {
43  Scalar p = 1./fabs(par_.second().z());
44  if ( p>1.e9 ) p = 1.e9;
45  Scalar dxdz = par_.second().x();
46  Scalar dydz = par_.second().y();
47  Scalar dz = pzSign_/sqrt(1. + dxdz*dxdz + dydz*dydz);
48  Scalar dx = dz*dxdz;
49  Scalar dy = dz*dydz;
50  return Vector3D(dx*p, dy*p, dz*p);
51  }
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:18
Basic3DVector< Scalar > Vector3D
const V2 & second() const
Definition: VectorDoublet.h:18
Scalar pzSign_
sign of local pz
const Vector& CurvilinearState::parameters ( void  ) const
inline

Definition at line 53 of file CurvilinearState.h.

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

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

Definition at line 38 of file CurvilinearState.h.

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

Definition at line 59 of file CurvilinearState.h.

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

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

Definition at line 57 of file CurvilinearState.h.

Referenced by operator*(), operator+(), operator-(), operator/(), and geometryXMLparser.Alignable::pos().

57 {return z_;}

Member Data Documentation

Vector CurvilinearState::par_
private

Definition at line 63 of file CurvilinearState.h.

Scalar CurvilinearState::pzSign_
private

sign of local pz

Definition at line 65 of file CurvilinearState.h.

Scalar CurvilinearState::z_
private

Definition at line 64 of file CurvilinearState.h.