partmap.cpp
Go to the documentation of this file.
70 void partmap::add_with_short_pair(str long_name, std::pair<int, int> pdgpr, std::pair<str, int> shortpr) 80 void partmap::add_SM_with_short_pair(str long_name, std::pair<int, int> pdgpr, std::pair<str, int> shortpr) 91 model_error().raise(LOCAL_INFO,"Particle long name "+long_name+" is not in the particle database."); 109 ss << "Short name " << short_name << " and index " << i << " are not in the particle database."; 122 ss << "Short name " << short_name << " and index " << i << " are not in the particle database."; 134 ss << "Particle with PDG code " << pdgpr.first << " and context integer " << pdgpr.second << " is not in the particle database."; 166 ss << "Particle with PDG code " << pdgpr.first << " and context integer " << pdgpr.second << " is not in the particle database."; 172 ss << "Particle with PDG code " << pdgpr.first << " and context integer " << pdgpr.second << " does not have a short name."; 307 //typedef std::map<std::pair<str, int>, std::pair<int, int> >::const_iterator it_short_name_pair_to_pdg_pair; 308 //typedef std::map<std::pair<int, int>, std::pair<str, int> >::const_iterator it_pdg_pair_to_short_name_pair; 312 for(it_long_name_to_pdg_pair it = long_name_to_pdg_pair.begin(); it != long_name_to_pdg_pair.end(); it++) { 315 { cout << " long_name_to_short_name_pair[" << it->first << "] => " << long_name_to_short_name_pair.at(it->first) << endl; } 317 { cout << " long_name_to_short_name_pair[" << it->first << "] => " << "Has no short name!" << endl; } 320 for(it_pdg_pair_to_long_name it = pdg_pair_to_long_name.begin(); it != pdg_pair_to_long_name.end(); it++) { 323 { cout << " pdg_pair_to_short_name[" << it->first << "] => " << pdg_pair_to_short_name_pair.at(it->first) << endl; } 328 for(it_short_name_pair_to_long_name it = short_name_pair_to_long_name.begin(); it != short_name_pair_to_long_name.end(); it++) { 330 cout << " short_name_pair_to_pdg_pair [" << it->first << "] => " << short_name_pair_to_pdg_pair.at(it->first) << endl; Define overloadings of the stream operator for various containers. bool has_short_name(str) const Check if a particle has a short name, using the long name. Definition: partmap.cpp:219 std::pair< str, int > short_name_pair(str) const Retrieve the short name and index, from the long name. Definition: partmap.cpp:147 std::map< std::pair< int, int >, std::pair< str, int > > pdg_pair_to_short_name_pair Map from PDG code and context integer to short name and index. Definition: partmap.hpp:151 str long_name(str, int) const Retrieve the long name, from the short name and index. Definition: partmap.cpp:116 void add_SM_with_short_pair(str, std::pair< int, int >, std::pair< str, int >) Add a new Standard Model particle to the database with a short name and an index. ... Definition: partmap.cpp:80 std::vector< std::pair< int, int > > SM All SM particles in the database, by PDG code and context integer. Definition: partmap.hpp:141 void add_SM(str, std::pair< int, int >) Add a new Standard Model particle to the database. Definition: partmap.cpp:56 std::pair< int, int > pdg_pair(str) const Retrieve the PDG code and context integer, from the long name. Definition: partmap.cpp:87 std::map< std::pair< int, int >, str > pdg_pair_to_long_name Map from PDG code and context integer to long name. Definition: partmap.hpp:147 bool has_antiparticle(str) const Check if a particle has a matching anti-particle in the database, using the long name. Definition: partmap.cpp:269 str get_antiparticle(str) const Get the matching anti-particle long name for a particle in the database, using the long name... Definition: partmap.cpp:231 const std::vector< std::pair< int, int > > & get_generic_particles() const Get a vector PDG codes and context integers of generic particle classes in the database. Definition: partmap.cpp:191 bool has_particle(str) const Check if a particle is in the database, using the long name. Definition: partmap.cpp:197 void add_with_short_pair(str, std::pair< int, int >, std::pair< str, int >) Add a new particle to the database with a short name and an index. Definition: partmap.cpp:70 std::map< std::pair< str, int >, str > short_name_pair_to_long_name Map from short name and index to long name. Definition: partmap.hpp:155 Definition: partmap.hpp:33 const std::vector< std::pair< int, int > > & get_SM_particles() const Get a vector PDG codes and context integers of Standard Model particles in the database. Definition: partmap.cpp:185 std::map< str, std::pair< int, int > > long_name_to_pdg_pair Map from long name to PDG code and context integer. Definition: partmap.hpp:145 Class definitions for GAMBIT particle database. Exception objects required for standalone compilation. std::map< std::pair< str, int >, std::pair< int, int > > short_name_pair_to_pdg_pair Map from short name and index to PDG code and context integer. Definition: partmap.hpp:149 void check_contents() const For debugging: use to check the contents of the particle database. Definition: partmap.cpp:301 void add_generic(str, std::pair< int, int >) Add a new generic particle class to the database. Definition: partmap.cpp:63 std::map< str, std::pair< str, int > > long_name_to_short_name_pair Map from long name to short name and index. Definition: partmap.hpp:153 |