G4RIsotopeTable.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 #ifndef G4RIsotopeTable_h
00027 #define G4RIsotopeTable_h 1
00028 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00029 //
00030 // MODULE:              G4RIsotopeTable.hh
00031 //
00032 // Version:             0.b.4
00033 // Date:                14/04/00
00034 // Author:              F Lei & P R Truscott
00035 // Organisation:        DERA UK
00036 // Customer:            ESA/ESTEC, NOORDWIJK
00037 // Contract:            12115/96/JG/NL Work Order No. 3
00038 //
00039 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00040 //
00041 // CHANGE HISTORY
00042 // --------------
00043 //
00044 // 29 February 2000, P R Truscott, DERA UK
00045 // 0.b.3 release.
00046 //
00047 // 13 April 2000, F Lei, DERA UK
00048 // 0.b.4 release. No change to this file     
00049 //
00050 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00052 //
00053 #include "globals.hh"
00054 #include "G4IsotopeProperty.hh"
00055 #include "G4VIsotopeTable.hh"
00056 #include "G4Ions.hh"
00057 #include "G4IonTable.hh"
00058 #include "G4DecayTable.hh"
00059 
00060 #include <vector>
00061 
00063 //
00064 class G4RIsotopeTable : public G4VIsotopeTable
00065 {
00066   // class description
00067   //   G4RIsotopeTable is the table of pointers to G4IsotopeProperty.
00068   //   It is derived from the abstract base class G4VIsotopeTable
00069   // class description - end
00070 public:
00071   //
00072   typedef std::vector<G4IsotopeProperty*> G4IsotopeList;
00073   typedef std::vector<G4String> G4IsotopeNameList;
00074 
00075 public:
00076   // constructor
00077   G4RIsotopeTable();
00078 
00079 protected:
00080   // Hide copy constructor and assignment operator as protected
00081   G4RIsotopeTable(const G4RIsotopeTable& right);
00082   G4RIsotopeTable& operator = (const G4RIsotopeTable& right);
00083 
00084 public:
00085   // destructor
00086   virtual ~G4RIsotopeTable();
00087 
00088 public:
00089   // with description
00090   //
00091   virtual G4bool FindIsotope(G4IsotopeProperty* property);
00092   // The FindIsotope function will replace the pure virtual one defined in the
00093   // abstract base class G4VIstopeTable.  We don't use this fuction in this
00094   // implementation, instead we use the next function.
00095   //
00096   virtual G4IsotopeProperty* GetIsotope(G4int Z, G4int A, G4double E);
00097   //
00098   //   again it will replace the pure virtual one in the abstract base class.
00099   //
00100   //   Z: Atomic Number
00101   //   A: Atomic Mass
00102   //   E: Excitaion energy
00103 
00104 
00105   void AddUserDecayDataFile(G4int Z, G4int A,G4String filename);
00106   //Allow the user to replace the radio-active decay data provided in Geant4
00107   // by its own data file for a given isotope
00108 
00109 
00110 private:
00111 
00112   G4String GetIsotopeName(G4int Z, G4int A, G4double E);
00113   //
00114   //   To generate a name for the isotope
00115   G4double GetMeanLifeTime (G4int Z, G4int A, G4double& E);
00116   // to get the mean life time and its decaytable from the database
00117   //
00118   G4IsotopeProperty* GetIsotope(G4int index) const;
00119   // Return the pointer of index-th isotope in the table
00120 
00121   G4int GetVerboseLevel() const;
00122   // get Verbose Level defined in G4ParticleTable
00123 
00124   G4int Entries() const;
00125 
00126 private:
00127 
00128   G4IsotopeList         fIsotopeList;
00129   G4IsotopeNameList     fIsotopeNameList;
00130   static const G4double levelTolerance;
00131 
00132   //User define radioactive decay data files replacing some files in the G4RADECAY database
00133   std::map<G4int, G4String> theUserRadioactiveDataFiles;
00134 
00135 };
00136 
00137 inline G4int G4RIsotopeTable::Entries() const
00138   {return fIsotopeNameList.size();}
00139 
00140 inline G4IsotopeProperty*  G4RIsotopeTable::GetIsotope(G4int index) const
00141 {
00142   if ( (index >=0 ) && (index < Entries()) ){
00143     return fIsotopeList[index];
00144   } else {
00145     return 0; 
00146   } 
00147 }
00148 
00149 #endif
00150 
00151 
00152 
00153 
00154 
00155 

Generated on Mon May 27 17:49:43 2013 for Geant4 by  doxygen 1.4.7