static int rd_numW(char* s, double *p) { int n; if(rd_num(s,p)) return 1; for(n=0;n<nModelParticles;n++) if(strcmp(s, ModelPrtcls[n].width)==0) { *p=pWidth(ModelPrtcls[n].name,NULL,NULL); return 1; } return 0; }
int main(int argc,char** argv) { int err; char cdmName[10]; int spin2, charge3,cdim; delFiles=0; /* switch to save/delete RGE input/output */ ForceUG=0; /* to Force Unitary Gauge assign 1 */ #ifdef SUGRA { double m0,mhf,a0,tb; double gMG1, gMG2, gMG3, gAl, gAt, gAb, sgn, gMHu, gMHd, gMl2, gMl3, gMr2, gMr3, gMq2, gMq3, gMu2, gMu3, gMd2, gMd3; printf("\n========= mSUGRA scenario =====\n"); PRINTRGE(RGE); if(argc<5) { printf(" This program needs 4 parameters:\n" " m0 common scalar mass at GUT scale\n" " mhf common gaugino mass at GUT scale\n" " a0 trilinear soft breaking parameter at GUT scale\n" " tb tan(beta) \n"); printf(" Auxiliary parameters are:\n" " sgn +/-1, sign of Higgsino mass term (default 1)\n" " Mtp top quark pole mass\n" " MbMb Mb(Mb) scale independent b-quark mass\n" " alfSMZ strong coupling at MZ\n"); /* printf("Example: ./main 70 250 -300 10\n"); */ printf("Example: ./main 120 500 -350 10 1 173.1 \n"); exit(1); } else { double Mtp,MbMb,alfSMZ; sscanf(argv[1],"%lf",&m0); sscanf(argv[2],"%lf",&mhf); sscanf(argv[3],"%lf",&a0); sscanf(argv[4],"%lf",&tb); if(argc>5)sscanf(argv[5],"%lf",&sgn); else sgn=1; if(argc>6){ sscanf(argv[6],"%lf",&Mtp); assignValW("Mtp",Mtp); } if(argc>7){ sscanf(argv[7],"%lf",&MbMb); assignValW("MbMb",MbMb); } if(argc>8){ sscanf(argv[8],"%lf",&alfSMZ); assignValW("alfSMZ",alfSMZ);} } /*==== simulation of mSUGRA =====*/ gMG1=mhf, gMG2=mhf,gMG3=mhf; gAl=a0, gAt=a0, gAb=a0; gMHu=m0, gMHd=m0; gMl2=m0, gMl3=m0, gMr2=m0, gMr3=m0; gMq2=m0, gMq3=m0, gMu2=m0, gMd2=m0, gMu3=m0, gMd3=m0; err= SUGRAMODEL(RGE) (tb, gMG1, gMG2, gMG3, gAl, gAt, gAb, sgn, gMHu, gMHd, gMl2, gMl3, gMr2, gMr3, gMq2, gMq3, gMu2, gMu3, gMd2, gMd3); } #elif defined(AMSB) { double m0,m32,sgn,tb; printf("\n========= AMSB scenario =====\n"); PRINTRGE(RGE); if(argc<4) { printf(" This program needs 3 parameters:\n" " m0 common scalar mass at GUT scale\n" " m3/2 gravitino mass\n" " tb tan(beta) \n"); printf(" Auxiliary parameters are:\n" " sgn +/-1, sign of Higgsino mass term (default 1)\n" " Mtp top quark pole mass\n" " MbMb Mb(Mb) scale independent b-quark mass\n" " alfSMZ strong coupling at MZ\n"); printf("Example: ./main 450 60000 10\n"); exit(1); } else { double Mtp,MbMb,alfSMZ; sscanf(argv[1],"%lf",&m0); sscanf(argv[2],"%lf",&m32); sscanf(argv[3],"%lf",&tb); if(argc>4)sscanf(argv[4],"%lf",&sgn); else sgn=1; if(argc>5){ sscanf(argv[5],"%lf",&Mtp); assignValW("Mtp",Mtp); } if(argc>6){ sscanf(argv[6],"%lf",&MbMb); assignValW("MbMb",MbMb); } if(argc>7){ sscanf(argv[7],"%lf",&alfSMZ); assignValW("alfSMZ",alfSMZ);} } err= AMSBMODEL(RGE)(m0,m32,tb,sgn); } #elif defined(EWSB) { printf("\n========= EWSB scale input =========\n"); PRINTRGE(RGE); if(argc <2) { printf("The program needs one argument:the name of file with MSSM parameters.\n" "Example: ./main mssm1.par \n"); exit(1); } printf("Initial file \"%s\"\n",argv[1]); err=readVarMSSM(argv[1]); if(err==-1) { printf("Can not open the file\n"); exit(2);} else if(err>0) { printf("Wrong file contents at line %d\n",err);exit(3);} err=EWSBMODEL(RGE)(); } #else { printf("\n========= SLHA file input =========\n"); if(argc <2) { printf("The program needs one argument:the name of SLHA input file.\n" "Example: ./main suspect2_lha.out \n"); exit(1); } printf("Initial file \"%s\"\n",argv[1]); err=lesHinput(argv[1]); if(err) exit(2); } #endif { int nw; printf("Warnings from spectrum calculator:\n"); nw=slhaWarnings(stdout); if(nw==0) printf(" .....none\n"); } if(err) exit(1); err=sortOddParticles(cdmName); if(err) { printf("Can't calculate %s\n",cdmName); return 1;} qNumbers(cdmName,&spin2, &charge3, &cdim); printf("\nDark matter candidate is '%s' with spin=%d/2 mass=%.2E\n", cdmName, spin2, Mcdm); if(charge3) { printf("Dark Matter has electric charge %d/3\n",charge3); exit(1);} if(cdim!=1) { printf("Dark Matter is a color particle\n"); exit(1);} if(strcmp(cdmName,"~o1")) printf(" ~o1 is not CDM\n"); else o1Contents(stdout); #ifdef MASSES_INFO { printf("\n=== MASSES OF HIGGS AND SUSY PARTICLES: ===\n"); printHiggs(stdout); printMasses(stdout,1); } #endif #ifdef CONSTRAINTS { printf("\n\n==== Physical Constraints: =====\n"); printf("deltartho=%.2E\n",deltarho()); printf("gmuon=%.2E\n", gmuon()); printf("bsgnlo=%.2E\n", bsgnlo()); printf("bsmumu=%.2E\n", bsmumu()); printf("btaunu=%.2E\n", btaunu()); if(masslimits()==0) printf("MassLimits OK\n"); } #endif #ifdef OMEGA { int fast=1; double Beps=1.E-5, cut=0.01; double Omega,Xf; printf("\n==== Calculation of relic density =====\n"); Omega=darkOmega(&Xf,fast,Beps); printf("Xf=%.2e Omega=%.2e\n",Xf,Omega); printChannels(Xf,cut,Beps,1,stdout); } #endif #ifdef INDIRECT_DETECTION { int err,i; double Emin=1,SMmev=320;/*Energy cut in GeV and solar potential in MV*/ double sigmaV; double vcs_gz,vcs_gg; char txt[100]; double SpA[NZ],SpE[NZ],SpP[NZ]; double FluxA[NZ],FluxE[NZ],FluxP[NZ]; double SpNe[NZ],SpNm[NZ],SpNl[NZ]; // double * SpNe=NULL,*SpNm=NULL,*SpNl=NULL; double Etest=Mcdm/2; /* default DarkSUSY parameters */ /* K_dif=0.036; L_dif=4; Delta_dif=0.6; Vc_dif=10; Rdisk=30; SMmev=320; */ printf("\n==== Indirect detection =======\n"); sigmaV=calcSpectrum( 1+2+4,SpA,SpE,SpP,SpNe,SpNm,SpNl ,&err); /* Returns sigma*v in cm^3/sec. SpX - calculated spectra of annihilation. Use SpectdNdE(E, SpX) to calculate energy distribution in 1/GeV units. First parameter 1-includes W/Z polarization 2-includes gammas for 2->2+gamma 4-print cross sections */ printf("sigmav=%.2E[cm^3/s]\n",sigmaV); if(SpA) { double fi=0.,dfi=M_PI/180.; /* angle of sight and 1/2 of cone angle in [rad] */ /* dfi corresponds to solid angle 1.E-3sr */ printf("Photon flux for angle of sight f=%.2f[rad]\n" "and spherical region described by cone with angle %.4f[rad]\n",fi,2*dfi); gammaFluxTab(fi,dfi, sigmaV, SpA, FluxA); #ifdef SHOWPLOTS sprintf(txt,"Photon flux for angle of sight %.2f[rad] and cone angle %.2f[rad]",fi,2*dfi); displaySpectrum(FluxA,txt,Emin,Mcdm,1); #endif printf("Photon flux = %.2E[cm^2 s GeV]^{-1} for E=%.1f[GeV]\n",SpectdNdE(Etest, FluxA), Etest); if(loopGamma(&vcs_gz,&vcs_gg)==0) { printf("Gamma ray lines:\n"); printf("E=%.2E[GeV] vcs(Z,A)= %.2E[cm^3/s], flux=%.2E[cm^2 s]^{-1}\n",Mcdm-91.19*91.19/4/Mcdm,vcs_gz, gammaFlux(fi,dfi,vcs_gz)); printf("E=%.2E[GeV] vcs(A,A)= %.2E[cm^3/s], flux=%.2E[cm^2 s]^{-1}\n",Mcdm,vcs_gg, 2*gammaFlux(fi,dfi,vcs_gg)); } } if(SpE) { posiFluxTab(Emin, sigmaV, SpE, FluxE); if(SMmev>0) solarModulation(SMmev,0.0005,FluxE,FluxE); #ifdef SHOWPLOTS displaySpectrum(SpE,"positron flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,1); #endif printf("Positron flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxE), Etest); } if(SpP) { pbarFluxTab(Emin, sigmaV, SpP, FluxP); if(SMmev>0) solarModulation(SMmev,1,FluxP,FluxP); #ifdef SHOWPLOTS displaySpectrum(FluxP,"antiproton flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,1); #endif printf("Antiproton flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxP), Etest); } } #endif #ifdef RESET_FORMFACTORS { /* The user has approach to form factors which specifies quark contents of proton and nucleon via global parametes like <Type>FF<Nucleon><q> where <Type> can be "Scalar", "pVector", and "Sigma"; <Nucleon> "P" or "N" for proton and neutron <q> "d", "u","s" calcScalarFF( Mu/Md, Ms/Md, sigmaPiN[MeV], sigma0[MeV]) calculates and rewrites Scalar form factors */ printf("protonFF (default) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(default) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); calcScalarFF(0.553,18.9,70.,35.); printf("protonFF (new) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(new) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); /* Option to change parameters of DM velocity distribution */ SetfMaxwell(220.,600.); /* dN ~ exp(-v^2/arg1^2)*Theta(v-arg2) d^3v Earth velocity with respect to Galaxy defined by 'Vearth' parameter. All parameters are in [km/s] units. */ } #endif #ifdef CDM_NUCLEON { double pA0[2],pA5[2],nA0[2],nA5[2]; double Nmass=0.939; /*nucleon mass*/ double SCcoeff; printf("\n==== Calculation of CDM-nucleons amplitudes =====\n"); #ifdef TEST_Direct_Detection printf(" TREE LEVEL\n"); MSSMDDtest(0, pA0,pA5,nA0,nA5); printf("Analitic formulae\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); nucleonAmplitudes(NULL, pA0,pA5,nA0,nA5); printf("CDM-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); printf(" BOX DIAGRAMS\n"); MSSMDDtest(1, pA0,pA5,nA0,nA5); printf("Analitic formulae\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); #endif nucleonAmplitudes(FeScLoop, pA0,pA5,nA0,nA5); printf("CDM-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); SCcoeff=4/M_PI*3.8937966E8*pow(Nmass*Mcdm/(Nmass+ Mcdm),2.); printf("CDM-nucleon cross sections[pb]:\n"); printf(" proton SI %.3E SD %.3E\n",SCcoeff*pA0[0]*pA0[0],3*SCcoeff*pA5[0]*pA5[0]); printf(" neutron SI %.3E SD %.3E\n",SCcoeff*nA0[0]*nA0[0],3*SCcoeff*nA5[0]*nA5[0]); } #endif #ifdef CDM_NUCLEUS { double dNdE[300]; double nEvents; printf("\n======== Direct Detection ========\n"); nEvents=nucleusRecoil(Maxwell,73,Z_Ge,J_Ge73,S00Ge73,S01Ge73,S11Ge73,FeScLoop,dNdE); printf("73Ge: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 73Ge",0,199); #endif nEvents=nucleusRecoil(Maxwell,131,Z_Xe,J_Xe131,S00Xe131,S01Xe131,S11Xe131,FeScLoop,dNdE); printf("131Xe: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 131Xe",0,199); #endif nEvents=nucleusRecoil(Maxwell,23,Z_Na,J_Na23,S00Na23,S01Na23,S11Na23,FeScLoop,dNdE); printf("23Na: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 23Na",0,199); #endif nEvents=nucleusRecoil(Maxwell,127,Z_I,J_I127,S00I127,S01I127,S11I127,FeScLoop,dNdE); printf("I127: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 127I",0,199); #endif } #endif #ifdef DECAYS { txtList L; int dim; double width,br; char * pname; pname = "h"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); pname = "l"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); printf("Br(e,Ne,nl)= %E\n",findBr(L,"e,Ne,nl")); pname = "~o2"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); pname = "~g"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); } #endif #ifdef CROSS_SECTIONS { double Pcm=500, cosmin=-0.99, cosmax=0.99, cs; numout* cc; printf("\n====== Calculation of cross section ====\n"); printf(" e^+, e^- annihilation\n"); Pcm=500.; Helicity[0]=0.5; /* helicity : spin projection on direction of motion */ Helicity[1]=-0.5; /* helicities ={ 0.5, -0.5} corresponds to vector state */ printf("Process e,E->2*x at Pcm=%.3E GeV\n",Pcm); cc=newProcess("e%,E%->2*x","eE_2x"); if(cc) { int ntot,l; char * name[4]; procInfo1(cc,&ntot,NULL,NULL); for(l=1;l<=ntot; l++) { int err; double cs; char txt[100]; procInfo2(cc,l,name,NULL); sprintf(txt,"%3s,%3s -> %3s %3s ",name[0],name[1],name[2],name[3]); cs= cs22(cc,l,Pcm,cosmin,cosmax,&err); if(err) printf("%-20.20s Error\n",txt); else if(cs) printf("%-20.20s %.2E [pb]\n",txt,cs); } } } #endif killPlots(); return 0; }
void doFrame() { if(Input::IsKeyDown(SDLK_LCTRL) && Input::IsPressed(SDLK_q)) { if(connected) { MAKE_MSG(quit_msg,msg,QUIT_MSG); nc.send((unsigned char *)&msg,sizeof(quit_msg),SEND_GUARANTEED); } else done=1; } if ((Input::IsKeyDown(SDLK_LALT) || Input::IsKeyDown(SDLK_RALT)) && Input::IsPressed(SDLK_RETURN)) { fullscreen = !fullscreen; Renderer::SetFullscreen(fullscreen); // The next block of code is stupid nonsense crap because it is already setup. // There is no reason to reload EVERYTHING just because we are going to fullscreen. /*initializeSystem(); Renderer::Clear(); Renderer::LoadIdentity(); //load images and sounds char pnum[32]; int i; soundMax=-1; bodyMax=-1; hairMax=-1; clothesMax=-1; monsterMax=-1; for(i=0;i<255;i++) { if(soundMax==-1) { sprintf(pnum,"data/sounds/%d.wav",i); if(!sounds.Load(i,pnum)) soundMax=i; } if(bodyMax==-1) { sprintf(pnum,"data/body/%d.png",i); if(!pBody[i].Load(pnum)) bodyMax=i; } if(hairMax==-1) { sprintf(pnum,"data/hair/%d.png",i); if(!pHair[i].Load(pnum)) hairMax=i; } if(clothesMax==-1) { sprintf(pnum,"data/clothes/%d.png",i); if(!pClothes[i].Load(pnum)) clothesMax=i; } if(monsterMax==-1 && i>0) { sprintf(pnum,"data/monsters/%d.png",i); if(!pMonster[i].Load(pnum)) monsterMax=i; } } tiledata.Load("data/misc/tiledata.png"); effdata.Load("data/misc/effects.png"); itemdata.Load("data/misc/items.png"); loading.Load("data/misc/loading.png"); skin.Load("data/misc/skin0.png"); //load fonts font.Load("data/misc/font.png"); TEXTDRAWER.Initialize(font.img); TEXTDRAWER.setColor(0,0,0,1); //create effects,terminal,dialog boxes eff.create(MAX_EFFECTS); bar.create(MAX_HPBAR); term.create(255,11); // setupDialogs(); loadEffectsMap(); updateFPS();*/ //render images doGameGraphics(); } if(Input::IsPressed(SDLK_F5))//change skins { guiskin++; char name[256]; sprintf(name,"data/misc/skin%d.png",guiskin); FILE *f=fopen(name,"r"); if(f==NULL) { guiskin=0; sprintf(name,"data/misc/skin%d.png",guiskin); skin.Load(name); } else { fclose(f); f=0; skin.Load(name); } } if(Input::IsPressed(SDLK_ESCAPE)) { target=-1; mtarget_id=-1; MAKE_MSG(trgt_msg,tr,TRGT_MSG); tr.index=mtarget_id; nc.send((unsigned char *)&tr,sizeof(trgt_msg),SEND_GUARANTEED); ptarget_id=-1; chatting=0; Input::ResetString(); } if(connected && dialog==-1 && Input::IsPressed(SDLK_RETURN) && !Input::IsKeyDown(SDLK_LALT) && !Input::IsKeyDown(SDLK_RALT)) { if(chatting) { if(strlen(Input::GetString())==0) chatting=0; } else chatting=1; } if(connected && me > -1 && MYGUY.access > 5) { if(Input::IsPressed(SDLK_F1)) { target=-1; if(mode==1) mode=0; else mode=1; } if(Input::IsPressed(SDLK_F11)) //debug { if(debug==1) debug=0; else debug=1; } } if(me > -1 && !chatting && dialog==-1 && MYGUY.hp>0 && (strcmp(world[MYGUY.p.map].name,"_EMPTY_")!=0 || mode==1)) doGameInput(); else if((ptarget_id!=-1&&MYGUY.front()==player[ptarget_id].p)&& attackTimer.tick(50)) attack(); if(dialog==-1 && chatting && Input::StringInput(240)) { if(parse(Input::GetString())) { if(me > -1) { //sprintf(temp,"%s:%s",MYGUY.name, Input::GetString()); //term.newLine("Here is a very long sentence i am using to test with will you please split it up correctly at the spaces so it will wrap around, thank you very much sir..."); //term.newLine(Input::GetString()); //balloon.add(Input::GetString(),me); MAKE_MSG(chat_msg,reply,CHAT_MSG); reply.size=strlen(Input::GetString())+1;//+1 for null char buf[256]; char *InputString = Input::GetString(); memcpy(&buf,(void *)&reply,sizeof(chat_msg));//store header memcpy(buf+sizeof(chat_msg),(void *)&InputString,reply.size);//store string nc.send((unsigned char *)&buf,sizeof(chat_msg)+reply.size,SEND_GUARANTEED); chatting=0; } } else if(me > -1) { chatting=0; } Input::ResetString(); } updateFPS(); //render images Renderer::Clear(); Renderer::LoadIdentity(); doGameGraphics(); /*TEXTDRAWER.setColor(1,1,1,1);//draw bottleneck stats for(int i=0;i<4;i++) TEXTDRAWER.PrintText(10,50+i*20,"%d) %d",i,bottle.times[i]); TEXTDRAWER.defaultColor();*/ if(mode==1) { doMapDialog(); int r=mapDialog.modified(); if(r>-1) mapEvent(r); } //if(keyDown[SDLK_HOME]) // term.renderAll(0,200); //else term.render(0,480,246-chat_scroll,9); if(dialog!=-1) { vDialog[dialog].draw(); if(dialog==4)//draw sprites { if(animTimer.tick(400)) animSel=abs(animSel-1); TEXTDRAWER.PrintTextf(vDialog[4].x+160,vDialog[4].y+162,"%d",bodySel); TEXTDRAWER.PrintTextf(vDialog[4].x+160,vDialog[4].y+162+35,"%d",clothesSel); TEXTDRAWER.PrintTextf(vDialog[4].x+160,vDialog[4].y+162+70,"%d",hairSel); drawChar(vDialog[4].x+10,vDialog[4].y+10,-1,bodySel,clothesSel,hairSel,0,animSel,4); drawChar(vDialog[4].x+90,vDialog[4].y+10,-1,bodySel,clothesSel,hairSel,1,animSel,4); drawChar(vDialog[4].x+170,vDialog[4].y+10,-1,bodySel,clothesSel,hairSel,2,animSel,4); drawChar(vDialog[4].x+250,vDialog[4].y+10,-1,bodySel,clothesSel,hairSel,3,animSel,4); } else if(dialog==6) { if(animTimer.tick(400)) animSel=abs(animSel-1); for(int i=0; i<4; i++)if(slot[i].lvl>0) { TEXTDRAWER.PrintTextf(vDialog[6].x+16+128*i,vDialog[6].y+162,"%s",slot[i].name); TEXTDRAWER.PrintTextf(vDialog[6].x+16+128*i,vDialog[6].y+162+16,"Level %d",slot[i].lvl); drawChar(vDialog[6].x+10+128*i,vDialog[6].y+10,slot[i].sprite,slot[i].body,slot[i].clothes,slot[i].hair,0,animSel,4); TEXTDRAWER.PrintTextf(vDialog[6].x+28+128*i,vDialog[6].y+196,"Use"); } else TEXTDRAWER.PrintTextf(vDialog[6].x+28+128*i,vDialog[6].y+196,"New"); } int r=vDialog[dialog].modified(); if(r!=-1) dialogEvent(r); } else { if(me>-1 && strcmp(world[MYGUY.p.map].name,"_EMPTY_")==0) { loading.blitFast(150,150,float(Input::MouseX())/640.0f,float(Input::MouseY())/480.0f); } if(chatting) { char temp[256]; int x=0,len; sprintf(temp,"Send:%s_",Input::GetString()); len=pWidth(temp); if(len>636) x=636-len; TEXTDRAWER.setColor(1,1,1,1); TEXTDRAWER.PrintText(x,585,temp); TEXTDRAWER.defaultColor(); } } //cursor skin.blit(Input::MouseX(),Input::MouseY(),64,0,32,32,1,1); Renderer::Swap(); }
int main(int argc,char** argv) { int err; char cdmName[10]; int spin2, charge3,cdim; ForceUG=0; /* to Force Unitary Gauge assign 1 */ if(argc==1) { printf(" Correct usage: ./main <file with parameters> \n"); exit(1); } /* err=readVar(argv[1]);*/ err=readVarRHNM(argv[1]); if(err==-1) {printf("Can not open the file\n"); exit(1);} else if(err>0) { printf("Wrong file contents at line %d\n",err);exit(1);} err=sortOddParticles(cdmName); if(err) { printf("Can't calculate %s\n",cdmName); return 1;} qNumbers(cdmName, &spin2, &charge3, &cdim); printf("\nDark matter candidate is '%s' with spin=%d/2 \n",cdmName,spin2); if(charge3) { printf("Dark Matter has electric charge %d/3\n",charge3); exit(1);} if(cdim!=1) { printf("Dark Matter is a color particle\n"); exit(1);} if(strcmp(cdmName,"~n4")) printf(" ~n4 is not CDM\n"); #ifdef MASSES_INFO { printf("\n=== MASSES OF PARTICLES OF ODD SECTOR: ===\n"); printMasses(stdout,1); } #endif #ifdef CONSTRAINTS #endif #ifdef OMEGA { int fast=1; double Beps=1.E-5, cut=0.01; double Omega,Xf; printf("\n==== Calculation of relic density =====\n"); Omega=darkOmega(&Xf,fast,Beps); printf("Xf=%.2e Omega=%.2e\n",Xf,Omega); printChannels(Xf,cut,Beps,1,stdout); } #endif #ifdef INDIRECT_DETECTION { int err,i; double Emin=1,/* Energy cut in GeV */ sigmaV; double vcs_gz,vcs_gg; char txt[100]; double SpA[NZ],SpE[NZ],SpP[NZ]; double FluxA[NZ],FluxE[NZ],FluxP[NZ]; double * SpNe=NULL,*SpNm=NULL,*SpNl=NULL; double Etest=Mcdm/2; printf("\n==== Indirect detection =======\n"); sigmaV=calcSpectrum(1+2+4,SpA,SpE,SpP,SpNe,SpNm,SpNl ,&err); /* Returns sigma*v in cm^3/sec. SpX - calculated spectra of annihilation. Use SpectdNdE(E, SpX) to calculate energy distribution in 1/GeV units. First parameter 1-includes W/Z polarization 2-includes gammas for 2->2+gamma 4-print cross sections */ printf("sigmav=%.2E[cm^3/s]\n",sigmaV); if(SpA) { double fi=0.1,dfi=0.05; /* angle of sight and 1/2 of cone angle in [rad] */ gammaFluxTab(fi,dfi, sigmaV, SpA, FluxA); printf("Photon flux for angle of sight f=%.2f[rad]\n" "and spherical region described by cone with angle %.2f[rad]\n",fi,2*dfi); #ifdef SHOWPLOTS sprintf(txt,"Photon flux[cm^2 s GeV]^{1} at f=%.2f[rad], cone angle %.2f[rad]",fi,2*dfi); displaySpectrum(FluxA,txt,Emin,Mcdm,1); #endif printf("Photon flux = %.2E[cm^2 s GeV]^{-1} for E=%.1f[GeV]\n",SpectdNdE(Etest, FluxA), Etest); } if(SpE) { posiFluxTab(Emin, sigmaV, SpE, FluxE); #ifdef SHOWPLOTS displaySpectrum(FluxE,"positron flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,1); #endif printf("Positron flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxE), Etest); } if(SpP) { pbarFluxTab(Emin, sigmaV, SpP, FluxP ); #ifdef SHOWPLOTS displaySpectrum(FluxP,"antiproton flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,1); #endif printf("Antiproton flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxP), Etest); } } #endif #ifdef RESET_FORMFACTORS { /* The user has approach to form factors which specifies quark contents of proton and nucleon via global parametes like <Type>FF<Nucleon><q> where <Type> can be "Scalar", "pVector", and "Sigma"; <Nucleon> "P" or "N" for proton and neutron <q> "d", "u","s" calcScalarFF( Mu/Md, Ms/Md, sigmaPiN[MeV], sigma0[MeV]) calculates and rewrites Scalar form factors */ printf("protonFF (default) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(default) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); calcScalarFF(0.553,18.9,70.,35.); printf("protonFF (new) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(new) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); /* Option to change parameters of DM velocity distribution */ SetfMaxwell(220.,600.); /* dN ~ exp(-v^2/arg1^2)*Theta(v-arg2) d^3v Earth velocity with respect to Galaxy defined by 'Vearth' parameter. All parameters are in [km/s] units. */ } #endif #ifdef CDM_NUCLEON { double pA0[2],pA5[2],nA0[2],nA5[2]; double Nmass=0.939; /*nucleon mass*/ double SCcoeff; printf("\n==== Calculation of CDM-nucleons amplitudes =====\n"); nucleonAmplitudes(FeScLoop, pA0,pA5,nA0,nA5); printf("CDM[antiCDM]-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E [%.3E] SD %.3E [%.3E]\n",pA0[0], pA0[1], pA5[0], pA5[1] ); printf("neutron: SI %.3E [%.3E] SD %.3E [%.3E]\n",nA0[0], nA0[1], nA5[0], nA5[1] ); SCcoeff=4/M_PI*3.8937966E8*pow(Nmass*Mcdm/(Nmass+ Mcdm),2.); printf("CDM[antiCDM]-nucleon cross sections[pb]:\n"); printf(" proton SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*pA0[0]*pA0[0],SCcoeff*pA0[1]*pA0[1],3*SCcoeff*pA5[0]*pA5[0],3*SCcoeff*pA5[1]*pA5[1]); printf(" neutron SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*nA0[0]*nA0[0],SCcoeff*nA0[1]*nA0[1],3*SCcoeff*nA5[0]*nA5[0],3*SCcoeff*nA5[1]*nA5[1]); } #endif #ifdef CDM_NUCLEUS { double dNdE[300]; double nEvents; printf("\n======== Direct Detection ========\n"); nEvents=nucleusRecoil(Maxwell,73,Z_Ge,J_Ge73,S00Ge73,S01Ge73,S11Ge73,FeScLoop,dNdE); printf("73Ge: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 73Ge",0,199); #endif nEvents=nucleusRecoil(Maxwell,131,Z_Xe,J_Xe131,S00Xe131,S01Xe131,S11Xe131,FeScLoop,dNdE); printf("131Xe: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 131Xe",0,199); #endif nEvents=nucleusRecoil(Maxwell,23,Z_Na,J_Na23,S00Na23,S01Na23,S11Na23,FeScLoop,dNdE); printf("23Na: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 23Na",0,199); #endif nEvents=nucleusRecoil(Maxwell,127,Z_I,J_I127,S00I127,S01I127,S11I127,FeScLoop,dNdE); printf("I127: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 127I",0,199); #endif } #endif #ifdef DECAYS { txtList L; int dim; double width,br; char * pname; printf("\n Calculation of particle decays\n"); pname = "H"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); pname = "l"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); printf("Br(e,Ne,nl)= %E\n",findBr(L,"e,Ne,nl")); pname = "Zp"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); } #endif #ifdef CROSS_SECTIONS { double Pcm=500, cosmin=-0.99, cosmax=0.99, cs; numout* cc; printf("\n====== Calculation of cross section ====\n"); printf(" e^+, e^- annihilation\n"); Pcm=500.; Helicity[0]=0.5; /* helicity : spin projection on direction of motion */ Helicity[1]=-0.5; /* helicities ={ 0.5, -0.5} corresponds to vector state */ printf("Process e,E->2*x at Pcm=%.3E GeV\n",Pcm); cc=newProcess("e%,E%->2*x","eE_2x"); if(cc) { int ntot,l; char * name[4]; procInfo1(cc,&ntot,NULL,NULL); for(l=1;l<=ntot; l++) { int err; double cs; char txt[100]; procInfo2(cc,l,name,NULL); sprintf(txt,"%3s,%3s -> %3s %3s ",name[0],name[1],name[2],name[3]); cs= cs22(cc,l,Pcm,cosmin,cosmax,&err); if(err) printf("%-20.20s Error\n",txt); else if(cs) printf("%-20.20s %.2E [pb]\n",txt,cs); } } } #endif killPlots(); return 0; }
int main(int argc,char** argv) { int err; char cdmName[10]; int spin2, charge3,cdim; ForceUG=0; /* to Force Unitary Gauge assign 1 */ /* gauss345_arg(ff,Y,0,1,1E-5,&err); printf("err=%d\n",err); exit(0); */ VZdecay=1; VWdecay=1; if(argc==1) { printf(" Correct usage: ./main <file with parameters> \n"); printf("Example: ./main data1.par\n"); exit(1); } err=readVar(argv[1]); if(err==-1) {printf("Can not open the file\n"); exit(1);} else if(err>0) { printf("Wrong file contents at line %d\n",err);exit(1);} err=sortOddParticles(cdmName); if(err) { printf("Can't calculate %s\n",cdmName); return 1;} if(CDM1) { qNumbers(CDM1, &spin2, &charge3, &cdim); printf("\nDark matter candidate is '%s' with spin=%d/2 mass=%.2E\n",CDM1, spin2,Mcdm1); if(charge3) printf("Dark Matter has electric charge %d/3\n",charge3); if(cdim!=1) printf("Dark Matter is a color particle\n"); } if(CDM2) { qNumbers(CDM2, &spin2, &charge3, &cdim); printf("\nDark matter candidate is '%s' with spin=%d/2 mass=%.2E\n",CDM2,spin2,Mcdm2); if(charge3) printf("Dark Matter has electric charge %d/3\n",charge3); if(cdim!=1) printf("Dark Matter is a color particle\n"); } #ifdef MASSES_INFO { printf("\n=== MASSES OF HIGGS AND ODD PARTICLES: ===\n"); printHiggs(stdout); printMasses(stdout,1); } #endif #ifdef CONSTRAINTS { double csLim; if(Zinvisible()) printf("Excluded by Z->invizible\n"); if(LspNlsp_LEP(&csLim)) printf("LEP excluded by e+,e- -> DM q q-\\bar Cross Section= %.2E pb\n",csLim); } #endif #ifdef MONOJET { double CL=monoJet(); printf(" Monojet signal exclusion CL is %.3e\n", CL); } #endif #if defined(HIGGSBOUNDS) || defined(HIGGSSIGNALS) { int NH0,NHch; // number of neutral and charged Higgs particles. double HB_result,HB_obsratio,HS_observ,HS_chi2, HS_pval; char HB_chan[100]={""}, HB_version[50], HS_version[50]; NH0=hbBlocksMO("HB.in",&NHch); system("echo 'BLOCK DMASS\n 25 2 '>> HB.in"); #include "../include/hBandS.inc" #ifdef HIGGSBOUNDS printf("HB(%s): result=%.0f obsratio=%.2E channel= %s \n", HB_version,HB_result,HB_obsratio,HB_chan); #endif #ifdef HIGGSSIGNALS printf("HS(%s): Nobservables=%.0f chi^2 = %.2E pval= %.2E\n",HS_version,HS_observ,HS_chi2, HS_pval); #endif } #endif #ifdef LILITH { double m2logL, m2logL_reference=0,pvalue; int exp_ndf,n_par=0,ndf; char call_lilith[100], Lilith_version[20]; if(LilithMO("Lilith_in.xml")) { #include "../include/Lilith.inc" if(ndf) { printf("LILITH(DB%s): -2*log(L): %.2f; -2*log(L_reference): %.2f; ndf: %d; p-value: %.2E \n", Lilith_version,m2logL,m2logL_reference,ndf,pvalue); } } else printf("LILITH: there is no Higgs candidate\n"); } #endif #ifdef SMODELS { int result=0; double Rvalue=0; char analysis[30]={},topology[30]={}; int LHCrun=LHC8|LHC13; // LHC8 - 8TeV; LHC13 - 13TeV; #include "../include/SMODELS.inc" } #endif #ifdef OMEGA { int fast=1; double Beps=1.E-4, cut=0.01; double Omega; int i,err; printf("\n==== Calculation of relic density =====\n"); if(CDM1 && CDM2) { Omega= darkOmega2(fast,Beps); printf("Omega_1h^2=%.2E\n", Omega*(1-fracCDM2)); printf("Omega_2h^2=%.2E\n", Omega*fracCDM2); } else { double Xf; Omega=darkOmega(&Xf,fast,Beps,&err); printf("Xf=%.2e Omega=%.2e\n",Xf,Omega); if(Omega>0)printChannels(Xf,cut,Beps,1,stdout); } } #endif #ifdef FREEZEIN { double TR=1E10; double omegaFi; toFeebleList("~s0"); VWdecay=0; VZdecay=0; omegaFi=darkOmegaFi(TR,&err); printf("omega freeze-in=%.3E\n", omegaFi); printChannelsFi(0,0,stdout); } #endif #ifdef INDIRECT_DETECTION { int err,i; double Emin=1,/* Energy cut in GeV */ sigmaV; double vcs_gz,vcs_gg; char txt[100]; double SpA[NZ],SpE[NZ],SpP[NZ]; double FluxA[NZ],FluxE[NZ],FluxP[NZ]; double * SpNe=NULL,*SpNm=NULL,*SpNl=NULL; double Etest=Mcdm/2; printf("\n==== Indirect detection =======\n"); sigmaV=calcSpectrum(1+2+4,SpA,SpE,SpP,SpNe,SpNm,SpNl ,&err); /* Returns sigma*v in cm^3/sec. SpX - calculated spectra of annihilation. Use SpectdNdE(E, SpX) to calculate energy distribution in 1/GeV units. First parameter 1-includes W/Z polarization 2-includes gammas for 2->2+gamma 4-print cross sections */ { double fi=0.1,dfi=0.05; /* angle of sight and 1/2 of cone angle in [rad] */ gammaFluxTab(fi,dfi, sigmaV, SpA, FluxA); printf("Photon flux for angle of sight f=%.2f[rad]\n" "and spherical region described by cone with angle %.2f[rad]\n",fi,2*dfi); #ifdef SHOWPLOTS sprintf(txt,"Photon flux for angle of sight %.2f[rad] and cone angle %.2f[rad]",fi,2*dfi); displayPlot(txt,"E[GeV]",Emin,Mcdm,0,1,"",0,SpectdNdE,FluxA); #endif printf("Photon flux = %.2E[cm^2 s GeV]^{-1} for E=%.1f[GeV]\n",SpectdNdE(Etest, FluxA), Etest); } { posiFluxTab(Emin, sigmaV, SpE, FluxE); #ifdef SHOWPLOTS displayPlot("positron flux [cm^2 s sr GeV]^{-1}","E[GeV]",Emin,Mcdm,0,1,"",0,SpectdNdE,FluxE); #endif printf("Positron flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxE), Etest); } { pbarFluxTab(Emin, sigmaV, SpP, FluxP ); #ifdef SHOWPLOTS displayPlot("antiproton flux [cm^2 s sr GeV]^{-1}","E[GeV]",Emin,Mcdm,0,1,"",0,SpectdNdE,FluxP); #endif printf("Antiproton flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxP), Etest); } } #endif #ifdef RESET_FORMFACTORS { /* The user has approach to form factors which specifies quark contents of proton and nucleon via global parametes like <Type>FF<Nucleon><q> where <Type> can be "Scalar", "pVector", and "Sigma"; <Nucleon> "P" or "N" for proton and neutron <q> "d", "u","s" calcScalarQuarkFF( Mu/Md, Ms/Md, sigmaPiN[MeV], sigma0[MeV]) calculates and rewrites Scalar form factors */ printf("\n======== RESET_FORMFACTORS ======\n"); printf("protonFF (default) d %.2E, u %.2E, s %.2E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(default) d %.2E, u %.2E, s %.2E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); // To restore default form factors of version 2 call calcScalarQuarkFF(0.553,18.9,55.,243.5); printf("protonFF (new) d %.2E, u %.2E, s %.2E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(new) d %.2E, u %.2E, s %.2E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); // To restore default form factors current version call // calcScalarQuarkFF(0.56,20.2,34,42); } #endif #ifdef CDM_NUCLEON { double pA0[2],pA5[2],nA0[2],nA5[2]; double Nmass=0.939; /*nucleon mass*/ double SCcoeff; printf("\n==== Calculation of CDM-nucleons amplitudes =====\n"); if(CDM1) { nucleonAmplitudes(CDM1, pA0,pA5,nA0,nA5); printf("CDM[antiCDM]-nucleon micrOMEGAs amplitudes for %s \n",CDM1); printf("proton: SI %.3E [%.3E] SD %.3E [%.3E]\n",pA0[0], pA0[1], pA5[0], pA5[1] ); printf("neutron: SI %.3E [%.3E] SD %.3E [%.3E]\n",nA0[0], nA0[1], nA5[0], nA5[1] ); SCcoeff=4/M_PI*3.8937966E8*pow(Nmass*Mcdm/(Nmass+ Mcdm),2.); printf("CDM[antiCDM]-nucleon cross sections[pb]:\n"); printf(" proton SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*pA0[0]*pA0[0],SCcoeff*pA0[1]*pA0[1],3*SCcoeff*pA5[0]*pA5[0],3*SCcoeff*pA5[1]*pA5[1]); printf(" neutron SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*nA0[0]*nA0[0],SCcoeff*nA0[1]*nA0[1],3*SCcoeff*nA5[0]*nA5[0],3*SCcoeff*nA5[1]*nA5[1]); } if(CDM2) { nucleonAmplitudes(CDM2, pA0,pA5,nA0,nA5); printf("CDM[antiCDM]-nucleon micrOMEGAs amplitudes for %s \n",CDM2); printf("proton: SI %.3E [%.3E] SD %.3E [%.3E]\n",pA0[0], pA0[1], pA5[0], pA5[1] ); printf("neutron: SI %.3E [%.3E] SD %.3E [%.3E]\n",nA0[0], nA0[1], nA5[0], nA5[1] ); SCcoeff=4/M_PI*3.8937966E8*pow(Nmass*Mcdm/(Nmass+ Mcdm),2.); printf("CDM[antiCDM]-nucleon cross sections[pb]:\n"); printf(" proton SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*pA0[0]*pA0[0],SCcoeff*pA0[1]*pA0[1],3*SCcoeff*pA5[0]*pA5[0],3*SCcoeff*pA5[1]*pA5[1]); printf(" neutron SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*nA0[0]*nA0[0],SCcoeff*nA0[1]*nA0[1],3*SCcoeff*nA5[0]*nA5[0],3*SCcoeff*nA5[1]*nA5[1]); } } #endif #ifdef CDM_NUCLEUS { double dNdE[300]; double nEvents; printf("\n======== Direct Detection ========\n"); nEvents=nucleusRecoil(Maxwell,73,Z_Ge,J_Ge73,SxxGe73,NULL,dNdE); printf("73Ge: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayPlot("Distribution of recoil energy of 73Ge","E[KeV]",0,200,0,1,"dN/dE",0,dNdERecoil,dNdE); #endif nEvents=nucleusRecoil(Maxwell,131,Z_Xe,J_Xe131,SxxXe131,NULL,dNdE); printf("131Xe: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayPlot("Distribution of recoil energy of 131Xe","E[KeV]",0,200,0,1,"dN/dE",0,dNdERecoil,dNdE); #endif nEvents=nucleusRecoil(Maxwell,23,Z_Na,J_Na23,SxxNa23,NULL,dNdE); printf("23Na: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayPlot("Distribution of recoil energy of 23Na","E[KeV]",0,200,0,1,"dN/dE",0,dNdERecoil,dNdE); #endif nEvents=nucleusRecoil(Maxwell,127,Z_I,J_I127,SxxI127,NULL,dNdE); printf("I127: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayPlot("Distribution of recoil energy of 127I","E[KeV]",0,200,0,1,"dN/dE",0,dNdERecoil,dNdE); #endif } #endif #ifdef NEUTRINO if(!CDM1 || !CDM2) { double nu[NZ], nu_bar[NZ],mu[NZ]; double Ntot; int forSun=1; double Emin=1; printf("\n===============Neutrino Telescope======= for "); if(forSun) printf("Sun\n"); else printf("Earth\n"); err=neutrinoFlux(Maxwell,forSun, nu,nu_bar); #ifdef SHOWPLOTS displayPlot("neutrino fluxes [1/Year/km^2/GeV]","E[GeV]",Emin,Mcdm,0, 2,"dnu/dE",0,SpectdNdE,nu,"dnu_bar/dE",0,SpectdNdE,nu_bar); #endif { printf(" E>%.1E GeV neutrino flux %.2E [1/Year/km^2] \n",Emin,spectrInfo(Emin,nu,NULL)); printf(" E>%.1E GeV anti-neutrino flux %.2E [1/Year/km^2]\n",Emin,spectrInfo(Emin,nu_bar,NULL)); } /* Upward events */ muonUpward(nu,nu_bar, mu); #ifdef SHOWPLOTS displayPlot("Upward muons[1/Year/km^2/GeV]","E",Emin,Mcdm/2, 0,1,"mu",0,SpectdNdE,mu); #endif printf(" E>%.1E GeV Upward muon flux %.2E [1/Year/km^2]\n",Emin,spectrInfo(Emin,mu,NULL)); /* Contained events */ muonContained(nu,nu_bar,1., mu); #ifdef SHOWPLOTS displayPlot("Contained muons[1/Year/km^3/GeV]","E",Emin,Mcdm,0,1,"",0,SpectdNdE,mu); #endif printf(" E>%.1E GeV Contained muon flux %.2E [1/Year/km^3]\n",Emin,spectrInfo(Emin/Mcdm,mu,NULL)); } #endif #ifdef DECAYS { char* pname = pdg2name(25); txtList L; double width; if(pname) { width=pWidth(pname,&L); printf("\n%s : total width=%E \n and Branchings:\n",pname,width); printTxtList(L,stdout); } pname = pdg2name(24); if(pname) { width=pWidth(pname,&L); printf("\n%s : total width=%E \n and Branchings:\n",pname,width); printTxtList(L,stdout); } } #endif #ifdef CROSS_SECTIONS { char* next,next_; double nextM; next=nextOdd(1,&nextM); if(next && nextM<1000) { double cs, Pcm=6500, Qren, Qfact, pTmin=0; int nf=3; char*next_=antiParticle(next); Qren=Qfact=nextM; printf("\npp > nextOdd at sqrt(s)=%.2E GeV\n",2*Pcm); Qren=Qfact; cs=hCollider(Pcm,1,nf,Qren, Qfact, next,next_,pTmin,1); printf("Production of 'next' odd particle: cs(pp-> %s,%s)=%.2E[pb]\n",next,next_, cs); } } #endif #ifdef CLEAN system("rm -f HB.* HB.* hb.* hs.* debug_channels.txt debug_predratio.txt Key.dat"); system("rm -f Lilith_* particles.py*"); system("rm -f smodels.in smodels.log smodels.out summary.*"); #endif killPlots(); return 0; }
static void show_spectrum(int X, int Y) { int i; char *menuP=malloc(2+22*(nModelParticles+2)); int mode=1; menuP[0]=22; menuP[1]=0; strcpy(menuP+1, " All Particles -> SLHA"); // sprintf(menuP++strlen(menuP)," Select.Particl-> SLHA"); for(i=0;i<nModelParticles;i++) { char *mass=ModelPrtcls[i].mass; char *name=ModelPrtcls[i].name; if(!strcmp(mass,"0")) sprintf(menuP+strlen(menuP)," %-6.6s Zero ",name); else sprintf(menuP+strlen(menuP)," %-6.6s %12.4E ",name,pMass(name)); } while(mode) { menu1(X,Y,"",menuP,"n_qnumbers",NULL, &mode); if(mode==1) writeSLHA(); else if(mode>1) { FILE*f=fopen("width.tmp","w"); int pos=mode-2; txtList LL=NULL; char *mass=ModelPrtcls[pos].mass; fprintf(f, "Patricle %s(%s), PDG = %d, Mass= ", ModelPrtcls[pos].name, ModelPrtcls[pos].aname, ModelPrtcls[pos].NPDG); if(strcmp(mass,"0")==0) fprintf(f, "Zero\n"); else { double width; fprintf(f,"%.3E ", pMass(ModelPrtcls[pos].name)); width=pWidth(ModelPrtcls[pos].name,&LL); fprintf(f," Width=%.2E\n",width); } fprintf(f,"Quantum numbers: "); { int spin=ModelPrtcls[pos].spin2; int q3=ModelPrtcls[pos].q3; fprintf(f," spin="); if(spin&1) fprintf(f,"%d/2, ",spin); else fprintf(f,"%d, ",spin/2); fprintf(f," charge(el.)="); if(q3!=3*(q3/3)) fprintf(f,"%d/3, ",q3);else fprintf(f,"%d ",q3/3); fprintf(f," color=%d\n",ModelPrtcls[pos].cdim); } if(LL) { txtList ll=LL; fprintf(f," Branchings & Decay channels:\n"); for(;ll;ll=ll->next) { char buff[100]; double br; sscanf(ll->txt,"%lf %[^\n]",&br,buff); fprintf(f," %.2E %s\n",br,buff); } } fclose(f); f=fopen("width.tmp","r"); showtext(2,Y,78, maxRow()-1,"Particle information",f); fclose(f); unlink("width.tmp"); } } free(menuP); return; }
int LiLithF(char*fname) { unsigned int i, npart=0; double tb, sb, cb, alpha, sa, ca, ta, samb, camb, dMb, MbHl, MbH, MbH3, MbSM; double CU, Cb, Ctau, CV, Cgamma, Cg; double Mcp=findValW("Mcp"), Mbp=findValW("Mbp"), Mtp=findValW("Mtp"); double LGGSM, LAASM; double vev = 2*findValW("MW")*findValW("SW")/findValW("EE"); FILE*f; tb=findValW("tB"); sb=tb/sqrt(1+tb*tb); cb=1/sqrt(1+tb*tb); alpha=findValW("alpha"); sa=sin(alpha); ca=cos(alpha); ta=sa/ca; samb=sa*cb-ca*sb; camb=ca*cb+sa*sb; dMb=findValW("dMb"); MbSM=findValW("Mb"); MbHl = MbSM/(1+dMb)*(1-dMb/ta/tb); MbH = MbSM/(1+dMb)*(1+dMb*ta/tb); MbH3 = MbSM/(1+dMb)*(1-dMb/tb/tb); // define Higgs states possibly contributing to the signal char *parts[3]={"h","H","H3"}; f=fopen(fname,"w"); fprintf(f, "<?xml version=\"1.0\"?>\n"); fprintf(f, "<lilithinput>\n"); for(i=0; i<3; i++) { double mass = pMass(parts[i]); if(mass < 123. || mass > 128.) { continue; } ++npart; // compute invisible and undetected branching ratios double invBR = 0., undBR = 0.; double w; txtList L; w=pWidth((char*)parts[i], &L); if(Mcdm1 < 0.5*mass) { char invdecay[50]; char cdmName[50]; // sortOddParticles(cdmName); strcpy(invdecay, CDM1); strcat(invdecay, ","); strcat(invdecay, CDM1); invBR = findBr(L, invdecay); } undBR = 1 - invBR - findBr(L, "b B") - findBr(L, "c C") - findBr(L, "l L") - findBr(L, "W+ W-") - findBr(L, "A A") - findBr(L, "Z Z") - findBr(L, "G G") - findBr(L, "m M") - findBr(L, "A Z") - findBr(L, "u U") - findBr(L, "d D") - findBr(L, "s S"); LGGSM=lGGhSM(mass, alphaQCD(mass)/M_PI, Mcp, Mbp, Mtp, vev); LAASM=lAAhSM(mass, alphaQCD(mass)/M_PI, Mcp, Mbp, Mtp, vev); if(strcmp(parts[i], "h") == 0) { CU = ca/sb; Cb = -(sa/cb)*(MbHl/MbSM); Ctau = -(sa/cb); CV = -samb; Cgamma = findValW("LAAh")/LAASM; Cg = findValW("LGGh")/LGGSM; } else if(strcmp(parts[i], "H") == 0) { CU = sa/sb; Cb = (ca/cb)*(MbH/MbSM); Ctau = ca/cb; CV = camb; Cgamma = findValW("LAAH")/LAASM; Cg = findValW("LGGH")/LGGSM; } else { // for H3 (i.e. A) CU = 1./tb; Cb = tb*(MbH3/MbSM); Ctau = tb; CV = 0.; Cgamma = 0.5*findValW("LAAH3")/LAASM; Cg = 0.5*findValW("LGGH3")/LGGSM; } fprintf(f, " <reducedcouplings part=\"%s\">\n", parts[i]); fprintf(f, " <mass>%f</mass>\n", mass); fprintf(f, " <C to=\"uu\">%f</C>\n", CU); fprintf(f, " <C to=\"bb\">%f</C>\n", Cb); fprintf(f, " <C to=\"mumu\">%f</C>\n", Ctau); fprintf(f, " <C to=\"tautau\">%f</C>\n", Ctau); fprintf(f, " <C to=\"VV\">%f</C>\n", CV); fprintf(f, " <C to=\"gammagamma\">%f</C>\n", Cgamma); fprintf(f, " <C to=\"gg\">%f</C>\n", Cg); // fprintf(f, " <C to=\"Zgamma\">%f</C>\n", 1.); fprintf(f, " <precision>%s</precision>\n", "BEST-QCD"); fprintf(f, " <extraBR>\n"); fprintf(f, " <BR to=\"invisible\">%f</BR>\n", invBR); fprintf(f, " <BR to=\"undetected\">%f</BR>\n", undBR); fprintf(f, " </extraBR>\n"); fprintf(f, " </reducedcouplings>\n"); } fprintf(f, "</lilithinput>\n"); fclose(f); return npart; }
int main(int argc,char** argv) { int err; char cdmName[10]; int spin2, charge3,cdim; // sysTimeLim=1000; ForceUG=0; /* to Force Unitary Gauge assign 1 */ // nPROCSS=0; /* to switch off multiprocessor calculations */ /* if you would like to work with superIso setenv("superIso","./superiso_v3.1",1); */ #ifdef SUGRA { double m0,mhf,a0,tb; double gMG1, gMG2, gMG3, gAl, gAt, gAb, sgn, gMHu, gMHd, gMl2, gMl3, gMr2, gMr3, gMq2, gMq3, gMu2, gMu3, gMd2, gMd3; printf("\n========= mSUGRA scenario =====\n"); PRINTRGE(RGE); if(argc<5) { printf(" This program needs 4 parameters:\n" " m0 common scalar mass at GUT scale\n" " mhf common gaugino mass at GUT scale\n" " a0 trilinear soft breaking parameter at GUT scale\n" " tb tan(beta) \n"); printf(" Auxiliary parameters are:\n" " sgn +/-1, sign of Higgsino mass term (default 1)\n" " Mtp top quark pole mass\n" " MbMb Mb(Mb) scale independent b-quark mass\n" " alfSMZ strong coupling at MZ\n"); /* printf("Example: ./main 70 250 -300 10\n"); */ printf("Example: ./main 120 500 -350 10 1 173.1 \n"); exit(1); } else { double Mtp,MbMb,alfSMZ; sscanf(argv[1],"%lf",&m0); sscanf(argv[2],"%lf",&mhf); sscanf(argv[3],"%lf",&a0); sscanf(argv[4],"%lf",&tb); if(argc>5)sscanf(argv[5],"%lf",&sgn); else sgn=1; if(argc>6){ sscanf(argv[6],"%lf",&Mtp); assignValW("Mtp",Mtp); } if(argc>7){ sscanf(argv[7],"%lf",&MbMb); assignValW("MbMb",MbMb); } if(argc>8){ sscanf(argv[8],"%lf",&alfSMZ); assignValW("alfSMZ",alfSMZ);} } /*==== simulation of mSUGRA =====*/ gMG1=mhf, gMG2=mhf,gMG3=mhf; gAl=a0, gAt=a0, gAb=a0; gMHu=m0, gMHd=m0; gMl2=m0, gMl3=m0, gMr2=m0, gMr3=m0; gMq2=m0, gMq3=m0, gMu2=m0, gMd2=m0, gMu3=m0, gMd3=m0; err= SUGRAMODEL(RGE) (tb, gMG1, gMG2, gMG3, gAl, gAt, gAb, sgn, gMHu, gMHd, gMl2, gMl3, gMr2, gMr3, gMq2, gMq3, gMu2, gMu3, gMd2, gMd3); } #elif defined(SUGRANUH) { double m0,mhf,a0,tb; double gMG1, gMG2, gMG3, gAl, gAt, gAb, gMl2, gMl3, gMr2, gMr3, gMq2, gMq3, gMu2, gMu3, gMd2, gMd3,mu,MA; printf("\n========= mSUGRA non-universal Higgs scenario =====\n"); PRINTRGE(RGE); if(argc<7) { printf(" This program needs 6 parameters:\n" " m0 common scalar mass at GUT scale\n" " mhf common gaugino mass at GUT scale\n" " a0 trilinear soft breaking parameter at GUT scale\n" " tb tan(beta) \n" " mu mu(EWSB)\n" " MA mass of pseudoscalar Higgs\n"); printf(" Auxiliary parameters are:\n" " Mtp top quark pole mass\n" " MbMb Mb(Mb) scale independent b-quark mass\n" " alfSMZ strong coupling at MZ\n"); /* printf("Example: ./main 70 250 -300 10\n"); */ printf("Example: ./main 120 500 -350 10 680 760 \n"); exit(1); } else { double Mtp,MbMb,alfSMZ; sscanf(argv[1],"%lf",&m0); sscanf(argv[2],"%lf",&mhf); sscanf(argv[3],"%lf",&a0); sscanf(argv[4],"%lf",&tb); sscanf(argv[5],"%lf",&mu); sscanf(argv[6],"%lf",&MA); if(argc>7){ sscanf(argv[7],"%lf",&Mtp); assignValW("Mtp",Mtp); } if(argc>8){ sscanf(argv[8],"%lf",&MbMb); assignValW("MbMb",MbMb); } if(argc>9){ sscanf(argv[9],"%lf",&alfSMZ); assignValW("alfSMZ",alfSMZ);} } /*==== simulation of mSUGRA =====*/ gMG1=mhf, gMG2=mhf,gMG3=mhf; gAl=a0, gAt=a0, gAb=a0; gMl2=m0, gMl3=m0, gMr2=m0, gMr3=m0; gMq2=m0, gMq3=m0, gMu2=m0, gMd2=m0, gMu3=m0, gMd3=m0; err= SUGRANUHMODEL(RGE) (tb,gMG1,gMG2,gMG3,gAl,gAt,gAb,gMl2,gMl3,gMr2,gMr3,gMq2,gMq3,gMu2,gMu3,gMd2,gMd3,mu,MA); } #elif defined(AMSB) { double m0,m32,sgn,tb; printf("\n========= AMSB scenario =====\n"); PRINTRGE(RGE); if(argc<4) { printf(" This program needs 3 parameters:\n" " m0 common scalar mass at GUT scale\n" " m3/2 gravitino mass\n" " tb tan(beta) \n"); printf(" Auxiliary parameters are:\n" " sgn +/-1, sign of Higgsino mass term (default 1)\n" " Mtp top quark pole mass\n" " MbMb Mb(Mb) scale independent b-quark mass\n" " alfSMZ strong coupling at MZ\n"); printf("Example: ./main 450 60000 10\n"); exit(1); } else { double Mtp,MbMb,alfSMZ; sscanf(argv[1],"%lf",&m0); sscanf(argv[2],"%lf",&m32); sscanf(argv[3],"%lf",&tb); if(argc>4)sscanf(argv[4],"%lf",&sgn); else sgn=1; if(argc>5){ sscanf(argv[5],"%lf",&Mtp); assignValW("Mtp",Mtp); } if(argc>6){ sscanf(argv[6],"%lf",&MbMb); assignValW("MbMb",MbMb); } if(argc>7){ sscanf(argv[7],"%lf",&alfSMZ); assignValW("alfSMZ",alfSMZ);} } err= AMSBMODEL(RGE)(m0,m32,tb,sgn); } #elif defined(EWSB) { printf("\n========= EWSB scale input =========\n"); PRINTRGE(RGE); if(argc <2) { printf("The program needs one argument:the name of file with MSSM parameters.\n" "Example: ./main mssm1.par \n"); exit(1); } printf("Initial file \"%s\"\n",argv[1]); err=readVarMSSM(argv[1]); if(err==-1) { printf("Can not open the file\n"); exit(2);} else if(err>0) { printf("Wrong file contents at line %d\n",err);exit(3);} err=EWSBMODEL(RGE)(); } #else { printf("\n========= SLHA file input =========\n"); if(argc <2) { printf("The program needs one argument:the name of SLHA input file.\n" "Example: ./main suspect2_lha.out \n"); exit(1); } printf("Initial file \"%s\"\n",argv[1]); err=lesHinput(argv[1]); if(err) exit(2); } #endif if(err==-1) { printf("Can not open the file\n"); exit(2);} else if(err>0) { printf("Wrong file contents at line %d\n",err);exit(3);} { int nw; printf("Warnings from spectrum calculator:\n"); nw=slhaWarnings(stdout); if(nw==0) printf(" .....none\n"); } if(err) exit(1); err=sortOddParticles(cdmName); if(err) { printf("Can't calculate %s\n",cdmName); return 1;} qNumbers(cdmName,&spin2, &charge3, &cdim); printf("\nDark matter candidate is '%s' with spin=%d/2 mass=%.2E\n", cdmName, spin2, Mcdm); if(charge3) { printf("Dark Matter has electric charge %d/3\n",charge3); exit(1);} if(cdim!=1) { printf("Dark Matter is a color particle\n"); exit(1);} if(strcmp(cdmName,"~o1")) printf(" ~o1 is not CDM\n"); else o1Contents(stdout); #ifdef MASSES_INFO { printf("\n=== MASSES OF HIGGS AND SUSY PARTICLES: ===\n"); printHiggs(stdout); printMasses(stdout,1); } #endif #ifdef CONSTRAINTS { double SMbsg,dmunu; printf("\n\n==== Physical Constraints: =====\n"); printf("deltartho=%.2E\n",deltarho()); printf("gmuon=%.2E\n", gmuon()); printf("bsgnlo=%.2E ", bsgnlo(&SMbsg)); printf("( SM %.2E )\n",SMbsg); printf("bsmumu=%.2E\n", bsmumu()); printf("btaunu=%.2E\n", btaunu()); printf("dtaunu=%.2E ", dtaunu(&dmunu)); printf("dmunu=%.2E\n", dmunu); printf("Rl23=%.3E\n", Rl23()); if(masslimits()==0) printf("MassLimits OK\n"); } #endif #ifdef HIGGSBOUNDS if(access(HIGGSBOUNDS "/HiggsBounds",X_OK )) system( "cd " HIGGSBOUNDS "; ./configure; make "); slhaWrite("HB.in"); HBblocks("HB.in"); system(HIGGSBOUNDS "/HiggsBounds LandH SLHA 3 1 HB.in HB.out > hb.stdout"); slhaRead("HB.out",1+4); printf("HB result= %.0E obsratio=%.2E\n",slhaValFormat("HiggsBoundsResults",0.,"1 2 %lf"), slhaValFormat("HiggsBoundsResults",0.,"1 3 %lf" ) ); { char hbInfo[100]; if(0==slhaSTRFormat("HiggsBoundsResults","1 5 ||%[^|]||",hbInfo)) printf("Channel: %s\n",hbInfo); } #endif #ifdef HIGGSSIGNALS #define DataSet " latestresults " //#define Method " peak " //#define Method " mass " #define Method " both " #define PDF " 2 " // Gaussian //#define PDF " 1 " // box //#define PDF " 3 " // box+Gaussia #define dMh " 2 " printf("HiggsSignals:\n"); if(access(HIGGSSIGNALS "/HiggsSignals",X_OK )) system( "cd " HIGGSSIGNALS "; ./configure; make "); system("rm -f HS.in HS.out"); slhaWrite("HS.in"); HBblocks("HS.in"); system("echo 'BLOCK DMASS\n 25 " dMh " '>> HS.in"); system(HIGGSSIGNALS "/HiggsSignals" DataSet Method PDF " SLHA 3 1 HS.in > hs.stdout"); system("grep -A 10000 HiggsSignalsResults HS.in > HS.out"); slhaRead("HS.out",1+4); printf(" Number of observables %.0f\n",slhaVal("HiggsSignalsResults",0.,1,7)); printf(" total chi^2= %.1E\n",slhaVal("HiggsSignalsResults",0.,1,12)); printf(" HS p-value = %.1E\n", slhaVal("HiggsSignalsResults",0.,1,13)); #undef dMh #undef PDF #undef Method #undef DataSet #endif #ifdef LILITH if(LiLithF("Lilith_in.xml")) { double like; int exp_ndf; system("python " LILITH "/run_lilith.py Lilith_in.xml -s -r Lilith_out.slha"); slhaRead("Lilith_out.slha", 1); like = slhaVal("LilithResults",0.,1,0); exp_ndf = slhaVal("LilithResults",0.,1,1); printf("LILITH: -2*log(L): %f; exp ndf: %d \n", like,exp_ndf ); } else printf("LILITH: there is no Higgs candidate\n"); #endif #ifdef SMODELS { int res; smodels(4000.,5, 0.1, "smodels.in",0); system("make -C " SMODELS); system(SMODELS "/runTools.py xseccomputer -p -N -O -f smodels.in"); system(SMODELS "/runSModelS.py -f smodels.in -s smodels.res -particles ./ > smodels.out "); slhaRead("smodels.res", 1); res=slhaVal("SModelS_Exclusion",0.,2,0,0); switch(res) { case -1: printf("SMODELS: no channels for testing\n");break; case 0: printf("SMODELS: not excluded\n");break; case 1: printf("SMODELS: excluded\n");break; } } #endif #ifdef OMEGA { int fast=1; double Beps=1.E-5, cut=0.01; double Omega,Xf; // to exclude processes with virtual W/Z in DM annihilation VZdecay=0; VWdecay=0; cleanDecayTable(); // to include processes with virtual W/Z also in co-annihilation // VZdecay=2; VWdecay=2; cleanDecayTable(); printf("\n==== Calculation of relic density =====\n"); sortOddParticles(cdmName); Omega=darkOmega(&Xf,fast,Beps); printf("Xf=%.2e Omega=%.2e\n",Xf,Omega); // printChannels(Xf,cut,Beps,1,stdout); // direct access for annihilation channels /* if(omegaCh){ int i; for(i=0; omegaCh[i].weight>0 ;i++) printf(" %.2E %s %s -> %s %s\n", omegaCh[i].weight, omegaCh[i].prtcl[0], omegaCh[i].prtcl[1],omegaCh[i].prtcl[2],omegaCh[i].prtcl[3]); } */ // to restore default switches VZdecay=1; VWdecay=1; cleanDecayTable(); } #endif VZdecay=0; VWdecay=0; cleanDecayTable(); #ifdef INDIRECT_DETECTION { int err,i; double Emin=1,SMmev=320;/*Energy cut in GeV and solar potential in MV*/ double sigmaV; char txt[100]; double SpA[NZ],SpE[NZ],SpP[NZ]; double FluxA[NZ],FluxE[NZ],FluxP[NZ]; double SpNe[NZ],SpNm[NZ],SpNl[NZ]; // double * SpNe=NULL,*SpNm=NULL,*SpNl=NULL; double Etest=Mcdm/2; /* default DarkSUSY parameters */ /* K_dif=0.036; L_dif=4; Delta_dif=0.6; Vc_dif=10; Rdisk=30; SMmev=320; */ printf("\n==== Indirect detection =======\n"); sigmaV=calcSpectrum(1+2+4,SpA,SpE,SpP,SpNe,SpNm,SpNl ,&err); /* Returns sigma*v in cm^3/sec. SpX - calculated spectra of annihilation. Use SpectdNdE(E, SpX) to calculate energy distribution in 1/GeV units. First parameter 1-includes W/Z polarization 2-includes gammas for 2->2+gamma 4-print cross sections */ if(SpA) { double fi=0.1,dfi=M_PI/180.; /* angle of sight and 1/2 of cone angle in [rad] */ /* dfi corresponds to solid angle 1.E-3sr */ printf("\nPhoton flux for angle of sight f=%.2f[rad]\n" "and spherical region described by cone with angle %.4f[rad]\n",fi,2*dfi); gammaFluxTab(fi,dfi, sigmaV, SpA, FluxA); printf("Photon flux = %.2E[cm^2 s GeV]^{-1} for E=%.1f[GeV]\n",SpectdNdE(Etest, FluxA), Etest); #ifdef SHOWPLOTS sprintf(txt,"Photon flux for angle of sight %.2f[rad] and cone angle %.2f[rad]",fi,2*dfi); displaySpectrum(txt,Emin,Mcdm,FluxA); #endif printf("Photon flux = %.2E[cm^2 s GeV]^{-1} for E=%.1f[GeV]\n",SpectdNdE(Etest, FluxA), Etest); } if(SpE) { posiFluxTab(Emin, sigmaV, SpE, FluxE); if(SMmev>0) solarModulation(SMmev,0.0005,FluxE,FluxE); #ifdef SHOWPLOTS displaySpectrum("positron flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,FluxE); #endif printf("\nPositron flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxE), Etest); } if(SpP) { pbarFluxTab(Emin, sigmaV, SpP, FluxP); if(SMmev>0) solarModulation(SMmev,1,FluxP,FluxP); #ifdef SHOWPLOTS displaySpectrum("antiproton flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,FluxP); #endif printf("\nAntiproton flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxP), Etest); } } #endif #ifdef LoopGAMMA { double vcs_gz,vcs_gg; double fi=0.,dfi=M_PI/180.; /* fi angle of sight[rad], dfi 1/2 of cone angle in [rad] */ /* dfi corresponds to solid angle pi*(1-cos(dfi)) [sr] */ if(loopGamma(&vcs_gz,&vcs_gg)==0) { printf("\nGamma ray lines:\n"); printf("E=%.2E[GeV] vcs(Z,A)= %.2E[cm^3/s], flux=%.2E[cm^2 s]^{-1}\n",Mcdm-91.19*91.19/4/Mcdm,vcs_gz, gammaFlux(fi,dfi,vcs_gz)); printf("E=%.2E[GeV] vcs(A,A)= %.2E[cm^3/s], flux=%.2E[cm^2 s]^{-1}\n",Mcdm,vcs_gg, 2*gammaFlux(fi,dfi,vcs_gg)); } } #endif #ifdef RESET_FORMFACTORS { /* The user has approach to form factors which specifies quark contents of proton and nucleon via global parametes like <Type>FF<Nucleon><q> where <Type> can be "Scalar", "pVector", and "Sigma"; <Nucleon> "P" or "N" for proton and neutron <q> "d", "u","s" calcScalarQuarkFF( Mu/Md, Ms/Md, sigmaPiN[MeV], sigmaS[MeV]) calculates and rewrites Scalar form factors */ printf("protonFF (default) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(default) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); calcScalarQuarkFF(0.46,27.5,34.,42.); // To restore default form factors of version 2 call // calcScalarQuarkFF(0.553,18.9,55.,243.5); printf("protonFF (new) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(new) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); } #endif #ifdef CDM_NUCLEON { double pA0[2],pA5[2],nA0[2],nA5[2]; double Nmass=0.939; /*nucleon mass*/ double SCcoeff; printf("\n==== Calculation of CDM-nucleons amplitudes =====\n"); #ifdef TEST_Direct_Detection printf(" TREE LEVEL\n"); MSSMDDtest(0, pA0,pA5,nA0,nA5); printf("Analitic formulae\n"); printf(" proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf(" neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); nucleonAmplitudes(CDM1,NULL, pA0,pA5,nA0,nA5); printf("CDM-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); printf(" BOX DIAGRAMS\n"); MSSMDDtest(1, pA0,pA5,nA0,nA5); printf("Analitic formulae\n"); printf(" proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf(" neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); #endif nucleonAmplitudes(CDM1,pA0,pA5,nA0,nA5); printf("CDM-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); SCcoeff=4/M_PI*3.8937966E8*pow(Nmass*Mcdm/(Nmass+ Mcdm),2.); printf("\n==== CDM-nucleon cross sections[pb] ====\n"); printf(" proton SI %.3E SD %.3E\n",SCcoeff*pA0[0]*pA0[0],3*SCcoeff*pA5[0]*pA5[0]); printf(" neutron SI %.3E SD %.3E\n",SCcoeff*nA0[0]*nA0[0],3*SCcoeff*nA5[0]*nA5[0]); } #endif #ifdef CDM_NUCLEUS { double dNdE[300]; double nEvents; printf("\n======== Direct Detection ========\n"); nEvents=nucleusRecoil(Maxwell,73,Z_Ge,J_Ge73,SxxGe73,dNdE); printf("73Ge: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 73Ge",0,199); #endif nEvents=nucleusRecoil(Maxwell,131,Z_Xe,J_Xe131,SxxXe131,dNdE); printf("131Xe: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 131Xe",0,199); #endif nEvents=nucleusRecoil(Maxwell,23,Z_Na,J_Na23,SxxNa23,dNdE); printf("23Na: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 23Na",0,199); #endif nEvents=nucleusRecoil(Maxwell,127,Z_I,J_I127,SxxI127,dNdE); printf("I127: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 127I",0,199); #endif } #endif #ifdef NEUTRINO { double nu[NZ], nu_bar[NZ],mu[NZ]; int forSun=1; double Emin=1; WIMPSIM=0; printf("\n===============Neutrino Telescope======= for "); if(forSun) printf("Sun\n"); else printf("Earth\n"); err=neutrinoFlux(Maxwell,forSun, nu,nu_bar); #ifdef SHOWPLOTS displaySpectra("neutrino fluxes [1/Year/km^2/GeV]",Emin,Mcdm,2,nu,"nu",nu_bar,"nu_bar"); #endif printf(" E>%.1E GeV neutrino/anti-neutrin fluxes %.2E/%.2E [1/Year/km^2]\n",Emin, spectrInfo(Emin,nu,NULL), spectrInfo(Emin,nu_bar,NULL)); // ICE CUBE if(forSun)printf("IceCube22 exclusion confidence level = %.2E%%\n", 100*exLevIC22(nu,nu_bar,NULL)); /* Upward events */ muonUpward(nu,nu_bar, mu); #ifdef SHOWPLOTS displaySpectrum("Upward muons[1/Year/km^2/GeV]",Emin,Mcdm/2,mu); #endif printf(" E>%.1E GeV Upward muon flux %.2E [1/Year/km^2]\n",Emin,spectrInfo(Emin,mu,NULL)); /* Contained events */ muonContained(nu,nu_bar,1., mu); #ifdef SHOWPLOTS displaySpectrum("Contained muons[1/Year/km^3/GeV]",Emin,Mcdm,mu); #endif printf(" E>%.1E GeV Contained muon flux %.2E [1/Year/km^3]\n",Emin,spectrInfo(Emin,mu,NULL)); } #endif #ifdef DECAYS { txtList L; double width,br; char * pname; printf("\n================= Decays ==============\n"); pname = "h"; width=pWidth(pname,&L); printf("\n%s : total width=%.2E \n and Branchings:\n",pname,width); printTxtList(L,stdout); pname = "~o2"; width=pWidth(pname,&L); printf("\n%s : total width=%.2E \n and Branchings:\n",pname,width); printTxtList(L,stdout); } #endif #ifdef CROSS_SECTIONS { double cs, Pcm=4000, Qren,Qfact=pMass("~o2"),pTmin=0; int nf=3; printf("pp collision at %.2E GeV\n",Pcm); Qren=Qfact; cs=hCollider(Pcm,1,nf,Qren, Qfact, "~o1","~o2",pTmin,1); printf("cs(pp->~o1,~o2)=%.2E[pb]\n",cs); } #endif #ifdef CLEAN killPlots(); system("rm -f suspect2_lha.in suspect2_lha.out suspect2.out Key.dat nngg.out output.flha "); system("rm -f HB.in HB.out HS.in HS.out hb.stdout hs.stdout debug_channels.txt debug_predratio.txt"); system("rm -f Lilith_in.xml Lilith_out.slha smodels.* summary.* particles.py"); #endif return 0; }
HRESULT ConnectVideoWindow(IGraphBuilder *pFg, HWND hwnd, RECT *pRect, BOOL is16By9) { HRESULT hr=NOERROR; IVideoWindow *pVideoWindow=NULL; IMediaEventEx *pMediaEvent=NULL; if (pFg==NULL) return(E_POINTER); hr = pFg->QueryInterface(IID_IVideoWindow, (void **)&pVideoWindow); if (hr == NOERROR) { if (pVideoWindow==NULL) return(FALSE); hr=pVideoWindow->put_Owner((long)hwnd); // We own the window now hr=pVideoWindow->put_WindowStyle(WS_CHILD); // you are now a child if (pRect!=NULL) { int w=pWidth(pRect); int h=pHeight(pRect); int l=pRect->left; int t=pRect->top; if (is16By9) { int hh=(9*w)/16; int ww=(h*16)/9; if (hh<h) t=t+(h-hh)/2; if (ww<w) { l=l+(w-ww)/2; w=ww; hh=(9*w)/16; } h=hh; } else { int hh=(3*w)/4; int ww=(h*4)/3; if (hh<h) t=t+(h-hh)/2; if (ww<w) { l=l+(w-ww)/2; w=ww; hh=(3*w)/4; } h=hh; } hr=pVideoWindow->SetWindowPosition(l,t,w,h); } hr=pVideoWindow->put_Visible(OATRUE); hr=pVideoWindow->put_MessageDrain ((OAHWND)hwnd); } else return(E_FAIL); hr = pFg->QueryInterface(IID_IMediaEventEx, (void **)&pMediaEvent); if (SUCCEEDED(hr)) hr=pMediaEvent->SetNotifyWindow((LONG)ghWndApp, WM_GRAPHNOTIFY, 0); RELEASE(pVideoWindow); RELEASE(pMediaEvent); return(hr); }
int LiLithF(char*fname) { unsigned int i, npart=0; double CU, Cb, Ctau, CV, Cgamma, Cg; char *parts[4]={"h1","h2","h3","ha"}; FILE*f; f=fopen(fname,"w"); fprintf(f, "<?xml version=\"1.0\"?>\n"); fprintf(f, "<lilithinput>\n"); for(i=0; i<4; i++) { double mass = pMass(parts[i]); if(mass < 123. || mass > 128.) { continue; } ++npart; // compute invisible and undetected branching ratios double invBR = 0., undBR = 0.; double w; txtList L; w=pWidth((char*)parts[i], &L); if(Mcdm1 < 0.5*mass) { char invdecay[50]; char cdmName[50]; // sortOddParticles(cdmName); strcpy(invdecay, CDM1); strcat(invdecay, ","); strcat(invdecay, CDM1); invBR = findBr(L, invdecay); } undBR = 1 - invBR - findBr(L, "b B") - findBr(L, "c C") - findBr(L, "l L") - findBr(L, "W+ W-") - findBr(L, "A A") - findBr(L, "Z1 Z1") - findBr(L, "G G") - findBr(L, "m M") - findBr(L, "A Z1") - findBr(L, "u U") - findBr(L, "d D") - findBr(L, "s S"); CU = slhaVal("REDCOUP",0.,2,1+i,1); Cb = slhaVal("REDCOUP",0.,2,1+i,3); Ctau = slhaVal("REDCOUP",0.,2,1+i,2); CV = slhaVal("REDCOUP",0.,2,1+i,4); Cg= slhaVal("REDCOUP",0.,2,1+i,5); Cgamma=slhaVal("REDCOUP",0.,2,1+i,6); fprintf(f, " <reducedcouplings part=\"%s\">\n", parts[i]); fprintf(f, " <mass>%f</mass>\n", mass); fprintf(f, " <C to=\"uu\">%f</C>\n", CU); fprintf(f, " <C to=\"bb\">%f</C>\n", Cb); fprintf(f, " <C to=\"mumu\">%f</C>\n", Ctau); fprintf(f, " <C to=\"tautau\">%f</C>\n", Ctau); fprintf(f, " <C to=\"VV\">%f</C>\n", CV); fprintf(f, " <C to=\"gammagamma\">%f</C>\n", Cgamma); fprintf(f, " <C to=\"gg\">%f</C>\n", Cg); // fprintf(f, " <C to=\"Zgamma\">%f</C>\n", 1.); fprintf(f, " <precision>%s</precision>\n", "BEST-QCD"); fprintf(f, " <extraBR>\n"); fprintf(f, " <BR to=\"invisible\">%f</BR>\n", invBR); fprintf(f, " <BR to=\"undetected\">%f</BR>\n", undBR); fprintf(f, " </extraBR>\n"); fprintf(f, " </reducedcouplings>\n"); } fprintf(f, "</lilithinput>\n"); fclose(f); return npart; }
int main(int argc,char** argv) { int err; char cdmName[10]; int spin2, charge3,cdim; ForceUG=0; /* to Force Unitary Gauge assign 1 */ // sysTimeLim=1000; /* if you would like to work with superIso setenv("superIso","./superiso_v3.1",1); */ #ifdef SUGRA { double m0,mhf,a0,tb; double gMG1, gMG2, gMG3, gAl, gAt, gAb, sgn, gMHu, gMHd, gMl2, gMl3, gMr2, gMr3, gMq2, gMq3, gMu2, gMu3, gMd2, gMd3; printf("\n========= mSUGRA scenario =====\n"); PRINTRGE(RGE); if(argc<5) { printf(" This program needs 4 parameters:\n" " m0 common scalar mass at GUT scale\n" " mhf common gaugino mass at GUT scale\n" " a0 trilinear soft breaking parameter at GUT scale\n" " tb tan(beta) \n"); printf(" Auxiliary parameters are:\n" " sgn +/-1, sign of Higgsino mass term (default 1)\n" " Mtp top quark pole mass\n" " MbMb Mb(Mb) scale independent b-quark mass\n" " alfSMZ strong coupling at MZ\n"); /* printf("Example: ./main 70 250 -300 10\n"); */ printf("Example: ./main 120 500 -350 10 1 173.1 \n"); exit(1); } else { double Mtp,MbMb,alfSMZ; sscanf(argv[1],"%lf",&m0); sscanf(argv[2],"%lf",&mhf); sscanf(argv[3],"%lf",&a0); sscanf(argv[4],"%lf",&tb); if(argc>5)sscanf(argv[5],"%lf",&sgn); else sgn=1; if(argc>6){ sscanf(argv[6],"%lf",&Mtp); assignValW("Mtp",Mtp); } if(argc>7){ sscanf(argv[7],"%lf",&MbMb); assignValW("MbMb",MbMb); } if(argc>8){ sscanf(argv[8],"%lf",&alfSMZ); assignValW("alfSMZ",alfSMZ);} } /*==== simulation of mSUGRA =====*/ gMG1=mhf, gMG2=mhf,gMG3=mhf; gAl=a0, gAt=a0, gAb=a0; gMHu=m0, gMHd=m0; gMl2=m0, gMl3=m0, gMr2=m0, gMr3=m0; gMq2=m0, gMq3=m0, gMu2=m0, gMd2=m0, gMu3=m0, gMd3=m0; err= SUGRAMODEL(RGE) (tb, gMG1, gMG2, gMG3, gAl, gAt, gAb, sgn, gMHu, gMHd, gMl2, gMl3, gMr2, gMr3, gMq2, gMq3, gMu2, gMu3, gMd2, gMd3); } #elif defined(SUGRANUH) { double m0,mhf,a0,tb; double gMG1, gMG2, gMG3, gAl, gAt, gAb, gMl2, gMl3, gMr2, gMr3, gMq2, gMq3, gMu2, gMu3, gMd2, gMd3,mu,MA; printf("\n========= mSUGRA non-universal Higgs scenario =====\n"); PRINTRGE(RGE); if(argc<7) { printf(" This program needs 6 parameters:\n" " m0 common scalar mass at GUT scale\n" " mhf common gaugino mass at GUT scale\n" " a0 trilinear soft breaking parameter at GUT scale\n" " tb tan(beta) \n" " mu mu(EWSB)\n" " MA mass of pseudoscalar Higgs\n"); printf(" Auxiliary parameters are:\n" " Mtp top quark pole mass\n" " MbMb Mb(Mb) scale independent b-quark mass\n" " alfSMZ strong coupling at MZ\n"); /* printf("Example: ./main 70 250 -300 10\n"); */ printf("Example: ./main 120 500 -350 10 680 760 \n"); exit(1); } else { double Mtp,MbMb,alfSMZ; sscanf(argv[1],"%lf",&m0); sscanf(argv[2],"%lf",&mhf); sscanf(argv[3],"%lf",&a0); sscanf(argv[4],"%lf",&tb); sscanf(argv[5],"%lf",&mu); sscanf(argv[6],"%lf",&MA); if(argc>7){ sscanf(argv[7],"%lf",&Mtp); assignValW("Mtp",Mtp); } if(argc>8){ sscanf(argv[8],"%lf",&MbMb); assignValW("MbMb",MbMb); } if(argc>9){ sscanf(argv[9],"%lf",&alfSMZ); assignValW("alfSMZ",alfSMZ);} } /*==== simulation of mSUGRA =====*/ gMG1=mhf, gMG2=mhf,gMG3=mhf; gAl=a0, gAt=a0, gAb=a0; gMl2=m0, gMl3=m0, gMr2=m0, gMr3=m0; gMq2=m0, gMq3=m0, gMu2=m0, gMd2=m0, gMu3=m0, gMd3=m0; err= SUGRANUHMODEL(RGE) (tb,gMG1,gMG2,gMG3,gAl,gAt,gAb,gMl2,gMl3,gMr2,gMr3,gMq2,gMq3,gMu2,gMu3,gMd2,gMd3,mu,MA); } #elif defined(AMSB) { double m0,m32,sgn,tb; printf("\n========= AMSB scenario =====\n"); PRINTRGE(RGE); if(argc<4) { printf(" This program needs 3 parameters:\n" " m0 common scalar mass at GUT scale\n" " m3/2 gravitino mass\n" " tb tan(beta) \n"); printf(" Auxiliary parameters are:\n" " sgn +/-1, sign of Higgsino mass term (default 1)\n" " Mtp top quark pole mass\n" " MbMb Mb(Mb) scale independent b-quark mass\n" " alfSMZ strong coupling at MZ\n"); printf("Example: ./main 450 60000 10\n"); exit(1); } else { double Mtp,MbMb,alfSMZ; sscanf(argv[1],"%lf",&m0); sscanf(argv[2],"%lf",&m32); sscanf(argv[3],"%lf",&tb); if(argc>4)sscanf(argv[4],"%lf",&sgn); else sgn=1; if(argc>5){ sscanf(argv[5],"%lf",&Mtp); assignValW("Mtp",Mtp); } if(argc>6){ sscanf(argv[6],"%lf",&MbMb); assignValW("MbMb",MbMb); } if(argc>7){ sscanf(argv[7],"%lf",&alfSMZ); assignValW("alfSMZ",alfSMZ);} } err= AMSBMODEL(RGE)(m0,m32,tb,sgn); } #elif defined(EWSB) { printf("\n========= EWSB scale input =========\n"); PRINTRGE(RGE); if(argc <2) { printf("The program needs one argument:the name of file with MSSM parameters.\n" "Example: ./main mssm1.par \n"); exit(1); } printf("Initial file \"%s\"\n",argv[1]); err=readVarMSSM(argv[1]); if(err==-1) { printf("Can not open the file\n"); exit(2);} else if(err>0) { printf("Wrong file contents at line %d\n",err);exit(3);} err=EWSBMODEL(RGE)(); } #else { printf("\n========= SLHA file input =========\n"); if(argc <2) { printf("The program needs one argument:the name of SLHA input file.\n" "Example: ./main suspect2_lha.out \n"); exit(1); } printf("Initial file \"%s\"\n",argv[1]); err=lesHinput(argv[1]); if(err) exit(2); } #endif if(err==-1) { printf("Can not open the file\n"); exit(2);} else if(err>0) { printf("Wrong file contents at line %d\n",err);exit(3);} { int nw; printf("Warnings from spectrum calculator:\n"); nw=slhaWarnings(stdout); if(nw==0) printf(" .....none\n"); } if(err) exit(1); err=sortOddParticles(cdmName); if(err) { printf("Can't calculate %s\n",cdmName); return 1;} qNumbers(cdmName,&spin2, &charge3, &cdim); printf("\nDark matter candidate is '%s' with spin=%d/2 mass=%.2E\n", cdmName, spin2, Mcdm); if(charge3) { printf("Dark Matter has electric charge %d/3\n",charge3); exit(1);} if(cdim!=1) { printf("Dark Matter is a color particle\n"); exit(1);} if(strcmp(cdmName,"~o1")) printf(" ~o1 is not CDM\n"); else o1Contents(stdout); #ifdef MASSES_INFO { printf("\n=== MASSES OF HIGGS AND SUSY PARTICLES: ===\n"); printHiggs(stdout); printMasses(stdout,1); } #endif #ifdef CONSTRAINTS { double SMbsg,dmunu; printf("\n\n==== Physical Constraints: =====\n"); printf("deltartho=%.2E\n",deltarho()); printf("gmuon=%.2E\n", gmuon()); printf("bsgnlo=%.2E ", bsgnlo(&SMbsg)); printf("( SM %.2E )\n",SMbsg); printf("bsmumu=%.2E\n", bsmumu()); printf("btaunu=%.2E\n", btaunu()); printf("dtaunu=%.2E ", dtaunu(&dmunu)); printf("dmunu=%.2E\n", dmunu); printf("Rl23=%.3E\n", Rl23()); if(masslimits()==0) printf("MassLimits OK\n"); } #endif #ifdef SUPERISO slhaWrite("slha.in"); system( SUPERISO "/slha.x slha.in >/dev/null"); slhaRead("output.flha",1); unlink("slha.in"); printf("superIsoBSG=%.3E\n", slhaValFormat("FOBS",0., " 5 1 %lf 0 2 3 22")); #endif #ifdef HIGGSBOUNDS if(access(HIGGSBOUNDS "/HiggsBounds",X_OK )) system( "cd " HIGGSBOUNDS "; ./configure; make "); slhaWrite("slha.in"); system("cp slha.in HB.slha"); HBblocks("HB.slha"); System("%s/HiggsBounds LandH SLHA 3 1 HB.slha",HIGGSBOUNDS); slhaRead("HB.slha",1+4); printf("HB result= %.0E obsratio=%.2E\n",slhaValFormat("HiggsBoundsResults",0.,"1 2 %lf"), slhaValFormat("HiggsBoundsResults",0.,"1 3 %lf" ) ); { char hbInfo[100]; if(0==slhaSTRFormat("HiggsBoundsResults","1 5 ||%[^|]||",hbInfo)) printf("Channel: %s\n",hbInfo); } slhaRead("slha.in",0); unlink("slha.in"); #endif #ifdef OMEGA { int fast=1; double Beps=1.E-5, cut=0.01; double Omega,Xf; // to exclude processes with virtual W/Z in DM annihilation VZdecay=0; VWdecay=0; cleanDecayTable(); // to include processes with virtual W/Z also in co-annihilation // VZdecay=2; VWdecay=2; cleanDecayTable(); printf("\n==== Calculation of relic density =====\n"); sortOddParticles(cdmName); Omega=darkOmega(&Xf,fast,Beps); printf("Xf=%.2e Omega=%.2e\n",Xf,Omega); printChannels(Xf,cut,Beps,1,stdout); // direct access for annihilation channels /* if(omegaCh){ int i; for(i=0; omegaCh[i].weight>0 ;i++) printf(" %.2E %s %s -> %s %s\n", omegaCh[i].weight, omegaCh[i].prtcl[0], omegaCh[i].prtcl[1],omegaCh[i].prtcl[2],omegaCh[i].prtcl[3]); } */ // to restore VZdecay and VWdecay switches VZdecay=1; VWdecay=1; cleanDecayTable(); } #endif #ifdef INDIRECT_DETECTION { int err,i; double Emin=1,SMmev=320;/*Energy cut in GeV and solar potential in MV*/ double sigmaV; double vcs_gz,vcs_gg; char txt[100]; double SpA[NZ],SpE[NZ],SpP[NZ]; double FluxA[NZ],FluxE[NZ],FluxP[NZ]; double SpNe[NZ],SpNm[NZ],SpNl[NZ]; // double * SpNe=NULL,*SpNm=NULL,*SpNl=NULL; double Etest=Mcdm/2; /* default DarkSUSY parameters */ /* K_dif=0.036; L_dif=4; Delta_dif=0.6; Vc_dif=10; Rdisk=30; SMmev=320; */ printf("\n==== Indirect detection =======\n"); sigmaV=calcSpectrum( 2+4,SpA,SpE,SpP,SpNe,SpNm,SpNl ,&err); /* Returns sigma*v in cm^3/sec. SpX - calculated spectra of annihilation. Use SpectdNdE(E, SpX) to calculate energy distribution in 1/GeV units. First parameter 1-includes W/Z polarization 2-includes gammas for 2->2+gamma 4-print cross sections */ if(SpA) { double fi=0.,dfi=M_PI/180.; /* angle of sight and 1/2 of cone angle in [rad] */ /* dfi corresponds to solid angle 1.E-3sr */ printf("Photon flux for angle of sight f=%.2f[rad]\n" "and spherical region described by cone with angle %.4f[rad]\n",fi,2*dfi); gammaFluxTab(fi,dfi, sigmaV, SpA, FluxA); #ifdef SHOWPLOTS sprintf(txt,"Photon flux for angle of sight %.2f[rad] and cone angle %.2f[rad]",fi,2*dfi); displaySpectrum(FluxA,txt,Emin,Mcdm,1); #endif printf("Photon flux = %.2E[cm^2 s GeV]^{-1} for E=%.1f[GeV]\n",SpectdNdE(Etest, FluxA), Etest); #ifdef LoopGAMMA if(loopGamma(&vcs_gz,&vcs_gg)==0) { printf("Gamma ray lines:\n"); printf("E=%.2E[GeV] vcs(Z,A)= %.2E[cm^3/s], flux=%.2E[cm^2 s]^{-1}\n",Mcdm-91.19*91.19/4/Mcdm,vcs_gz, gammaFlux(fi,dfi,vcs_gz)); printf("E=%.2E[GeV] vcs(A,A)= %.2E[cm^3/s], flux=%.2E[cm^2 s]^{-1}\n",Mcdm,vcs_gg, 2*gammaFlux(fi,dfi,vcs_gg)); } #endif } if(SpE) { posiFluxTab(Emin, sigmaV, SpE, FluxE); if(SMmev>0) solarModulation(SMmev,0.0005,FluxE,FluxE); #ifdef SHOWPLOTS displaySpectrum(FluxE,"positron flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,1); #endif printf("Positron flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxE), Etest); } if(SpP) { pbarFluxTab(Emin, sigmaV, SpP, FluxP); if(SMmev>0) solarModulation(SMmev,1,FluxP,FluxP); #ifdef SHOWPLOTS displaySpectrum(FluxP,"antiproton flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,1); #endif printf("Antiproton flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxP), Etest); } } #endif #ifdef RESET_FORMFACTORS { /* The user has approach to form factors which specifies quark contents of proton and nucleon via global parametes like <Type>FF<Nucleon><q> where <Type> can be "Scalar", "pVector", and "Sigma"; <Nucleon> "P" or "N" for proton and neutron <q> "d", "u","s" calcScalarQuarkFF( Mu/Md, Ms/Md, sigmaPiN[MeV], sigmaS[MeV]) calculates and rewrites Scalar form factors */ printf("protonFF (default) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(default) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); calcScalarQuarkFF(0.46,27.5,34.,42.); // To restore default form factors of version 2 call // calcScalarQuarkFF(0.553,18.9,55.,243.5); printf("protonFF (new) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(new) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); } #endif #ifdef CDM_NUCLEON { double pA0[2],pA5[2],nA0[2],nA5[2]; double Nmass=0.939; /*nucleon mass*/ double SCcoeff; printf("\n==== Calculation of CDM-nucleons amplitudes =====\n"); #ifdef TEST_Direct_Detection printf(" TREE LEVEL\n"); MSSMDDtest(0, pA0,pA5,nA0,nA5); printf("Analitic formulae\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); nucleonAmplitudes(NULL, pA0,pA5,nA0,nA5); printf("CDM-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); printf(" BOX DIAGRAMS\n"); MSSMDDtest(1, pA0,pA5,nA0,nA5); printf("Analitic formulae\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); #endif nucleonAmplitudes(FeScLoop, pA0,pA5,nA0,nA5); printf("CDM-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); SCcoeff=4/M_PI*3.8937966E8*pow(Nmass*Mcdm/(Nmass+ Mcdm),2.); printf("CDM-nucleon cross sections[pb]:\n"); printf(" proton SI %.3E SD %.3E\n",SCcoeff*pA0[0]*pA0[0],3*SCcoeff*pA5[0]*pA5[0]); printf(" neutron SI %.3E SD %.3E\n",SCcoeff*nA0[0]*nA0[0],3*SCcoeff*nA5[0]*nA5[0]); } #endif #ifdef CDM_NUCLEUS { double dNdE[300]; double nEvents; printf("\n======== Direct Detection ========\n"); nEvents=nucleusRecoil(Maxwell,73,Z_Ge,J_Ge73,SxxGe73,FeScLoop,dNdE); printf("73Ge: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 73Ge",0,199); #endif nEvents=nucleusRecoil(Maxwell,131,Z_Xe,J_Xe131,SxxXe131,FeScLoop,dNdE); printf("131Xe: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 131Xe",0,199); #endif nEvents=nucleusRecoil(Maxwell,23,Z_Na,J_Na23,SxxNa23,FeScLoop,dNdE); printf("23Na: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 23Na",0,199); #endif nEvents=nucleusRecoil(Maxwell,127,Z_I,J_I127,SxxI127,FeScLoop,dNdE); printf("I127: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 127I",0,199); #endif } #endif #ifdef NEUTRINO { double nu[NZ], nu_bar[NZ],mu[NZ]; double Ntot; int forSun=1; double Emin=0.01; printf("\n===============Neutrino Telescope======= for "); if(forSun) printf("Sun\n"); else printf("Earth\n"); err=neutrinoFlux(Maxwell,forSun, nu,nu_bar); #ifdef SHOWPLOTS displaySpectrum(nu,"nu flux from Sun [1/Year/km^2/GeV]",Emin,Mcdm,1); displaySpectrum(nu_bar,"nu-bar from Sun [1/Year/km^2/GeV]",Emin,Mcdm,1); #endif { double Ntot; double Emin=1; //GeV spectrInfo(Emin/Mcdm,nu, &Ntot,NULL); printf(" E>%.1E GeV neutrino flux %.2E [1/Year/km^2] \n",Emin,Ntot); spectrInfo(Emin/Mcdm,nu_bar, &Ntot,NULL); printf(" E>%.1E GeV anti-neutrino flux %.2E [1/Year/km^2]\n",Emin,Ntot); } /* Upward events */ muonUpward(nu,nu_bar, mu); #ifdef SHOWPLOTS displaySpectrum(mu,"Upward muons[1/Year/km^2/GeV]",1,Mcdm/2,1); #endif { double Ntot; double Emin=1; //GeV spectrInfo(Emin/Mcdm,mu, &Ntot,NULL); printf(" E>%.1E GeV Upward muon flux %.2E [1/Year/km^2]\n",Emin,Ntot); } /* Contained events */ muonContained(nu,nu_bar,1., mu); #ifdef SHOWPLOTS displaySpectrum(mu,"Contained muons[1/Year/km^3/GeV]",Emin,Mcdm,1); #endif { double Ntot; double Emin=1; //GeV spectrInfo(Emin/Mcdm,mu, &Ntot,NULL); printf(" E>%.1E GeV Contained muon flux %.2E [1/Year/km^3]\n",Emin,Ntot); } } #endif #ifdef DECAYS { txtList L; double width,br; char * pname; printf("\n================= Decays ==============\n"); pname = "h"; width=pWidth(pname,&L); printf("\n%s : total width=%.2E \n and Branchings:\n",pname,width); printTxtList(L,stdout); pname = "~o2"; width=pWidth(pname,&L); printf("\n%s : total width=%.2E \n and Branchings:\n",pname,width); printTxtList(L,stdout); } #endif #ifdef CROSS_SECTIONS { double Pcm=250, cosmin=-0.99, cosmax=0.99, cs; numout* cc; printf("\n====== Calculation of cross section ====\n"); printf(" e^+, e^- annihilation\n"); Pcm=250.; Helicity[0]=0.5; /* helicity : spin projection on direction of motion */ Helicity[1]=-0.5; /* helicities ={ 0.5, -0.5} corresponds to vector state */ printf("Process e,E->2*x at Pcm=%.3E GeV\n",Pcm); cc=newProcess("e%,E%->2*x"); if(cc) { int ntot,l; char * name[4]; procInfo1(cc,&ntot,NULL,NULL); for(l=1;l<=ntot; l++) { int err; double cs; char txt[100]; procInfo2(cc,l,name,NULL); sprintf(txt,"%3s,%3s -> %3s %3s ",name[0],name[1],name[2],name[3]); cs= cs22(cc,l,Pcm,cosmin,cosmax,&err); if(err) printf("%-20.20s Error\n",txt); else if(cs) printf("%-20.20s %.2E [pb]\n",txt,cs); } } /* { double stot=0; int i,j; char * sq[25]= {"~dL","~dR","~uL","~uR","~sL","~sR","~cL","~cR","~b1","~b2","~t1","~t2", "~DL","~DR","~UL","~UR","~SL","~SR","~CL","~CR","~B1","~B2","~T1","~T2", "~g"}; Pcm=4000; for(i=0;i<25;i++) for(j=0;j<25;j++) {double dcs=hCollider(Pcm,1,0,sq[i],sq[j]); stot+=dcs; printf("p,p -> %s %s %E\n", sq[i],sq[j],dcs); } printf("total cross section =%E (without K-factor)\n",stot); } */ } #endif #ifdef CLEAN killPlots(); system("rm -f suspect2_lha.in suspect2_lha.out suspect2.out HB.slha Key.dat nngg.in nngg.out output.flha "); #endif return 0; }
int LilithMDL(char*fname) { unsigned int i, npart=0; double CU, Cb, Cl, CU5, Cb5, Cl5, CV,Cgamma, Cg; double Mcp=findValW("Mcp"), Mbp=findValW("Mbp"), Mtp=findValW("Mtp"); double vev = 2*findValW("MW")*findValW("SW")/findValW("EE"); FILE*f; char *parts[3]={"h1","h2","h3"}; int hPdgn[3]={25,35,36}; f=fopen(fname,"w"); fprintf(f, "<?xml version=\"1.0\"?>\n"); fprintf(f, "<lilithinput>\n"); for(i=0; i<3; i++) { double mass = pMass(parts[i]); if(mass < 123 || mass > 128) continue; ++npart; // compute invisible and undetected branching ratios double invBR = 0., undBR = 0.; double w; char format[100]; txtList L; w=pWidth((char*)parts[i], &L); if(Mcdm1 < 0.5*mass) { char invdecay[50]; char cdmName[50]; // sortOddParticles(cdmName); strcpy(invdecay, CDM1); strcat(invdecay, ","); strcat(invdecay, CDM1); invBR = findBr(L, invdecay); } undBR = 1 - invBR - findBr(L, "b B") - findBr(L, "c C") - findBr(L, "l L") - findBr(L, "W+ W-") - findBr(L, "A A") - findBr(L, "Z Z") - findBr(L, "G G") - findBr(L, "m M") - findBr(L, "A Z") - findBr(L, "u U") - findBr(L, "d D") - findBr(L, "s S"); sprintf(format,"%%lf %%*f 3 %d 6 6", hPdgn[i]); CU= slhaValFormat("LiLithInputHiggsCouplingsFermions",0.,format); sprintf(format,"%%*f %%lf 3 %d 6 6", hPdgn[i]); CU5= slhaValFormat("LiLithInputHiggsCouplingsFermions",0.,format); sprintf(format,"%%lf %%*f 3 %d 5 5", hPdgn[i]); Cb= slhaValFormat("LiLithInputHiggsCouplingsFermions",0.,format); sprintf(format,"%%*f %%lf 3 %d 5 5", hPdgn[i]); Cb5= slhaValFormat("LiLithInputHiggsCouplingsFermions",0.,format); sprintf(format,"%%lf %%*f 3 %d 15 15", hPdgn[i]); Cl= slhaValFormat("LiLithInputHiggsCouplingsFermions",0.,format); sprintf(format,"%%*f %%lf 3 %d 15 15", hPdgn[i]); Cl5= slhaValFormat("LiLithInputHiggsCouplingsFermions",0.,format); sprintf(format,"%%lf 3 %d 24 24", hPdgn[i]); CV= slhaValFormat("LiLithInputHiggsCouplingsBosons",0.,format); sprintf(format,"%%lf 3 %d 21 21", hPdgn[i]); Cg= slhaValFormat("LiLithInputHiggsCouplingsBosons",0.,format); // sprintf(format,"%%lf 3 %d 22 22", hPdgn[i]); // Cgamma= slhaValFormat("LiLithInputHiggsCouplingsBosons",0.,format); char LaTxt[20]; double LaV,LaV5,LaSM; sprintf(LaTxt,"LAA%s",parts[i]); LaV=findValW(LaTxt); sprintf(LaTxt,"imLAA%s",parts[i]); LaV5=findValW(LaTxt); Cgamma=-sqrt(LaV*LaV+4*LaV5*LaV5)/lAAhSM(mass,alphaQCD(mass)/M_PI, Mcp,Mbp,Mtp,vev); fprintf(f, " <reducedcouplings part=\"%s\">\n", parts[i]); fprintf(f, " <mass>%f</mass>\n", mass); fprintf(f, " <C to=\"uu\" part=\"re\"> %f</C>\n", CU); fprintf(f, " <C to=\"uu\" part=\"im\"> %f</C>\n", CU5); fprintf(f, " <C to=\"bb\" part=\"re\">%f</C>\n", Cb); fprintf(f, " <C to=\"bb\" part=\"im\">%f</C>\n", Cb5); fprintf(f, " <C to=\"mumu\" part=\"re\">%f</C>\n", Cl); fprintf(f, " <C to=\"mumu\" part=\"im\">%f</C>\n", Cl5); fprintf(f, " <C to=\"tautau\" part=\"re\">%f</C>\n", Cl); fprintf(f, " <C to=\"tautau\" part=\"im\">%f</C>\n", Cl5); fprintf(f, " <C to=\"VV\">%f</C>\n", CV); fprintf(f, " <C to=\"gammagamma\">%f</C>\n", Cgamma); fprintf(f, " <C to=\"gg\">%f</C>\n", Cg); // fprintf(f, " <C to=\"Zgamma\">%f</C>\n", 1.); fprintf(f, " <precision>%s</precision>\n", "LO"); fprintf(f, " <extraBR>\n"); fprintf(f, " <BR to=\"invisible\">%f</BR>\n", invBR); fprintf(f, " <BR to=\"undetected\">%f</BR>\n", undBR); fprintf(f, " </extraBR>\n"); fprintf(f, " </reducedcouplings>\n"); } fprintf(f, "</lilithinput>\n"); fclose(f); return npart; }
void smodels(double Pcm, int nf,double csMinFb, char*fileName,int wrt) { int SMP[16]={1,2,3,4,5,6, 11,12,13,14,15,16, 21,22,23,24}; int i,j; FILE*f=fopen(fileName,"w"); int np=0; char**plist=NULL; int smH=-1; char* gluname=NULL; char* phname=NULL; char* bname=NULL; char* Bname=NULL; char* lname=NULL; char* Lname=NULL; // find SM Higgs for(i=0;i<nModelParticles;i++) { if(ModelPrtcls[i].NPDG== 21) gluname=ModelPrtcls[i].name; if(ModelPrtcls[i].NPDG== 22) phname=ModelPrtcls[i].name; if(ModelPrtcls[i].NPDG== 5) { bname=ModelPrtcls[i].name; Bname=ModelPrtcls[i].aname;} if(ModelPrtcls[i].NPDG== -5) { bname=ModelPrtcls[i].aname; Bname=ModelPrtcls[i].name; } if(ModelPrtcls[i].NPDG== 15) { lname=ModelPrtcls[i].name; Lname=ModelPrtcls[i].aname;} if(ModelPrtcls[i].NPDG==-15) { Lname=ModelPrtcls[i].aname; lname=ModelPrtcls[i].name; } } //printf("gluname %s bname %s lname %s\n", gluname,bname,lname); if(gluname && bname && lname) for(smH=0;smH<nModelParticles;smH++) if( ModelPrtcls[smH].spin2==0 && ModelPrtcls[smH].cdim==1 && ModelPrtcls[smH].name[0]!='~' && strcmp(ModelPrtcls[smH].name,ModelPrtcls[smH].aname)==0 ) { double w,ggBr,bbBr,llBr, hMass=pMass(ModelPrtcls[smH].name); txtList L; double ggBrSM=0.073, bbBrSM=0.60,llBrSM=0.063,wSM=4.24E-3; double prec=0.9; char chan[50]; if(hMass<123 || hMass>128) continue; w=pWidth(ModelPrtcls[smH].name,&L); sprintf(chan,"%s,%s",gluname,gluname); ggBr=findBr(L, chan); sprintf(chan,"%s,%s",lname,Lname); llBr=findBr(L, chan); sprintf(chan,"%s,%s",bname,Bname); bbBr=findBr(L, chan); if(ggBr==0) { bbBr*=w/(w+0.073*0.00424); llBr*=w/(w+ggBrSM*wSM);} if( bbBrSM*prec< bbBr && bbBr<bbBrSM*(2-prec) && llBrSM*prec< llBr && llBr<llBrSM*(2-prec)) break; } if(smH<nModelParticles) printf("SM HIGGS=%s\n",ModelPrtcls[smH].name); else printf("NO SM-like HIGGS in the model\n"); fprintf(f,"BLOCK MASS\n"); for(i=0;i<nModelParticles;i++) if(pMass(ModelPrtcls[i].name) <Pcm) { for(j=0;j<16;j++) if(abs(ModelPrtcls[i].NPDG)==SMP[j]) break; if(j==16 ) { np++; plist=realloc(plist,np*sizeof(char*)); plist[np-1]=ModelPrtcls[i].name; if(strcmp(ModelPrtcls[i].name,ModelPrtcls[i].aname)) { np++; plist=realloc(plist,np*sizeof(char*)); plist[np-1]=ModelPrtcls[i].aname; } fprintf(f," %d %E # %s \n",ModelPrtcls[i].NPDG,findValW(ModelPrtcls[i].mass),ModelPrtcls[i].name); } } fprintf(f,"\n"); for(i=0;i<nModelParticles;i++) { for(j=0;j<16;j++) if(ModelPrtcls[i].NPDG==SMP[j]) break; if(j==16) slhaDecayPrint(ModelPrtcls[i].name,1,f); } for(i=0;i<np;i++) for(j=i;j<np;j++) if(pMass(plist[i])+pMass(plist[j])<Pcm) if(plist[i][0]=='~' && plist[j][0]=='~') { int q31,q32,q3,c1,c2; qNumbers(plist[i], NULL, &q31,&c1); qNumbers(plist[j], NULL, &q32,&c2); q3=q31+q32; if(q3<0) { q3*=-1; if(abs(c1)==3) c1*=-1; if(abs(c2)==3) c2*=-1;} if(c1>c2){ int c=c1; c1=c2;c2=c;} if ( (c2==1 || (c1==1 && c2==8) || (c1==-3 && c2==3) || (c1==8 && c2==8) ) && (q3!=0 && q3 !=3) ) continue; if ( ((c1==-3 && c2== 3)||(c1== 1 && c2== 1)|| (c1== 8 && c2== 8)||(c1== 1 && c2== 8)) && (q3!=0 && q3!=3) ) continue; if ( ((c1== 3 && c2== 8)||(c1== 1 && c2== 3)) && (q3!=2) ) continue; if ( ((c1==-3 && c2== 8)||(c1==-3 && c2== 1)) && (q3!=1) ) continue; if ( (c1== 3 && c2== 3) && (q3!=4 && q3!=1) ) continue; if ( (c1==-3 && c2==-3) && (q3!=2) ) continue; { double dcs; double Qf=0.5*(pMass(plist[i])+pMass(plist[j])); dcs=hCollider(Pcm,1,nf,Qf,Qf,plist[i],plist[j],0,wrt); if(dcs>csMinFb*0.001) { fprintf(f,"XSECTION %E 2212 2212 2 %d %d\n",2*Pcm, pNum(plist[i]),pNum(plist[j])); /*pb*/ fprintf(f,"0 0 0 0 0 0 %E micrOMEGAs 3.6\n\n", dcs); } } } fclose(f); free(plist); f=fopen("particles.py","w"); fprintf(f,"#!/usr/bin/env python\n"); fprintf(f,"rOdd ={\n"); for(np=0,i=0;i<nModelParticles;i++) if(ModelPrtcls[i].name[0]=='~' && pMass(ModelPrtcls[i].name) <Pcm ) { if(np) fprintf(f,",\n"); fprintf(f, " %d : \"%s\",\n", ModelPrtcls[i].NPDG,ModelPrtcls[i].name); fprintf(f, " %d : \"%s\"" , -ModelPrtcls[i].NPDG,ModelPrtcls[i].aname); np++; } fprintf(f,"\n}\n"); fprintf(f,"rEven ={\n"); for(np=0,i=0;i<nModelParticles;i++) if(ModelPrtcls[i].name[0]!='~' && pMass(ModelPrtcls[i].name) <Pcm ) { for(j=0;j<16;j++) if(abs(ModelPrtcls[i].NPDG)==SMP[j]) break; if(j==16 ) { if(np) fprintf(f,",\n"); if(ModelPrtcls[i].NPDG==smH) { fprintf(f, " %d : \"higgs\",\n", ModelPrtcls[i].NPDG); fprintf(f, " %d : \"higgs\"\n", -ModelPrtcls[i].NPDG); } else { char * n=ModelPrtcls[i].name; char * an=ModelPrtcls[i].aname; if(strcmp( n,"higgs")==0) n="!higgs"; if(strcmp(an,"higgs")==0) an="!higgs"; fprintf(f, " %d : \"%s\",\n", ModelPrtcls[i].NPDG,n); fprintf(f, " %d : \"%s\"" , -ModelPrtcls[i].NPDG,an); } np++; } } fprintf(f,",\n" " 23 : \"Z\",\n" " -23 : \"Z\",\n" " 22 : \"photon\",\n" " -22 : \"photon\",\n" " 24 : \"W+\",\n" " -24 : \"W-\",\n" " 16 : \"nu\",\n" " -16 : \"nu\",\n" " 15 : \"ta-\",\n" " -15 : \"ta+\",\n" " 14 : \"nu\",\n" " -14 : \"nu\",\n" " 13 : \"mu-\",\n" " -13 : \"mu+\",\n" " 12 : \"nu\",\n" " -12 : \"nu\",\n" " 11 : \"e-\",\n" " -11 : \"e+\",\n" " 5 : \"b\",\n" " -5 : \"b\",\n" " 6 : \"t+\",\n" " -6 : \"t-\",\n" " 1 : \"jet\",\n" " 2 : \"jet\",\n" " 3 : \"jet\",\n" " 4 : \"jet\",\n" " 21 : \"jet\",\n" " -21 : \"jet\",\n" " -1 : \"jet\",\n" " -2 : \"jet\",\n" " -3 : \"jet\",\n" " -4 : \"jet\"" ); fprintf(f,"\n}\n"); fprintf(f, "\nptcDic = {\"e\" : [\"e+\", \"e-\"],\n" " \"mu\" : [\"mu+\", \"mu-\"],\n" " \"ta\" : [\"ta+\", \"ta-\"],\n" " \"l+\" : [\"e+\", \"mu+\"],\n" " \"l-\" : [\"e-\", \"mu-\"],\n" " \"l\" : [\"e-\", \"mu-\", \"e+\", \"mu+\"],\n" " \"W\" : [\"W+\", \"W-\"],\n" " \"t\" : [\"t+\", \"t-\"],\n" " \"L+\" : [\"e+\", \"mu+\", \"ta+\"],\n" " \"L-\" : [\"e-\", \"mu-\", \"ta-\"],\n" " \"L\" : [\"e+\", \"mu+\", \"ta+\", \"e-\", \"mu-\", \"ta-\"]}\n" ); fprintf(f,"qNumbers ={\n"); for(np=0,i=0;i<nModelParticles;i++) if(pMass(ModelPrtcls[i].name) <Pcm ) { for(j=0;j<16;j++) if(abs(ModelPrtcls[i].NPDG)==SMP[j]) break; if(j==16 ) { if(np) fprintf(f,",\n"); fprintf(f, " %d : [%d,%d,%d]", ModelPrtcls[i].NPDG, ModelPrtcls[i].spin2, ModelPrtcls[i].q3, ModelPrtcls[i].cdim); np++; } } fprintf(f,"\n}\n"); fclose(f); }
double pwidth_(char * name, txtList *L , int *dim, int len) { char cName[10]; fName2c(name,cName, len); return pWidth(cName, L , dim); }
int main(int argc,char** argv) { int err,nw; char cdmName[10]; int spin2, charge3,cdim; double laMax; delFiles=0; /* switch to save/delete NMSSMTools input/output */ ForceUG=0; /* to Force Unitary Gauge assign 1 */ #ifdef SUGRA { double m0,mhf,a0,tb; double Lambda, aLambda,aKappa,sgn; if(argc<7) { printf(" This program needs 6 parameters:\n" " m0 common scalar mass at GUT scale\n" " mhf common gaugino mass at GUT scale\n" " a0 trilinear soft breaking parameter at GUT scale\n" " tb tan(beta) \n" " Lambda Lambda parameter at SUSY\n" " aKappa aKappa parameter at GUT\n" ); printf(" Auxiliary parameters are:\n" " sgn +/-1, sign of Higgsino mass term (default 1)\n" " aLambda at GUT (default aLambda=a0)\n" " Mtp top quark pole mass\n" " MbMb Mb(Mb) scale independent b-quark mass\n" " alfSMZ strong coupling at MZ\n"); printf("Example: ./main 320 600 -1300 2 0.5 -1400\n"); exit(1); } else { double Mtp,MbMb,alfSMZ; sscanf(argv[1],"%lf",&m0); sscanf(argv[2],"%lf",&mhf); sscanf(argv[3],"%lf",&a0); sscanf(argv[4],"%lf",&tb); sscanf(argv[5],"%lf",&Lambda); sscanf(argv[6],"%lf",&aKappa); if(argc>7) sscanf(argv[7],"%lf",&sgn); else sgn=1; if(argc>8) sscanf(argv[8],"%lf",&aLambda); else aLambda=a0; if(argc>9){ sscanf(argv[9],"%lf",&Mtp); assignValW("Mtp",Mtp); } if(argc>10){ sscanf(argv[10],"%lf",&MbMb); assignValW("MbMb",MbMb); } if(argc>11){ sscanf(argv[11],"%lf",&alfSMZ); assignValW("alfSMZ",alfSMZ);} } err=nmssmSUGRA( m0,mhf, a0,tb, sgn, Lambda, aLambda, aKappa); } #elif defined(EWSB) { if(argc!=2) { printf(" Correct usage: ./main <file with NMSSM parameters> \n"); printf(" Example : ./main data1.par \n"); exit(1); } err=readVarNMSSM(argv[1]); if(err==-1) {printf("Can not open the file\n"); exit(1);} else if(err>0) { printf("Wrong file contents at line %d\n",err);exit(1);} err=nmssmEWSB(); } #else { printf("\n========= SLHA file input =========\n"); if(argc <2) { printf("The program needs one argument:the name of SLHA input file.\n" "Example: ./main spectr.dat \n"); exit(1); } printf("Initial file \"%s\"\n",argv[1]); err=readSLHA(argv[1]); if(err) exit(2); } #endif slhaWarnings(stdout); if(err) exit(1); //assignValW("Ms2GeV",0.14); err=sortOddParticles(cdmName); if(err) { printf("Can't calculate %s\n",cdmName); return 1;} laMax=findValW("laMax"); printf("Largest coupling of Higgs self interaction %.1E\n",laMax); qNumbers(cdmName,&spin2, &charge3, &cdim); printf("\nDark matter candidate is '%s' with spin=%d/2\n", cdmName, spin2); if(charge3) { printf("Dark Matter has electric charge %d/3\n",charge3); exit(1);} if(cdim!=1) { printf("Dark Matter is a color particle\n"); exit(1);} if(strcmp(cdmName,"~o1")) printf(" ~o1 is not CDM\n"); else o1Contents(stdout); /* printVar(stdout); */ #ifdef MASSES_INFO { printf("\n=== MASSES OF HIGGS AND SUSY PARTICLES: ===\n"); printHiggs(stdout); printMasses(stdout,1); } #endif #ifdef CONSTRAINTS { double constr0,constrM, constrP; printf("\n\n==== Physical Constraints: =====\n"); constr0=bsgnlo(&constrM,&constrP); printf("B->s,gamma = %.2E (%.2E , %.2E ) \n",constr0,constrM, constrP ); constr0= bsmumu(&constrM,&constrP); printf("Bs->mu,mu = %.2E (%.2E , %.2E ) \n",constr0,constrM, constrP ); constr0=btaunu(&constrM,&constrP); printf("B+->tau+,nu= %.2E (%.2E , %.2E ) \n",constr0, constrM, constrP ); constr0=deltaMd(&constrM,&constrP); printf("deltaMd = %.2E (%.2E , %.2E ) \n",constr0,constrM, constrP ); constr0=deltaMs(&constrM,&constrP); printf("deltaMs = %.2E (%.2E , %.2E ) \n",constr0,constrM, constrP ); constr0=gmuon(&constrM,&constrP); printf("(g-2)/BSM = %.2E (%.2E , %.2E ) \n",constr0,constrM, constrP ); } #endif #ifdef OMEGA { int fast=1; double Beps=1.E-5, cut=0.01; double Omega,Xf; printf("\n==== Calculation of relic density =====\n"); Omega=darkOmega(&Xf,fast,Beps); printf("Xf=%.2e Omega=%.2e\n",Xf,Omega); printChannels(Xf,cut,Beps,1,stdout); } #endif #ifdef INDIRECT_DETECTION { int err,i; double Emin=0.1,/* Energy cut in GeV */ sigmaV; double vcs_gz,vcs_gg; char txt[100]; double SpA[NZ],SpE[NZ],SpP[NZ]; double FluxA[NZ],FluxE[NZ],FluxP[NZ]; // double * SpNe=NULL,*SpNm=NULL,*SpNl=NULL; double SpNe[NZ],SpNm[NZ],SpNl[NZ]; double Etest=Mcdm/2; printf("\n==== Indirect detection =======\n"); sigmaV=calcSpectrum(2+4,SpA,SpE,SpP,SpNe,SpNm,SpNl ,&err); /* Returns sigma*v in cm^3/sec. SpX - calculated spectra of annihilation. Use SpectdNdE(E, SpX) to calculate energy distribution in 1/GeV units. First parameter 1-includes W/Z polarization 2-includes gammas for 2->2+gamma 4-print cross sections */ printf("sigmav=%.2E[cm^3/s]\n",sigmaV); if(SpA) { double fi=0.1,dfi=0.05; /* angle of sight and 1/2 of cone angle in [rad] */ gammaFluxTab(fi,dfi, sigmaV, SpA, FluxA); printf("Photon flux for angle of sight f=%.2f[rad]\n" "and spherical region described by cone with angle %.2f[rad]\n",fi,2*dfi); #ifdef SHOWPLOTS sprintf(txt,"Photon flux[cm^2 s GeV]^{1} at f=%.2f[rad], cone angle %.2f[rad]",fi,2*dfi); displaySpectrum(FluxA,txt,Emin,Mcdm,1); #endif printf("Photon flux = %.2E[cm^2 s GeV]^{-1} for E=%.1f[GeV]\n",SpectdNdE(Etest, SpA), Etest); } if(SpE) { posiFluxTab(Emin, sigmaV, SpE, FluxE); #ifdef SHOWPLOTS displaySpectrum(FluxE,"positron flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,1); #endif printf("Positron flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxE), Etest); } if(SpP) { pbarFluxTab(Emin, sigmaV, SpP, FluxP ); #ifdef SHOWPLOTS displaySpectrum(FluxP,"antiproton flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm,1); #endif printf("Antiproton flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxP), Etest); } } #endif #ifdef RESET_FORMFACTORS { /* The user has approach to form factors which specifies quark contents of proton and nucleon via global parametes like <Type>FF<Nucleon><q> where <Type> can be "Scalar", "pVector", and "Sigma"; <Nucleon> "P" or "N" for proton and neutron <q> "d", "u","s" calcScalarFF( Mu/Md, Ms/Md, sigmaPiN[MeV], sigma0[MeV]) calculates and rewrites Scalar form factors */ printf("protonFF (default) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(default) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); calcScalarFF(0.553,18.9,70.,35.); printf("protonFF (new) d %E, u %E, s %E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(new) d %E, u %E, s %E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); /* Option to change parameters of DM velocity distribution */ SetfMaxwell(220.,600.); /* dN ~ exp(-v^2/arg1^2)*Theta(v-arg2) d^3v Earth velocity with respect to Galaxy defined by 'Vearth' parameter. All parameters are in [km/s] units. */ } #endif #ifdef CDM_NUCLEON { double pA0[2],pA5[2],nA0[2],nA5[2]; double Nmass=0.939; /*nucleon mass*/ double SCcoeff; printf("\n==== Calculation of CDM-nucleons amplitudes =====\n"); nucleonAmplitudes(FeScLoop, pA0,pA5,nA0,nA5); printf("CDM-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E SD %.3E\n",pA0[0],pA5[0]); printf("neutron: SI %.3E SD %.3E\n",nA0[0],nA5[0]); SCcoeff=4/M_PI*3.8937966E8*pow(Nmass*Mcdm/(Nmass+ Mcdm),2.); printf("CDM-nucleon cross sections[pb]:\n"); printf(" proton SI %.3E SD %.3E\n",SCcoeff*pA0[0]*pA0[0],3*SCcoeff*pA5[0]*pA5[0]); printf(" neutron SI %.3E SD %.3E\n",SCcoeff*nA0[0]*nA0[0],3*SCcoeff*nA5[0]*nA5[0]); } #endif #ifdef CDM_NUCLEUS { double dNdE[300]; double nEvents; printf("\n======== Direct Detection ========\n"); nEvents=nucleusRecoil(Maxwell,73,Z_Ge,J_Ge73,S00Ge73,S01Ge73,S11Ge73,FeScLoop,dNdE); printf("73Ge: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 73Ge",0,199); #endif nEvents=nucleusRecoil(Maxwell,131,Z_Xe,J_Xe131,S00Xe131,S01Xe131,S11Xe131,FeScLoop,dNdE); printf("131Xe: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 131Xe",0,199); #endif nEvents=nucleusRecoil(Maxwell,23,Z_Na,J_Na23,S00Na23,S01Na23,S11Na23,FeScLoop,dNdE); printf("23Na: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 23Na",0,199); #endif nEvents=nucleusRecoil(Maxwell,127,Z_I,J_I127,S00I127,S01I127,S11I127,FeScLoop,dNdE); printf("I127: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 127I",0,199); #endif } #endif #ifdef DECAYS { txtList L; int dim; double width,br; char * pname; printf("\nParticle decays\n"); pname = "h1"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); pname = "l"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); printf("Br(e,Ne,nl)= %E\n",findBr(L,"e,Ne,nl")); pname = "~o2"; width=pWidth(pname,&L,&dim); printf("%s->%d*x : total width=%E \n and Branchings:\n",pname,dim,width); printTxtList(L,stdout); } #endif #ifdef CROSS_SECTIONS { double Pcm=500, cosmin=-0.99, cosmax=0.99, cs; numout* cc; printf("\n====== Calculation of cross section ====\n"); printf(" e^+, e^- annihilation\n"); Pcm=500.; Helicity[0]=0.5; /* helicity : spin projection on direction of motion */ Helicity[1]=-0.5; /* helicities ={ 0.5, -0.5} corresponds to vector state */ printf("Process e,E->2*x at Pcm=%.3E GeV\n",Pcm); cc=newProcess("e%,E%->2*x","eE_2x"); if(cc) { int ntot,l; char * name[4]; procInfo1(cc,&ntot,NULL,NULL); for(l=1;l<=ntot; l++) { int err; double cs; char txt[100]; procInfo2(cc,l,name,NULL); sprintf(txt,"%3s,%3s -> %3s %3s ",name[0],name[1],name[2],name[3]); cs= cs22(cc,l,Pcm,cosmin,cosmax,&err); if(err) printf("%-20.20s Error\n",txt); else if(cs) printf("%-20.20s %.2E [pb]\n",txt,cs); } } } #endif killPlots(); return 0; }
int main(int argc,char** argv) { int err; char cdmName[10]; int spin2, charge3,cdim; ForceUG=0; // to Force Unitary Gauge assign 1 if(argc==1) { printf(" Correct usage: ./main <file with parameters> \n"); printf("Example: ./main data1.par\n"); exit(1); } err=readVar(argv[1]); if(err==-1) { printf("Can not open the file\n"); exit(1); } else if(err>0) { printf("Wrong file contents at line %d\n",err); exit(1); } err=sortOddParticles(cdmName); if(err) { printf("Can't calculate %s\n",cdmName); return 1; } qNumbers(cdmName, &spin2, &charge3, &cdim); printf("\nDark matter candidate is '%s' with spin=%d/2\n", cdmName, spin2); if(charge3) { printf("Dark Matter has electric charge %d*3\n",charge3); exit(1); } if(cdim!=1) { printf("Dark Matter ia a color particle\n"); exit(1); } #ifdef MASSES_INFO { printf("\n=== MASSES OF HIGG AND ODD PARTICLES: ===\n"); printHiggs(stdout); printMasses(stdout,1); } #endif #ifdef HIGGSBOUNDS if(access(HIGGSBOUNDS "/HiggsBounds",X_OK )) system( "cd " HIGGSBOUNDS "; ./configure; make "); HBblocks("HB.in"); system(HIGGSBOUNDS "/HiggsBounds LandH SLHA 1 0 HB.in HB.out > hb.stdout"); slhaRead("HB.out",1+4); printf("HB result= %.0E obsratio=%.2E\n",slhaValFormat("HiggsBoundsResults",0.,"1 2 %lf"), slhaValFormat("HiggsBoundsResults",0.,"1 3 %lf" ) ); { char hbInfo[100]; if(0==slhaSTRFormat("HiggsBoundsResults","1 5 ||%[^|]||",hbInfo)) printf("Channel: %s\n",hbInfo); } #endif #ifdef HIGGSSIGNALS #define DataSet " latestresults " //#define Method " peak " //#define Method " mass " #define Method " both " #define PDF " 2 " // Gaussian //#define PDF " 1 " // box //#define PDF " 3 " // box+Gaussia #define dMh " 2 " printf("HiggsSignals:\n"); if(access(HIGGSSIGNALS "/HiggsSignals",X_OK )) system( "cd " HIGGSSIGNALS "; ./configure; make "); system("rm -f HS.in HS.out"); HBblocks("HS.in"); system(HIGGSSIGNALS "/HiggsSignals" DataSet Method PDF " SLHA 1 0 HS.in > hs.stdout"); system("grep -A 10000 HiggsSignalsResults HS.in > HS.out"); slhaRead("HS.out",1+4); printf(" Number of observables %.0f\n",slhaVal("HiggsSignalsResults",0.,1,7)); printf(" total chi^2= %.1E\n",slhaVal("HiggsSignalsResults",0.,1,12)); printf(" HS p-value = %.1E\n", slhaVal("HiggsSignalsResults",0.,1,13)); #undef dMh #undef PDF #undef Method #undef DataSet #endif #ifdef OMEGA { int fast=1; double Beps=1.E-5, cut=0.01; double Omega,Xf; int i; // to exclude processes with virtual W/Z in DM annihilation VZdecay=0; VWdecay=0; cleanDecayTable(); // to include processes with virtual W/Z also in co-annihilation // VZdecay=2; VWdecay=2; cleanDecayTable(); printf("\n==== Calculation of relic density =====\n"); Omega=darkOmega(&Xf,fast,Beps); printf("Xf=%.2e Omega=%.2e\n",Xf,Omega); printChannels(Xf,cut,Beps,1,stdout); // VZdecay=1; VWdecay=1; cleanDecayTable(); // restore default } #endif #ifdef INDIRECT_DETECTION { int err,i; double Emin=1,/* Energy cut in GeV */ sigmaV; double vcs_gz,vcs_gg; char txt[100]; double SpA[NZ],SpE[NZ],SpP[NZ]; double FluxA[NZ],FluxE[NZ],FluxP[NZ]; double * SpNe=NULL,*SpNm=NULL,*SpNl=NULL; double Etest=Mcdm/2; printf("\n==== Indirect detection =======\n"); sigmaV=calcSpectrum(4,SpA,SpE,SpP,SpNe,SpNm,SpNl ,&err); /* Returns sigma*v in cm^3/sec. SpX - calculated spectra of annihilation. Use SpectdNdE(E, SpX) to calculate energy distribution in 1/GeV units. First parameter 1-includes W/Z polarization 2-includes gammas for 2->2+gamma 4-print cross sections */ printf("sigmav=%.2E[cm^3/s]\n",sigmaV); if(SpA) { double fi=0.1,dfi=0.05; /* angle of sight and 1/2 of cone angle in [rad] */ gammaFluxTab(fi,dfi, sigmaV, SpA, FluxA); printf("Photon flux for angle of sight f=%.2f[rad]\n" "and spherical region described by cone with angle %.2f[rad]\n",fi,2*dfi); #ifdef SHOWPLOTS sprintf(txt,"Photon flux[cm^2 s GeV]^{1} at f=%.2f[rad], cone angle %.2f[rad]",fi,2*dfi); displaySpectrum(FluxA,txt,Emin,Mcdm); #endif printf("Photon flux = %.2E[cm^2 s GeV]^{-1} for E=%.1f[GeV]\n",SpectdNdE(Etest, FluxA), Etest); } if(SpE) { posiFluxTab(Emin, sigmaV, SpE, FluxE); #ifdef SHOWPLOTS displaySpectrum(FluxE,"positron flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm); #endif printf("Positron flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxE), Etest); } if(SpP) { pbarFluxTab(Emin, sigmaV, SpP, FluxP ); #ifdef SHOWPLOTS displaySpectrum(FluxP,"antiproton flux [cm^2 s sr GeV]^{-1}" ,Emin, Mcdm); #endif printf("Antiproton flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxP), Etest); } } #endif #ifdef RESET_FORMFACTORS { /* The user has approach to form factors which specifies quark contents of proton and nucleon via global parametes like <Type>FF<Nucleon><q> where <Type> can be "Scalar", "pVector", and "Sigma"; <Nucleon> "P" or "N" for proton and neutron <q> "d", "u","s" calcScalarFF( Mu/Md, Ms/Md, sigmaPiN[MeV], sigma0[MeV]) calculates and rewrites Scalar form factors */ printf("\n======== RESET_FORMFACTORS ======\n"); printf("protonFF (default) d %.2E, u %.2E, s %.2E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(default) d %.2E, u %.2E, s %.2E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); // To restore default form factors of version 2 call // calcScalarQuarkFF(0.553,18.9,55.,243.5); calcScalarFF(0.553,18.9,70.,35.); printf("protonFF (new) d %.2E, u %.2E, s %.2E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(new) d %.2E, u %.2E, s %.2E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); } #endif #ifdef CDM_NUCLEON { double pA0[2],pA5[2],nA0[2],nA5[2]; double Nmass=0.939; /*nucleon mass*/ double SCcoeff; int i; printf("\n==== Calculation of CDM-nucleons amplitudes =====\n"); nucleonAmplitudes(CDM1,NULL, pA0,pA5,nA0,nA5); printf("CDM[antiCDM]-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E [%.3E] SD %.3E [%.3E]\n",pA0[0], pA0[1], pA5[0], pA5[1] ); printf("neutron: SI %.3E [%.3E] SD %.3E [%.3E]\n",nA0[0], nA0[1], nA5[0], nA5[1] ); SCcoeff=4/M_PI*3.8937966E8*pow(Nmass*Mcdm/(Nmass+ Mcdm),2.); printf("CDM[antiCDM]-nucleon cross sections[pb]:\n"); printf(" proton SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*pA0[0]*pA0[0],SCcoeff*pA0[1]*pA0[1],3*SCcoeff*pA5[0]*pA5[0],3*SCcoeff*pA5[1]*pA5[1]); printf(" neutron SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*nA0[0]*nA0[0],SCcoeff*nA0[1]*nA0[1],3*SCcoeff*nA5[0]*nA5[0],3*SCcoeff*nA5[1]*nA5[1]); } #endif #ifdef CDM_NUCLEUS { double dNdE[300]; double nEvents; printf("\n======== Direct Detection ========\n"); nEvents=nucleusRecoil(Maxwell,73,Z_Ge,J_Ge73,SxxGe73,NULL,dNdE); printf("73Ge: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 73Ge",0,199); #endif nEvents=nucleusRecoil(Maxwell,131,Z_Xe,J_Xe131,SxxXe131,NULL,dNdE); printf("131Xe: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 131Xe",0,199); #endif nEvents=nucleusRecoil(Maxwell,23,Z_Na,J_Na23,SxxNa23,NULL,dNdE); printf("23Na: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 23Na",0,199); #endif nEvents=nucleusRecoil(Maxwell,127,Z_I,J_I127,SxxI127,NULL,dNdE); printf("I127: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 127I",0,199); #endif } #endif #ifdef NEUTRINO { double nu[NZ], nu_bar[NZ],mu[NZ]; double Ntot; int forSun=1; double Emin=0.01; printf("\n===============Neutrino Telescope======= for "); if(forSun) printf("Sun\n"); else printf("Earth\n"); err=neutrinoFlux(Maxwell,forSun, nu,nu_bar); #ifdef SHOWPLOTS displaySpectrum(nu,"nu flux from Sun [1/Year/km^2/GeV]",Emin,Mcdm); displaySpectrum(nu_bar,"nu-bar from Sun [1/Year/km^2/GeV]",Emin,Mcdm); #endif { double Ntot; double Emin=10; //GeV spectrInfo(Emin/Mcdm,nu, &Ntot,NULL); printf(" E>%.1E GeV neutrino flux %.3E [1/Year/km^2] \n",Emin,Ntot); spectrInfo(Emin/Mcdm,nu_bar, &Ntot,NULL); printf(" E>%.1E GeV anti-neutrino flux %.3E [1/Year/km^2]\n",Emin,Ntot); } /* Upward events */ muonUpward(nu,nu_bar, mu); #ifdef SHOWPLOTS displaySpectrum(mu,"Upward muons[1/Year/km^2/GeV]",1,Mcdm/2); #endif { double Ntot; double Emin=1; //GeV spectrInfo(Emin/Mcdm,mu, &Ntot,NULL); printf(" E>%.1E GeV Upward muon flux %.3E [1/Year/km^2]\n",Emin,Ntot); } /* Contained events */ muonContained(nu,nu_bar,1., mu); #ifdef SHOWPLOTS displaySpectrum(mu,"Contained muons[1/Year/km^3/GeV]",Emin,Mcdm); #endif { double Ntot; double Emin=1; //GeV spectrInfo(Emin/Mcdm,mu, &Ntot,NULL); printf(" E>%.1E GeV Contained muon flux %.3E [1/Year/km^3]\n",Emin,Ntot); } } #endif #ifdef DECAYS { txtList L; double width,br; char * pname; printf("\n================= Decays ==============\n"); pname = "H"; width=pWidth(pname,&L); printf("\n%s : total width=%.2E \n and Branchings:\n",pname,width); printTxtList(L,stdout); pname = "~W+"; width=pWidth(pname,&L); printf("\n%s : total width=%.2E \n and Branchings:\n",pname,width); printTxtList(L,stdout); } #endif #ifdef CLEAN system("rm -f HB.in HB.out HS.in HS.out hb.stdout hs.stdout debug_channels.txt debug_predratio.txt Key.dat"); killPlots(); #endif return 0; }
int main(int argc,char** argv) { int err; char cdmName[10]; int spin2, charge3,cdim; ForceUG=0; /* to Force Unitary Gauge assign 1 */ if(argc< 2) { printf(" Correct usage: ./main <file with parameters> \n"); printf("Example: ./main data1.par \n"); exit(1); } err=readVar(argv[1]); if(err==-1) {printf("Can not open the file\n"); exit(1);} else if(err>0) { printf("Wrong file contents at line %d\n",err);exit(1);} err=sortOddParticles(cdmName); if(err) { printf("Can't calculate %s\n",cdmName); return 1;} qNumbers(cdmName, &spin2, &charge3, &cdim); printf("\nDark matter candidate is '%s' with spin=%d/2\n", cdmName, spin2); if(charge3) { printf("Dark Matter has electric charge %d*3\n",charge3); exit(1);} if(cdim!=1) { printf("Dark Matter ia a color particle\n"); exit(1);} #ifdef MASSES_INFO { printf("\n=== MASSES OF HIGG AND ODD PARTICLES: ===\n"); printHiggs(stdout); printMasses(stdout,1); } #endif #ifdef OMEGA { int fast=1; double Beps=1.E-5, cut=0.0001; double Omega,Xf; // deltaY=4.4E-13; // to exclude processes with virtual W/Z in DM annihilation VZdecay=0; VWdecay=0; cleanDecayTable(); // to include processes with virtual W/Z also in co-annihilation // VZdecay=2; VWdecay=2; cleanDecayTable(); printf("\n==== Calculation of relic density =====\n"); Omega=darkOmega(&Xf,fast,Beps); printf("Xf=%.2e Omega=%.2e\n",Xf,Omega); printChannels(Xf,cut,Beps,1,stdout); VZdecay=1; VWdecay=1; cleanDecayTable(); // restore default } #endif #ifdef INDIRECT_DETECTION { int err,i; double Emin=1,/* Energy cut in GeV */ sigmaV; double vcs_gz,vcs_gg; char txt[100]; double SpA[NZ],SpE[NZ],SpP[NZ]; double FluxA[NZ],FluxE[NZ],FluxP[NZ]; double * SpNe=NULL,*SpNm=NULL,*SpNl=NULL; double Etest=Mcdm/2; printf("\n==== Indirect detection =======\n"); sigmaV=calcSpectrum(4,SpA,SpE,SpP,SpNe,SpNm,SpNl ,&err); /* Returns sigma*v in cm^3/sec. SpX - calculated spectra of annihilation. Use SpectdNdE(E, SpX) to calculate energy distribution in 1/GeV units. First parameter 1-includes W/Z polarization 2-includes gammas for 2->2+gamma 4-print cross sections */ printf("sigmav=%.2E[cm^3/s] = %.2E[pb] \n", sigmaV, sigmaV/2.9979E-26); if(SpA) { double fi=0.1,dfi=0.05; /* angle of sight and 1/2 of cone angle in [rad] */ gammaFluxTab(fi,dfi, sigmaV, SpA, FluxA); printf("Photon flux for angle of sight f=%.2f[rad]\n" "and spherical region described by cone with angle %.2f[rad]\n",fi,2*dfi); #ifdef SHOWPLOTS sprintf(txt,"Photon flux[cm^2 s GeV]^{1} at f=%.2f[rad], cone angle %.2f[rad]",fi,2*dfi); displaySpectrum(FluxA,txt,Emin,Mcdm); #endif printf("Photon flux = %.2E[cm^2 s GeV]^{-1} for E=%.1f[GeV]\n",SpectdNdE(Etest, FluxA), Etest); } if(SpE) { posiFluxTab(Emin, sigmaV, SpE, FluxE); #ifdef SHOWPLOTS displaySpectrum(FluxE,"positron flux [cm^2 s sr GeV]^{-1}" ,Emin,Mcdm); #endif printf("Positron flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxE), Etest); } if(SpP) { pbarFluxTab(Emin, sigmaV, SpP, FluxP ); #ifdef SHOWPLOTS displaySpectrum(FluxP,"antiproton flux [cm^2 s sr GeV]^{-1}" ,Emin, Mcdm); #endif printf("Antiproton flux = %.2E[cm^2 sr s GeV]^{-1} for E=%.1f[GeV] \n", SpectdNdE(Etest, FluxP), Etest); } } #endif #ifdef RESET_FORMFACTORS { /* The user has approach to form factors which specifies quark contents of proton and nucleon via global parametes like <Type>FF<Nucleon><q> where <Type> can be "Scalar", "pVector", and "Sigma"; <Nucleon> "P" or "N" for proton and neutron <q> "d", "u","s" calcScalarQuarkFF( Mu/Md, Ms/Md, sigmaPiN[MeV], sigmaS[MeV]) calculates and rewrites Scalar form factors */ printf("\n======== RESET_FORMFACTORS ======\n"); printf("protonFF (default) d %.2E, u %.2E, s %.2E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(default) d %.2E, u %.2E, s %.2E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); calcScalarQuarkFF(0.46,27.5,34.,42.); // To restore default form factors of version 2 call // calcScalarQuarkFF(0.553,18.9,55.,243.5); printf("protonFF (new) d %.2E, u %.2E, s %.2E\n",ScalarFFPd, ScalarFFPu,ScalarFFPs); printf("neutronFF(new) d %.2E, u %.2E, s %.2E\n",ScalarFFNd, ScalarFFNu,ScalarFFNs); } #endif #ifdef CDM_NUCLEON { double pA0[2],pA5[2],nA0[2],nA5[2]; double Nmass=0.939; /*nucleon mass*/ double SCcoeff; printf("\n==== Calculation of CDM-nucleons amplitudes =====\n"); nucleonAmplitudes(CDM1,NULL, pA0,pA5,nA0,nA5); printf("CDM[antiCDM]-nucleon micrOMEGAs amplitudes:\n"); printf("proton: SI %.3E [%.3E] SD %.3E [%.3E]\n",pA0[0], pA0[1], pA5[0], pA5[1] ); printf("neutron: SI %.3E [%.3E] SD %.3E [%.3E]\n",nA0[0], nA0[1], nA5[0], nA5[1] ); SCcoeff=4/M_PI*3.8937966E8*pow(Nmass*Mcdm/(Nmass+ Mcdm),2.); printf("CDM[antiCDM]-nucleon cross sections[pb]:\n"); printf(" proton SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*pA0[0]*pA0[0],SCcoeff*pA0[1]*pA0[1],3*SCcoeff*pA5[0]*pA5[0],3*SCcoeff*pA5[1]*pA5[1]); printf(" neutron SI %.3E [%.3E] SD %.3E [%.3E]\n", SCcoeff*nA0[0]*nA0[0],SCcoeff*nA0[1]*nA0[1],3*SCcoeff*nA5[0]*nA5[0],3*SCcoeff*nA5[1]*nA5[1]); } #endif #ifdef CDM_NUCLEUS { double dNdE[300]; double nEvents; printf("\n======== Direct Detection ========\n"); nEvents=nucleusRecoil(Maxwell,73,Z_Ge,J_Ge73,SxxGe73,NULL,dNdE); printf("73Ge: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 73Ge",0,199); #endif nEvents=nucleusRecoil(Maxwell,131,Z_Xe,J_Xe131,SxxXe131,NULL,dNdE); printf("131Xe: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 131Xe",0,199); #endif nEvents=nucleusRecoil(Maxwell,23,Z_Na,J_Na23,SxxNa23,NULL,dNdE); printf("23Na: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 23Na",0,199); #endif nEvents=nucleusRecoil(Maxwell,127,Z_I,J_I127,SxxI127,NULL,dNdE); printf("I127: Total number of events=%.2E /day/kg\n",nEvents); printf("Number of events in 10 - 50 KeV region=%.2E /day/kg\n", cutRecoilResult(dNdE,10,50)); #ifdef SHOWPLOTS displayRecoilPlot(dNdE,"Distribution of recoil energy of 127I",0,199); #endif } #endif #ifdef NEUTRINO { double nu[NZ], nu_bar[NZ],mu[NZ]; double Ntot; int forSun=1; double Emin=0.01; printf("\n===============Neutrino Telescope======= for "); if(forSun) printf("Sun\n"); else printf("Earth\n"); err=neutrinoFlux(Maxwell,forSun, nu,nu_bar); #ifdef SHOWPLOTS displaySpectrum(nu,"nu flux from Sun [1/Year/km^2/GeV]",Emin,Mcdm); displaySpectrum(nu_bar,"nu-bar from Sun [1/Year/km^2/GeV]",Emin,Mcdm); #endif { double Ntot; double Emin=10; //GeV spectrInfo(Emin/Mcdm,nu, &Ntot,NULL); printf(" E>%.1E GeV neutrino flux %.3E [1/Year/km^2] \n",Emin,Ntot); spectrInfo(Emin/Mcdm,nu_bar, &Ntot,NULL); printf(" E>%.1E GeV anti-neutrino flux %.3E [1/Year/km^2]\n",Emin,Ntot); } /* Upward events */ muonUpward(nu,nu_bar, mu); #ifdef SHOWPLOTS displaySpectrum(mu,"Upward muons[1/Year/km^2/GeV]",1,Mcdm/2); #endif { double Ntot; double Emin=1; //GeV spectrInfo(Emin/Mcdm,mu, &Ntot,NULL); printf(" E>%.1E GeV Upward muon flux %.3E [1/Year/km^2]\n",Emin,Ntot); } /* Contained events */ muonContained(nu,nu_bar,1., mu); #ifdef SHOWPLOTS displaySpectrum(mu,"Contained muons[1/Year/km^3/GeV]",Emin,Mcdm); #endif { double Ntot; double Emin=1; //GeV spectrInfo(Emin/Mcdm,mu, &Ntot,NULL); printf(" E>%.1E GeV Contained muon flux %.3E [1/Year/km^3]\n",Emin,Ntot); } } #endif #ifdef DECAYS { txtList L; double width,br; char * pname; printf("\n================= Decays ==============\n"); pname = "h"; width=pWidth(pname,&L); printf("\n%s : total width=%.3E \n and Branchings:\n",pname,width); printTxtList(L,stdout); pname = "~L"; width=pWidth(pname,&L); printf("\n%s : total width=%.3E \n and Branchings:\n",pname,width); printTxtList(L,stdout); } #endif #ifdef CROSS_SECTIONS { double v0=0.001, Pcm=Mcdm*v0/2,cs; int err; numout*cc; cc=newProcess("~n,~N->W+,W-"); passParameters(cc); cs=v0*cs22(cc,1,0.001*Mcdm/2,-1.,1.,&err); printf("cs=%e\n",cs); } #endif killPlots(); return 0; }
double aWidth(char * pName) { int dim; txtList LL; return pWidth(pName,&LL,&dim); }