CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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  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) : par_(pos, mom), charge_(s) {}
17 
18  const Vector3D& position() const { return par_.first(); }
19  const Vector3D& momentum() const { return par_.second(); }
20 
21  const Vector& parameters() const { return par_; }
22 
23  Scalar charge() const { return charge_; }
24 
25 private:
28 };
29 
31  return CartesianState(a.parameters() + b.parameters(), a.charge());
32 }
33 
35  return CartesianState(a.parameters() - b.parameters(), a.charge());
36 }
37 
39  return CartesianState(v.parameters() * s, v.charge());
40 }
42  return CartesianState(v.parameters() * s, v.charge());
43 }
44 
46  return CartesianState(v.parameters() / s, v.charge());
47 }
48 
49 #endif
MatrixMeschach operator+(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
MatrixMeschach operator-(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
Basic3DVector< Scalar > Vector3D
const Vector & parameters() const
Scalar charge() const
#define dso_internal
Definition: Visibility.h:13
T1 operator/(const Phi< T1, Range > &a, const Phi< T1, Range > &b)
Division.
Definition: Phi.h:176
double b
Definition: hdecay.h:118
const Vector3D & momentum() const
double a
Definition: hdecay.h:119
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
VectorDoublet< Vector3D, Vector3D > Vector