14#ifndef ALICEO2_CADSUPPORT_O2OVERLAPCHECK_
15#define ALICEO2_CADSUPPORT_O2OVERLAPCHECK_
97 std::vector<OverlapSolidReport>
solids;
120 std::vector<double>& points,
int& rejected,
double& worstResidual,
121 bool* usedPointsOnSegments =
nullptr);
124OverlapPair
CheckPairOverlap(
const TGeoShape* shapeA,
const TGeoMatrix* matA,
const std::string& nameA,
125 const TGeoShape* shapeB,
const TGeoMatrix* matB,
const std::string& nameB,
126 const OverlapOptions& options = OverlapOptions());
129OverlapCensus
CheckWorldOverlaps(
const TGeoVolume* volume,
const OverlapOptions& options = OverlapOptions());
OverlapCensus CheckWorldOverlaps(const TGeoVolume *volume, const OverlapOptions &options=OverlapOptions())
Census every pair of volume's immediate daughters, and optionally each daughter against volume.
const char * OverlapVerdictName(OverlapVerdict verdict)
OverlapVerdict
Whether two placed solids may legally coexist: disjoint and touching are legal, interpenetrating and ...
@ Contained
every sampled boundary point of the smaller solid is inside the other
@ Disjoint
no sampled boundary point of either solid lies inside the other
@ Interpenetrating
a boundary point of one solid lies strictly inside the other: illegal
@ Touching
boundary points coincide, but none is deeper than the depth tolerance
OverlapPair CheckPairOverlap(const TGeoShape *shapeA, const TGeoMatrix *matA, const std::string &nameA, const TGeoShape *shapeB, const TGeoMatrix *matB, const std::string &nameB, const OverlapOptions &options=OverlapOptions())
Test one placed pair. matA / matB take each shape's local frame to the common frame.
int SampleBoundaryPoints(const TGeoShape *shape, int npoints, double residualTolerance, std::vector< double > &points, int &rejected, double &worstResidual, bool *usedPointsOnSegments=nullptr)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< OverlapSolidReport > solids
int nPairsTotal
N (N - 1) / 2.
std::vector< OverlapPair > extrusions
int illegalCount() const
The one-line answer: nInterpenetrating + nContained + nExtruding.
int nPairsTested
after the bounding-box rejection
std::vector< OverlapPair > pairs
only the pairs that survived the bounding-box rejection
double depthTolerance
A containment shallower than this is a shared boundary, not an overlap. In cm.
double padCm
Bounding-box inflation before the pairwise rejection, in cm; it decides which disjoint pairs get a se...
int volumeSamples
Monte-Carlo samples for the shared volume of an illegal pair; 0, the default, disables the estimate.
One pair of placed solids, and everything measured about it.
double sharedVolumeCm3
Monte-Carlo estimate; < 0 when not measured.
int deepPointsAInsideB
... of which deeper than depthTolerance
int sampledA
accepted (on-boundary) sample counts actually used
int pointsAInsideB
sampled points of A found inside B at any depth
std::string deepestPointFrom
which solid's boundary the deepest point came from
double sharedVolumeErrCm3
its 1-sigma statistical error
std::array< double, 3 > deepestPoint
in the master frame
double separationCm
Smallest sampled distance from a boundary point of one solid to the other, in cm; meaningful only whe...
One solid's sampling report; a shape with a poor display mesh shows here as reduced coverage.
bool usedPointsOnSegments
double worstResidualCm
the largest own-boundary distance among the accepted points