|
|
|||
File indexing completed on 2026-04-09 07:52:50
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 /// \file RE02DetectorConstruction.hh 0027 /// \brief Definition of the RE02DetectorConstruction class 0028 0029 #ifndef RE02DetectorConstruction_h 0030 #define RE02DetectorConstruction_h 1 0031 0032 #include "G4MultiFunctionalDetector.hh" 0033 #include "G4VUserDetectorConstruction.hh" 0034 #include "globals.hh" 0035 0036 class G4Box; 0037 class G4LogicalVolume; 0038 class G4VPhysicalVolume; 0039 class G4Material; 0040 0041 // 0042 /// Uer detector construction class 0043 /// 0044 /// (Description) 0045 /// 0046 /// Detector construction for example RE02. 0047 /// 0048 /// [Geometry] 0049 /// The world volume is defined as 200 cm x 200 cm x 200 cm box with Air. 0050 /// Water phantom is defined as 200 mm x 200 mm x 400 mm box with Water. 0051 /// The water phantom is divided into 100 segments in x,y plane using 0052 /// replication, 0053 /// and then divided into 200 segments perpendicular to z axis using nested 0054 /// parameterised volume. 0055 /// These values are defined at constructor, 0056 /// e.g. the size of water phantom (fPhantomSize), and number of segmentation 0057 /// of water phantom (fNx, fNy, fNz). 0058 /// 0059 /// By default, lead plates are inserted into the position of even order 0060 /// segments. 0061 /// NIST database is used for materials. 0062 /// 0063 /// 0064 /// [Scorer] 0065 /// Assignment of G4MultiFunctionalDetector and G4PrimitiveScorer 0066 /// is demonstrated in this example. 0067 /// ------------------------------------------------- 0068 /// The collection names of defined Primitives are 0069 /// 0 PhantomSD/totalEDep 0070 /// 1 PhantomSD/protonEDep 0071 /// 2 PhantomSD/protonNStep 0072 /// 3 PhantomSD/chargedPassCellFlux 0073 /// 4 PhantomSD/chargedCellFlux 0074 /// 5 PhantomSD/chargedSurfFlux 0075 /// 6 PhantomSD/gammaSurfCurr000 0076 /// 7 PhantomSD/gammaSurfCurr001 0077 /// 9 PhantomSD/gammaSurdCurr002 0078 /// 10 PhantomSD/gammaSurdCurr003 0079 /// ------------------------------------------------- 0080 /// Please see README for detail description. 0081 /// 0082 /// 0083 /// - G4VPhysicalVolume* Construct() 0084 /// retrieves material from NIST database, 0085 /// constructs a water phantom "phantom" in the world volume "world" and 0086 /// sets detector sensitivities with G4MultiFunctionalDetector 0087 /// 0088 /// - void SetPhantomSize(G4ThreeVector size) 0089 /// sets the water phantom size which is defined in G4Box 0090 /// 0091 /// - const G4ThreeVector& GetPhantomSize() const 0092 /// gets the water phantom size 0093 /// 0094 /// - void SetNumberOfSegmentsInPhantom(G4int nx, G4int ny, G4int nz) 0095 /// sets the number of segments of the water phantom 0096 /// 0097 /// - void GetNumberOfSegmentsInPhantom(G4int& nx, G4int& ny, G4int& nz) 0098 /// gets the number of segments of the water phantom 0099 /// 0100 /// - void SetLeadSegment(G4bool flag=TRUE) 0101 /// selects whether insert or not Lead plate in water or simple homogeneous 0102 /// water phantom 0103 /// 0104 /// - G4bool IsLeadSegment() 0105 /// returns whether insert or not Lead plate 0106 // 0107 class RE02DetectorConstruction : public G4VUserDetectorConstruction 0108 { 0109 public: 0110 // constructor and destructor. 0111 RE02DetectorConstruction(); 0112 virtual ~RE02DetectorConstruction(); 0113 0114 public: 0115 // virtual method from G4VUserDetectorConstruction. 0116 virtual G4VPhysicalVolume* Construct(); 0117 virtual void ConstructSDandField(); 0118 0119 public: 0120 // Get/Set Access methods for data members 0121 // Size of Whater Phantom 0122 void SetPhantomSize(G4ThreeVector size) { fPhantomSize = size; } 0123 const G4ThreeVector& GetPhantomSize() const { return fPhantomSize; } 0124 // Number of segments of water phantom 0125 void SetNumberOfSegmentsInPhantom(G4int nx, G4int ny, G4int nz) 0126 { 0127 fNx = nx; 0128 fNy = ny; 0129 fNz = nz; 0130 } 0131 void GetNumberOfSegmentsInPhantom(G4int& nx, G4int& ny, G4int& nz) const 0132 { 0133 nx = fNx; 0134 ny = fNy; 0135 nz = fNz; 0136 } 0137 // Insert Lead plate in water or simple homogeneous water phantom 0138 void SetLeadSegment(G4bool flag = TRUE) { fInsertLead = flag; } 0139 G4bool IsLeadSegment() { return fInsertLead; } 0140 0141 private: 0142 // Data members 0143 G4ThreeVector fPhantomSize; // Size of Water Phantom 0144 G4int fNx, fNy, fNz; // Number of segmentation of water phantom. 0145 G4bool fInsertLead; // Flag for inserting lead plate in water phantom 0146 G4LogicalVolume* fLVPhantomSens; 0147 }; 0148 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|