[807] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // $Id: RemSimVehicle1.cc,v 1.9 2006/06/29 16:24:31 gunter Exp $ |
---|
[1230] | 27 | // GEANT4 tag $Name: geant4-09-03-cand-01 $ |
---|
[807] | 28 | // |
---|
| 29 | // Code developed by: S.Guatelli, guatelli@ge.infn.it |
---|
| 30 | // |
---|
| 31 | #include "RemSimVGeometryComponent.hh" |
---|
| 32 | #include "RemSimMaterial.hh" |
---|
| 33 | #include "G4Material.hh" |
---|
| 34 | #include "RemSimVehicle1.hh" |
---|
| 35 | #include "G4Box.hh" |
---|
| 36 | #include "G4LogicalVolume.hh" |
---|
| 37 | #include "G4VPhysicalVolume.hh" |
---|
| 38 | #include "G4PVPlacement.hh" |
---|
| 39 | #include "G4VisAttributes.hh" |
---|
| 40 | #include "G4UserLimits.hh" |
---|
| 41 | |
---|
| 42 | RemSimVehicle1::RemSimVehicle1(): |
---|
| 43 | layervacuumPhys(0), layer1Phys(0), layer2Phys(0), layer3Phys(0), |
---|
| 44 | layer4Phys(0), layer5Phys(0), layer6Phys(0), layer7Phys(0), layer8Phys(0), |
---|
| 45 | layer9Phys(0), layer10Phys(0), layer11Phys(0), layer12Phys(0), |
---|
| 46 | layer13Phys(0), layer14Phys(0), layer15Phys(0), layerPhys(0), |
---|
| 47 | layer16Phys(0), layer17Phys(0), layer18Phys(0), layer19Phys(0), |
---|
| 48 | layer20Phys(0), layer21Phys(0), layer22Phys(0), layer23Phys(0), |
---|
| 49 | layer24Phys(0), layer25Phys(0), layer26Phys(0), layer27Phys(0) |
---|
| 50 | { |
---|
| 51 | pMaterial = new RemSimMaterial(); |
---|
| 52 | } |
---|
| 53 | RemSimVehicle1::~RemSimVehicle1() |
---|
| 54 | { |
---|
| 55 | delete pMaterial; |
---|
| 56 | } |
---|
| 57 | void RemSimVehicle1::ConstructComponent(G4VPhysicalVolume* motherVolume) |
---|
| 58 | { |
---|
| 59 | |
---|
| 60 | G4double sizeX = 5.*m; |
---|
| 61 | G4double sizeY = 5.*m; |
---|
| 62 | |
---|
| 63 | G4Material* betacloth = pMaterial -> GetMaterial("betacloth"); |
---|
| 64 | |
---|
| 65 | //layer of betacloth |
---|
| 66 | G4double translation = - 5.*m; |
---|
| 67 | |
---|
| 68 | G4double thick = 0.03 *cm; |
---|
| 69 | |
---|
| 70 | G4Box* layer1 = new G4Box("layer1",sizeX/2.,sizeY/2.,thick/2.); |
---|
| 71 | |
---|
| 72 | G4LogicalVolume* layer1Log = new G4LogicalVolume(layer1, |
---|
| 73 | betacloth, |
---|
| 74 | "layer1Log", |
---|
| 75 | 0,0,0); |
---|
| 76 | |
---|
| 77 | layer1Phys = new G4PVPlacement(0, |
---|
| 78 | G4ThreeVector(0.,0.,translation+thick/2.), |
---|
| 79 | "layer1Phys", |
---|
| 80 | layer1Log, |
---|
| 81 | motherVolume, |
---|
| 82 | false, |
---|
| 83 | 0); |
---|
| 84 | |
---|
| 85 | translation = translation + thick; |
---|
| 86 | |
---|
| 87 | thick = 0.01*cm; |
---|
| 88 | |
---|
| 89 | // Mylar layer |
---|
| 90 | G4Material* mylar = pMaterial -> GetMaterial("mylar"); |
---|
| 91 | |
---|
| 92 | G4Box* layer2 = new G4Box("layer2",sizeX/2.,sizeY/2.,thick/2.); |
---|
| 93 | |
---|
| 94 | G4LogicalVolume* layer2Log = new G4LogicalVolume(layer2, |
---|
| 95 | mylar, |
---|
| 96 | "layer2Log", |
---|
| 97 | 0,0,0); |
---|
| 98 | |
---|
| 99 | layer2Phys = new G4PVPlacement(0, |
---|
| 100 | G4ThreeVector(0.,0.,thick/2.+ translation), |
---|
| 101 | "layer2Phys", |
---|
| 102 | layer2Log, |
---|
| 103 | motherVolume, |
---|
| 104 | false,0); |
---|
| 105 | // Nextel layer |
---|
| 106 | G4Material* nextel = pMaterial -> GetMaterial("Nextel312AF62"); |
---|
| 107 | translation = translation + thick; |
---|
| 108 | thick = 0.1*cm; |
---|
| 109 | |
---|
| 110 | G4Box* layer3 = new G4Box("layer3",sizeX/2.,sizeY/2.,thick/2.); |
---|
| 111 | |
---|
| 112 | G4LogicalVolume* layer3Log = new G4LogicalVolume(layer3, |
---|
| 113 | nextel, |
---|
| 114 | "layer3Log", |
---|
| 115 | 0,0,0); |
---|
| 116 | |
---|
| 117 | layer3Phys = new G4PVPlacement(0, |
---|
| 118 | G4ThreeVector(0.,0.,thick/2.+ translation), |
---|
| 119 | "layer3Phys", |
---|
| 120 | layer3Log, |
---|
| 121 | motherVolume, |
---|
| 122 | false,0); |
---|
| 123 | |
---|
| 124 | translation = translation + thick; |
---|
| 125 | thick = 10.06*cm; |
---|
| 126 | G4Material* vacuum = pMaterial -> GetMaterial("Galactic") ; |
---|
| 127 | G4Box* layer4 = new G4Box("layer4",sizeX/2.,sizeY/2.,thick/2.); |
---|
| 128 | |
---|
| 129 | G4LogicalVolume* layer4Log = new G4LogicalVolume(layer4, |
---|
| 130 | vacuum, |
---|
| 131 | "layer4Log", |
---|
| 132 | 0,0,0); |
---|
| 133 | layer4Phys = new G4PVPlacement(0, |
---|
| 134 | G4ThreeVector(0.,0.,thick/2.+ translation), |
---|
| 135 | "layer4Phys", |
---|
| 136 | layer4Log, |
---|
| 137 | motherVolume, |
---|
| 138 | false,0); |
---|
| 139 | // Nextel layer |
---|
| 140 | thick = 0.1*cm; |
---|
| 141 | translation = translation + 10.06*cm; |
---|
| 142 | layer5Phys = new G4PVPlacement(0, |
---|
| 143 | G4ThreeVector(0.,0.,thick/2.+ translation), |
---|
| 144 | "layer5Phys", |
---|
| 145 | layer3Log, |
---|
| 146 | motherVolume, |
---|
| 147 | false,0); |
---|
| 148 | //Vacuum layer |
---|
| 149 | translation = translation + thick; |
---|
| 150 | thick = 10.06 * cm; |
---|
| 151 | |
---|
| 152 | layer6Phys = new G4PVPlacement(0, |
---|
| 153 | G4ThreeVector(0.,0.,thick/2.+ translation), |
---|
| 154 | "layer6Phys", |
---|
| 155 | layer4Log, |
---|
| 156 | motherVolume, |
---|
| 157 | false,0); |
---|
| 158 | // Nextel layer |
---|
| 159 | translation = translation + thick; |
---|
| 160 | thick = 0.2*cm; |
---|
| 161 | |
---|
| 162 | layer7Phys = new G4PVPlacement(0, |
---|
| 163 | G4ThreeVector(0.,0.,thick/2.+ translation), |
---|
| 164 | "layer7Phys", |
---|
| 165 | layer3Log, |
---|
| 166 | motherVolume, |
---|
| 167 | false,0); |
---|
| 168 | // mylar layer |
---|
| 169 | translation = translation + thick; |
---|
| 170 | thick = 0.20 *cm; |
---|
| 171 | |
---|
| 172 | G4Box* layer8 = new G4Box("layer8",sizeX/2.,sizeY/2.,thick/2.); |
---|
| 173 | |
---|
| 174 | G4LogicalVolume* layer8Log = new G4LogicalVolume(layer8, |
---|
| 175 | mylar, |
---|
| 176 | "layer8Log", |
---|
| 177 | 0,0,0); |
---|
| 178 | |
---|
| 179 | layer8Phys = new G4PVPlacement(0, |
---|
| 180 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 181 | "layer8Phys", |
---|
| 182 | layer8Log, |
---|
| 183 | motherVolume, |
---|
| 184 | false,0); |
---|
| 185 | |
---|
| 186 | //Vacuum layer |
---|
| 187 | translation = translation + thick; |
---|
| 188 | thick = 10.06 * cm; |
---|
| 189 | |
---|
| 190 | layer9Phys = new G4PVPlacement(0, |
---|
| 191 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 192 | "layer6Phys", |
---|
| 193 | layer4Log, |
---|
| 194 | motherVolume, |
---|
| 195 | false,0); |
---|
| 196 | // mylar layer |
---|
| 197 | translation = translation + thick; |
---|
| 198 | thick = 0.2 *cm; |
---|
| 199 | |
---|
| 200 | G4Box* layer10 = new G4Box("layer10",sizeX/2.,sizeY/2.,thick/2.); |
---|
| 201 | |
---|
| 202 | G4LogicalVolume* layer10Log = new G4LogicalVolume(layer10, |
---|
| 203 | mylar, |
---|
| 204 | "layer10Log", |
---|
| 205 | 0,0,0); |
---|
| 206 | |
---|
| 207 | layer10Phys = new G4PVPlacement(0, |
---|
| 208 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 209 | "layer10Phys", |
---|
| 210 | layer10Log, |
---|
| 211 | motherVolume, |
---|
| 212 | false,0); |
---|
| 213 | //Redundant Bladder |
---|
| 214 | //Polyethylene |
---|
| 215 | G4Material* polyethilene = pMaterial -> GetMaterial("polyethylene"); |
---|
| 216 | translation = translation + thick; |
---|
| 217 | thick = 0.0028*cm; |
---|
| 218 | |
---|
| 219 | G4Box* layer11 = new G4Box("layer11", sizeX/2.,sizeY/2.,thick/2.); |
---|
| 220 | |
---|
| 221 | G4LogicalVolume* layer11Log = new G4LogicalVolume(layer11, |
---|
| 222 | polyethilene, |
---|
| 223 | "layer11Log", |
---|
| 224 | 0,0,0); |
---|
| 225 | |
---|
| 226 | layer11Phys = new G4PVPlacement(0, |
---|
| 227 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 228 | "layer11Phys", |
---|
| 229 | layer11Log, |
---|
| 230 | motherVolume, |
---|
| 231 | false,0); |
---|
| 232 | //ployacrylate |
---|
| 233 | translation = translation + thick; |
---|
| 234 | thick = 0.0028*cm; |
---|
| 235 | |
---|
| 236 | G4Material* polyacrylate = pMaterial ->GetMaterial("polyacrylate"); |
---|
| 237 | G4LogicalVolume* layer12Log = new G4LogicalVolume(layer11, |
---|
| 238 | polyacrylate, |
---|
| 239 | "layer12Log", |
---|
| 240 | 0,0,0); |
---|
| 241 | |
---|
| 242 | layer12Phys = new G4PVPlacement(0, |
---|
| 243 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 244 | "layer12Phys", |
---|
| 245 | layer12Log, |
---|
| 246 | motherVolume, |
---|
| 247 | false,0); |
---|
| 248 | |
---|
| 249 | //evoh layer |
---|
| 250 | translation = translation + thick; |
---|
| 251 | thick = 0.0028*cm; |
---|
| 252 | G4Material* evoh = pMaterial ->GetMaterial("evoh"); |
---|
| 253 | G4LogicalVolume* layer13Log = new G4LogicalVolume(layer11, |
---|
| 254 | evoh, |
---|
| 255 | "layer13Log", |
---|
| 256 | 0,0,0); |
---|
| 257 | |
---|
| 258 | layer13Phys = new G4PVPlacement(0, |
---|
| 259 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 260 | "layer13Phys", |
---|
| 261 | layer13Log, |
---|
| 262 | motherVolume, |
---|
| 263 | false,0); |
---|
| 264 | //polyacrylate |
---|
| 265 | translation = translation + thick; |
---|
| 266 | thick = 0.0028*cm; |
---|
| 267 | |
---|
| 268 | layer14Phys = new G4PVPlacement(0, |
---|
| 269 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 270 | "layer14Phys", |
---|
| 271 | layer12Log, |
---|
| 272 | motherVolume, |
---|
| 273 | false,0); |
---|
| 274 | //polyethilene |
---|
| 275 | translation = translation + thick; |
---|
| 276 | thick = 0.0028*cm; |
---|
| 277 | |
---|
| 278 | layer15Phys = new G4PVPlacement(0, |
---|
| 279 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 280 | "layer15Phys", |
---|
| 281 | layer11Log, |
---|
| 282 | motherVolume, |
---|
| 283 | false,0); |
---|
| 284 | //kevlar layer |
---|
| 285 | translation = translation + thick; |
---|
| 286 | thick = 0.026*cm; |
---|
| 287 | |
---|
| 288 | G4Material* kevlarAir = pMaterial -> GetMaterial("kevlarAir"); |
---|
| 289 | |
---|
| 290 | G4Box* layer = new G4Box("layer",sizeX/2.,sizeY/2.,thick/2.); |
---|
| 291 | |
---|
| 292 | G4LogicalVolume* layerLog = new G4LogicalVolume(layer, |
---|
| 293 | kevlarAir, |
---|
| 294 | "layerLog", |
---|
| 295 | 0,0,0); |
---|
| 296 | |
---|
| 297 | layerPhys = new G4PVPlacement(0, |
---|
| 298 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 299 | "layerPhys", |
---|
| 300 | layerLog, |
---|
| 301 | motherVolume, |
---|
| 302 | false,0); |
---|
| 303 | //polyethilene layer |
---|
| 304 | translation = translation + thick; |
---|
| 305 | thick = 0.0028*cm; |
---|
| 306 | |
---|
| 307 | layer16Phys = new G4PVPlacement(0, |
---|
| 308 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 309 | "layer16Phys", |
---|
| 310 | layer11Log, |
---|
| 311 | motherVolume, |
---|
| 312 | false,0); |
---|
| 313 | //polyacrylate layer |
---|
| 314 | translation = translation + thick; |
---|
| 315 | thick = 0.0028*cm; |
---|
| 316 | |
---|
| 317 | layer17Phys = new G4PVPlacement(0, |
---|
| 318 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 319 | "layer17Phys", |
---|
| 320 | layer12Log, |
---|
| 321 | motherVolume, |
---|
| 322 | false,0); |
---|
| 323 | //evoh |
---|
| 324 | translation = translation + thick; |
---|
| 325 | thick = 0.0028*cm; |
---|
| 326 | |
---|
| 327 | layer18Phys = new G4PVPlacement(0, |
---|
| 328 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 329 | "layer18Phys", |
---|
| 330 | layer13Log, |
---|
| 331 | motherVolume, |
---|
| 332 | false,0); |
---|
| 333 | //polyacrylate layer |
---|
| 334 | translation = translation + thick; |
---|
| 335 | thick = 0.0028*cm; |
---|
| 336 | layer19Phys = new G4PVPlacement(0, |
---|
| 337 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 338 | "layer19Phys", |
---|
| 339 | layer12Log, |
---|
| 340 | motherVolume, |
---|
| 341 | false,0); |
---|
| 342 | //polyethilene layer |
---|
| 343 | translation = translation + thick; |
---|
| 344 | thick = 0.0028*cm; |
---|
| 345 | |
---|
| 346 | layer20Phys = new G4PVPlacement(0, |
---|
| 347 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 348 | "layer20Phys", |
---|
| 349 | layer11Log, |
---|
| 350 | motherVolume, |
---|
| 351 | false,0); |
---|
| 352 | //kevlar layer |
---|
| 353 | translation = translation + thick; |
---|
| 354 | thick = 0.026*cm; |
---|
| 355 | |
---|
| 356 | layer21Phys = new G4PVPlacement(0, |
---|
| 357 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 358 | "layer21Phys", |
---|
| 359 | layerLog, |
---|
| 360 | motherVolume, |
---|
| 361 | false,0); |
---|
| 362 | //polyethilene layer |
---|
| 363 | translation = translation + thick; |
---|
| 364 | thick = 0.0028*cm; |
---|
| 365 | |
---|
| 366 | layer22Phys = new G4PVPlacement(0, |
---|
| 367 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 368 | "layer22Phys", |
---|
| 369 | layer11Log, |
---|
| 370 | motherVolume, |
---|
| 371 | false,0); |
---|
| 372 | //polyacrylate layer |
---|
| 373 | translation = translation + thick; |
---|
| 374 | thick = 0.0028*cm; |
---|
| 375 | |
---|
| 376 | layer23Phys = new G4PVPlacement(0, |
---|
| 377 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 378 | "layer23Phys", |
---|
| 379 | layer12Log, |
---|
| 380 | motherVolume, |
---|
| 381 | false,0); |
---|
| 382 | //evoh layer |
---|
| 383 | translation = translation + thick; |
---|
| 384 | thick = 0.0028*cm; |
---|
| 385 | |
---|
| 386 | layer24Phys = new G4PVPlacement(0, |
---|
| 387 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 388 | "layer24Phys", |
---|
| 389 | layer13Log, |
---|
| 390 | motherVolume, |
---|
| 391 | false,0); |
---|
| 392 | //polyacrylate layer |
---|
| 393 | translation = translation + thick; |
---|
| 394 | thick = 0.0028*cm; |
---|
| 395 | |
---|
| 396 | layer25Phys = new G4PVPlacement(0, |
---|
| 397 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 398 | "layer25Phys", |
---|
| 399 | layer12Log, |
---|
| 400 | motherVolume, |
---|
| 401 | false,0); |
---|
| 402 | |
---|
| 403 | //polyethilene layer |
---|
| 404 | translation = translation + thick; |
---|
| 405 | thick = 0.0028*cm; |
---|
| 406 | |
---|
| 407 | layer26Phys = new G4PVPlacement(0, |
---|
| 408 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 409 | "layer26Phys", |
---|
| 410 | layer11Log, |
---|
| 411 | motherVolume, |
---|
| 412 | false,0); |
---|
| 413 | |
---|
| 414 | //nomex layer |
---|
| 415 | translation = translation + thick; |
---|
| 416 | thick = 0.03*cm; |
---|
| 417 | |
---|
| 418 | G4Material* nomex= pMaterial ->GetMaterial("nomexAir"); |
---|
| 419 | |
---|
| 420 | G4Box* layer27 = new G4Box("layer27",sizeX/2.,sizeY/2.,thick/2.); |
---|
| 421 | |
---|
| 422 | G4LogicalVolume* layer27Log = new G4LogicalVolume(layer27, |
---|
| 423 | nomex, |
---|
| 424 | "layer27Log", |
---|
| 425 | 0,0,0); |
---|
| 426 | |
---|
| 427 | layer27Phys = new G4PVPlacement(0, |
---|
| 428 | G4ThreeVector(0.,0.,thick/2.+translation), |
---|
| 429 | "layer27Phys", |
---|
| 430 | layer27Log, |
---|
| 431 | motherVolume, |
---|
| 432 | false,0); |
---|
| 433 | translation = translation + thick; |
---|
| 434 | |
---|
| 435 | G4Colour magenta (1.0, 0.0, 1.0) ; |
---|
| 436 | G4Colour green (0.0,1.0,0.0); |
---|
| 437 | |
---|
| 438 | G4VisAttributes* layer1VisAtt = new G4VisAttributes(green); |
---|
| 439 | layer1VisAtt -> SetVisibility(true); |
---|
| 440 | layer1VisAtt -> SetForceSolid(true); |
---|
| 441 | layer1Log -> SetVisAttributes(layer1VisAtt); |
---|
| 442 | layer3Log -> SetVisAttributes(layer1VisAtt); |
---|
| 443 | layer8Log -> SetVisAttributes(layer1VisAtt); |
---|
| 444 | layer11Log -> SetVisAttributes(layer1VisAtt); |
---|
| 445 | layer13Log -> SetVisAttributes(layer1VisAtt); |
---|
| 446 | |
---|
| 447 | G4VisAttributes* layer2VisAtt = new G4VisAttributes(magenta); |
---|
| 448 | layer2VisAtt -> SetVisibility(true); |
---|
| 449 | layer2VisAtt -> SetForceSolid(true); |
---|
| 450 | layer2Log -> SetVisAttributes(layer2VisAtt); |
---|
| 451 | layer4Log -> SetVisAttributes(layer2VisAtt); |
---|
| 452 | layer10Log -> SetVisAttributes(layer2VisAtt); |
---|
| 453 | layer12Log -> SetVisAttributes(layer2VisAtt); |
---|
| 454 | layer27Log -> SetVisAttributes(layer2VisAtt); |
---|
| 455 | } |
---|
| 456 | |
---|
| 457 | void RemSimVehicle1::DestroyComponent() |
---|
| 458 | { |
---|
| 459 | } |
---|