A trivial class to hold information about a single particle properties.
More...
#include <Gaudi/ParticleProperty.h>
|
| 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
◆ ParticleProperty() [1/2]
Gaudi::ParticleProperty::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 )
- 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.
44 : m_name( name )
45 , m_pid( pid )
46 , m_charge( charge )
47 , m_mass( mass )
48 , m_tlife( tlife )
49 , m_maxWidth( maxWidth )
50 , m_evtgen( evtgen )
51 , m_pythia( pythia )
52 , m_anti( 0 ) {}
◆ ParticleProperty() [2/2]
Gaudi::ParticleProperty::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 )
- "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.
67 : m_name( name )
68 , m_pid( pid )
69 , m_charge( charge )
70 , m_mass( mass )
71 , m_tlife( tlife )
72 , m_maxWidth( maxWidth )
73 , m_evtgen( name )
74 , m_pythia( pid.
pid() )
75 , m_anti( 0 ) {}
int pid() const
Retrieve the PDG ID.
◆ anti()
◆ antiParticle()
◆ charge()
double Gaudi::ParticleProperty::charge |
( |
| ) |
const |
|
inline |
◆ ctau()
double Gaudi::ParticleProperty::ctau |
( |
| ) |
const |
|
inline |
◆ evtGen()
const std::string & Gaudi::ParticleProperty::evtGen |
( |
| ) |
const |
|
inline |
◆ evtGenName()
const std::string & Gaudi::ParticleProperty::evtGenName |
( |
| ) |
const |
|
inline |
◆ fillStream()
std::ostream & Gaudi::ParticleProperty::fillStream |
( |
std::ostream & | s | ) |
const |
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
91 if ( 0 == charge() ) {
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 charge() const
Get the particle charge.
double lifetime() const
Get the particle lifetime.
const std::string & evtGen() const
Get the EvtGen name.
double width() const
Get the particle natural width.
double mass() const
Get the particle mass.
Gaudi::ParticleID m_pid
the PID for the particle
const std::string & name() const
Get the particle name.
int pythia() const
Get the Pythia ID.
double ctau() const
Get the particle proper lifetime in c*tau units.
double lifeTime() const
Get the particle lifetime.
constexpr double micrometer
◆ lifeTime()
double Gaudi::ParticleProperty::lifeTime |
( |
| ) |
const |
|
inline |
◆ lifetime()
double Gaudi::ParticleProperty::lifetime |
( |
| ) |
const |
|
inline |
◆ mass()
double Gaudi::ParticleProperty::mass |
( |
| ) |
const |
|
inline |
◆ maxWidth()
double Gaudi::ParticleProperty::maxWidth |
( |
| ) |
const |
|
inline |
Get the max width deviation.
Definition at line 102 of file ParticleProperty.h.
102{ return m_maxWidth; }
◆ name()
const std::string & Gaudi::ParticleProperty::name |
( |
| ) |
const |
|
inline |
◆ operator const Gaudi::ParticleID &()
◆ particle()
const std::string & Gaudi::ParticleProperty::particle |
( |
| ) |
const |
|
inline |
◆ particleID()
◆ pdgID()
◆ pid()
◆ pythia()
int Gaudi::ParticleProperty::pythia |
( |
| ) |
const |
|
inline |
◆ pythiaID()
int Gaudi::ParticleProperty::pythiaID |
( |
| ) |
const |
|
inline |
◆ selfcc()
bool Gaudi::ParticleProperty::selfcc |
( |
| ) |
const |
|
inline |
◆ 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()
int Gaudi::ParticleProperty::threeCharge |
( |
| ) |
const |
|
inline |
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()
std::string Gaudi::ParticleProperty::toString |
( |
| ) |
const |
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()
double Gaudi::ParticleProperty::width |
( |
| ) |
const |
|
inline |
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
double Gaudi::ParticleProperty::m_charge |
|
private |
◆ m_evtgen
std::string Gaudi::ParticleProperty::m_evtgen |
|
private |
◆ m_mass
double Gaudi::ParticleProperty::m_mass |
|
private |
◆ m_maxWidth
double Gaudi::ParticleProperty::m_maxWidth |
|
private |
◆ m_name
std::string Gaudi::ParticleProperty::m_name |
|
private |
◆ m_pid
◆ m_pythia
int Gaudi::ParticleProperty::m_pythia |
|
private |
◆ m_tlife
double Gaudi::ParticleProperty::m_tlife |
|
private |
The documentation for this class was generated from the following files: