MaterialPropertyLoader.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file MaterialPropertyLoader.h
3 //
4 /// \author bjpjones@mit.edu
5 ////////////////////////////////////////////////////////////////////////
6 // Class to set material properties for different materials in
7 // the detector. Currently used to supply optical properties to LAr
8 // and other optical elements of the detector.
9 //
10 
11 #ifndef GARG4MaterialPropertyLoader_h
12 #define GARG4MaterialPropertyLoader_h
13 
14 #include "Geant4/G4LogicalVolumeStore.hh"
15 #include <map>
16 
17 namespace gar {
18  namespace garg4 {
19 
21  {
22  public:
23 
26 
27 
28 
29  public:
30 
31  //Accessors
32  std::map<double,double> GetMaterialProperty(std::string const& Material,
33  std::string const& Property)
34  {return fPropertyList[Material][Property];}
35 
36  double GetMaterialConstProperty(std::string const& Material,
37  std::string const& Property)
38  {return fConstPropertyList[Material][Property];}
39 
40  std::map<std::string,double> GetMaterialConstProperties(std::string const& Material)
41  {return fConstPropertyList[Material];}
42 
43  std::map<std::string,std::map<double,double> > GetMaterialProperties(std::string const& Material)
44  {return fPropertyList[Material];}
45 
46 
47  // Methods to set material properties
48  void SetMaterialProperty(std::string const& Material,
49  std::string const& Property,
50  std::map<double,double> const& Values,
51  double Unit);
52  void SetMaterialConstProperty(std::string const& Material,
53  std::string const& Property,
54  double Value,
55  double Unit);
56 
57  // Method to set GArG4 Birks constant
58  void SetBirksConstant(std::string const&,
59  double,
60  double);
61 
62  void SetReflectances(std::string const&,
63  std::map<std::string, std::map<double, double> > const&,
64  std::map<std::string, std::map<double, double> > const&);
65 
66  // Set material properties supplied from services
68 
69  // Geometry updater. Generate Geant4 material property tables and attach to detector geometry
70  void UpdateGeometry( G4LogicalVolumeStore* );
71 
72 
73 
74  private:
75 
76  // materials properties values
77  std::map < std::string , std::map < std::string,double> > fConstPropertyList;
78 
79  // materials properties energies values
80  std::map < std::string , std::map < std::string , std::map < double , double > > > fPropertyList;
81 
82  std::map<std::string, double> fBirksConstants;
83 
84 
85 
86 
87  };
88 
89  }
90 } // gar
91 
92 #endif
std::map< std::string, double > fBirksConstants
std::string string
Definition: nybbler.cc:12
void SetBirksConstant(std::string const &, double, double)
void UpdateGeometry(G4LogicalVolumeStore *)
std::map< std::string, std::map< double, double > > GetMaterialProperties(std::string const &Material)
double GetMaterialConstProperty(std::string const &Material, std::string const &Property)
std::map< double, double > GetMaterialProperty(std::string const &Material, std::string const &Property)
void SetMaterialConstProperty(std::string const &Material, std::string const &Property, double Value, double Unit)
std::map< std::string, std::map< std::string, double > > fConstPropertyList
void SetMaterialProperty(std::string const &Material, std::string const &Property, std::map< double, double > const &Values, double Unit)
General GArSoft Utilities.
std::map< std::string, double > GetMaterialConstProperties(std::string const &Material)
std::map< std::string, std::map< std::string, std::map< double, double > > > fPropertyList
void SetReflectances(std::string const &, std::map< std::string, std::map< double, double > > const &, std::map< std::string, std::map< double, double > > const &)
Definition: types.h:32