// @(#)root/eg:$Id$
// Author: Pasha Murat   12/02/99

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/
#ifndef TParticlePDG_hh
#define TParticlePDG_hh

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TObjArray
#include "TObjArray.h"
#endif

class TDecayChannel;

class TParticlePDG : public TNamed {
public:
//------------------------------------------------------------------------------
//     data members
//------------------------------------------------------------------------------
protected:
  Int_t            fPdgCode;                    // PDG code of the particle
  Double_t         fMass;                       // particle mass in GeV
  Double_t         fCharge;                     // charge in units of |e|/3
  Double_t         fLifetime;                   // proper lifetime in seconds
  Double_t         fWidth;                      // total width in GeV
  Int_t            fParity;
  Double_t         fSpin;
  Double_t         fIsospin;                    // isospin
  Double_t         fI3;                         // i3
  Int_t            fStrangeness;                // flavours are defined if i3 != -1
  Int_t            fCharm;                      // 1 or -1 for C-particles,
                                                // 0 for others
  Int_t            fBeauty;                     //
  Int_t            fTop;                        //
  Int_t            fY;                          // X,Y: quantum numbers for the 4-th generation
  Int_t            fX;                          //
  Int_t            fStable;                     // 1 if stable, 0 otherwise
                                        
  TObjArray*       fDecayList;                  // array of decay channels
                                
  TString          fParticleClass;              // lepton, meson etc

  Int_t            fTrackingCode;               // G3 tracking code of the particle
  TParticlePDG*    fAntiParticle;               // pointer to antiparticle
//------------------------------------------------------------------------------
// functions
//------------------------------------------------------------------------------
   TParticlePDG(const TParticlePDG&); 
   TParticlePDG& operator=(const TParticlePDG&);

public:
   // ****** constructors  and destructor
   TParticlePDG();
   TParticlePDG(int pdg_code);
   TParticlePDG(const char* Name, const char* Title, Double_t Mass,
                Bool_t Stable, Double_t Width, Double_t Charge,
                const char* ParticleClass, Int_t PdgCode, Int_t Anti, 
                Int_t TrackingCode);

   virtual ~TParticlePDG();
   // ****** access methods
  
   Int_t           PdgCode      () const { return fPdgCode; }
   Double_t        Mass         () const { return fMass; }
   Double_t        Charge       () const { return fCharge; } //charge in units of |e|/3
   Double_t        Lifetime     () const { return fLifetime; }
   Double_t        Width        () const { return fWidth; }
   Int_t           Parity       () const { return fParity; }
   Double_t        Spin         () const { return fSpin; }
   Double_t        Isospin      () const { return fIsospin; }
   Double_t        I3           () const { return fI3; }
   Int_t           Strangeness  () const { return fStrangeness; }
   Int_t           Charm        () const { return fCharm; }
   Int_t           Beauty       () const { return fBeauty; }
   Int_t           Top          () const { return fTop; }
   Int_t           X            () const { return fX; }
   Int_t           Y            () const { return fY; }
   Int_t           Stable       () const { return fStable; }
   const char*     ParticleClass() const { return fParticleClass.Data(); }

   TObjArray*      DecayList    () { return fDecayList; }

   Int_t   NDecayChannels () const { 
     return (fDecayList) ? fDecayList->GetEntriesFast() : 0;
   }

   Int_t   TrackingCode() const { return fTrackingCode; }

   TDecayChannel* DecayChannel(Int_t i);

   TParticlePDG* AntiParticle() { return fAntiParticle; }

   // ****** modifiers

   void   SetAntiParticle(TParticlePDG* ap) { fAntiParticle = ap; }

   Int_t  AddDecayChannel(Int_t        Type, 
                          Double_t     BranchingRatio, 
                          Int_t        NDaughters, 
                          Int_t*       DaughterPdgCode);

   virtual void  PrintDecayChannel(TDecayChannel* dc, Option_t* opt = "") const; 

