ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtTPC2Body.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------------------//
2 // ----- AtTPC2Body header file ----//
3 // ----- Inherit from FairIonGenerator ----//
4 // ----- Created 29/07/15 by Y. Ayyad ----//
5 // ----- 11/13/2020 Added Fixed target option for HELIOS (Y. Ayyad) ----//
6 // -------------------------------------------------------------------------------------//
7 
8 #ifndef AtTPC2Body_H
9 #define AtTPC2Body_H
10 
11 #include <FairGenerator.h>
12 
13 #include <Rtypes.h>
14 #include <TString.h>
15 
16 #include <vector>
17 
18 class FairPrimaryGenerator;
19 class FairIon;
20 class FairParticle;
21 class TBuffer;
22 class TClass;
23 class TMemberInspector;
24 
25 class AtTPC2Body : public FairGenerator {
26 
27 public:
29  AtTPC2Body();
30 
31  AtTPC2Body(const char *name, std::vector<Int_t> *z, std::vector<Int_t> *a, std::vector<Int_t> *q, Int_t mult,
32  std::vector<Double_t> *px, std::vector<Double_t> *py, std::vector<Double_t> *pz,
33  std::vector<Double_t> *mass, std::vector<Double_t> *Ex, Double_t ResEner, Double_t MinCMSAng,
34  Double_t MaxCMSAng);
35 
37 
38  AtTPC2Body &operator=(const AtTPC2Body &) { return *this; }
39 
40  void SetFixedTargetPosition(double vx, double vy, double vz);
41  void SetFixedBeamMomentum(double px, double py, double pz);
42  inline void SetSequentialDecay(Bool_t val) { kIsDecay = val; }
43 
44  inline Bool_t GetIsDecay() { return kIsDecay; }
45 
46  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
47 
49  virtual ~AtTPC2Body() = default;
50 
51 private:
52  static Int_t fgNIon;
53  Int_t fMult; // Multiplicity per event
54  std::vector<Double_t> fPx, fPy, fPz; // Momentum components [GeV] per nucleon
55  std::vector<Double_t> Masses; // Masses of the N products
56  std::vector<Double_t> fExEnergy; // Excitation energies of the products
57  Double_t fVx, fVy, fVz; // Vertex coordinates [cm]
58  std::vector<FairIon *> fIon; // Pointer to the FairIon to be generated
59  std::vector<TString> fPType;
60  std::vector<FairParticle *> fParticle;
61  std::vector<Int_t> fQ; // Electric charge [e]
62  // std::vector<Int_t> fA;
63  // std::vector<Int_t> fZ;
64  Double_t fBeamEnergy{}; // Residual beam energy for phase calculation
65  Double_t fBeamEnergy_buff{}; // Residual beam energy for phase calculation
66  // Int_t fZBeam;
67  // Int_t fABeam;
68  Double_t fPxBeam{};
69  Double_t fPyBeam{};
70  Double_t fPzBeam{};
71  Double_t fPxBeam_buff{};
72  Double_t fPyBeam_buff{};
73  Double_t fPzBeam_buff{};
74  Double_t fThetaCmsMax{};
75  Double_t fThetaCmsMin{};
76  Bool_t kIsDecay{false};
77  // Double_t fBeamMass;
78  // Double_t fTargetMass;
79  Bool_t fNoSolution{};
80  std::vector<Double_t> fWm; // Total mass
81 
82  Bool_t fIsFixedTargetPos{}; //
83  Bool_t fIsFixedMomentum{}; //
84 
85  ClassDef(AtTPC2Body, 3)
86 };
87 
88 #endif
AtTPC2Body::AtTPC2Body
AtTPC2Body()
Definition: AtTPC2Body.cxx:33
AtTPC2Body::GetIsDecay
Bool_t GetIsDecay()
Definition: AtTPC2Body.h:44
AtTPC2Body::SetSequentialDecay
void SetSequentialDecay(Bool_t val)
Definition: AtTPC2Body.h:42
AtTPC2Body::~AtTPC2Body
virtual ~AtTPC2Body()=default
AtTPC2Body::ReadEvent
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Definition: AtTPC2Body.cxx:148
AtTPC2Body
Definition: AtTPC2Body.h:25
AtTPC2Body::AtTPC2Body
AtTPC2Body(const AtTPC2Body &)
AtTPC2Body::operator=
AtTPC2Body & operator=(const AtTPC2Body &)
Definition: AtTPC2Body.h:38
AtTPC2Body::SetFixedTargetPosition
void SetFixedTargetPosition(double vx, double vy, double vz)
Definition: AtTPC2Body.cxx:129
AtTPC2Body::SetFixedBeamMomentum
void SetFixedBeamMomentum(double px, double py, double pz)
Definition: AtTPC2Body.cxx:138