Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-08 07:53:50

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 LXeMainVolume.hh
0027 /// \brief Definition of the LXeMainVolume class
0028 
0029 #ifndef LXeMainVolume_h
0030 #define LXeMainVolume_h 1
0031 
0032 #include "LXeDetectorConstruction.hh"
0033 
0034 #include "G4PVPlacement.hh"
0035 
0036 class G4Box;
0037 class G4LogicalVolume;
0038 class G4Sphere;
0039 class G4Tubs;
0040 
0041 class LXeMainVolume : public G4PVPlacement
0042 {
0043   public:
0044     LXeMainVolume(G4RotationMatrix* pRot, const G4ThreeVector& tlate,
0045                   G4LogicalVolume* pMotherLogical, G4bool pMany, G4int pCopyNo,
0046                   LXeDetectorConstruction* c);
0047 
0048     G4LogicalVolume* GetLogPhotoCath() { return fPhotocath_log; }
0049     G4LogicalVolume* GetLogScint() { return fScint_log; }
0050 
0051     std::vector<G4ThreeVector> GetPmtPositions() { return fPmtPositions; }
0052 
0053   private:
0054     void VisAttributes();
0055     void SurfaceProperties();
0056 
0057     void PlacePMTs(G4LogicalVolume* pmt_Log, G4RotationMatrix* rot, G4double& a, G4double& b,
0058                    G4double da, G4double db, G4double amin, G4double bmin, G4int na, G4int nb,
0059                    G4double& x, G4double& y, G4double& z, G4int& k);
0060 
0061     void CopyValues();
0062 
0063     LXeDetectorConstruction* fConstructor = nullptr;
0064 
0065     G4double fScint_x = 0.;
0066     G4double fScint_y = 0.;
0067     G4double fScint_z = 0.;
0068     G4double fD_mtl = 0.;
0069     G4int fNx = 0;
0070     G4int fNy = 0;
0071     G4int fNz = 0;
0072     G4double fOuterRadius_pmt = 0.;
0073     G4bool fSphereOn = false;
0074     G4double fRefl = 0.;
0075 
0076     // Basic Volumes
0077     //
0078     G4Box* fScint_box = nullptr;
0079     G4Box* fHousing_box = nullptr;
0080     G4Tubs* fPmt = nullptr;
0081     G4Tubs* fPhotocath = nullptr;
0082     G4Sphere* fSphere = nullptr;
0083 
0084     // Logical volumes
0085     //
0086     G4LogicalVolume* fScint_log = nullptr;
0087     G4LogicalVolume* fHousing_log = nullptr;
0088     G4LogicalVolume* fPmt_log = nullptr;
0089     G4LogicalVolume* fPhotocath_log = nullptr;
0090     G4LogicalVolume* fSphere_log = nullptr;
0091 
0092     // Sensitive Detectors positions
0093     std::vector<G4ThreeVector> fPmtPositions;
0094 };
0095 
0096 #endif