43 using namespace starlightConstants;
79 double W,dW, dEgamma, minEgamma;
83 int iW,nW,iEgamma,nEgamma,
beam;
85 double bwnorm = bwnormsave;
97 cout<<
" Using Breit-Wigner Resonance Profile."<<endl;
100 cout<<
" Using Breit-Wigner plus direct pi+pi- profile."<<endl;
108 if( A_2 == 0 && A_1 >= 1 ){
111 }
else if( A_1 ==0 && A_2 >= 1){
123 for(iW=0;iW<=nW-1;iW++){
127 for(iEgamma = 0 ; iEgamma < nEgamma; ++iEgamma){
129 ega[0] = exp(minEgamma + iEgamma*dEgamma );
130 ega[1] = exp(minEgamma + (iEgamma+1)*dEgamma );
131 ega[2] = 0.5*(ega[0]+ega[1]);
133 double full_int[3] = {0};
134 double dndE[3] = {0};
136 for(
int iEgaInt = 0 ; iEgaInt < 3; ++iEgaInt){
146 double lnQ2ratio = std::log(Q2_max/Q2_min)/nQ2;
147 double lnQ2_min = std::log(Q2_min);
149 for(
int iQ2 = 0 ; iQ2 < nQ2; ++iQ2){
151 double q2_1 = exp( lnQ2_min + iQ2*lnQ2ratio);
152 double q2_2 = exp( lnQ2_min + (iQ2+1)*lnQ2ratio);
153 double q2_12 = (q2_2+q2_1)/2.;
156 full_int[iEgaInt] += (q2_2-q2_1)*(
g(ega[iEgaInt],q2_1)*
getcsgA(ega[iEgaInt],q2_1,beam)
157 +
g(ega[iEgaInt],q2_2)*
getcsgA(ega[iEgaInt],q2_2,beam)
158 + 4.*
g(ega[iEgaInt],q2_12)*
getcsgA(ega[iEgaInt],q2_12,beam) );
164 full_int[iEgaInt] = full_int[iEgaInt]/6.;
165 dndE[iEgaInt] = dndE[iEgaInt]/6.;
170 dR += 4.*full_int[2];
171 dR = dR*(ega[1]-ega[0])/6.;
178 dR2 = dR2*(ega[1]-ega[0])/6.;
190 #ifdef _makeGammaPQ2_
195 #ifdef _makeGammaPQ2_
203 int const nQ2bins = 19;
204 double const q2Edge[nQ2bins+1] = { 0.,1.,2.,3., 4.,5.,
209 double y1,y2,y12,ega1,ega2,ega12;
211 double csgA1, csgA2, csgA12;
215 double bwnorm = bwnormsave;
221 cout<<
" Using Breit-Wigner Resonance Profile."<<endl;
224 cout<<
" Using Breit-Wigner plus direct pi+pi- profile."<<endl;
236 printf(
" gamma+nucleon threshold: %e GeV \n", Eth);
246 cout<<
" Lomnitz debug :: sigma_gamma_p --> VM_p "<<endl;
247 cout<<
" Q2+MV2 \t \t"<<
" sigma_gamma_p --> VM_p (nanob)"<<endl;
250 double exp_target_cm = exp(-target_cm);
252 for(
int iQ2 = 0 ; iQ2 < nQ2bins; ++iQ2){
256 double q2_cor =
getcsgA_Q2_dep( (q2Edge[iQ2+1] + q2Edge[iQ2])/2. );
257 for(I=0;I<=NW-1;I++){
260 for(J=0;J<=(NY-1);J++){
261 y1 = _wideYmin + double(J)*
dY;
262 y2 = _wideYmin + double(J+1)*
dY;
264 double target_ega1, target_ega2, target_ega12;
265 if( A_2 == 0 && A_1 >= 1 ){
267 ega1 = 0.5*W*exp(-y1);
268 ega2 = 0.5*W*exp(-y2);
269 ega12 = 0.5*W*exp(-y12);
271 }
else if( A_1 ==0 && A_2 >= 1){
273 ega1 = 0.5*W*exp(y1);
274 ega2 = 0.5*W*exp(y2);
275 ega12 = 0.5*W*exp(y12);
279 ega1 = 0.5*W*exp(y1);
280 ega2 = 0.5*W*exp(y2);
281 ega12 = 0.5*W*exp(y12);
286 if(ega1 < Eth || ega2 < Eth)
290 target_ega1 = ega1*exp_target_cm;
291 target_ega12 = ega12*exp_target_cm;
292 target_ega2 = ega2*exp_target_cm;
307 dR = dR + 4.*q2_cor*csgA12;
308 dR = dR + q2_cor*csgA2;
311 dR2 = full_range_1*csgA1;
312 dR2 = dR2 + 4.*full_range_12*csgA12;
313 dR2 = dR2 + full_range_2*csgA2;
317 int_r2 = int_r2 +dR2;
322 cout<<
"Full range "<<int_r2*10000000<<endl;
323 cout<<(q2Edge[iQ2+1]+q2Edge[iQ2])/2.+W*W<<
" , "<<10000000.*int_r<<endl;
330 if (0.01*x_section > 1.){
331 cout<< name.c_str() <<0.01*x_section<<
" barn."<<endl;
332 }
else if (10.*x_section > 1.){
333 cout<< name.c_str() <<10.*x_section<<
" mb."<<endl;
334 }
else if (10000.*x_section > 1.){
335 cout<< name.c_str() <<10000.*x_section<<
" microb."<<endl;
336 }
else if (10000000.*x_section > 1.){
337 cout<< name.c_str() <<10000000.*x_section<<
" nanob."<<endl;
338 }
else if (1.E10*x_section > 1.){
339 cout<< name.c_str() <<1.E10*x_section<<
" picob."<<endl;
341 cout<< name.c_str() <<1.E13*x_section<<
" femtob."<<endl;