   virtual void  Print(Option_t* opt = "") const; // *MENU*

   ClassDef(TParticlePDG,2)  // PDG static particle definition
};

#endif
 TParticlePDG.h:1
 TParticlePDG.h:2
 TParticlePDG.h:3
 TParticlePDG.h:4
 TParticlePDG.h:5
 TParticlePDG.h:6
 TParticlePDG.h:7
 TParticlePDG.h:8
 TParticlePDG.h:9
 TParticlePDG.h:10
 TParticlePDG.h:11
 TParticlePDG.h:12
 TParticlePDG.h:13
 TParticlePDG.h:14
 TParticlePDG.h:15
 TParticlePDG.h:16
 TParticlePDG.h:17
 TParticlePDG.h:18
 TParticlePDG.h:19
 TParticlePDG.h:20
 TParticlePDG.h:21
 TParticlePDG.h:22
 TParticlePDG.h:23
 TParticlePDG.h:24
 TParticlePDG.h:25
 TParticlePDG.h:26
 TParticlePDG.h:27
 TParticlePDG.h:28
 TParticlePDG.h:29
 TParticlePDG.h:30
 TParticlePDG.h:31
 TParticlePDG.h:32
 TParticlePDG.h:33
 TParticlePDG.h:34
 TParticlePDG.h:35
 TParticlePDG.h:36
 TParticlePDG.h:37
 TParticlePDG.h:38
 TParticlePDG.h:39
 TParticlePDG.h:40
 TParticlePDG.h:41
 TParticlePDG.h:42
 TParticlePDG.h:43
 TParticlePDG.h:44
 TParticlePDG.h:45
 TParticlePDG.h:46
 TParticlePDG.h:47
 TParticlePDG.h:48
 TParticlePDG.h:49
 TParticlePDG.h:50
 TParticlePDG.h:51
 TParticlePDG.h:52
 TParticlePDG.h:53
 TParticlePDG.h:54
 TParticlePDG.h:55
 TParticlePDG.h:56
 TParticlePDG.h:57
 TParticlePDG.h:58
 TParticlePDG.h:59
 TParticlePDG.h:60
 TParticlePDG.h:61
 TParticlePDG.h:62
 TParticlePDG.h:63
 TParticlePDG.h:64
 TParticlePDG.h:65
 TParticlePDG.h:66
 TParticlePDG.h:67
 TParticlePDG.h:68
 TParticlePDG.h:69
 TParticlePDG.h:70
 TParticlePDG.h:71
 TParticlePDG.h:72
 TParticlePDG.h:73
 TParticlePDG.h:74
 TParticlePDG.h:75
 TParticlePDG.h:76
 TParticlePDG.h:77
 TParticlePDG.h:78
 TParticlePDG.h:79
 TParticlePDG.h:80
 TParticlePDG.h:81
 TParticlePDG.h:82
 TParticlePDG.h:83
 TParticlePDG.h:84
 TParticlePDG.h:85
 TParticlePDG.h:86
 TParticlePDG.h:87
 TParticlePDG.h:88
 TParticlePDG.h:89
 TParticlePDG.h:90
 TParticlePDG.h:91
 TParticlePDG.h:92
 TParticlePDG.h:93
 TParticlePDG.h:94
 TParticlePDG.h:95
 TParticlePDG.h:96
 TParticlePDG.h:97
 TParticlePDG.h:98
 TParticlePDG.h:99
 TParticlePDG.h:100
 TParticlePDG.h:101
 TParticlePDG.h:102
 TParticlePDG.h:103
 TParticlePDG.h:104
 TParticlePDG.h:105
 TParticlePDG.h:106
 TParticlePDG.h:107
 TParticlePDG.h:108
 TParticlePDG.h:109
 TParticlePDG.h:110
 TParticlePDG.h:111
 TParticlePDG.h:112
 TParticlePDG.h:113
 TParticlePDG.h:114
 TParticlePDG.h:115
 TParticlePDG.h:116
 TParticlePDG.h:117