예제 #1
0
void Hard_Decay_Handler::ReadDecayTable(Flavour decayer)
{
  DEBUG_FUNC(decayer);
  if (!m_store_results) return;
  Data_Reader reader = Data_Reader("|",";","!");
  reader.SetAddCommandLine(false);
  reader.AddComment("#");
  reader.AddComment("//");
  reader.AddWordSeparator("\t");
  reader.SetInputPath(m_resultdir);
  reader.SetInputFile(decayer.ShellName());
  
  vector<vector<string> > file;
  if(reader.MatrixFromFile(file)) {
    for (size_t iline=0; iline<file.size(); ++iline) {
      if (file[iline].size()==4) {
        string decaychannel=file[iline][0];
        vector<double> results(3);
        for (size_t i=0; i<3; ++i) results[i]=ToType<double>(file[iline][i+1]);
        m_read[decayer].insert(make_pair(decaychannel, results));
      }
      else {
        PRINT_INFO("Wrong format in decay table in "<<m_resultdir);
      }
    }
  }
}
예제 #2
0
void FeynRules_Model::ParticleInit() {
  m_partfile = p_dataread->GetValue<string>("FR_PARTICLES",std::string("Particle.dat"));
  Data_Reader reader = Data_Reader(" ",";","!","=");
  p_dataread->AddComment("#");
  reader.AddWordSeparator("\t");
  reader.SetAddCommandLine(false);
  reader.SetInputPath(m_dir);
  reader.SetInputFile(m_partfile);
  
  kf_code kfc;
  int     charge,icharge,spin,strong,Majorana;
  bool    Take,stable,massive;
  double  mass,width;
  std::string idname, texname;
  
  if (!reader.OpenInFile()) {
    msg_Error()<<METHOD<<"(): FeynRules particle data file '"
	       <<m_partfile<<"' not found."<<std::endl;
    return;
  }
  std::vector<std::vector<std::string> > helpsvv;
  reader.MatrixFromFile(helpsvv);
  for(size_t i(1);i<helpsvv.size();++i) {
    if (helpsvv[i].size()!=13) {
      msg_Error()<<METHOD<<"(): Inconsistent entry in line "<<i
  		 <<" of '"<<reader.InputFile()<<"'."<<std::endl;
      continue;
    }

    if (helpsvv[i][0]==std::string("kf")) continue;

    kfc=ToType<int>(helpsvv[i][0]); 
    mass=ToType<double>(helpsvv[i][1]); width=ToType<double>(helpsvv[i][2]);
    charge=ToType<int>(helpsvv[i][3]); icharge=ToType<int>(helpsvv[i][4]);
    strong=ToType<int>(helpsvv[i][5]); spin=ToType<int>(helpsvv[i][6]);
    Majorana=ToType<int>(helpsvv[i][7]); Take=ToType<int>(helpsvv[i][8]);
    stable=ToType<int>(helpsvv[i][9]); massive=ToType<int>(helpsvv[i][10]);
    idname=helpsvv[i][11]; texname=helpsvv[i][12];
    s_kftable[kfc] = new Particle_Info(kfc,mass,width,charge,icharge,strong,spin,
				       Majorana,Take,stable,massive,idname,texname);
  }
  ReadParticleData();
  
  // add containers
  s_kftable[kf_none] = new
    Particle_Info(kf_none,-1,0,0,0,0,0,-1,0,1,0,"no_particle","no particle",0,1);
  s_kftable[kf_resummed] = new
    Particle_Info(kf_resummed,0.,0.,0,0,1,2,0,1,1,0,"r","resummed",0,1);
  s_kftable[kf_bjet] = new
    Particle_Info(kf_bjet,0.,0.,0,0,1,2,0,1,1,0,"bj","bjet",0,1);

  s_kftable[kf_fermion] = new
    Particle_Info(kf_fermion,0.,0., 0,0,0,1,0,1,1,0,"fermion","fermion",0,1);
  s_kftable[kf_jet] = new
    Particle_Info(kf_jet,0.,0.,0,0,1, 2,0,1,1,0,"j","jet",0,1);
  s_kftable[kf_quark] = new
    Particle_Info(kf_quark,0.,0.,0, 0,1,1,0,1,1,0,"Q","Quark",0,1);
  s_kftable[kf_lepton] = new
    Particle_Info(kf_lepton,0.,0.,-3,-1,0,1,0,1,1,0,"lepton","lepton",0,1);
  s_kftable[kf_neutrino] = new
    Particle_Info(kf_neutrino,0.,0.,0,1,0, 1,0,1,1,0,"neutrino","neutrino",0,1);
  s_kftable[kf_fermion]->Clear();
  s_kftable[kf_jet]->Clear();
  s_kftable[kf_resummed]->Clear();
  s_kftable[kf_resummed]->m_resummed=true;
  s_kftable[kf_quark]->Clear();
  s_kftable[kf_lepton]->Clear();
  s_kftable[kf_neutrino]->Clear();
  for (int i=1;i<7;i++) {
    Flavour addit((kf_code)i);
    if (addit.Mass()==0.0 || (!addit.IsMassive() && addit.IsOn())) {
      s_kftable[kf_jet]->Add(addit);
      s_kftable[kf_jet]->Add(addit.Bar());
      s_kftable[kf_quark]->Add(addit);
      s_kftable[kf_quark]->Add(addit.Bar());
      s_kftable[kf_fermion]->Add(addit);
      s_kftable[kf_fermion]->Add(addit.Bar());
    }
  }
  s_kftable[kf_jet]->Add(Flavour(kf_gluon));
  s_kftable[kf_jet]->SetResummed();
  for (int i=11;i<17;i+=2) {
    Flavour addit((kf_code)i);
    if (addit.Mass()==0.0 || (!addit.IsMassive() && addit.IsOn())) {
      s_kftable[kf_lepton]->Add(addit);
      s_kftable[kf_lepton]->Add(addit.Bar());
      s_kftable[kf_fermion]->Add(addit);
      s_kftable[kf_fermion]->Add(addit.Bar());
    }
  }
  for (int i=12;i<18;i+=2) {
    Flavour addit((kf_code)i);
    if (addit.Mass()==0.0 && addit.IsOn()) {
      s_kftable[kf_neutrino]->Add(addit);
      s_kftable[kf_neutrino]->Add(addit.Bar());
      s_kftable[kf_fermion]->Add(addit);
      s_kftable[kf_fermion]->Add(addit.Bar());
    }
  }
}