File indexing completed on 2025-12-17 09:28:32
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 #include "LXeWLSSlab.hh"
0032
0033 #include "LXeWLSFiber.hh"
0034
0035 #include "G4Box.hh"
0036 #include "G4LogicalVolume.hh"
0037 #include "G4Material.hh"
0038 #include "G4SystemOfUnits.hh"
0039 #include "globals.hh"
0040
0041 G4LogicalVolume* LXeWLSSlab::fScintSlab_log = nullptr;
0042
0043
0044
0045 LXeWLSSlab::LXeWLSSlab(G4RotationMatrix* pRot, const G4ThreeVector& tlate,
0046 G4LogicalVolume* pMotherLogical, G4bool pMany, G4int pCopyNo,
0047 LXeDetectorConstruction* c)
0048 : G4PVPlacement(
0049 pRot, tlate,
0050 new G4LogicalVolume(new G4Box("temp", 1., 1., 1.), G4Material::GetMaterial("Vacuum"), "temp"),
0051 "Slab", pMotherLogical, pMany, pCopyNo),
0052 fConstructor(c)
0053 {
0054 CopyValues();
0055
0056 G4double slab_x = fScint_x / 2.;
0057 G4double slab_y = fScint_y / 2.;
0058
0059 auto ScintSlab_box = new G4Box("Slab", slab_x, slab_y, fSlab_z);
0060
0061 fScintSlab_log =
0062 new G4LogicalVolume(ScintSlab_box, G4Material::GetMaterial("Polystyrene"), "Slab");
0063
0064 G4double spacing = 2. * slab_y / fNfibers;
0065
0066 auto rm = new G4RotationMatrix();
0067 rm->rotateY(90. * deg);
0068
0069
0070 for (G4int i = 0; i < fNfibers; ++i) {
0071 G4double Y = -(spacing) * (fNfibers - 1) * 0.5 + i * spacing;
0072 new LXeWLSFiber(rm, G4ThreeVector(0., Y, 0.), fScintSlab_log, false, 0, fConstructor);
0073 }
0074
0075 SetLogicalVolume(fScintSlab_log);
0076 }
0077
0078
0079
0080 void LXeWLSSlab::CopyValues()
0081 {
0082 fScint_x = fConstructor->GetScintX();
0083 fScint_y = fConstructor->GetScintY();
0084 fScint_z = fConstructor->GetScintZ();
0085 fNfibers = fConstructor->GetNFibers();
0086 fSlab_z = fConstructor->GetSlabZ();
0087 }