Celeritas 0.7.0-dev.79+develop.b3dc2e108
|
Load a GDML file and construct sensitive detectors. More...
#include <DetectorConstruction.hh>
Public Types | |
Type aliases | |
using | UPSD = std::unique_ptr< G4VSensitiveDetector > |
using | SDBuilder = std::function< UPSD(std::string const &)> |
Public Member Functions | |
DetectorConstruction (std::string const &filename, SDBuilder build_worker_sd) | |
Set up Celeritas SD options during construction. | |
G4VPhysicalVolume * | Construct () override |
Load geometry and sensitive detector volumes. | |
void | ConstructSDandField () override |
Construct thread-local sensitive detectors and field. | |
std::string const & | filename () const |
Get the filename used by the GDML loader. | |
G4VPhysicalVolume * | world () const |
Access the constructed world. | |
Load a GDML file and construct sensitive detectors.
Construct
on the main thread, load the GDML file (including detectors)In ConstructSDandField
on each worker thread, call the SDBuilder for each distinct SD name, for all LVs that share the SD name
celeritas::DetectorConstruction::DetectorConstruction | ( | std::string const & | filename, |
SDBuilder | build_worker_sd | ||
) |
Set up Celeritas SD options during construction.
This should be done only during the main/serial thread.
|
override |
Load geometry and sensitive detector volumes.
This should only be called once from the master thread, toward the very beginning of the program.