![]() |
The Gaudi Framework
v27r0
|
This service provides access to particle properties. More...
#include <src/ParticlePropertySvc.h>
Public Types | |
typedef ParticleProperty * | mapped_type |
typedef std::map< int, mapped_type > | MapID |
typedef std::map< std::string, mapped_type > | MapName |
typedef std::map< int, mapped_type > | MapStdHepID |
typedef std::map< int, mapped_type > | MapPythiaID |
typedef std::vector< ParticleProperty * > | VectPP |
typedef std::vector< ParticleProperty * > | VectPP |
typedef VectPP::const_iterator | const_iterator |
typedef VectPP::const_iterator | const_iterator |
typedef VectPP::iterator | iterator |
typedef VectPP::iterator | iterator |
![]() | |
using | base_class = extends |
Typedef to this class. More... | |
using | extend_interfaces_base = extend_interfaces< Interfaces...> |
Typedef to the base of this class. More... | |
using | base_class = extends |
Typedef to this class. More... | |
using | extend_interfaces_base = extend_interfaces< Interfaces...> |
Typedef to the base of this class. More... | |
![]() | |
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type |
take union of the ext_iids of all Interfaces... More... | |
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type |
take union of the ext_iids of all Interfaces... More... | |
Public Member Functions | |
StatusCode | initialize () override |
Initialise the service. More... | |
StatusCode | finalize () override |
Finalise the service. More... | |
StatusCode | push_back (const std::string &particle, int geantId, int jetsetId, double charge, double mass, double tlife, const std::string &evtName, int pythiaId, double maxWidth) override |
Create a new particle property. More... | |
StatusCode | push_back (ParticleProperty *pp) override |
Add a new particle property. More... | |
const_iterator | begin () const override |
Get a const reference to the beginning of the container. More... | |
const_iterator | end () const override |
Get a const reference to the end of the container. More... | |
int | size () const override |
Get the container size. More... | |
ParticleProperty * | find (int geantId) override |
Retrieve a property by geant3 id. More... | |
ParticleProperty * | find (const std::string &name) override |
Retrieve a property by particle name. More... | |
ParticleProperty * | findByStdHepID (int stdHepId) override |
Retrieve a property by StdHep id. More... | |
ParticleProperty * | findByPythiaID (int pythiaID) override |
Retrieve a property by Pythia id. More... | |
StatusCode | erase (int geantId) override |
Erase a property by geant3 id. More... | |
StatusCode | erase (const std::string &name) override |
Erase a property by particle name. More... | |
StatusCode | eraseByStdHepID (int stdHepId) override |
Erase a property by StdHep id ??? More... | |
ParticlePropertySvc (const std::string &name, ISvcLocator *svc) | |
Standard Constructor. More... | |
~ParticlePropertySvc () override=default | |
Destructor. More... | |
![]() | |
void * | i_cast (const InterfaceID &tid) const override |
Implementation of IInterface::i_cast. More... | |
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override |
Implementation of IInterface::queryInterface. More... | |
std::vector< std::string > | getInterfaceNames () const override |
Implementation of IInterface::getInterfaceNames. More... | |
~extends () override=default | |
Virtual destructor. More... | |
void * | i_cast (const InterfaceID &tid) const override |
Implementation of IInterface::i_cast. More... | |
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override |
Implementation of IInterface::queryInterface. More... | |
std::vector< std::string > | getInterfaceNames () const override |
Implementation of IInterface::getInterfaceNames. More... | |
~extends () override=default | |
Virtual destructor. More... | |
![]() | |
~extend_interfaces () override=default | |
Virtual destructor. More... | |
~extend_interfaces () override=default | |
Virtual destructor. More... | |
Protected Member Functions | |
const ParticleProperty * | anti (const ParticleProperty *pp) const |
helper (protected) function to find an antiparticle for the given particle ID (StdHepID) More... | |
StatusCode | setAntiParticles () |
helper (protected) function to set the valid particle<–>antiparticle relations More... | |
StatusCode | rebuild () |
rebuild "the linear container" from the map More... | |
StatusCode | erase (const ParticleProperty *pp) |
remove particle property from all maps More... | |
StatusCode | parse (const std::string &file) |
parse the file More... | |
StatusCode | parse () |
Parses the file and fill all the maps. More... | |
StatusCode | addParticles () |
bool | diff (const ParticleProperty *o, const ParticleProperty *n, const MSG::Level l=MSG::DEBUG) const |
Private Types | |
typedef std::vector< std::string > | Files |
typedef std::vector< std::string > | Particles |
Private Attributes | |
std::string | m_filename = "ParticleTable.txt" |
Filename of the particle properties file. More... | |
Files | m_other |
additional file names More... | |
Particles | m_particles |
VectPP | m_vectpp |
Vector of all particle properties. More... | |
MapID | m_idmap |
Map for geant IDs. More... | |
MapName | m_namemap |
Map for particle names. More... | |
MapStdHepID | m_stdhepidmap |
Map for StdHep Ids. More... | |
MapPythiaID | m_pythiaidmap |
Map for Pythia Ids. More... | |
std::set< std::unique_ptr< ParticleProperty > > | m_owned |
std::set< std::string > | m_replaced |
SmartIF< IFileAccess > | m_fileAccess |
This service provides access to particle properties.
The settable property of this service is the ParticlePropertiesFile, an ASCII file containing the list of properties for the particles. The default file is: "$PARAMFILESROOT/data/ParticleTable.txt" or if $PARAMFILESROOT is not defined "ParticleTable.txt"
2) Add possibility to modify only certain particles through the new property "Particles" (default is empty list), Each line is interpreted as a line in particle data table, e.g.
The replaces/modified particles are reported.
Definition at line 71 of file ParticlePropertySvc.h.
typedef VectPP::const_iterator IParticlePropertySvc::const_iterator |
Definition at line 26 of file IParticlePropertySvc.h.
typedef VectPP::const_iterator IParticlePropertySvc::const_iterator |
Definition at line 26 of file IParticlePropertySvc.h.
|
private |
Definition at line 180 of file ParticlePropertySvc.h.
typedef VectPP::iterator IParticlePropertySvc::iterator |
Definition at line 27 of file IParticlePropertySvc.h.
typedef VectPP::iterator IParticlePropertySvc::iterator |
Definition at line 27 of file IParticlePropertySvc.h.
typedef std::map< int, mapped_type > Gaudi::ParticlePropertySvc::MapID |
Definition at line 76 of file ParticlePropertySvc.h.
typedef std::map< std::string, mapped_type > Gaudi::ParticlePropertySvc::MapName |
Definition at line 77 of file ParticlePropertySvc.h.
typedef ParticleProperty* Gaudi::ParticlePropertySvc::mapped_type |
Definition at line 75 of file ParticlePropertySvc.h.
typedef std::map< int, mapped_type > Gaudi::ParticlePropertySvc::MapPythiaID |
Definition at line 79 of file ParticlePropertySvc.h.
typedef std::map< int, mapped_type > Gaudi::ParticlePropertySvc::MapStdHepID |
Definition at line 78 of file ParticlePropertySvc.h.
|
private |
Definition at line 181 of file ParticlePropertySvc.h.
typedef std::vector<ParticleProperty*> IParticlePropertySvc::VectPP |
Definition at line 25 of file IParticlePropertySvc.h.
typedef std::vector<ParticleProperty*> IParticlePropertySvc::VectPP |
Definition at line 25 of file IParticlePropertySvc.h.
Gaudi::ParticlePropertySvc::ParticlePropertySvc | ( | const std::string & | name, |
ISvcLocator * | svc | ||
) |
Standard Constructor.
name | String with service name |
svc | Pointer to service locator interface |
Definition at line 54 of file ParticlePropertySvc.cpp.
|
overridedefault |
Destructor.
|
protected |
Definition at line 431 of file ParticlePropertySvc.cpp.
|
protected |
helper (protected) function to find an antiparticle for the given particle ID (StdHepID)
Helper (protected) function to find an antiparticle for the given particle ID (StdHepID)
pp | pointer to particle property |
Definition at line 371 of file ParticlePropertySvc.cpp.
|
inlineoverride |
Get a const reference to the beginning of the container.
Definition at line 118 of file ParticlePropertySvc.h.
|
protected |
Definition at line 502 of file ParticlePropertySvc.cpp.
|
inlineoverride |
Get a const reference to the end of the container.
Definition at line 120 of file ParticlePropertySvc.h.
|
inlineoverride |
Erase a property by geant3 id.
Definition at line 136 of file ParticlePropertySvc.h.
|
inlineoverride |
Erase a property by particle name.
Definition at line 139 of file ParticlePropertySvc.h.
|
protected |
remove particle property from all maps
Definition at line 269 of file ParticlePropertySvc.cpp.
|
inlineoverride |
Erase a property by StdHep id ???
Definition at line 142 of file ParticlePropertySvc.h.
|
override |
Finalise the service.
finalize
finalize the base class
Definition at line 137 of file ParticlePropertySvc.cpp.
|
inlineoverride |
Retrieve a property by geant3 id.
Definition at line 124 of file ParticlePropertySvc.h.
|
inlineoverride |
Retrieve a property by particle name.
Definition at line 127 of file ParticlePropertySvc.h.
|
inlineoverride |
Retrieve a property by Pythia id.
Definition at line 133 of file ParticlePropertySvc.h.
|
inlineoverride |
Retrieve a property by StdHep id.
Definition at line 130 of file ParticlePropertySvc.h.
|
override |
Initialise the service.
initialize the service and setProperties
Definition at line 72 of file ParticlePropertySvc.cpp.
|
protected |
parse the file
Definition at line 311 of file ParticlePropertySvc.cpp.
|
protected |
Parses the file and fill all the maps.
Definition at line 283 of file ParticlePropertySvc.cpp.
|
override |
Create a new particle property.
Create a particle property and insert it in the maps.
geantId | Geant3 ID of the particle. |
jetsetId | Jetset ID of the particle. |
charge | Particle charge (/e). |
mass | Particle mass (GeV). |
tlife | Particle lifetime (s). |
evtName | String name of the particle in EvtGen. |
pythiaId | Pythia ID of the particle. |
Definition at line 167 of file ParticlePropertySvc.cpp.
|
override |
Add a new particle property.
Add a particle property.
pp,a | particle property class. |
Definition at line 189 of file ParticlePropertySvc.cpp.
|
protected |
rebuild "the linear container" from the map
Definition at line 414 of file ParticlePropertySvc.cpp.
|
protected |
helper (protected) function to set the valid particle<–>antiparticle relations
Definition at line 389 of file ParticlePropertySvc.cpp.
|
inlineoverride |
Get the container size.
Definition at line 122 of file ParticlePropertySvc.h.
|
private |
Definition at line 198 of file ParticlePropertySvc.h.
|
private |
Filename of the particle properties file.
Definition at line 183 of file ParticlePropertySvc.h.
|
private |
Map for geant IDs.
Definition at line 189 of file ParticlePropertySvc.h.
|
private |
Map for particle names.
Definition at line 190 of file ParticlePropertySvc.h.
|
private |
additional file names
Definition at line 184 of file ParticlePropertySvc.h.
|
private |
Definition at line 195 of file ParticlePropertySvc.h.
|
private |
Definition at line 186 of file ParticlePropertySvc.h.
|
private |
Map for Pythia Ids.
Definition at line 192 of file ParticlePropertySvc.h.
|
private |
Definition at line 196 of file ParticlePropertySvc.h.
|
private |
Map for StdHep Ids.
Definition at line 191 of file ParticlePropertySvc.h.
|
private |
Vector of all particle properties.
Definition at line 188 of file ParticlePropertySvc.h.