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