NdbMaterial.h

Go to the documentation of this file.
00001 #ifndef MATERIAL_H
00002 #define MATERIAL_H
00003 
00004 #include <TObject.h>
00005 #include <TString.h>
00006 
00007 //////////////// NdbMaterial /////////////////
00008 class NdbMaterial : public TObject
00009 {
00010 protected:
00011         TString eMnemonic;              // Mnemonic of the element XX-AAAii
00012         TString eName;                  // Name of isotope "Gold"
00013         Long_t  eId;                    // AZ code = Z*10000 + A*10 + ISO
00014         Int_t   eZ;                     // Z = number of protons
00015         Int_t   eA;                     // A = mass number
00016         Int_t   eIS;                    // Isomeric state of element
00017         Float_t eMass;                  // Mass of the element
00018         Float_t eMassExcess;            // M-A
00019         Float_t eHalfLife;              // Half life
00020         Float_t eAbundance;             // Percentage of natural isotope
00021         Float_t eDensity;               // Density of element
00022         Float_t eMeltingPoint;          // Melting point in K
00023         Float_t eBoilingPoint;          // Boiling point in K
00024 
00025 //      TDecayMode      eDecayMode;     // Decay mode of element
00026 
00027         TObjArray       *mf;            // Array of File types
00028 
00029 public:
00030         NdbMaterial() {}
00031 
00032         NdbMaterial(
00033                 const char *aName,
00034                 const char *aMnemonic,
00035                       Int_t aZ,
00036                       Int_t anA,
00037                       Int_t anIso=0,
00038                       Float_t aMass=0.0,
00039                       Float_t aMassExcess=0.0,
00040                       Float_t aHalfLife=0.0,
00041                       Float_t aAbundance=0.0,
00042                       Float_t aDensity=0.0,
00043                       Float_t aMeltingPoint=0.0,
00044                       Float_t aBoilingPoint=0.0)
00045         : TObject(), eMnemonic(aMnemonic), eName(aName) {
00046                 eZ      = aZ;
00047                 eA      = anA;
00048                 eIS     = anIso;
00049                 eId     = eZ*10000 + eA*10 + eIS;
00050                 if (aMass!=0.0)
00051                         eMass = aMass;
00052                 else
00053                         eMass = (Float_t)anA;
00054                 eMassExcess     = aMassExcess;
00055                 eAbundance      = aAbundance;
00056                 eHalfLife       = aHalfLife;
00057                 eDensity        = aDensity;
00058                 eMeltingPoint   = aMeltingPoint;
00059                 eBoilingPoint   = aBoilingPoint;
00060         }
00061 
00062         NdbMaterial( NdbMaterial& elem )
00063                 : TObject(), eName(elem.eName)
00064         {
00065                 eZ    = elem.eZ;
00066                 eA    = elem.eA;
00067                 eIS   = elem.eIS;
00068                 eId   = elem.eId;
00069                 eMass = elem.eMass;
00070                 eMassExcess     = elem.eMassExcess;
00071                 eDensity        = elem.eDensity;
00072                 eMeltingPoint   = elem.eMeltingPoint;
00073                 eBoilingPoint   = elem.eBoilingPoint;
00074                 eAbundance      = elem.eAbundance;
00075                 eHalfLife       = elem.eHalfLife;
00076                 eMeltingPoint   = elem.eMeltingPoint;
00077                 eBoilingPoint   = elem.eBoilingPoint;
00078         }
00079 
00080         ~NdbMaterial() {}
00081 
00082         // --- Virtual functions ---
00083         Int_t Compare(const TObject *o) const
00084                 { return ((eId==((NdbMaterial*)o)->eId)? 0 :
00085                                 (eId > ((NdbMaterial*)o)->eId)? 1 : -1 ); }
00086 
00087         // --- Access functions ---
00088         inline TString Name()           const { return eName; }
00089         inline TString Mnemonic()       const { return eMnemonic; }
00090         inline Long_t  Id()             const { return eId; }
00091         inline Int_t   A()              const { return eA; }
00092         inline Int_t   Z()              const { return eZ; }
00093         inline Int_t   ISO()            const { return eIS; }
00094         inline Float_t Mass()           const { return eMass; }
00095         inline Float_t MassExcess()     const { return eMassExcess; }
00096         inline Float_t HalfLife()       const { return eHalfLife; }
00097         inline Float_t Abundance()      const { return eAbundance; }
00098         inline Float_t Density()        const { return eDensity; }
00099         inline Float_t MeltingPoint()   const { return eMeltingPoint; }
00100         inline Float_t BoilingPoint()   const { return eBoilingPoint; }
00101 
00102         ClassDef(NdbMaterial,1)
00103 
00104 }; // NdbMaterial
00105 
00106 #endif

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