ATLAS Offline Software
Loading...
Searching...
No Matches
VolumeDebugger.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4DEBUGGINGTOOLS_VolumeDebugger_H
6#define G4DEBUGGINGTOOLS_VolumeDebugger_H
7
8#include <string>
9#include <mutex>
10
11#include "G4UserRunAction.hh"
13
14class G4LogicalVolume;
15class G4VPhysicalVolume;
16
17namespace G4UA
18{
19
36 class VolumeDebugger : public AthMessaging, public G4UserRunAction
37 {
38
39 public:
40
41 struct Config
42 {
43 std::string path{"./test_volume.gdml"};
44 std::string targetVolume{""}; // By default targetVolume is empty => dump the whole Atlas::Atlas geometry
45 int res{1000000};
46 bool verbose{true};
47 float tol{0.000001};
48 bool volumeCheck{false};
50 bool dumpGDML{true};
51 bool dumpPhysicsRegions{false};
52 bool printGeo{false};
53 };
54
57 virtual void BeginOfRunAction(const G4Run*) override;
58
59 private:
60
64 void DumpGeometry() const;
66 void PullVolumes( G4LogicalVolume* v ) const;
68 bool recursiveCheck(G4VPhysicalVolume *pv) const;
69
70 std::string printVolume(const G4VPhysicalVolume *pv, const std::string& delim = "") const;
71
72 }; // class VolumeDebugger
73
74} // namespace G4UA
75
76#endif //G4DEBUGGINGTOOLS_VolumeDebugger_H
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
std::string printVolume(const G4VPhysicalVolume *pv, const std::string &delim="") const
Config m_config
configuration data
virtual void BeginOfRunAction(const G4Run *) override
hook for G4 UA functionality
bool recursiveCheck(G4VPhysicalVolume *pv) const
Returns true if there were overlaps.
VolumeDebugger(const Config &config)
void PullVolumes(G4LogicalVolume *v) const
volume filter
void DumpGeometry() const
wrapper function for the gdml dump