//construction.hh #ifndef CONSTRUCTION_HH #define CONSTRUCTION_HH #include "G4VUserDetectorConstruction.hh" #include "G4VPhysicalVolume.hh" #include "G4LogicalVolume.hh" #include "G4Box.hh" #include "G4Tubs.hh" #include "G4SubtractionSolid.hh" #include "G4PVPlacement.hh" #include "G4NistManager.hh" #include "G4SystemOfUnits.hh" #include "G4UnionSolid.hh" #include "G4AnalysisManager.hh" #include "detector.hh" class MyDetectorConstruction : public G4VUserDetectorConstruction { public: MyDetectorConstruction(); ~MyDetectorConstruction(); G4LogicalVolume *GetScoringVolume() const { return fScoringVolume; } virtual G4VPhysicalVolume *Construct(); G4double gold_thickness = 1000 *um; G4String thickness = G4UIcommand::ConvertToString(gold_thickness/(2*um)); G4String fileName = thickness+"um"+".root"; G4String getString(){ return fileName; } private: G4LogicalVolume *logicDetector; virtual void ConstructSDandField(); G4LogicalVolume *fScoringVolume; }; #endif