A trivial class to hold information about a single particle properties.
More...
#include <Gaudi/ParticleProperty.h>
|
| struct | Compare |
| | The comparison criteria for particle properties. More...
|
|
| | ParticleProperty (const std::string &name, const Gaudi::ParticleID &pid, const double charge, const double mass, const double tlife, const double maxWidth, const std::string &evtgen, const int pythia) |
| | full constructor, from all data (except the antiparticle )
|
| | ParticleProperty (const std::string &name, const Gaudi::ParticleID &pid, const double charge, const double mass, const double tlife, const double maxWidth) |
| | a bit simplified constructor, from all data (except the antiparticle )
|
| const std::string & | particle () const |
| | Get the particle name.
|
| const std::string & | name () const |
| | Get the particle name.
|
| const Gaudi::ParticleID & | particleID () const |
| | get the particle ID
|
| const Gaudi::ParticleID & | pdgID () const |
| | get the particle ID
|
| const Gaudi::ParticleID & | pid () const |
| | get the particle ID
|
| double | charge () const |
| | Get the particle charge.
|
| double | mass () const |
| | Get the particle mass.
|
| double | lifetime () const |
| | Get the particle lifetime.
|
| double | lifeTime () const |
| | Get the particle lifetime.
|
| double | ctau () const |
| | Get the particle proper lifetime in c*tau units.
|
| double | width () const |
| | Get the particle natural width.
|
| double | maxWidth () const |
| | Get the max width deviation.
|
| const Gaudi::ParticleProperty * | antiParticle () const |
| | get the pointer to the anti-particle
|
| const Gaudi::ParticleProperty * | anti () const |
| | get the pointer to the anti-particle
|
| bool | selfcc () const |
| | self-charge conjugated?
|
| int | threeCharge () const |
| | Three times the charge (in positron charge units).
|
| void | setAntiParticle (const ParticleProperty *p) |
| | set the pointer to the antiparticle
|
| const std::string & | evtGenName () const |
| | Get the EvtGen name.
|
| const std::string & | evtGen () const |
| | Get the EvtGen name.
|
| int | pythiaID () const |
| | Get the Pythia ID.
|
| int | pythia () const |
| | Get the Pythia ID.
|
| | operator const Gaudi::ParticleID & () const |
| | implicit conversion to ParticleID class
|
| std::ostream & | fillStream (std::ostream &s) const |
| | the standard (a'la Gaudi) printout of the object
|
| std::string | toString () const |
| | simple method for conversion into the string
|
A trivial class to hold information about a single particle properties.
All particle properties are accessible through accessor functions
- Author
- Iain Last,G.Corti
-
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Definition at line 37 of file ParticleProperty.h.
◆ ParticleProperty() [1/2]
full constructor, from all data (except the antiparticle )
- Parameters
-
| name | the name for the particle |
| pid | the PID for the particle |
| charge | the charge of the particle |
| mass | the nominal mass of the particle |
| tlife | the nominal lifetime of the particle |
| maxWidth | the maximal width of the particle (used in generator) |
| evtgen | the name of particle in EvtGen program |
| pythia | the ID for the particle used in Pythia generator |
Definition at line 41 of file ParticleProperty.cpp.
45 , m_pid( pid )
48 , m_tlife( tlife )
50 , m_evtgen( evtgen )
52 , m_anti( 0 ) {}
double charge() const
Get the particle charge.
double maxWidth() const
Get the max width deviation.
double mass() const
Get the particle mass.
const std::string & name() const
Get the particle name.
int pythia() const
Get the Pythia ID.
◆ ParticleProperty() [2/2]
a bit simplified constructor, from all data (except the antiparticle )
- "evtGenName" is set from the regular "name"
- pythiaID is set from the regular PID
- Parameters
-
| name | the name for the particle |
| pid | the PID for the particle |
| charge | the charge of the particle |
| mass | the nominal mass of the particle |
| tlife | the nominal lifetime of the particle |
| maxWidth | the maximal width of the particle (used in generator) |
Definition at line 65 of file ParticleProperty.cpp.
68 , m_pid( pid )
71 , m_tlife( tlife )
74 , m_pythia( pid.
pid() )
75 , m_anti( 0 ) {}
int pid() const
Retrieve the PDG ID.
◆ anti()
◆ antiParticle()
◆ charge()
◆ ctau()
◆ evtGen()
◆ evtGenName()
◆ fillStream()
the standard (a'la Gaudi) printout of the object
- Parameters
-
| s | reference to the output stream |
- Returns
- reference to the output stream
Definition at line 80 of file ParticleProperty.cpp.
80 {
81
82 typedef boost::format BF;
83
84
85 s << BF(
"%1$-14s %|16t| PDG:%2$9d," ) %
name() % particleID().
pid();
86#ifdef __INTEL_COMPILER
87# pragma warning( disable : 1572 )
88# pragma warning( push )
89#endif
90
92 s << " Q: 0";
93 } else if ( 1.0 == charge() ) {
94 s << " Q: +1";
95 }
else if ( -1.0 ==
charge() ) {
97 }
else if ( 2.0 ==
charge() ) {
99 }
else if ( -2.0 ==
charge() ) {
101 }
else if ( 0.3 ==
charge() ) {
103 }
else if ( -0.3 ==
charge() ) {
105 }
else if ( 0.7 ==
charge() ) {
107 }
else if ( -0.7 ==
charge() ) {
109 } else {
110 s << BF(
" Q:%|+3.1f|," ) % float(
charge() );
111 }
112#ifdef __INTEL_COMPILER
113# pragma warning( pop )
114#endif
115
120 } else {
122 }
123
125 s <<
", lifetime: infinity ";
127 }
144 } else {
146 }
147
149
152}
double lifetime() const
Get the particle lifetime.
const std::string & evtGen() const
Get the EvtGen name.
double width() const
Get the particle natural width.
Gaudi::ParticleID m_pid
the PID for the particle
double ctau() const
Get the particle proper lifetime in c*tau units.
double lifeTime() const
Get the particle lifetime.
constexpr double micrometer
◆ lifeTime()
◆ lifetime()
◆ mass()
◆ maxWidth()
Get the max width deviation.
Definition at line 102 of file ParticleProperty.h.
102{ return m_maxWidth; }
◆ name()
◆ operator const Gaudi::ParticleID &()
◆ particle()
◆ particleID()
◆ pdgID()
◆ pid()
◆ pythia()
◆ pythiaID()
◆ selfcc()
◆ setAntiParticle()
set the pointer to the antiparticle
- Attention
- it is the only one "setter"
- Parameters
-
| p | pointer to anti-particle |
Definition at line 163 of file ParticleProperty.cpp.
◆ threeCharge()
Three times the charge (in positron charge units).
Definition at line 112 of file ParticleProperty.h.
int threeCharge() const
Return three times the charge, in units of e+, valid for all particles.
◆ toString()
simple method for conversion into the string
Definition at line 154 of file ParticleProperty.cpp.
154 {
155 std::ostringstream s;
156 fillStream( s );
157 return s.str();
158}
◆ width()
Get the particle natural width.
Definition at line 98 of file ParticleProperty.h.
98 {
100 }
Gaudi::ParticleID abs(const Gaudi::ParticleID &p)
Return the absolute value for a PID.
◆ operator<
comparison/ordering operator ( "strict-less-by-PID&Name" )
Definition at line 130 of file ParticleProperty.h.
130 {
132 }
std::string m_name
the name for the particle
Gaudi::ParticleID m_pid
the PID for the particle
◆ m_anti
◆ m_charge
◆ m_evtgen
◆ m_mass
◆ m_maxWidth
◆ m_name
◆ m_pid
◆ m_pythia
◆ m_tlife
The documentation for this class was generated from the following files: