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