Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-02 07:37:23

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file LXeWLSFiber.cc
0027 /// \brief Implementation of the LXeWLSFiber class
0028 
0029 #include "LXeWLSFiber.hh"
0030 
0031 #include "G4Box.hh"
0032 #include "G4LogicalVolume.hh"
0033 #include "G4Material.hh"
0034 #include "G4SystemOfUnits.hh"
0035 #include "G4Tubs.hh"
0036 #include "globals.hh"
0037 
0038 G4LogicalVolume* LXeWLSFiber::fClad2_log = nullptr;
0039 
0040 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0041 
0042 LXeWLSFiber::LXeWLSFiber(G4RotationMatrix* pRot, const G4ThreeVector& tlate,
0043                          G4LogicalVolume* pMotherLogical, G4bool pMany, G4int pCopyNo,
0044                          LXeDetectorConstruction* c)
0045   : G4PVPlacement(
0046       pRot, tlate,
0047       new G4LogicalVolume(new G4Box("temp", 1., 1., 1.), G4Material::GetMaterial("Vacuum"), "temp"),
0048       "Cladding2", pMotherLogical, pMany, pCopyNo),
0049     fConstructor(c)
0050 {
0051   CopyValues();
0052 
0053   // The Fiber
0054   //
0055   auto fiber_tube =
0056     new G4Tubs("Fiber", fFiber_rmin, fFiber_rmax, fFiber_z, fFiber_sphi, fFiber_ephi);
0057 
0058   auto fiber_log = new G4LogicalVolume(fiber_tube, G4Material::GetMaterial("PMMA"), "Fiber");
0059 
0060   // Cladding (first layer)
0061   //
0062   auto clad1_tube =
0063     new G4Tubs("Cladding1", fClad1_rmin, fClad1_rmax, fClad1_z, fClad1_sphi, fClad1_ephi);
0064 
0065   auto clad1_log =
0066     new G4LogicalVolume(clad1_tube, G4Material::GetMaterial("Pethylene1"), "Cladding1");
0067 
0068   // Cladding (second layer)
0069   //
0070   auto clad2_tube =
0071     new G4Tubs("Cladding2", fClad2_rmin, fClad2_rmax, fClad2_z, fClad2_sphi, fClad2_ephi);
0072 
0073   fClad2_log = new G4LogicalVolume(clad2_tube, G4Material::GetMaterial("Pethylene2"), "Cladding2");
0074 
0075   new G4PVPlacement(nullptr, G4ThreeVector(0., 0., 0.), fiber_log, "Fiber", clad1_log, false, 0);
0076   new G4PVPlacement(nullptr, G4ThreeVector(0., 0., 0.), clad1_log, "Cladding1", fClad2_log, false,
0077                     0);
0078 
0079   SetLogicalVolume(fClad2_log);
0080 }
0081 
0082 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0083 
0084 void LXeWLSFiber::CopyValues()
0085 {
0086   fFiber_rmin = 0.0 * cm;
0087   fFiber_rmax = 0.1 * cm;
0088   fFiber_z = fConstructor->GetScintX() / 2.;
0089   fFiber_sphi = 0.0 * deg;
0090   fFiber_ephi = 360. * deg;
0091 
0092   fClad1_rmin = 0.;  // fFiber_rmax;
0093   fClad1_rmax = fFiber_rmax + 0.015 * fFiber_rmax;
0094 
0095   fClad1_z = fFiber_z;
0096   fClad1_sphi = fFiber_sphi;
0097   fClad1_ephi = fFiber_ephi;
0098 
0099   fClad2_rmin = 0.;  // fClad1_rmax;
0100   fClad2_rmax = fClad1_rmax + 0.015 * fFiber_rmax;
0101 
0102   fClad2_z = fFiber_z;
0103   fClad2_sphi = fFiber_sphi;
0104   fClad2_ephi = fFiber_ephi;
0105 }