| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Li9He8 Class Reference

#include <Li9He8.h>

Collaboration diagram for Li9He8:

[legend]
List of all members.

Public Member Functions

 Li9He8 (IRndmGenSvc *rgs)
 ~Li9He8 ()
void Li9Decay (TVector3 &pElectron, TVector3 &pNeutron, TVector3 &pAlpha1, TVector3 &pAlpha2, double alpha_mass, bool complete_decay)
void He8Decay (TVector3 &pElectron, TVector3 &pNeutron, TVector3 &pGamma, bool complete_decay)

Private Member Functions

void RandomVector (TVector3 &aVec)
double GetLi9AlphaEnergy (int whichcase)
double GetHe8NeutronEnergy ()
double GetIntermediateEnergy (double peak, double width, double max)
double FermiFunc (double T, double Z)
double BetaSpectrum (double E, double QOfDecay, double Z)
double GetSpectrumMax (double QOfDecay, int Z)
double GetElectronEnergy (double QOfDecay, int Z, double max)
double Li9NeutronLineShape1 (double x)
double Li9NeutronLineShape2 (double x)
double Li9NeutronLineShape3 (double x)
double GetLi9NeutronEnergy (int whichshape, double max)

Private Attributes

IRndmGenSvcm_rgs
Rndm::Numbers m_uni
Rndm::Numbers m_breitwigner

Detailed Description

Definition at line 21 of file Li9He8.h.


Constructor & Destructor Documentation

Li9He8::Li9He8 ( IRndmGenSvc rgs  ) 

Definition at line 18 of file Li9He8.cc.

00019 {
00020   StatusCode sc = m_uni.initialize(rgs, Rndm::Flat(0,1));
00021   if (sc.isFailure()) {
00022     throw GaudiException("Failed to initialize uniform random numbers",
00023                          "GtDecayerator::DecayRates",StatusCode::FAILURE);
00024   }
00025   sc = m_breitwigner.initialize(rgs, Rndm::BreitWigner(0,1));
00026   if (sc.isFailure()) {
00027     throw GaudiException("Failed to initialize uniform random numbers",
00028                          "GtDecayerator::DecayRates",StatusCode::FAILURE);
00029   }
00030 
00031 }

Li9He8::~Li9He8 (  )  [inline]

Definition at line 25 of file Li9He8.h.

00025 {};


Member Function Documentation

void Li9He8::Li9Decay ( TVector3 &  pElectron,
TVector3 &  pNeutron,
TVector3 &  pAlpha1,
TVector3 &  pAlpha2,
double  alpha_mass,
bool  complete_decay 
)

Definition at line 341 of file Li9He8.cc.

