Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-17 07:51:43

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 electromagnetic/TestEm14/include/DetectorConstruction.hh
0027 /// \brief Definition of the DetectorConstruction class
0028 //
0029 // $Id: DetectorConstruction.hh 84208 2014-10-10 14:44:50Z gcosmo $
0030 // 
0031 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0032 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0033 
0034 #ifndef DetectorConstruction_h
0035 #define DetectorConstruction_h 1
0036 
0037 #include "G4VUserDetectorConstruction.hh"
0038 #include "globals.hh"
0039 #include "G4ThreeVector.hh"
0040 #include "G4Box.hh"
0041 #include "MicroElecSdSey.hh"
0042 #include "G4VPhysicalVolume.hh"
0043 #include "G4LogicalVolume.hh"
0044 #include "G4Sphere.hh"
0045 #include "G4Material.hh"
0046 #include "G4NistManager.hh"
0047 #include "G4PVPlacement.hh"
0048 #include "G4UserLimits.hh"
0049 #include "G4VisAttributes.hh"
0050 
0051 
0052 
0053 class G4LogicalVolume;
0054 class G4Material;
0055 class DetectorMessenger;
0056 class G4UserLimits;
0057 class G4Region;
0058 class ElectroMagneticFieldSetup;
0059 const G4int kMaxAbsor = 1;
0060 
0061 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0062 
0063 class DetectorConstruction : public G4VUserDetectorConstruction
0064 {
0065   public:
0066   
0067     DetectorConstruction();
0068    ~DetectorConstruction();
0069 
0070   public:
0071   
0072       G4Region* GetTargetRegion() { return fRegion; }
0073 
0074      G4VPhysicalVolume* Construct() override;
0075      void ConstructSDandField() override;
0076 
0077      void SetSize     (G4double);              
0078      void SetWidth    (G4double);
0079      void SetMaterial (G4String);
0080      void SetSizeSurface(G4double);
0081      void SetMaterialSurface(G4String);
0082      void SetSizeLayer1(G4double);
0083      void SetMaterialLayer1(G4String);
0084      void SetSizeLayer2(G4double);
0085      void SetMaterialLayer2(G4String);
0086      void SetSizeLayer3(G4double);
0087      void SetMaterialLayer3(G4String);
0088      void SetSizeLayer4(G4double);
0089      void SetMaterialLayer4(G4String);
0090 
0091 
0092      void UpdateGeometry();
0093      G4Material* DefaultMaterial;
0094      G4Material* My_TiN;
0095      G4Material* My_BN;
0096      G4Material* My_SiO2;
0097      G4Material* My_Kapton;
0098 
0099   public:
0100   
0101      const
0102      G4VPhysicalVolume* GetWorld()      {return fPBox;};           
0103                     
0104      G4double           GetSize()       {return fBoxSize;};
0105      G4double           GetWidth()      { return fBoxWidth; };
0106      G4Material*        GetMaterial()   {return fMaterial;};
0107      G4double           GetSizeSurface() { return fBoxSizeSurface; };
0108      G4Material*        GetMaterialSurface() { return fMaterialSurface; };
0109      G4double           GetSizeLayer1() { return fBoxSizeLayer1; };
0110      G4Material*        GetMaterialLayer1() { return fMaterialLayer1; };
0111      G4double           GetSizeLayer2() { return fBoxSizeLayer2; };
0112      G4Material*        GetMaterialLayer2() { return fMaterialLayer2; };
0113      G4double           GetSizeLayer3() { return fBoxSizeLayer3; };
0114      G4Material*        GetMaterialLayer3() { return fMaterialLayer3; };
0115      G4double           GetSizeLayer4() { return fBoxSizeLayer4; };
0116      G4Material*        GetMaterialLayer4() { return fMaterialLayer4; };
0117 
0118     
0119      //SDTrajectoires* GetSensitiveDetector() { return pSDTrajectoires; };
0120      
0121      void               PrintParameters();
0122                        
0123   private:
0124   
0125       G4Region*          fRegion;
0126 
0127      G4double       fWorldSizeX;
0128      G4double       fWorldSizeY;
0129      G4double       fWorldSizeZ;
0130      G4Material*    World_Material;
0131 
0132      G4Box*             fSolidWorld;
0133      G4LogicalVolume*   fLogicWorld;
0134      G4VPhysicalVolume* fPhysiWorld;
0135      
0136      G4double           WorldDim;
0137      G4double           WorldRay;
0138      
0139      // substrate
0140      G4Box*                 fSBox;
0141      G4LogicalVolume*      fLBox;
0142      G4VPhysicalVolume*    fPBox;
0143      G4double              fBoxSize;
0144      G4double              fBoxWidth;
0145      G4Material*           fMaterial;
0146      // surface
0147      G4Box*                 fSBoxSurface;
0148      G4VPhysicalVolume*    fPBoxSurface;
0149      G4LogicalVolume*      fLBoxSurface;
0150      G4double              fBoxSizeSurface;
0151      G4Material*           fMaterialSurface;
0152      // Layer 1 just below the surface
0153      G4Box*                 fSBoxLayer1;
0154      G4VPhysicalVolume*    fPBoxLayer1;
0155      G4LogicalVolume*      fLBoxLayer1;
0156      G4double              fBoxSizeLayer1;
0157      G4Material*           fMaterialLayer1;
0158      // Layer 2 just below the layer1
0159      G4Box*                 fSBoxLayer2;
0160      G4VPhysicalVolume*    fPBoxLayer2;
0161      G4LogicalVolume*      fLBoxLayer2;
0162      G4double              fBoxSizeLayer2;
0163      G4Material*           fMaterialLayer2;
0164      // Layer 3 just below the layer2
0165      G4Box*                 fSBoxLayer3;
0166      G4VPhysicalVolume*    fPBoxLayer3;
0167      G4LogicalVolume*      fLBoxLayer3;
0168      G4double              fBoxSizeLayer3;
0169      G4Material*           fMaterialLayer3;
0170      // Layer 4 just below the layer3 on top of the substrate
0171      G4Box*                 fSBoxLayer4;
0172      G4VPhysicalVolume*    fPBoxLayer4;
0173      G4LogicalVolume*      fLBoxLayer4;
0174      G4double              fBoxSizeLayer4;
0175      G4Material*           fMaterialLayer4;
0176 
0177      G4Sphere*              Detector_1_box;
0178      G4LogicalVolume*       Detector_1_log; 
0179      G4VPhysicalVolume*     Detector_1_phys;  
0180      G4Material* detectorMat;
0181      G4double DetectorRay;
0182      
0183 
0184      DetectorMessenger* fDetectorMessenger;
0185 
0186   private:
0187     
0188      void               DefineMaterials();
0189      G4VPhysicalVolume* ConstructVolumes();
0190 
0191 
0192 };
0193 
0194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0195 
0196 
0197 #endif
0198