26 theta = 180*theta/TMath::Pi();
27 double a = -0.8816/10000 /(1/theta -0.1117/1000 * theta) - 0.1096 - 0.01966*TMath::Exp(-0.02040*theta);
28 double b = 0.4169/100 /(1/theta -0.9891/10000 * theta) + 4.0395 - 4.3118*TMath::Exp(0.9235/1000*theta);
29 double btilde = b + 1.0/TMath::Ln10();
30 double gamma = sqrt(-TMath::Ln10()*a);
31 double offset = 0.5*btilde/a;
32 double norm = TMath::Erf(gamma*(TMath::Log(100)+offset)) - TMath::Erf(gamma*(offset + TMath::Log(minE)));
35 double r3 =
rng->Uniform();
36 return exp(TMath::ErfInverse(r3*norm+TMath::Erf(gamma*(offset + TMath::Log(minE))))/gamma-offset);
39 double c = -0.3516/1000 * theta*theta + 0.8861/100 * theta - 2.5985 -0.8745/100000*TMath::Exp(0.1457*theta);
40 double scale = 0.5*TMath::Sqrt(TMath::Pi())/gamma * TMath::Power(10,(-0.25/a*btilde*btilde + c));
78 TDatabasePDG* pdgBase = TDatabasePDG::Instance();
79 mass = pdgBase->GetParticle(13)->Mass();
80 cout<<
"----------------------------------------------------------------------"<<endl;
81 cout<<
"configuration for the CMBG as defined in $FAIRSHIP/python/CMBG_conf.py: "<<endl;
82 cout<<
"x_dist: "<<
xdist<<endl;
83 cout<<
"z_dist: "<<
zdist<<endl;
84 cout<<
"x_box: "<<
xBox<<endl;
85 cout<<
"y_box: "<<
yBox<<endl;
86 cout<<
"z_box: "<<
zBox<<endl;
88 cout<<
"minE: "<<
minE<<endl<<endl;
89 if (
xdist*
zdist*
n_EVENTS == 0){cout<<
"check the configuration for unphysical behavior."<<endl<<
"We stop the execution."<<endl<<endl;
return kFALSE;}
92 if (
high) cout<<
"Simulation for high momentum"<<endl;
93 else cout<<
"Simulation for low momentum"<<endl;
100 double weight_flux, weight_DetectorBox;
103 if (
minE > 100) {cout<<
"choose minE < 100 !"<<endl;
return kFALSE;}
104 double dt = TMath::Pi()/2/100;
105 for (
double t= dt/2; t< TMath::Pi()/2; t += dt){
109 cout<<
"LowE CM flux with P < minE = "<<
minE<<
" : "<<
FluxIntegral<<
"m-2s-1"<<endl;
113 cout<<
"HighE CM flux: "<<
FluxIntegral<<
"m-2s-1"<<endl;
122 weight = weight_flux / weight_DetectorBox;
123 cout<<
"weight_DetectorBox: "<< weight_DetectorBox<<
", weight: "<<
weight<<endl;
124 cout<<
"----------------------------------------------------------------------"<<endl<<endl;