#include "SHERPA/SoftPhysics/Hadron_Init.H" #include "ATOOLS/Org/Message.H" #include "ATOOLS/Org/Scoped_Settings.H" #include "ATOOLS/Phys/Flavour_Tags.H" using namespace SHERPA; using namespace ATOOLS; using namespace std; void Hadron_Init::Init() { msg_Info()<m_majorana=-1; m_addedhadrons.insert(kfc); } void Hadron_Init::InitHadron(const kf_code& kfc, const double &mass, const double &radius, const double &width, const int icharge, const int strong, const int spin, const bool majorana, const bool on, const int stable, const bool massive, const std::string& idname, const std::string& antiname, const std::string& texname, const std::string& antitexname) { s_kftable[kfc]= new Particle_Info(kfc, mass, radius, width, icharge, strong, spin, majorana, on, stable, massive, idname, antiname, texname, antitexname); m_addedhadrons.insert(kfc); } void Hadron_Init::OverrideProperties() { auto pdata = Settings::GetMainSettings()["PARTICLE_DATA"]; for (const auto& ptclname : pdata.GetKeys()) { kf_code kf = ToType(ptclname); if (m_addedhadrons.find(kf) == m_addedhadrons.end()) continue; const auto it = s_kftable.find(kf); if (it != s_kftable.end()) { for (const auto& propertyname : pdata[ptclname].GetKeys()) { auto s = pdata[ptclname][propertyname]; if (propertyname == "Mass") { it->second->m_mass = s.SetDefault(it->second->m_mass).Get(); } else if (propertyname == "Width") { it->second->m_width = s.SetDefault(it->second->m_width).Get(); } else if (propertyname == "Active") { it->second->m_on = s.SetDefault(it->second->m_on).Get(); } else if (propertyname == "Stable") { it->second->m_stable = s.SetDefault(it->second->m_stable).Get(); } else if (propertyname == "Massive") { it->second->m_massive = s.SetDefault(it->second->m_massive).Get(); } } } } }