test
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 #include "VectorDoublet.h"
7 
9 public:
10 
11  typedef double Scalar;
14 
16  CartesianState( const Vector& v, Scalar s) : par_(v), charge_(s) {}
17  CartesianState( const Vector3D& pos, const Vector3D& mom, Scalar s) :
18  par_(pos,mom), charge_(s) {}
19 
20  const Vector3D& position() const { return par_.first();}
21  const Vector3D& momentum() const { return par_.second();}
22 
23  const Vector& parameters() const { return par_;}
24 
25  Scalar charge() const { return charge_;}
26 
27 private:
28 
31 
32 };
33 
34 inline CartesianState
36  return CartesianState(a.parameters()+b.parameters(), a.charge());
37 }
38 
39 inline CartesianState
41  return CartesianState(a.parameters()-b.parameters(), a.charge());
42 }
43 
45  return CartesianState( v.parameters()*s, v.charge());
46 }
48  return CartesianState( v.parameters()*s, v.charge());
49 }
50 
52  return CartesianState( v.parameters()/s, v.charge());
53 }
54 
55 
56 #endif
MatrixMeschach operator+(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
MatrixMeschach operator-(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
Basic3DVector< long double > operator/(const Basic3DVector< long double > &v, S s)
Basic3DVector< Scalar > Vector3D
const Vector & parameters() const
Scalar charge() const
double b
Definition: hdecay.h:120
const Vector3D & momentum() const
#define dso_internal
VectorDoublet< Vector3D, Vector3D > Vector
double a
Definition: hdecay.h:121
CartesianState(const Vector &v, Scalar s)
MatrixMeschach operator*(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
CartesianState(const Vector3D &pos, const Vector3D &mom, Scalar s)
const Vector3D & position() const