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 | // $Id: MedLinacMLCDecorator.cc,v 1.3 2006/06/29 16:04:27 gunter Exp $ |
---|
28 | // |
---|
29 | // Code developed by: M. Piergentili |
---|
30 | // |
---|
31 | // |
---|
32 | #include "MedLinacVGeometryComponent.hh" |
---|
33 | #include "G4Material.hh" |
---|
34 | #include "MedLinacMLCDecorator.hh" |
---|
35 | #include "MedLinacDecorator.hh" |
---|
36 | #include "MedLinacMLCMessenger.hh" |
---|
37 | |
---|
38 | #include "globals.hh" |
---|
39 | #include "G4LogicalVolume.hh" |
---|
40 | #include "G4RotationMatrix.hh" |
---|
41 | #include "G4Transform3D.hh" |
---|
42 | #include "G4VPhysicalVolume.hh" |
---|
43 | #include "G4PVPlacement.hh" |
---|
44 | #include "G4Material.hh" |
---|
45 | #include "G4MaterialPropertiesTable.hh" |
---|
46 | #include "G4MaterialTable.hh" |
---|
47 | #include "G4MaterialPropertyVector.hh" |
---|
48 | #include "G4Element.hh" |
---|
49 | #include "G4ElementTable.hh" |
---|
50 | #include "G4Box.hh" |
---|
51 | #include "G4Cons.hh" |
---|
52 | #include "G4Tubs.hh" |
---|
53 | #include "G4ThreeVector.hh" |
---|
54 | #include "G4VisAttributes.hh" |
---|
55 | #include "G4GeometryManager.hh" |
---|
56 | #include "G4BooleanSolid.hh" |
---|
57 | #include "G4SubtractionSolid.hh" |
---|
58 | #include "G4UnionSolid.hh" |
---|
59 | #include "G4VSolid.hh" |
---|
60 | #include "G4PhysicalVolumeStore.hh" |
---|
61 | #include "G4LogicalVolumeStore.hh" |
---|
62 | #include "G4SolidStore.hh" |
---|
63 | #include "G4Colour.hh" |
---|
64 | |
---|
65 | #include "G4ios.hh" |
---|
66 | MedLinacMLCDecorator::MedLinacMLCDecorator(MedLinacVGeometryComponent* comp) |
---|
67 | : MedLinacDecorator(comp), |
---|
68 | leafLog(0), |
---|
69 | leafAPhys(0), leafBPhys(0) |
---|
70 | { |
---|
71 | |
---|
72 | // default parameter values |
---|
73 | |
---|
74 | a1y = 40.*cm; |
---|
75 | a2y = 40.*cm; |
---|
76 | a3y = 40.*cm; |
---|
77 | a4y = 40.*cm; |
---|
78 | a5y = 40.*cm; |
---|
79 | a6y = 40.*cm; |
---|
80 | a7y = 40.*cm; |
---|
81 | a8y = 40.*cm; |
---|
82 | a9y = 40.*cm; |
---|
83 | a10y = 40.*cm; |
---|
84 | a11y = 40.*cm; |
---|
85 | a12y = 40.*cm; |
---|
86 | a13y = 40.*cm; |
---|
87 | a14y = 40.*cm; |
---|
88 | a15y = 40.*cm; |
---|
89 | a16y = 40.*cm; |
---|
90 | a17y = 40.*cm; |
---|
91 | a18y = 40.*cm; |
---|
92 | a19y = 40.*cm; |
---|
93 | a20y = 40.*cm; |
---|
94 | a21y = 40.*cm; |
---|
95 | a22y = 40.*cm; |
---|
96 | a23y = 40.*cm; |
---|
97 | a24y = 40.*cm; |
---|
98 | a25y = 40.*cm; |
---|
99 | a26y = 40.*cm; |
---|
100 | a27y = 40.*cm; |
---|
101 | a28y = 40.*cm; |
---|
102 | a29y = 40.*cm; |
---|
103 | a30y = 40.*cm; |
---|
104 | a31y = 40.*cm; |
---|
105 | a32y = 40.*cm; |
---|
106 | a33y = 40.*cm; |
---|
107 | a34y = 40.*cm; |
---|
108 | a35y = 40.*cm; |
---|
109 | a36y = 40.*cm; |
---|
110 | a37y = 40.*cm; |
---|
111 | a38y = 40.*cm; |
---|
112 | a39y = 40.*cm; |
---|
113 | a40y = 40.*cm; |
---|
114 | |
---|
115 | b1y = 40.*cm; |
---|
116 | b2y = 40.*cm; |
---|
117 | b3y = 40.*cm; |
---|
118 | b4y = 40.*cm; |
---|
119 | b5y = 40.*cm; |
---|
120 | b6y = 40.*cm; |
---|
121 | b7y = 40.*cm; |
---|
122 | b8y = 40.*cm; |
---|
123 | b9y = 40.*cm; |
---|
124 | b10y = 40.*cm; |
---|
125 | b11y = 40.*cm; |
---|
126 | b12y = 40.*cm; |
---|
127 | b13y = 40.*cm; |
---|
128 | b14y = 40.*cm; |
---|
129 | b15y = 40.*cm; |
---|
130 | b16y = 40.*cm; |
---|
131 | b17y = 40.*cm; |
---|
132 | b18y = 40.*cm; |
---|
133 | b19y = 40.*cm; |
---|
134 | b20y = 40.*cm; |
---|
135 | b21y = 40.*cm; |
---|
136 | b22y = 40.*cm; |
---|
137 | b23y = 40.*cm; |
---|
138 | b24y = 40.*cm; |
---|
139 | b25y = 40.*cm; |
---|
140 | b26y = 40.*cm; |
---|
141 | b27y = 40.*cm; |
---|
142 | b28y = 40.*cm; |
---|
143 | b29y = 40.*cm; |
---|
144 | b30y = 40.*cm; |
---|
145 | b31y = 40.*cm; |
---|
146 | b32y = 40.*cm; |
---|
147 | b33y = 40.*cm; |
---|
148 | b34y = 40.*cm; |
---|
149 | b35y = 40.*cm; |
---|
150 | b36y = 40.*cm; |
---|
151 | b37y = 40.*cm; |
---|
152 | b38y = 40.*cm; |
---|
153 | b39y = 40.*cm; |
---|
154 | b40y = 40.*cm; |
---|
155 | |
---|
156 | MLCMessenger = new MedLinacMLCMessenger(this); |
---|
157 | } |
---|
158 | MedLinacMLCDecorator::~MedLinacMLCDecorator() |
---|
159 | { |
---|
160 | delete MLCMessenger; |
---|
161 | ; |
---|
162 | } |
---|
163 | void MedLinacMLCDecorator::ConstructComponent(G4VPhysicalVolume* world, G4VPhysicalVolume* vacuumBlock) |
---|
164 | { |
---|
165 | MedLinacDecorator::ConstructComponent(world,vacuumBlock); |
---|
166 | ConstructMultiLeafCollimator(world,vacuumBlock); |
---|
167 | } |
---|
168 | |
---|
169 | void MedLinacMLCDecorator::DestroyComponent() |
---|
170 | { |
---|
171 | ; |
---|
172 | } |
---|
173 | void MedLinacMLCDecorator::ConstructMultiLeafCollimator(G4VPhysicalVolume* world, G4VPhysicalVolume*) |
---|
174 | { |
---|
175 | |
---|
176 | // materials |
---|
177 | |
---|
178 | G4double a; // atomic mass |
---|
179 | G4double z; // atomic number |
---|
180 | G4double density; |
---|
181 | G4String name; |
---|
182 | |
---|
183 | density = 18.*g/cm3; |
---|
184 | a = 183.85*g/mole; |
---|
185 | G4Material* W = new G4Material(name="Tungsten" , z=74., a, density); |
---|
186 | |
---|
187 | // colors |
---|
188 | G4Colour cyan (0.0, 1.0, 1.0); |
---|
189 | |
---|
190 | //---------rotation matrix leaf end-------- |
---|
191 | |
---|
192 | G4RotationMatrix* rotateLeaf=new G4RotationMatrix(); |
---|
193 | rotateLeaf->rotateY(90.0*deg); |
---|
194 | |
---|
195 | //---------rotation matrix leaves B-------- |
---|
196 | |
---|
197 | G4RotationMatrix* rotateLeavesB=new G4RotationMatrix(); |
---|
198 | rotateLeavesB->rotateX(180.0*deg); |
---|
199 | |
---|
200 | // volumes |
---|
201 | // beam line along z axis |
---|
202 | //---------------------- |
---|
203 | |
---|
204 | // single leaf |
---|
205 | |
---|
206 | G4double preLeafDim_x = 2.715*mm; |
---|
207 | G4double preLeafDim_y = 64.72066*mm; |
---|
208 | G4double preLeafDim_z = 29.3*mm; |
---|
209 | G4Box* preLeaf_box = new G4Box("preLeaf_box",preLeafDim_x,preLeafDim_y,preLeafDim_z); |
---|
210 | |
---|
211 | G4double preLeafPos_x = 0.0*m; |
---|
212 | G4double preLeafPos_y = 0.0*m; |
---|
213 | G4double preLeafPos_z = -50.*cm; |
---|
214 | G4DisplacedSolid* disPreLeaf = new G4DisplacedSolid("disPreLeaf",preLeaf_box,0, |
---|
215 | G4ThreeVector(preLeafPos_x,preLeafPos_y,preLeafPos_z)); |
---|
216 | |
---|
217 | G4double innerRadiusOfTheLeafEnd = 0.01*mm; |
---|
218 | G4double outerRadiusOfTheLeafEnd = 80.*mm; |
---|
219 | G4double hightOfTheLeafEnd = 2.715*mm; |
---|
220 | G4double startAngleOfTheLeafEnd = 0.*deg; |
---|
221 | G4double spanningAngleOfTheLeafEnd = 180.*deg; |
---|
222 | G4Tubs* aLeafEnd = new G4Tubs("aLeafEnd",innerRadiusOfTheLeafEnd, |
---|
223 | outerRadiusOfTheLeafEnd,hightOfTheLeafEnd, |
---|
224 | startAngleOfTheLeafEnd,spanningAngleOfTheLeafEnd); |
---|
225 | |
---|
226 | G4double gapDim_x = 90.00*mm; |
---|
227 | G4double gapDim_y = 74.18*mm; |
---|
228 | G4double gapDim_z = 3.0*mm; |
---|
229 | G4Box* gap = new G4Box("gap",gapDim_x,gapDim_y,gapDim_z); |
---|
230 | |
---|
231 | G4SubtractionSolid* leafEnd = new G4SubtractionSolid("leafEnd",aLeafEnd,gap); |
---|
232 | |
---|
233 | G4double leafEndPosX = 0.*cm; |
---|
234 | G4double leafEndPosY = -9.4413249*mm; |
---|
235 | G4double leafEndPosZ = -50.0*cm; |
---|
236 | |
---|
237 | G4DisplacedSolid* disLeafEnd = new G4DisplacedSolid("disLeafEnd",leafEnd,rotateLeaf, |
---|
238 | G4ThreeVector(leafEndPosX,leafEndPosY,leafEndPosZ)) ; |
---|
239 | |
---|
240 | G4UnionSolid* fullLeaf = new G4UnionSolid("fullLeaf", disPreLeaf, disLeafEnd); |
---|
241 | |
---|
242 | |
---|
243 | //++++++++++++++++++++++++++++ |
---|
244 | |
---|
245 | G4double cutADim_x = 0.20*mm; |
---|
246 | G4double cutADim_y = 68.0*mm; |
---|
247 | G4double cutADim_z = 15.925*mm; |
---|
248 | G4Box* cutA = new G4Box("cutA",cutADim_x,cutADim_y,cutADim_z); |
---|
249 | |
---|
250 | G4double cutAPosX = -2.515*mm; |
---|
251 | G4double cutAPosY = 3.0*mm; |
---|
252 | G4double cutAPosZ = -48.6625*cm; |
---|
253 | G4DisplacedSolid* disCutA = new G4DisplacedSolid("disCutA",cutA,0, |
---|
254 | G4ThreeVector(cutAPosX,cutAPosY,cutAPosZ)) ; |
---|
255 | |
---|
256 | G4SubtractionSolid* nearlyLeaf = new G4SubtractionSolid("nearlyLeaf",fullLeaf,disCutA); |
---|
257 | //++++++++++++++++++++++++++++ |
---|
258 | G4double cutBDim_x = 0.1625*mm; |
---|
259 | G4double cutBDim_y = 68.0*mm; |
---|
260 | G4double cutBDim_z = 14.415*mm; |
---|
261 | G4Box* cutB = new G4Box("cutB",cutBDim_x,cutBDim_y,cutBDim_z); |
---|
262 | |
---|
263 | G4double cutBPosX = 2.5525*mm; |
---|
264 | G4double cutBPosY = 3.0*mm; |
---|
265 | G4double cutBPosZ = -51.4885*cm; |
---|
266 | G4DisplacedSolid* disCutB = new G4DisplacedSolid("disCutB",cutB,0, |
---|
267 | G4ThreeVector(cutBPosX,cutBPosY,cutBPosZ)) ; |
---|
268 | |
---|
269 | G4SubtractionSolid* leaf = new G4SubtractionSolid("leaf",nearlyLeaf,disCutB); |
---|
270 | |
---|
271 | //++++++++++++++++++++++++++++ |
---|
272 | |
---|
273 | |
---|
274 | |
---|
275 | leafLog = new G4LogicalVolume(leaf,W,"leafLog",0,0,0); |
---|
276 | |
---|
277 | G4double leafAPosX[41]; |
---|
278 | G4double leafAPosY[41]; |
---|
279 | G4double leafAPosYF[41]; |
---|
280 | |
---|
281 | leafAPosX[0]= -111.335 *mm; |
---|
282 | |
---|
283 | leafAPosY[0]= 40.*cm; |
---|
284 | leafAPosY[1]= a1y; |
---|
285 | leafAPosY[2]= a2y; |
---|
286 | leafAPosY[3]= a3y; |
---|
287 | leafAPosY[4]= a4y; |
---|
288 | leafAPosY[5]= a5y; |
---|
289 | leafAPosY[6]= a6y; |
---|
290 | leafAPosY[7]= a7y; |
---|
291 | leafAPosY[8]= a8y; |
---|
292 | leafAPosY[9]= a9y; |
---|
293 | leafAPosY[10]= a10y; |
---|
294 | leafAPosY[11]= a11y; |
---|
295 | leafAPosY[12]= a12y; |
---|
296 | leafAPosY[13]= a13y; |
---|
297 | leafAPosY[14]= a14y; |
---|
298 | leafAPosY[15]= a15y; |
---|
299 | leafAPosY[16]= a16y; |
---|
300 | leafAPosY[17]= a17y; |
---|
301 | leafAPosY[18]= a18y; |
---|
302 | leafAPosY[19]= a19y; |
---|
303 | leafAPosY[20]= a20y; |
---|
304 | leafAPosY[21]= a21y; |
---|
305 | leafAPosY[22]= a22y; |
---|
306 | leafAPosY[23]= a23y; |
---|
307 | leafAPosY[24]= a24y; |
---|
308 | leafAPosY[25]= a25y; |
---|
309 | leafAPosY[26]= a26y; |
---|
310 | leafAPosY[27]= a27y; |
---|
311 | leafAPosY[28]= a28y; |
---|
312 | leafAPosY[29]= a29y; |
---|
313 | leafAPosY[30]= a30y; |
---|
314 | leafAPosY[31]= a31y; |
---|
315 | leafAPosY[32]= a32y; |
---|
316 | leafAPosY[33]= a33y; |
---|
317 | leafAPosY[34]= a34y; |
---|
318 | leafAPosY[35]= a35y; |
---|
319 | leafAPosY[36]= a36y; |
---|
320 | leafAPosY[37]= a37y; |
---|
321 | leafAPosY[38]= a38y; |
---|
322 | leafAPosY[39]= a39y; |
---|
323 | leafAPosY[40]= a40y; |
---|
324 | |
---|
325 | |
---|
326 | G4int CopyNbA = 0; |
---|
327 | |
---|
328 | for ( G4int i=1; i <= 40 ; i++ ) |
---|
329 | { |
---|
330 | leafAPosYF[i] = -(((leafAPosY[i]*(100.-47.25))/100.)+70.5587*mm); |
---|
331 | |
---|
332 | G4double leafAPosZ = 97.25 *cm; |
---|
333 | leafAPosX[i]=leafAPosX[i-1]+5.431 *mm; |
---|
334 | leafAPhys = new G4PVPlacement(0,G4ThreeVector(leafAPosX[i],leafAPosYF[i],leafAPosZ), |
---|
335 | "leafA",leafLog,world,false,CopyNbA); |
---|
336 | CopyNbA = CopyNbA+1; |
---|
337 | } |
---|
338 | |
---|
339 | G4double leafBPosX[41]; |
---|
340 | G4double leafBPosY[41]; |
---|
341 | G4double leafBPosYF[41]; |
---|
342 | |
---|
343 | G4double leafBPosZ = -2.75 *cm; |
---|
344 | leafBPosX[0]= -111.335*mm; |
---|
345 | G4int CopyNbB = 0; |
---|
346 | |
---|
347 | |
---|
348 | leafBPosY[0]= 40.*cm; |
---|
349 | leafBPosY[1]= b1y; |
---|
350 | leafBPosY[2]= b2y; |
---|
351 | leafBPosY[3]= b3y; |
---|
352 | leafBPosY[4]= b4y; |
---|
353 | leafBPosY[5]= b5y; |
---|
354 | leafBPosY[6]= b6y; |
---|
355 | leafBPosY[7]= b7y; |
---|
356 | leafBPosY[8]= b8y; |
---|
357 | leafBPosY[9]= b9y; |
---|
358 | leafBPosY[10]= b10y; |
---|
359 | leafBPosY[11]= b11y; |
---|
360 | leafBPosY[12]= b12y; |
---|
361 | leafBPosY[13]= b13y; |
---|
362 | leafBPosY[14]= b14y; |
---|
363 | leafBPosY[15]= b15y; |
---|
364 | leafBPosY[16]= b16y; |
---|
365 | leafBPosY[17]= b17y; |
---|
366 | leafBPosY[18]= b18y; |
---|
367 | leafBPosY[19]= b19y; |
---|
368 | leafBPosY[20]= b20y; |
---|
369 | leafBPosY[21]= b21y; |
---|
370 | leafBPosY[22]= b22y; |
---|
371 | leafBPosY[23]= b23y; |
---|
372 | leafBPosY[24]= b24y; |
---|
373 | leafBPosY[25]= b25y; |
---|
374 | leafBPosY[26]= b26y; |
---|
375 | leafBPosY[27]= b27y; |
---|
376 | leafBPosY[28]= b28y; |
---|
377 | leafBPosY[29]= b29y; |
---|
378 | leafBPosY[30]= b30y; |
---|
379 | leafBPosY[31]= b31y; |
---|
380 | leafBPosY[32]= b32y; |
---|
381 | leafBPosY[33]= b33y; |
---|
382 | leafBPosY[34]= b34y; |
---|
383 | leafBPosY[35]= b35y; |
---|
384 | leafBPosY[36]= b36y; |
---|
385 | leafBPosY[37]= b37y; |
---|
386 | leafBPosY[38]= b38y; |
---|
387 | leafBPosY[39]= b39y; |
---|
388 | leafBPosY[40]= b40y; |
---|
389 | |
---|
390 | |
---|
391 | for ( G4int i=1; i <= 40 ; i++ ) |
---|
392 | { |
---|
393 | leafBPosYF[i] = (((leafBPosY[i]*(100.-47.25))/100.)+70.5587*mm); |
---|
394 | leafBPosX[i]=leafBPosX[i-1]+5.431 *mm; |
---|
395 | leafBPhys = new G4PVPlacement(rotateLeavesB, |
---|
396 | G4ThreeVector(leafBPosX[i],leafBPosYF[i],leafBPosZ), |
---|
397 | "leafB",leafLog,world,false,CopyNbB); |
---|
398 | CopyNbB = CopyNbB+1; |
---|
399 | } |
---|
400 | |
---|
401 | |
---|
402 | PrintParametersMLC(); |
---|
403 | |
---|
404 | // Visualization attributes |
---|
405 | |
---|
406 | G4VisAttributes* simpleTungstenSVisAtt= new G4VisAttributes(cyan); |
---|
407 | simpleTungstenSVisAtt->SetVisibility(true); |
---|
408 | simpleTungstenSVisAtt->SetForceSolid(true); |
---|
409 | leafLog->SetVisAttributes(simpleTungstenSVisAtt); |
---|
410 | |
---|
411 | } |
---|
412 | void MedLinacMLCDecorator::PrintParametersMLC() |
---|
413 | { |
---|
414 | G4cout <<"leaf A1 position "<< a1y/cm << " cm "<<G4endl ; |
---|
415 | G4cout <<"leaf A2 position "<< a2y/cm << " cm "<<G4endl ; |
---|
416 | G4cout <<"leaf A3 position "<< a3y/cm << " cm "<<G4endl ; |
---|
417 | G4cout <<"leaf A4 position "<< a4y/cm << " cm "<<G4endl ; |
---|
418 | G4cout <<"leaf A5 position "<< a5y/cm << " cm "<<G4endl ; |
---|
419 | G4cout <<"leaf A6 position "<< a6y/cm << " cm "<<G4endl ; |
---|
420 | G4cout <<"leaf A7 position "<< a7y/cm << " cm "<<G4endl ; |
---|
421 | G4cout <<"leaf A8 position "<< a8y/cm << " cm "<<G4endl ; |
---|
422 | G4cout <<"leaf A9 position "<< a9y/cm << " cm "<<G4endl ; |
---|
423 | G4cout <<"leaf A10 position "<< a10y/cm << " cm "<<G4endl ; |
---|
424 | G4cout <<"leaf A11 position "<< a11y/cm << " cm "<<G4endl ; |
---|
425 | G4cout <<"leaf A12 position "<< a12y/cm << " cm "<<G4endl ; |
---|
426 | G4cout <<"leaf A13 position "<< a13y/cm << " cm "<<G4endl ; |
---|
427 | G4cout <<"leaf A14 position "<< a14y/cm << " cm "<<G4endl ; |
---|
428 | G4cout <<"leaf A15 position "<< a15y/cm << " cm "<<G4endl ; |
---|
429 | G4cout <<"leaf A16 position "<< a16y/cm << " cm "<<G4endl ; |
---|
430 | G4cout <<"leaf A17 position "<< a17y/cm << " cm "<<G4endl ; |
---|
431 | G4cout <<"leaf A18 position "<< a18y/cm << " cm "<<G4endl ; |
---|
432 | G4cout <<"leaf A19 position "<< a19y/cm << " cm "<<G4endl ; |
---|
433 | G4cout <<"leaf A20 position "<< a20y/cm << " cm "<<G4endl ; |
---|
434 | G4cout <<"leaf A21 position "<< a21y/cm << " cm "<<G4endl ; |
---|
435 | G4cout <<"leaf A22 position "<< a22y/cm << " cm "<<G4endl ; |
---|
436 | G4cout <<"leaf A23 position "<< a23y/cm << " cm "<<G4endl ; |
---|
437 | G4cout <<"leaf A24 position "<< a24y/cm << " cm "<<G4endl ; |
---|
438 | G4cout <<"leaf A25 position "<< a25y/cm << " cm "<<G4endl ; |
---|
439 | G4cout <<"leaf A26 position "<< a26y/cm << " cm "<<G4endl ; |
---|
440 | G4cout <<"leaf A27 position "<< a27y/cm << " cm "<<G4endl ; |
---|
441 | G4cout <<"leaf A28 position "<< a28y/cm << " cm "<<G4endl ; |
---|
442 | G4cout <<"leaf A29 position "<< a29y/cm << " cm "<<G4endl ; |
---|
443 | G4cout <<"leaf A30 position "<< a30y/cm << " cm "<<G4endl ; |
---|
444 | G4cout <<"leaf A31 position "<< a31y/cm << " cm "<<G4endl ; |
---|
445 | G4cout <<"leaf A32 position "<< a32y/cm << " cm "<<G4endl ; |
---|
446 | G4cout <<"leaf A33 position "<< a33y/cm << " cm "<<G4endl ; |
---|
447 | G4cout <<"leaf A34 position "<< a34y/cm << " cm "<<G4endl ; |
---|
448 | G4cout <<"leaf A35 position "<< a35y/cm << " cm "<<G4endl ; |
---|
449 | G4cout <<"leaf A36 position "<< a36y/cm << " cm "<<G4endl ; |
---|
450 | G4cout <<"leaf A37 position "<< a37y/cm << " cm "<<G4endl ; |
---|
451 | G4cout <<"leaf A38 position "<< a38y/cm << " cm "<<G4endl ; |
---|
452 | G4cout <<"leaf A39 position "<< a39y/cm << " cm "<<G4endl ; |
---|
453 | G4cout <<"leaf A40 position "<< a40y/cm << " cm "<<G4endl ; |
---|
454 | |
---|
455 | G4cout <<"leaf B1 position "<< b1y/cm << " cm "<<G4endl ; |
---|
456 | G4cout <<"leaf B2 position "<< b2y/cm << " cm "<<G4endl ; |
---|
457 | G4cout <<"leaf B3 position "<< b3y/cm << " cm "<<G4endl ; |
---|
458 | G4cout <<"leaf B4 position "<< b4y/cm << " cm "<<G4endl ; |
---|
459 | G4cout <<"leaf B5 position "<< b5y/cm << " cm "<<G4endl ; |
---|
460 | G4cout <<"leaf B6 position "<< b6y/cm << " cm "<<G4endl ; |
---|
461 | G4cout <<"leaf B7 position "<< b7y/cm << " cm "<<G4endl ; |
---|
462 | G4cout <<"leaf B8 position "<< b8y/cm << " cm "<<G4endl ; |
---|
463 | G4cout <<"leaf B9 position "<< b9y/cm << " cm "<<G4endl ; |
---|
464 | G4cout <<"leaf B10 position "<< b10y/cm << " cm "<<G4endl ; |
---|
465 | G4cout <<"leaf B11 position "<< b11y/cm << " cm "<<G4endl ; |
---|
466 | G4cout <<"leaf B12 position "<< b12y/cm << " cm "<<G4endl ; |
---|
467 | G4cout <<"leaf B13 position "<< b13y/cm << " cm "<<G4endl ; |
---|
468 | G4cout <<"leaf B14 position "<< b14y/cm << " cm "<<G4endl ; |
---|
469 | G4cout <<"leaf B15 position "<< b15y/cm << " cm "<<G4endl ; |
---|
470 | G4cout <<"leaf B16 position "<< b16y/cm << " cm "<<G4endl ; |
---|
471 | G4cout <<"leaf B17 position "<< b17y/cm << " cm "<<G4endl ; |
---|
472 | G4cout <<"leaf B18 position "<< b18y/cm << " cm "<<G4endl ; |
---|
473 | G4cout <<"leaf B19 position "<< b19y/cm << " cm "<<G4endl ; |
---|
474 | G4cout <<"leaf B20 position "<< b20y/cm << " cm "<<G4endl ; |
---|
475 | G4cout <<"leaf B21 position "<< b21y/cm << " cm "<<G4endl ; |
---|
476 | G4cout <<"leaf B22 position "<< b22y/cm << " cm "<<G4endl ; |
---|
477 | G4cout <<"leaf B23 position "<< b23y/cm << " cm "<<G4endl ; |
---|
478 | G4cout <<"leaf B24 position "<< b24y/cm << " cm "<<G4endl ; |
---|
479 | G4cout <<"leaf B25 position "<< b25y/cm << " cm "<<G4endl ; |
---|
480 | G4cout <<"leaf B26 position "<< b26y/cm << " cm "<<G4endl ; |
---|
481 | G4cout <<"leaf B27 position "<< b27y/cm << " cm "<<G4endl ; |
---|
482 | G4cout <<"leaf B28 position "<< b28y/cm << " cm "<<G4endl ; |
---|
483 | G4cout <<"leaf B29 position "<< b29y/cm << " cm "<<G4endl ; |
---|
484 | G4cout <<"leaf B30 position "<< b30y/cm << " cm "<<G4endl ; |
---|
485 | G4cout <<"leaf B31 position "<< b31y/cm << " cm "<<G4endl ; |
---|
486 | G4cout <<"leaf B32 position "<< b32y/cm << " cm "<<G4endl ; |
---|
487 | G4cout <<"leaf B33 position "<< b33y/cm << " cm "<<G4endl ; |
---|
488 | G4cout <<"leaf B34 position "<< b34y/cm << " cm "<<G4endl ; |
---|
489 | G4cout <<"leaf B35 position "<< b35y/cm << " cm "<<G4endl ; |
---|
490 | G4cout <<"leaf B36 position "<< b36y/cm << " cm "<<G4endl ; |
---|
491 | G4cout <<"leaf B37 position "<< b37y/cm << " cm "<<G4endl ; |
---|
492 | G4cout <<"leaf B38 position "<< b38y/cm << " cm "<<G4endl ; |
---|
493 | G4cout <<"leaf B39 position "<< b39y/cm << " cm "<<G4endl ; |
---|
494 | G4cout <<"leaf B40 position "<< b40y/cm << " cm "<<G4endl ; |
---|
495 | } |
---|
496 | void MedLinacMLCDecorator::SetLeafName (G4String newleaf_name) |
---|
497 | { |
---|
498 | leaf_name= newleaf_name; |
---|
499 | } |
---|
500 | void MedLinacMLCDecorator::SetPos_y (G4double pos) |
---|
501 | { |
---|
502 | if (leaf_name=="a1") |
---|
503 | a1y = pos; |
---|
504 | if (leaf_name=="a2") |
---|
505 | a2y = pos; |
---|
506 | if (leaf_name=="a3") |
---|
507 | a3y = pos; |
---|
508 | if (leaf_name=="a4") |
---|
509 | a4y = pos; |
---|
510 | if (leaf_name=="a5") |
---|
511 | a5y = pos; |
---|
512 | if (leaf_name=="a6") |
---|
513 | a6y = pos; |
---|
514 | if (leaf_name=="a7") |
---|
515 | a7y = pos; |
---|
516 | if (leaf_name=="a8") |
---|
517 | a8y = pos; |
---|
518 | if (leaf_name=="a9") |
---|
519 | a9y = pos; |
---|
520 | if (leaf_name=="a10") |
---|
521 | a10y = pos; |
---|
522 | if (leaf_name=="a11") |
---|
523 | a11y = pos; |
---|
524 | if (leaf_name=="a12") |
---|
525 | a12y = pos; |
---|
526 | if (leaf_name=="a13") |
---|
527 | a13y = pos; |
---|
528 | if (leaf_name=="a14") |
---|
529 | a14y = pos; |
---|
530 | if (leaf_name=="a15") |
---|
531 | a15y = pos; |
---|
532 | if (leaf_name=="a16") |
---|
533 | a16y = pos; |
---|
534 | if (leaf_name=="a17") |
---|
535 | a17y = pos; |
---|
536 | if (leaf_name=="a18") |
---|
537 | a18y = pos; |
---|
538 | if (leaf_name=="a19") |
---|
539 | a19y = pos; |
---|
540 | if (leaf_name=="a20") |
---|
541 | a20y = pos; |
---|
542 | if (leaf_name=="a21") |
---|
543 | a21y = pos; |
---|
544 | if (leaf_name=="a22") |
---|
545 | a22y = pos; |
---|
546 | if (leaf_name=="a23") |
---|
547 | a23y = pos; |
---|
548 | if (leaf_name=="a24") |
---|
549 | a24y = pos; |
---|
550 | if (leaf_name=="a25") |
---|
551 | a25y = pos; |
---|
552 | if (leaf_name=="a26") |
---|
553 | a26y = pos; |
---|
554 | if (leaf_name=="a27") |
---|
555 | a27y = pos; |
---|
556 | if (leaf_name=="a28") |
---|
557 | a28y = pos; |
---|
558 | if (leaf_name=="a29") |
---|
559 | a29y = pos; |
---|
560 | if (leaf_name=="a30") |
---|
561 | a30y = pos; |
---|
562 | if (leaf_name=="a31") |
---|
563 | a31y = pos; |
---|
564 | if (leaf_name=="a32") |
---|
565 | a32y = pos; |
---|
566 | if (leaf_name=="a33") |
---|
567 | a33y = pos; |
---|
568 | if (leaf_name=="a34") |
---|
569 | a34y = pos; |
---|
570 | if (leaf_name=="a35") |
---|
571 | a35y = pos; |
---|
572 | if (leaf_name=="a36") |
---|
573 | a36y = pos; |
---|
574 | if (leaf_name=="a37") |
---|
575 | a37y = pos; |
---|
576 | if (leaf_name=="a38") |
---|
577 | a38y = pos; |
---|
578 | if (leaf_name=="a39") |
---|
579 | a39y = pos; |
---|
580 | if (leaf_name=="a40") |
---|
581 | a40y = pos; |
---|
582 | |
---|
583 | |
---|
584 | |
---|
585 | |
---|
586 | if (leaf_name=="b1") |
---|
587 | b1y = pos; |
---|
588 | if (leaf_name=="b2") |
---|
589 | b2y = pos; |
---|
590 | if (leaf_name=="b3") |
---|
591 | b3y = pos; |
---|
592 | if (leaf_name=="b4") |
---|
593 | b4y = pos; |
---|
594 | if (leaf_name=="b5") |
---|
595 | b5y = pos; |
---|
596 | if (leaf_name=="b6") |
---|
597 | b6y = pos; |
---|
598 | if (leaf_name=="b7") |
---|
599 | b7y = pos; |
---|
600 | if (leaf_name=="b8") |
---|
601 | b8y = pos; |
---|
602 | if (leaf_name=="b9") |
---|
603 | b9y = pos; |
---|
604 | if (leaf_name=="b10") |
---|
605 | b10y = pos; |
---|
606 | if (leaf_name=="b11") |
---|
607 | b11y = pos; |
---|
608 | if (leaf_name=="b12") |
---|
609 | b12y = pos; |
---|
610 | if (leaf_name=="b13") |
---|
611 | b13y = pos; |
---|
612 | if (leaf_name=="b14") |
---|
613 | b14y = pos; |
---|
614 | if (leaf_name=="b15") |
---|
615 | b15y = pos; |
---|
616 | if (leaf_name=="b16") |
---|
617 | b16y = pos; |
---|
618 | if (leaf_name=="b17") |
---|
619 | b17y = pos; |
---|
620 | if (leaf_name=="b18") |
---|
621 | b18y = pos; |
---|
622 | if (leaf_name=="b19") |
---|
623 | b19y = pos; |
---|
624 | if (leaf_name=="b20") |
---|
625 | b20y = pos; |
---|
626 | if (leaf_name=="b21") |
---|
627 | b21y = pos; |
---|
628 | if (leaf_name=="b22") |
---|
629 | b22y = pos; |
---|
630 | if (leaf_name=="b23") |
---|
631 | b23y = pos; |
---|
632 | if (leaf_name=="b24") |
---|
633 | b24y = pos; |
---|
634 | if (leaf_name=="b25") |
---|
635 | b25y = pos; |
---|
636 | if (leaf_name=="b26") |
---|
637 | b26y = pos; |
---|
638 | if (leaf_name=="b27") |
---|
639 | b27y = pos; |
---|
640 | if (leaf_name=="b28") |
---|
641 | b28y = pos; |
---|
642 | if (leaf_name=="b29") |
---|
643 | b29y = pos; |
---|
644 | if (leaf_name=="b30") |
---|
645 | b30y = pos; |
---|
646 | if (leaf_name=="b31") |
---|
647 | b31y = pos; |
---|
648 | if (leaf_name=="b32") |
---|
649 | b32y = pos; |
---|
650 | if (leaf_name=="b33") |
---|
651 | b33y = pos; |
---|
652 | if (leaf_name=="b34") |
---|
653 | b34y = pos; |
---|
654 | if (leaf_name=="b35") |
---|
655 | b35y = pos; |
---|
656 | if (leaf_name=="b36") |
---|
657 | b36y = pos; |
---|
658 | if (leaf_name=="b37") |
---|
659 | b37y = pos; |
---|
660 | if (leaf_name=="b38") |
---|
661 | b38y = pos; |
---|
662 | if (leaf_name=="b39") |
---|
663 | b39y = pos; |
---|
664 | if (leaf_name=="b40") |
---|
665 | b40y = pos; |
---|
666 | } |
---|