File indexing completed on 2026-09-23 08:30:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef DetectorConstruction_h
0030 #define DetectorConstruction_h 1
0031
0032 #include "G4OpticalSurface.hh"
0033 #include "G4RunManager.hh"
0034 #include "G4VUserDetectorConstruction.hh"
0035 #include "globals.hh"
0036
0037 #include <CLHEP/Units/SystemOfUnits.h>
0038
0039 class DetectorMessenger;
0040
0041
0042
0043 class DetectorConstruction : public G4VUserDetectorConstruction
0044 {
0045 public:
0046 DetectorConstruction();
0047 ~DetectorConstruction() override;
0048
0049 G4VPhysicalVolume* Construct() override;
0050
0051 G4VPhysicalVolume* GetTank() { return fTank; }
0052 G4double GetTankXSize() { return fTank_x; }
0053
0054 G4OpticalSurface* GetSurface(void) { return fSurface; }
0055
0056 void SetSurfaceFinish(const G4OpticalSurfaceFinish finish)
0057 {
0058 fSurface->SetFinish(finish);
0059 G4RunManager::GetRunManager()->GeometryHasBeenModified();
0060 }
0061 G4OpticalSurfaceFinish GetSurfaceFinish() { return fSurface->GetFinish(); }
0062
0063 void SetSurfaceType(const G4SurfaceType type)
0064 {
0065 fSurface->SetType(type);
0066 G4RunManager::GetRunManager()->GeometryHasBeenModified();
0067 }
0068
0069 void SetSurfaceModel(const G4OpticalSurfaceModel model)
0070 {
0071 fSurface->SetModel(model);
0072 G4RunManager::GetRunManager()->GeometryHasBeenModified();
0073 }
0074 G4OpticalSurfaceModel GetSurfaceModel() { return fSurface->GetModel(); }
0075
0076 void SetSurfaceSigmaAlpha(G4double v);
0077 void SetSurfacePolish(G4double v);
0078
0079 void AddTankMPV(const G4String& prop, G4MaterialPropertyVector* mpv);
0080 void AddTankMPC(const G4String& prop, G4double v);
0081 G4MaterialPropertiesTable* GetTankMaterialPropertiesTable() { return fTankMPT; }
0082
0083 void AddWorldMPV(const G4String& prop, G4MaterialPropertyVector* mpv);
0084 void AddWorldMPC(const G4String& prop, G4double v);
0085 G4MaterialPropertiesTable* GetWorldMaterialPropertiesTable() { return fWorldMPT; }
0086
0087 void AddSurfaceMPV(const G4String& prop, G4MaterialPropertyVector* mpv);
0088 void AddSurfaceMPC(const G4String& prop, G4double v);
0089 G4MaterialPropertiesTable* GetSurfaceMaterialPropertiesTable() { return fSurfaceMPT; }
0090
0091 void SetWorldMaterial(const G4String&);
0092 G4Material* GetWorldMaterial() const { return fWorldMaterial; }
0093 void SetTankMaterial(const G4String&);
0094 G4Material* GetTankMaterial() const { return fTankMaterial; }
0095
0096 private:
0097 G4double fExpHall_x = 10. * CLHEP::m;
0098 G4double fExpHall_y = 10. * CLHEP::m;
0099 G4double fExpHall_z = 10. * CLHEP::m;
0100
0101 G4VPhysicalVolume* fTank = nullptr;
0102
0103 G4double fTank_x = 1. * CLHEP::m;
0104 G4double fTank_y = 1. * CLHEP::m;
0105 G4double fTank_z = 1. * CLHEP::m;
0106
0107 G4LogicalVolume* fWorld_LV = nullptr;
0108 G4LogicalVolume* fTank_LV = nullptr;
0109
0110 G4Material* fWorldMaterial = nullptr;
0111 G4Material* fTankMaterial = nullptr;
0112
0113 G4OpticalSurface* fSurface = nullptr;
0114
0115 DetectorMessenger* fDetectorMessenger = nullptr;
0116
0117 G4MaterialPropertiesTable* fTankMPT = nullptr;
0118 G4MaterialPropertiesTable* fWorldMPT = nullptr;
0119 G4MaterialPropertiesTable* fSurfaceMPT = nullptr;
0120 };
0121
0122
0123
0124 #endif