41 #include "starlightconfig.h"
82 double _sigmaSum=0.,remainw=0.;
85 cout <<
"MASS " <<
getMass() <<
"\n";
86 cout <<
"WIDTH " <<
getWidth() <<
"\n";
118 for(
int j =0;j<_GGsingInputnumy-1;j++){
119 _sigmaSum = _sigmaSum+
130 cout <<
"Total cross section: "<<_sigmaSum<<
" barn."<<endl;
131 }
else if (1000.*_sigmaSum > 1.){
132 cout <<
"Total cross section: "<<1000.*_sigmaSum<<
" mb."<<endl;
133 }
else if (1000000.*_sigmaSum > 1.){
134 cout <<
"Total cross section: "<<1000000.*_sigmaSum<<
" microbarn."<<endl;
135 }
else if (1.E9*_sigmaSum > 1.){
136 cout <<
"Total cross section: "<<1.E9*_sigmaSum<<
" nanobarn."<<endl;
137 }
else if (1.E12*_sigmaSum > 1.){
138 cout <<
"Total cross section: "<<1.E12*_sigmaSum<<
" picobarn."<<endl;
140 cout <<
"Total cross section: "<<1.E15*_sigmaSum<<
" femtobarn."<<endl;
153 double sgf=0.,signorm=0.,
x=0.,remainarea=0.,remainw=0.,a=0.,b=0.,
c=0.;
180 for(
int i=0;i<_GGsingInputnumw-1;i++){
182 sgfint[i+1]=sgfint[i]+sgf;
185 signorm=sgfint[_GGsingInputnumw-1];
188 sgfint[i]=sgfint[i]/signorm;
194 if(
x > sgfint[i]) ivalw=i;
197 remainarea =
x - sgfint[ivalw];
202 a = (_sigofw[ivalw+1]-_sigofw[ivalw])/2.;
207 remainw = (-b+sqrt(b*b-4.*a*
c))/(2.*a);
228 double remainw =0.,remainarea=0.,remainy=0.,a=0.,b=0.,
c=0.,sgf=0.,signorm=0.,
x=0.;
240 for(
int j=0;j<_GGsingInputnumy-1;j++){
241 sgf = (sigofy[j+1]+sigofy[j])/2.;
246 signorm = sgfint[_GGsingInputnumy-1];
249 sgfint[j]=sgfint[j]/signorm;
259 remainarea =
x - sgfint[ivaly];
263 a = (sigofy[ivaly+1]-sigofy[ivaly])/2.;
268 remainy = (-b + sqrt(b*b-4.*a*
c))/(2.*a);
281 double anglepp1=0.,anglepp2=0.,ppp1=0.,ppp2=0.,E1=0.,E2=0.,signpx=0.,pt=0.;
296 pt = sqrt(px*px+py*py);
298 E = sqrt(w*w+pt*pt)*cosh(y);
299 pz= sqrt(w*w+pt*pt)*sinh(y);
314 double ereds =0.,Cm=0.,Coef=0.,
x=0.,pp=0.,test=0.,
u=0.;
315 double singleformfactorCm=0.,singleformfactorpp1=0.,singleformfactorpp2=0.;
353 double ereds =0.,Cm=0.,Coef=0.,
x=0.,pp=0.,test=0.,
u=0.;
354 double singleformfactorCm=0.,singleformfactorpp1=0.,singleformfactorpp2=0.;
387 void Gammagammasingle::twoBodyDecay(
starlightConstants::particleTypeEnum &ipid,
double W,
double px0,
double py0,
double pz0,
double &px1,
double &py1,
double &pz1,
double &px2,
double &py2,
double &pz2,
int &iFbadevent)
392 double mdec=0.,E1=0.,E2=0.;
393 double pmag,ytest=0.;
394 double phi,
theta,xtest,dndtheta,Ecm;
395 double betax,betay,betaz;
417 cout<<
"No default mass selected for single photon-photon particle, expect errant results"<<endl;
422 cout<<
" ERROR: W="<<W<<endl;
426 pmag = sqrt(W*W/4. - mdec*mdec);
439 dndtheta = sin(theta)*sin(theta)*sin(theta)*sin(theta)*sin(theta);
444 px1 = sin(theta)*
cos(phi)*pmag;
445 py1 = sin(theta)*sin(phi)*pmag;
446 pz1 =
cos(theta)*pmag;
452 Ecm = sqrt(W*W+px0*px0+py0*py0+pz0*pz0);
453 E1 = sqrt(mdec*mdec+px1*px1+py1*py1+pz1*pz1);
454 E2 = sqrt(mdec*mdec+px2*px2+py2*py2+pz2*pz2);
462 transform (betax,betay,betaz,E1,px1,py1,pz1,iFbadevent);
463 transform (betax,betay,betaz,E2,px2,py2,pz2,iFbadevent);
492 cout<<
"Rethink the daughter particles"<<endl;
508 using namespace starlightConstants;
509 double singlemass=0.;
539 cout<<
"Not a recognized single particle, Gammagammasingle::getmass(), mass = 0."<<endl;
550 double singlewidth=0.;
580 cout<<
"Not a recognized single particle, Gammagammasingle::getwidth(), width = 0."<<endl;
589 double singlespin=0.5;
619 cout<<
"Not a recognized single particle, Gammagammasingle::getspin(), spin = 0."<<endl;
626 cout<<
" Gamma+Gamma -> single particle is not implemente in current eSTARlight build. REturning empty event"<<endl;