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 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  1 //
  2 // ********************************************************************
  3 // * License and Disclaimer                                           *
  4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.                             *
 10 // *                                                                  *
 11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                                                  *
 18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // ********************************************************************
 25 //
 26 //
 27 /// \file optical/wls/include/WLSDetectorConstruction.hh
 28 /// \brief Definition of the WLSDetectorConstruction class
 29 //
 30 
 31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 33 
 34 #ifndef WLSDetectorConstruction_h
 35 #define WLSDetectorConstruction_h 1
 36 
 37 #include "G4Cache.hh"
 38 #include "G4RotationMatrix.hh"
 39 #include "G4VUserDetectorConstruction.hh"
 40 #include "globals.hh"
 41 
 42 #include <CLHEP/Units/SystemOfUnits.h>
 43 
 44 class WLSMaterials;
 45 class WLSDetectorMessenger;
 46 class WLSPhotonDetSD;
 47 
 48 class G4Box;
 49 class G4EllipticalTube;
 50 class G4LogicalVolume;
 51 class G4Material;
 52 class G4Tubs;
 53 class G4VisAttributes;
 54 class G4VPhysicalVolume;
 55 
 56 class WLSDetectorConstruction : public G4VUserDetectorConstruction
 57 {
 58   public:
 59     WLSDetectorConstruction();
 60     ~WLSDetectorConstruction() override;
 61 
 62     G4VPhysicalVolume* Construct() override;
 63     G4VPhysicalVolume* ConstructDetector();
 64 
 65     void ConstructSDandField() override;
 66 
 67     // Set Material Commands for World and WLSfiber
 68     void SetWorldMaterial(G4String);
 69     void SetWLSFiberMaterial(G4String);
 70     void SetCoupleMaterial(G4String);
 71 
 72     void SetPhotonDetGeometry(G4String);
 73     void SetNumberOfCladding(G4int);  // Maximum 2 claddings
 74 
 75     void SetWLSLength(G4double);  // Total length of WLS fiber
 76     void SetWLSRadius(G4double);
 77     void SetClad1Radius(G4double);
 78     void SetClad2Radius(G4double);
 79     void SetPhotonDetHalfLength(G4double);
 80     void SetGap(G4double);
 81     void SetPhotonDetAlignment(G4double);
 82     // Set the ratio of x and y (x/y) radius of the ellipse
 83     void SetXYRatio(G4double);
 84     // Set the Roughness in between each layer
 85     void SetSurfaceRoughness(G4double);
 86     // Set the reflectivity of the mirror
 87     void SetMirrorReflectivity(G4double);
 88     // Set the polish of the mirror
 89     void SetMirrorPolish(G4double);
 90     // Set the reflectivity of the mirror
 91     void SetPhotonDetReflectivity(G4double);
 92     // Set the polish of the mirror
 93     void SetPhotonDetPolish(G4double);
 94 
 95     void SetMirror(G4bool);
 96 
 97     void SetBarLength(G4double);
 98     void SetBarBase(G4double);
 99     void SetHoleRadius(G4double);
100     void SetCoatingThickness(G4double);
101     void SetCoatingRadius(G4double);
102 
103     G4double GetWLSFiberLength();
104     G4double GetWLSFiberEnd();
105     G4double GetWLSFiberRMax();
106     G4double GetSurfaceRoughness();
107     G4bool IsPerfectFiber();
108 
109     G4double GetBarLength();
110     G4double GetBarBase();
111     G4double GetHoleRadius();
112     G4double GetHoleLength();
113     G4double GetFiberRadius();
114 
115     G4double GetCoatingThickness();
116     G4double GetCoatingRadius();
117 
118     G4Material* FindMaterial(G4String);
119 
120   private:
121     std::vector<G4VisAttributes*> fVisAttributes;
122 
123     WLSMaterials* fMaterials = nullptr;
124 
125     G4LogicalVolume* fLogicHole = nullptr;
126     G4LogicalVolume* fLogicWorld = nullptr;
127 
128     G4VPhysicalVolume* fPhysiWorld = nullptr;
129     G4VPhysicalVolume* fPhysiHole = nullptr;
130 
131     G4double fWorldSizeX = -1.;
132     G4double fWorldSizeY = -1.;
133     G4double fWorldSizeZ = -1.;
134 
135     G4double fWLSfiberRX = -1.;
136     G4double fWLSfiberRY = 0.5 * CLHEP::mm;
137     G4double fWLSfiberZ = 1. * CLHEP::m;
138 
139     G4double fClad1RX = -1.;
140     G4double fClad1RY = -1.;
141     G4double fClad1Z = -1.;
142 
143     G4double fClad2RX = -1.;
144     G4double fClad2RY = -1.;
145     G4double fClad2Z = -1.;
146 
147     G4double fClrfiberHalfL = -1.;
148     G4double fClrfiberZ = -1.;
149 
150     G4double fCoupleRX = -1.;
151     G4double fCoupleRY = -1.;
152     G4double fCoupleZ = -1.;
153 
154     G4double fMirrorRmax = -1.;
155     G4double fMirrorZ = 0.1 * CLHEP::mm;
156     G4bool fMirrorToggle = true;
157 
158     G4String fMPPCShape = "Circle";
159     G4double fMPPCHalfL = -1.;
160     G4double fMPPCZ = 0.05 * CLHEP::mm;
161     G4double fMPPCDist = 0.;
162     G4double fMPPCTheta = 0;
163 
164     G4double fWLSfiberOrigin = 0.;
165     G4double fCoupleOrigin = 0.;
166     G4double fMirrorOrigin = 0.;
167     G4double fMPPCOriginX = 0.;
168     G4double fMPPCOriginZ = 0.;
169 
170     G4int fNumOfCladLayers = 0;
171 
172     G4double fMirrorPolish = 1.;
173     G4double fMirrorReflectivity = 1.;
174     G4double fMPPCPolish = 1.;
175     G4double fMPPCReflectivity = 0.;
176     G4double fExtrusionPolish = 1.;
177     G4double fExtrusionReflectivity = 1.;
178     G4double fSurfaceRoughness = 1.;
179     G4double fXYRatio = 1.;
180 
181     G4double fBarLength = 1. * CLHEP::m;
182     G4double fBarBase = 9.6 * CLHEP::mm;
183     G4double fHoleRadius = 0.9 * CLHEP::mm;
184     G4double fHoleLength = -1.;
185     G4double fCoatingThickness = 0.25 * CLHEP::mm;
186     G4double fCoatingRadius = 1.875 * CLHEP::mm;
187 
188     void UpdateGeometryParameters();
189 
190     WLSDetectorMessenger* fDetectorMessenger = nullptr;
191     G4Cache<WLSPhotonDetSD*> fmppcSD;
192 };
193 
194 #endif
195