Commit ab683bdc authored by Silvan Kuttimalai's avatar Silvan Kuttimalai

Fixed UFO/HADRONS++ interplay

parent 451e53d2
......@@ -248,6 +248,55 @@ std::string Flavour::ShellName() const
return name;
}
// Shell names used to recover decay data file
// names. Used by HADRONS::Hadron_Decay_Table
std::string Flavour::LegacyShellName() const
{
if(!m_anti){
switch (Kfcode()){
case kf_d: return "d";
case kf_u: return "u";
case kf_s: return "s";
case kf_c: return "c";
case kf_b: return "b";
case kf_t: return "t";
case kf_e: return "e-";
case kf_nue: return "nu_e";
case kf_mu: return "mu-";
case kf_numu: return "nu_mu";
case kf_tau: return "tau-";
case kf_nutau: return "nu_tau";
case kf_gluon: return "G";
case kf_photon: return "P";
case kf_Z: return "Z";
case kf_Wplus: return "W+";
case kf_h0: return "h0";
}
}
else{
switch (Kfcode()){
case kf_d: return "db";
case kf_u: return "ub";
case kf_s: return "sb";
case kf_c: return "cb";
case kf_b: return "bb";
case kf_t: return "tb";
case kf_e: return "e+";
case kf_nue: return "nu_eb";
case kf_mu: return "mu+";
case kf_numu: return "nu_mub";
case kf_tau: return "tau+";
case kf_nutau: return "nu_taub";
case kf_gluon: return "G";
case kf_photon: return "P";
case kf_Z: return "Z";
case kf_Wplus: return "W-";
case kf_h0: return "h0";
}
}
return ShellName();
}
std::string Flavour::IDName() const
{
return m_anti?p_info->m_antiname:p_info->m_idname;
......
......@@ -126,6 +126,7 @@ namespace ATOOLS {
// member functions
std::string IDName() const;
std::string ShellName() const;
std::string LegacyShellName() const;
std::string TexName() const;
std::string RootName() const;
......
......@@ -145,8 +145,8 @@ void Hadron_Decay_Table::Read(std::string path, std::string file)
}
Hadron_Decay_Channel* hdc = new Hadron_Decay_Channel(Flav(),p_ms,path);
hdc->AddDecayProduct(spec,false);
std::string filename=m_flin.ShellName();
filename += "_"+spec.ShellName();
std::string filename=m_flin.LegacyShellName();
filename += "_"+spec.LegacyShellName();
msg_Tracking()<<" Add partonic decay: "<<Flav()<<" --> ";
for (size_t j=0;j<(*dectable)[i]->NOut();j++) {
Flavour flav = (*dectable)[i]->GetDecayProduct(j);
......@@ -155,16 +155,12 @@ void Hadron_Decay_Table::Read(std::string path, std::string file)
hdc->AddDecayProduct(flav,false);
charge -= flav.IntCharge();
mass -= flav.HadMass();
filename += flav.ShellName();
filename += flav.LegacyShellName();
}
hdc->SetWidth(BR*partWidth);
hdc->SetDeltaWidth(0.);
hdc->SetOrigin("");
filename += ".dat";
// temporary hack to avoid filename changes in Decaydata.db
filename = StringReplace(filename, "ve", "nu_e");
filename = StringReplace(filename, "vmu", "nu_mu");
filename = StringReplace(filename, "vtau", "nu_tau");
msg_Tracking()<<" ---> "<<filename<<".\n";
hdc->SetFileName(filename);
AddDecayChannel(hdc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment