EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairParticle.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairParticle.h
1 
2 
3 
4 
5 
6 
7 
8 #ifndef FAIR_PARTICLE_H
9 #define FAIR_PARTICLE_H
10 
11 #include "TObject.h"
12 #include "TRef.h"
13 #include "TRefArray.h"
14 
15 #include "TMCParticleType.h"
16 class TParticle;
17 
18 class FairParticle : public TObject
19 {
20  public:
21  FairParticle(Int_t id, TParticle* particle);
22  FairParticle(Int_t id, TParticle* particle, FairParticle* mother);
23  FairParticle(const char* name, Int_t z, Int_t a, Int_t s,Double_t mass , Int_t q, Bool_t stable, Double_t decaytime);
24  FairParticle(const char* name, Int_t z, Int_t a, Double_t mass , Int_t q, Bool_t stable, Double_t decaytime);
25  FairParticle( Int_t pdg , const TString name, TMCParticleType mcType, Double_t mass, Double_t charge,
26  Double_t lifetime, const TString pType="Ion", Double_t width=0, Int_t iSpin=0, Int_t iParity=0,
27  Int_t iConjugation=0, Int_t iIsospin=0, Int_t iIsospinZ=0, Int_t gParity=0, Int_t lepton=0,
28  Int_t baryon=0,Bool_t stable=kFALSE);
29 
30  FairParticle();
31 
32  virtual ~FairParticle();
33 
34  // methods
35  void SetMother(FairParticle* particle);
36  void AddDaughter(FairParticle* particle);
37  virtual void Print(Option_t* option = "") const;
38  void PrintDaughters() const;
39 
40  // get methods
41  Int_t GetPDG() const;
42  TParticle* GetParticle() const;
43  FairParticle* GetMother() const;
44  Int_t GetNofDaughters() const;
45  FairParticle* GetDaughter(Int_t i) const;
46  virtual const char* GetName() const {return fname.Data();}
47  TMCParticleType GetMCType() {return fmcType;}
48  Double_t GetMass() {return fmass;}
49  Double_t GetCharge() {return fcharge;}
50  Double_t GetDecayTime() {return fDecayTime;}
51  const TString& GetPType() {return fpType;}
52  Double_t GetWidth() {return fwidth;}
53  Int_t GetSpin() {return fiSpin;}
54  Int_t GetiParity() {return fiParity;}
55  Int_t GetConjugation() {return fiConjugation;}
56  Int_t GetIsospin() {return fiIsospin;}
57  Int_t GetIsospinZ() {return fiIsospinZ;}
58  Int_t GetgParity() {return fgParity;}
59  Int_t GetLepton() {return flepton;}
60  Int_t GetBaryon() {return fbaryon;}
61  Bool_t IsStable() {return fstable;}
62 
63  private:
64 
65  FairParticle(const FairParticle& P);
66  FairParticle& operator= (const FairParticle&) {return *this;}
67  // data members
68  Int_t fpdg;
69  TParticle* fParticle;
70  TRef fMother;
71  TRefArray fDaughters;
72  const TString fname;
73  TMCParticleType fmcType;
74  Double_t fmass;
75  Double_t fcharge;
76  Double_t fDecayTime;
77  const TString fpType;
78  Double_t fwidth;
79  Int_t fiSpin;
80  Int_t fiParity;
82  Int_t fiIsospin;
83  Int_t fiIsospinZ;
84  Int_t fgParity;
85  Int_t flepton;
86  Int_t fbaryon;
87  Bool_t fstable;
88 
89  ClassDef(FairParticle,3) // Extended TParticle
90 };
91 
92 #endif //FAIR_PARTICLE_H
93 
94