ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtTPCIonDecay.h
Go to the documentation of this file.
1 #ifndef AtTPCIonDecay_H
2 #define AtTPCIonDecay_H
3 
4 #include <FairGenerator.h>
5 #include <FairIon.h>
6 #include <FairParticle.h>
7 
8 #include <Rtypes.h>
9 #include <TString.h>
10 
11 #include <memory>
12 #include <vector>
13 
14 class FairPrimaryGenerator;
15 class TBuffer;
16 class TClass;
17 class TMemberInspector;
18 
19 class AtTPCIonDecay : public FairGenerator {
20 
21 public:
23  AtTPCIonDecay();
24 
37  // AtTPCIonDecay(const char* name,std::vector<Int_t> *z,std::vector<Int_t> *a,std::vector<Int_t> *q, Int_t mult,
38  // std::vector<Double_t> *px,
39  // std::vector<Double_t>* py,std::vector<Double_t> *pz, std::vector<Double_t> *mass , Double_t ResEner, Int_t ZB,
40  // Int_t AB, Double_t PxB, Double_t PyB, Double_t PzB, Double_t BMass, Double_t TMass);
41 
42  AtTPCIonDecay(std::vector<std::vector<Int_t>> *z, std::vector<std::vector<Int_t>> *a,
43  std::vector<std::vector<Int_t>> *q, std::vector<std::vector<Double_t>> *mass, Int_t ZB, Int_t AB,
44  Double_t BMass, Double_t TMass, Double_t ExEnergy, std::vector<Double_t> *SepEne);
45 
47 
48  AtTPCIonDecay &operator=(const AtTPCIonDecay &) { return *this; }
49 
50  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
51  void SetSequentialDecay(Bool_t var) { fIsSequentialDecay = var; }
52 
54  virtual ~AtTPCIonDecay() = default;
55 
56 private:
57  static Int_t fgNIon;
58  std::vector<Int_t> fMult; // Multiplicity per decay channel
59  Int_t fNbCases; // Number of decay channel
60  std::vector<Double_t> fPx, fPy, fPz; // Momentum components [GeV] per nucleon
61  std::vector<std::vector<Double_t>> fMasses; // Masses of the N products
62  Double_t fVx, fVy, fVz; // Vertex coordinates [cm]
63  std::vector<std::vector<std::unique_ptr<FairIon>>> fIon; // Pointer to the FairIon to be generated
64  std::vector<std::vector<std::unique_ptr<FairParticle>>> fParticle;
65  std::vector<std::vector<TString>> fPType;
66  std::vector<Int_t> fQ; // Electric charge [e]
67  // std::vector<Int_t> fA;
68  // std::vector<Int_t> fZ;
69  Double_t fBeamEnergy{}; // Residual beam energy for phase calculation
70  Double_t fBeamEnergy_buff{}; // Residual beam energy for phase calculation
71  Int_t fZBeam{};
72  Int_t fABeam{};
73  Double_t fPxBeam;
74  Double_t fPyBeam;
75  Double_t fPzBeam;
76  Bool_t fIsDecay{};
77  Double_t fBeamMass{};
78  Double_t fTargetMass{};
79  Double_t fExEnergy{};
80  std::vector<Double_t> fSepEne;
81  Bool_t fIsSequentialDecay{}; //<! True if the decay generator is to be used after a reaction generator.
82 
83  ClassDef(AtTPCIonDecay, 3)
84 };
85 
86 #endif
AtTPCIonDecay::AtTPCIonDecay
AtTPCIonDecay()
Definition: AtTPCIonDecay.cxx:45
AtTPCIonDecay::~AtTPCIonDecay
virtual ~AtTPCIonDecay()=default
AtTPCIonDecay::AtTPCIonDecay
AtTPCIonDecay(const AtTPCIonDecay &)
AtTPCIonDecay::operator=
AtTPCIonDecay & operator=(const AtTPCIonDecay &)
Definition: AtTPCIonDecay.h:48
AtTPCIonDecay::SetSequentialDecay
void SetSequentialDecay(Bool_t var)
Definition: AtTPCIonDecay.h:51
AtTPCIonDecay
Definition: AtTPCIonDecay.h:19
AtTPCIonDecay::ReadEvent
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Definition: AtTPCIonDecay.cxx:123