ROOT logo
// @(#)root/eg:$Id: TAttParticle.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Ola Nordmann   29/09/95

/*************************************************************************
 * 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.             *
 *************************************************************************/


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TAttParticle                                                         //
//                                                                      //
// Particle definition, based on GEANT3 particle definition             //
//                                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TAttParticle
#define ROOT_TAttParticle

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif

class THashList;

class TAttParticle  : public TNamed {
private:
   Double_t     fPDGMass;         //Mass of the particle in GeV/c2
   Bool_t       fPDGStable;       //Logical indicator, if TRUE the particle can not decay
   Double_t     fPDGDecayWidth;   //Life time of the particle in sec.
   Double_t     fPDGCharge;       //Charge of the particle in units of e
   TString      fParticleType;    //Text indicator for the particle family
   Int_t        fMCnumberOfPDG;   //PDG MC number followed by
                                  //http://pdg.lbl.gov/rpp/mcdata/all.mc
   Double_t     fEnergyCut;       //Lower energy cut off, the default is 10 keV
   Double_t     fEnergyLimit;     //High energy cut off, the default is 10 TeV
   Double_t     fGranularity;     //Granularity of the fLogEScale

public:
   TAttParticle();
   TAttParticle(const char *name, const char *title,
                Double_t Mass, Bool_t Stable,
                Double_t DecayWidth, Double_t Charge, const char *Type,
                Int_t MCnumber, Int_t granularity=90,
                Double_t LowerCutOff=1.e-5, Double_t HighCutOff=1.e4);
   virtual ~TAttParticle();
   static  THashList     *fgList;
   static  Int_t          ConvertISAtoPDG(Int_t isaNumber);
   static  void           DefinePDG();
   virtual Double_t       GetCharge() const { return fPDGCharge; }
   virtual Double_t       GetEnergyCut() const { return fEnergyCut; }
   virtual Double_t       GetEnergyLimit() const { return fEnergyLimit; }
   virtual Double_t       GetGranularity() const { return fGranularity; }
   virtual Double_t       GetDecayWidth() const { return fPDGDecayWidth; }
   virtual Double_t       GetMass() const { return fPDGMass; }
   virtual Int_t          GetMCNumber() const { return fMCnumberOfPDG; }
   static  TAttParticle  *GetParticle(const char *name);
   static  TAttParticle  *GetParticle(Int_t mcnumber);
   virtual const char    *GetParticleType() const { return fParticleType.Data(); }
   virtual Bool_t         GetStable() const { return fPDGStable; }
   virtual void           Print(Option_t *option="") const ;
   virtual Double_t       SampleMass() const ;
   virtual Double_t       SampleMass(Double_t widthcut) const ;

   ClassDef(TAttParticle,1)  //Particle definition
};

#endif
 TAttParticle.h:1
 TAttParticle.h:2
 TAttParticle.h:3
 TAttParticle.h:4
 TAttParticle.h:5
 TAttParticle.h:6
 TAttParticle.h:7
 TAttParticle.h:8
 TAttParticle.h:9
 TAttParticle.h:10
 TAttParticle.h:11
 TAttParticle.h:12
 TAttParticle.h:13
 TAttParticle.h:14
 TAttParticle.h:15
 TAttParticle.h:16
 TAttParticle.h:17
 TAttParticle.h:18
 TAttParticle.h:19
 TAttParticle.h:20
 TAttParticle.h:21
 TAttParticle.h:22
 TAttParticle.h:23
 TAttParticle.h:24
 TAttParticle.h:25
 TAttParticle.h:26
 TAttParticle.h:27
 TAttParticle.h:28
 TAttParticle.h:29
 TAttParticle.h:30
 TAttParticle.h:31
 TAttParticle.h:32
 TAttParticle.h:33
 TAttParticle.h:34
 TAttParticle.h:35
 TAttParticle.h:36
 TAttParticle.h:37
 TAttParticle.h:38
 TAttParticle.h:39
 TAttParticle.h:40
 TAttParticle.h:41
 TAttParticle.h:42
 TAttParticle.h:43
 TAttParticle.h:44
 TAttParticle.h:45
 TAttParticle.h:46
 TAttParticle.h:47
 TAttParticle.h:48
 TAttParticle.h:49
 TAttParticle.h:50
 TAttParticle.h:51
 TAttParticle.h:52
 TAttParticle.h:53
 TAttParticle.h:54
 TAttParticle.h:55
 TAttParticle.h:56
 TAttParticle.h:57
 TAttParticle.h:58
 TAttParticle.h:59
 TAttParticle.h:60
 TAttParticle.h:61
 TAttParticle.h:62
 TAttParticle.h:63
 TAttParticle.h:64
 TAttParticle.h:65
 TAttParticle.h:66
 TAttParticle.h:67
 TAttParticle.h:68
 TAttParticle.h:69
 TAttParticle.h:70
 TAttParticle.h:71
 TAttParticle.h:72
 TAttParticle.h:73
 TAttParticle.h:74
 TAttParticle.h:75
 TAttParticle.h:76