11#include <framework/core/Module.h>
12#include <framework/datastore/StoreObjPtr.h>
13#include <framework/dataobjects/DisplayData.h>
14#include <G4NavigationHistory.hh>
20class G4VPhysicalVolume;
47 void event()
override;
62 bool checkVolume(G4VPhysicalVolume* volume,
const std::string& path,
int depth = 0);
The geometry overlap check module.
OverlapCheckerModule()
Constructor of the module.
double m_tolerance
tolerance of overlap check
void initialize() override
Initialize the module.
std::string m_prefix
check only volumes beginning with prefix
void event() override
event function: this runs the overlap checker for each event
bool checkVolume(G4VPhysicalVolume *volume, const std::string &path, int depth=0)
Check a volume for overlaps.
int m_points
number of test points
int m_maxErrors
maximum number of errors before skipping current volume
void handleOverlap(const std::string &geant4Message)
Handle a G4Exception with the overlap message issued by Geant4.
std::vector< std::string > m_overlaps
list of overlapping volumes
int m_maxDepth
maximum depth to check
std::set< G4VPhysicalVolume * > m_seen
set of logical volumes we already checked
G4NavigationHistory m_nav
navigation history to remember coordinate transformations
StoreObjPtr< DisplayData > m_displayData
Pointer to the DisplayData where we add the overlap points for rendering.
Type-safe access to single objects in the data store.
Abstract base class for different kinds of events.