BmnRoot
Loading...
Searching...
No Matches
UParticle.h
Go to the documentation of this file.
1#ifndef UPARTICLE_H
2#define UPARTICLE_H
3
4#include "TObject.h"
5#include "TLorentzVector.h"
6#include "TMath.h"
7
8class TParticle;
9
13class UParticle : public TObject {
14
15 private:
16 Int_t fIndex; // index of this particle
17 Int_t fPdg; // PDG code
18 Int_t fStatus; // Status
19 Int_t fParent; // Index of parent
20 Int_t fParentDecay; // Parent decay index
21 Int_t fMate; // index of last collision partner
22 Int_t fDecay; // decay index (-1 if not decayed)
23 Int_t fChild[2]; // index of first and last child
24 Double32_t fPx; // px (GeV)
25 Double32_t fPy; // py (GeV)
26 Double32_t fPz; // pz (GeV)
27 Double32_t fE; // Energy (GeV)
28 Double32_t fX; // x (fm)
29 Double32_t fY; // y (fm)
30 Double32_t fZ; // z (fm)
31 Double32_t fT; // t (fm)
32 Double32_t fWeight; // weight
33
34 public:
38 UParticle();
59 UParticle(Int_t index, Int_t pdg, Int_t status,
60 Int_t parent, Int_t parentDecay,
61 Int_t mate, Int_t decay, Int_t child[2],
62 Double_t px, Double_t py, Double_t pz, Double_t e,
63 Double_t x, Double_t y, Double_t z, Double_t t,
64 Double_t weight);
79 UParticle(Int_t index, Int_t pdg, Int_t status,
80 Int_t parent, Int_t parentDecay,
81 Int_t mate, Int_t decay, Int_t child[2],
82 TLorentzVector mom, TLorentzVector pos,
83 Double_t weight);
88 UParticle(const UParticle& right);
93 UParticle(const TParticle& right);
94 virtual ~UParticle();
100 const UParticle& operator = (const UParticle& right);
106 const UParticle& operator = (const TParticle& right);
112 const Bool_t operator == (const UParticle& right) const;
117 void Print(Option_t* option = "");
122 inline Int_t GetIndex() const {return fIndex;}
127 inline Int_t GetPdg() const {return fPdg;}
132 inline Int_t GetStatus() const {return fStatus;}
137 inline Int_t GetParent() const {return fParent;}
142 inline Int_t GetParentDecay() const {return fParentDecay;}
147 inline Int_t GetMate() const {return fMate;}
152 inline Int_t GetDecay() const {return fDecay;}
157 inline Int_t GetFirstChild() const {return fChild[0];}
162 inline Int_t GetLastChild() const {return fChild[1];}
167 inline Double_t Px() const {return fPx;}
172 inline Double_t Py() const {return fPy;}
177 inline Double_t Pz() const {return fPz;}
182 inline Double_t E() const {return fE;}
187 inline TLorentzVector GetMomentum() const {return TLorentzVector(fPx,fPy,fPz,fE);}
192 inline void Momentum(TLorentzVector& mom) const {mom.SetPxPyPzE(fPx,fPy,fPz,fE);}
197 inline Double_t X() const {return fX;}
202 inline Double_t Y() const {return fY;}
207 inline Double_t Z() const {return fZ;}
212 inline Double_t T() const {return fT;}
217 inline TLorentzVector GetPosition() const {return TLorentzVector(fX,fY,fZ,fT);}
222 inline void Position(TLorentzVector& pos) const {pos.SetXYZT(fX,fY,fZ,fT);}
227 inline Double_t GetWeight() const {return fWeight;}
232 inline void SetIndex (Int_t index) {fIndex = index;}
237 inline void SetPdg (Int_t pdg) {fPdg = pdg;}
242 inline void SetStatus (Int_t status) {fStatus = status;}
247 inline void SetParent (Int_t parent) {fParent = parent;}
252 inline void SetParentDecay(Int_t parentDecay) {fParentDecay = parentDecay;}
257 inline void SetMate (Int_t mate) {fMate = mate;}
262 inline void SetDecay (Int_t decay) {fDecay = decay;}
267 inline void SetChild (Int_t child[2]) {fChild[0]=child[0]; fChild[1]=child[1];}
272 inline void SetFirstChild (Int_t child) {fChild[0] = child;}
277 inline void SetLastChild (Int_t child) {fChild[1] = child;}
282 inline void SetPx (Double_t px) {fPx = px;}
287 inline void SetPy (Double_t py) {fPy = py;}
292 inline void SetPz (Double_t pz) {fPz = pz;}
297 inline void SetE (Double_t e) {fE = e;}
305 inline void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e)
306 {fPx = px; fPy = py; fPz = pz; fE = e;}
311 inline void SetMomentum(TLorentzVector mom) {fPx=mom.Px(); fPy=mom.Py(); fPz=mom.Pz(); fE=mom.E();}
316 inline void SetX (Double_t x) {fX = x;}
321 inline void SetY (Double_t y) {fY = y;}
326 inline void SetZ (Double_t z) {fZ = z;}
331 inline void SetT (Double_t t) {fT = t;}
339 inline void SetPosition(Double_t x, Double_t y, Double_t z, Double_t t)
340 {fX = x; fY = y; fZ = z; fT = t;}
345 inline void SetPosition(TLorentzVector pos) {fX=pos.X(); fY=pos.Y(); fZ=pos.Z(); fT=pos.T();}
350 inline void SetWeight (Double_t weight) {fWeight = weight;}
351
352 ClassDef(UParticle, 1)
353};
354
355
356#endif
void SetIndex(Int_t index)
Definition UParticle.h:232
Int_t GetPdg() const
Definition UParticle.h:127
Double_t Py() const
Definition UParticle.h:172
Int_t GetDecay() const
Definition UParticle.h:152
void SetChild(Int_t child[2])
Definition UParticle.h:267
void SetY(Double_t y)
Definition UParticle.h:321
void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e)
Definition UParticle.h:305
void SetE(Double_t e)
Definition UParticle.h:297
Double_t E() const
Definition UParticle.h:182
Double_t Y() const
Definition UParticle.h:202
void Position(TLorentzVector &pos) const
Definition UParticle.h:222
void SetParent(Int_t parent)
Definition UParticle.h:247
TLorentzVector GetMomentum() const
Definition UParticle.h:187
Int_t GetIndex() const
Definition UParticle.h:122
void SetMomentum(TLorentzVector mom)
Definition UParticle.h:311
void SetX(Double_t x)
Definition UParticle.h:316
const UParticle & operator=(const UParticle &right)
Int_t GetMate() const
Definition UParticle.h:147
Double_t GetWeight() const
Definition UParticle.h:227
void SetDecay(Int_t decay)
Definition UParticle.h:262
void SetPdg(Int_t pdg)
Definition UParticle.h:237
void SetParentDecay(Int_t parentDecay)
Definition UParticle.h:252
Int_t GetParent() const
Definition UParticle.h:137
TLorentzVector GetPosition() const
Definition UParticle.h:217
Double_t Pz() const
Definition UParticle.h:177
Double_t Px() const
Definition UParticle.h:167
const Bool_t operator==(const UParticle &right) const
void SetPosition(Double_t x, Double_t y, Double_t z, Double_t t)
Definition UParticle.h:339
void Momentum(TLorentzVector &mom) const
Definition UParticle.h:192
Int_t GetFirstChild() const
Definition UParticle.h:157
void SetPz(Double_t pz)
Definition UParticle.h:292
Double_t X() const
Definition UParticle.h:197
void SetZ(Double_t z)
Definition UParticle.h:326
void SetLastChild(Int_t child)
Definition UParticle.h:277
void SetFirstChild(Int_t child)
Definition UParticle.h:272
void SetPosition(TLorentzVector pos)
Definition UParticle.h:345
void SetPx(Double_t px)
Definition UParticle.h:282
Double_t Z() const
Definition UParticle.h:207
void SetPy(Double_t py)
Definition UParticle.h:287
void SetMate(Int_t mate)
Definition UParticle.h:257
void SetWeight(Double_t weight)
Definition UParticle.h:350
Int_t GetStatus() const
Definition UParticle.h:132
Double_t T() const
Definition UParticle.h:212
Int_t GetLastChild() const
Definition UParticle.h:162
void Print(Option_t *option="")
void SetT(Double_t t)
Definition UParticle.h:331
Int_t GetParentDecay() const
Definition UParticle.h:142
virtual ~UParticle()
void SetStatus(Int_t status)
Definition UParticle.h:242