Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:36

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