LDMX Software
DetectorConstruction.h
1#ifndef SIMCORE_DETECTORCONSTRUCTION_H
2#define SIMCORE_DETECTORCONSTRUCTION_H
3
4//---< Geant4 >---//
5#include "G4LogicalVolume.hh"
6#include "G4LogicalVolumeStore.hh"
7#include "G4VUserDetectorConstruction.hh"
8
9//---< Framework >---//
10#include "Framework/Configure/Parameters.h"
11
12//---< SimCore >---//
13#include "SimCore/Geo/Parser.h"
14
15// Forward declaration
16namespace simcore::geo {
17class Parser;
18}
19
20namespace simcore {
21
33class DetectorConstruction : public G4VUserDetectorConstruction {
34 public:
45
49 virtual ~DetectorConstruction() = default;
50
55 G4VPhysicalVolume *Construct();
56
59 void ConstructSDandField();
60
65 std::string getDetectorName() { return parser_->getDetectorName(); }
66
67 private:
70
73
76
78 enableLogging("DetectorConstruction")
79}; // DetectorConstruction
80} // namespace simcore
81
82#endif // SIMCORE_DETECTORCONSTRUCTION_H
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Handle to the conditions system, provided at construction to classes which require it.
Implements the Geant4 detector construction.
framework::config::Parameters parameters_
The set of parameters used to configure this class.
G4VPhysicalVolume * Construct()
Construct the detector.
virtual ~DetectorConstruction()=default
Class destructor.
simcore::geo::Parser * parser_
The parser used to load the detector into memory.
simcore::ConditionsInterface & conditions_interface_
interface to conditions to be passed to SDs
Interface for a parser used to load a geometry into Geant4.
Definition Parser.h:25
virtual std::string getDetectorName()=0
Get the name of the parsed detector.