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

Applications | User Support | Publications | Collaboration