PDG definition codes in AliPDG.h -- to go to Root later??
[u/mrichter/AliRoot.git] / STEER / GParticle.cxx
1 ///////////////////////////////////////////////////////////////////////////////
2 //                                                                           //
3 //  Particle class                                                           //
4 //  This class contains the information on the particles being transported   //
5 //  by the MonteCarlo. For the moment the numbering convention is the one    //
6 //  of GEANT 3.21                                                            //
7 //                                                                           //
8 //Begin_Html
9 /*
10 <img src="picts/GParticleClass.gif">
11 */
12 //End_Html
13 //                                                                           //
14 //                                                                           //
15 ///////////////////////////////////////////////////////////////////////////////
16
17 #include "GParticle.h"
18  
19 ClassImp(GParticle)
20  
21 //_____________________________________________________________________________
22 const Text_t *GParticle::GetName() const
23 {
24   //
25   // Return name of this particle (Geant convention)
26   //
27   const char *gnames[50] = {
28     "Gamma","Positron","Electron","Neutrino","Muon +"
29     ,"Muon -","Pion 0","Pion +","Pion -","Kaon 0 long"
30     ,"Kaon +","Kaon -","Neutron","Proton","AntiProton"
31     ,"Kaon 0 short","Eta","Lambda","Sigma +","Sigma 0"
32     ,"Sigma -","Xi 0","Xi -","Omega -","Antineutron"
33     ,"AntiLambda","AntiSigma -","AntiSigma 0","AntiSigma +","AntiXi 0"
34     ,"AntiXi +","AntiOmega +","Tau +","Tau -","D +"
35     ,"D -","D 0","Anti D 0","DS+","DS-"
36     ,"Lambda C +","W +","W -","Z 0","Deuteron"
37     ,"Triton","Alpha","Geantino","He3","Cerenkov"};
38   
39   if (fKF < 1 || fKF >50) return "GParticle";
40   return gnames[fKF-1];
41 }
42
43 //_____________________________________________________________________________
44 const Text_t *GParticle::GetTitle() const
45 {
46   //
47   // Return title of this particle (Geant convention)
48   //
49   static char name[20];
50   sprintf(name,"GParticle %d",fKF);
51   return name;
52 }