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
00017 class BDSMaterials
00018 {
00019 public:
00020
00021 static BDSMaterials* Instance();
00022 ~BDSMaterials();
00023
00025 void PrepareRequiredMaterials();
00026
00028
00036 void AddMaterial(G4Material* aMaterial,G4String aName);
00037 void AddMaterial(G4String aName,
00038 G4double itsZ,
00039 G4double itsA,
00040 G4double itsDensity,
00041 G4State itsState,
00042 G4double itsTemp,
00043 G4double itsPressure);
00044
00045 template <typename Type> void AddMaterial(
00046 G4String aName,
00047 G4double itsDensity,
00048 G4State itsState,
00049 G4double itsTemp,
00050 G4double itsPressure,
00051 std::list<const char*> itsComponents,
00052 std::list<Type> itsComponentsFractions);
00054
00055 void AddElement(G4Element* aElement,G4String aName);
00056 void AddElement(G4String aName, G4String aSymbol, G4double itsZ, G4double itsA);
00057
00059
00060 static void ListMaterials();
00061
00062 G4Material* GetMaterial(G4String aMaterial);
00063 G4Element* GetElement(G4String aSymbol);
00064 G4Element* GetElement(const char* aSymbol);
00065
00066 G4bool CheckMaterial(G4String aMaterial);
00067 G4bool CheckElement(G4String aSymbol);
00068
00069 protected:
00070 BDSMaterials();
00071
00072 std::map<G4String,G4Material*> materials;
00073 std::map<G4String,G4Element*> elements;
00074 private:
00075 void Initialise();
00076
00077 static BDSMaterials* _instance;
00078 G4MaterialPropertiesTable* airMaterialPropertiesTable;
00079 G4MaterialPropertiesTable* celluloseMaterialPropertiesTable;
00080 G4MaterialPropertiesTable* fsMaterialPropertiesTable;
00081 G4MaterialPropertiesTable* petMaterialPropertiesTable;
00082 G4MaterialPropertiesTable* vacMaterialPropertiesTable;
00083
00084 };
00085
00086 #endif