Import Geant4 10.6.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2019-06-28 11:59:04 +02:00
parent 28a70706e0
commit d0f911957d
1056 changed files with 95168 additions and 78160 deletions
@@ -68,7 +68,6 @@
#include "G4OpticalSurface.hh"
#include "G4UnitsTable.hh"
#include "G4SurfaceProperty.hh"
#include "G4MaterialPropertiesTable.hh"
G4GDMLReadSolids::G4GDMLReadSolids() : G4GDMLReadMaterials()
{
@@ -2535,11 +2534,24 @@ PropertyRead(const xercesc::DOMElement* const propertyElement,
}
else // build the material properties vector
{
G4MaterialPropertyVector* propvect = new G4MaterialPropertyVector();
for (size_t i=0; i<matrix.GetRows(); i++)
{
propvect->InsertValues(matrix.Get(i,0),matrix.Get(i,1));
}
G4MaterialPropertyVector* propvect;
// first check if it was already built
if ( mapOfMatPropVects.find(Strip(name)) == mapOfMatPropVects.end())
{
// if not create a new one
propvect = new G4MaterialPropertyVector();
for (size_t i=0; i<matrix.GetRows(); i++)
{
propvect->InsertValues(matrix.Get(i,0),matrix.Get(i,1));
}
// and add it to the list for potential future reuse
mapOfMatPropVects[Strip(name)] = propvect;
}
else
{
propvect = mapOfMatPropVects[Strip(name)];
}
matprop->AddProperty(Strip(name),propvect);
}
}