CbmRoot
UParticle.h
Go to the documentation of this file.
1 #ifndef UPARTICLE_H
2 #define UPARTICLE_H
3 
4 #include "TLorentzVector.h"
5 #include "TObject.h"
6 
7 class TParticle;
8 
9 
10 class UParticle : public TObject {
11 
12 private:
13  Int_t fIndex; // index of this particle
14  Int_t fPdg; // PDG code
15  Int_t fStatus; // Status
16  Int_t fParent; // Index of parent
17  Int_t fParentDecay; // Parent decay index
18  Int_t fMate; // index of last collision partner
19  Int_t fDecay; // decay index (-1 if not decayed)
20  Int_t fChild[2]; // index of first and last child
21  Double32_t fPx; // px (GeV)
22  Double32_t fPy; // py (GeV)
23  Double32_t fPz; // pz (GeV)
24  Double32_t fE; // Energy (GeV)
25  Double32_t fX; // x (fm)
26  Double32_t fY; // y (fm)
27  Double32_t fZ; // z (fm)
28  Double32_t fT; // t (fm)
29  Double32_t fWeight; // weight
30 
31 public:
32  UParticle();
33  UParticle(Int_t index,
34  Int_t pdg,
35  Int_t status,
36  Int_t parent,
37  Int_t parentDecay,
38  Int_t mate,
39  Int_t decay,
40  Int_t child[2],
41  Double_t px,
42  Double_t py,
43  Double_t pz,
44  Double_t e,
45  Double_t x,
46  Double_t y,
47  Double_t z,
48  Double_t t,
49  Double_t weight);
50  UParticle(Int_t index,
51  Int_t pdg,
52  Int_t status,
53  Int_t parent,
54  Int_t parentDecay,
55  Int_t mate,
56  Int_t decay,
57  Int_t child[2],
58  TLorentzVector mom,
59  TLorentzVector pos,
60  Double_t weight);
61  UParticle(const UParticle& right);
62  UParticle(const TParticle& right);
63  virtual ~UParticle();
64  const UParticle& operator=(const UParticle& right);
65  const UParticle& operator=(const TParticle& right);
66  Bool_t operator==(const UParticle& right) const;
67  void Print(Option_t* = "") const;
68  inline Int_t GetIndex() const { return fIndex; }
69  inline Int_t GetPdg() const { return fPdg; }
70  inline Int_t GetStatus() const { return fStatus; }
71  inline Int_t GetParent() const { return fParent; }
72  inline Int_t GetParentDecay() const { return fParentDecay; }
73  inline Int_t GetMate() const { return fMate; }
74  inline Int_t GetDecay() const { return fDecay; }
75  inline Int_t GetFirstChild() const { return fChild[0]; }
76  inline Int_t GetLastChild() const { return fChild[1]; }
77  inline Double_t Px() const { return fPx; }
78  inline Double_t Py() const { return fPy; }
79  inline Double_t Pz() const { return fPz; }
80  inline Double_t E() const { return fE; }
81  inline TLorentzVector GetMomentum() const {
82  return TLorentzVector(fPx, fPy, fPz, fE);
83  }
84  inline void Momentum(TLorentzVector& mom) const {
85  mom.SetPxPyPzE(fPx, fPy, fPz, fE);
86  }
87  inline Double_t X() const { return fX; }
88  inline Double_t Y() const { return fY; }
89  inline Double_t Z() const { return fZ; }
90  inline Double_t T() const { return fT; }
91  inline TLorentzVector GetPosition() const {
92  return TLorentzVector(fX, fY, fZ, fT);
93  }
94  inline void Position(TLorentzVector& pos) const {
95  pos.SetXYZT(fX, fY, fZ, fT);
96  }
97  inline Double_t GetWeight() const { return fWeight; }
98  inline void SetIndex(Int_t index) { fIndex = index; }
99  inline void SetPdg(Int_t pdg) { fPdg = pdg; }
100  inline void SetStatus(Int_t status) { fStatus = status; }
101  inline void SetParent(Int_t parent) { fParent = parent; }
102  inline void SetParentDecay(Int_t parentDecay) { fParentDecay = parentDecay; }
103  inline void SetMate(Int_t mate) { fMate = mate; }
104  inline void SetDecay(Int_t decay) { fDecay = decay; }
105  inline void SetChild(Int_t child[2]) {
106  fChild[0] = child[0];
107  fChild[1] = child[1];
108  }
109  inline void SetFirstChild(Int_t child) { fChild[0] = child; }
110  inline void SetLastChild(Int_t child) { fChild[1] = child; }
111  inline void SetPx(Double_t px) { fPx = px; }
112  inline void SetPy(Double_t py) { fPy = py; }
113  inline void SetPz(Double_t pz) { fPz = pz; }
114  inline void SetE(Double_t e) { fE = e; }
115  inline void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e) {
116  fPx = px;
117  fPy = py;
118  fPz = pz;
119  fE = e;
120  }
121  inline void SetMomentum(TLorentzVector mom) {
122  fPx = mom.Px();
123  fPy = mom.Py();
124  fPz = mom.Pz();
125  fE = mom.E();
126  }
127  inline void SetX(Double_t x) { fX = x; }
128  inline void SetY(Double_t y) { fY = y; }
129  inline void SetZ(Double_t z) { fZ = z; }
130  inline void SetT(Double_t t) { fT = t; }
131  inline void SetPosition(Double_t x, Double_t y, Double_t z, Double_t t) {
132  fX = x;
133  fY = y;
134  fZ = z;
135  fT = t;
136  }
137  inline void SetPosition(TLorentzVector pos) {
138  fX = pos.X();
139  fY = pos.Y();
140  fZ = pos.Z();
141  fT = pos.T();
142  }
143  inline void SetWeight(Double_t weight) { fWeight = weight; }
144 
146 };
147 
148 
149 #endif
UParticle::fZ
Double32_t fZ
Definition: UParticle.h:27
UParticle::SetPy
void SetPy(Double_t py)
Definition: UParticle.h:112
UParticle::SetParent
void SetParent(Int_t parent)
Definition: UParticle.h:101
UParticle::Pz
Double_t Pz() const
Definition: UParticle.h:79
UParticle::GetWeight
Double_t GetWeight() const
Definition: UParticle.h:97
UParticle::~UParticle
virtual ~UParticle()
Definition: UParticle.cxx:167
UParticle::SetParentDecay
void SetParentDecay(Int_t parentDecay)
Definition: UParticle.h:102
UParticle::SetWeight
void SetWeight(Double_t weight)
Definition: UParticle.h:143
UParticle::SetX
void SetX(Double_t x)
Definition: UParticle.h:127
UParticle
Definition: UParticle.h:10
UParticle::GetPdg
Int_t GetPdg() const
Definition: UParticle.h:69
UParticle::fDecay
Int_t fDecay
Definition: UParticle.h:19
UParticle::SetY
void SetY(Double_t y)
Definition: UParticle.h:128
UParticle::fMate
Int_t fMate
Definition: UParticle.h:18
UParticle::SetE
void SetE(Double_t e)
Definition: UParticle.h:114
UParticle::fChild
Int_t fChild[2]
Definition: UParticle.h:20
UParticle::fT
Double32_t fT
Definition: UParticle.h:28
UParticle::fPz
Double32_t fPz
Definition: UParticle.h:23
UParticle::Position
void Position(TLorentzVector &pos) const
Definition: UParticle.h:94
UParticle::operator=
const UParticle & operator=(const UParticle &right)
Definition: UParticle.cxx:174
UParticle::fPy
Double32_t fPy
Definition: UParticle.h:22
UParticle::Y
Double_t Y() const
Definition: UParticle.h:88
UParticle::SetMomentum
void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e)
Definition: UParticle.h:115
UParticle::operator==
Bool_t operator==(const UParticle &right) const
Definition: UParticle.cxx:227
UParticle::UParticle
UParticle()
Definition: UParticle.cxx:18
UParticle::SetT
void SetT(Double_t t)
Definition: UParticle.h:130
UParticle::T
Double_t T() const
Definition: UParticle.h:90
UParticle::fParent
Int_t fParent
Definition: UParticle.h:16
UParticle::GetLastChild
Int_t GetLastChild() const
Definition: UParticle.h:76
UParticle::SetPdg
void SetPdg(Int_t pdg)
Definition: UParticle.h:99
UParticle::Momentum
void Momentum(TLorentzVector &mom) const
Definition: UParticle.h:84
UParticle::fPdg
Int_t fPdg
Definition: UParticle.h:14
UParticle::fX
Double32_t fX
Definition: UParticle.h:25
UParticle::SetIndex
void SetIndex(Int_t index)
Definition: UParticle.h:98
UParticle::SetStatus
void SetStatus(Int_t status)
Definition: UParticle.h:100
UParticle::GetParent
Int_t GetParent() const
Definition: UParticle.h:71
UParticle::GetDecay
Int_t GetDecay() const
Definition: UParticle.h:74
UParticle::Print
void Print(Option_t *="") const
Definition: UParticle.cxx:257
UParticle::SetPosition
void SetPosition(TLorentzVector pos)
Definition: UParticle.h:137
UParticle::fWeight
Double32_t fWeight
Definition: UParticle.h:29
UParticle::fY
Double32_t fY
Definition: UParticle.h:26
UParticle::fPx
Double32_t fPx
Definition: UParticle.h:21
UParticle::Z
Double_t Z() const
Definition: UParticle.h:89
UParticle::SetDecay
void SetDecay(Int_t decay)
Definition: UParticle.h:104
UParticle::X
Double_t X() const
Definition: UParticle.h:87
UParticle::fE
Double32_t fE
Definition: UParticle.h:24
UParticle::SetMomentum
void SetMomentum(TLorentzVector mom)
Definition: UParticle.h:121
UParticle::E
Double_t E() const
Definition: UParticle.h:80
UParticle::GetMomentum
TLorentzVector GetMomentum() const
Definition: UParticle.h:81
UParticle::GetStatus
Int_t GetStatus() const
Definition: UParticle.h:70
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
UParticle::GetPosition
TLorentzVector GetPosition() const
Definition: UParticle.h:91
UParticle::SetPz
void SetPz(Double_t pz)
Definition: UParticle.h:113
UParticle::SetPosition
void SetPosition(Double_t x, Double_t y, Double_t z, Double_t t)
Definition: UParticle.h:131
UParticle::GetParentDecay
Int_t GetParentDecay() const
Definition: UParticle.h:72
UParticle::GetMate
Int_t GetMate() const
Definition: UParticle.h:73
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
UParticle::ClassDef
ClassDef(UParticle, 1)
UParticle::SetFirstChild
void SetFirstChild(Int_t child)
Definition: UParticle.h:109
UParticle::Px
Double_t Px() const
Definition: UParticle.h:77
UParticle::SetZ
void SetZ(Double_t z)
Definition: UParticle.h:129
UParticle::fParentDecay
Int_t fParentDecay
Definition: UParticle.h:17
UParticle::SetLastChild
void SetLastChild(Int_t child)
Definition: UParticle.h:110
UParticle::GetFirstChild
Int_t GetFirstChild() const
Definition: UParticle.h:75
UParticle::SetPx
void SetPx(Double_t px)
Definition: UParticle.h:111
UParticle::SetChild
void SetChild(Int_t child[2])
Definition: UParticle.h:105
UParticle::Py
Double_t Py() const
Definition: UParticle.h:78
UParticle::fStatus
Int_t fStatus
Definition: UParticle.h:15
UParticle::SetMate
void SetMate(Int_t mate)
Definition: UParticle.h:103
UParticle::GetIndex
Int_t GetIndex() const
Definition: UParticle.h:68
UParticle::fIndex
Int_t fIndex
Definition: UParticle.h:13