55 const char *tableLocationMu = mumu;
56 const char *tableLocationDown = downdown;
57 const char *tableLocationUp = upup;
62 cout <<
"initializing table " << tableLocationMu <<
": " << endl;
63 bool resultMu = ewbornMu.FillFromTable(tableLocationMu);
66 cout <<
"ERROR: could not parse table : " << tableLocationMu << endl;
70 cout <<
"initializing table " << tableLocationDown <<
": " << endl;
71 bool resultDown = ewbornDown.FillFromTable(tableLocationDown);
74 cout <<
"ERROR: could not parse table: " << tableLocationDown << endl;
78 cout <<
"initializing table " << tableLocationUp <<
": " << endl;
79 bool resultUp = ewbornUp.FillFromTable(tableLocationUp);
82 cout <<
"ERROR: could not parse table: " << tableLocationUp << endl;
355complex<double>
EWFACT(
int FLAV,
int NO,
double s,
double costhe){
356 complex<double> rezu=complex<double>(0.3,0.4);
371 double EaMin= ewb->EEa[0];
double EaMax= ewb->EEa[ewb->NA-1];
372 double EbMin= ewb->EEb[0];
double EbMax= ewb->EEb[ewb->NB-1];
373 double EcMin= ewb->EEc[0];
double EcMax= ewb->EEc[ewb->NC-1];
374 double EdMin= ewb->EEd[0];
double EdMax= ewb->EEd[ewb->ND-1];
377 double stepA= log(ewb->EEa[1] /ewb->EEa[0]);
378 double stepB= ewb->EEb[1] - ewb->EEb[0];
379 double stepC= ewb->EEc[1] - ewb->EEc[0];
380 double stepD= ewb->EEd[1] - ewb->EEd[0];
382 if(Ene>EbMin && Ene<EbMax){
383 int Index=((Ene-EbMin)/(EbMax-EbMin)*(ewb->NB-1));
384 int Ic=(((costhe+1.0)/2*(ewb->MB-1)));
385 rezu= ewb->FFb[Index][Ic][NO]
386 + (Ene -ewb->EEb[Index]) /stepB * (ewb->FFb[Index+1][Ic][NO] - ewb->FFb[Index][Ic][NO])
387 + ( (costhe+1.)/2. - (1.0*Ic)/(ewb->MB-1) )*(ewb->MB-1)*(
388 (1- (Ene -ewb->EEb[Index])/stepB )*(ewb->FFb[Index ][Ic+1][NO] - ewb->FFb[Index ][Ic][NO])
389 +( (Ene -ewb->EEb[Index])/stepB )*(ewb->FFb[Index+1][Ic+1][NO] - ewb->FFb[Index+1][Ic][NO]) );
391 else if (Ene>EcMin && Ene<EcMax){
392 int Index=((Ene-EcMin)/(EcMax-EcMin)*(ewb->NC-1));
393 int Ic=(((costhe+1.0)/2*(ewb->MC-1)));
394 rezu= ewb->FFc[Index][Ic][NO]
395 + (Ene -ewb->EEc[Index]) /stepC * (ewb->FFc[Index+1][Ic][NO] - ewb->FFc[Index][Ic][NO])
396 + ( (costhe+1.)/2. - (1.0*Ic)/(ewb->MC-1) )*(ewb->MC-1)*(
397 (1- (Ene -ewb->EEc[Index])/stepC )*(ewb->FFc[Index ][Ic+1][NO] - ewb->FFc[Index ][Ic][NO])
398 +( (Ene -ewb->EEc[Index])/stepC )*(ewb->FFc[Index+1][Ic+1][NO] - ewb->FFc[Index+1][Ic][NO]) );
400 else if (Ene>EdMin && Ene<EdMax){
401 int Index=((Ene-EdMin)/(EdMax-EdMin)*(ewb->ND-1));
402 int Ic=((costhe+1.0)/2.)*(ewb->MD-1);
403 rezu= ewb->FFd[Index][Ic][NO]
404 + (Ene -ewb->EEd[Index]) /stepD * (ewb->FFd[Index+1][Ic][NO] - ewb->FFd[Index][Ic][NO])
405 + ( (costhe+1.)/2. - (1.0*Ic)/(ewb->MD-1) )*(ewb->MD-1)*(
406 (1- (Ene -ewb->EEd[Index])/stepD )*(ewb->FFd[Index ][Ic+1][NO] - ewb->FFd[Index ][Ic][NO])
407 +( (Ene -ewb->EEd[Index])/stepD )*(ewb->FFd[Index+1][Ic+1][NO] - ewb->FFd[Index+1][Ic][NO]) );
411 else if (Ene>EaMin && Ene<EaMax){
412 int Index=((log(Ene)-log(EaMin))/(log(EaMax)-log(EaMin))*(ewb->NA-1));
413 rezu= ewb->FFa[Index][NO]
414 + (log(Ene)-log(ewb->EEa[Index])) /stepA * (ewb->FFa[Index+1][NO] - ewb->FFa[Index][NO]);
418 rezu=complex<double>(1.0,0.0);
482 double EaMin= ewb->EEa[0];
double EaMax= ewb->EEa[ewb->NA-1];
483 double EbMin= ewb->EEb[0];
double EbMax= ewb->EEb[ewb->NB-1];
484 double EcMin= ewb->EEc[0];
double EcMax= ewb->EEc[ewb->NC-1];
485 double EdMin= ewb->EEd[0];
double EdMax= ewb->EEd[ewb->ND-1];
488 double stepA= log(ewb->EEa[1] /ewb->EEa[0]);
489 double stepB= ewb->EEb[1] - ewb->EEb[0];
490 double stepC= ewb->EEc[1] - ewb->EEc[0];
491 double stepD= ewb->EEd[1] - ewb->EEd[0];
493 if(Ene>EbMin && Ene<EbMax){
494 int Index=((Ene-EbMin)/(EbMax-EbMin)*(ewb->NB-1));
495 rezu= ewb->FSb[Index][NO]
496 + (Ene-ewb->EEb[Index]) /stepB * (ewb->FSb[Index+1][NO] - ewb->FSb[Index][NO]);
499 else if (Ene>EcMin && Ene<EcMax){
500 int Index=((Ene-EcMin)/(EcMax-EcMin)*(ewb->NC-1));
501 rezu= ewb->FSc[Index][NO]
502 + (Ene-ewb->EEc[Index]) /stepC * (ewb->FSc[Index+1][NO] - ewb->FSc[Index][NO]);
506 else if (Ene>EdMin && Ene<EdMax){
507 int Index=((Ene-EdMin)/(EdMax-EdMin)*(ewb->ND-1));
508 rezu= ewb->FSd[Index][NO]
509 + (Ene-ewb->EEd[Index]) /stepD * (ewb->FSd[Index+1][NO] - ewb->FSd[Index][NO]);
512 else if (Ene>EaMin && Ene<EaMax){
513 int Index=((log(Ene)-log(EaMin))/(log(EaMax)-log(EaMin))*(ewb->NA-1));
514 rezu= ewb->FSa[Index][NO]
515 + (log(Ene)-log(ewb->EEa[Index])) /stepA * (ewb->FSa[Index+1][NO] - ewb->FSa[Index][NO]);
544void ExtraEWparamsSet(
double AMZi,
double GAM,
double SWeff,
double alfinv,
double DeltSQ,
double DeltV,
double Gmu,
int keyGSW){
545 if(m_AMZi !=AMZi ){ m_AMZi =AMZi; m_status=0;}
546 if(m_GAM !=GAM ){ m_GAM =GAM; m_status=0;}
547 if(m_SWeff !=SWeff ){ m_SWeff =SWeff; m_status=0;}
548 if(m_alfinv!=alfinv){ m_alfinv=alfinv; m_status=0;}
549 if(m_DeltSQ!=DeltSQ){ m_DeltSQ=DeltSQ; m_status=0;}
550 if(m_DeltV !=DeltV ){ m_DeltV =DeltV; m_status=0;}
551 if(m_Gmu !=Gmu ){ m_Gmu =Gmu; m_status=0;}
552 if(m_keyGSW!=keyGSW){ m_keyGSW=keyGSW; m_status=0;}
567 cout <<
" electroweak tables not initialized. We stop run "<< endl;
571 if (ID==ID0 && key==key0 && S==S0 && cost==cost0 &&
ExtraEWparams()!=0){
589 else if (
ExtraEWparams()==0 || ID0!=ID || S0!=S || cost0!=cost || key0!=key ){
613 ReGSW1 = real(
EWFACT(ID,0,SS,costhe));
614 ReGSW2 = real(
EWFACT(ID,1,SS,costhe));
615 ReGSW3 = real(
EWFACT(ID,2,SS,costhe));
616 ReGSW4 = real(
EWFACT(ID,3,SS,costhe));
618 ReGSW6 = real(
EWFACT(ID,6,SS,costhe));
620 ImGSW1 = imag(
EWFACT(ID,0,SS,costhe));
621 ImGSW2 = imag(
EWFACT(ID,1,SS,costhe));
622 ImGSW3 = imag(
EWFACT(ID,2,SS,costhe));
623 ImGSW4 = imag(
EWFACT(ID,3,SS,costhe));
625 ImGSW6 = imag(
EWFACT(ID,6,SS,costhe));
628 ReGSW1 = real(
EWFACT(ID,0,SS,costhe));
632 ReGSW6 = real(
EWFACT(ID,6,SS,costhe));
634 ImGSW1 = imag(
EWFACT(ID,0,SS,costhe));
638 ImGSW6 = imag(
EWFACT(ID,6,SS,costhe));
660 initwkswdelt_(&mode, &IT, &finID, &SS, &SWeff, &DeltSQ, &DeltV, &Gmu, &alfinv, &AMZi, &GAM, &keyGSW, &ReGSW1, &ImGSW1, &ReGSW2, &ImGSW2, &ReGSW3, &ImGSW3, &ReGSW4, &ImGSW4, &ReGSW6, &ImGSW6 );
666 initwkswdelt_(&mode, &IT, &finID, &SS, &SWeff, &DeltSQ, &DeltV, &Gmu, &alfinv, &AMZi, &GAM, &keyGSW, &ReGSW1, &ImGSW1, &ReGSW2, &ImGSW2, &ReGSW3, &ImGSW3, &ReGSW4, &ImGSW4, &ReGSW6, &ImGSW6 );
674 initwkswdelt_(&mode, &IT, &finID, &SS, &SWeff, &DeltSQ, &DeltV, &Gmu, &alfinv, &AMZi, &GAM, &keyGSW, &ReGSW1, &ImGSW1, &ReGSW2, &ImGSW2, &ReGSW3, &ImGSW3, &ReGSW4, &ImGSW4, &ReGSW6, &ImGSW6 );
690 double sigbornswdelt(
int mode,
int ID,
double SS,
double costhe,
double SWeff,
double DeltSQ,
double DeltV,
double Gmu,
double alfinv,
double AMZ0,
double GAM0,
int keyGSW){
718 return ( t_bornew_(&Bmode, &keyGSW, &SS, &costhe, &dOne , &dOne) + t_bornew_(&Bmode, &keyGSW, &SS, &costhe, &dOne , &dMOne)
719 + t_bornew_(&Bmode, &keyGSW, &SS, &costhe, &dMOne, &dOne) + t_bornew_(&Bmode, &keyGSW, &SS, &costhe, &dMOne, &dMOne))/alfinv/alfinv;
732 double AsNbornswdelt(
int mode,
int ID,
double SS,
double costhe,
double SWeff,
double DeltSQ,
double DeltV,
double Gmu,
double alfinv,
double AMZ0,
double GAM0,
int keyGSW){
759 return ( -t_bornew_(&Bmode, &keyGSW, &SS, &costhe, &dOne , &dOne) - t_bornew_(&Bmode, &keyGSW, &SS, &costhe, &dOne , &dMOne)
760 + t_bornew_(&Bmode, &keyGSW, &SS, &costhe, &dMOne, &dOne) + t_bornew_(&Bmode, &keyGSW, &SS, &costhe, &dMOne, &dMOne))/alfinv/alfinv;
void ExtraEWparamsGet(double *AMZi, double *GAM, double *SWeff, double *alfinv, double *DeltSQ, double *DeltV, double *Gmu, int *keyGSW)
void ExtraEWparamsSet(double AMZi, double GAM, double SWeff, double alfinv, double DeltSQ, double DeltV, double Gmu, int keyGSW)
double AsNbornswdelt(int mode, int ID, double SS, double costhe, double SWeff, double DeltSQ, double DeltV, double Gmu, double alfinv, double AMZ0, double GAM0, int keyGSW)
double sigbornswdelt(int mode, int ID, double SS, double costhe, double SWeff, double DeltSQ, double DeltV, double Gmu, double alfinv, double AMZ0, double GAM0, int keyGSW)