Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFDetectorConstruction Class Reference

#include <FFDetectorConstruction.hh>

Inheritance diagram for FFDetectorConstruction:
Collaboration diagram for FFDetectorConstruction:

Public Member Functions

 FFDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual ~FFDetectorConstruction ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void ConstructSDandField ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserDetectorConstruction
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 

Detailed Description

Definition at line 51 of file FFDetectorConstruction.hh.

Constructor & Destructor Documentation

FFDetectorConstruction::FFDetectorConstruction ( )

Definition at line 71 of file FFDetectorConstruction.cc.

73 {
74  DefineMaterials();
75 }
FFDetectorConstruction::~FFDetectorConstruction ( )
virtual

Definition at line 568 of file FFDetectorConstruction.cc.

569 {
570  // Nothing here
571 }

Member Function Documentation

G4VPhysicalVolume * FFDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 79 of file FFDetectorConstruction.cc.

80 {
82 #ifdef NDEBUG
83  G4bool const overlapChecking = false;
84 #else
85  G4bool const overlapChecking = true;
86 #endif // NDEBUG
87 
88  //
89  // Create the world
90  //
91  const G4double worldSize = 40.0 * inch;
92  G4Box* const solidWorld = new G4Box("World", // the name
93  worldSize, // x size
94  worldSize, // y size
95  worldSize); // z size
96  G4LogicalVolume* const logicalWorld
97  = new G4LogicalVolume(solidWorld, // the solid volume
98  fAir, // the material
99  solidWorld->GetName()); // the name
100  // Center at the origin
101  position.set(0.0, 0.0, 0.0);
102  G4VPhysicalVolume* const physicalWorld
103  = new G4PVPlacement(NULL, // no rotation
104  position, // must be at origin
105  logicalWorld, // the logical volume
106  logicalWorld->GetName(), // the name
107  NULL, // no mother volume
108  false, // no boolean ops
109  0, // copy number
110  overlapChecking); // check for overlaps
111 
112  //
113  // Create the graphite pile that the subcritical assembly rests on.
114  //
115  const G4double floorH = 30.0 * inch;
116  const G4ThreeVector floorPosition(0.0, 0.0, 0.0);
117  G4Box* const solidFloor = new G4Box("Floor", // the name
118  worldSize, // x size
119  worldSize, // y size
120  floorH * 0.5); // z size
121  G4LogicalVolume* const logicalFloor
122  = new G4LogicalVolume(solidFloor, // the solid volume
123  fGraphite, // the material
124  solidFloor->GetName()); // the name
125  // Shift down so the top is at the origin
126  position.set(0.0, 0.0, -floorH * 0.5);
127  new G4PVPlacement(NULL, // no rotation
128  position, // position
129  logicalFloor, // the logical volume
130  logicalFloor->GetName(), // the name
131  logicalWorld, // the mother volume
132  false, // no boolean ops
133  0, // copy number
134  overlapChecking); // check for overlaps
135 
136  //
137  // Create the tank
138  //
139  const G4double tankWallThickness = 0.25 * inch;
140  const G4double tankOR = 18.0 * inch;
141  const G4double tankH = 39.0 * inch;
142  G4Tubs* const solidTank
143  = new G4Tubs("Tank_Wall", // the name
144  0.0, // inner radius
145  tankOR, // outer radius
146  tankH * 0.5, // half height
147  0.0 * deg, // start angle
148  360.0 * deg); // end angle
149  G4LogicalVolume* const logicalTank
150  = new G4LogicalVolume(solidTank, // the solid volume
151  fAluminum, // the material
152  solidTank->GetName()); // the name
153  // Shift up so the base is at the origin
154  position.set(0.0, 0.0, tankH * 0.5);
155  new G4PVPlacement(NULL, // no rotation
156  position, // shift up
157  logicalTank, // the logical volume
158  logicalTank->GetName(), // the name
159  logicalWorld, // the mother volume
160  false, // no boolean ops
161  0, // copy number
162  overlapChecking); // check for overlaps
163  // Top 3 inches are air
164  const G4double tankAirH = 3.0 * inch;
165  G4Tubs* const solidTankAir
166  = new G4Tubs("Tank_Air", // the name
167  0.0, // inner radius
168  tankOR - tankWallThickness, // outer radius
169  tankAirH * 0.5, // half height
170  0.0 * deg, // start angle
171  360.0 * deg); // end angle
172  G4LogicalVolume* const logicalTankAir
173  = new G4LogicalVolume(solidTankAir, // the solid volume
174  fAir, // the material
175  solidTankAir->GetName()); // the name
176  // Shift up so that the top of the air is the same as the top of the tank
177  position.set(0.0, 0.0, (tankH - tankAirH) * 0.5);
178  new G4PVPlacement(NULL, // no rotation
179  position, // shift ip
180  logicalTankAir, // the logical volume
181  logicalTankAir->GetName(), // the name
182  logicalTank, // the mother volume
183  false, // no boolean ops
184  0, // copy number
185  overlapChecking); // check for overlaps
186  // Fill remaining area with water
187  const G4double tankH2OH = (tankH - (tankAirH + tankWallThickness));
188  G4Tubs* const solidTankH2O
189  = new G4Tubs("Tank_H2O", // the name
190  0.0, // inner radius
191  tankOR - tankWallThickness, // outer radius
192  tankH2OH * 0.5, // half height
193  0.0 * deg, // start angle
194  360.0 * deg); // end angle
195  G4LogicalVolume* const logicalTankH2O
196  = new G4LogicalVolume(solidTankH2O, // the solid volume
197  fAluminum, // the material
198  solidTankH2O->GetName()); // the name
199  // Shift up so that the top of the water is at the bottom of the air
200  const G4double centerOfH2O = (tankH - tankH2OH) * 0.5 - tankAirH;
201  position.set(0.0, 0.0, centerOfH2O);
202  new G4PVPlacement(NULL, // no rotation
203  position, // shift to origin
204  logicalTankH2O, // the logical volume
205  logicalTankH2O->GetName(), // the name
206  logicalTank, // the mother volume
207  false, // no boolean ops
208  0, // copy number
209  overlapChecking); // check for overlaps
210 
211  //
212  // Fuel plates
213  //
214  const G4double plateX = 3.0 * inch;
215  const G4double plateY = 0.08 * inch;
216  const G4double plateZ = 26.0 * inch;
217  const G4double meatX = 2.75 * inch;
218  const G4double meatY = 0.04 * inch;
219  const G4double meatZ = 24.0 * inch;
220  const G4double xSpacing = 5.0 * inch;
221  const G4double ySpacing = 0.3 * inch;
222  const G4double plateRadius = 12.0 * inch;
223  // Define the aluminim claddiing
224  G4Box* const solidPlate
225  = new G4Box("Plate_Cladding", // the name
226  plateX * 0.5, // x size
227  plateY * 0.5, // y size
228  plateZ * 0.5); // z size
229  G4LogicalVolume* const logicalPlate
230  = new G4LogicalVolume(solidPlate, // the solid volume
231  fAluminum, // the material
232  solidPlate->GetName()); // the name
233  // Place the meat inside the cladding
234  G4Box* const solidMeat
235  = new G4Box("Plate_Meat", // the name
236  meatX * 0.5, // x size
237  meatY * 0.5, // y size
238  meatZ * 0.5); // z size
239  G4LogicalVolume* const logicalMeat
240  = new G4LogicalVolume(solidMeat, // the solid volume
241  fUO2_20E, // the material
242  solidMeat->GetName()); // the name
243  // The meat goes into the exact center of the plate
244  position.set(0.0, 0.0, 0.0);
245  new G4PVPlacement(NULL, // no rotation
246  position, // position
247  logicalMeat, // the logical volume
248  logicalMeat->GetName(), // the name
249  logicalPlate, // the mother volume
250  false, // no boolean ops
251  0, // copy number
252  overlapChecking); // check for overlaps
253  // The plate will be centered in the z-direction within the water
254  // Simulate a subcritical assembly loading within a radius of 12 inches
255  bool placeMe;
256 
257  position.setZ(0.0);
258  fCopyNumber = 0;
259  for(double x = 0.0;
260  x <= plateRadius;
261  x += xSpacing)
262  {
263  // 5 rows of plates
264  for(double y = 0.0;
265  y <= plateRadius;
266  y += ySpacing)
267  {
268  placeMe = false;
269 
270  // Fuel plate must be completely within the radius to be placed
271  if(std::sqrt(x * x + y * y) < plateRadius)
272  {
273  // Leave a 1 inch radius opening in the middle for the neutron
274  // source
275  if(std::sqrt(x * x + y * y) > 1.0 * inch)
276  {
277  placeMe = true;
278  }
279  }
280 
281  if(placeMe)
282  {
283  PlaceFuelPlate(x,
284  y,
285  logicalPlate,
286  logicalTankH2O);
287  PlaceFuelPlate(x,
288  -y,
289  logicalPlate,
290  logicalTankH2O);
291  if(x > 0.0)
292  {
293  PlaceFuelPlate(-x,
294  y,
295  logicalPlate,
296  logicalTankH2O);
297  PlaceFuelPlate(-x,
298  -y,
299  logicalPlate,
300  logicalTankH2O);
301  }
302  }
303  }
304  }
305  G4cout << fCopyNumber << " plates were added to the subcritical assembly"
306  << G4endl;
307 
308  //
309  // Neutron Source
310  //
311  // TODO create the AmBe material in DefineMaterials() and use it here
312  // For now steel is used, but the logical volume is used in the
313  // PrimaryGeneratorAction to know where to emit the neutrons from
314  const G4double sourceH = 2 * inch;
315  const G4double sourceR = 0.2 * inch;
316  G4Tubs* const solidSource
317  = new G4Tubs("NeutronSource", // the name
318  0.0, // inner radius
319  sourceR, // outer radius
320  sourceH * 0.5, // half height
321  0.0 * deg, // start angle
322  360.0 * deg); // end angle
323  G4LogicalVolume* const logicalSource
324  = new G4LogicalVolume(solidSource, // the solid volume
325  fStainlessSteel, // the material
326  solidSource->GetName()); // the name
327  // Place in the exact center of the water tank
328  position.set(0.0, 0.0, 0.0);
329  new G4PVPlacement(NULL, // no rotation
330  position, // shift to origin
331  logicalSource, // the logical volume
332  logicalSource->GetName(), // the name
333  logicalTankH2O, // the mother volume
334  false, // no boolean ops
335  0, // copy number
336  overlapChecking); // check for overlaps
337 
338  //
339  // Detector Tower
340  //
341  const G4double polyS = 3.0 * inch;
342  const G4double polyH = 18.0 * inch;
343  G4Box* const solidPoly
344  = new G4Box("Poly", // the name
345  polyS, // x size
346  polyS, // y size
347  polyH); // z size
348  G4LogicalVolume* const logicalPoly
349  = new G4LogicalVolume(solidPoly, // the solid volume
350  fPolyethylene, // the material
351  solidPoly->GetName()); // the name
352  // The polyethylene detector tower goes just outside the tank at 45 deg
353  G4double radiusToPolyCenter = (tankOR / std::sqrt(2.0)) + std::sqrt(2.0) * polyS;
354  position.set(-radiusToPolyCenter, radiusToPolyCenter, polyH);
355  new G4PVPlacement(NULL, // no rotation
356  position, // position
357  logicalPoly, // the logical volume
358  logicalPoly->GetName(), // the name
359  logicalWorld, // the mother volume
360  false, // no boolean ops
361  0, // copy number
362  overlapChecking); // check for overlaps
363  // Create the detector shell
364  G4double shellR = 0.3 * inch;
365  G4double shellH = 6.5 * inch;
366  G4Tubs* const solidShell
367  = new G4Tubs("Detector_Shell", // the name
368  0.0, // inner radius
369  shellR, // outer radius
370  shellH * 0.5, // half height
371  0.0 * deg, // start angle
372  360.0 * deg); // end angle
373  G4LogicalVolume* const logicalShell
374  = new G4LogicalVolume(solidShell, // the solid volume
375  fStainlessSteel, // the material
376  solidShell->GetName()); // the name
377  // Place in the exact center of the polyethylene tower
378  position.set(0.0, 0.0, 0.0);
379  new G4PVPlacement(NULL, // no rotation
380  position, // shift to origin
381  logicalShell, // the logical volume
382  logicalShell->GetName(), // the name
383  logicalPoly, // the mother volume
384  false, // no boolean ops
385  0, // copy number
386  overlapChecking); // check for overlaps
387  // Create the BF3 detector
388  G4double BF3R = 0.2 * inch;
389  G4double BF3H = 6.0 * inch;
390  G4Tubs* const solidBF3
391  = new G4Tubs("Detector_BF3_Core", // the name
392  0.0, // inner radius
393  BF3R, // outer radius
394  BF3H * 0.5, // half height
395  0.0 * deg, // start angle
396  360.0 * deg); // end angle
397  G4LogicalVolume* const logicalBF3
398  = new G4LogicalVolume(solidBF3, // the solid volume
399  fBF3_96E, // the material
400  solidBF3->GetName()); // the name
401  // Place in the exact center of the shell
402  position.set(0.0, 0.0, 0.0);
403  new G4PVPlacement(NULL, // no rotation
404  position, // shift to origin
405  logicalBF3, // the logical volume
406  logicalBF3->GetName(), // the name
407  logicalShell, // the mother volume
408  false, // no boolean ops
409  0, // copy number
410  overlapChecking); // check for overlaps
411 
412  return physicalWorld;
413 }
void set(double x, double y, double z)
G4String GetName() const
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
tuple x
Definition: test.py:50
void setZ(double)
#define position
Definition: xmlparse.cc:622
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static const G4double inch
#define G4endl
Definition: G4ios.hh:61
const G4String & GetName() const
double G4double
Definition: G4Types.hh:76
static constexpr double deg
Definition: G4SIunits.hh:152

Here is the call graph for this function:


The documentation for this class was generated from the following files: