47 : target(theTarget), tolerance(theTolerance),
48 resolution(numberOfPoints), verbosity(theVerbosity)
125 std::queue<G4VPhysicalVolume*> volumes;
126 std::set<G4LogicalVolume*> checked;
128 volumes.push(target);
129 while (!volumes.empty())
137 for (
G4int i=0; i<ndaughters; ++i)
140 daughter->
CheckOverlaps(resolution, tolerance, verbosity, maxErr);
145 for (
G4int i=0; i<ndaughters; ++i)
150 G4bool found = (daughterLogical == previousLogical);
151 if (!found) found = (checked.find(daughterLogical) != checked.cend());
154 checked.emplace(daughterLogical);
155 previousLogical = daughterLogical;
156 volumes.push(daughter);
161 G4cout <<
"Checking overlaps in tree of volume " << daughter->
GetName()
163 <<
" is omitted, to avoid duplication" <<
G4endl;
178 if (depth == 0)
return;
179 if (depth != -1) depth--;
180 if (slevel != 0) slevel--;
188 target->
CheckOverlaps(resolution, tolerance, verbosity, maxErr);
194 std::set<const G4LogicalVolume *> tested;
198 for(
auto iDaughter=0; iDaughter<nDaughter; ++iDaughter )
G4GLOB_DLL std::ostream G4cout
G4bool GetVerbosity() const
void SetTolerance(G4double tolerance)
G4int GetErrorsThreshold() const
void SetVerbosity(G4bool verbosity)
void TestRecursiveOverlap(G4int sLevel=0, G4int depth=-1)
void TestOverlapInTree() const
void SetResolution(G4int points)
G4GeomTestVolume(G4VPhysicalVolume *theTarget, G4double theTolerance=0.0, G4int numberOfPoints=10000, G4bool theVerbosity=true)
G4int GetResolution() const
void SetErrorsThreshold(G4int max)
G4double GetTolerance() const
G4VSolid * GetSolid() const
size_t GetNoDaughters() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
virtual G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true, G4int errMax=1)
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
virtual G4GeometryType GetEntityType() const =0