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

Go to the documentation of this file.
00001 #include "TPiFormFactor.h"
00002 #include "TRadGlobal.h"
00003 #include "TConstants.h"
00004 #include "TF1.h"
00005 #include <iostream>
00006 #include <complex>
00007 #include <stdexcept>
00008 
00009 using namespace std;
00010 
00011 TPiFormFactor *fPi;
00012 double isr(double *x, double *p){
00013   double nu = x[0];
00014   double s = p[0];
00015   double beta2 = p[1];
00016   complex<double> f = fPi->Eval(s*(1-nu));
00017   double fpi2 = abs(f*conj(f));
00018   double onemnu2 = pow(1-nu,2);
00019   return (1 + onemnu2)/(onemnu2*nu)*(beta2-nu)*sqrt((beta2-nu)/(1-nu))*fpi2;
00020 }
00021 
00022 #define Li2 TMath::DiLog
00023 int main(unsigned int argc, char **argv){
00024   double E = 450;
00025   if(argc>1) E = atof(argv[1]);
00026   double Delta = 0.01;
00027   if(argc>2) Delta = atof(argv[2]);
00028 
00029   gConst = new TConstants();
00030   gGlobal = new TRadGlobal();
00031   gGlobal->Set_Type(2);
00032   gGlobal->Set_E(E);
00033   gGlobal->Set_ThetaMin(0.9);
00034   gGlobal->Set_dE_Abs(0.1);
00035   gGlobal->Set_Theta0_Rel(1);
00036   gGlobal->Set_ThetaInt(0.6);
00037   gGlobal->Set_TotalError(1.);
00038   gGlobal->Set_RelativeError(0.01);
00039   
00040   try{
00041     gGlobal->Init();
00042   }catch(std::logic_error lge){
00043     cout<<lge.what()<<endl;
00044     return 1;
00045   }
00046   
00047   fPi = new TPiFormFactor();
00048   fPi->Init();
00049   if(argc>3) fPi->SetUnitFF();
00050   double beta2 = pow(gGlobal->Get_BetaF(),2);
00051   double le = gGlobal->Get_L();
00052   double s = 4*E*E;
00053   cout<<E<<" "<<beta2<<" "<<le<<" "<<gGlobal->Get_MF2()<<endl;
00054   TF1 fisr("isr",isr,0,1,2);
00055   fisr.SetParameters(s,beta2);
00056   double sum = fisr.Integral(Delta, 1 - gGlobal->Get_MF2());
00057   complex<double> fpi = fPi->Eval(s);
00058   double sigmaBorn = M_PI*gConst->Alpha2()*pow(gGlobal->Get_BetaF(),3)/(3*s)*abs(fpi*conj(fpi));
00059   double sigmaISRhard = sum*(le-1)*gConst->Alpha3()/(3*s);
00060   double sigmaISRsoftvirt = 2*gConst->AlphaPi()*sigmaBorn*
00061     ((le-1)*log(Delta) + 3./4.*le - 1 + M_PI*M_PI/6);
00062 
00063   double beta = gGlobal->Get_BetaF();
00064   double bmp = (1.-beta)/(1.+beta);
00065   
00066   double lambda = (1.+beta2)/beta*
00067     (4.*Li2(bmp) + 2.*Li2(-bmp) - (3.*log(2./(1.+beta))+2.*log(beta))*log(1./bmp) ) -
00068     3.*log(4./(1.-beta2)) - 4.*log(beta) + 
00069     (5./4.*pow(1.+beta2, 2)-2.)/pow(beta,3)*log(1./bmp)+ 3./2.*(1.+beta2)/beta2;
00070   double sigmaFSR = 2*gConst->AlphaPi()*sigmaBorn*lambda/2;
00071 
00072   double hc2 = gConst->HC2()*1e7;
00073   cout<<hc2*sigmaISRhard<<" "<<hc2*sigmaISRsoftvirt<<" "<<hc2*sigmaFSR<<" "<<hc2*sigmaBorn<<endl;
00074   cout<<hc2*(sigmaISRhard + sigmaISRsoftvirt + sigmaFSR + sigmaBorn)<<endl;
00075   cout<<(sigmaISRhard + sigmaISRsoftvirt + sigmaFSR + sigmaBorn)/sigmaBorn<<endl;
00076 }

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