CMS 3D CMS Logo

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
Visibility.h
CartesianState::charge
Scalar charge() const
Definition: CartesianState.h:23
CartesianState::CartesianState
CartesianState()
Definition: CartesianState.h:14
operator-
CartesianState operator-(const CartesianState &a, const CartesianState &b)
Definition: CartesianState.h:34
pos
Definition: PixelAliasList.h:18
operator/
CartesianState operator/(const CartesianState &v, const CartesianState::Scalar &s)
Definition: CartesianState.h:45
CartesianState::charge_
Scalar charge_
Definition: CartesianState.h:27
Basic3DVector.h
findQualityFiles.v
v
Definition: findQualityFiles.py:179
CartesianState::momentum
const Vector3D & momentum() const
Definition: CartesianState.h:19
VectorDoublet.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CartesianState
Definition: CartesianState.h:8
CartesianState::Vector3D
Basic3DVector< Scalar > Vector3D
Definition: CartesianState.h:11
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
CartesianState::Scalar
double Scalar
Definition: CartesianState.h:10
dso_internal
#define dso_internal
Definition: Visibility.h:13
CartesianState::position
const Vector3D & position() const
Definition: CartesianState.h:18
CartesianState::Vector
VectorDoublet< Vector3D, Vector3D > Vector
Definition: CartesianState.h:12
CartesianState::CartesianState
CartesianState(const Vector3D &pos, const Vector3D &mom, Scalar s)
Definition: CartesianState.h:16
operator*
CartesianState operator*(const CartesianState &v, const CartesianState::Scalar &s)
Definition: CartesianState.h:38
VectorDoublet< Vector3D, Vector3D >
CartesianState::CartesianState
CartesianState(const Vector &v, Scalar s)
Definition: CartesianState.h:15
Basic3DVector< Scalar >
operator+
CartesianState operator+(const CartesianState &a, const CartesianState &b)
Definition: CartesianState.h:30
CartesianState::parameters
const Vector & parameters() const
Definition: CartesianState.h:21
CartesianState::par_
Vector par_
Definition: CartesianState.h:26