File indexing completed on 2025-02-23 09:21:15
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
0035 #ifndef F01DetectorConstruction_h
0036 #define F01DetectorConstruction_h 1
0037
0038 #include "G4VUserDetectorConstruction.hh"
0039 #include "G4Cache.hh"
0040 #include "G4ThreeVector.hh"
0041
0042 #include "CLHEP/Units/SystemOfUnits.h"
0043
0044 class G4Box;
0045 class G4Tubs;
0046 class G4LogicalVolume;
0047 class G4VPhysicalVolume;
0048
0049 class G4Material;
0050 class G4UniformMagField;
0051
0052 class F01DetectorMessenger;
0053 class F01CalorimeterSD;
0054
0055
0056
0057 class F01DetectorConstruction : public G4VUserDetectorConstruction
0058 {
0059 public:
0060 F01DetectorConstruction();
0061 ~F01DetectorConstruction() override;
0062
0063 void SetAbsorberMaterial(G4String);
0064 void SetAbsorberThickness(G4double);
0065 void SetAbsorberRadius(G4double);
0066
0067 void SetAbsorberZpos(G4double);
0068
0069 void SetWorldMaterial(G4String);
0070 void SetWorldSizeZ(G4double);
0071 void SetWorldSizeR(G4double);
0072
0073 void SetFieldValue(G4ThreeVector value);
0074
0075 G4VPhysicalVolume* Construct() override;
0076 void ConstructSDandField() override;
0077
0078 void PrintCalorParameters();
0079
0080 G4Material* GetWorldMaterial() { return fWorldMaterial; }
0081 G4double GetWorldSizeZ() { return fWorldSizeZ; }
0082 G4double GetWorldSizeR() { return fWorldSizeR; }
0083
0084 G4double GetAbsorberZpos() { return fZAbsorber; }
0085 G4double GetZStartAbs() { return fZStartAbs; }
0086 G4double GetZEndAbs() { return fZEndAbs; }
0087
0088 G4Material* GetAbsorberMaterial() { return fAbsorberMaterial; }
0089 G4double GetAbsorberThickness() { return fAbsorberThickness; }
0090 G4double GetAbsorberRadius() { return fAbsorberRadius; }
0091
0092 const G4VPhysicalVolume* GetPhysiWorld() { return fPhysiWorld; }
0093 const G4VPhysicalVolume* GetAbsorber() { return fPhysiAbsorber; }
0094 G4LogicalVolume* GetLogicalAbsorber() { return fLogicAbsorber; }
0095
0096 private:
0097 void DefineMaterials();
0098 void ComputeCalorParameters();
0099 G4VPhysicalVolume* ConstructCalorimeter();
0100
0101 F01DetectorMessenger* fDetectorMessenger = nullptr;
0102 G4Cache<F01CalorimeterSD*> fCalorimeterSD;
0103
0104 G4Tubs* fSolidWorld = nullptr;
0105 G4LogicalVolume* fLogicWorld = nullptr;
0106 G4VPhysicalVolume* fPhysiWorld = nullptr;
0107
0108 G4Tubs* fSolidAbsorber = nullptr;
0109 G4LogicalVolume* fLogicAbsorber = nullptr;
0110 G4VPhysicalVolume* fPhysiAbsorber = nullptr;
0111
0112 G4Material* fAbsorberMaterial = nullptr;
0113 G4double fAbsorberThickness = 1.0 * CLHEP::mm;
0114 G4double fAbsorberRadius = 20000. * CLHEP::mm;
0115
0116 G4double fZAbsorber = 21990. * CLHEP::mm;
0117 G4double fZStartAbs = 0.;
0118 G4double fZEndAbs = 0.;
0119
0120 G4Material* fWorldMaterial = nullptr;
0121 G4double fWorldSizeR = 22000. * CLHEP::mm;
0122 G4double fWorldSizeZ = 44000. * CLHEP::mm;
0123
0124 G4ThreeVector fFieldVector = {0., 0., 3.3*CLHEP::tesla};
0125 };
0126
0127
0128
0129 inline void F01DetectorConstruction::ComputeCalorParameters()
0130 {
0131
0132
0133 fZStartAbs = fZAbsorber - 0.5 * fAbsorberThickness;
0134 fZEndAbs = fZAbsorber + 0.5 * fAbsorberThickness;
0135
0136 G4cout << "-- Calorimeter Absorber z-coords: Start= " << fZStartAbs << " End= " << fZEndAbs
0137 << G4endl;
0138 }
0139
0140 #endif