File indexing completed on 2025-04-10 08:06:16
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 #ifndef DetectorConstruction_H
0035 #define DetectorConstruction_H 1
0036
0037 #include "G4VUserDetectorConstruction.hh"
0038 #include "globals.hh"
0039
0040 class G4LogicalVolume;
0041 class G4VPhysicalVolume;
0042 class G4FieldManager;
0043 class G4UniformMagField;
0044 class G4Material;
0045 class DetectorMessenger;
0046
0047
0048
0049 class DetectorConstruction : public G4VUserDetectorConstruction
0050 {
0051 public:
0052 DetectorConstruction();
0053 ~DetectorConstruction();
0054
0055 G4VPhysicalVolume* Construct();
0056 void ConstructSDandField();
0057
0058 void SetMagField(const G4double fieldValue);
0059 void SetAbsorberMaterial(const G4String name);
0060 void SetActiveMaterial(const G4String name);
0061
0062
0063 inline G4Material* GetAbsorberMaterial() const;
0064 inline G4Material* GetActiveMaterial() const;
0065
0066 inline void SetIsCalHomogeneous(const G4bool choice);
0067 inline void SetIsUnitInLambda(const G4bool choice);
0068 inline void SetAbsorberTotalLength(const G4double value);
0069 inline void SetCalorimeterRadius(const G4double value);
0070 inline void SetActiveLayerNumber(const G4int value);
0071 inline void SetActiveLayerSize(const G4double value);
0072
0073
0074 inline void SetIsRadiusUnitInLambda(const G4bool choice);
0075
0076 void UpdateGeometry();
0077
0078 inline G4double GetCaloLength() const;
0079
0080 private:
0081 void DefineMaterials();
0082
0083
0084 G4VPhysicalVolume* ConstructCalorimeter();
0085
0086
0087 G4bool AreParametersOK();
0088
0089
0090 void PrintParameters();
0091
0092
0093 G4Material* fVacuum;
0094 G4Material* fIron;
0095 G4Material* fCopper;
0096 G4Material* fTungsten;
0097 G4Material* fLead;
0098 G4Material* fUranium;
0099 G4Material* fPbWO4;
0100 G4Material* fPolystyrene;
0101 G4Material* fLiquidArgon;
0102 G4Material* fSilicon;
0103 G4Material* fQuartz;
0104 G4Material* fBrass;
0105 G4Material* fAluminium;
0106 G4Material* fGraphite;
0107 G4Material* fAbsorberMaterial;
0108 G4Material* fActiveMaterial;
0109
0110 G4LogicalVolume* fExperimentalHall_log;
0111 G4VPhysicalVolume* fExperimentalHall_phys;
0112
0113
0114 G4LogicalVolume* fLogicCalo;
0115 G4VPhysicalVolume* fPhysiCalo;
0116
0117
0118 G4LogicalVolume* fLogicModule;
0119 G4VPhysicalVolume* fPhysiModule;
0120
0121
0122 G4LogicalVolume* fLogicAbsorber;
0123 G4VPhysicalVolume* fPhysiAbsorber;
0124
0125
0126 G4LogicalVolume* fLogicActive;
0127 G4VPhysicalVolume* fPhysiActive;
0128
0129
0130 G4FieldManager* fFieldMgr;
0131
0132
0133 G4UniformMagField* fUniformMagField;
0134
0135
0136 DetectorMessenger* fDetectorMessenger;
0137
0138
0139 G4bool fIsCalHomogeneous;
0140
0141
0142
0143 G4bool fIsUnitInLambda;
0144
0145
0146
0147 G4double fAbsorberTotalLength;
0148
0149
0150
0151
0152
0153
0154
0155
0156 G4double fCalorimeterRadius;
0157
0158
0159
0160
0161 G4int fActiveLayerNumber;
0162 G4double fActiveLayerSize;
0163
0164
0165
0166
0167
0168
0169
0170
0171 G4bool fIsRadiusUnitInLambda;
0172
0173
0174
0175
0176 G4double fCaloLength;
0177
0178
0179 G4LogicalVolume* fLogicScoringUpDown;
0180 G4VPhysicalVolume* fPhysiScoringUpstream;
0181 G4VPhysicalVolume* fPhysiScoringDownstream;
0182 G4LogicalVolume* fLogicScoringSide;
0183 G4VPhysicalVolume* fPhysiScoringSide;
0184 const G4double fScoringThickness = 10.0;
0185 };
0186
0187 inline G4Material* DetectorConstruction::GetAbsorberMaterial() const
0188 {
0189 return fAbsorberMaterial;
0190 }
0191
0192 inline G4Material* DetectorConstruction::GetActiveMaterial() const
0193 {
0194 return fActiveMaterial;
0195 }
0196
0197 inline void DetectorConstruction::SetIsCalHomogeneous(const G4bool choice)
0198 {
0199 fIsCalHomogeneous = choice;
0200 }
0201
0202 inline void DetectorConstruction::SetIsUnitInLambda(const G4bool choice)
0203 {
0204 fIsUnitInLambda = choice;
0205 }
0206
0207 inline void DetectorConstruction::SetAbsorberTotalLength(const G4double value)
0208 {
0209 fAbsorberTotalLength = value;
0210 }
0211
0212 inline void DetectorConstruction::SetCalorimeterRadius(const G4double value)
0213 {
0214 fCalorimeterRadius = value;
0215 }
0216
0217 inline void DetectorConstruction::SetActiveLayerNumber(const G4int value)
0218 {
0219 fActiveLayerNumber = value;
0220 }
0221
0222 inline void DetectorConstruction::SetActiveLayerSize(const G4double value)
0223 {
0224 fActiveLayerSize = value;
0225 }
0226
0227 inline void DetectorConstruction::SetIsRadiusUnitInLambda(const G4bool choice)
0228 {
0229 fIsRadiusUnitInLambda = choice;
0230 }
0231
0232 inline G4double DetectorConstruction::GetCaloLength() const
0233 {
0234 return fCaloLength;
0235 }
0236
0237
0238
0239 #endif