Pluto v6.3.0
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
10class 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, Int_t pdg, Int_t status,
34 Int_t parent, Int_t parentDecay,
35 Int_t mate, Int_t decay, Int_t child[2],
36 Double_t px, Double_t py, Double_t pz, Double_t e,
37 Double_t x, Double_t y, Double_t z, Double_t t,
38 Double_t weight);
39 UParticle(Int_t index, Int_t pdg, Int_t status,
40 Int_t parent, Int_t parentDecay,
41 Int_t mate, Int_t decay, Int_t child[2],
42 TLorentzVector mom, TLorentzVector pos,
43 Double_t weight);
44 UParticle(const UParticle &right);
45 UParticle(const TParticle &right);
46 virtual ~UParticle();
47 const UParticle& operator = (const UParticle& right);
48 const UParticle& operator = (const TParticle& right);
49 Bool_t operator == (UParticle& right) const;
50 using TObject::Print;
51 void Print(Option_t *option = "");
52 inline Int_t GetIndex() const {return fIndex;}
53 inline Int_t GetPdg() const {return fPdg;}
54 inline Int_t GetStatus() const {return fStatus;}
55 inline Int_t GetParent() const {return fParent;}
56 inline Int_t GetParentDecay() const {return fParentDecay;}
57 inline Int_t GetMate() const {return fMate;}
58 inline Int_t GetDecay() const {return fDecay;}
59 inline Int_t GetFirstChild() const {return fChild[0];}
60 inline Int_t GetLastChild() const {return fChild[1];}
61 inline Double_t Px() const {return fPx;}
62 inline Double_t Py() const {return fPy;}
63 inline Double_t Pz() const {return fPz;}
64 inline Double_t E() const {return fE;}
65 inline TLorentzVector GetMomentum() const {return TLorentzVector(fPx,fPy,fPz,fE);}
66 inline void Momentum(TLorentzVector& mom) const {mom.SetPxPyPzE(fPx,fPy,fPz,fE);}
67 inline Double_t X() const {return fX;}
68 inline Double_t Y() const {return fY;}
69 inline Double_t Z() const {return fZ;}
70 inline Double_t T() const {return fT;}
71 inline TLorentzVector GetPosition() const {return TLorentzVector(fX,fY,fZ,fT);}
72 inline void Position(TLorentzVector& pos) const {pos.SetXYZT(fX,fY,fZ,fT);}
73 inline Double_t GetWeight() const {return fWeight;}
74 inline void SetIndex (Int_t index) {fIndex = index;}
75 inline void SetPdg (Int_t pdg) {fPdg = pdg;}
76 inline void SetStatus (Int_t status) {fStatus = status;}
77 inline void SetParent (Int_t parent) {fParent = parent;}
78 inline void SetParentDecay(Int_t parentDecay) {fParentDecay = parentDecay;}
79 inline void SetMate (Int_t mate) {fMate = mate;}
80 inline void SetDecay (Int_t decay) {fDecay = decay;}
81 inline void SetChild (Int_t child[2]) {fChild[0] = child[0]; fChild[1] = child[1];}
82 inline void SetFirstChild (Int_t child) {fChild[0] = child;}
83 inline void SetLastChild (Int_t child) {fChild[1] = child;}
84 inline void SetPx (Double_t px) {fPx = px;}
85 inline void SetPy (Double_t py) {fPy = py;}
86 inline void SetPz (Double_t pz) {fPz = pz;}
87 inline void SetE (Double_t e) {fE = e;}
88 inline void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e)
89 {fPx = px; fPy = py; fPz = pz; fE = e;}
90 inline void SetMomentum(TLorentzVector mom) {fPx=mom.Px(); fPy=mom.Py(); fPz=mom.Pz(); fE=mom.E();}
91 inline void SetX (Double_t x) {fX = x;}
92 inline void SetY (Double_t y) {fY = y;}
93 inline void SetZ (Double_t z) {fZ = z;}
94 inline void SetT (Double_t t) {fT = t;}
95 inline void SetPosition(Double_t x, Double_t y, Double_t z, Double_t t) {fX = x; fY = y; fZ = z; fT = t;}
96 inline void SetPosition(TLorentzVector pos) {fX=pos.X(); fY=pos.Y(); fZ=pos.Z(); fT=pos.T();}
97 inline void SetWeight (Double_t weight) {fWeight = weight;}
98
100};
101
102
103#endif
double pz
double px
double py
void SetIndex(Int_t index)
Definition UParticle.h:74
Int_t GetPdg() const
Definition UParticle.h:53
Double_t Py() const
Definition UParticle.h:62
Int_t GetDecay() const
Definition UParticle.h:58
void SetChild(Int_t child[2])
Definition UParticle.h:81
void SetY(Double_t y)
Definition UParticle.h:92
void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e)
Definition UParticle.h:88
void SetE(Double_t e)
Definition UParticle.h:87
Double_t E() const
Definition UParticle.h:64
Double_t Y() const
Definition UParticle.h:68
ClassDef(UParticle, 1)
void Position(TLorentzVector &pos) const
Definition UParticle.h:72
void SetParent(Int_t parent)
Definition UParticle.h:77
TLorentzVector GetMomentum() const
Definition UParticle.h:65
Int_t GetIndex() const
Definition UParticle.h:52
void SetMomentum(TLorentzVector mom)
Definition UParticle.h:90
void SetX(Double_t x)
Definition UParticle.h:91
const UParticle & operator=(const UParticle &right)
Definition UParticle.cc:113
Int_t GetMate() const
Definition UParticle.h:57
Double_t GetWeight() const
Definition UParticle.h:73
void SetDecay(Int_t decay)
Definition UParticle.h:80
void SetPdg(Int_t pdg)
Definition UParticle.h:75
void SetParentDecay(Int_t parentDecay)
Definition UParticle.h:78
Int_t GetParent() const
Definition UParticle.h:55
TLorentzVector GetPosition() const
Definition UParticle.h:71
Double_t Pz() const
Definition UParticle.h:63
Double_t Px() const
Definition UParticle.h:61
void SetPosition(Double_t x, Double_t y, Double_t z, Double_t t)
Definition UParticle.h:95
void Momentum(TLorentzVector &mom) const
Definition UParticle.h:66
Int_t GetFirstChild() const
Definition UParticle.h:59
void SetPz(Double_t pz)
Definition UParticle.h:86
Double_t X() const
Definition UParticle.h:67
void SetZ(Double_t z)
Definition UParticle.h:93
void SetLastChild(Int_t child)
Definition UParticle.h:83
Bool_t operator==(UParticle &right) const
Definition UParticle.cc:165
void SetFirstChild(Int_t child)
Definition UParticle.h:82
void SetPosition(TLorentzVector pos)
Definition UParticle.h:96
void SetPx(Double_t px)
Definition UParticle.h:84
Double_t Z() const
Definition UParticle.h:69
void SetPy(Double_t py)
Definition UParticle.h:85
void SetMate(Int_t mate)
Definition UParticle.h:79
void SetWeight(Double_t weight)
Definition UParticle.h:97
Int_t GetStatus() const
Definition UParticle.h:54
Double_t T() const
Definition UParticle.h:70
Int_t GetLastChild() const
Definition UParticle.h:60
void SetT(Double_t t)
Definition UParticle.h:94
Int_t GetParentDecay() const
Definition UParticle.h:56
virtual ~UParticle()
Definition UParticle.cc:106
void SetStatus(Int_t status)
Definition UParticle.h:76
my_reaction Print()
PPDGPlugin * pdg
PDalitzDistribution * decay