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