File indexing completed on 2025-01-18 09:16:57
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 #ifndef DETECTOR_CONSTRUCTION_HH
0034 #define DETECTOR_CONSTRUCTION_HH
0035
0036 #include <G4VUserDetectorConstruction.hh>
0037 #include <G4RotationMatrix.hh>
0038 #include <G4Material.hh>
0039 #include <G4UnionSolid.hh>
0040 #include <G4PSDoseDeposit3D.hh>
0041 #include <G4MultiFunctionalDetector.hh>
0042
0043 #include "DetectorMessenger.hh"
0044
0045 class G4LogicalVolume;
0046 class DetectorMessenger;
0047 class DetectorConstruction : public G4VUserDetectorConstruction
0048 {
0049 public:
0050
0051 G4VPhysicalVolume* Construct() override;
0052
0053 void SetJaws(G4double value);
0054 void SetTargetPosition(G4double value);
0055 void SetPhantomSide(G4double value);
0056 void SetVoxelSide(G4double value);
0057 void SetVoxelDepth(G4double value);
0058
0059 void UpdateGeometry(G4String, G4double);
0060
0061 G4int GetNumberSideCells() const;
0062 G4int GetNumberDepthCells() const;
0063 G4int GetPhantomDepth() const;
0064
0065 G4double GetFFilterRadius();
0066 G4double GetFFilterZ();
0067
0068 G4double GetJaw1X();
0069 G4double GetTargetPosition();
0070 G4double GetAccOriginPosition();
0071 G4double GetVoxelDepthDim();
0072
0073 private:
0074
0075 void ConstructMaterials();
0076 G4Material* GetMaterial(G4String materialName);
0077
0078 void ConstructPhantom();
0079 void ConstructPhantom_spess();
0080 void ConstructAccelerator();
0081 void ConstructTarget();
0082 void ConstructVacuumWindow();
0083 void ConstructIonizationChamber();
0084 void ConstructFlatteningFilter();
0085 void ConstructPrimaryCollimator();
0086 void ConstructJawsX();
0087 void ConstructJawsY();
0088 void PhantomSegmentation(G4LogicalVolume* phantom);
0089 G4int CheckPhantomSegmentation(G4int nCells);
0090
0091 DetectorMessenger* detectorMessenger;
0092 G4VPhysicalVolume* world_phys;
0093 G4VPhysicalVolume* accWorld_phys;
0094 G4VPhysicalVolume* boxJaw1X_phys;
0095 G4VPhysicalVolume* boxJaw2X_phys;
0096 G4VPhysicalVolume* boxJaw1Y_phys;
0097 G4VPhysicalVolume* boxJaw2Y_phys;
0098 G4VPhysicalVolume* phantom_phys;
0099 G4LogicalVolume* LVPhantomSens;
0100
0101 G4Material* mat_Kapton;
0102 G4Material* mat_XC10;
0103 G4Material* mat_WNICU;
0104 G4Material* mat_Ssteel;
0105 G4ThreeVector accHalfSize;
0106 G4ThreeVector jaw1XInitialPos;
0107 G4ThreeVector jaw2XInitialPos;
0108 G4ThreeVector jaw1YInitialPos;
0109 G4ThreeVector jaw2YInitialPos;
0110 G4double jawAperture;
0111 G4double fieldSide;
0112 G4double sourceToSkinDistance;
0113 G4double phantomSideDim, voxelSideDim, voxelDepthDim;
0114 G4int nSideCells, nDepthCells;
0115 G4double tubeFFRadius, tubeFFFirstFaceZ;
0116 G4MultiFunctionalDetector* phantomDetector3D;
0117 G4VPrimitiveScorer* phantomScorer3D;
0118 };
0119
0120 #endif