All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MCStep.h
Go to the documentation of this file.
1 /**
2  * \file MCStep.h
3  *
4  * \ingroup MCBase
5  *
6  * \brief Class def header for mcstep data container
7  *
8  * @author Kazu - Nevis 2014
9  */
10 
11 /** \addtogroup MCStep
12 
13  @{*/
14 
15 #ifndef MCSTEP_H
16 #define MCSTEP_H
17 
18 #include <vector>
19 #include <TLorentzVector.h>
20 #include <string>
22 
23 namespace sim{
24 
25  class MCStep {
26 
27  public:
28 
29  MCStep() {};
30 
31  MCStep(const TLorentzVector& p, const TLorentzVector& m)
32  : _position(p),
33  _momentum(m)
34  {}
35 
36  virtual ~MCStep(){}
37 
38  const TLorentzVector& Momentum() const {return _momentum;}
39 
40  const TLorentzVector& Position() const {return _position;}
41 
42  double X() const {return _position.X(); }
43  double Y() const {return _position.Y(); }
44  double Z() const {return _position.Z(); }
45  double T() const {return _position.T(); }
46  double Px() const {return _momentum.Px(); }
47  double Py() const {return _momentum.Py(); }
48  double Pz() const {return _momentum.Pz(); }
49  double E() const {return _momentum.E(); }
50 
51  void SetPosition(const TLorentzVector& v) { _position=v; };
52  void SetMomentum(const TLorentzVector& v) { _momentum=v; };
53 
54 
55  protected:
56 
57  TLorentzVector _position; // Position 4-vector (x,y,z,t) in [cm,cm,cm,ns]
58  TLorentzVector _momentum; // Momentum 4-vector (px,py,pz,E) in [MeV/c,MeV/c,Mev/c,MeV]
59 
60  };
61 }
62 
63 #endif
64 
65 /** @} */ // end of doxygen group
MCStep(const TLorentzVector &p, const TLorentzVector &m)
Definition: MCStep.h:31
pdgs p
Definition: selectors.fcl:22
TLorentzVector _position
Definition: MCStep.h:52
double T() const
Definition: MCStep.h:45
tuple m
now if test mode generate materials, CRT shell, world, gdml header else just generate CRT shell for u...
void SetMomentum(const TLorentzVector &v)
Definition: MCStep.h:52
double Px() const
Definition: MCStep.h:46
void SetPosition(const TLorentzVector &v)
Definition: MCStep.h:51
double Z() const
Definition: MCStep.h:44
double Py() const
Definition: MCStep.h:47
double Y() const
Definition: MCStep.h:43
virtual ~MCStep()
Definition: MCStep.h:36
const TLorentzVector & Momentum() const
Definition: MCStep.h:38
double E() const
Definition: MCStep.h:49
double Pz() const
Definition: MCStep.h:48
double X() const
Definition: MCStep.h:42
const TLorentzVector & Position() const
Definition: MCStep.h:40
MCStep()
Definition: MCStep.h:29
TLorentzVector _momentum
Definition: MCStep.h:58