include/BDSMaterials.hh

00001 /* BDSIM code.    Version 1.0
00002    Author: Grahame A. Blair, Royal Holloway, Univ. of London.
00003    Last modified 24.7.2002
00004    Copyright (c) 2002 by G.A.Blair.  ALL RIGHTS RESERVED. 
00005 
00006    Added Get method to enable access to materials by passing a string
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(); //SPM
00025 
00026   void Initialise(); //SPM
00027 
00028   void AddMaterial(G4Material* aMaterial,G4String aName); //SPM
00029   void AddMaterial(G4String aName, G4double itsZ, G4double itsA, G4double itsDensity); //SPM
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); //SPM
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); //SPM
00046 
00047   void AddElement(G4Element* aElement,G4String aName); //SPM
00048   void AddElement(G4String aName, G4String aSymbol, G4double itsZ, G4double itsA); //SPM
00049 
00050   static void ListMaterials();
00051 
00052   G4Material* GetMaterial(G4String aMaterial); //SPM
00053   G4Element*  GetElement(G4String aSymbol); //SPM
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; //SPM
00062   std::map<G4String,G4Element*>  elements; //SPM
00063 private:
00064   static BDSMaterials* _instance;
00065   G4Material* tmpMaterial;
00066   G4Element* tmpElement;
00067   G4MaterialPropertiesTable* airMaterialPropertiesTable;
00068   G4MaterialPropertiesTable* fsMaterialPropertiesTable;
00069 
00070 };
00071 
00072 #endif

Generated on 27 Aug 2013 for BDSIM by  doxygen 1.4.7