#include "forZ-MEc.h" #include "Photos.h" #include "PhotosUtilities.h" #include "PH_HEPEVT_Interface.h" #include "f_Init.h" #include #include #include #include using std::cout; using std::endl; using namespace Photospp; using namespace PhotosUtilities; namespace Photospp { // from photosC.cxx extern void PHODMP(); extern double PHINT(int idumm); // ---------------------------------------------------------------------- // PROVIDES ELECTRIC CHARGE AND WEAK IZOSPIN OF A FAMILY FERMION // IDFERM=1,2,3,4 DENOTES NEUTRINO, LEPTON, UP AND DOWN QUARK // NEGATIVE IDFERM=-1,-2,-3,-4, DENOTES ANTIPARTICLE // IHELIC=+1,-1 DENOTES RIGHT AND LEFT HANDEDNES ( CHIRALITY) // SIZO3 IS THIRD PROJECTION OF WEAK IZOSPIN (PLUS MINUS HALF) // AND CHARGE IS ELECTRIC CHARGE IN UNITS OF ELECTRON CHARGE // KOLOR IS A QCD COLOUR, 1 FOR LEPTON, 3 FOR QUARKS // // called by : EVENTE, EVENTM, FUNTIH, ..... // ---------------------------------------------------------------------- void PhotosMEforZ::GIVIZO(int IDFERM,int IHELIC,double *SIZO3,double *CHARGE,int *KOLOR) { // int IH, IDTYPE, IC, LEPQUA, IUPDOW; if (IDFERM==0 || abs(IDFERM)>4 || abs(IHELIC)!=1){ cout << "STOP IN GIVIZO: WRONG PARAMS" << endl; exit(0); } IH =IHELIC; IDTYPE =abs(IDFERM); IC =IDFERM/IDTYPE; LEPQUA=(int)(IDTYPE*0.4999999); IUPDOW=IDTYPE-2*LEPQUA-1; *CHARGE =(-IUPDOW+2.0/3.0*LEPQUA)*IC; *SIZO3 =0.25*(IC-IH)*(1-2*IUPDOW); *KOLOR=1+2*LEPQUA; //** NOTE THAT CONVENTIONALY Z0 COUPLING IS //** XOUPZ=(SIZO3-CHARGE*SWSQ)/SQRT(SWSQ*(1-SWSQ)) return; } //////////////////////////////////////////////////////////////////////////// /// // /// This routine provides unsophisticated Born differential cross section // /// at the crude x-section level, with Z and gamma s-chanel exchange. // /////////////////////////////////////////////////////////////////////////// double PhotosMEforZ::PHBORNM(double svar,double costhe,double T3e,double qe,double T3f,double qf,int NCf){ double s,Sw2,MZ,MZ2,GammZ,AlfInv,GFermi; // t,MW,MW2, double Ve,Ae,thresh; // sum,deno, double xe,yf,xf,ye,ff0,ff1,amx2,amfin,Vf,Af; double ReChiZ,SqChiZ,RaZ; //,RaW,ReChiW,SqChiW; double Born; //, BornS; // int KeyZet,HadMin,KFbeam; // int i,ke,KFfin,kf,IsGenerated,iKF; int KeyWidFix; AlfInv= 137.0359895; GFermi=1.16639e-5; //-------------------------------------------------------------------- s = svar; //------------------------------ // EW paratemetrs taken from BornV MZ=91.187; GammZ=2.50072032; Sw2=.22276773; //------------------------------ // Z and gamma couplings to beams (electrons) // Z and gamma couplings to final fermions // Loop over all flavours defined in m_xpar(400+i) //------ incoming fermion Ve= 2*T3e -4*qe*Sw2; Ae= 2*T3e; //------ final fermion couplings amfin = 0.000511; // m_xpar(kf+6) Vf = 2*T3f -4*qf*Sw2; Af = 2*T3f; if(fabs(costhe) > 1.0){ cout << "+++++STOP in PHBORN: costhe>0 =" << costhe << endl; exit(0); } MZ2 = MZ*MZ; RaZ = (GFermi *MZ2 *AlfInv )/( sqrt(2.0) *8.0 *PI); // RaZ = 1/(16.0*Sw2*(1.0-Sw2)); KeyWidFix = 1; // fixed width KeyWidFix = 0; // variable width if( KeyWidFix == 0 ){ ReChiZ=(s-MZ2)*s/((s-MZ2)*(s-MZ2)+(GammZ*s/MZ)*(GammZ*s/MZ)) *RaZ; // variable width SqChiZ= s*s/((s-MZ2)*(s-MZ2)+(GammZ*s/MZ)*(GammZ*s/MZ)) *RaZ*RaZ; // variable width } else{ ReChiZ=(s-MZ2)*s/((s-MZ2)*(s-MZ2)+(GammZ*MZ)*(GammZ*MZ)) *RaZ; // fixed width SqChiZ= s*s/((s-MZ2)*(s-MZ2)+(GammZ*MZ)*(GammZ*MZ)) *RaZ*RaZ; // fixed width } xe= Ve*Ve +Ae*Ae; xf= Vf*Vf +Af*Af; ye= 2*Ve*Ae; yf= 2*Vf*Af; ff0= qe*qe*qf*qf +2*ReChiZ*qe*qf*Ve*Vf +SqChiZ*xe*xf; ff1= +2*ReChiZ*qe*qf*Ae*Af +SqChiZ*ye*yf; Born = (1.0+ costhe*costhe)*ff0 +2.0*costhe*ff1; // Colour factor Born = NCf*Born; // Crude method of correcting threshold, cos(theta) depencence incorrect!!! if( svar < 4.0*amfin*amfin){ thresh=0.0; } else if(svar < 16.0*amfin*amfin){ amx2=4.0*amfin*amfin/svar; thresh=sqrt(1.0-amx2)*(1.0+amx2/2.0); } else{ thresh=1.0; } Born= Born*thresh; return Born; } // ---------------------------------------------------------------------- // THIS ROUTINE CALCULATES BORN ASYMMETRY. // IT EXPLOITS THE FACT THAT BORN X. SECTION = A + B*C + D*C**2 // // called by : EVENTM // ---------------------------------------------------------------------- // double PhotosMEforZ::AFBCALC(double SVAR,int IDEE,int IDFF){ int KOLOR,KOLOR1; double T3e,qe,T3f,qf,A,B; GIVIZO(IDEE,-1,&T3e,&qe,&KOLOR); GIVIZO(IDFF,-1,&T3f,&qf,&KOLOR1); A=PHBORNM(SVAR,0.5,T3e,qe,T3f,qf,KOLOR*KOLOR1); B=PHBORNM(SVAR,-0.5,T3e,qe,T3f,qf,KOLOR*KOLOR1); return (A-B)/(A+B)*5.0/2.0 *3.0/8.0; } int PhotosMEforZ::GETIDEE(int IDE){ int IDEE; IDEE=-555; if((IDE==11) || (IDE== 13) || (IDE== 15)){ IDEE=2; } else if((IDE==-11) || (IDE==-13) || (IDE==-15)){ IDEE=-2; } else if((IDE== 12) || (IDE== 14) || (IDE== 16)){ IDEE=1; } else if((IDE==-12) || (IDE==-14) || (IDE==-16)){ IDEE=-1; } else if((IDE== 1) || (IDE== 3) || (IDE== 5)){ IDEE=4; } else if((IDE== -1) || (IDE== -3) || (IDE== -5)){ IDEE=-4; } else if((IDE== 2) || (IDE== 4) || (IDE== 6)){ IDEE=3; } else if((IDE==- 2) || (IDE== -4) || (IDE== -6)){ IDEE=-3; } if(IDEE==-555) {cout << " ERROR IN GETIDEE of PHOTS Z-ME: I3= &4i"<1.0e-10 &&(pho.idhep[1-i]==22 || pho.idhep[1-i]==23)){ // write(*,*) 'nhep=',nhep // DO K=1,3 ENDDO // IF (K.EQ.1) IBREM= 1 // IF (K.EQ.2) IBREM=-1 // ICONT=ICONT+1 // IBREM=IBREX ! that will be input parameter. // IBREM=IBREY ! that IS now input parameter. // We initialize twice 4-vectors, here and again later after boost // must be the same way. Important is how the reduction procedure will work. // It seems at present that the beams must be translated to be back to back. // this may be done after initialising, thus on 4-vectors. for( K=1;K<5;K++){ PP[K-i]=pho.phep[1-i][K-i]; PM[K-i]=pho.phep[2-i][K-i]; QP[K-i]=pho.phep[3-i][K-i]; QM[K-i]=pho.phep[4-i][K-i]; PH[K-i]=pho.phep[pho.nhep-i][K-i]; QQ[K-i]=0.0; QQS[K-i]=QP[K-i]+QM[K-i]; } PP[4-i]=(pho.phep[1-i][4-i]+pho.phep[2-i][4-i])/2.0; PM[4-i]=(pho.phep[1-i][4-i]+pho.phep[2-i][4-i])/2.0; PP[3-i]= PP[4-i]; PM[3-i]=-PP[4-i]; for(L=5;L<=pho.nhep-1;L++){ for( K=1;K<5;K++){ QQ [K-i]=QQ [K-i]+ pho.phep[L-i][K-i]; QQS[K-i]=QQS[K-i]+ pho.phep[L-i][K-i]; } } // go to the restframe of 3 PHOB(1,QQS,QP); PHOB(1,QQS,QM); PHOB(1,QQS,QQ); ENE=(QP[4-i]+QM[4-i]+QQ[4-i])/2; // preserve direction of emitting particle and wipeout QQ if (phopro_.irep==1){ double a=sqrt(ENE*ENE-pho.phep[3-i][5-i]*pho.phep[3-i][5-i])/sqrt(QM[4-i]*QM[4-i]-pho.phep[3-i][5-i]*pho.phep[3-i][5-i]); QM[1-i]= QM[1-i]*a; QM[2-i]= QM[2-i]*a; QM[3-i]= QM[3-i]*a; QP[1-i]=-QM[1-i]; QP[2-i]=-QM[2-i]; QP[3-i]=-QM[3-i]; } else{ double a=sqrt(ENE*ENE-pho.phep[3-i][5-i]*pho.phep[3-i][5-i])/sqrt(QP[4-i]*QP[4-i]-pho.phep[3-i][5-i]*pho.phep[3-i][5-i]); QP[1-i]= QP[1-i]*a; QP[2-i]= QP[2-i]*a; QP[3-i]= QP[3-i]*a; QM[1-i]=-QP[1-i]; QM[2-i]=-QP[2-i]; QM[3-i]=-QP[3-i]; } QP[4-i]=ENE; QM[4-i]=ENE; // go back to reaction frame (QQ eliminated) PHOB(-1,QQS,QP); PHOB(-1,QQS,QM); PHOB(-1,QQS,QQ); svar=pho.phep[1-i][4-i]*pho.phep[1-i][4-i]; IDE=hep.idhep[1-i]; IDF=hep.idhep[4-i]; if(abs(hep.idhep[4-i])==abs(hep.idhep[3-i])) IDF=hep.idhep[3-i]; IDHEP3=pho.idhep[3-i]; return Zphwtnlo(svar,XK,IDHEP3,phopro_.irep,QP,QM,PH,PP,PM,phophs_.costhg,phwt_.beta,phorest_.th1,IDE,IDF); } else{ // in other cases we just use default setups. return PHINT(IDUM); } } } // namespace Photospp