[807] | 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 | #ifndef LXeDetectorConstruction_H |
---|
| 27 | #define LXeDetectorConstruction_H 1 |
---|
| 28 | |
---|
| 29 | class G4LogicalVolume; |
---|
| 30 | class G4VPhysicalVolume; |
---|
| 31 | class G4Box; |
---|
| 32 | class G4Tubs; |
---|
| 33 | class LXePMTSD; |
---|
| 34 | class LXeScintSD; |
---|
| 35 | class G4Sphere; |
---|
| 36 | |
---|
| 37 | #include "G4Material.hh" |
---|
| 38 | #include "LXeDetectorMessenger.hh" |
---|
| 39 | #include "G4VisAttributes.hh" |
---|
| 40 | #include "G4RotationMatrix.hh" |
---|
| 41 | #include "G4VUserDetectorConstruction.hh" |
---|
| 42 | |
---|
| 43 | class LXeDetectorConstruction : public G4VUserDetectorConstruction |
---|
| 44 | { |
---|
| 45 | public: |
---|
| 46 | |
---|
| 47 | LXeDetectorConstruction(); |
---|
| 48 | ~LXeDetectorConstruction(); |
---|
| 49 | |
---|
| 50 | G4VPhysicalVolume* Construct(); |
---|
| 51 | |
---|
| 52 | //Functions to modify the geometry |
---|
| 53 | void SetDimensions(G4ThreeVector dims); |
---|
| 54 | void SetHousingThickness(G4double d_mtl); |
---|
| 55 | void SetNX(G4int nx); |
---|
| 56 | void SetNY(G4int ny); |
---|
| 57 | void SetNZ(G4int nz); |
---|
| 58 | void SetPMTRadius(G4double outerRadius_pmt); |
---|
| 59 | void SetDefaults(); |
---|
| 60 | |
---|
| 61 | //Get values |
---|
| 62 | G4double GetScintX(){return scint_x;} |
---|
| 63 | G4double GetScintY(){return scint_y;} |
---|
| 64 | G4double GetScintZ(){return scint_z;} |
---|
| 65 | G4double GetHousingThickness(){return d_mtl;} |
---|
| 66 | G4int GetNX(){return nx;} |
---|
| 67 | G4int GetNY(){return ny;} |
---|
| 68 | G4int GetNZ(){return nz;} |
---|
| 69 | G4double GetPMTRadius(){return outerRadius_pmt;} |
---|
| 70 | G4double GetSlabZ(){return slab_z;} |
---|
| 71 | |
---|
| 72 | //rebuild the geometry based on changes. must be called |
---|
| 73 | void UpdateGeometry(); |
---|
| 74 | G4bool GetUpdated(){return updated;} |
---|
| 75 | |
---|
| 76 | void SetSphereOn(G4bool b){sphereOn=b;updated=true;} |
---|
| 77 | static G4bool GetSphereOn(){return sphereOn;} |
---|
| 78 | |
---|
| 79 | void SetHousingReflectivity(G4double r){refl=r;updated=true;} |
---|
| 80 | G4double GetHousingReflectivity(){return refl;} |
---|
| 81 | |
---|
| 82 | void SetWLSSlabOn(G4bool b){WLSslab=b;updated=true;} |
---|
| 83 | G4bool GetWLSSlabOn(){return WLSslab;} |
---|
| 84 | |
---|
| 85 | void SetMainVolumeOn(G4bool b){mainVolume=b;updated=true;} |
---|
| 86 | G4bool GetMainVolumeOn(){return mainVolume;} |
---|
| 87 | |
---|
| 88 | void SetNFibers(G4int n){nfibers=n;updated=true;} |
---|
| 89 | G4int GetNFibers(){return nfibers;} |
---|
| 90 | |
---|
| 91 | void SetMainScintYield(G4double y); |
---|
| 92 | void SetWLSScintYield(G4double y); |
---|
| 93 | |
---|
| 94 | private: |
---|
| 95 | |
---|
| 96 | void DefineMaterials(); |
---|
| 97 | G4VPhysicalVolume* ConstructDetector(); |
---|
| 98 | |
---|
| 99 | LXeDetectorMessenger* detectorMessenger; |
---|
| 100 | |
---|
| 101 | G4bool updated; |
---|
| 102 | |
---|
| 103 | G4Box* experimentalHall_box; |
---|
| 104 | G4LogicalVolume* experimentalHall_log; |
---|
| 105 | G4VPhysicalVolume* experimentalHall_phys; |
---|
| 106 | |
---|
| 107 | //Materials & Elements |
---|
| 108 | G4Material* LXe; |
---|
| 109 | G4Material* Al; |
---|
| 110 | G4Element* N; |
---|
| 111 | G4Element* O; |
---|
| 112 | G4Material* Air; |
---|
| 113 | G4Material* Vacuum; |
---|
| 114 | G4Element* C; |
---|
| 115 | G4Element* H; |
---|
| 116 | G4Material* Glass; |
---|
| 117 | G4Material* Pstyrene; |
---|
| 118 | G4Material* PMMA; |
---|
| 119 | G4Material* Pethylene; |
---|
| 120 | G4Material* fPethylene; |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | //Geometry |
---|
| 125 | G4double scint_x; |
---|
| 126 | G4double scint_y; |
---|
| 127 | G4double scint_z; |
---|
| 128 | G4double d_mtl; |
---|
| 129 | G4int nx; |
---|
| 130 | G4int ny; |
---|
| 131 | G4int nz; |
---|
| 132 | G4double outerRadius_pmt; |
---|
| 133 | G4int nfibers; |
---|
| 134 | static G4bool sphereOn; |
---|
| 135 | G4double refl; |
---|
| 136 | G4bool WLSslab; |
---|
| 137 | G4bool mainVolume; |
---|
| 138 | G4double slab_z; |
---|
| 139 | |
---|
| 140 | G4MaterialPropertiesTable* LXe_mt; |
---|
| 141 | G4MaterialPropertiesTable* MPTPStyrene; |
---|
| 142 | |
---|
| 143 | }; |
---|
| 144 | |
---|
| 145 | #endif |
---|
| 146 | |
---|
| 147 | |
---|
| 148 | |
---|
| 149 | |
---|