Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-11 07:56:39

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 G02DetectorConstruction.hh
0027 /// \brief Definition of the G02DetectorConstruction class
0028 
0029 // Class G02DetectorConstruction
0030 //
0031 // A detector construction class loading the geometry from GDML files.
0032 //
0033 // ----------------------------------------------------------------------------
0034 
0035 #ifndef G02DetectorConstruction_H
0036 #define G02DetectorConstruction_H 1
0037 
0038 #include "G4GDMLParser.hh"
0039 #include "G4Material.hh"
0040 #include "G4VUserDetectorConstruction.hh"
0041 #include "globals.hh"
0042 
0043 class G02DetectorMessenger;
0044 
0045 // ----------------------------------------------------------------------------
0046 
0047 /// Detector construction used in GDML read/write example
0048 
0049 class G02DetectorConstruction : public G4VUserDetectorConstruction
0050 {
0051   public:
0052     // Constructor and destructor
0053     //
0054     G02DetectorConstruction();
0055     ~G02DetectorConstruction();
0056 
0057     // Construction of SubDetectors
0058     //
0059     virtual G4VPhysicalVolume* Construct();
0060     G4LogicalVolume* ConstructSubDetector1();
0061     G4LogicalVolume* ConstructSubDetector2();
0062     G4VPhysicalVolume* ConstructDetector();
0063     G4LogicalVolume* ConstructAssembly();
0064     G4LogicalVolume* ConstructParametrisationChamber();
0065 
0066     // Make List of materials
0067     //
0068     void ListOfMaterials();
0069 
0070     // Writing and Reading GDML
0071     //
0072     void SetReadFile(const G4String& File);
0073     void SetWriteFile(const G4String& File);
0074 
0075     // Reading STEP File
0076     //
0077     void SetStepFile(const G4String& File);
0078 
0079   private:
0080     G4Material* fAir;
0081     G4Material* fAluminum;
0082     G4Material* fPb;
0083     G4Material* fXenon;
0084 
0085     // GDMLparser
0086     //
0087     G4GDMLParser fParser;
0088 
0089     // Reading and Writing Settings
0090     //
0091     G4String fReadFile;
0092     G4String fWriteFile;
0093     G4String fStepFile;
0094     G4int fWritingChoice;
0095 
0096     // Detector Messenger
0097     //
0098     G02DetectorMessenger* fDetectorMessenger;
0099 
0100     // World Dimentions
0101     //
0102     G4double fExpHall_x;
0103 };
0104 
0105 // ----------------------------------------------------------------------------
0106 
0107 #endif