LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MCStep.h
Go to the documentation of this file.
1 
15 #ifndef MCSTEP_H
16 #define MCSTEP_H
17 
19 #include <TLorentzVector.h>
20 #include <string>
21 #include <vector>
22 
23 namespace sim {
24 
25  class MCStep {
26 
27  public:
28  MCStep(){};
29 
30  MCStep(const TLorentzVector& p, const TLorentzVector& m) : _position(p), _momentum(m) {}
31 
32  virtual ~MCStep() {}
33 
34  const TLorentzVector& Momentum() const { return _momentum; }
35 
36  const TLorentzVector& Position() const { return _position; }
37 
38  double X() const { return _position.X(); }
39  double Y() const { return _position.Y(); }
40  double Z() const { return _position.Z(); }
41  double T() const { return _position.T(); }
42  double Px() const { return _momentum.Px(); }
43  double Py() const { return _momentum.Py(); }
44  double Pz() const { return _momentum.Pz(); }
45  double E() const { return _momentum.E(); }
46 
47  void SetPosition(const TLorentzVector& v) { _position = v; };
48  void SetMomentum(const TLorentzVector& v) { _momentum = v; };
49 
50  protected:
51  TLorentzVector _position; // Position 4-vector (x,y,z,t) in [cm,cm,cm,ns]
52  TLorentzVector _momentum; // Momentum 4-vector (px,py,pz,E) in [MeV/c,MeV/c,Mev/c,MeV]
53  };
54 }
55 
56 #endif
57  // end of doxygen group
MCStep(const TLorentzVector &p, const TLorentzVector &m)
Definition: MCStep.h:30
TLorentzVector _position
Definition: MCStep.h:48
double T() const
Definition: MCStep.h:41
void SetMomentum(const TLorentzVector &v)
Definition: MCStep.h:48
double Px() const
Definition: MCStep.h:42
void SetPosition(const TLorentzVector &v)
Definition: MCStep.h:47
double Z() const
Definition: MCStep.h:40
double Py() const
Definition: MCStep.h:43
double Y() const
Definition: MCStep.h:39
Monte Carlo Simulation.
virtual ~MCStep()
Definition: MCStep.h:32
const TLorentzVector & Momentum() const
Definition: MCStep.h:34
double E() const
Definition: MCStep.h:45
double Pz() const
Definition: MCStep.h:44
double X() const
Definition: MCStep.h:38
const TLorentzVector & Position() const
Definition: MCStep.h:36
MCStep()
Definition: MCStep.h:28
TLorentzVector _momentum
Definition: MCStep.h:52