17#include <boost/algorithm/string.hpp>
37 const std::string s_EMPTY =
"";
102 addCC(
"ShortLived" );
103 addCC(
"LongLived" );
104 addCC(
"ShortLived_" );
105 addCC(
"LongLived_" );
130 const std::string& ccsym ) {
133 auto ifind =
m_nodes.find( sym );
134 if (
m_nodes.end() != ifind ) {
return false; }
136 bool inserted =
m_nodes.insert( sym, node ).second;
137 if ( !inserted ) {
return false; }
151 boost::trim( ccsym );
152 if ( ccsym.empty() ) { ccsym = sym; }
154 if ( ccsym != sym ) {
m_cc[ccsym] = sym; }
167 if (
m_nodes.end() == ifind ) {
return s_EMPTY; }
168 HelpMap::const_iterator ihelp =
m_help.find( sym );
169 if (
m_help.end() == ihelp ) {
return s_EMPTY; }
170 return ihelp->second;
180 auto ifind =
m_nodes.find( sym );
181 if (
m_nodes.end() != ifind ) {
182 node = ifind->second;
192 for (
auto inode =
m_nodes.begin();
m_nodes.end() != inode; ++inode ) { names.push_back( inode->first ); }
209 auto begin = service->
begin();
210 auto end = service->
end();
211 for ( ; end != begin; ++begin ) {
213 if ( !pp ) {
continue; }
214 parts.push_back( pp->particle() );
The generic class to hold the pointer to other node.
the most simple node in the decay tree: it matches to all valid the Gaudi::Particles
The trivial node : it match the Baryon.
The trivial node : it match the Charged.
The trivial node : it match any charged lepton.
The trivial node : it match any negative lepton.
The trivial node : it match any positive lepton.
The trivial node : it match the Hadron.
The trivial node : it match the quark content.
the most simple node to represent the invalid node it matches to all valid the Gaudi::Particles
The trivial node : it match the 2J+1 spin.
The trivial node : it match the Lepton.
The trivial node : it match the meson.
The trivial node : it match the negatively charged particles.
The trivial node : it match the Neutral.
The trivial node : it match any neutral lepton.
The trivial node : it match the Nucleus.
The trivial node : it match the positively charged particles.
represent simple predicate for short-lived particles
represent simple predicate for Stable+Charged particles
represent simple predicate for Stable particles
Helper class to obtain the information about the valid symbols for particles, decay descriptors and N...
bool addSymbol(std::string sym, const Decays::iNode &node, const std::string &help, const std::string &ccsym="")
add new symbol to the internal structure
const CCMap & cc() const
get CC-map
CCMap m_cc
the map of cc-symbols
static Symbols & instance()
static accessor to teh singleton
void addCC(std::string sym, std::string ccsym="")
add cc-pair to the internal map
std::vector< std::string > Names
the actual type for the list of names
std::map< std::string, std::string > CCMap
const std::string & symbol(std::string sym) const
help for the basic primitive special symbol
StatusCode particles(const Gaudi::Interfaces::IParticlePropertySvc *svc, Names &parts) const
get all known particle names
bool valid(std::string sym) const
valid basic/primitive symbol?
size_t symbols(Names &names) const
get all known basic primitive special symbols
HelpMap m_help
the actual help-map
Symbols()
the default constructor is protected:
NodeMap m_nodes
the actual map of symbols
The abstract class which represents the single "node" of decay tree.
The abstract interface to Particle Property Service.
virtual iterator begin() const =0
get the begin-iterator for the container of particle properties It is assumed that the container is p...
virtual iterator end() const =0
get the end-iterator for the container of particle properties It is assumed that the container is pro...
A trivial class to hold information about a single particle properties.
_vector::const_iterator const_iterator
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
void help(const std::string &argv0)
a bit specific comparison of strings, useful for ordering according to the length as the primary para...
represent simple predicate for Long-lived particles