#include <MyHeSource.hh>
Public Methods | |
MyHeSource (int newIsotope=ISOTOPE, double newRmaxgen=RMAXGEN) | |
MyHeSource constructor. More... | |
~MyHeSource () | |
MyHeSource destructor. | |
MyHeSource (const MyHeSource &HeSource) | |
MyHeSource copy constructor. | |
MyHeSource & | operator= (const MyHeSource &rhs) |
MyHeSource overloaded = operator. | |
double | GetHeNeutronEnergy () const |
Returns the energy of the neutrons produced by each He decay. | |
double | GetHeBetaEnergy () const |
Returns the energy of the betas produced by each He decay. | |
double | GetHeGammaEnergy () const |
Returns the energy of the photons produced by each He decay. | |
double | GetHeWeight () const |
Returns the branching ratio weight for each He decay. | |
double | GetHeDecayTime () const |
Returns the decay time for each He decay. | |
Static Public Methods | |
float | BetaHighQ (const float &x) |
float | BetaMiddleQ (const float &x) |
float | BetaLowQ (const float &x) |
double | Fermi (const int &Z, const int &A, const float &x) |
The supported isotope is 8. The neutrons are generated by the He8NeutronSpectrum function, which the probability density of the produced neutrons as a function of neutron energy.
Definition at line 18 of file MyHeSource.hh.
|
MyHeSource constructor. Called with the desired He isotope: 8 and the maximum allowed radius for generating particles in the simulation, Rmaxgen (default = 200 cm). Definition at line 17 of file MyHeSource.cpp.
00018 { 00019 00020 Isotope = newIsotope; 00021 Rmaxgen = newRmaxgen; 00022 00023 //cout << "MyHeSource::MyHeSource(" << Isotope << "," << Rmaxgen 00024 // << ")" << endl; 00025 00026 // 8He 00027 if(Isotope == 8){ 00028 00029 // setup the decay parameters (from Jon Link) 00030 // Nneutron is always 1 and Ngamma always 0 00031 Nneutron = 1; 00032 Ngamma = 0; 00033 00034 // branching fraction (the 1.0000 bin contains all decays 00035 // which do nothing: neutron E = 0, beta Q = 0) 00036 float static br[4] = {0.080,0.160,0.169,1.0000}; 00037 00038 // Q-value for beta decay 00039 float static betaQ[4] = {7.442,5.252,1.852,0.000}; 00040 00041 // Q-value for the total decay chain 00042 float static totQ; 00043 totQ = 8.619; 00044 00045 // neutron energy 00046 float static neuE[4] = {0.697,2.887,6.727,0.000}; 00047 00048 // prepare the beta decay functions 00049 bool static first=1; 00050 float static fspace[3][200]; 00051 00052 if(first){ 00053 float xlo = 0.; 00054 funlxp_(BetaHighQ,fspace[0],xlo,betaQ[0]); 00055 funlxp_(BetaMiddleQ,fspace[1],xlo,betaQ[1]); 00056 funlxp_(BetaLowQ,fspace[2],xlo,betaQ[2]); 00057 00058 first = 0; 00059 } 00060 // 00061 // let the 8He decay 00062 // 00063 int ntrial = 0; 00064 bool passed = false; 00065 while(!passed){ 00066 const int len=1; 00067 float rv[len]; 00068 ranlux_(rv,len); 00069 // 00070 for(int i=0;i<4; i++){ 00071 if(rv[0] < br[i] && !passed){ 00072 00073 // pick an energy for each neutron 00074 neutronE = neuE[i]; 00075 00076 if(neutronE){ 00077 00078 // get the energy of the beta 00079 int len2 = 1; 00080 funlux_(fspace[i],betaE,len2); 00081 passed = true; 00082 } 00083 } 00084 } 00085 ntrial++; 00086 } 00087 Weight = 1./float(ntrial); 00088 00089 //cout << " 8He neutron energy = " << neutronE << " MeV" << endl; 00090 //cout << " 8He beta energy = " << betaE << " MeV" << endl; 00091 //cout << " 8He weight = " << Weight << endl; 00092 00093 // pick a decay time in ns 00094 double HalfLife = 1.2e8; 00095 00096 const int len=1; 00097 float rv[len]; 00098 ranlux_(rv,len); 00099 DecayTime = HalfLife*log(1/rv[0]); 00100 00101 } // done with 8He 00102 } |