diff --git a/macro/geometry/check_overlaps.C b/macro/geometry/check_overlaps.C index 92a1d32a6b52a9fa7e77a0c1bc4c82c6cb948424..5ff4476d32d9d92919af0a27b8d9b110e3eead5c 100644 --- a/macro/geometry/check_overlaps.C +++ b/macro/geometry/check_overlaps.C @@ -287,7 +287,8 @@ bool expected_cbm_sampling(TGeoOverlap* ov) return false; } -void check_overlaps(TString dataset = "test", TString alignment_matrices = "") +void check_overlaps(TString dataset = "test", TString alignment_matrices = "", Double_t dThr = 0.0001, + bool bTestsampling = false, uint32_t uSamplesNb = 0) { // 2014-07-04 - DE - test CBM setups for collisions in nightly tests // 2014-07-04 - DE - currently there are 2 overlaps between the PIPE and STS layer 8 @@ -339,7 +340,7 @@ void check_overlaps(TString dataset = "test", TString alignment_matrices = "") } } - gGeoManager->CheckOverlaps(0.0001); + gGeoManager->CheckOverlaps(dThr); TIter next(gGeoManager->GetListOfOverlaps()); TGeoOverlap* ov; while ((ov = (TGeoOverlap*) next())) { @@ -359,28 +360,35 @@ void check_overlaps(TString dataset = "test", TString alignment_matrices = "") std::cout << std::endl; /* - * Commented the sampling part of the check as its threshold is broken + * Disabled by defaults the sampling part of the check as its threshold is broken * For explanation see * - https://git.cbm.gsi.de/computing/cbmroot/-/merge_requests/1639 * - https://github.com/root-project/root/issues/14675 - // Threshold | N Samples - gGeoManager->CheckOverlaps(0.0001, "s2000000"); - TIter next1(gGeoManager->GetListOfOverlaps()); - while ((ov = (TGeoOverlap*) next1())) { - - if ((dataset.Contains("mcbm") && expected_mcbm_sampling(ov)) || expected_cbm_sampling(ov)) { - /// Detected and logged in special function above - continue; + * - https://redmine.cbm.gsi.de/issues/3198 + */ + if (bTestsampling) { + // Threshold | N Samples + if (0 < uNbSamples) { + gGeoManager->CheckOverlaps(dThr, Form("s%u", uNbSamples)); } else { - std::cout << "Unexpected Overlap (sampled):" << std::endl; - ov->PrintInfo(); - std::cout << std::endl; - unexpectedOverlaps++; + gGeoManager->CheckOverlaps(dThr, "s"); } + TIter next1(gGeoManager->GetListOfOverlaps()); + while ((ov = (TGeoOverlap*) next1())) { + if ((dataset.Contains("mcbm") && expected_mcbm_sampling(ov)) || expected_cbm_sampling(ov)) { + /// Detected and logged in special function above + continue; + } + else { + std::cout << "Unexpected Overlap (sampled):" << std::endl; + ov->PrintInfo(); + std::cout << std::endl; + unexpectedOverlaps++; + } + } + std::cout << std::endl; } - std::cout << std::endl; - */ if (unexpectedOverlaps != 0) { std::cout << " Test failed" << std::endl;