00001
00002
00003
00004
00005
00006
00007
00008 #ifndef BDSMaterials_h
00009 #define BDSMaterials_h 1
00010
00011 #include <map>
00012 #include <list>
00013
00014 #include "globals.hh"
00015 #include "G4Material.hh"
00016 #include "G4NistManager.hh"
00017
00018 class BDSMaterials
00019 {
00020 public:
00021
00022
00023 static BDSMaterials* Instance();
00024 ~BDSMaterials();
00025
00026 void Initialise();
00027
00028 void AddMaterial(G4Material* aMaterial,G4String aName);
00029 void AddMaterial(G4String aName, G4double itsZ, G4double itsA, G4double itsDensity);
00030
00031 void AddMaterial( G4String aName,
00032 G4double itsDensity,
00033 G4State itsState,
00034 G4double itsTemp,
00035 G4double itsPressure,
00036 std::list<const char*> itsComponents,
00037 std::list<G4double> itsComponentsFractions);
00038
00039 void AddMaterial( G4String aName,
00040 G4double itsDensity,
00041 G4State itsState,
00042 G4double itsTemp,
00043 G4double itsPressure,
00044 std::list<const char*> itsComponents,
00045 std::list<G4int> itsComponentsWeights);
00046
00047 void AddElement(G4Element* aElement,G4String aName);
00048 void AddElement(G4String aName, G4String aSymbol, G4double itsZ, G4double itsA);
00049
00050 static void ListMaterials();
00051
00052 G4Material* GetMaterial(G4String aMaterial);
00053 G4Element* GetElement(G4String aSymbol);
00054 G4Element* GetElement(const char* aSymbol);
00055
00056 G4bool CheckMaterial(G4String aMaterial);
00057 G4bool CheckElement(G4String aSymbol);
00058
00059 protected:
00060 BDSMaterials();
00061 std::map<G4String,G4Material*> materials;
00062 std::map<G4String,G4Element*> elements;
00063 private:
00064 static BDSMaterials* _instance;
00065 G4Material* tmpMaterial;
00066 G4Element* tmpElement;
00067 G4MaterialPropertiesTable* airMaterialPropertiesTable;
00068 G4MaterialPropertiesTable* fsMaterialPropertiesTable;
00069
00070 };
00071
00072 #endif