File indexing completed on 2026-09-18 08:31:48
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 F03DetectorConstruction_h
0030 #define F03DetectorConstruction_h 1
0031
0032 #include "G4VUserDetectorConstruction.hh"
0033 #include "G4Cache.hh"
0034 #include "G4ThreeVector.hh"
0035
0036 #include "CLHEP/Units/SystemOfUnits.h"
0037
0038 class G4Tubs;
0039 class G4LogicalVolume;
0040 class G4VPhysicalVolume;
0041
0042 class G4Material;
0043 class G4UniformMagField;
0044
0045 class F03DetectorMessenger;
0046 class F03CalorimeterSD;
0047
0048
0049
0050 class F03DetectorConstruction : public G4VUserDetectorConstruction
0051 {
0052 public:
0053 F03DetectorConstruction();
0054 ~F03DetectorConstruction() override;
0055
0056 void SetAbsorberMaterial(G4String);
0057 void SetAbsorberThickness(G4double);
0058 void SetAbsorberRadius(G4double);
0059
0060 void SetAbsorberZpos(G4double);
0061
0062 void SetWorldMaterial(G4String);
0063 void SetWorldSizeZ(G4double);
0064 void SetWorldSizeR(G4double);
0065
0066 void SetFieldValue(G4ThreeVector value);
0067 void SetLocalFieldValue(G4ThreeVector value);
0068
0069 G4VPhysicalVolume* Construct() override;
0070 void ConstructSDandField() override;
0071
0072 void PrintCalorParameters();
0073
0074 G4Material* GetWorldMaterial() { return fWorldMaterial; }
0075 G4double GetWorldSizeZ() { return fWorldSizeZ; }
0076 G4double GetWorldSizeR() { return fWorldSizeR; }
0077
0078 G4double GetAbsorberZpos() { return fZAbsorber; }
0079 G4double GetZStartAbs() { return fZStartAbs; }
0080 G4double GetZEndAbs() { return fZEndAbs; }
0081
0082 G4Material* GetAbsorberMaterial() { return fAbsorberMaterial; }
0083 G4double GetAbsorberThickness() { return fAbsorberThickness; }
0084 G4double GetAbsorberRadius() { return fAbsorberRadius; }
0085
0086 const G4VPhysicalVolume* GetPhysiWorld() { return fPhysiWorld; }
0087 const G4VPhysicalVolume* GetAbsorber() { return fPhysiAbsorber; }
0088 G4LogicalVolume* GetLogicalAbsorber() { return fLogicAbsorber; }
0089
0090 private:
0091 void DefineMaterials();
0092 void ComputeCalorParameters();
0093 G4VPhysicalVolume* ConstructCalorimeter();
0094
0095 F03DetectorMessenger* fDetectorMessenger = nullptr;
0096 G4Cache<F03CalorimeterSD*> fCalorimeterSD = nullptr;
0097
0098 G4Tubs* fSolidWorld = nullptr;
0099 G4LogicalVolume* fLogicWorld = nullptr;
0100 G4VPhysicalVolume* fPhysiWorld = nullptr;
0101
0102 G4Tubs* fSolidAbsorber = nullptr;
0103 G4LogicalVolume* fLogicAbsorber = nullptr;
0104 G4VPhysicalVolume* fPhysiAbsorber = nullptr;
0105
0106 G4Tubs* fSolidRadSlice = nullptr;
0107 G4LogicalVolume* fLogicRadSlice = nullptr;
0108 G4VPhysicalVolume* fPhysiRadSlice = nullptr;
0109
0110 G4Tubs* fSolidRadiator = nullptr;
0111 G4LogicalVolume* fLogicRadiator = nullptr;
0112 G4VPhysicalVolume* fPhysiRadiator = nullptr;
0113
0114 G4Material* fWorldMaterial = nullptr;
0115 G4Material* fAbsorberMaterial = nullptr;
0116 G4Material* fRadiatorMat = nullptr;
0117
0118 G4double fWorldSizeR = 22000. * CLHEP::mm;
0119 G4double fWorldSizeZ = 44000. * CLHEP::mm;
0120
0121 G4double fAbsorberThickness = 1. * CLHEP::mm;
0122 G4double fAbsorberRadius = 20000. * CLHEP::mm;
0123
0124 G4double fZAbsorber = 21990. * CLHEP::mm;
0125 G4double fZStartAbs = 0.;
0126 G4double fZEndAbs = 0.;
0127
0128 G4double fRadThickness = 100. * CLHEP::mm;
0129 G4double fGasGap = 100. * CLHEP::mm;
0130 G4double fDetGap = 1. * CLHEP::mm;
0131
0132 G4int fFoilNumber = 2;
0133
0134 G4ThreeVector fFieldVector = {3.3*CLHEP::tesla, 0., 0.};
0135 G4ThreeVector fLocalFieldVector = {3.3*CLHEP::tesla, 0., 0.};
0136 };
0137
0138
0139
0140 inline void F03DetectorConstruction::ComputeCalorParameters()
0141 {
0142
0143
0144 fZStartAbs = fZAbsorber - 0.5 * fAbsorberThickness;
0145 fZEndAbs = fZAbsorber + 0.5 * fAbsorberThickness;
0146 }
0147
0148 #endif