File indexing completed on 2025-02-23 09:22: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 #ifndef DetectorConstruction_h
0031 #define DetectorConstruction_h 1
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 #include "G4Material.hh"
0048 #include "G4VPhysicalVolume.hh"
0049 #include "G4VUserDetectorConstruction.hh"
0050
0051
0052
0053 class CheckVolumeSD;
0054 class PhantomSD;
0055 class TargetSD;
0056 class DetectorMessenger;
0057 class G4LogicalVolume;
0058
0059 class DetectorConstruction : public G4VUserDetectorConstruction
0060 {
0061 public:
0062 DetectorConstruction();
0063 virtual ~DetectorConstruction();
0064
0065 G4VPhysicalVolume* Construct();
0066
0067 void SetTarget1Material(const G4String& m);
0068 void SetTarget2Material(const G4String& m);
0069
0070 inline G4double GetGeneratorPosZ() const { return fGeneratorPosZ; };
0071
0072 inline void SetGap(G4double val) { fDelta = val; };
0073 inline void SetTarget1Z(G4double val) { fTarget1Z = val; };
0074 inline void SetTarget2Z(G4double val) { fTarget2Z = val; };
0075 inline void SetMylarZ(G4double val) { fMylarVolumeZ = val; }
0076 inline void SetCheckShiftZ(G4double val) { fCheckShiftZ = val; }
0077 inline void SetAbsorberZ(G4double val) { fAbsorberZ = val; }
0078 inline void SetAbsorberShiftZ(G4double val) { fAbsorberShiftZ = val; }
0079
0080 inline void SetNumberDivZ(G4int val) { fNumZ = val; };
0081 inline void SetNumberDivR(G4int val) { fNumR = val; };
0082
0083 const G4VPhysicalVolume* GetCheckVolume() const { return fCheckVolume; }
0084 const G4VPhysicalVolume* GetGasVolume() const { return fGasVolume; }
0085 const G4VPhysicalVolume* GetPhantom() const { return fPhantom; }
0086 const G4VPhysicalVolume* GetTarget1() const { return fTarget1; }
0087 const G4VPhysicalVolume* GetTarget2() const { return fTarget2; }
0088
0089 G4double GetAbsorberZ() const { return fPhantomZ; }
0090 G4double GetAbsorberR() const { return fAbsorberRadius; }
0091 G4double GetScoreZ() const { return fAbsorberShiftZ; }
0092
0093 G4int GetNumberDivZ() const { return fNumZ; }
0094 G4int GetNumberDivR() const { return fNumR; }
0095
0096 void SetMaxEnergy(G4double e) { fMaxEnergy = e; }
0097 inline G4double GetMaxEnergy() const { return fMaxEnergy; }
0098 G4int GetNumberDivE() const { return fNumE; }
0099 inline void SetNumberDivE(G4int val) { fNumE = val; };
0100
0101 void SetVerbose(G4bool v) { fVerbose = v; }
0102 inline G4bool GetVerbose() const { return fVerbose; }
0103
0104 void DumpGeometryParameters();
0105
0106 private:
0107 void InitialiseGeometryParameters();
0108
0109 DetectorConstruction& operator=(const DetectorConstruction& right);
0110 DetectorConstruction(const DetectorConstruction&);
0111 void ConstructSDandField();
0112
0113 G4bool fVerbose;
0114
0115 G4int fNumZ;
0116 G4int fNumR;
0117
0118 G4int fNumE;
0119 G4double fMaxEnergy;
0120
0121 G4LogicalVolume* fLogicCheckVolume;
0122 std::vector<G4LogicalVolume*> fLogicRing;
0123 G4LogicalVolume* fLogicPh;
0124 G4LogicalVolume* fLogicAbsorber;
0125
0126 G4double fWorldXY, fWorldZ;
0127 G4double fDelta;
0128 G4double fGeneratorPosZ;
0129
0130 G4double fTargetRadius, fTarget1Z, fTarget1PosZ;
0131 G4double fTarget2Z, fTarget2PosZ;
0132
0133 G4double fGasVolumeRadius, fGasVolumeZ, fGasVolumePosZ;
0134 G4double fAirZ, fMylarVolumeZ, fMylarPosZ;
0135 G4double fCheckVolumeRadius, fCheckVolumeZ, fCheckShiftZ, fCheckVolumePosZ;
0136 G4double fTargetVolumeZ, fTargetVolumePosZ;
0137 G4double fShiftZPh;
0138
0139 G4double fPhantomRadius, fPhantomZ, fPhantomPosZ;
0140 G4double fAbsorberRadius, fAbsorberZ, fAbsorberShiftZ, fAbsorberPosZ;
0141 G4double fDistanceVacuumTarget, fWindowZ, fWindowPosZ;
0142
0143 G4Material* fWorldMaterial;
0144
0145 G4Material* fTarget1Material;
0146 G4Material* fTarget2Material;
0147 G4Material* fMylar;
0148 G4Material* fWindowMaterial;
0149
0150 G4Material* fLightMaterial;
0151 G4Material* fAbsorberMaterial;
0152
0153 G4LogicalVolume* fLogicTarget1;
0154 G4LogicalVolume* fLogicTarget2;
0155
0156 G4VPhysicalVolume* fCheckVolume;
0157 G4VPhysicalVolume* fGasVolume;
0158 G4VPhysicalVolume* fPhantom;
0159 G4VPhysicalVolume* fTarget1;
0160 G4VPhysicalVolume* fTarget2;
0161
0162 DetectorMessenger* fMessenger;
0163 };
0164
0165
0166
0167 #endif