00343 {
00344   double rn;
00345   //default is to skip the decay without neutron
00346   if(complete_decay) rn= m_uni();
00347   else rn = m_uni()*(1.-0.492)+0.492;//start from 0.492
00348   double intermediateEnergy = 0;
00349   double betaenergy = 0;
00350   double nenergy = 0;
00351   double aenergy1 = 0;
00352   double aenergy2 = 0;
00353 
00354   double max = 0;
00355   if (rn<0.492){
00356     max = GetSpectrumMax(13.6067,4);
00357     betaenergy = GetElectronEnergy(13.6067,4,max);
00358   }
00359   else if (rn<0.789) {//case 1 for alpha spectra
00360     intermediateEnergy = GetIntermediateEnergy(2.429,0.00077,13.6067);
00361     max = GetSpectrumMax(13.6067-intermediateEnergy,4);
00362     betaenergy = GetElectronEnergy(13.6067-intermediateEnergy,4,max);
00363     nenergy = GetLi9NeutronEnergy(1,8264);
00364     aenergy1 = GetLi9AlphaEnergy(1);
00365     aenergy2 = GetLi9AlphaEnergy(1);
00366   }
00367   else if (rn < 0.947) {//case 1 for alpha spectra
00368     intermediateEnergy = GetIntermediateEnergy(2.78,1.08,13.6067);
00369     max = GetSpectrumMax(13.6067-intermediateEnergy,4);
00370     betaenergy = GetElectronEnergy(13.6067-intermediateEnergy,4,max);
00371     nenergy = GetLi9NeutronEnergy(2,1068);
00372     aenergy1 = GetLi9AlphaEnergy(1);
00373     aenergy2 = GetLi9AlphaEnergy(1);
00374   }
00375   else if (rn < 0.962) {//case 2 for alpha spectra
00376     intermediateEnergy = GetIntermediateEnergy(7.94,1.0,13.6067);
00377     max = GetSpectrumMax(13.6067-intermediateEnergy,4);
00378     betaenergy = GetElectronEnergy(13.6067-intermediateEnergy,4,max);
00379     nenergy = GetLi9NeutronEnergy(3,300);
00380     aenergy1 = GetLi9AlphaEnergy(2);
00381     aenergy2 = GetLi9AlphaEnergy(2);
00382   }
00383   else if (rn < 0.973) {//case 2 for alpha spectra
00384     intermediateEnergy = GetIntermediateEnergy(11.283,0.575,13.6067);
00385     max = GetSpectrumMax(13.6067-intermediateEnergy,4);
00386     betaenergy = GetElectronEnergy(13.6067-intermediateEnergy,4,max);
00387     nenergy = GetLi9NeutronEnergy(3,300);
00388     aenergy1 = GetLi9AlphaEnergy(2);
00389     aenergy2 = GetLi9AlphaEnergy(2);
00390   }
00391   else {//case 2 for alpha spectra
00392     intermediateEnergy = GetIntermediateEnergy(11.81,0.400,13.6067);
00393     max = GetSpectrumMax(13.6067-intermediateEnergy,4);
00394     betaenergy = GetElectronEnergy(13.6067-intermediateEnergy,4,max);
00395     nenergy = GetLi9NeutronEnergy(3,300);
00396     aenergy1 = GetLi9AlphaEnergy(2);
00397     aenergy2 = GetLi9AlphaEnergy(2);
00398   }
00399 
00400   // Electron momentum vector is isotropic
00401   double eMom = sqrt(2*betaenergy*electron_mass_c2+betaenergy*betaenergy);
00402   eMom *= MeV;
00403   RandomVector(pElectron);
00404   pElectron *= eMom;
00405 
00406   // Neutron momentum vector is isotropic
00407   if(nenergy>0){//there is neutron come out
00408     double nMom = sqrt(2*nenergy*neutron_mass_c2+nenergy*nenergy);
00409     nMom *= MeV;
00410     RandomVector(pNeutron);
00411     pNeutron *= nMom;
00412 
00413     //alpha momentum setup isotropically
00414     double aMom1 = sqrt(2*aenergy1*alpha_mass+aenergy1*aenergy1);
00415     aMom1 *= MeV;
00416     RandomVector(pAlpha1);
00417     pAlpha1 *= aMom1;
00418 
00419     //alpha2
00420     double aMom2 = sqrt(2*aenergy2*alpha_mass+aenergy2*aenergy2);
00421     aMom2 *= MeV;
00422     RandomVector(pAlpha2);
00423     pAlpha2 *= aMom2;
00424   }  
00425 }

void Li9He8::He8Decay ( TVector3 &  pElectron,
TVector3 &  pNeutron,
TVector3 &  pGamma,
bool  complete_decay 
)

Definition at line 431 of file Li9He8.cc.

00433 {
00434   double rn;
00435   //degault is to skip the decay without neutron
00436   if(complete_decay) rn= m_uni();
00437   else rn = m_uni()*(1-0.84)+0.84; //start from 0.84
00438   double intermediateEnergy = 0;
00439   double betaenergy = 0;
00440   double nenergy = 0;
00441   double gammaenergy = 0;
00442 
00443   double max = 0;
00444   if (rn<0.84){//84% to the 0.9808MeV state, no neutron
00445     max = GetSpectrumMax(10.649-0.9808,3);//(Q,Z)
00446     betaenergy = GetElectronEnergy(10.649-0.9808,3,max);
00447     gammaenergy = 0.9808;
00448   }
00449   else {//16% neutron
00450     nenergy = GetHe8NeutronEnergy();
00451     if( m_uni()<0.32 ){//32% gamma 
00452       gammaenergy = 0.478;
00453     }
00454     double He8Br = m_uni();
00455     if( He8Br<7.8/(7.8+2.6) ){//3.21 MeV state
00456       intermediateEnergy = GetIntermediateEnergy(3.21,1.0,10.649);
00457       max = GetSpectrumMax(10.649-intermediateEnergy,3);
00458       betaenergy = GetElectronEnergy(10.649-intermediateEnergy,3,max);
00459     }
00460     else {//5.4 MeV state
00461       intermediateEnergy = GetIntermediateEnergy(5.4,0.65,10.649);
00462       max = GetSpectrumMax(10.649-intermediateEnergy,3);
00463       betaenergy = GetElectronEnergy(10.649-intermediateEnergy,3,max);
00464     }
00465   }
00466 
00467   // Electron momentum vector is isotropic
00468   double eMom = sqrt(2*betaenergy*electron_mass_c2+betaenergy*betaenergy);
00469   eMom *= MeV;
00470   RandomVector(pElectron);
00471   pElectron *= eMom;
00472 
00473   // Neutron momentum vector is isotropic
00474   if(nenergy>0){//there is neutron come out
00475     //neutron momentum setup isotropically
00476     double nMom = sqrt(2*nenergy*neutron_mass_c2+nenergy*nenergy);
00477     nMom *= MeV;
00478     RandomVector(pNeutron);
00479     pNeutron *= nMom;
00480   }
00481 
00482   //gamma momentum setup isotropically
00483   if(gammaenergy>0){
00484     RandomVector(pGamma);
00485     pGamma *= gammaenergy*MeV;
00486   }
00487 }

