Revision 67b502021c47d95a161307bd8f930746f6be115f authored by Philippe Canal on 23 February 2016, 22:56:19 UTC, committed by Philippe Canal on 26 February 2016, 01:28:03 UTC
1 parent ab60d60
NdbParticle.h
#ifndef PARTICLE_H
#define PARTICLE_H
#include <TObject.h>
#include <TString.h>
/* ------------- Particle Types ---------------- */
enum ParticleType {
PTGamma,
PTNeutron,
PTAntiNeutron,
PTNeutrino,
PTAntiNeutrino,
PTProton,
PTAntiProton,
PTElectron,
PTPositron,
PTPionPlus,
PTPionMinus,
PTMuonPlus,
PTMuonMinus,
PTKaonPlus,
PTKaonMinus,
PTKaonLong,
PTKaonShort,
PTKaonZero,
PTLambda,
PTAlpha
};
/* ------------ Particle Class ---------------- */
class NdbParticle : public TObject
{
protected:
Long_t pId; // Unique id of each particle
TString pName; // Particle Name
TString pMnemonic; // Particle Mnemonic
ParticleType pType; // Type of particle
Int_t pCharge; // Particle charge
Float_t pMass; // mass in MeV/c^2
Float_t pHalfLife; // Half life in sec.
public:
NdbParticle() { pId = -1; }
NdbParticle(
const char *aName,
ParticleType aType,
long anId = 0)
: TObject(), pName(aName)
{
pType = aType;
pId = anId;
}
~NdbParticle() {}
// --- Access Functions ---
inline TString Name() const { return pName; }
inline TString Mnemonic() const { return pMnemonic; }
inline Long_t Id() const { return pId; }
inline Float_t Mass() const { return pMass; }
inline Float_t HalfLife() const { return pHalfLife; }
inline Int_t Charge() const { return pCharge; }
ClassDef(NdbParticle,1)
}; // NdbParticle
#endif
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...