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