void Li9He8::RandomVector ( TVector3 &  aVec  )  [private]

Definition at line 33 of file Li9He8.cc.

00034 {
00035   double theta, phi;
00036   double rn1 = m_uni();
00037   double rn2 = m_uni();
00038   
00039   theta = acos(1-2*rn1);
00040   phi = 2*pi*rn2;
00041   
00042   aVec.SetMagThetaPhi(1.,theta,phi);
00043 }

double Li9He8::GetLi9AlphaEnergy ( int  whichcase  )  [private]

Definition at line 47 of file Li9He8.cc.

00048 {
00049   //alpha sectra 
00050   double x[181],y[181];
00051 x[0]=0.0256274;y[0]=1831.06;
00052 x[1]=0.0633363;y[1]=2024.86;x[2]=0.101034;y[2]=2211.13;x[3]=0.119957;y[3]=2507.88;
00053 x[4]=0.13888;y[4]=2844.46;x[5]=0.170319;y[5]=3145.64;x[6]=0.214286;y[6]=3434.87;
00054 x[7]=0.25815;y[7]=3348.43;x[8]=0.295687;y[8]=3064.9;x[9]=0.326944;y[9]=2770.36;
00055 x[10]=0.345638;y[10]=2441.97;x[11]=0.364344;y[11]=2179.81;x[12]=0.383038;y[12]=1921.42;
00056 x[13]=0.407922;y[13]=1550.56;x[14]=0.432897;y[14]=1384.05;x[15]=0.457838;y[15]=1189.57;
00057 x[16]=0.464199;y[16]=1315.73;x[17]=0.476544;y[17]=1061.86;x[18]=0.488968;y[18]=936.029;
00058 x[19]=0.513955;y[19]=846.107;x[20]=0.538884;y[20]=718.107;x[21]=0.551309;y[21]=633.01;
00059 x[22]=0.557487;y[22]=572.266;x[23]=0.563642;y[23]=504.472;x[24]=0.576067;y[24]=444.691;
00060 x[25]=0.607312;y[25]=396.92;x[26]=0.6258;y[26]=278.848;x[27]=0.626018;y[27]=354.308;
00061 x[28]=0.632001;y[28]=258.526;x[29]=0.656862;y[29]=203.433;x[30]=0.675785;y[30]=230.735;
00062 x[31]=0.68186;y[31]=186.222;x[32]=0.694296;y[32]=166.237;x[33]=0.706675;y[33]=139.332;
00063 x[34]=0.725415;y[34]=129.167;x[35]=0.75039;y[35]=115.296;x[36]=0.888229;y[36]=104.146;
00064 x[37]=0.93842;y[37]=108.125;x[38]=0.982421;y[38]=122.617;x[39]=1.0074;y[39]=109.449;
00065 x[40]=1.03881;y[40]=118.025;x[41]=1.17665;y[41]=106.611;x[42]=1.19554;y[42]=116.432;
00066 x[43]=1.37112;y[43]=120.785;x[44]=1.40866;y[44]=110.558;x[45]=1.43994;y[45]=102.484;
00067 x[46]=1.54651;y[46]=101.133;x[47]=1.56535;y[47]=105.018;x[48]=1.59041;y[48]=102.387;
00068 x[49]=1.59656;y[49]=90.2576;x[50]=1.61546;y[50]=99.8223;x[51]=1.63421;y[51]=93.7139;
00069 x[52]=1.65298;y[52]=89.0953;x[53]=1.69686;y[53]=89.0707;x[54]=1.71557;y[54]=79.5085;
00070 x[55]=1.74074;y[55]=87.9307;x[56]=1.75318;y[56]=78.494;x[57]=1.88492;y[57]=85.6637;
00071 x[58]=1.89738;y[58]=78.4226;x[59]=1.91607;y[59]=69.1267;x[60]=1.94116;y[60]=69.9925;
00072 x[61]=1.96634;y[61]=78.3886;x[62]=1.99144;y[62]=80.3772;x[63]=2.00387;y[63]=70.8524;
00073 x[64]=2.01002;y[64]=62.4587;x[65]=2.02249;y[65]=57.9045;x[66]=2.03513;y[66]=64.8556;
00074 x[67]=2.14164;y[67]=59.3383;x[68]=2.15406;y[68]=52.3066;x[69]=2.18549;y[69]=57.1204;
00075 x[70]=2.21056;y[70]=56.396;x[71]=2.22305;y[71]=53.6187;x[72]=2.29195;y[72]=49.6914;
00076 x[73]=2.31701;y[73]=49.0612;x[74]=2.31701;y[74]=49.0612;x[75]=2.3609;y[75]=49.0476;
00077 x[76]=2.49263;y[76]=52.8572;x[77]=2.50507;y[77]=47.1846;x[78]=2.50507;y[78]=47.1846;
00078 x[79]=2.52389;y[79]=47.7774;x[80]=2.54265;y[80]=45.4228;x[81]=2.54265;y[81]=45.4228;
00079 x[82]=2.56134;y[82]=40.0385;x[83]=2.58019;y[83]=41.5767;x[84]=2.58019;y[84]=41.5767;
00080 x[85]=2.68073;y[85]=53.4643;x[86]=2.69943;y[86]=47.7246;x[87]=2.70559;y[87]=42.0708;
00081 x[88]=2.71174;y[88]=37.0868;x[89]=2.73056;y[89]=37.5528;x[90]=2.74322;y[90]=42.5944;
00082 x[91]=2.77454;y[91]=41.5258;x[92]=2.78698;y[92]=37.0692;x[93]=2.7994;y[93]=32.6765;
00083 x[94]=2.82444;y[94]=31.0648;x[95]=2.83082;y[95]=35.2368;x[96]=2.8372;y[96]=39.969;
00084 x[97]=2.87471;y[97]=35.227;x[98]=2.89977;y[98]=34.7803;x[99]=2.93111;y[99]=34.3378;
00085 x[100]=2.9874;y[100]=29.507;x[101]=3.00005;y[101]=33.4684;x[102]=3.01259;y[102]=33.4658;
00086 x[103]=3.03149;y[103]=37.0122;x[104]=3.05658;y[104]=37.4757;x[105]=3.07529;y[105]=33.4525;
00087 x[106]=3.10033;y[106]=32.206;x[107]=3.13794;y[107]=31.7951;x[108]=3.15658;y[108]=26.6481;
00088 x[109]=3.16297;y[109]=30.2269;x[110]=3.18181;y[110]=31.3881;x[111]=3.18797;y[111]=27.6697;
00089 x[112]=3.19412;y[112]=24.3917;x[113]=3.21287;y[113]=22.8991;x[114]=3.22552;y[114]=25.648;
00090 x[115]=3.2319;y[115]=29.0925;x[116]=3.25687;y[116]=25.9683;x[117]=3.34442;y[117]=20.1704;
00091 x[118]=3.36333;y[118]=22.5908;x[119]=3.38219;y[119]=23.7563;x[120]=3.41357;y[120]=24.667;
00092 x[121]=3.45105;y[121]=21.1992;x[122]=3.46347;y[122]=18.6871;x[123]=3.47599;y[123]=18.2204;
00093 x[124]=3.495;y[124]=22.8584;x[125]=3.52628;y[125]=21.1892;x[126]=3.55766;y[126]=22.0015;
00094 x[127]=3.58894;y[127]=20.3948;x[128]=3.60778;y[128]=20.913;x[129]=3.63899;y[129]=17.9737;
00095 x[130]=3.69545;y[130]=18.6598;x[131]=3.73912;y[131]=14.6816;x[132]=3.75157;y[132]=13.4406;
00096 x[133]=3.75796;y[133]=15.2456;x[134]=3.88329;y[134]=14.3031;x[135]=3.93996;y[135]=18.6311;
00097 x[136]=3.99617;y[136]=14.6578;x[137]=4.0086;y[137]=13.0847;x[138]=4.01502;y[138]=15.414;
00098 x[139]=4.03378;y[139]=14.6543;x[140]=4.04623;y[140]=13.2476;x[141]=4.14013;y[141]=11.2386;
00099 x[142]=4.15255;y[142]=9.90679;x[143]=4.17144;y[143]=10.8194;x[144]=4.17782;y[144]=12.2724;
00100 x[145]=4.22172;y[145]=12.4246;x[146]=4.25924;y[146]=11.0895;x[147]=4.28449;y[147]=13.3955;
00101 x[148]=4.34105;y[148]=15.5775;x[149]=4.37201;y[149]=10.1457;x[150]=4.46601;y[150]=9.64108;
00102 x[151]=4.5099;y[151]=9.76068;x[152]=4.51629;y[152]=11.0715;x[153]=4.55383;y[153]=10.1341;
00103 x[154]=4.61626;y[154]=7.58054;x[155]=4.61642;y[155]=6.04361;x[156]=4.70998;y[156]=5.32303;
00104 x[157]=4.77286;y[157]=6.50995;x[158]=4.80433;y[158]=7.47671;x[159]=4.82321;y[159]=8.06317;
00105 x[160]=4.8796;y[160]=7.76119;x[161]=4.96742;y[161]=8.15803;x[162]=5.09882;y[162]=6.09977;
00106 x[163]=5.13653;y[163]=6.74537;x[164]=5.19263;y[164]=4.7377;x[165]=5.25514;y[165]=3.82235;
00107 x[166]=5.33026;y[166]=3.36807;x[167]=5.3363;y[167]=2.61743;x[168]=5.3675;y[168]=2.22137;
00108 x[169]=5.43639;y[169]=2.05867;x[170]=5.58667;y[170]=1.66001;x[171]=5.66189;y[171]=1.63843;
00109 x[172]=5.71198;y[172]=1.51861;x[173]=5.84989;y[173]=1.47951;x[174]=5.9878;y[174]=1.45971;
00110 x[175]=6.11946;y[175]=1.4585;x[176]=6.18844;y[176]=1.47636;x[177]=6.2511;y[177]=1.42101;
00111 x[178]=6.45168;y[178]=1.34943;x[179]=6.65234;y[179]=1.39967;x[180]=6.92197;y[180]=1.45114;
00112  
00113   bool accept = 0;
00114   double alphaenergy = -1;
00115   if( whichcase == 1 ){//case 1, from x[0] to x[44]
00116     while(!accept){
00117       double sampling = m_uni()*x[44];
00118       //find y value of the sampling point 
00119       double yvalue = 0;
00120       for(int i=0;i<43;i++){
00121         if(sampling > x[i] && sampling < x[i+1]){
00122           yvalue = (y[i]+y[i+1])/2.;
00123           break;
00124         }
00125       }
00126 
00127       double max = 3500.0; //maximum of case 1
00128       if( yvalue > m_uni()*max ){
00129         alphaenergy = sampling;
00130         accept = 1;
00131       }
00132     }
00133   }
00134   if( whichcase == 2 ){//case 2, from x[44] to x[180]
00135     while(!accept){
00136       double sampling = m_uni()*(7.0-x[44])+x[44];
00137       //find y value of the sampling point 
00138       double yvalue = 0;
00139       for(int i=44;i<180;i++){
00140         if(sampling > x[i] && sampling < x[i+1]){
00141           yvalue = (y[i]+y[i+1])/2.;
00142           break;
00143         }
00144       }
00145 
00146       double max = 111.0; //maximum of case 2
00147       if( yvalue > m_uni()*max ){
00148         alphaenergy = sampling;
00149         accept = 1;
00150       }
00151     }
00152   }
00153 
00154   return alphaenergy;
00155 }

