Geant4 Cross Reference |
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 /// \file optical/LXe/include/LXeDetectorConstruction.hh 28 /// \brief Definition of the LXeDetectorConstruction class 29 // 30 // 31 #ifndef LXeDetectorConstruction_h 32 #define LXeDetectorConstruction_h 1 33 34 #include "LXeDetectorMessenger.hh" 35 36 #include "G4Cache.hh" 37 #include "G4VUserDetectorConstruction.hh" 38 39 #include <CLHEP/Units/SystemOfUnits.h> 40 41 class LXeMainVolume; 42 class LXePMTSD; 43 class LXeScintSD; 44 45 class G4Box; 46 class G4Element; 47 class G4LogicalVolume; 48 class G4Material; 49 class G4MaterialPropertiesTable; 50 class G4Sphere; 51 class G4Tubs; 52 class G4VPhysicalVolume; 53 54 class LXeDetectorConstruction : public G4VUserDetectorConstruction 55 { 56 public: 57 LXeDetectorConstruction(); 58 ~LXeDetectorConstruction() override; 59 60 G4VPhysicalVolume* Construct() override; 61 void ConstructSDandField() override; 62 63 // Functions to modify the geometry 64 void SetDimensions(G4ThreeVector); 65 void SetHousingThickness(G4double); 66 void SetNX(G4int); 67 void SetNY(G4int); 68 void SetNZ(G4int); 69 void SetPMTRadius(G4double); 70 void SetDefaults(); 71 void SetSaveThreshold(G4int); 72 73 // Get values 74 G4int GetNX() const { return fNx; }; 75 G4int GetNY() const { return fNy; }; 76 G4int GetNZ() const { return fNz; }; 77 G4int GetSaveThreshold() const { return fSaveThreshold; }; 78 G4double GetScintX() const { return fScint_x; } 79 G4double GetScintY() const { return fScint_y; } 80 G4double GetScintZ() const { return fScint_z; } 81 G4double GetHousingThickness() const { return fD_mtl; } 82 G4double GetPMTRadius() const { return fOuterRadius_pmt; } 83 G4double GetSlabZ() const { return fSlab_z; } 84 85 void SetSphereOn(G4bool); 86 static G4bool GetSphereOn() { return fSphereOn; } 87 88 void SetHousingReflectivity(G4double); 89 G4double GetHousingReflectivity() const { return fRefl; } 90 91 void SetWLSSlabOn(G4bool b); 92 G4bool GetWLSSlabOn() const { return fWLSslab; } 93 94 void SetMainVolumeOn(G4bool b); 95 G4bool GetMainVolumeOn() const { return fMainVolumeOn; } 96 97 void SetNFibers(G4int n); 98 G4int GetNFibers() const { return fNfibers; } 99 100 void SetMainScintYield(G4double); 101 void SetWLSScintYield(G4double); 102 103 private: 104 void DefineMaterials(); 105 106 LXeDetectorMessenger* fDetectorMessenger = nullptr; 107 108 G4Box* fExperimentalHall_box = nullptr; 109 G4LogicalVolume* fExperimentalHall_log = nullptr; 110 G4VPhysicalVolume* fExperimentalHall_phys = nullptr; 111 112 // Materials & Elements 113 G4Element* fN = nullptr; 114 G4Element* fO = nullptr; 115 G4Element* fC = nullptr; 116 G4Element* fH = nullptr; 117 G4Material* fLXe = nullptr; 118 G4Material* fAl = nullptr; 119 G4Material* fAir = nullptr; 120 G4Material* fVacuum = nullptr; 121 G4Material* fGlass = nullptr; 122 G4Material* fPstyrene = nullptr; 123 G4Material* fPMMA = nullptr; 124 G4Material* fPethylene1 = nullptr; 125 G4Material* fPethylene2 = nullptr; 126 127 // Geometry 128 G4double fScint_x = 17.8 * CLHEP::cm; 129 G4double fScint_y = 17.8 * CLHEP::cm; 130 G4double fScint_z = 22.6 * CLHEP::cm; 131 G4double fD_mtl = 0.0635 * CLHEP::cm; 132 G4int fNx = 2; 133 G4int fNy = 2; 134 G4int fNz = 3; 135 G4int fSaveThreshold = 0; 136 G4double fOuterRadius_pmt = 2.3 * CLHEP::cm; 137 G4int fNfibers = 15; 138 static G4bool fSphereOn; 139 G4double fRefl = 1.; 140 G4bool fWLSslab = false; 141 G4bool fMainVolumeOn = true; 142 G4double fSlab_z = 2.5 * CLHEP::mm; 143 144 LXeMainVolume* fMainVolume = nullptr; 145 146 G4MaterialPropertiesTable* fLXe_mt = nullptr; 147 G4MaterialPropertiesTable* fMPTPStyrene = nullptr; 148 149 // Sensitive Detectors 150 G4Cache<LXeScintSD*> fScint_SD; 151 G4Cache<LXePMTSD*> fPmt_SD; 152 }; 153 154 #endif 155