Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:20

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 //
0027 /// \file optical/LXe/include/LXeDetectorConstruction.hh
0028 /// \brief Definition of the LXeDetectorConstruction class
0029 //
0030 //
0031 #ifndef LXeDetectorConstruction_h
0032 #define LXeDetectorConstruction_h 1
0033 
0034 #include "LXeDetectorMessenger.hh"
0035 
0036 #include "G4Cache.hh"
0037 #include "G4VUserDetectorConstruction.hh"
0038 
0039 #include <CLHEP/Units/SystemOfUnits.h>
0040 
0041 class LXeMainVolume;
0042 class LXePMTSD;
0043 class LXeScintSD;
0044 
0045 class G4Box;
0046 class G4Element;
0047 class G4LogicalVolume;
0048 class G4Material;
0049 class G4MaterialPropertiesTable;
0050 class G4Sphere;
0051 class G4Tubs;
0052 class G4VPhysicalVolume;
0053 
0054 class LXeDetectorConstruction : public G4VUserDetectorConstruction
0055 {
0056   public:
0057     LXeDetectorConstruction();
0058     ~LXeDetectorConstruction() override;
0059 
0060     G4VPhysicalVolume* Construct() override;
0061     void ConstructSDandField() override;
0062 
0063     // Functions to modify the geometry
0064     void SetDimensions(G4ThreeVector);
0065     void SetHousingThickness(G4double);
0066     void SetNX(G4int);
0067     void SetNY(G4int);
0068     void SetNZ(G4int);
0069     void SetPMTRadius(G4double);
0070     void SetDefaults();
0071     void SetSaveThreshold(G4int);
0072 
0073     // Get values
0074     G4int GetNX() const { return fNx; };
0075     G4int GetNY() const { return fNy; };
0076     G4int GetNZ() const { return fNz; };
0077     G4int GetSaveThreshold() const { return fSaveThreshold; };
0078     G4double GetScintX() const { return fScint_x; }
0079     G4double GetScintY() const { return fScint_y; }
0080     G4double GetScintZ() const { return fScint_z; }
0081     G4double GetHousingThickness() const { return fD_mtl; }
0082     G4double GetPMTRadius() const { return fOuterRadius_pmt; }
0083     G4double GetSlabZ() const { return fSlab_z; }
0084 
0085     void SetSphereOn(G4bool);
0086     static G4bool GetSphereOn() { return fSphereOn; }
0087 
0088     void SetHousingReflectivity(G4double);
0089     G4double GetHousingReflectivity() const { return fRefl; }
0090 
0091     void SetWLSSlabOn(G4bool b);
0092     G4bool GetWLSSlabOn() const { return fWLSslab; }
0093 
0094     void SetMainVolumeOn(G4bool b);
0095     G4bool GetMainVolumeOn() const { return fMainVolumeOn; }
0096 
0097     void SetNFibers(G4int n);
0098     G4int GetNFibers() const { return fNfibers; }
0099 
0100     void SetMainScintYield(G4double);
0101     void SetWLSScintYield(G4double);
0102 
0103   private:
0104     void DefineMaterials();
0105 
0106     LXeDetectorMessenger* fDetectorMessenger = nullptr;
0107 
0108     G4Box* fExperimentalHall_box = nullptr;
0109     G4LogicalVolume* fExperimentalHall_log = nullptr;
0110     G4VPhysicalVolume* fExperimentalHall_phys = nullptr;
0111 
0112     // Materials & Elements
0113     G4Element* fN = nullptr;
0114     G4Element* fO = nullptr;
0115     G4Element* fC = nullptr;
0116     G4Element* fH = nullptr;
0117     G4Material* fLXe = nullptr;
0118     G4Material* fAl = nullptr;
0119     G4Material* fAir = nullptr;
0120     G4Material* fVacuum = nullptr;
0121     G4Material* fGlass = nullptr;
0122     G4Material* fPstyrene = nullptr;
0123     G4Material* fPMMA = nullptr;
0124     G4Material* fPethylene1 = nullptr;
0125     G4Material* fPethylene2 = nullptr;
0126 
0127     // Geometry
0128     G4double fScint_x = 17.8 * CLHEP::cm;
0129     G4double fScint_y = 17.8 * CLHEP::cm;
0130     G4double fScint_z = 22.6 * CLHEP::cm;
0131     G4double fD_mtl = 0.0635 * CLHEP::cm;
0132     G4int fNx = 2;
0133     G4int fNy = 2;
0134     G4int fNz = 3;
0135     G4int fSaveThreshold = 0;
0136     G4double fOuterRadius_pmt = 2.3 * CLHEP::cm;
0137     G4int fNfibers = 15;
0138     static G4bool fSphereOn;
0139     G4double fRefl = 1.;
0140     G4bool fWLSslab = false;
0141     G4bool fMainVolumeOn = true;
0142     G4double fSlab_z = 2.5 * CLHEP::mm;
0143 
0144     LXeMainVolume* fMainVolume = nullptr;
0145 
0146     G4MaterialPropertiesTable* fLXe_mt = nullptr;
0147     G4MaterialPropertiesTable* fMPTPStyrene = nullptr;
0148 
0149     // Sensitive Detectors
0150     G4Cache<LXeScintSD*> fScint_SD;
0151     G4Cache<LXePMTSD*> fPmt_SD;
0152 };
0153 
0154 #endif