Geant4.10
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE02DetectorConstruction.hh
Go to the documentation of this file.
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 /// \file runAndEvent/RE02/include/RE02DetectorConstruction.hh
27 /// \brief Definition of the RE02DetectorConstruction class
28 //
29 //
30 // $Id: RE02DetectorConstruction.hh 75682 2013-11-05 09:11:19Z gcosmo $
31 //
32 
33 #ifndef RE02DetectorConstruction_h
34 #define RE02DetectorConstruction_h 1
35 
36 #include "globals.hh"
39 
40 class G4Box;
41 class G4LogicalVolume;
42 class G4VPhysicalVolume;
43 class G4Material;
44 
45 //
46 /// Uer detector construction class
47 ///
48 /// (Description)
49 ///
50 /// Detector construction for example RE02.
51 ///
52 /// [Geometry]
53 /// The world volume is defined as 200 cm x 200 cm x 200 cm box with Air.
54 /// Water phantom is defined as 200 mm x 200 mm x 400 mm box with Water.
55 /// The water phantom is divided into 100 segments in x,y plane using
56 /// replication,
57 /// and then divided into 200 segments perpendicular to z axis using nested
58 /// parameterised volume.
59 /// These values are defined at constructor,
60 /// e.g. the size of water phantom (fPhantomSize), and number of segmentation
61 /// of water phantom (fNx, fNy, fNz).
62 ///
63 /// By default, lead plates are inserted into the position of even order
64 /// segments.
65 /// NIST database is used for materials.
66 ///
67 ///
68 /// [Scorer]
69 /// Assignment of G4MultiFunctionalDetector and G4PrimitiveScorer
70 /// is demonstrated in this example.
71 /// -------------------------------------------------
72 /// The collection names of defined Primitives are
73 /// 0 PhantomSD/totalEDep
74 /// 1 PhantomSD/protonEDep
75 /// 2 PhantomSD/protonNStep
76 /// 3 PhantomSD/chargedPassCellFlux
77 /// 4 PhantomSD/chargedCellFlux
78 /// 5 PhantomSD/chargedSurfFlux
79 /// 6 PhantomSD/gammaSurfCurr000
80 /// 7 PhantomSD/gammaSurfCurr001
81 /// 9 PhantomSD/gammaSurdCurr002
82 /// 10 PhantomSD/gammaSurdCurr003
83 /// -------------------------------------------------
84 /// Please see README for detail description.
85 ///
86 ///
87 /// - G4VPhysicalVolume* Construct()
88 /// retrieves material from NIST database,
89 /// constructs a water phantom "phantom" in the world volume "world" and
90 /// sets detector sensitivities with G4MultiFunctionalDetector
91 ///
92 /// - void SetPhantomSize(G4ThreeVector size)
93 /// sets the water phantom size which is defined in G4Box
94 ///
95 /// - const G4ThreeVector& GetPhantomSize() const
96 /// gets the water phantom size
97 ///
98 /// - void SetNumberOfSegmentsInPhantom(G4int nx, G4int ny, G4int nz)
99 /// sets the number of segments of the water phantom
100 ///
101 /// - void GetNumberOfSegmentsInPhantom(G4int& nx, G4int& ny, G4int& nz)
102 /// gets the number of segments of the water phantom
103 ///
104 /// - void SetLeadSegment(G4bool flag=TRUE)
105 /// selects whether insert or not Lead plate in water or simple homogeneous
106 /// water phantom
107 ///
108 /// - G4bool IsLeadSegment()
109 /// returns whether insert or not Lead plate
110 //
112 {
113 public:
114  // constructor and destructor.
116  virtual ~RE02DetectorConstruction();
117 
118 public:
119  // virtual method from G4VUserDetectorConstruction.
120  virtual G4VPhysicalVolume* Construct();
121  virtual void ConstructSDandField();
122 
123 public:
124  // Get/Set Access methods for data members
125  // Size of Whater Phantom
126  void SetPhantomSize(G4ThreeVector size) { fPhantomSize=size; }
127  const G4ThreeVector& GetPhantomSize() const { return fPhantomSize; }
128  // Number of segments of water phantom
130  { fNx=nx; fNy=ny; fNz=nz; }
132  const{ nx=fNx; ny = fNy; nz = fNz; }
133  // Insert Lead plate in water or simple homogeneous water phantom
134  void SetLeadSegment(G4bool flag=TRUE){ fInsertLead = flag; }
135  G4bool IsLeadSegment(){ return fInsertLead; }
136 
137 private:
138  // Data members
139  G4ThreeVector fPhantomSize; // Size of Water Phantom
140  G4int fNx,fNy,fNz; // Number of segmentation of water phantom.
141  G4bool fInsertLead; // Flag for inserting lead plate in water phantom
142  G4LogicalVolume* fLVPhantomSens;
143 
144 };
145 #endif
Definition: G4Box.hh:63
void GetNumberOfSegmentsInPhantom(G4int &nx, G4int &ny, G4int &nz) const
void SetPhantomSize(G4ThreeVector size)
int G4int
Definition: G4Types.hh:78
void SetLeadSegment(G4bool flag=TRUE)
bool G4bool
Definition: G4Types.hh:79
#define TRUE
Definition: globals.hh:55
void SetNumberOfSegmentsInPhantom(G4int nx, G4int ny, G4int nz)
const G4ThreeVector & GetPhantomSize() const
virtual G4VPhysicalVolume * Construct()