ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtTPC_Background.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- AtTPC_Background header file -----
3 // ----- Inherit from FairIonGenerator ----
4 // ----- Created 17/04/17 by J. C. Zamora -----
5 // -------------------------------------------------------------------------
6 
7 #ifndef AtTPC_Background_H
8 #define AtTPC_Background_H
9 
10 #include <FairGenerator.h>
11 #include <FairIon.h> // for FairIon
12 #include <FairParticle.h> // for FairParticle
13 
14 #include <Rtypes.h>
15 #include <TString.h>
16 
17 #include <memory> // for unique_ptr
18 #include <vector>
19 
20 class FairPrimaryGenerator;
21 class TBuffer;
22 class TClass;
23 class TMemberInspector;
24 
25 class AtTPC_Background : public FairGenerator {
26 
27 public:
30 
31  AtTPC_Background(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);
34 
36 
37  AtTPC_Background &operator=(const AtTPC_Background &) { return *this; }
38 
39  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
40 
41  virtual Double_t omega(Double_t x, Double_t y, Double_t z);
42 
43  virtual Double_t *TwoB(Double_t m1b, Double_t m2b, Double_t m3b, Double_t m4b, Double_t Kb, Double_t thetacm);
44 
45  virtual std::vector<Double_t>
46  TRANSF(std::vector<Double_t> *from, std::vector<Double_t> *to, std::vector<Double_t> *vin);
47 
48  virtual std::vector<Double_t> BreakUp(std::vector<Double_t> *Pdeuteron);
49 
51  virtual ~AtTPC_Background() = default;
52 
53 private:
54  static Int_t fgNIon;
55  Int_t fMult; // Multiplicity per event
56  Bool_t fIsDecay{};
57  Double_t fVx, fVy, fVz; // Vertex coordinates [cm]
58  std::vector<std::unique_ptr<FairIon>> fIon; // Pointer to the FairIon to be generated
59  std::vector<TString> fPType;
60  std::vector<std::unique_ptr<FairParticle>> fParticle;
61  std::vector<Double_t> fPx, fPy, fPz; // Momentum components [MeV] per nucleon
62  std::vector<Double_t> Masses; // Masses of the N products
63  std::vector<Double_t> fExEnergy; // Excitation energies of the products
64  std::vector<Double_t> fWm; // Total mass
65  Int_t fN{};
66 
67  Double_t K1{};
68  Double_t m1{}, m2{}, m3{}, m4{}, m7{}, m8{};
69  Double_t Ex_ejectile{}, Ex_2he{};
70  Double_t test_var{};
71 
72  Double_t ranX{};
73  Int_t ran_theta{};
74 
75  Double_t Prec{};
76 
77  std::vector<Int_t> fQ; // Electric charge [e]
78 
79  Double_t fBeamEnergy{}; // Residual beam energy for phase calculation
80  Double_t fPxBeam{};
81  Double_t fPyBeam{};
82  Double_t fPzBeam{};
83 
84  Double_t random_z{};
85  Double_t random_r{};
86  Double_t random_phi{};
87 
88  ClassDef(AtTPC_Background, 2)
89 };
90 
91 #endif
AtTPC_Background::BreakUp
virtual std::vector< Double_t > BreakUp(std::vector< Double_t > *Pdeuteron)
Definition: AtTPC_Background.cxx:195
AtTPC_Background::AtTPC_Background
AtTPC_Background()
Definition: AtTPC_Background.cxx:24
AtTPC_Background::operator=
AtTPC_Background & operator=(const AtTPC_Background &)
Definition: AtTPC_Background.h:37
AtTPC_Background::ReadEvent
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Definition: AtTPC_Background.cxx:267
AtTPC_Background::TRANSF
virtual std::vector< Double_t > TRANSF(std::vector< Double_t > *from, std::vector< Double_t > *to, std::vector< Double_t > *vin)
Definition: AtTPC_Background.cxx:109
AtTPC_Background::omega
virtual Double_t omega(Double_t x, Double_t y, Double_t z)
Definition: AtTPC_Background.cxx:101
AtTPC_Background::~AtTPC_Background
virtual ~AtTPC_Background()=default
y
const double * y
Definition: lmcurve.cxx:20
AtTPC_Background::AtTPC_Background
AtTPC_Background(const AtTPC_Background &)
AtTPC_Background
Definition: AtTPC_Background.h:25
AtTPC_Background::TwoB
virtual Double_t * TwoB(Double_t m1b, Double_t m2b, Double_t m3b, Double_t m4b, Double_t Kb, Double_t thetacm)
Definition: AtTPC_Background.cxx:155