CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CartesianState.h
Go to the documentation of this file.
1 #ifndef CartesianState_H
2 #define CartesianState_H
3 
6 
8 public:
9 
10  typedef double Scalar;
13 
15  CartesianState( const Vector& v, Scalar s) : par_(v), charge_(s) {}
16  CartesianState( const Vector3D& pos, const Vector3D& mom, Scalar s) :
17  par_(pos,mom), charge_(s) {}
18 
19  const Vector3D& position() const { return par_.first();}
20  const Vector3D& momentum() const { return par_.second();}
21 
22  const Vector& parameters() const { return par_;}
23 
24  Scalar charge() const { return charge_;}
25 
26 private:
27 
30 
31 };
32 
33 inline CartesianState
35  return CartesianState(a.parameters()+b.parameters(), a.charge());
36 }
37 
38 inline CartesianState
40  return CartesianState(a.parameters()-b.parameters(), a.charge());
41 }
42 
44  return CartesianState( v.parameters()*s, v.charge());
45 }
47  return CartesianState( v.parameters()*s, v.charge());
48 }
49 
51  return CartesianState( v.parameters()/s, v.charge());
52 }
53 
54 
55 #endif
MatrixMeschach operator+(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
MatrixMeschach operator-(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
const V1 & first() const
Definition: VectorDoublet.h:16
Basic3DVector< long double > operator/(const Basic3DVector< long double > &v, S s)
Basic3DVector< Scalar > Vector3D
const Vector & parameters() const
Scalar charge() const
const V2 & second() const
Definition: VectorDoublet.h:17
double b
Definition: hdecay.h:120
const Vector3D & momentum() const
VectorDoublet< Vector3D, Vector3D > Vector
double a
Definition: hdecay.h:121
CartesianState(const Vector &v, Scalar s)
MatrixMeschach operator*(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
string s
Definition: asciidump.py:422
CartesianState(const Vector3D &pos, const Vector3D &mom, Scalar s)
const Vector3D & position() const
mathSSE::Vec4< T > v