double Li9He8::GetHe8NeutronEnergy (  )  [private]

Definition at line 159 of file Li9He8.cc.

00160 {
00161   double x[2000];
00162   double y[2000];
00163 x[0]=0.153478;y[0]=1.6369;
00164 x[1]=0.219561;y[1]=1.9881;x[2]=0.297456;y[2]=2.35119;x[3]=0.367927;y[3]=2.32143;
00165 x[4]=0.442927;y[4]=1.94643;x[5]=0.531232;y[5]=1.96429;x[6]=0.60873;y[6]=2.22619;
00166 x[7]=0.684524;y[7]=2.05357;x[8]=0.778758;y[8]=2.08333;x[9]=0.855089;y[9]=2.04762;
00167 x[10]=0.92458;y[10]=1.76786;x[11]=1.00093;y[11]=1.7381;x[12]=1.08301;y[12]=1.66667;
00168 x[13]=1.17085;y[13]=1.56548;x[14]=1.22908;y[14]=1.41667;x[15]=1.31653;y[15]=1.21429;
00169 x[16]=1.38128;y[16]=1.22619;x[17]=1.48088;y[17]=1.125;x[18]=1.55124;y[18]=1.06548;
00170 x[19]=1.63894;y[19]=0.928571;x[20]=1.7152;y[20]=0.875;x[21]=1.79743;y[21]=0.845238;
00171 x[22]=1.87967;y[22]=0.815476;x[23]=1.9497;y[23]=0.672619;x[24]=2.02633;y[24]=0.714286;
00172 x[25]=2.10212;y[25]=0.541667;x[26]=2.17264;y[26]=0.52381;x[27]=2.2489;y[27]=0.470238;
00173 x[28]=2.33665;y[28]=0.345238;x[29]=2.41349;y[29]=0.440476;x[30]=2.49542;y[30]=0.333333;
00174 x[31]=2.57782;y[31]=0.345238;x[32]=2.65437;y[32]=0.363095;x[33]=2.73049;y[33]=0.27381;
00175 x[34]=2.80717;y[34]=0.327381;x[35]=2.88336;y[35]=0.255952;x[36]=2.96555;y[36]=0.214286;
00176 x[37]=3.04797;y[37]=0.232143;x[38]=3.11811;y[38]=0.119048;x[39]=3.19484;y[39]=0.184524;
00177 x[40]=3.27659;y[40]=0.0297619;x[41]=3.34753;y[41]=0.119048;x[42]=3.43574;y[42]=0.113095;
00178 
00179   bool accept = 0;
00180   double nenergy = 0;
00181   while(!accept){
00182     double sampling = m_uni()*4;
00183     //find y value of the sampling point 
00184     double yvalue = 0;
00185     for(int i=0;i<42;i++){
00186       if(sampling > x[i] && sampling < x[i+1]){
00187         yvalue = (y[i]+y[i+1])/2.;
00188         break;
00189       }
00190     }
00191     double max = 2.5; //maximum 
00192     if( yvalue > m_uni()*max ){
00193       nenergy = sampling;
00194       accept = 1;
00195     }
00196   }
00197   return nenergy;
00198 }  

