er  dev
ERDecay10Heto8He.h
1 /********************************************************************************
2  * Copyright (C) Joint Institute for Nuclear Research *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef ERDecay10Heto8He_H
10 #define ERDecay10Heto8He_H
11 
12 #include <vector>
13 #include <fstream>
14 
15 #include "TGraph.h"
16 #include "TF1.h"
17 #include "TRandom3.h"
18 #include "TRandom2.h"
19 #include "TGenPhaseSpace.h"
20 #include "TLorentzVector.h"
21 
22 #include "FairIon.h"
23 
24 #include "ERDecay.h"
25 
26 class ERDecay10Heto8He : public ERDecay {
27 
28 public:
31 
32  /*Modifiers*/
33  void SetMinStep(Double_t minStep) {fMinStep = minStep;}
34  void SetTargetThickness(Double_t targetThickness) {fTargetThickness = targetThickness;}
35  void SetHe10Mass(Double_t mass) {f10HeMass = mass; fIs10HeUserMassSet = true;}
36  void SetHe10Exitation(Double_t excMean, Double_t fwhm, Double_t distibWeight);
37  void SetDecayFile(const TString& filePath, Double_t excitationEnergyInFile /*[GeV]*/){ fDecayFilePath = filePath; }
38 
43 void SetAngularDistribution(TString ADfile);
44 
45 public:
46  Bool_t Init();
47  Bool_t Stepping();
48  // Bool_t Init() { return true; }
49  // Bool_t Stepping() { return true; }
50 
51 
52  void BeginEvent();
53  void FinishEvent();
54  // void PrintMass();
55 
56 private:
61  void ReactionPhaseGenerator(Double_t Ecm, Double_t he10Mass);
62 
63  Bool_t DecayPhaseGenerator(Double_t excitation);
64 
65  std::vector<TLorentzVector> ReadDecayEvent();
66 
67 private:
68  TRandom3 *fRnd;
69  TRandom3 *fRnd2;
70 
71  TParticlePDG *f8He;
72  TParticlePDG *f10He;
73  TParticlePDG *f3H;
74  TParticlePDG *f1H;
75  TParticlePDG *fn;
76  //TParticlePDG *f6He;
77 
78 
79  TLorentzVector *fLv10He;
80  TLorentzVector *fLv1H;
81  TLorentzVector *fLv8Hed;
82  TLorentzVector *fLvn1;
83  TLorentzVector *fLvn2;
84 
85 // FairIon *fIon1H;
86  FairIon *fUnstableIon10He;
87 
88  TGenPhaseSpace *fReactionPhaseSpace;
89  TGenPhaseSpace *fDecayPhaseSpace;
90  Double_t fTargetReactZ;
91  Double_t fMinStep;
92  Double_t fTargetThickness;
93  Bool_t fDecayFinish;
94 
95  std::vector<Double_t> f10HeExcitationMean;
96  std::vector<Double_t> f10HeExcitationSigma;
97  std::vector<Double_t> f10HeExcitationWeight;
98 
99  Double_t f10HeMass;
100  Bool_t fIs10HeUserMassSet;
101  Bool_t fIs10HeExcitationSet;
102 
103  TString fDecayFilePath;
104  Double_t fDecayFileExcitation = 1. /*[GeV]*/;
105  Bool_t fDecayFileFinished;
106  Int_t fDecayFileCurrentEvent;
107  std::ifstream fDecayFile;
108 
109  TGraph *fADInput = nullptr;
110  TF1 *fADFunction = nullptr;
111  Double_t fThetaMin = 0.;
112  Double_t fThetaMax = 0.;
113 
114  //ADEvaluate function is necessary for TF1 constructor
115  Double_t ADEvaluate(Double_t *x, Double_t *p);
116 
117 
118 
119  ClassDef(ERDecay10Heto8He,1);
120 };
121 
122 #endif
TF1 * fADFunction
distribution (angular distribution) graph containing AD input
TLorentzVector * fLvn1
8He decay
Double_t fThetaMin
function describing AD (angular distribution) of binary reaction
void ReactionPhaseGenerator(Double_t Ecm, Double_t he10Mass)
Body reaction in phase space approach.
void SetAngularDistribution(TString ADfile)
Sets distribution is contained in file.