File indexing completed on 2025-02-23 09:21:17
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 #ifndef F04DetectorConstruction_h
0032 #define F04DetectorConstruction_h 1
0033
0034 #include "CLHEP/Units/SystemOfUnits.h"
0035
0036 #include "G4Cache.hh"
0037 #include "G4LogicalVolume.hh"
0038 #include "G4RotationMatrix.hh"
0039 #include "globals.hh"
0040
0041 class G4Tubs;
0042
0043 class G4VPhysicalVolume;
0044
0045 class F04Materials;
0046 class G4Material;
0047
0048 class F04GlobalField;
0049
0050 class F04DetectorMessenger;
0051
0052 #include "G4VUserDetectorConstruction.hh"
0053
0054 class F04DetectorConstruction : public G4VUserDetectorConstruction
0055 {
0056 public:
0057 F04DetectorConstruction();
0058 ~F04DetectorConstruction() override;
0059
0060 G4VPhysicalVolume* Construct() override;
0061 G4VPhysicalVolume* ConstructDetector();
0062
0063 void ConstructSDandField() override;
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074 static G4RotationMatrix StringToRotationMatrix(G4String rotation);
0075
0076 public:
0077 void SetWorldMaterial(G4String);
0078 void SetWorldSizeZ(G4double);
0079 void SetWorldSizeR(G4double);
0080
0081 void SetCaptureMgntRadius(G4double);
0082 void SetCaptureMgntLength(G4double);
0083 void SetCaptureMgntB1(G4double);
0084 void SetCaptureMgntB2(G4double);
0085
0086 void SetTransferMgntRadius(G4double);
0087 void SetTransferMgntLength(G4double);
0088 void SetTransferMgntB(G4double);
0089 void SetTransferMgntPos(G4double);
0090
0091 void SetTargetMaterial(G4String);
0092 void SetTargetThickness(G4double);
0093 void SetTargetRadius(G4double);
0094 void SetTargetPos(G4double);
0095 void SetTargetAngle(G4int);
0096
0097 void SetDegraderMaterial(G4String);
0098 void SetDegraderThickness(G4double);
0099 void SetDegraderRadius(G4double);
0100 void SetDegraderPos(G4double);
0101
0102 public:
0103 G4Material* GetWorldMaterial() { return fWorldMaterial; }
0104 G4double GetWorldSizeZ() { return fWorldSizeZ; }
0105 G4double GetWorldSizeR() { return fWorldSizeR; }
0106
0107 G4LogicalVolume* GetCaptureMgnt() { return fLogicCaptureMgnt; }
0108 G4double GetCaptureMgntRadius() { return fCaptureMgntRadius; }
0109 G4double GetCaptureMgntLength() { return fCaptureMgntLength; }
0110 G4double GetCaptureMgntB1() { return fCaptureMgntB1; }
0111 G4double GetCaptureMgntB2() { return fCaptureMgntB2; }
0112 G4ThreeVector GetCaptureMgntCenter() { return fCaptureMgntCenter; }
0113
0114 G4LogicalVolume* GetTransferMgnt() { return fLogicTransferMgnt; }
0115 G4double GetTransferMgntRadius() { return fTransferMgntRadius; }
0116 G4double GetTransferMgntLength() { return fTransferMgntLength; }
0117 G4double GetTransferMgntB() { return fTransferMgntB; }
0118 G4double GetTransferMgntPos() { return fTransferMgntPos; }
0119 G4ThreeVector GetTransferMgntCenter() { return fTransferMgntCenter; }
0120
0121 G4Material* GetTargetMaterial() { return fTargetMaterial; }
0122 G4double GetTargetRadius() { return fTargetRadius; }
0123 G4double GetTargetThickness() { return fTargetThickness; }
0124 G4double GetTargetPos() { return fTargetPos; }
0125 G4int GetTargetAngle() { return fTargetAngle; }
0126
0127 G4Material* GetDegraderMaterial() { return fDegraderMaterial; }
0128 G4double GetDegraderRadius() { return fDegraderRadius; }
0129 G4double GetDegraderThickness() { return fDegraderThickness; }
0130 G4double GetDegraderPos() { return fDegraderPos; }
0131
0132 private:
0133 F04DetectorMessenger* fDetectorMessenger = nullptr;
0134 G4Cache<F04GlobalField*> fFieldSetUp = nullptr;
0135
0136 F04Materials* fMaterials = nullptr;
0137
0138 G4Material* fVacuum = nullptr;
0139
0140 G4Tubs* fSolidWorld = nullptr;
0141 G4LogicalVolume* fLogicWorld = nullptr;
0142 G4VPhysicalVolume* fPhysiWorld = nullptr;
0143
0144 G4Tubs* fSolidTarget = nullptr;
0145 G4LogicalVolume* fLogicTarget = nullptr;
0146 G4VPhysicalVolume* fPhysiTarget = nullptr;
0147
0148 G4Tubs* fSolidDegrader = nullptr;
0149 G4LogicalVolume* fLogicDegrader = nullptr;
0150 G4VPhysicalVolume* fPhysiDegrader = nullptr;
0151
0152 G4Tubs* fSolidCaptureMgnt = nullptr;
0153 G4LogicalVolume* fLogicCaptureMgnt = nullptr;
0154 G4VPhysicalVolume* fPhysiCaptureMgnt = nullptr;
0155
0156 G4Tubs* fSolidTransferMgnt = nullptr;
0157 G4LogicalVolume* fLogicTransferMgnt = nullptr;
0158 G4VPhysicalVolume* fPhysiTransferMgnt = nullptr;
0159
0160 G4Material* fWorldMaterial = nullptr;
0161 G4double fWorldSizeR = 5. * CLHEP::m;
0162 G4double fWorldSizeZ = 50. * CLHEP::m;
0163
0164 G4double fCaptureMgntLength = 4.0 * CLHEP::m;
0165 G4double fCaptureMgntRadius = 0.6 * CLHEP::m;
0166 G4double fCaptureMgntB1 = 0.;
0167 G4double fCaptureMgntB2 = 0.;
0168
0169 G4double fTransferMgntLength = 15.0 * CLHEP::m;
0170 G4double fTransferMgntRadius = 0.3 * CLHEP::m;
0171 G4double fTransferMgntB = 0.;
0172 G4double fTransferMgntPos = 0.;
0173
0174 G4Material* fTargetMaterial = nullptr;
0175 G4double fTargetThickness = 16.0 * CLHEP::cm;
0176 G4double fTargetRadius = 0.4 * CLHEP::cm;
0177 G4double fTargetPos = 0.;
0178 G4int fTargetAngle = 0.;
0179
0180 G4Material* fDegraderMaterial = nullptr;
0181 G4double fDegraderThickness = 0.1 * CLHEP::cm;
0182 G4double fDegraderRadius = 30.0 * CLHEP::cm;
0183 G4double fDegraderPos = 0.;
0184
0185 G4ThreeVector fCaptureMgntCenter, fTransferMgntCenter;
0186
0187 private:
0188 void DefineMaterials();
0189 };
0190
0191 #endif