Go to the documentation of this file. 1 #ifndef __JAANET__JPDB__
2 #define __JAANET__JPDB__
78 return out << setw(32) << left << particle.
name <<
" "
79 << setw( 6) << right << particle.
pdg <<
" "
80 << setw( 6) << right << particle.
geant <<
" "
99 #define MAKE_PARTICLE(PDG, GEANT, MASS) JParticle(#PDG, PDG, GEANT, MASS)
201 if (p != this->end())
231 if (p != this->end())
249 out << setw(32) << left <<
"particle" <<
" "
250 << setw( 6) << right <<
"PDG" <<
" "
251 << setw( 6) << right <<
"GEANT" <<
" "
252 << setw(12) << right <<
"Mass [GeV]" << endl;
254 for (JPDB::const_iterator i = pdb.begin(); i != pdb.end(); ++i) {
JParticle()
Default constructor.
JParticle(const std::string &name, const int pdg, const int geant, const double mass)
Constructor.
const JParticle & getGEANT(const int geant) const
Get particle corresponding to given GEANT code.
Auxiliary data structure for floating point format specification.
General puprpose classes and methods.
friend std::ostream & operator<<(std::ostream &out, const JParticle &particle)
Print particle.
static const JPDB & getInstance()
Get particle data book.
friend std::ostream & operator<<(std::ostream &out, const JPDB &pdb)
Print particle data book.
std::string name
name of particle
bool hasGEANT(const int geant) const
Check if PDB has particle corresponding to given GEANT code.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JPDB()
Default constructor.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
int geant
GEANT code of particle.
const JParticle & getPDG(const int pdg) const
Get particle corresponding to given PDG code.
Extensions to AAnet data format.
bool hasPDG(const int pdg) const
Check if PDB has particle corresponding to given PDG code.
#define MAKE_PARTICLE(PDG, GEANT, MASS)
Auxiliary macro for particle creation.
Auxiliary class to handle particle name, codes and mass.
int pdg
PDG code of particle.
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
double mass
mass of particle [GeV]