65 const G4Box*
const box)
67 xercesc::DOMElement* box_dimensionsElement =
NewElement(
"box_dimensions");
68 box_dimensionsElement->
70 box_dimensionsElement->
72 box_dimensionsElement->
74 box_dimensionsElement->
76 parametersElement->appendChild(box_dimensionsElement);
81 const G4Trd*
const trd)
83 xercesc::DOMElement* trd_dimensionsElement =
NewElement(
"trd_dimensions");
84 trd_dimensionsElement->
86 trd_dimensionsElement->
88 trd_dimensionsElement->
90 trd_dimensionsElement->
92 trd_dimensionsElement->
94 trd_dimensionsElement->
96 parametersElement->appendChild(trd_dimensionsElement);
104 const G4double phi = (simaxis.
z() != 1.0)
105 ? (std::atan(simaxis.
y()/simaxis.
x())) : (0.0);
106 const G4double theta = std::acos(simaxis.
z());
110 xercesc::DOMElement* trap_dimensionsElement =
NewElement(
"trap");
111 trap_dimensionsElement->
113 trap_dimensionsElement->
115 trap_dimensionsElement->
117 trap_dimensionsElement->
119 trap_dimensionsElement->
121 trap_dimensionsElement->
123 trap_dimensionsElement->
125 trap_dimensionsElement->
127 trap_dimensionsElement->
129 trap_dimensionsElement->
131 trap_dimensionsElement->
133 trap_dimensionsElement->
135 trap_dimensionsElement->
137 parametersElement->appendChild(trap_dimensionsElement);
144 xercesc::DOMElement* tube_dimensionsElement =
NewElement(
"tube_dimensions");
145 tube_dimensionsElement->
147 tube_dimensionsElement->
149 tube_dimensionsElement->
151 tube_dimensionsElement->
153 tube_dimensionsElement->
155 tube_dimensionsElement->
157 tube_dimensionsElement->
159 parametersElement->appendChild(tube_dimensionsElement);
167 xercesc::DOMElement* cone_dimensionsElement =
NewElement(
"cone_dimensions");
168 cone_dimensionsElement->
170 cone_dimensionsElement->
172 cone_dimensionsElement->
174 cone_dimensionsElement->
176 cone_dimensionsElement->
178 cone_dimensionsElement->
180 cone_dimensionsElement->
182 cone_dimensionsElement->
184 cone_dimensionsElement->
186 parametersElement->appendChild(cone_dimensionsElement);
193 xercesc::DOMElement* sphere_dimensionsElement =
195 sphere_dimensionsElement->setAttributeNode(
NewAttribute(
"rmin",
197 sphere_dimensionsElement->setAttributeNode(
NewAttribute(
"rmax",
199 sphere_dimensionsElement->setAttributeNode(
NewAttribute(
"startphi",
201 sphere_dimensionsElement->setAttributeNode(
NewAttribute(
"deltaphi",
203 sphere_dimensionsElement->setAttributeNode(
NewAttribute(
"starttheta",
205 sphere_dimensionsElement->setAttributeNode(
NewAttribute(
"deltatheta",
207 sphere_dimensionsElement->setAttributeNode(
NewAttribute(
"aunit",
"deg"));
208 sphere_dimensionsElement->setAttributeNode(
NewAttribute(
"lunit",
"mm"));
209 parametersElement->appendChild(sphere_dimensionsElement);
214 const G4Orb*
const orb)
216 xercesc::DOMElement* orb_dimensionsElement =
NewElement(
"orb_dimensions");
217 orb_dimensionsElement->setAttributeNode(
NewAttribute(
"r",
219 orb_dimensionsElement->setAttributeNode(
NewAttribute(
"lunit",
"mm"));
220 parametersElement->appendChild(orb_dimensionsElement);
227 xercesc::DOMElement* torus_dimensionsElement =
229 torus_dimensionsElement->
231 torus_dimensionsElement->
233 torus_dimensionsElement->
235 torus_dimensionsElement->
237 torus_dimensionsElement->
239 torus_dimensionsElement->
241 torus_dimensionsElement->
243 parametersElement->appendChild(torus_dimensionsElement);
252 const G4double theta = std::acos(simaxis.
z());
253 const G4double phi = (simaxis.
z() != 1.0)
254 ? (std::atan(simaxis.
y()/simaxis.
x())) : (0.0);
256 xercesc::DOMElement* para_dimensionsElement =
NewElement(
"para_dimensions");
257 para_dimensionsElement->
259 para_dimensionsElement->
261 para_dimensionsElement->
263 para_dimensionsElement->
265 para_dimensionsElement->
267 para_dimensionsElement->
269 para_dimensionsElement->
271 para_dimensionsElement->
273 parametersElement->appendChild(para_dimensionsElement);
280 xercesc::DOMElement* hype_dimensionsElement =
NewElement(
"hype_dimensions");
281 hype_dimensionsElement->
283 hype_dimensionsElement->
285 hype_dimensionsElement->
287 hype_dimensionsElement->
289 hype_dimensionsElement->
291 hype_dimensionsElement->
293 hype_dimensionsElement->
295 parametersElement->appendChild(hype_dimensionsElement);
306 std::stringstream os;
311 xercesc::DOMElement* parametersElement =
NewElement(
"parameters");
312 parametersElement->setAttributeNode(
NewAttribute(
"number",index+1));
322 paramvolElement->appendChild(parametersElement);
389 +
"' cannot be used in parameterised volume!";
390 G4Exception(
"G4GDMLWriteParamvol::ParametersWrite()",
402 xercesc::DOMElement* paramvolElement =
NewElement(
"paramvol");
403 paramvolElement->setAttributeNode(
NewAttribute(
"ncopies",
405 xercesc::DOMElement* volumerefElement =
NewElement(
"volumeref");
406 volumerefElement->setAttributeNode(
NewAttribute(
"ref",volumeref));
408 xercesc::DOMElement* algorithmElement =
410 paramvolElement->appendChild(volumerefElement);
411 paramvolElement->appendChild(algorithmElement);
413 volumeElement->appendChild(paramvolElement);
426 for (
G4int i=0; i<parameterCount; i++)
G4double GetYHalfLength() const
G4double GetZHalfLength() const
G4double GetXHalfLength() const
G4double GetOuterRadiusPlusZ() const
G4double GetStartPhiAngle() const
G4double GetDeltaPhiAngle() const
G4double GetInnerRadiusMinusZ() const
G4double GetInnerRadiusPlusZ() const
G4double GetOuterRadiusMinusZ() const
G4double GetZHalfLength() const
void RotationWrite(xercesc::DOMElement *element, const G4String &name, const G4ThreeVector &rot)
void PositionWrite(xercesc::DOMElement *element, const G4String &name, const G4ThreeVector &pos)
G4ThreeVector GetAngles(const G4RotationMatrix &)
void Tube_dimensionsWrite(xercesc::DOMElement *, const G4Tubs *const)
void ParametersWrite(xercesc::DOMElement *, const G4VPhysicalVolume *const, const G4int &)
void Orb_dimensionsWrite(xercesc::DOMElement *, const G4Orb *const)
void Trap_dimensionsWrite(xercesc::DOMElement *, const G4Trap *const)
virtual ~G4GDMLWriteParamvol()
virtual void ParamvolAlgorithmWrite(xercesc::DOMElement *paramvolElement, const G4VPhysicalVolume *const paramvol)
void Hype_dimensionsWrite(xercesc::DOMElement *, const G4Hype *const)
void Trd_dimensionsWrite(xercesc::DOMElement *, const G4Trd *const)
void Box_dimensionsWrite(xercesc::DOMElement *, const G4Box *const)
void Cone_dimensionsWrite(xercesc::DOMElement *, const G4Cons *const)
void Sphere_dimensionsWrite(xercesc::DOMElement *, const G4Sphere *const)
void Para_dimensionsWrite(xercesc::DOMElement *, const G4Para *const)
virtual void ParamvolWrite(xercesc::DOMElement *, const G4VPhysicalVolume *const)
void Torus_dimensionsWrite(xercesc::DOMElement *, const G4Torus *const)
xercesc::DOMElement * NewElement(const G4String &)
G4String GenerateName(const G4String &, const void *const)
xercesc::DOMAttr * NewAttribute(const G4String &, const G4String &)
G4double GetInnerStereo() const
G4double GetZHalfLength() const
G4double GetOuterStereo() const
G4double GetOuterRadius() const
G4double GetInnerRadius() const
G4VSolid * GetSolid() const
G4double GetRadius() const
G4double GetTanAlpha() const
G4ThreeVector GetSymAxis() const
G4double GetYHalfLength() const
G4double GetZHalfLength() const
G4double GetXHalfLength() const
G4double GetStartPhiAngle() const
G4double GetDeltaPhiAngle() const
G4double GetOuterRadius() const
G4double GetDeltaThetaAngle() const
G4double GetStartThetaAngle() const
G4double GetInsideRadius() const
G4double GetYHalfLength1() const
G4double GetTanAlpha2() const
G4double GetXHalfLength2() const
G4ThreeVector GetSymAxis() const
G4double GetXHalfLength4() const
G4double GetZHalfLength() const
G4double GetYHalfLength2() const
G4double GetTanAlpha1() const
G4double GetXHalfLength3() const
G4double GetXHalfLength1() const
G4double GetXHalfLength2() const
G4double GetYHalfLength2() const
G4double GetXHalfLength1() const
G4double GetYHalfLength1() const
G4double GetZHalfLength() const
G4double GetZHalfLength() const
G4double GetInnerRadius() const
G4double GetOuterRadius() const
G4double GetStartPhiAngle() const
G4double GetDeltaPhiAngle() const
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const =0
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
G4LogicalVolume * GetLogicalVolume() const
G4RotationMatrix GetObjectRotationValue() const
virtual G4int GetMultiplicity() const
const G4String & GetName() const
virtual G4VPVParameterisation * GetParameterisation() const =0
G4ThreeVector GetObjectTranslation() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)