Import Geant4 11.2.2 source tree

This commit is contained in:
Gabriele Cosmo
2024-06-21 15:46:33 +02:00
parent dda54bbdcf
commit f7b23877ed
411 changed files with 22817 additions and 21317 deletions
+19
View File
@@ -6,6 +6,25 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2024-06-20 Gabriele Cosmo (gdml-V11-01-03)
- Disabled schema validation by default, as XercesC currently does
support only 'http' (see: https://issues.apache.org/jira/browse/XERCESC-2220).
- Added possibility to define G4GDML_DEFAULT_SCHEMALOCATION string as
environment variable, to point to local path for the schema.
Defined new flag G4GDML_DEFAULT_WRITE_SCHEMALOCATION for schema location
in writing.
## 2024-03-08 Gabriele Cosmo
- Use std::map instead of std::vector to iterate on logical-skin surfaces
in G4GDMLWriteStructure::GetSkinSurface().
Part of fix addressing problem report #2598.
## 2024-02-29 Gabriele Cosmo
- Fix in schema module gdml_solids.xsd for tessellated solid semantics, to
correctly reference facet types. Fixes schema validation errors which may
occur on some custom XSD validation tools. Schema updated to GDML-3.1.7.
Thanks to A.Trouche (Artenum) for providing the patch.
## 2023-06-16 I. Hrivnacova (gdml-V11-01-02)
- Let G4ThreeVectorCompare obey the strict weak ordering requirements;
which fixes failures in inserting elements in the std::map with
@@ -44,9 +44,15 @@
#include "G4Navigator.hh"
#include "G4Threading.hh"
#ifndef G4GDML_DEFAULT_SCHEMALOCATION
#define G4GDML_DEFAULT_SCHEMALOCATION \
G4String("http://service-spi.web.cern.ch/service-spi/app/releases/GDML/" \
"schema/gdml.xsd")
G4String("http://cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd")
#endif
#ifndef G4GDML_DEFAULT_WRITE_SCHEMALOCATION
#define G4GDML_DEFAULT_WRITE_SCHEMALOCATION \
G4String("http://cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd")
#endif
class G4GDMLParser
{
@@ -59,20 +65,22 @@ class G4GDMLParser
//
// Parser constructors & destructor
inline void Read(const G4String& filename, G4bool Validate = true);
inline void Read(const G4String& filename, G4bool Validate = false);
//
// Imports geometry with world-volume, specified by the GDML filename
// in input. Validation against schema is activated by default.
// Schema validation is disabled, as XercesC currently does not support https.
inline void ReadModule(const G4String& filename, G4bool Validate = true);
inline void ReadModule(const G4String& filename, G4bool Validate = false);
//
// Imports a single GDML module, specified by the GDML filename
// in input. Validation against schema is activated by default.
// Schema validation is disabled, as XercesC currently does not support https.
inline void Write( const G4String& filename,
const G4VPhysicalVolume* pvol = 0,
G4bool storeReferences = true,
const G4String& SchemaLocation = G4GDML_DEFAULT_SCHEMALOCATION);
const G4String& SchemaLocation = G4GDML_DEFAULT_WRITE_SCHEMALOCATION);
//
// Exports on a GDML file, specified by 'filename' a geometry tree
// starting from 'pvol' as top volume. Uniqueness of stored entities
@@ -82,7 +90,7 @@ class G4GDMLParser
inline void Write( const G4String& filename, const G4LogicalVolume* lvol,
G4bool storeReferences = true,
const G4String& SchemaLocation = G4GDML_DEFAULT_SCHEMALOCATION);
const G4String& SchemaLocation = G4GDML_DEFAULT_WRITE_SCHEMALOCATION);
//
// Exports on a GDML file, specified by 'filename' a geometry tree
// starting from 'pvol' as top volume. Uniqueness of stored entities
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="gdml_core.xsd"/>
<xs:include schemaLocation="gdml_define.xsd"/>
<xs:include schemaLocation="gdml_materials.xsd"/>
@@ -198,7 +198,7 @@
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute fixed="3.1.6" name="version" type="xs:string">
<xs:attribute fixed="3.1.7" name="version" type="xs:string">
<xs:annotation>
<xs:documentation>The GDML Schema version consists of 3 digits X.Y.Z
where these mean:
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xs:schema []>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:simpleType name="InlineExpressionType">
<xs:restriction base="xs:string"></xs:restriction>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xs:schema []>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="gdml_core.xsd"/>
<xs:include schemaLocation="gdml_extensions.xsd"/>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="loop">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xs:schema []>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="0.1" xmlns:gdml="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:include schemaLocation="gdml_core.xsd"></xs:include>
<xs:include schemaLocation="gdml_define.xsd"></xs:include>
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="gdml_define.xsd"/>
<xs:include schemaLocation="gdml_extensions.xsd"/>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="gdml_define.xsd"/>
<xs:include schemaLocation="gdml_extensions.xsd"/>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xs:schema []>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" version="1.0" xmlns:gdml="http://cern.ch/service-spi/app/releases/GDML/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="gdml_core.xsd"></xs:include>
<xs:include schemaLocation="gdml_define.xsd"></xs:include>
<xs:include schemaLocation="gdml_extensions.xsd"/>
@@ -981,7 +981,7 @@
<xs:complexContent>
<xs:extension base="SolidType">
<xs:sequence>
<xs:element name="Facet" minOccurs="1" maxOccurs="unbounded" type="FacetType"/>
<xs:element minOccurs="1" maxOccurs="unbounded" ref="Facet"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -431,19 +431,16 @@ G4bool G4GDMLWriteStructure::FindOpticalSurface(const G4SurfaceProperty* psurf)
const G4LogicalSkinSurface* G4GDMLWriteStructure::GetSkinSurface(
const G4LogicalVolume* const lvol)
{
G4LogicalSkinSurface* surf = 0;
G4LogicalSkinSurface* surf = nullptr;
std::size_t nsurf = G4LogicalSkinSurface::GetNumberOfSkinSurfaces();
if(nsurf)
{
const G4LogicalSkinSurfaceTable* stable =
G4LogicalSkinSurface::GetSurfaceTable();
for(auto pos = stable->cbegin(); pos != stable->cend(); ++pos)
auto pos = stable->find(lvol);
if(pos != stable->cend())
{
if(lvol == (*pos)->GetLogicalVolume())
{
surf = *pos;
break;
}
surf = pos->second;
}
}
return surf;