Import Geant4 11.0.2 source tree
This commit is contained in:
@@ -16,6 +16,22 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
04 April 2022 S. Losilla (gdml-V10-07-16)
|
||||
- Changed default temperature to 20 °C (followup to commit ba61d0).
|
||||
|
||||
14 March 2022 W. Pokorski
|
||||
- Removed a forgotten (used for debugging) cout in G4GDMLReadSolids::PropertyRead.
|
||||
|
||||
5 March 2022 M. Asai
|
||||
- G4GDMLReadSolids, G4GDMLReadStructure:
|
||||
Use original find methods in G4SolidStore, G4LogicalVolumeStore and
|
||||
G4PhysicalVolumeStore to simplify the code.
|
||||
|
||||
16 February 2022 M. Asai
|
||||
- G4GDMLParser, G4GDMLReadDefine, G4GDMLReadSolids, G4GDMLReadStructure:
|
||||
Addressing to the case of solid/volune name duplication when reading
|
||||
more than one gdml files.
|
||||
|
||||
05 November 2021 G. Cosmo (gdml-V10-07-15)
|
||||
- G4GDMLParser: issue notification warning in ImportRegions() in case
|
||||
more than one logical volume with same name is found, to be set a
|
||||
|
||||
@@ -124,6 +124,7 @@ class G4GDMLParser
|
||||
inline void SetRegionExport(G4bool);
|
||||
inline void SetEnergyCutsExport(G4bool);
|
||||
inline void SetSDExport(G4bool);
|
||||
inline void SetReverseSearch(G4bool);
|
||||
|
||||
inline G4int GetMaxExportLevel() const; // Manage max number of levels
|
||||
inline void SetMaxExportLevel(G4int); // to export
|
||||
|
||||
@@ -229,6 +229,11 @@ inline void G4GDMLParser::SetSDExport(G4bool flag)
|
||||
writer->SetSDExport(flag);
|
||||
}
|
||||
|
||||
inline void G4GDMLParser::SetReverseSearch(G4bool flag)
|
||||
{
|
||||
reader->SetReverseSearch(flag);
|
||||
}
|
||||
|
||||
inline G4int G4GDMLParser::GetMaxExportLevel() const
|
||||
{
|
||||
return writer->GetMaxExportLevel();
|
||||
|
||||
@@ -78,6 +78,9 @@ class G4GDMLReadDefine : public G4GDMLRead
|
||||
|
||||
virtual void DefineRead(const xercesc::DOMElement* const);
|
||||
|
||||
inline void SetReverseSearch(G4bool flag)
|
||||
{ reverseSearch = flag; }
|
||||
|
||||
protected:
|
||||
|
||||
G4GDMLReadDefine();
|
||||
@@ -97,7 +100,7 @@ class G4GDMLReadDefine : public G4GDMLRead
|
||||
void ExpressionRead(const xercesc::DOMElement* const);
|
||||
|
||||
protected:
|
||||
|
||||
G4bool reverseSearch = false;
|
||||
std::map<G4String, G4double> quantityMap;
|
||||
std::map<G4String, G4ThreeVector> positionMap;
|
||||
std::map<G4String, G4ThreeVector> rotationMap;
|
||||
|
||||
@@ -242,7 +242,7 @@ G4double G4GDMLReadMaterials::PRead(const xercesc::DOMElement* const PElement)
|
||||
// --------------------------------------------------------------------
|
||||
G4double G4GDMLReadMaterials::TRead(const xercesc::DOMElement* const TElement)
|
||||
{
|
||||
G4double value = STP_Temperature;
|
||||
G4double value = NTP_Temperature;
|
||||
G4double unit = kelvin;
|
||||
|
||||
const xercesc::DOMNamedNodeMap* const attributes = TElement->getAttributes();
|
||||
@@ -552,7 +552,7 @@ void G4GDMLReadMaterials::MaterialRead(
|
||||
G4double a = 0.0;
|
||||
G4double D = 0.0;
|
||||
G4State state = kStateUndefined;
|
||||
G4double T = STP_Temperature;
|
||||
G4double T = NTP_Temperature;
|
||||
G4double P = STP_Pressure;
|
||||
G4double MEE = -1.0;
|
||||
|
||||
|
||||
@@ -3559,7 +3559,6 @@ void G4GDMLReadSolids::PropertyRead(
|
||||
{
|
||||
G4MaterialPropertyVector* propvect;
|
||||
G4String temp = name + ref;
|
||||
std::cout << temp << std::endl;
|
||||
// first check if it was already built
|
||||
if(mapOfMatPropVects.find(temp) == mapOfMatPropVects.end())
|
||||
{
|
||||
@@ -4057,7 +4056,8 @@ void G4GDMLReadSolids::SolidsRead(
|
||||
// --------------------------------------------------------------------
|
||||
G4VSolid* G4GDMLReadSolids::GetSolid(const G4String& ref) const
|
||||
{
|
||||
G4VSolid* solidPtr = G4SolidStore::GetInstance()->GetSolid(ref, false);
|
||||
G4VSolid* solidPtr = G4SolidStore::GetInstance()
|
||||
->GetSolid(ref,false,reverseSearch);
|
||||
|
||||
if(solidPtr == nullptr)
|
||||
{
|
||||
|
||||
@@ -823,7 +823,15 @@ void G4GDMLReadStructure::AssemblyRead(
|
||||
xercesc::XMLString::release(&name_attr);
|
||||
|
||||
G4AssemblyVolume* pAssembly = new G4AssemblyVolume();
|
||||
assemblyMap.insert(std::make_pair(GenerateName(name), pAssembly));
|
||||
auto aName = GenerateName(name);
|
||||
if(reverseSearch)
|
||||
{
|
||||
assemblyMap.insert_or_assign(aName, pAssembly);
|
||||
}
|
||||
else
|
||||
{
|
||||
assemblyMap.insert(std::make_pair(aName, pAssembly));
|
||||
}
|
||||
|
||||
for(xercesc::DOMNode* iter = assemblyElement->getFirstChild();
|
||||
iter != nullptr; iter = iter->getNextSibling())
|
||||
@@ -1067,8 +1075,8 @@ void G4GDMLReadStructure::StructureRead(
|
||||
// --------------------------------------------------------------------
|
||||
G4VPhysicalVolume* G4GDMLReadStructure::GetPhysvol(const G4String& ref) const
|
||||
{
|
||||
G4VPhysicalVolume* physvolPtr =
|
||||
G4PhysicalVolumeStore::GetInstance()->GetVolume(ref, false);
|
||||
G4VPhysicalVolume* physvolPtr
|
||||
= G4PhysicalVolumeStore::GetInstance()->GetVolume(ref,false,reverseSearch);
|
||||
|
||||
if(physvolPtr == nullptr)
|
||||
{
|
||||
@@ -1083,8 +1091,8 @@ G4VPhysicalVolume* G4GDMLReadStructure::GetPhysvol(const G4String& ref) const
|
||||
// --------------------------------------------------------------------
|
||||
G4LogicalVolume* G4GDMLReadStructure::GetVolume(const G4String& ref) const
|
||||
{
|
||||
G4LogicalVolume* volumePtr =
|
||||
G4LogicalVolumeStore::GetInstance()->GetVolume(ref, false);
|
||||
G4LogicalVolume* volumePtr
|
||||
= G4LogicalVolumeStore::GetInstance()->GetVolume(ref,false,reverseSearch);
|
||||
|
||||
if(volumePtr == nullptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user