Class RMGHardware#

Inheritance Relationships#

Base Type#

  • public G4VUserDetectorConstruction

Class Documentation#

class RMGHardware : public G4VUserDetectorConstruction#

Public Functions

RMGHardware()#

Constructor based on calling the macro commands (with DefineCommands ).

~RMGHardware() = default#
RMGHardware(RMGHardware const&) = delete#
RMGHardware &operator=(RMGHardware const&) = delete#
RMGHardware(RMGHardware&&) = delete#
RMGHardware &operator=(RMGHardware&&) = delete#
G4VPhysicalVolume *Construct() override#

Construct the detector.

Detector geometry can be based on GDML files, parsed with G4GDMLParser . Alternatively geometry can be defined directly by overriding the DefineGeometry() method.

This function defines the geometry and checks for overlaps, if using GDML defined geometry and check are not disabled. It also assigns physical volumes to Geant4 regions and sets user step limits. This must not modify thread-local state, because it is only called once globally.

Returns

The physical volume of the world.

void ConstructSDandField() override#

Setup thread-local geometry data.

This is called once for the master thread and once for each worker thread. Can be used to setup sensitive detectors, which have to be constructed per thread.

void RegisterDetector(RMGDetectorType type, const std::string &pv_name, int uid, int copy_nr = 0, bool allow_uid_reuse = false)#

Register a detector as being a remage sensitive detector.

Parameters
  • type – The type of detector.

  • pv_name – The name of the physical volume.

  • uid – A unique integer identifier for the sensitive volume.

  • copy_nr – The copy number for the physical volume.

  • allow_uid_reuse – Flag to allow a uid to be reused

inline const auto &GetDetectorMetadataMap()#

Extract a map of the detector metadata, one element for each sensitive detector physical volume and copy_nr.

inline const auto &GetDetectorMetadata(const std::pair<std::string, int> &det)#

Extract the detector metadata for a given detector.

Parameters

det – the detector identifier, a pair of the physical volume name and the copy number.

inline const auto &GetActiveDetectorList()#
inline const auto &GetAllActiveOutputSchemes()#
inline void IncludeGDMLFile(std::string filename)#

Add a GDML file to the geometry.

Parameters

filename – file name to add.

inline virtual G4VPhysicalVolume *DefineGeometry()#

Method to define geometry directly, the user must reimplement the base class method.

void SetMaxStepLimit(double max_step, std::string name)#

Set the maximum step size.

This is used as a G4UserLimit to limit step sizes to being no larger than the chosen value. This requires the G4StepLimiter process to be activated in the physics list.

Parameters
  • max_step – The maximum step size.

  • name – Name of the physical volume.

inline void PrintListOfLogicalVolumes()#
inline void PrintListOfPhysicalVolumes()#