source: trunk/examples/extended/parallel/ExDiane/src/BrachyDetectorConstructionLeipzig.cc@ 1036

Last change on this file since 1036 was 807, checked in by garnier, 17 years ago

update

File size: 6.8 KB
RevLine 
[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//
27// --------------------------------------------------------------
28// GEANT 4 - Brachytherapy example
29// --------------------------------------------------------------
30//
31// Code developed by: S.Guatelli
32//
33// *******************************************
34// * *
35// * BrachyDetectorConstructionLeipzig.cc *
36// * *
37// *******************************************
38//
39//
40// $Id: BrachyDetectorConstructionLeipzig.cc,v 1.3 2006/06/29 17:32:59 gunter Exp $
41// GEANT4 tag $Name: $
42//
43
44#include "globals.hh"
45#include "BrachyDetectorConstructionLeipzig.hh"
46#include "G4CSGSolid.hh"
47#include "G4Sphere.hh"
48#include "G4MaterialPropertyVector.hh"
49#include "G4SDManager.hh"
50#include "G4SubtractionSolid.hh"
51#include "G4RunManager.hh"
52#include "G4MaterialPropertiesTable.hh"
53#include "G4Material.hh"
54#include "G4Box.hh"
55#include "G4Tubs.hh"
56#include "G4LogicalVolume.hh"
57#include "G4ThreeVector.hh"
58#include "G4PVPlacement.hh"
59#include "G4MaterialTable.hh"
60#include "Randomize.hh"
61#include "G4RunManager.hh"
62#include "G4Element.hh"
63#include "G4ElementTable.hh"
64#include "G4PVParameterised.hh"
65#include "G4Transform3D.hh"
66#include "G4RotationMatrix.hh"
67#include "G4FieldManager.hh"
68#include "G4TransportationManager.hh"
69#include "G4UnionSolid.hh"
70#include "BrachyMaterial.hh"
71#include "G4VisAttributes.hh"
72#include "G4Colour.hh"
73
74// Leipzig Applicator ...
75
76BrachyDetectorConstructionLeipzig::BrachyDetectorConstructionLeipzig()
77: capsule(0), capsuleLog(0), capsulePhys(0),
78 capsuleTip(0), capsuleTipLog(0), capsuleTipPhys(0),
79 iridiumCore(0), iridiumCoreLog(0), iridiumCorePhys(0),
80 applicator1(0), applicator1Log(0), applicator1Phys(0),
81 applicator2(0), applicator2Log(0), applicator2Phys(0)
82{
83 pMaterial = new BrachyMaterial();
84}
85
86BrachyDetectorConstructionLeipzig::~BrachyDetectorConstructionLeipzig()
87{
88 delete pMaterial;
89}
90
91void BrachyDetectorConstructionLeipzig::ConstructLeipzig(G4VPhysicalVolume* mother)
92{
93 G4Colour red (1.0, 0.0, 0.0) ;
94
95 G4Material* capsuleMat = pMaterial -> GetMat("Stainless steel");
96 G4Material* iridium = pMaterial -> GetMat("Iridium");
97 G4Material* tungsten =pMaterial -> GetMat("Tungsten");
98
99 //Iridium source ...
100
101 capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
102 capsuleLog = new G4LogicalVolume(capsule,capsuleMat,"CapsuleLog");
103 capsulePhys = new G4PVPlacement(0,
104 G4ThreeVector(0,0,-1.975*mm),
105 "CapsulePhys",
106 capsuleLog,
107 mother, //mother volume: phantom
108 false,
109 0);
110
111 // Capsule tip
112 capsuleTip = new G4Sphere("CapsuleTip",0.*mm,0.55*mm,0.*deg,360.*deg,0.*deg,90.*deg);
113 capsuleTipLog = new G4LogicalVolume(capsuleTip,capsuleMat,"CapsuleTipLog");
114 capsuleTipPhys = new G4PVPlacement(0,
115 G4ThreeVector(0.,0.,1.75*mm),
116 "CapsuleTipPhys",
117 capsuleTipLog,
118 mother,
119 false,
120 0);
121 // Iridium core
122
123 iridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
124 iridiumCoreLog = new G4LogicalVolume(iridiumCore,
125 iridium,
126 "IridiumCoreLog");
127 iridiumCorePhys = new G4PVPlacement(0,
128 G4ThreeVector(0.,0.,1.975*mm),
129 "IridiumCorePhys",
130 iridiumCoreLog,
131 capsulePhys,
132 false,
133 0);
134 // Applicator
135 //Leipzig Applicator is given by two different volumes
136
137 applicator1 = new G4Tubs("Appl1",5*mm,10.5*mm,12*mm,0.*deg,360.*deg);
138 applicator1Log = new G4LogicalVolume(applicator1,tungsten,"Appl1Log");
139 applicator1Phys = new G4PVPlacement(0,
140 G4ThreeVector(0,0,4.0*mm),
141 "Appl1Phys",
142 applicator1Log,
143 mother,
144 false,
145 0);
146
147 applicator2 = new G4Tubs("Appl2",0.55*mm,5.*mm,3.125*mm,0.*deg,360.*deg);
148 applicator2Log = new G4LogicalVolume(applicator2,tungsten,"Appl2");
149 applicator2Phys = new G4PVPlacement(0,
150 G4ThreeVector(0,0,-4.875*mm),
151 "Appl2Phys",
152 applicator2Log,
153 mother,
154 false,
155 0);
156
157 G4VisAttributes* simpleCapsuleVisAtt = new G4VisAttributes(red);
158 simpleCapsuleVisAtt -> SetVisibility(true);
159 simpleCapsuleVisAtt -> SetForceSolid(true);
160 capsuleLog -> SetVisAttributes(simpleCapsuleVisAtt);
161
162 G4VisAttributes* simpleCapsuleTipVisAtt = new G4VisAttributes(red);
163 simpleCapsuleTipVisAtt -> SetVisibility(true);
164 simpleCapsuleTipVisAtt -> SetForceSolid(true);
165 capsuleTipLog -> SetVisAttributes(simpleCapsuleTipVisAtt);
166}
Note: See TracBrowser for help on using the repository browser.