FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairParticle.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
13 
14 #ifndef FAIR_PARTICLE_H
15 #define FAIR_PARTICLE_H
16 
17 #include <Rtypes.h> // for Int_t, Double_t, Bool_t, etc
18 #include <TMCParticleType.h> // for TMCParticleType
19 #include <TObject.h> // for TObject
20 #include <TRef.h> // for TRef
21 #include <TRefArray.h> // for TRefArray
22 #include <TString.h> // for TString
23 
24 class TParticle;
25 
26 class FairParticle : public TObject
27 {
28  public:
29  FairParticle(Int_t id, TParticle* particle);
30  FairParticle(Int_t id, TParticle* particle, FairParticle* mother);
31  FairParticle(const char* name,
32  Int_t z,
33  Int_t a,
34  Int_t s,
35  Double_t mass,
36  Int_t q,
37  Bool_t stable,
38  Double_t decaytime);
39  FairParticle(const char* name, Int_t z, Int_t a, Double_t mass, Int_t q, Bool_t stable, Double_t decaytime);
40  FairParticle(Int_t pdg,
41  const TString name,
42  TMCParticleType mcType,
43  Double_t mass,
44  Double_t charge,
45  Double_t lifetime,
46  const TString pType = "Ion",
47  Double_t width = 0,
48  Int_t iSpin = 0,
49  Int_t iParity = 0,
50  Int_t iConjugation = 0,
51  Int_t iIsospin = 0,
52  Int_t iIsospinZ = 0,
53  Int_t gParity = 0,
54  Int_t lepton = 0,
55  Int_t baryon = 0,
56  Bool_t stable = kFALSE);
57 
58  FairParticle();
59 
60  virtual ~FairParticle();
61 
62  // methods
63  void SetMother(FairParticle* particle);
64  void AddDaughter(FairParticle* particle);
65  virtual void Print(Option_t* option = "") const;
66  void PrintDaughters() const;
67 
68  // get methods
69  Int_t GetPDG() const;
70  TParticle* GetParticle() const;
71  FairParticle* GetMother() const;
72  Int_t GetNofDaughters() const;
73  FairParticle* GetDaughter(Int_t i) const;
74  virtual const char* GetName() const { return fname.Data(); }
75  TMCParticleType GetMCType() { return fmcType; }
76  Double_t GetMass() { return fmass; }
77  Double_t GetCharge() { return fcharge; }
78  Double_t GetDecayTime() { return fDecayTime; }
79  const TString& GetPType() { return fpType; }
80  Double_t GetWidth() { return fwidth; }
81  Int_t GetSpin() { return fiSpin; }
82  Int_t GetiParity() { return fiParity; }
83  Int_t GetConjugation() { return fiConjugation; }
84  Int_t GetIsospin() { return fiIsospin; }
85  Int_t GetIsospinZ() { return fiIsospinZ; }
86  Int_t GetgParity() { return fgParity; }
87  Int_t GetLepton() { return flepton; }
88  Int_t GetBaryon() { return fbaryon; }
89  Bool_t IsStable() { return fstable; }
90 
91  private:
92  FairParticle(const FairParticle& P);
93  FairParticle& operator=(const FairParticle&) { return *this; }
94  // data members
95  Int_t fpdg;
96  TParticle* fParticle;
97  TRef fMother;
98  TRefArray fDaughters;
99  const TString fname;
100  TMCParticleType fmcType;
101  Double_t fmass;
102  Double_t fcharge;
103  Double_t fDecayTime;
104  const TString fpType;
105  Double_t fwidth;
106  Int_t fiSpin;
107  Int_t fiParity;
108  Int_t fiConjugation;
109  Int_t fiIsospin;
110  Int_t fiIsospinZ;
111  Int_t fgParity;
112  Int_t flepton;
113  Int_t fbaryon;
114  Bool_t fstable;
115 
116  ClassDef(FairParticle, 3);
117 };
118 
119 #endif // FAIR_PARTICLE_H
virtual const char * GetName() const
Definition: FairParticle.h:74
Int_t GetBaryon()
Definition: FairParticle.h:88
TParticle * GetParticle() const
Bool_t IsStable()
Definition: FairParticle.h:89
const TString & GetPType()
Definition: FairParticle.h:79
Int_t GetLepton()
Definition: FairParticle.h:87
Int_t GetgParity()
Definition: FairParticle.h:86
FairParticle * GetDaughter(Int_t i) const
FairParticle * GetMother() const
void PrintDaughters() const
Double_t GetCharge()
Definition: FairParticle.h:77
Int_t GetPDG() const
virtual ~FairParticle()
virtual void Print(Option_t *option="") const
Int_t GetSpin()
Definition: FairParticle.h:81
Double_t GetWidth()
Definition: FairParticle.h:80
Double_t GetMass()
Definition: FairParticle.h:76
void AddDaughter(FairParticle *particle)
TMCParticleType GetMCType()
Definition: FairParticle.h:75
Int_t GetNofDaughters() const
Int_t GetConjugation()
Definition: FairParticle.h:83
Int_t GetIsospin()
Definition: FairParticle.h:84
void SetMother(FairParticle *particle)
Double_t GetDecayTime()
Definition: FairParticle.h:78
Int_t GetiParity()
Definition: FairParticle.h:82
Int_t GetIsospinZ()
Definition: FairParticle.h:85