1 #ifndef CurvilinearState_H 2 #define CurvilinearState_H 32 par_(v), z_(z), pzSign_(pzsign) {}
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.) {}
39 return Vector3D(par_.first().x(),par_.first().y(),z_);
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);
50 return Vector3D(dx*p, dy*p, dz*p);
55 Scalar
charge()
const {
return par_.second().z()>0 ? 1 : -1;}
57 Scalar
z()
const {
return z_;}
59 double pzSign()
const {
return pzSign_;}
Basic2DVector< Scalar > Vector2D
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
CurvilinearState operator*(const CurvilinearState &v, const CurvilinearState::Scalar &s)
CurvilinearState operator-(const CurvilinearState &a, const CurvilinearState &b)
CurvilinearState(const Vector &v, Scalar z, Scalar pzsign)
VectorDoublet< Vector2D, Vector3D > Vector
Basic3DVector< Scalar > Vector3D
const Vector3D momentum() const
CurvilinearState operator/(const CurvilinearState &v, const CurvilinearState::Scalar &s)
const Vector & parameters() const
const Vector3D position() const
CurvilinearState(const Vector3D &pos, const Vector3D &p, Scalar ch)
Scalar pzSign_
sign of local pz
CurvilinearState operator+(const CurvilinearState &a, const CurvilinearState &b)