LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
MaterialPropertyLoader.h
Go to the documentation of this file.
1 //
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 // TODO uniform the header guard format to LArSoft common
12 #ifndef LArG4_MaterialPropertyLoader_h
13 #define LArG4_MaterialPropertyLoader_h
14 
15 // TODO add <string> header
16 #include "Geant4/G4LogicalVolumeStore.hh"
17 #include <map>
18 
19 namespace larg4 {
20 
46  {
47  public:
48 
49  // TODO use type aliases
50 
51  // TODO remove default constructor
53  // TODO remove default destructor
55 
56 
57  // TODO remove duplicate "public" label
58  public:
59 
60  // TODO turn arguments into constant references
61  //Accessors
62  std::map<double,double> GetMaterialProperty(std::string Material,std::string Property)
63  {return fPropertyList[Material][Property];}
64 
65  // TODO turn arguments into constant references
66  double GetMaterialConstProperty(std::string Material, std::string Property)
67  {return fConstPropertyList[Material][Property];}
68 
69  // TODO turn argument into constant reference
70  std::map<std::string,double> GetMaterialConstProperties(std::string Material)
71  {return fConstPropertyList[Material];}
72 
73  // TODO turn argument into constant reference
74  std::map<std::string,std::map<double,double> > GetMaterialProperties(std::string Material)
75  {return fPropertyList[Material];}
76 
77 
78  // --- BEGIN Methods to set material properties ----------------------------
81 
97  // TODO turn arguments into constant references
98  void SetMaterialProperty( std::string Material, std::string Property, std::map<double,double> Values, double Unit);
99 
112  // TODO turn arguments into constant references
113  void SetMaterialConstProperty( std::string Material, std::string Property, double Value, double Unit);
114 
116  // --- END Methods to set material properties ------------------------------
117 
118  // --- BEGIN Setting of specific properties --------------------------------
121 
122  // Method to set LArG4 Birks constant
123  void SetBirksConstant( std::string, double, double );
124 
125 
129  // TODO turn the arguments into constant references (using type aliases)
130  void SetReflectances( std::string, std::map<std::string, std::map<double,double> >, std::map<std::string, std::map<double, double> >);
131  // TODO turn the argument into constant reference (using type aliases)
132  void SetReflectances( std::map<std::string, std::map<double,double> >);
133 
135  // --- END Setting of specific properties ----------------------------------
136 
137 
177 
178  // TODO make this method constant
190  void UpdateGeometry( G4LogicalVolumeStore* lvs );
191 
192 
193 
194  private:
195 
196  // materials properties values
197  std::map < std::string , std::map < std::string,double> > fConstPropertyList;
198 
199  // materials properties energies values
200  std::map < std::string , std::map < std::string , std::map < double , double > > > fPropertyList;
201 
202  std::map<std::string, double> fBirksConstants;
203 
204 
205 
206 
207  }; // clas MaterialPropertyLoader
208 
209 
210 } // namespace larg4
211 
212 
213 #endif // LArG4_MaterialPropertyLoader_h
std::map< double, double > GetMaterialProperty(std::string Material, std::string Property)
void SetMaterialProperty(std::string Material, std::string Property, std::map< double, double > Values, double Unit)
Stores the specified emergy-dependent material property.
void SetReflectances(std::string, std::map< std::string, std::map< double, double > >, std::map< std::string, std::map< double, double > >)
Stores material properties and sends them to GEANT4 geometry.
Geant4 interface.
void SetMaterialConstProperty(std::string Material, std::string Property, double Value, double Unit)
Stores the specified material property.
std::map< std::string, std::map< std::string, double > > fConstPropertyList
double GetMaterialConstProperty(std::string Material, std::string Property)
std::map< std::string, double > GetMaterialConstProperties(std::string Material)
std::map< std::string, std::map< double, double > > GetMaterialProperties(std::string Material)
void UpdateGeometry(G4LogicalVolumeStore *lvs)
Updates the material properties with the collected values.
std::map< std::string, std::map< std::string, std::map< double, double > > > fPropertyList
void SetBirksConstant(std::string, double, double)
std::map< std::string, double > fBirksConstants
void GetPropertiesFromServices()
Imports properties from LArSoft services.