Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-26 07:05:25

0001 // ********************************************************************
0002 //
0003 // eASTDetectorConstruction.hh
0004 //   Header file of the detector construction. 
0005 //
0006 // History
0007 //   May 8th, 2021 : first implementation
0008 //
0009 // ********************************************************************
0010 
0011 #ifndef eASTDetectorConstruction_H
0012 #define eASTDetectorConstruction_H 1
0013 
0014 #include "G4VUserDetectorConstruction.hh"
0015 #include "globals.hh"
0016 #include "G4ThreeVector.hh"
0017 #include <map>
0018 
0019 class eASTDetectorConstructionMessenger;
0020 class eASTVDetectorComponent;
0021 class eASTMagneticField;
0022 class G4VPhysicalVolume;
0023 
0024 class eASTDetectorConstruction : public G4VUserDetectorConstruction
0025 {
0026   public:
0027     eASTDetectorConstruction();
0028     virtual ~eASTDetectorConstruction();
0029     virtual G4VPhysicalVolume* Construct() override;
0030     virtual void ConstructSDandField() override;
0031 
0032   public:
0033     static eASTDetectorConstruction* Instance();
0034 
0035   private:
0036     static eASTDetectorConstruction* instance;
0037 
0038   private:
0039     eASTDetectorConstructionMessenger* messenger;
0040     G4VPhysicalVolume* fWorld = nullptr;
0041     eASTMagneticField* fField = nullptr;
0042 
0043   public:
0044     void RegisterComponent(G4String,eASTVDetectorComponent*);
0045 
0046   private:
0047     std::map<G4String,eASTVDetectorComponent*> components;
0048 
0049   public:
0050     void ListSolids(G4int);
0051     void ListLogVols(G4int);
0052     void ListPhysVols(G4int);
0053     void ListRegions(G4int);
0054     G4bool CheckOverlap(G4String&,G4int,G4int,G4double);
0055 
0056     void ListAllMaterial();
0057     G4bool ListMaterial(G4String&);
0058     void DumpNistMaterials();
0059     G4bool CreateMaterial(G4String&);
0060     G4bool GetMaterial(G4String&);
0061     G4int SetMaterial(G4String&,G4String&);
0062 
0063     void SetMagneticField(eASTMagneticField* field) {
0064       fField = field;
0065     }
0066 };
0067 
0068 #endif