The GDML validation according to schema 3.1.4 at http://gdml.web.cern.ch/GDML/gdmlschema.html fails to account for the possibility (supported by geant4.10.02.p02) of a direction phi replicavol. Example gdml code of a volume replicated twice in the phi direction: <replicavol number="2"> <volumeref ref="pionDetectorTSOpenSector_logical"/> <replicate_along_axis> <direction phi="1"/> <width value="2.0*pi/7.0" unit="mm"/> <offset value="0.0" unit="mm"/> </replicate_along_axis> </replicavol> Output during reading of the GDML file: G4GDML: VALIDATION ERROR! attribute 'phi' is not declared for element 'direction' at line: 48 This geometry is however read correctly by geant4.10.02.p02. It is also implied to be supported by the documentation v2.6, "Replica volumes are created along the specific direction of one of Cartesian or Cylindrical Axis" In gdml_replicas.xsd the tag <direction> is defined as follows: <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <xs:complexType name="directionType"> <xs:complexContent> <xs:restriction base="QuantityVectorType"> <xs:attribute default="mm" type="xs:string" name="unit"/> <xs:attribute default="cartesian" type="xs:string" name="type"/> </xs:restriction> </xs:complexContent> </xs:complexType> <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <xs:element name="direction" type="directionType"/> In gdml_core.xsd the type QuantityVectorType is defined as follows: <xs:complexType name="QuantityVectorType"> <xs:annotation> <xs:documentation>An anonymous, 3 dimensional, local scope, with a unit, (possibly of a given type) quantity vector</xs:documentation> </xs:annotation> <xs:complexContent> <xs:extension base="ThreeVectorType"> <!-- The unit attribute was originally required, but set to optional and is recommended to provide a default value in its derived type --> <xs:attribute name="unit" type="xs:string" use="optional"></xs:attribute> <xs:attribute name="type" type="xs:string" use="optional"></xs:attribute> </xs:extension> </xs:complexContent> </xs:complexType> In gdml_core.xsd the type ThreeVectorType is defined as follows: <xs:complexType name="ThreeVectorType"> <xs:annotation> <xs:documentation>An anonymous, 3 dimensional, local scope, vector of doubles</xs:documentation> </xs:annotation> <xs:attribute default="0.0" name="x" type="ExpressionOrIDREFType"></xs:attribute> <xs:attribute default="0.0" name="y" type="ExpressionOrIDREFType"></xs:attribute> <xs:attribute default="0.0" name="z" type="ExpressionOrIDREFType"></xs:attribute> </xs:complexType> This all combines to only allow x, y, or z as valid directions. Suggested solution could be to redefine directionType as follows (without annotation): <xs:complexType name="directionType"> <xs:attribute default="0.0" name="x" type="ExpressionOrIDREFType"></xs:attribute> <xs:attribute default="0.0" name="y" type="ExpressionOrIDREFType"></xs:attribute> <xs:attribute default="0.0" name="z" type="ExpressionOrIDREFType"></xs:attribute> <xs:attribute default="0.0" name="phi" type="ExpressionOrIDREFType"></xs:attribute> <xs:attribute default="0.0" name="rho" type="ExpressionOrIDREFType"></xs:attribute> </xs:complexType>
Thanks Wouter for reporting it and sorry for a long delay. I have modified the schema according to your suggestion and changed the version to 3.1.5. It's in Geant4 svn and it will be soon propagated to the GDML page. Cheers, Witek