1#ifndef __JAANET__JPDB__
2#define __JAANET__JPDB__
19#include "TDatabasePDG.h"
20#include "TParticlePDG.h"
21#include "TCollection.h"
81 return out << setw(32) << left << particle.
name <<
" "
82 << setw( 8) << right << particle.
pdg <<
" "
83 << setw( 6) << right << particle.
geant <<
" "
85 << setw( 5) << right << static_cast<int>(particle.
charge);
104#define MAKE_PARTICLE(PDG, GEANT, MASS, CHARGE) JParticle(#PDG, PDG, GEANT, MASS, CHARGE)
134 TDatabasePDG::Instance()->ReadPDGTable();
136 TIter next(TDatabasePDG::Instance()->ParticleList());
138 while (TParticlePDG* p = (TParticlePDG*) next()) {
142 pdb.push_back(particle);
173 if (p != this->end())
211 return TDatabasePDG::Instance()->ConvertPdgToGeant3(pdg);
239 if (p != this->end())
257 out << setw(32) << left <<
"particle" <<
" "
258 << setw( 8) << right <<
"PDG" <<
" "
259 << setw( 6) << right <<
"GEANT" <<
" "
260 << setw(16) << right <<
"Mass [GeV]" <<
" "
261 << setw( 5) << right <<
"Charge [|e|/3]" << endl;
263 for (JPDB::const_iterator i = pdb.begin(); i != pdb.end(); ++i) {
289 for (std::vector<int>::const_iterator pdg = pdgs.begin(); pdg != pdgs.end(); ++pdg) {
293 this->push_back(particle);
307 return out << static_cast<const JPDB&>(pdb);
354 return charged_leptons;
Auxiliary methods and classes for handling Standard Model charges.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition of particle types.
Extensions to Evt data format.
const JPDBSelection & getChargedLeptons()
Retrieve charged lepton entries from particle data book.
const JPDBSelection & getQuarks()
Retrieve quark entries from particle data book.
@ GEANT4_TYPE_NEUTRAL_ANTISIGMA
@ GEANT4_TYPE_ANTISIGMA_PLUS
@ GEANT4_TYPE_ANTISIGMA_MINUS
@ GEANT4_TYPE_NEUTRAL_ANTIXI
@ TRACK_TYPE_NEUTRAL_ANTISIGMA
@ TRACK_TYPE_ANTIELECTRON
@ TRACK_TYPE_ANTISIGMA_MINUS
@ TRACK_TYPE_NEUTRAL_ANTIXI
@ TRACK_TYPE_ANTISIGMA_PLUS
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Selection of particle data book entries.
friend std::ostream & operator<<(std::ostream &out, const JPDBSelection &pdb)
Print selection.
JPDBSelection(const std::vector< int > &pdgs)
Constructor.
JPDB()
Default constructor.
bool hasGEANT(const int geant) const
Check if PDB has particle corresponding to given GEANT code.
static int convertPDGtoGEANT(const int pdg)
Retrieve GEANT code for a given PDG code.
friend std::ostream & operator<<(std::ostream &out, const JPDB &pdb)
Print particle data book.
static const JPDB & getInstance()
Get particle data book.
const JParticle & getGEANT(const int geant) const
Get particle corresponding to given GEANT code.
bool hasPDG(const int pdg) const
Check if PDB has particle corresponding to given PDG code.
const JParticle & getPDG(const int pdg) const
Get particle corresponding to given PDG code.
Auxiliary class to handle particle name, codes and mass.
int geant
GEANT code of particle.
JParticle()
Default constructor.
JElectricCharge charge
electric charge of particle [|e|/3]
std::string name
name of particle
double mass
mass of particle [GeV]
JParticle(const std::string &name, const int pdg, const int geant, const double mass, const JElectricCharge &charge)
Constructor.
friend std::ostream & operator<<(std::ostream &out, const JParticle &particle)
Print particle.
int pdg
PDG code of particle.
Auxiliary class for electric charges of SM fields.