File indexing completed on 2026-04-05 07:50:39
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 WLSDetectorConstruction_h
0030 #define WLSDetectorConstruction_h 1
0031
0032 #include "G4Cache.hh"
0033 #include "G4RotationMatrix.hh"
0034 #include "G4VUserDetectorConstruction.hh"
0035 #include "globals.hh"
0036
0037 #include <CLHEP/Units/SystemOfUnits.h>
0038
0039 class WLSMaterials;
0040 class WLSDetectorMessenger;
0041 class WLSPhotonDetSD;
0042
0043 class G4Box;
0044 class G4EllipticalTube;
0045 class G4LogicalVolume;
0046 class G4Material;
0047 class G4Tubs;
0048 class G4VisAttributes;
0049 class G4VPhysicalVolume;
0050
0051 class WLSDetectorConstruction : public G4VUserDetectorConstruction
0052 {
0053 public:
0054 WLSDetectorConstruction();
0055 ~WLSDetectorConstruction() override;
0056
0057 G4VPhysicalVolume* Construct() override;
0058 G4VPhysicalVolume* ConstructDetector();
0059
0060 void ConstructSDandField() override;
0061
0062
0063 void SetWorldMaterial(G4String);
0064 void SetWLSFiberMaterial(G4String);
0065 void SetCoupleMaterial(G4String);
0066
0067 void SetPhotonDetGeometry(G4String);
0068 void SetNumberOfCladding(G4int);
0069
0070 void SetWLSLength(G4double);
0071 void SetWLSRadius(G4double);
0072 void SetClad1Radius(G4double);
0073 void SetClad2Radius(G4double);
0074 void SetPhotonDetHalfLength(G4double);
0075 void SetGap(G4double);
0076 void SetPhotonDetAlignment(G4double);
0077
0078 void SetXYRatio(G4double);
0079
0080 void SetSurfaceRoughness(G4double);
0081
0082 void SetMirrorReflectivity(G4double);
0083
0084 void SetMirrorPolish(G4double);
0085
0086 void SetPhotonDetReflectivity(G4double);
0087
0088 void SetPhotonDetPolish(G4double);
0089
0090 void SetMirror(G4bool);
0091
0092 void SetBarLength(G4double);
0093 void SetBarBase(G4double);
0094 void SetHoleRadius(G4double);
0095 void SetCoatingThickness(G4double);
0096 void SetCoatingRadius(G4double);
0097
0098 G4double GetWLSFiberLength();
0099 G4double GetWLSFiberEnd();
0100 G4double GetWLSFiberRMax();
0101 G4double GetSurfaceRoughness();
0102 G4bool IsPerfectFiber();
0103
0104 G4double GetBarLength();
0105 G4double GetBarBase();
0106 G4double GetHoleRadius();
0107 G4double GetHoleLength();
0108 G4double GetFiberRadius();
0109
0110 G4double GetCoatingThickness();
0111 G4double GetCoatingRadius();
0112
0113 G4Material* FindMaterial(G4String);
0114
0115 private:
0116 std::vector<G4VisAttributes*> fVisAttributes;
0117
0118 WLSMaterials* fMaterials = nullptr;
0119
0120 G4LogicalVolume* fLogicHole = nullptr;
0121 G4LogicalVolume* fLogicWorld = nullptr;
0122
0123 G4VPhysicalVolume* fPhysiWorld = nullptr;
0124 G4VPhysicalVolume* fPhysiHole = nullptr;
0125
0126 G4double fWorldSizeX = -1.;
0127 G4double fWorldSizeY = -1.;
0128 G4double fWorldSizeZ = -1.;
0129
0130 G4double fWLSfiberRX = -1.;
0131 G4double fWLSfiberRY = 0.5 * CLHEP::mm;
0132 G4double fWLSfiberZ = 1. * CLHEP::m;
0133
0134 G4double fClad1RX = -1.;
0135 G4double fClad1RY = -1.;
0136 G4double fClad1Z = -1.;
0137
0138 G4double fClad2RX = -1.;
0139 G4double fClad2RY = -1.;
0140 G4double fClad2Z = -1.;
0141
0142 G4double fClrfiberHalfL = -1.;
0143 G4double fClrfiberZ = -1.;
0144
0145 G4double fCoupleRX = -1.;
0146 G4double fCoupleRY = -1.;
0147 G4double fCoupleZ = -1.;
0148
0149 G4double fMirrorRmax = -1.;
0150 G4double fMirrorZ = 0.1 * CLHEP::mm;
0151 G4bool fMirrorToggle = true;
0152
0153 G4String fMPPCShape = "Circle";
0154 G4double fMPPCHalfL = -1.;
0155 G4double fMPPCZ = 0.05 * CLHEP::mm;
0156 G4double fMPPCDist = 0.;
0157 G4double fMPPCTheta = 0;
0158
0159 G4double fWLSfiberOrigin = 0.;
0160 G4double fCoupleOrigin = 0.;
0161 G4double fMirrorOrigin = 0.;
0162 G4double fMPPCOriginX = 0.;
0163 G4double fMPPCOriginZ = 0.;
0164
0165 G4int fNumOfCladLayers = 0;
0166
0167 G4double fMirrorPolish = 1.;
0168 G4double fMirrorReflectivity = 1.;
0169 G4double fMPPCPolish = 1.;
0170 G4double fMPPCReflectivity = 0.;
0171 G4double fExtrusionPolish = 1.;
0172 G4double fExtrusionReflectivity = 1.;
0173 G4double fSurfaceRoughness = 1.;
0174 G4double fXYRatio = 1.;
0175
0176 G4double fBarLength = 1. * CLHEP::m;
0177 G4double fBarBase = 9.6 * CLHEP::mm;
0178 G4double fHoleRadius = 0.9 * CLHEP::mm;
0179 G4double fHoleLength = -1.;
0180 G4double fCoatingThickness = 0.25 * CLHEP::mm;
0181 G4double fCoatingRadius = 1.875 * CLHEP::mm;
0182
0183 void UpdateGeometryParameters();
0184
0185 WLSDetectorMessenger* fDetectorMessenger = nullptr;
0186 G4Cache<WLSPhotonDetSD*> fmppcSD;
0187 };
0188
0189 #endif