/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/Mcgpj/Mcgpj-00-01-04/src/code/src/TRadGlobal.C

Go to the documentation of this file.
00001 #include "TRadGlobal.h"
00002 #include <iostream>
00003 #include <stdexcept>
00004 
00005 TRadGlobal::TRadGlobal(){
00006   // Set error
00007   fRelativeError = 0.1;
00008   fTotalError = -1;
00009 
00010   // Set general parameters
00011   fE      = -1;
00012   fThetaMin = -1;
00013   fType   = -1;
00014   // Set auxiliary parameters
00015   fdE     = -1;
00016   fdE_Rel = -1;
00017 
00018   fTheta0 = -1;
00019   fTheta0_Rel = -1;
00020 
00021   fThetaInt = -1;
00022   fInfraRedCut = 1e-10;
00023 }
00024 
00025 TRadGlobal::~TRadGlobal(){}
00026 
00027 void TRadGlobal::Default(){
00028   // Set general parameters
00029   fThetaMin = 0.975;
00030 
00031   // Set auxiliary parameters
00032   fdE     = 2.;
00033   fTheta0 = 2;
00034   fThetaInt = 0.473;
00035 }
00036 
00037 void TRadGlobal::Init(){
00038   // Set masses of inital and final particles
00039   fMI     = gConst->Me();
00040   switch(fType){
00041   case 0:
00042     fMF     = gConst->Me();
00043     break;
00044   case 1:
00045     fMF     = gConst->Mmu();
00046     break;
00047   case 2:
00048     fMF     = gConst->Mpi();
00049     break;
00050   case 3:
00051     fMF     = gConst->MK0();
00052     break;
00053   case 4:
00054     fMF     = gConst->MKC();
00055     //    throw std::logic_error("Charged kaon is not really yet implemented! Sorry...");
00056     break;
00057   case 5:
00058     fMF     = gConst->Mtau();
00059     break;
00060   case 6:
00061     fMF     = 0;
00062     break;
00063   default:
00064     throw std::logic_error("Wrong or no process type is defined!");
00065     break;
00066   }
00067 
00068   if(fE<=fMF) 
00069     throw std::logic_error("Energy is not enough to produce final particles!");
00070 
00071   // Test for general parameters
00072   if(0>fE) throw std::logic_error("Energy is not defined!");
00073 
00074   if(0>fThetaMin) throw std::logic_error("ThetaMin is not defined!");
00075 
00076   // Test for auxiliary parameters
00077   if(0>fdE)
00078     if(0>fdE_Rel) 
00079       throw std::logic_error("dE is not defined!");
00080     else
00081       fdE = fdE_Rel*fE;
00082 
00083   if(0>fTheta0)
00084     if(0>fTheta0_Rel)
00085       throw std::logic_error("Theta0 is not defined!");
00086     else
00087       fTheta0 = fTheta0_Rel*sqrt(fMI/fE);
00088   
00089   if(0>fThetaInt)
00090       throw std::logic_error("Theta Intermediate is not defined!");
00091   
00092   if(0>fTotalError)
00093       throw std::logic_error("Total error of cross section is not defined!");
00094   
00095   fs = 4.*fE*fE;
00096 
00097   fMI2    = 4.*fMI*fMI/fs;
00098   fBetaI  = sqrt(fE+fMI)*sqrt(fE-fMI)/fE;
00099   fGammaI = fE/fMI;
00100           
00101   fMF2    = 4.*fMF*fMF/fs;
00102   fBetaF  = sqrt(fE+fMF)*sqrt(fE-fMF)/fE;
00103   fGammaF = fE/fMF;
00104 
00105   fXMin   = fdE/fE;
00106   fLnXMin = log(fXMin);
00107   
00108   if(fMF<gConst->Me())
00109     fXMax   = 1 - pow(gConst->Me()/fE,2);
00110   else
00111     fXMax   = 1 - fMF2;
00112     
00113   //  fXMax   = 0.999;
00114   fLnXMax = log(fXMax);
00115   
00116   fLnR    = log(fXMax/fXMin);
00117 
00118   fCosTheta0 = cos(fTheta0);
00119   long double c = fBetaI*fCosTheta0;
00120   fLnD  = log((1l+c)/(1l-c));
00121 
00122   fL    = 2.*log(2.*fE/fMI);
00123   fBeta = 2.*gConst->AlphaPi()*(fL-1.);
00124   //  fD0   = 1.+3./8.*fBeta-fBeta*fBeta/48.*(gConst->Pi2() + fL/3. - 47./8.);
00125   fD0   = 1.+3./8.*fBeta+fBeta*fBeta/16.*(9./8. - gConst->Pi2()/3);
00126   fb    = pow(fXMin,0.5*fBeta)*fD0;
00127 
00128   fbRed = pow(fInfraRedCut,0.5*fBeta)*fD0;
00129   
00130   fCosThetaInt = cos(fThetaInt);
00131   fCosThetaMin = cos(fThetaMin);
00132 }
00133 
00134 void TRadGlobal::Print(void){
00135   using namespace std;
00136   cout
00137     <<"E                = "<<fE<<" MeV"<<endl
00138     <<"Abs dE           = "<<fdE<<" MeV"<<endl
00139     <<"Rel dE           = "<<fdE/fE<<"*E MeV"<<endl 
00140     <<"Abs Theta0       = "<<fTheta0<<" rad"<<endl
00141     <<"Rel Theta0       = "<<fTheta0/sqrt(fMI/fE)<<"*sqrt(Me/E) rad"<<endl
00142     <<"Minimal Theta    = "<<fThetaMin<<" rad"<<endl
00143     <<"Beta             = "<<fBeta<<endl
00144     <<"b                = "<<fb<<endl
00145     <<"L                = "<<fL<<endl
00146     <<"LnD              = "<<fLnD<<endl
00147     <<"XMax             = "<<fXMax<<endl
00148     <<flush;
00149 }

Generated on Tue Nov 29 23:12:42 2016 for BOSS_7.0.2 by  doxygen 1.4.7