NdbParticle.h

Go to the documentation of this file.
00001 #ifndef PARTICLE_H
00002 #define PARTICLE_H
00003 
00004 #include <TObject.h>
00005 #include <TString.h>
00006 
00007 /* ------------- Particle Types ---------------- */
00008 enum    ParticleType {
00009         PTGamma,
00010         PTNeutron,
00011         PTAntiNeutron,
00012         PTNeutrino,
00013         PTAntiNeutrino,
00014         PTProton,
00015         PTAntiProton,
00016         PTElectron,
00017         PTPositron,
00018         PTPionPlus,
00019         PTPionMinus,
00020         PTMuonPlus,
00021         PTMuonMinus,
00022         PTKaonPlus,
00023         PTKaonMinus,
00024         PTKaonLong,
00025         PTKaonShort,
00026         PTKaonZero,
00027         PTLambda,
00028         PTAlpha
00029 };
00030 
00031 /* ------------ Particle Class ---------------- */
00032 class NdbParticle : public TObject
00033 {
00034 protected:
00035         Long_t          pId;            // Unique id of each particle
00036         TString         pName;          // Particle Name
00037         TString         pMnemonic;      // Particle Mnemonic
00038         ParticleType    pType;          // Type of particle
00039         Int_t           pCharge;        // Particle charge
00040         Float_t         pMass;          // mass in MeV/c^2
00041         Float_t         pHalfLife;      // Half life in sec.
00042 
00043 public:
00044         NdbParticle() { pId = -1; }
00045 
00046         NdbParticle(
00047                 const char *aName,
00048                 ParticleType aType,
00049                 long anId = 0)
00050         : TObject(), pName(aName)
00051         {
00052                 pType = aType;
00053                 pId = anId;
00054         }
00055 
00056         ~NdbParticle() {}
00057 
00058         // --- Access Functions ---
00059         inline TString Name()           const { return pName; }
00060         inline TString Mnemonic()       const { return pMnemonic; }
00061         inline Long_t  Id()             const { return pId; }
00062         inline Float_t Mass()           const { return pMass; }
00063         inline Float_t HalfLife()       const { return pHalfLife; }
00064         inline Int_t   Charge()         const { return pCharge; }
00065 
00066         ClassDef(NdbParticle,1)
00067 
00068 }; // NdbParticle
00069 
00070 #endif

Generated on Tue Jul 5 15:15:04 2011 for ROOT_528-00b_version by  doxygen 1.5.1