double Li9He8::GetIntermediateEnergy ( double  peak,
double  width,
double  max 
) [private]

Definition at line 203 of file Li9He8.cc.

00204 {
00205   if (width==0) return peak;
00206 
00207   double energy= -1;
00208   do {
00209     //    energy = RandBreitWigner::shoot(peak,width);
00210     energy = m_breitwigner()*width+peak;
00211   } while (energy < 0 || energy > max);
00212   
00213   return energy;
00214 }

double Li9He8::FermiFunc ( double  T,
double  Z 
) [private]

Definition at line 217 of file Li9He8.cc.

00217                                            {
00218   double A1, A2;
00219   double P, U, S, Y;
00220   double F2;
00221   double E = T+1.;  
00222   P=std::sqrt(E*E-1.0) ;
00223   U=Z/137.0;
00224   S=std::sqrt(1.0-U*U) - 1.;
00225   Y = 2*pi*U*E/P;
00226   A1 = U*U*E*E + P*P/4.;
00227   A2 = std::fabs(Y/(1-std::exp(-Y)));
00228   F2 = std::pow(A1,S) * A2; 
00229   return F2;
00230 }

double Li9He8::BetaSpectrum ( double  E,
double  QOfDecay,
double  Z 
) [private]

Definition at line 233 of file Li9He8.cc.

00234 {
00235   if(E>QOfDecay) return 0;
00236   else{
00237     return FermiFunc(E/electron_mass_c2, Z)*sqrt(E*E+2*electron_mass_c2*E)*(QOfDecay-E)*(QOfDecay-E)*(E+electron_mass_c2);
00238   }
00239 }

double Li9He8::GetSpectrumMax ( double  QOfDecay,
int  Z 
) [private]

Definition at line 242 of file Li9He8.cc.

00243 {
00244   double max = 0;
00245   int nbins = 100;
00246   double de = QOfDecay/nbins;
00247   for(int i=0; i<100; i++){
00248     double E = de*(i+1);
00249     double betaE = FermiFunc(E/electron_mass_c2, Z)*sqrt(E*E+2*electron_mass_c2*E)*(QOfDecay-E)*(QOfDecay-E)*(E+electron_mass_c2);
00250     if(betaE > max) max = betaE;
00251   }
00252 
00253   return max*1.2; //enlarge a little bit to assure it is larger than max
00254 }

double Li9He8::GetElectronEnergy ( double  QOfDecay,
int  Z,
double  max 
) [private]

Definition at line 257 of file Li9He8.cc.

00258 {
00259   double trialE, rn_y;
00260   do {
00261     trialE = QOfDecay*m_uni();
00262     rn_y = max*m_uni();
00263   } while ( rn_y > BetaSpectrum(trialE,QOfDecay,Z) );
00264   
00265   return trialE;
00266 }

double Li9He8::Li9NeutronLineShape1 ( double  x  )  [private]

Definition at line 270 of file Li9He8.cc.

00271 {
00272   double mean  = 0.2279;
00273   double width = 0.3266;
00274   double norm  = 674.1;
00275   double mean2 = 0.6661;
00276   double width2= 0.05699;
00277   double norm2 = 24.78;
00278 
00279   double sum = norm*width/((x-mean)*(x-mean)+width*width/4.);
00280   sum += norm2*width2/((x-mean2)*(x-mean2)+width2*width2/4.);  
00281   return sum;
00282 }

double Li9He8::Li9NeutronLineShape2 ( double  x  )  [private]

Definition at line 286 of file Li9He8.cc.

00287 {
00288   double mean  = 1.253;
00289   double width = 0.8205;
00290   double norm  = 219;
00291 
00292   return norm*width/((x-mean)*(x-mean)+width*width/4.);
00293 }

double Li9He8::Li9NeutronLineShape3 ( double  x  )  [private]

Definition at line 296 of file Li9He8.cc.

00297 {
00298   double mean  = 0.8;
00299   double width = 1.5;
00300   double norm  = 100;
00301 
00302   return norm*width/((x-mean)*(x-mean)+width*width/4.);
00303 }

double Li9He8::GetLi9NeutronEnergy ( int  whichshape,
double  max 
) [private]

Definition at line 306 of file Li9He8.cc.

00307 {
00308   bool accept = 0;
00309   double trial_E = 0;
00310   double shapeV;
00311   while(!accept){
00312     double rand1 = m_uni()*3.;//random energy
00313     double rand2 = m_uni()*max;
00314     if(whichshape == 1) {
00315       shapeV = Li9NeutronLineShape1(rand1);
00316     }
00317     else if(whichshape == 2) {
00318       shapeV = Li9NeutronLineShape2(rand1);
00319     }
00320     else if(whichshape == 3) {
00321       rand1 = m_uni()*10.;
00322       shapeV = Li9NeutronLineShape3(rand1);
00323     }
00324     else {
00325       cout << "Error! The first parameter must be 1, 2 or 3." << endl; 
00326       break;
00327     }
00328     if(rand2 < shapeV) {//accept
00329       trial_E = rand1;
00330       accept=1;
00331     }
00332   }    
00333 
00334   return trial_E;
00335 }


Member Data Documentation

IRndmGenSvc* Li9He8::m_rgs [private]

Definition at line 42 of file Li9He8.h.

Rndm::Numbers Li9He8::m_uni [private]

Definition at line 43 of file Li9He8.h.

Rndm::Numbers Li9He8::m_breitwigner [private]

Definition at line 43 of file Li9He8.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 21:05:23 2011 for Li9He8Decay by doxygen 1.4.7