Skip to content
Snippets Groups Projects
Commit e220b68e authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

[CI][GEOM] Disable sampling part of overlap check macro

- Make overlap threshold optional input parameter (default = 0.0001 as before)
- Make sampling controllable by flag (disabled by default)
- Make number of samples in sampling mode controllable by input par (default = 0 leading to ROOT default of 1M)

Two problems from ROOT side lead to it being unrelyable for now
- Threshold is not working in this method
- Changing the number of samples lead to really small overlaps apearing and disappearing

See https://github.com/root-project/root/issues/14675 for reference
parent 1828c9bc
No related branches found
No related tags found
1 merge request!1656[CI] Disable/downgrade sampling part of check overlap macro
Pipeline #27176 passed
...@@ -287,7 +287,8 @@ bool expected_cbm_sampling(TGeoOverlap* ov) ...@@ -287,7 +287,8 @@ bool expected_cbm_sampling(TGeoOverlap* ov)
return false; 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 - test CBM setups for collisions in nightly tests
// 2014-07-04 - DE - currently there are 2 overlaps between the PIPE and STS layer 8 // 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 = "") ...@@ -339,7 +340,7 @@ void check_overlaps(TString dataset = "test", TString alignment_matrices = "")
} }
} }
gGeoManager->CheckOverlaps(0.0001); gGeoManager->CheckOverlaps(dThr);
TIter next(gGeoManager->GetListOfOverlaps()); TIter next(gGeoManager->GetListOfOverlaps());
TGeoOverlap* ov; TGeoOverlap* ov;
while ((ov = (TGeoOverlap*) next())) { while ((ov = (TGeoOverlap*) next())) {
...@@ -359,28 +360,35 @@ void check_overlaps(TString dataset = "test", TString alignment_matrices = "") ...@@ -359,28 +360,35 @@ void check_overlaps(TString dataset = "test", TString alignment_matrices = "")
std::cout << std::endl; 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 * For explanation see
* - https://git.cbm.gsi.de/computing/cbmroot/-/merge_requests/1639 * - https://git.cbm.gsi.de/computing/cbmroot/-/merge_requests/1639
* - https://github.com/root-project/root/issues/14675 * - https://github.com/root-project/root/issues/14675
// Threshold | N Samples * - https://redmine.cbm.gsi.de/issues/3198
gGeoManager->CheckOverlaps(0.0001, "s2000000"); */
TIter next1(gGeoManager->GetListOfOverlaps()); if (bTestsampling) {
while ((ov = (TGeoOverlap*) next1())) { // Threshold | N Samples
if (0 < uNbSamples) {
if ((dataset.Contains("mcbm") && expected_mcbm_sampling(ov)) || expected_cbm_sampling(ov)) { gGeoManager->CheckOverlaps(dThr, Form("s%u", uNbSamples));
/// Detected and logged in special function above
continue;
} }
else { else {
std::cout << "Unexpected Overlap (sampled):" << std::endl; gGeoManager->CheckOverlaps(dThr, "s");
ov->PrintInfo();
std::cout << std::endl;
unexpectedOverlaps++;
} }
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) { if (unexpectedOverlaps != 0) {
std::cout << " Test failed" << std::endl; std::cout << " Test failed" << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment