ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtTPCXSReader.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- AtTPCXSReader header file -----
3 // ----- Created 03/07/18 by H. Alvarez Pol -----
4 // -------------------------------------------------------------------------
5 
6 #ifndef AtTPCXSREADER_H
7 #define AtTPCXSREADER_H
8 
9 #include <FairGenerator.h>
10 
11 #include <Rtypes.h>
12 #include <TString.h>
13 
14 #include <vector>
15 
16 class FairPrimaryGenerator;
17 class FairIon;
18 class FairParticle;
19 class TBuffer;
20 class TClass;
21 class TH2F;
22 class TMemberInspector;
23 
24 class AtTPCXSReader : public FairGenerator {
25 
26 public:
28  AtTPCXSReader();
29 
33  AtTPCXSReader(const char *name, std::vector<Int_t> *z, std::vector<Int_t> *a, std::vector<Int_t> *q, Int_t mult,
34  std::vector<Double_t> *px, std::vector<Double_t> *py, std::vector<Double_t> *pz,
35  std::vector<Double_t> *mass);
36 
37  AtTPCXSReader &operator=(const AtTPCXSReader &) { return *this; }
38 
40  virtual ~AtTPCXSReader() = default;
41 
46  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
47 
49  void SetXSFileName(TString name = "xs_22Mgp_fusionEvaporation.txt") { fXSFileName = name; }
50 
51 private:
52  TString fXSFileName;
53 
54  static Int_t fgNIon;
55  Int_t fMult; // Multiplicity per event
56  std::vector<Double_t> fPx, fPy, fPz; // Momentum components [GeV] per nucleon
57  std::vector<Double_t> Masses; // Masses of the N products
58  std::vector<Double_t> fExEnergy; // Excitation energies of the products
59  Double_t fVx, fVy, fVz; // Vertex coordinates [cm]
60  std::vector<FairIon *> fIon; // Pointer to the FairIon to be generated
61  std::vector<TString> fPType;
62  std::vector<FairParticle *> fParticle;
63  std::vector<Int_t> fQ; // Electric charge [e]
64  Double_t fBeamEnergy{}; // Residual beam energy for phase calculation
65  Double_t fPxBeam{};
66  Double_t fPyBeam{};
67  Double_t fPzBeam{};
68  std::vector<Double_t> fWm; // Total mass
69 
70  TH2F *fh_pdf{};
71 
72  ClassDef(AtTPCXSReader, 1)
73 };
74 
75 #endif
AtTPCXSReader::SetXSFileName
void SetXSFileName(TString name="xs_22Mgp_fusionEvaporation.txt")
Definition: AtTPCXSReader.h:49
AtTPCXSReader::ReadEvent
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Definition: AtTPCXSReader.cxx:153
AtTPCXSReader::~AtTPCXSReader
virtual ~AtTPCXSReader()=default
AtTPCXSReader
Definition: AtTPCXSReader.h:24
AtTPCXSReader::AtTPCXSReader
AtTPCXSReader()
Definition: AtTPCXSReader.cxx:34
AtTPCXSReader::operator=
AtTPCXSReader & operator=(const AtTPCXSReader &)
Definition: AtTPCXSReader.h:37