int main(int argc, char *argv[]) {

  int numPoints = 1;

  double qMax = 0.;
  
  // Sets format of output: 4 decimal places
  outputCharacteristics(6);

  void (*boundaryCondition)(MssmSoftsusy &, const DoubleVector &);
  

  
  if (argc !=1 ) {
    cerr << "GAUGE/GRAVITY" << endl; 
    cerr << "SOFTSUSY" << VERSION << endl;
    cerr << "B.C. Allanach, Comput. Phys. Commun. 143 (2002) 305-331,";
    cerr << " hep-ph/0104145\n";
    cerr << "Low energy data in SOFTSUSY: MIXING=" << MIXING << " TOLERANCE=" 
	 << TOLERANCE << endl;
    cerr << "G_F=" << GMU << " GeV^2" << endl;
  }

  // RANDOM SEED /////////////////////
    time_t seconds;
    time( &seconds); 
    srand( (unsigned int) seconds ); 
  ////////////////////////////////////
  


  double mgutGuess = 2.0e16, mbmb = MBOTTOM, mtau = MTAU;
  int sgnMu = 1;
  bool gaugeUnification = false, ewsbBCscale = false, altEwsb = false;
  bool flag = false; 



  double M_moduli_start, M_moduli_end ;
  double M_gauge_start, M_gauge_end ; 
  double M_mess_start, M_mess_end ; 
  
  double M_moduli, M_gauge, M_mess ;
  
  double tanb_start, tanb_end ; 
  double tanb = 10; 
  DoubleVector pars(3); 
  // My modification 
 
 
  cout << "argc = " << argc << endl; 
  cout << flush ; 


  if(argc != 3 ) {
    errorCall() ;
    exit(-1) ;
  }
  /*   if (!strcmp(argv[1], "g-gmsb")) {
    cout << "SOFTSUSY Gauge/Gravity calculation" << endl;
    cout << flush;  */

  if( argc == 3 ) { 

    ifstream inputfile(argv[1]); 
    ofstream outputfile(argv[2]); 

    string varname; 
    
    inputfile >> varname >> l1 ; 

    cout << varname << endl; 

    inputfile >> varname >> l2 ; 
    inputfile >> varname >> l3 ; 

    inputfile >> varname >> nQ ; 
    inputfile >> varname >> nU ; 
    inputfile >> varname >> nD ; 
    inputfile >> varname >> nL ; 
    inputfile >> varname >> nE ;
 
    inputfile >> varname >> nHu ; 
    inputfile >> varname >> nHd ; 

    inputfile >> varname >> N ;
 
    inputfile >> varname >> numscan;
    inputfile >> varname >> M_moduli_start ; 
    inputfile >> varname >> M_moduli_end ; 
    inputfile >> varname >> M_gauge_start ; 
    inputfile >> varname >> M_gauge_end ; 
    inputfile >> varname >> M_mess_start   ; 
    inputfile >> varname >> M_mess_end   ; 
    inputfile >> varname >> tanb_start     ;
    inputfile >> varname >> tanb_end    ;

    inputfile >> varname >> sgnMu    ;
     
    inputfile.close(); 

    cout << "l1 = " << l1 << endl 
	 << "l2 = " << l2 << endl
	 << "l3 = " << l3 << endl 
	 << "nQ = " << nQ << endl 
       	 << "nU = " << nU << endl 
	 << "nD = " << nD << endl
	 << "nL = " << nL << endl 
	 << "nE = " << nE << endl 
	 << "nHu = " << nHu << endl 
	 << "nHd = " << nHd << endl 
	 << "N = " << N << endl 
	 << "numscan = " << numscan << endl
	 << "M_moduli_start = " << M_moduli_start << endl
	 << "M_moduli_end = " << M_moduli_end << endl
	 << "M_gauge_start = " << M_gauge_start << endl 
	 << "M_gauge_end = " << M_gauge_end << endl 
	 << "M_mess_start = " << M_mess_start << endl 
	 << "M_mess_end = " << M_mess_end << endl 
	 << "tanb_start =  " << tanb_start << endl 
	 << "tanb_end = " << tanb_end << endl
	 << "sgnMu = " << sgnMu << endl; 


    for( int i = 0 ; i < numscan ; i++ ) { 
      QedQcd oneset0, oneset1, oneset2;

      M_moduli = randomgenerator( M_moduli_start, M_moduli_end ) ; 
      M_gauge  = randomgenerator( M_gauge_start,  M_gauge_end ) ; 
      M_mess   = lograndomgenerator( M_mess_start,   M_mess_end ) ;
      tanb     = randomgenerator( tanb_start,     tanb_end ) ; 
      
      cout << i << "th run : " << endl ;  
      cout << "M_moduli = " << M_moduli << endl 
	   << "M_gauge  = " << M_gauge  << endl 
	   << "M_mess   = " << M_mess   << endl 
	   << "tanb     = " << tanb     << endl ; 
      
      mgutGuess = 2e16;
      gaugeUnification = false;
      pars.setEnd(3);
      pars(1) = M_moduli; pars(2) = M_gauge; pars(3) = M_mess;
      //      r = &m;
      
      //      if (flag) oneset0.calcPoleMb();
      oneset0.toMz();
      oneset1.toMz(); 
      oneset2.toMz(); 
      
      //      ofstream  rgefile; 
      //    rgefile.open("rge.dat"); 
      
      //   ofstream  spectrumfile; 
      //   spectrumfile.open("spectrum.dat") ;
      
      //      cout << "Here comes r1 " << endl; 
      
      MssmSoftsusy r0 ; 
      cout << "Starting" << endl; 
      r0.N= 0 ; 
      r0.Nflag = true; 
      r0.beta2() ;
      r0.Nflag = false; 
      
      double mgut =  r0.lowOrg(gaugegravityBcs0, mgutGuess, pars, sgnMu,
			       tanb, oneset0, gaugeUnification, ewsbBCscale);
      
      r0.runto( M_mess );
      
      cout << "starting phase 2 " << endl; 
      r0.N = N ;
      r0.Nflag = true; 
      r0.beta2() ; 
      r0.Nflag = false; 
      
      r0.runto( mgutGuess ) ; 
      
      global_g1 = r0.displayGaugeCoupling(1); 
      global_g2 = r0.displayGaugeCoupling(2); 
      global_g3 = r0.displayGaugeCoupling(3); 

      MssmSoftsusy r1 ; //, r2;// MssmSoftsusy2 l;
     
      r1.N = N ; 
      r1.Nflag = true; 
      r1.beta2(); 
      r1.Nflag = false ; 
      
      mgut =  r1.lowOrg(gaugegravityBcs1, mgutGuess, pars, sgnMu,
			tanb, oneset1, gaugeUnification, ewsbBCscale);
      
      
        cout << "Here comes r1" << endl; 
        cout << r1 ; 
      
    //  RGRUN( rgefile, r1 , log(mgutGuess) / log(10) , log( M_mess) / log( 10 ) , 20 ) ; 
      
      r1.runto( M_mess );
      
      global_g1 = r1.displayGaugeCoupling(1); 
      global_g2 = r1.displayGaugeCoupling(2); 
      global_g3 = r1.displayGaugeCoupling(3); 
      
      
      inter_gaugino1 = r1.displayGaugino(1); 
      inter_gaugino2 = r1.displayGaugino(2); 
      inter_gaugino3 = r1.displayGaugino(3); 
      
      inter_massmQl = r1.displaySoftMassSquared(mQl) ;
      inter_massmUr = r1.displaySoftMassSquared(mUr) ;
      inter_massmDr = r1.displaySoftMassSquared(mDr) ;
      inter_massmLl = r1.displaySoftMassSquared(mLl) ;
      inter_massmEr = r1.displaySoftMassSquared(mEr) ;
      inter_massmHu = r1.displayMh2Squared(); 
      inter_massmHd = r1.displayMh1Squared(); 
      
      inter_A_HuQU(1,1) = r1.displaySoftA( UA, 1, 1); 
      inter_A_HuQU(2,2) = r1.displaySoftA( UA, 2, 2); 
      inter_A_HuQU(3,3) = r1.displaySoftA( UA, 3, 3); 
      inter_A_HdQD(1,1) = r1.displaySoftA( DA, 1, 1); 
      inter_A_HdQD(2,2) = r1.displaySoftA( DA, 2, 2); 
      inter_A_HdQD(3,3) = r1.displaySoftA( DA, 3, 3); 
      inter_A_HdLE(1,1) = r1.displaySoftA( EA, 1, 1); 
      inter_A_HdLE(2,2) = r1.displaySoftA( EA, 2, 2); 
      inter_A_HdLE(3,3) = r1.displaySoftA( EA, 3, 3); 
      
      mgutGuess = M_mess ;
      
      
      cout << "Here comes r2" << endl; 
      MssmSoftsusy r2 ;
      r2.N = 0; 
      r2.Nflag = true; 
      r2.beta2(); 
      r2.Nflag = false ;
      
      mgut =  r2.lowOrg(gaugegravityBcs2, mgutGuess, pars, sgnMu, 
			tanb, oneset2, gaugeUnification, ewsbBCscale); 
      //    cout << r2 ; 
      
      //      RGRUN( rgefile, r2 , log(M_mess) / log(10),  log(100) / log(10), 20 ) ; 
      
      //rgefile.close(); 
      
      //spectrumrecord( spectrumfile, r2 ) ;
      
      // spectrumfile.close(); 
      
      cout << r2 ; 
      //  sPhysical p = r2.displayPhys() ;
      
      //  cout << p ; 
      
      ofstream tempfile("LesHouches.dat"); 
      streambuf* strm_buffer = cout.rdbuf(); 
      
      cout.rdbuf( tempfile.rdbuf() ) ; 
      
      r2.lesHouchesAccordOutput("nonUniversal", pars, 
				sgnMu, tanb, 0, 1, mbmb, 
				mtau, MGUTSCALE , 0 ) ; 
      cout << flush; 
      cout.rdbuf(strm_buffer); 
      tempfile.close(); 

      if (r2.displayProblem().test()) {
	cout << "# SOFTSUSY problem with point: " << r2.displayProblem();
      }      

      if( checktheresult( r2 ) ) { 
	
	//////////////////////////////////////////////////
	//                micrOmegas                    //
	//////////////////////////////////////////////////
	
	double Xf, Omega, Omega2, bsg_value, bsmumu_value, gmuon_value; 
	string mess; 
	double mtop ;
	
	int err ; 
	int fast = 1; 
	double Beps = 1E-6 ; 
	
	double cut = 0.01; 
	
	
	
	err = readLesH("LesHouches.dat",1); 
	
	//
	//  printVar(stdout); 
	//
	char messtemp[20]; 
	
	err=sortOddParticles(messtemp);
	mess = messtemp; 
	
	//	HiggsMasses(stdout);     
	//	printMasses(stdout,1);
	
	
	Omega=darkOmega(&Xf,fast,Beps);
	
	o1Contents(stdout);
	printChannels(Xf,cut,Beps,1,stdout); 
	bsg_value= bsgnlo_(); 
	bsmumu_value = bsmumu_(); 
	gmuon_value = gmuon_(); 
      
	recordphysics( outputfile, r2, M_moduli, M_gauge, M_mess, tanb, 
		       bsg_value, gmuon_value, bsmumu_value, Omega ) ; 
      }
      else {
	recordphysics( outputfile, r2, M_moduli, M_gauge, M_mess, tanb,
		       0, 0 , 0, 0 ) ; 
      }

    }

  }
Beispiel #2
0
void shortstory()
{
     FILE *trigram_file,*story_file;
     int n,wordlimit;
     char c;
     char str[MAX_WORDLENGTH];
     trigram_file=fopen("trigram.txt","r");
    if(trigram_file==NULL)
    {
                        perror("Trigram_file");
                        exit(0);
                        }
    story_file=fopen("story.txt","w");
    if(story_file==NULL)
    {
                        perror("story_file");
                        exit(0);
                        }
    n=randomgenerator();
    wordlimit=n%100+200;
    fseek(trigram_file,0,SEEK_END);
    n=n% (ftell(trigram_file));
    if(n%2)
    fseek(trigram_file,n,SEEK_SET);
    else
    fseek(trigram_file,-n,SEEK_END);
    while(fscanf(trigram_file,"%c",&c))
    {
                                         if(c=='.')
                                         break;
                                               }
    fscanf(trigram_file,"%s",str);
    fscanf(trigram_file,"%s",str);
    for(n=0;n<wordlimit;n++)
    {
                            if(fscanf(trigram_file,"%s",str)!=1)
                            break;
                            fprintf(story_file,"%s ",str);
                            fscanf(trigram_file,"%s",str);
                            fscanf(trigram_file,"%s",str);
                            }
    fscanf(trigram_file,"%c",&c);
                           
    while(fscanf(trigram_file,"%c",&c))
    {
                                                   fprintf(story_file,"%c",c);
                                                   if(c=='.')
                                                   break;
                                                   else if (c==' ')
                                                   {
                                                        fscanf(trigram_file,"%s",str);
                                                        fscanf(trigram_file,"%s",str);
                                                        fscanf(trigram_file,"%c",&c);
                                                        fprintf(story_file,"%c",c);
                                                        }
                                                                                                     
                                                   }
           
    printf("\n\nShort story created in the file story.txt");                        
    fclose(trigram_file);
    fclose(story_file);
}