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 (std::size_t i=0; i<ndaughters; ++i)
140 daughter->
CheckOverlaps(resolution, tolerance, verbosity, maxErr);
145 for (std::size_t 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);
162 G4cout <<
"Checking overlaps in tree of volume " << daughter->
GetName()
164 <<
" is omitted, to avoid duplication" <<
G4endl;
180 if (depth == 0) {
return; }
181 if (depth != -1) { depth--; }
182 if (slevel != 0) { slevel--; }
190 target->
CheckOverlaps(resolution, tolerance, verbosity, maxErr);
196 std::set<const G4LogicalVolume *> tested;
200 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
std::size_t GetNoDaughters() const
G4VPhysicalVolume * GetDaughter(const std::size_t 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