#include </builds/gaudi/Gaudi/GaudiPartProp/include/Gaudi/Decays/Symbols.h>
Helper class to obtain the information about the valid symbols for particles, decay descriptors and Nodes.
Many thanks to Antonio PELLEGRINO for the kind help with regex expressions
- See also
- Decays::iNode
-
Decays::Nodes
- Author
- Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
- Date
- 2009-05-07
Definition at line 45 of file Symbols.h.
◆ CCMap
◆ HelpMap
◆ Names
the actual type for the list of names
Definition at line 50 of file Symbols.h.
◆ NodeMap
◆ anonymous enum
| Enumerator |
|---|
| InvalidService | |
| InvalidSymbol | |
| NoParticles | |
| NoSymbols | |
Definition at line 47 of file Symbols.h.
◆ Symbols() [1/2]
| Gaudi::Decays::Symbols::Symbols |
( |
| ) |
|
|
protected |
the default constructor is protected:
Definition at line 44 of file Symbols.cpp.
63 addSymbol(
"ID+", Decays::Nodes::PosID(),
"Any particle with positive ID",
"ID-" );
64 addSymbol(
"ID-", Decays::Nodes::NegID(),
"Any particle with negative ID",
"ID+" );
102 addCC(
"ShortLived" );
103 addCC(
"LongLived" );
104 addCC(
"ShortLived_" );
105 addCC(
"LongLived_" );
◆ ~Symbols()
| virtual Gaudi::Decays::Symbols::~Symbols |
( |
| ) |
|
|
protectedvirtualdefault |
the destructor is protected
◆ Symbols() [2/2]
| Gaudi::Decays::Symbols::Symbols |
( |
const Symbols & |
| ) |
|
|
private |
copy constructor is private
◆ addCC()
| void Gaudi::Decays::Symbols::addCC |
( |
std::string |
sym, |
|
|
std::string |
ccsym = "" |
|
) |
| |
add cc-pair to the internal map
- Parameters
-
| sym | the symbol |
| ccsym | the symbol for charge conjugation |
Definition at line 148 of file Symbols.cpp.
151 boost::trim( ccsym );
152 if ( ccsym.empty() ) { ccsym = sym; }
154 if ( ccsym != sym ) {
m_cc[ccsym] = sym; }
◆ addSymbol()
| bool Gaudi::Decays::Symbols::addSymbol |
( |
std::string |
sym, |
|
|
const Decays::iNode & |
node, |
|
|
const std::string & |
help, |
|
|
const std::string & |
ccsym = "" |
|
) |
| |
add new symbol to the internal structure
- Parameters
-
| sym | the symbol definition |
| node | the actual node |
| help | the help string |
| ccsym | the symbol for charge coonjugation |
- Returns
- true if the symbol is added into the storage
Definition at line 129 of file Symbols.cpp.
134 if (
m_nodes.
end() != ifind ) {
return false; }
137 if ( !inserted ) {
return false; }
◆ cc()
◆ instance()
static accessor to teh singleton
Definition at line 39 of file Symbols.cpp.
◆ operator=()
assignment operator is private
◆ particles()
get all known particle names
- Parameters
-
| svc | (INPUT) particle property service |
| parts | (OUTPUT) vector of particle names |
- Returns
- status code
Definition at line 202 of file Symbols.cpp.
209 auto begin = service->begin();
210 auto end = service->end();
213 if ( !
pp ) {
continue; }
214 parts.push_back(
pp->particle() );
217 std::stable_sort( parts.begin(), parts.end(), Decays::CC::CmpCC() );
◆ symbol() [1/2]
| const std::string & Gaudi::Decays::Symbols::symbol |
( |
std::string |
sym | ) |
const |
help for the basic primitive special symbol
- Parameters
-
- Returns
- the help string
Definition at line 163 of file Symbols.cpp.
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;
◆ symbol() [2/2]
get the node by symbol
- Parameters
-
| (INPUT) | sym the symbol name |
| (OUTPUT) | the symbol |
- Returns
- status code
Definition at line 177 of file Symbols.cpp.
182 node = ifind->second;
◆ symbols()
| size_t Gaudi::Decays::Symbols::symbols |
( |
Names & |
names | ) |
const |
get all known basic primitive special symbols
- Parameters
-
| names | (OUTOUT) vector of all known special symbols |
- Returns
- size of the vector
Definition at line 189 of file Symbols.cpp.
192 for (
auto inode =
m_nodes.
begin();
m_nodes.
end() != inode; ++inode ) { names.push_back( inode->first ); }
194 std::stable_sort( names.begin(), names.end(), Decays::CC::CmpCC() );
◆ valid()
| bool Gaudi::Decays::Symbols::valid |
( |
std::string |
sym | ) |
const |
valid basic/primitive symbol?
- Parameters
-
- Returns
- true if it is vaild special symbol
Definition at line 157 of file Symbols.cpp.
◆ m_cc
| CCMap Gaudi::Decays::Symbols::m_cc |
|
private |
the map of cc-symbols
Definition at line 124 of file Symbols.h.
◆ m_help
| HelpMap Gaudi::Decays::Symbols::m_help |
|
private |
the actual help-map
Definition at line 122 of file Symbols.h.
◆ m_nodes
| NodeMap Gaudi::Decays::Symbols::m_nodes |
|
private |
the actual map of symbols
Definition at line 120 of file Symbols.h.
The documentation for this class was generated from the following files: