GenParticle.cxx
Go to the documentation of this file.
1 // GENIE includes
2 #include "TLorentzVector.h"
3 
4 // NOvASoft includes
6 
7 using namespace genie::supernova;
8 
9 
10 //.......................................................................
11 void GenParticle::SetMom(const TVector3& mom)
12 {
13  fMom.SetVectM(mom, fM);
14 }
15 
16 
17 //.......................................................................
18 void GenParticle::SetMass(double mass)
19 {
20  fM = mass;
21 }
22 
23 
24 //.......................................................................
25 void GenParticle::SetDirection(const TVector3& dir)
26 {
27  fMom.SetVect(dir * fMom.E());
28 }
29 
30 
31 //.......................................................................
32 void GenParticle::SetT(double t)
33 {
34  fPos.SetT(t);
35 }
36 
37 
38 //.......................................................................
39 void GenParticle::SetE(double e)
40 {
41  fMom.SetE(e);
42 }
43 
44 
45 //.......................................................................
47 {
48  fPDG = pdg;
49 }
50 
51 
52 //.......................................................................
53 int GenParticle::PDG() const
54 {
55  return fPDG;
56 }
57 
58 
59 //.......................................................................
60 double GenParticle::W() const
61 {
62  return fW;
63 }
64 
65 
66 //.......................................................................
67 const TLorentzVector& GenParticle::Mom() const
68 {
69  return fMom;
70 }
71 
72 
73 //.......................................................................
74 const TLorentzVector& GenParticle::Pos() const
75 {
76  return fPos;
77 }
void SetMom(const TVector3 &mom)
Definition: GenParticle.cxx:11
const TLorentzVector & Mom() const
Definition: GenParticle.cxx:67
void SetDirection(const TVector3 &dir)
Definition: GenParticle.cxx:25
const TLorentzVector & Pos() const
Definition: GenParticle.cxx:74
TDirectory * dir
Definition: macro.C:5
Float_t e
Definition: plot.C:35