Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // G4GDMLParamVol implementation 26 // G4GDMLParamVol implementation 27 // 27 // 28 // Author: Zoltan Torzsok, November 2007 28 // Author: Zoltan Torzsok, November 2007 29 // ------------------------------------------- 29 // -------------------------------------------------------------------- 30 30 31 #include "G4GDMLWriteParamvol.hh" 31 #include "G4GDMLWriteParamvol.hh" 32 #include "G4GDMLWriteSolids.hh" 32 #include "G4GDMLWriteSolids.hh" 33 33 34 #include "G4SystemOfUnits.hh" 34 #include "G4SystemOfUnits.hh" 35 #include "G4Box.hh" 35 #include "G4Box.hh" 36 #include "G4Trd.hh" 36 #include "G4Trd.hh" 37 #include "G4Trap.hh" 37 #include "G4Trap.hh" 38 #include "G4Tubs.hh" 38 #include "G4Tubs.hh" 39 #include "G4Cons.hh" 39 #include "G4Cons.hh" 40 #include "G4Sphere.hh" 40 #include "G4Sphere.hh" 41 #include "G4Orb.hh" 41 #include "G4Orb.hh" 42 #include "G4Torus.hh" 42 #include "G4Torus.hh" 43 #include "G4Ellipsoid.hh" 43 #include "G4Ellipsoid.hh" 44 #include "G4Para.hh" 44 #include "G4Para.hh" 45 #include "G4Hype.hh" 45 #include "G4Hype.hh" 46 #include "G4Polycone.hh" 46 #include "G4Polycone.hh" 47 #include "G4Polyhedra.hh" 47 #include "G4Polyhedra.hh" 48 #include "G4LogicalVolume.hh" 48 #include "G4LogicalVolume.hh" 49 #include "G4VPhysicalVolume.hh" 49 #include "G4VPhysicalVolume.hh" 50 #include "G4PVParameterised.hh" 50 #include "G4PVParameterised.hh" 51 #include "G4VPVParameterisation.hh" 51 #include "G4VPVParameterisation.hh" 52 52 53 // ------------------------------------------- 53 // -------------------------------------------------------------------- 54 G4GDMLWriteParamvol::G4GDMLWriteParamvol() 54 G4GDMLWriteParamvol::G4GDMLWriteParamvol() 55 : G4GDMLWriteSetup() 55 : G4GDMLWriteSetup() 56 { 56 { 57 } 57 } 58 58 59 // ------------------------------------------- 59 // -------------------------------------------------------------------- 60 G4GDMLWriteParamvol::~G4GDMLWriteParamvol() 60 G4GDMLWriteParamvol::~G4GDMLWriteParamvol() 61 { 61 { 62 } 62 } 63 63 64 // ------------------------------------------- 64 // -------------------------------------------------------------------- 65 void G4GDMLWriteParamvol::Box_dimensionsWrite( 65 void G4GDMLWriteParamvol::Box_dimensionsWrite( 66 xercesc::DOMElement* parametersElement, cons 66 xercesc::DOMElement* parametersElement, const G4Box* const box) 67 { 67 { 68 xercesc::DOMElement* box_dimensionsElement = 68 xercesc::DOMElement* box_dimensionsElement = NewElement("box_dimensions"); 69 box_dimensionsElement->setAttributeNode( 69 box_dimensionsElement->setAttributeNode( 70 NewAttribute("x", 2.0 * box->GetXHalfLengt 70 NewAttribute("x", 2.0 * box->GetXHalfLength() / mm)); 71 box_dimensionsElement->setAttributeNode( 71 box_dimensionsElement->setAttributeNode( 72 NewAttribute("y", 2.0 * box->GetYHalfLengt 72 NewAttribute("y", 2.0 * box->GetYHalfLength() / mm)); 73 box_dimensionsElement->setAttributeNode( 73 box_dimensionsElement->setAttributeNode( 74 NewAttribute("z", 2.0 * box->GetZHalfLengt 74 NewAttribute("z", 2.0 * box->GetZHalfLength() / mm)); 75 box_dimensionsElement->setAttributeNode(NewA 75 box_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 76 parametersElement->appendChild(box_dimension 76 parametersElement->appendChild(box_dimensionsElement); 77 } 77 } 78 78 79 // ------------------------------------------- 79 // -------------------------------------------------------------------- 80 void G4GDMLWriteParamvol::Trd_dimensionsWrite( 80 void G4GDMLWriteParamvol::Trd_dimensionsWrite( 81 xercesc::DOMElement* parametersElement, cons 81 xercesc::DOMElement* parametersElement, const G4Trd* const trd) 82 { 82 { 83 xercesc::DOMElement* trd_dimensionsElement = 83 xercesc::DOMElement* trd_dimensionsElement = NewElement("trd_dimensions"); 84 trd_dimensionsElement->setAttributeNode( 84 trd_dimensionsElement->setAttributeNode( 85 NewAttribute("x1", 2.0 * trd->GetXHalfLeng 85 NewAttribute("x1", 2.0 * trd->GetXHalfLength1() / mm)); 86 trd_dimensionsElement->setAttributeNode( 86 trd_dimensionsElement->setAttributeNode( 87 NewAttribute("x2", 2.0 * trd->GetXHalfLeng 87 NewAttribute("x2", 2.0 * trd->GetXHalfLength2() / mm)); 88 trd_dimensionsElement->setAttributeNode( 88 trd_dimensionsElement->setAttributeNode( 89 NewAttribute("y1", 2.0 * trd->GetYHalfLeng 89 NewAttribute("y1", 2.0 * trd->GetYHalfLength1() / mm)); 90 trd_dimensionsElement->setAttributeNode( 90 trd_dimensionsElement->setAttributeNode( 91 NewAttribute("y2", 2.0 * trd->GetYHalfLeng 91 NewAttribute("y2", 2.0 * trd->GetYHalfLength2() / mm)); 92 trd_dimensionsElement->setAttributeNode( 92 trd_dimensionsElement->setAttributeNode( 93 NewAttribute("z", 2.0 * trd->GetZHalfLengt 93 NewAttribute("z", 2.0 * trd->GetZHalfLength() / mm)); 94 trd_dimensionsElement->setAttributeNode(NewA 94 trd_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 95 parametersElement->appendChild(trd_dimension 95 parametersElement->appendChild(trd_dimensionsElement); 96 } 96 } 97 97 98 // ------------------------------------------- 98 // -------------------------------------------------------------------- 99 void G4GDMLWriteParamvol::Trap_dimensionsWrite 99 void G4GDMLWriteParamvol::Trap_dimensionsWrite( 100 xercesc::DOMElement* parametersElement, cons 100 xercesc::DOMElement* parametersElement, const G4Trap* const trap) 101 { 101 { 102 const G4ThreeVector simaxis = trap->GetSymAx 102 const G4ThreeVector simaxis = trap->GetSymAxis(); 103 const G4double phi = 103 const G4double phi = 104 (simaxis.z() != 1.0) ? (std::atan(simaxis. 104 (simaxis.z() != 1.0) ? (std::atan(simaxis.y() / simaxis.x())) : (0.0); 105 const G4double theta = std::acos(simaxis.z( 105 const G4double theta = std::acos(simaxis.z()); 106 const G4double alpha1 = std::atan(trap->GetT 106 const G4double alpha1 = std::atan(trap->GetTanAlpha1()); 107 const G4double alpha2 = std::atan(trap->GetT 107 const G4double alpha2 = std::atan(trap->GetTanAlpha2()); 108 108 109 xercesc::DOMElement* trap_dimensionsElement 109 xercesc::DOMElement* trap_dimensionsElement = NewElement("trap"); 110 trap_dimensionsElement->setAttributeNode( 110 trap_dimensionsElement->setAttributeNode( 111 NewAttribute("z", 2.0 * trap->GetZHalfLeng 111 NewAttribute("z", 2.0 * trap->GetZHalfLength() / mm)); 112 trap_dimensionsElement->setAttributeNode( 112 trap_dimensionsElement->setAttributeNode( 113 NewAttribute("theta", theta / degree)); 113 NewAttribute("theta", theta / degree)); 114 trap_dimensionsElement->setAttributeNode(New 114 trap_dimensionsElement->setAttributeNode(NewAttribute("phi", phi / degree)); 115 trap_dimensionsElement->setAttributeNode( 115 trap_dimensionsElement->setAttributeNode( 116 NewAttribute("y1", 2.0 * trap->GetYHalfLen 116 NewAttribute("y1", 2.0 * trap->GetYHalfLength1() / mm)); 117 trap_dimensionsElement->setAttributeNode( 117 trap_dimensionsElement->setAttributeNode( 118 NewAttribute("x1", 2.0 * trap->GetXHalfLen 118 NewAttribute("x1", 2.0 * trap->GetXHalfLength1() / mm)); 119 trap_dimensionsElement->setAttributeNode( 119 trap_dimensionsElement->setAttributeNode( 120 NewAttribute("x2", 2.0 * trap->GetXHalfLen 120 NewAttribute("x2", 2.0 * trap->GetXHalfLength2() / mm)); 121 trap_dimensionsElement->setAttributeNode( 121 trap_dimensionsElement->setAttributeNode( 122 NewAttribute("alpha1", alpha1 / degree)); 122 NewAttribute("alpha1", alpha1 / degree)); 123 trap_dimensionsElement->setAttributeNode( 123 trap_dimensionsElement->setAttributeNode( 124 NewAttribute("y2", 2.0 * trap->GetYHalfLen 124 NewAttribute("y2", 2.0 * trap->GetYHalfLength2() / mm)); 125 trap_dimensionsElement->setAttributeNode( 125 trap_dimensionsElement->setAttributeNode( 126 NewAttribute("x3", 2.0 * trap->GetXHalfLen 126 NewAttribute("x3", 2.0 * trap->GetXHalfLength3() / mm)); 127 trap_dimensionsElement->setAttributeNode( 127 trap_dimensionsElement->setAttributeNode( 128 NewAttribute("x4", 2.0 * trap->GetXHalfLen 128 NewAttribute("x4", 2.0 * trap->GetXHalfLength4() / mm)); 129 trap_dimensionsElement->setAttributeNode( 129 trap_dimensionsElement->setAttributeNode( 130 NewAttribute("alpha2", alpha2 / degree)); 130 NewAttribute("alpha2", alpha2 / degree)); 131 trap_dimensionsElement->setAttributeNode(New 131 trap_dimensionsElement->setAttributeNode(NewAttribute("aunit", "deg")); 132 trap_dimensionsElement->setAttributeNode(New 132 trap_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 133 parametersElement->appendChild(trap_dimensio 133 parametersElement->appendChild(trap_dimensionsElement); 134 } 134 } 135 135 136 // ------------------------------------------- 136 // -------------------------------------------------------------------- 137 void G4GDMLWriteParamvol::Tube_dimensionsWrite 137 void G4GDMLWriteParamvol::Tube_dimensionsWrite( 138 xercesc::DOMElement* parametersElement, cons 138 xercesc::DOMElement* parametersElement, const G4Tubs* const tube) 139 { 139 { 140 xercesc::DOMElement* tube_dimensionsElement 140 xercesc::DOMElement* tube_dimensionsElement = NewElement("tube_dimensions"); 141 tube_dimensionsElement->setAttributeNode( 141 tube_dimensionsElement->setAttributeNode( 142 NewAttribute("InR", tube->GetInnerRadius() 142 NewAttribute("InR", tube->GetInnerRadius() / mm)); 143 tube_dimensionsElement->setAttributeNode( 143 tube_dimensionsElement->setAttributeNode( 144 NewAttribute("OutR", tube->GetOuterRadius( 144 NewAttribute("OutR", tube->GetOuterRadius() / mm)); 145 tube_dimensionsElement->setAttributeNode( 145 tube_dimensionsElement->setAttributeNode( 146 NewAttribute("hz", 2.0 * tube->GetZHalfLen 146 NewAttribute("hz", 2.0 * tube->GetZHalfLength() / mm)); 147 tube_dimensionsElement->setAttributeNode( 147 tube_dimensionsElement->setAttributeNode( 148 NewAttribute("StartPhi", tube->GetStartPhi 148 NewAttribute("StartPhi", tube->GetStartPhiAngle() / degree)); 149 tube_dimensionsElement->setAttributeNode( 149 tube_dimensionsElement->setAttributeNode( 150 NewAttribute("DeltaPhi", tube->GetDeltaPhi 150 NewAttribute("DeltaPhi", tube->GetDeltaPhiAngle() / degree)); 151 tube_dimensionsElement->setAttributeNode(New 151 tube_dimensionsElement->setAttributeNode(NewAttribute("aunit", "deg")); 152 tube_dimensionsElement->setAttributeNode(New 152 tube_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 153 parametersElement->appendChild(tube_dimensio 153 parametersElement->appendChild(tube_dimensionsElement); 154 } 154 } 155 155 156 // ------------------------------------------- 156 // -------------------------------------------------------------------- 157 void G4GDMLWriteParamvol::Cone_dimensionsWrite 157 void G4GDMLWriteParamvol::Cone_dimensionsWrite( 158 xercesc::DOMElement* parametersElement, cons 158 xercesc::DOMElement* parametersElement, const G4Cons* const cone) 159 { 159 { 160 xercesc::DOMElement* cone_dimensionsElement 160 xercesc::DOMElement* cone_dimensionsElement = NewElement("cone_dimensions"); 161 cone_dimensionsElement->setAttributeNode( 161 cone_dimensionsElement->setAttributeNode( 162 NewAttribute("rmin1", cone->GetInnerRadius 162 NewAttribute("rmin1", cone->GetInnerRadiusMinusZ() / mm)); 163 cone_dimensionsElement->setAttributeNode( 163 cone_dimensionsElement->setAttributeNode( 164 NewAttribute("rmax1", cone->GetOuterRadius 164 NewAttribute("rmax1", cone->GetOuterRadiusMinusZ() / mm)); 165 cone_dimensionsElement->setAttributeNode( 165 cone_dimensionsElement->setAttributeNode( 166 NewAttribute("rmin2", cone->GetInnerRadius 166 NewAttribute("rmin2", cone->GetInnerRadiusPlusZ() / mm)); 167 cone_dimensionsElement->setAttributeNode( 167 cone_dimensionsElement->setAttributeNode( 168 NewAttribute("rmax2", cone->GetOuterRadius 168 NewAttribute("rmax2", cone->GetOuterRadiusPlusZ() / mm)); 169 cone_dimensionsElement->setAttributeNode( 169 cone_dimensionsElement->setAttributeNode( 170 NewAttribute("z", 2.0 * cone->GetZHalfLeng 170 NewAttribute("z", 2.0 * cone->GetZHalfLength() / mm)); 171 cone_dimensionsElement->setAttributeNode( 171 cone_dimensionsElement->setAttributeNode( 172 NewAttribute("startphi", cone->GetStartPhi 172 NewAttribute("startphi", cone->GetStartPhiAngle() / degree)); 173 cone_dimensionsElement->setAttributeNode( 173 cone_dimensionsElement->setAttributeNode( 174 NewAttribute("deltaphi", cone->GetDeltaPhi 174 NewAttribute("deltaphi", cone->GetDeltaPhiAngle() / degree)); 175 cone_dimensionsElement->setAttributeNode(New 175 cone_dimensionsElement->setAttributeNode(NewAttribute("aunit", "deg")); 176 cone_dimensionsElement->setAttributeNode(New 176 cone_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 177 parametersElement->appendChild(cone_dimensio 177 parametersElement->appendChild(cone_dimensionsElement); 178 } 178 } 179 179 180 // ------------------------------------------- 180 // -------------------------------------------------------------------- 181 void G4GDMLWriteParamvol::Sphere_dimensionsWri 181 void G4GDMLWriteParamvol::Sphere_dimensionsWrite( 182 xercesc::DOMElement* parametersElement, cons 182 xercesc::DOMElement* parametersElement, const G4Sphere* const sphere) 183 { 183 { 184 xercesc::DOMElement* sphere_dimensionsElemen 184 xercesc::DOMElement* sphere_dimensionsElement = 185 NewElement("sphere_dimensions"); 185 NewElement("sphere_dimensions"); 186 sphere_dimensionsElement->setAttributeNode( 186 sphere_dimensionsElement->setAttributeNode( 187 NewAttribute("rmin", sphere->GetInnerRadiu 187 NewAttribute("rmin", sphere->GetInnerRadius() / mm)); 188 sphere_dimensionsElement->setAttributeNode( 188 sphere_dimensionsElement->setAttributeNode( 189 NewAttribute("rmax", sphere->GetOuterRadiu 189 NewAttribute("rmax", sphere->GetOuterRadius() / mm)); 190 sphere_dimensionsElement->setAttributeNode( 190 sphere_dimensionsElement->setAttributeNode( 191 NewAttribute("startphi", sphere->GetStartP 191 NewAttribute("startphi", sphere->GetStartPhiAngle() / degree)); 192 sphere_dimensionsElement->setAttributeNode( 192 sphere_dimensionsElement->setAttributeNode( 193 NewAttribute("deltaphi", sphere->GetDeltaP 193 NewAttribute("deltaphi", sphere->GetDeltaPhiAngle() / degree)); 194 sphere_dimensionsElement->setAttributeNode( 194 sphere_dimensionsElement->setAttributeNode( 195 NewAttribute("starttheta", sphere->GetStar 195 NewAttribute("starttheta", sphere->GetStartThetaAngle() / degree)); 196 sphere_dimensionsElement->setAttributeNode( 196 sphere_dimensionsElement->setAttributeNode( 197 NewAttribute("deltatheta", sphere->GetDelt 197 NewAttribute("deltatheta", sphere->GetDeltaThetaAngle() / degree)); 198 sphere_dimensionsElement->setAttributeNode(N 198 sphere_dimensionsElement->setAttributeNode(NewAttribute("aunit", "deg")); 199 sphere_dimensionsElement->setAttributeNode(N 199 sphere_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 200 parametersElement->appendChild(sphere_dimens 200 parametersElement->appendChild(sphere_dimensionsElement); 201 } 201 } 202 202 203 // ------------------------------------------- 203 // -------------------------------------------------------------------- 204 void G4GDMLWriteParamvol::Orb_dimensionsWrite( 204 void G4GDMLWriteParamvol::Orb_dimensionsWrite( 205 xercesc::DOMElement* parametersElement, cons 205 xercesc::DOMElement* parametersElement, const G4Orb* const orb) 206 { 206 { 207 xercesc::DOMElement* orb_dimensionsElement = 207 xercesc::DOMElement* orb_dimensionsElement = NewElement("orb_dimensions"); 208 orb_dimensionsElement->setAttributeNode( 208 orb_dimensionsElement->setAttributeNode( 209 NewAttribute("r", orb->GetRadius() / mm)); 209 NewAttribute("r", orb->GetRadius() / mm)); 210 orb_dimensionsElement->setAttributeNode(NewA 210 orb_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 211 parametersElement->appendChild(orb_dimension 211 parametersElement->appendChild(orb_dimensionsElement); 212 } 212 } 213 213 214 // ------------------------------------------- 214 // -------------------------------------------------------------------- 215 void G4GDMLWriteParamvol::Torus_dimensionsWrit 215 void G4GDMLWriteParamvol::Torus_dimensionsWrite( 216 xercesc::DOMElement* parametersElement, cons 216 xercesc::DOMElement* parametersElement, const G4Torus* const torus) 217 { 217 { 218 xercesc::DOMElement* torus_dimensionsElement 218 xercesc::DOMElement* torus_dimensionsElement = NewElement("torus_dimensions"); 219 torus_dimensionsElement->setAttributeNode( 219 torus_dimensionsElement->setAttributeNode( 220 NewAttribute("rmin", torus->GetRmin() / mm 220 NewAttribute("rmin", torus->GetRmin() / mm)); 221 torus_dimensionsElement->setAttributeNode( 221 torus_dimensionsElement->setAttributeNode( 222 NewAttribute("rmax", torus->GetRmax() / mm 222 NewAttribute("rmax", torus->GetRmax() / mm)); 223 torus_dimensionsElement->setAttributeNode( 223 torus_dimensionsElement->setAttributeNode( 224 NewAttribute("rtor", torus->GetRtor() / mm 224 NewAttribute("rtor", torus->GetRtor() / mm)); 225 torus_dimensionsElement->setAttributeNode( 225 torus_dimensionsElement->setAttributeNode( 226 NewAttribute("startphi", torus->GetSPhi() 226 NewAttribute("startphi", torus->GetSPhi() / degree)); 227 torus_dimensionsElement->setAttributeNode( 227 torus_dimensionsElement->setAttributeNode( 228 NewAttribute("deltaphi", torus->GetDPhi() 228 NewAttribute("deltaphi", torus->GetDPhi() / degree)); 229 torus_dimensionsElement->setAttributeNode(Ne 229 torus_dimensionsElement->setAttributeNode(NewAttribute("aunit", "deg")); 230 torus_dimensionsElement->setAttributeNode(Ne 230 torus_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 231 parametersElement->appendChild(torus_dimensi 231 parametersElement->appendChild(torus_dimensionsElement); 232 } 232 } 233 233 234 // ------------------------------------------- 234 // -------------------------------------------------------------------- 235 void G4GDMLWriteParamvol::Ellipsoid_dimensions 235 void G4GDMLWriteParamvol::Ellipsoid_dimensionsWrite( 236 xercesc::DOMElement* parametersElement, cons 236 xercesc::DOMElement* parametersElement, const G4Ellipsoid* const ellipsoid) 237 { 237 { 238 xercesc::DOMElement* ellipsoid_dimensionsEle 238 xercesc::DOMElement* ellipsoid_dimensionsElement = 239 NewElement("ellipsoid_dimensions"); 239 NewElement("ellipsoid_dimensions"); 240 ellipsoid_dimensionsElement->setAttributeNod 240 ellipsoid_dimensionsElement->setAttributeNode( 241 NewAttribute("ax", ellipsoid->GetSemiAxisM 241 NewAttribute("ax", ellipsoid->GetSemiAxisMax(0) / mm)); 242 ellipsoid_dimensionsElement->setAttributeNod 242 ellipsoid_dimensionsElement->setAttributeNode( 243 NewAttribute("by", ellipsoid->GetSemiAxisM 243 NewAttribute("by", ellipsoid->GetSemiAxisMax(1) / mm)); 244 ellipsoid_dimensionsElement->setAttributeNod 244 ellipsoid_dimensionsElement->setAttributeNode( 245 NewAttribute("cz", ellipsoid->GetSemiAxisM 245 NewAttribute("cz", ellipsoid->GetSemiAxisMax(2) / mm)); 246 ellipsoid_dimensionsElement->setAttributeNod 246 ellipsoid_dimensionsElement->setAttributeNode( 247 NewAttribute("zcut1", ellipsoid->GetZBotto 247 NewAttribute("zcut1", ellipsoid->GetZBottomCut() / mm)); 248 ellipsoid_dimensionsElement->setAttributeNod 248 ellipsoid_dimensionsElement->setAttributeNode( 249 NewAttribute("zcut2", ellipsoid->GetZTopCu 249 NewAttribute("zcut2", ellipsoid->GetZTopCut() / mm)); 250 ellipsoid_dimensionsElement->setAttributeNod 250 ellipsoid_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 251 parametersElement->appendChild(ellipsoid_dim 251 parametersElement->appendChild(ellipsoid_dimensionsElement); 252 } 252 } 253 253 254 // ------------------------------------------- 254 // -------------------------------------------------------------------- 255 void G4GDMLWriteParamvol::Para_dimensionsWrite 255 void G4GDMLWriteParamvol::Para_dimensionsWrite( 256 xercesc::DOMElement* parametersElement, cons 256 xercesc::DOMElement* parametersElement, const G4Para* const para) 257 { 257 { 258 const G4ThreeVector simaxis = para->GetSymAx 258 const G4ThreeVector simaxis = para->GetSymAxis(); 259 259 260 const G4double alpha = std::atan(para->GetTa 260 const G4double alpha = std::atan(para->GetTanAlpha()); 261 const G4double theta = std::acos(simaxis.z() 261 const G4double theta = std::acos(simaxis.z()); 262 const G4double phi = 262 const G4double phi = 263 (simaxis.z() != 1.0) ? (std::atan(simaxis. 263 (simaxis.z() != 1.0) ? (std::atan(simaxis.y() / simaxis.x())) : (0.0); 264 264 265 xercesc::DOMElement* para_dimensionsElement 265 xercesc::DOMElement* para_dimensionsElement = NewElement("para_dimensions"); 266 para_dimensionsElement->setAttributeNode( 266 para_dimensionsElement->setAttributeNode( 267 NewAttribute("x", 2.0 * para->GetXHalfLeng 267 NewAttribute("x", 2.0 * para->GetXHalfLength() / mm)); 268 para_dimensionsElement->setAttributeNode( 268 para_dimensionsElement->setAttributeNode( 269 NewAttribute("y", 2.0 * para->GetYHalfLeng 269 NewAttribute("y", 2.0 * para->GetYHalfLength() / mm)); 270 para_dimensionsElement->setAttributeNode( 270 para_dimensionsElement->setAttributeNode( 271 NewAttribute("z", 2.0 * para->GetZHalfLeng 271 NewAttribute("z", 2.0 * para->GetZHalfLength() / mm)); 272 para_dimensionsElement->setAttributeNode( 272 para_dimensionsElement->setAttributeNode( 273 NewAttribute("alpha", alpha / degree)); 273 NewAttribute("alpha", alpha / degree)); 274 para_dimensionsElement->setAttributeNode( 274 para_dimensionsElement->setAttributeNode( 275 NewAttribute("theta", theta / degree)); 275 NewAttribute("theta", theta / degree)); 276 para_dimensionsElement->setAttributeNode(New 276 para_dimensionsElement->setAttributeNode(NewAttribute("phi", phi / degree)); 277 para_dimensionsElement->setAttributeNode(New 277 para_dimensionsElement->setAttributeNode(NewAttribute("aunit", "deg")); 278 para_dimensionsElement->setAttributeNode(New 278 para_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 279 parametersElement->appendChild(para_dimensio 279 parametersElement->appendChild(para_dimensionsElement); 280 } 280 } 281 281 282 // ------------------------------------------- 282 // -------------------------------------------------------------------- 283 void G4GDMLWriteParamvol::Hype_dimensionsWrite 283 void G4GDMLWriteParamvol::Hype_dimensionsWrite( 284 xercesc::DOMElement* parametersElement, cons 284 xercesc::DOMElement* parametersElement, const G4Hype* const hype) 285 { 285 { 286 xercesc::DOMElement* hype_dimensionsElement 286 xercesc::DOMElement* hype_dimensionsElement = NewElement("hype_dimensions"); 287 hype_dimensionsElement->setAttributeNode( 287 hype_dimensionsElement->setAttributeNode( 288 NewAttribute("rmin", hype->GetInnerRadius( 288 NewAttribute("rmin", hype->GetInnerRadius() / mm)); 289 hype_dimensionsElement->setAttributeNode( 289 hype_dimensionsElement->setAttributeNode( 290 NewAttribute("rmax", hype->GetOuterRadius( 290 NewAttribute("rmax", hype->GetOuterRadius() / mm)); 291 hype_dimensionsElement->setAttributeNode( 291 hype_dimensionsElement->setAttributeNode( 292 NewAttribute("inst", hype->GetInnerStereo( 292 NewAttribute("inst", hype->GetInnerStereo() / degree)); 293 hype_dimensionsElement->setAttributeNode( 293 hype_dimensionsElement->setAttributeNode( 294 NewAttribute("outst", hype->GetOuterStereo 294 NewAttribute("outst", hype->GetOuterStereo() / degree)); 295 hype_dimensionsElement->setAttributeNode( 295 hype_dimensionsElement->setAttributeNode( 296 NewAttribute("z", 2.0 * hype->GetZHalfLeng 296 NewAttribute("z", 2.0 * hype->GetZHalfLength() / mm)); 297 hype_dimensionsElement->setAttributeNode(New 297 hype_dimensionsElement->setAttributeNode(NewAttribute("aunit", "deg")); 298 hype_dimensionsElement->setAttributeNode(New 298 hype_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 299 parametersElement->appendChild(hype_dimensio 299 parametersElement->appendChild(hype_dimensionsElement); 300 } 300 } 301 301 302 // ------------------------------------------- 302 // -------------------------------------------------------------------- 303 void G4GDMLWriteParamvol::Polycone_dimensionsW 303 void G4GDMLWriteParamvol::Polycone_dimensionsWrite( 304 xercesc::DOMElement* parametersElement, cons 304 xercesc::DOMElement* parametersElement, const G4Polycone* const pcone) 305 { 305 { 306 xercesc::DOMElement* pcone_dimensionsElement 306 xercesc::DOMElement* pcone_dimensionsElement = 307 NewElement("polycone_dimensions"); 307 NewElement("polycone_dimensions"); 308 308 309 pcone_dimensionsElement->setAttributeNode( 309 pcone_dimensionsElement->setAttributeNode( 310 NewAttribute("numRZ", pcone->GetOriginalPa 310 NewAttribute("numRZ", pcone->GetOriginalParameters()->Num_z_planes)); 311 pcone_dimensionsElement->setAttributeNode(Ne 311 pcone_dimensionsElement->setAttributeNode(NewAttribute( 312 "startPhi", pcone->GetOriginalParameters() 312 "startPhi", pcone->GetOriginalParameters()->Start_angle / degree)); 313 pcone_dimensionsElement->setAttributeNode(Ne 313 pcone_dimensionsElement->setAttributeNode(NewAttribute( 314 "openPhi", pcone->GetOriginalParameters()- 314 "openPhi", pcone->GetOriginalParameters()->Opening_angle / degree)); 315 pcone_dimensionsElement->setAttributeNode(Ne 315 pcone_dimensionsElement->setAttributeNode(NewAttribute("aunit", "deg")); 316 pcone_dimensionsElement->setAttributeNode(Ne 316 pcone_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 317 317 318 parametersElement->appendChild(pcone_dimensi 318 parametersElement->appendChild(pcone_dimensionsElement); 319 const size_t num_zplanes = pcone->GetOrigi 319 const size_t num_zplanes = pcone->GetOriginalParameters()->Num_z_planes; 320 const G4double* z_array = pcone->GetOrigi 320 const G4double* z_array = pcone->GetOriginalParameters()->Z_values; 321 const G4double* rmin_array = pcone->GetOrigi 321 const G4double* rmin_array = pcone->GetOriginalParameters()->Rmin; 322 const G4double* rmax_array = pcone->GetOrigi 322 const G4double* rmax_array = pcone->GetOriginalParameters()->Rmax; 323 323 324 for(std::size_t i = 0; i < num_zplanes; ++i) 324 for(std::size_t i = 0; i < num_zplanes; ++i) 325 { 325 { 326 ZplaneWrite(pcone_dimensionsElement, z_arr 326 ZplaneWrite(pcone_dimensionsElement, z_array[i], rmin_array[i], 327 rmax_array[i]); 327 rmax_array[i]); 328 } 328 } 329 } 329 } 330 330 331 // ------------------------------------------- 331 // -------------------------------------------------------------------- 332 void G4GDMLWriteParamvol::Polyhedra_dimensions 332 void G4GDMLWriteParamvol::Polyhedra_dimensionsWrite( 333 xercesc::DOMElement* parametersElement, cons 333 xercesc::DOMElement* parametersElement, const G4Polyhedra* const polyhedra) 334 { 334 { 335 xercesc::DOMElement* polyhedra_dimensionsEle 335 xercesc::DOMElement* polyhedra_dimensionsElement = 336 NewElement("polyhedra_dimensions"); 336 NewElement("polyhedra_dimensions"); 337 337 338 polyhedra_dimensionsElement->setAttributeNod 338 polyhedra_dimensionsElement->setAttributeNode( 339 NewAttribute("numRZ", polyhedra->GetOrigin 339 NewAttribute("numRZ", polyhedra->GetOriginalParameters()->Num_z_planes)); 340 polyhedra_dimensionsElement->setAttributeNod 340 polyhedra_dimensionsElement->setAttributeNode( 341 NewAttribute("numSide", polyhedra->GetOrig 341 NewAttribute("numSide", polyhedra->GetOriginalParameters()->numSide)); 342 polyhedra_dimensionsElement->setAttributeNod 342 polyhedra_dimensionsElement->setAttributeNode(NewAttribute( 343 "startPhi", polyhedra->GetOriginalParamete 343 "startPhi", polyhedra->GetOriginalParameters()->Start_angle / degree)); 344 polyhedra_dimensionsElement->setAttributeNod 344 polyhedra_dimensionsElement->setAttributeNode(NewAttribute( 345 "openPhi", polyhedra->GetOriginalParameter 345 "openPhi", polyhedra->GetOriginalParameters()->Opening_angle / degree)); 346 polyhedra_dimensionsElement->setAttributeNod 346 polyhedra_dimensionsElement->setAttributeNode(NewAttribute("aunit", "deg")); 347 polyhedra_dimensionsElement->setAttributeNod 347 polyhedra_dimensionsElement->setAttributeNode(NewAttribute("lunit", "mm")); 348 348 349 parametersElement->appendChild(polyhedra_dim 349 parametersElement->appendChild(polyhedra_dimensionsElement); 350 const size_t num_zplanes = polyhedra->GetO 350 const size_t num_zplanes = polyhedra->GetOriginalParameters()->Num_z_planes; 351 const G4double* z_array = polyhedra->GetO 351 const G4double* z_array = polyhedra->GetOriginalParameters()->Z_values; 352 const G4double* rmin_array = polyhedra->GetO 352 const G4double* rmin_array = polyhedra->GetOriginalParameters()->Rmin; 353 const G4double* rmax_array = polyhedra->GetO 353 const G4double* rmax_array = polyhedra->GetOriginalParameters()->Rmax; 354 354 355 for(std::size_t i = 0; i < num_zplanes; ++i) 355 for(std::size_t i = 0; i < num_zplanes; ++i) 356 { 356 { 357 ZplaneWrite(polyhedra_dimensionsElement, z 357 ZplaneWrite(polyhedra_dimensionsElement, z_array[i], rmin_array[i], 358 rmax_array[i]); 358 rmax_array[i]); 359 } 359 } 360 } 360 } 361 361 362 // ------------------------------------------- 362 // -------------------------------------------------------------------- 363 void G4GDMLWriteParamvol::ParametersWrite(xerc 363 void G4GDMLWriteParamvol::ParametersWrite(xercesc::DOMElement* paramvolElement, 364 const G4VPhysicalVolume* co 364 const G4VPhysicalVolume* const paramvol, const G4int& index) 365 { 365 { 366 paramvol->GetParameterisation()->ComputeTran 366 paramvol->GetParameterisation()->ComputeTransformation( 367 index, const_cast<G4VPhysicalVolume*>(para 367 index, const_cast<G4VPhysicalVolume*>(paramvol)); 368 G4ThreeVector Angles; 368 G4ThreeVector Angles; 369 G4String name = GenerateName(paramvol->GetNa 369 G4String name = GenerateName(paramvol->GetName(), paramvol); 370 std::stringstream os; 370 std::stringstream os; 371 os.precision(15); 371 os.precision(15); 372 os << index; 372 os << index; 373 G4String sncopie = os.str(); 373 G4String sncopie = os.str(); 374 374 375 xercesc::DOMElement* parametersElement = New 375 xercesc::DOMElement* parametersElement = NewElement("parameters"); 376 parametersElement->setAttributeNode(NewAttri 376 parametersElement->setAttributeNode(NewAttribute("number", index + 1)); 377 377 378 PositionWrite(parametersElement, name + snco 378 PositionWrite(parametersElement, name + sncopie + "_pos", 379 paramvol->GetObjectTranslation 379 paramvol->GetObjectTranslation()); 380 Angles = GetAngles(paramvol->GetObjectRotati 380 Angles = GetAngles(paramvol->GetObjectRotationValue()); 381 if(Angles.mag2() > DBL_EPSILON) 381 if(Angles.mag2() > DBL_EPSILON) 382 { 382 { 383 RotationWrite(parametersElement, name + sn 383 RotationWrite(parametersElement, name + sncopie + "_rot", 384 GetAngles(paramvol->GetObjec 384 GetAngles(paramvol->GetObjectRotationValue())); 385 } 385 } 386 paramvolElement->appendChild(parametersEleme 386 paramvolElement->appendChild(parametersElement); 387 387 388 G4VSolid* solid = paramvol->GetLogicalVolume 388 G4VSolid* solid = paramvol->GetLogicalVolume()->GetSolid(); 389 389 390 if(G4Box* box = dynamic_cast<G4Box*>(solid)) 390 if(G4Box* box = dynamic_cast<G4Box*>(solid)) 391 { 391 { 392 paramvol->GetParameterisation()->ComputeDi 392 paramvol->GetParameterisation()->ComputeDimensions( 393 *box, index, const_cast<G4VPhysicalVolum 393 *box, index, const_cast<G4VPhysicalVolume*>(paramvol)); 394 Box_dimensionsWrite(parametersElement, box 394 Box_dimensionsWrite(parametersElement, box); 395 } 395 } 396 else if(G4Trd* trd = dynamic_cast<G4Trd*>(so 396 else if(G4Trd* trd = dynamic_cast<G4Trd*>(solid)) 397 { 397 { 398 paramvol->GetParameterisation()->ComputeDi 398 paramvol->GetParameterisation()->ComputeDimensions( 399 *trd, index, const_cast<G4VPhysicalVolum 399 *trd, index, const_cast<G4VPhysicalVolume*>(paramvol)); 400 Trd_dimensionsWrite(parametersElement, trd 400 Trd_dimensionsWrite(parametersElement, trd); 401 } 401 } 402 else if(G4Trap* trap = dynamic_cast<G4Trap*> 402 else if(G4Trap* trap = dynamic_cast<G4Trap*>(solid)) 403 { 403 { 404 paramvol->GetParameterisation()->ComputeDi 404 paramvol->GetParameterisation()->ComputeDimensions( 405 *trap, index, const_cast<G4VPhysicalVolu 405 *trap, index, const_cast<G4VPhysicalVolume*>(paramvol)); 406 Trap_dimensionsWrite(parametersElement, tr 406 Trap_dimensionsWrite(parametersElement, trap); 407 } 407 } 408 else if(G4Tubs* tube = dynamic_cast<G4Tubs*> 408 else if(G4Tubs* tube = dynamic_cast<G4Tubs*>(solid)) 409 { 409 { 410 paramvol->GetParameterisation()->ComputeDi 410 paramvol->GetParameterisation()->ComputeDimensions( 411 *tube, index, const_cast<G4VPhysicalVolu 411 *tube, index, const_cast<G4VPhysicalVolume*>(paramvol)); 412 Tube_dimensionsWrite(parametersElement, tu 412 Tube_dimensionsWrite(parametersElement, tube); 413 } 413 } 414 else if(G4Cons* cone = dynamic_cast<G4Cons*> 414 else if(G4Cons* cone = dynamic_cast<G4Cons*>(solid)) 415 { 415 { 416 paramvol->GetParameterisation()->ComputeDi 416 paramvol->GetParameterisation()->ComputeDimensions( 417 *cone, index, const_cast<G4VPhysicalVolu 417 *cone, index, const_cast<G4VPhysicalVolume*>(paramvol)); 418 Cone_dimensionsWrite(parametersElement, co 418 Cone_dimensionsWrite(parametersElement, cone); 419 } 419 } 420 else if(G4Sphere* sphere = dynamic_cast<G4Sp 420 else if(G4Sphere* sphere = dynamic_cast<G4Sphere*>(solid)) 421 { 421 { 422 paramvol->GetParameterisation()->ComputeDi 422 paramvol->GetParameterisation()->ComputeDimensions( 423 *sphere, index, const_cast<G4VPhysicalVo 423 *sphere, index, const_cast<G4VPhysicalVolume*>(paramvol)); 424 Sphere_dimensionsWrite(parametersElement, 424 Sphere_dimensionsWrite(parametersElement, sphere); 425 } 425 } 426 else if(G4Orb* orb = dynamic_cast<G4Orb*>(so 426 else if(G4Orb* orb = dynamic_cast<G4Orb*>(solid)) 427 { 427 { 428 paramvol->GetParameterisation()->ComputeDi 428 paramvol->GetParameterisation()->ComputeDimensions( 429 *orb, index, const_cast<G4VPhysicalVolum 429 *orb, index, const_cast<G4VPhysicalVolume*>(paramvol)); 430 Orb_dimensionsWrite(parametersElement, orb 430 Orb_dimensionsWrite(parametersElement, orb); 431 } 431 } 432 else if(G4Torus* torus = dynamic_cast<G4Toru 432 else if(G4Torus* torus = dynamic_cast<G4Torus*>(solid)) 433 { 433 { 434 paramvol->GetParameterisation()->ComputeDi 434 paramvol->GetParameterisation()->ComputeDimensions( 435 *torus, index, const_cast<G4VPhysicalVol 435 *torus, index, const_cast<G4VPhysicalVolume*>(paramvol)); 436 Torus_dimensionsWrite(parametersElement, t 436 Torus_dimensionsWrite(parametersElement, torus); 437 } 437 } 438 else if(G4Ellipsoid* ellipsoid = dynamic_cas 438 else if(G4Ellipsoid* ellipsoid = dynamic_cast<G4Ellipsoid*>(solid)) 439 { 439 { 440 paramvol->GetParameterisation()->ComputeDi 440 paramvol->GetParameterisation()->ComputeDimensions( 441 *ellipsoid, index, const_cast<G4VPhysica 441 *ellipsoid, index, const_cast<G4VPhysicalVolume*>(paramvol)); 442 Ellipsoid_dimensionsWrite(parametersElemen 442 Ellipsoid_dimensionsWrite(parametersElement, ellipsoid); 443 } 443 } 444 else if(G4Para* para = dynamic_cast<G4Para*> 444 else if(G4Para* para = dynamic_cast<G4Para*>(solid)) 445 { 445 { 446 paramvol->GetParameterisation()->ComputeDi 446 paramvol->GetParameterisation()->ComputeDimensions( 447 *para, index, const_cast<G4VPhysicalVolu 447 *para, index, const_cast<G4VPhysicalVolume*>(paramvol)); 448 Para_dimensionsWrite(parametersElement, pa 448 Para_dimensionsWrite(parametersElement, para); 449 } 449 } 450 else if(G4Hype* hype = dynamic_cast<G4Hype*> 450 else if(G4Hype* hype = dynamic_cast<G4Hype*>(solid)) 451 { 451 { 452 paramvol->GetParameterisation()->ComputeDi 452 paramvol->GetParameterisation()->ComputeDimensions( 453 *hype, index, const_cast<G4VPhysicalVolu 453 *hype, index, const_cast<G4VPhysicalVolume*>(paramvol)); 454 Hype_dimensionsWrite(parametersElement, hy 454 Hype_dimensionsWrite(parametersElement, hype); 455 } 455 } 456 else if(G4Polycone* pcone = dynamic_cast<G4P 456 else if(G4Polycone* pcone = dynamic_cast<G4Polycone*>(solid)) 457 { 457 { 458 paramvol->GetParameterisation()->ComputeDi 458 paramvol->GetParameterisation()->ComputeDimensions( 459 *pcone, index, const_cast<G4VPhysicalVol 459 *pcone, index, const_cast<G4VPhysicalVolume*>(paramvol)); 460 Polycone_dimensionsWrite(parametersElement 460 Polycone_dimensionsWrite(parametersElement, pcone); 461 } 461 } 462 else if(G4Polyhedra* polyhedra = dynamic_cas 462 else if(G4Polyhedra* polyhedra = dynamic_cast<G4Polyhedra*>(solid)) 463 { 463 { 464 paramvol->GetParameterisation()->ComputeDi 464 paramvol->GetParameterisation()->ComputeDimensions( 465 *polyhedra, index, const_cast<G4VPhysica 465 *polyhedra, index, const_cast<G4VPhysicalVolume*>(paramvol)); 466 Polyhedra_dimensionsWrite(parametersElemen 466 Polyhedra_dimensionsWrite(parametersElement, polyhedra); 467 } 467 } 468 else 468 else 469 { 469 { 470 G4String error_msg = "Solid '" + solid->Ge 470 G4String error_msg = "Solid '" + solid->GetName() + 471 "' cannot be used in 471 "' cannot be used in parameterised volume!"; 472 G4Exception("G4GDMLWriteParamvol::Paramete 472 G4Exception("G4GDMLWriteParamvol::ParametersWrite()", "InvalidSetup", 473 FatalException, error_msg); 473 FatalException, error_msg); 474 } 474 } 475 } 475 } 476 476 477 // ------------------------------------------- 477 // -------------------------------------------------------------------- 478 void G4GDMLWriteParamvol::ParamvolWrite(xerces 478 void G4GDMLWriteParamvol::ParamvolWrite(xercesc::DOMElement* volumeElement, 479 const 479 const G4VPhysicalVolume* const paramvol) 480 { 480 { 481 const G4String volumeref = GenerateName( 481 const G4String volumeref = GenerateName( 482 paramvol->GetLogicalVolume()->GetName(), p 482 paramvol->GetLogicalVolume()->GetName(), paramvol->GetLogicalVolume()); 483 xercesc::DOMElement* paramvolElement = NewEl 483 xercesc::DOMElement* paramvolElement = NewElement("paramvol"); 484 paramvolElement->setAttributeNode( 484 paramvolElement->setAttributeNode( 485 NewAttribute("ncopies", paramvol->GetMulti 485 NewAttribute("ncopies", paramvol->GetMultiplicity())); 486 xercesc::DOMElement* volumerefElement = NewE 486 xercesc::DOMElement* volumerefElement = NewElement("volumeref"); 487 volumerefElement->setAttributeNode(NewAttrib 487 volumerefElement->setAttributeNode(NewAttribute("ref", volumeref)); 488 488 489 xercesc::DOMElement* algorithmElement = 489 xercesc::DOMElement* algorithmElement = 490 NewElement("parameterised_position_size"); 490 NewElement("parameterised_position_size"); 491 paramvolElement->appendChild(volumerefElemen 491 paramvolElement->appendChild(volumerefElement); 492 paramvolElement->appendChild(algorithmElemen 492 paramvolElement->appendChild(algorithmElement); 493 ParamvolAlgorithmWrite(algorithmElement, par 493 ParamvolAlgorithmWrite(algorithmElement, paramvol); 494 volumeElement->appendChild(paramvolElement); 494 volumeElement->appendChild(paramvolElement); 495 } 495 } 496 496 497 // ------------------------------------------- 497 // -------------------------------------------------------------------- 498 void G4GDMLWriteParamvol::ParamvolAlgorithmWri 498 void G4GDMLWriteParamvol::ParamvolAlgorithmWrite( 499 xercesc::DOMElement* paramvolElement, const 499 xercesc::DOMElement* paramvolElement, const G4VPhysicalVolume* const paramvol) 500 { 500 { 501 const G4String volumeref = GenerateName( 501 const G4String volumeref = GenerateName( 502 paramvol->GetLogicalVolume()->GetName(), p 502 paramvol->GetLogicalVolume()->GetName(), paramvol->GetLogicalVolume()); 503 503 504 const G4int parameterCount = paramvol->GetMu 504 const G4int parameterCount = paramvol->GetMultiplicity(); 505 505 506 for(G4int i = 0; i < parameterCount; ++i) 506 for(G4int i = 0; i < parameterCount; ++i) 507 { 507 { 508 ParametersWrite(paramvolElement, paramvol, 508 ParametersWrite(paramvolElement, paramvol, i); 509 } 509 } 510 } 510 } 511 511