diff --git a/macro/geometry/CMakeLists.txt b/macro/geometry/CMakeLists.txt index bd4f6b229cfd4eaea16215a1f4b7a7cdf02d046e..2ea4f734d5e9e0cd5edb59a427b7be9717df507d 100644 --- a/macro/geometry/CMakeLists.txt +++ b/macro/geometry/CMakeLists.txt @@ -1,5 +1,6 @@ # ===== Generate the needed shell scripts ================================ GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/geometry/examine_materials.C) +GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/geometry/check_overlaps.C) Set(MACRO_DIR ${CMAKE_CURRENT_BINARY_DIR}) # ============================================================================ @@ -12,7 +13,7 @@ file(COPY ${CBMROOT_SOURCE_DIR}/macro/include/.rootrc ) # ============================================================================ -Set(timeOutTime 100) +Set(timeOutTime 150) # ===== Cleanup the data and execution directories ======================= add_test(geo_cleanup ${CMAKE_COMMAND} @@ -50,5 +51,22 @@ foreach(setup IN LISTS setup_files) FIXTURES_REQUIRED geo_cleanup FIXTURES_SETUP fixt_check_mats_${setup} ) + + if(${CBM_TEST_MODEL} MATCHES Nightly OR ${CBM_TEST_MODEL} MATCHES Weekly) + set(testname geo_setup_overlaps_${setup}) + add_test(${testname} ${MACRO_DIR}/check_overlaps.sh \"data/examine_${setup}\") + set_tests_properties(${testname} PROPERTIES + TIMEOUT 600 + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Test Passed;All ok" + FIXTURES_REQUIRED fixt_check_mats_${setup} + FIXTURES_SETUP fixt_check_overlaps_${setup} + ) + endIf() endforeach(setup IN LISTS setup_files) # ============================================================================ + +Install(FILES .rootrc examine_materials.C check_overlaps.C + DESTINATION share/cbmroot/macro/geometry + ) +Install(CODE "FILE(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/share/cbmroot/macro/geometry/data)") diff --git a/macro/geometry/check_overlaps.C b/macro/geometry/check_overlaps.C new file mode 100644 index 0000000000000000000000000000000000000000..92754e5f4db4b226965a6541273efd5bdc244fff --- /dev/null +++ b/macro/geometry/check_overlaps.C @@ -0,0 +1,187 @@ +/* Copyright (C) 2010-2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt + SPDX-License-Identifier: GPL-3.0-only + Authors: Volker Friese, P.-A. Loizeau, Florian Uhlig [committer] */ + +std::vector<std::string> mcbm_pipevac_bmon_overlaps = { + "cave/pipe_v19b_0/vacu20_1 overlapping cave/tof_v19e_mcbm_0/tof_v19e_mcbmStand_1/module_5_0", + "cave/pipe_v19b_0/vacu20_1 overlapping cave/tof_v20f_mcbm_0/tof_v20f_mcbmStand_1/module_5_0", + "cave/pipe_v19f_0/vacu20_1 overlapping cave/tof_v20c_mcbm_0/tof_v20c_mcbmStand_1/module_5_0", + "cave/pipe_v19f_0/vacu20_1 overlapping cave/tof_v21d_mcbm_0/tof_v21d_mcbmStand_1/module_5_0", + "cave/pipe_v19f_0/vacu20_1 overlapping cave/tof_v21f_mcbm_0/tof_v21f_mcbmStand_1/module_5_0", + "cave/pipe_v19f_0/vacu20_1 overlapping cave/tof_v22a_mcbm_0/tof_v22a_mcbmStand_1/module_5_0", + "cave/pipe_v19f_0/vacu20_1 overlapping cave/tof_v21j_mcbm_0/tof_v21j_mcbmStand_1/module_5_0"}; + +std::vector<std::pair<std::string, std::string>> mcbm_dets_overlaps = { + {"gas_box extruded by: gas_box/counter_0", "between gas_box and gas_box/counter_0 (internal to mTOF v19e)"}, + {"gas_box/counter_0 overlapping gas_box/counter_1", "between counters 0 and 1 (internal to mTOF v19e)"}, + {"HalfLadder12d_Module04 extruded by: HalfLadder12d_Module04/Sensor04_1", + ": module 4 sticking out of ladder 12 (internal to mSTS v22f)"}, + {"tof_v21j_mcbmStand/module_2_0 overlapping tof_v21j_mcbmStand/module_9_0", + "between modules 2 and 9 (internal to mTOF v21j)"}}; + +std::vector<std::pair<std::string, std::string>> mcbm_dets_overlaps_sampling = { + {"tof_v19e_mcbmStand: node module_8_0 overlapping module_8_0", "between module 8 and itself (internal to mTOF v19e)"}, + {"gas_box: node counter_0 overlapping counter_1", "between counters 0 and 1 (internal to mTOF v19e)"}, + {"gas_box: node counter_1 overlapping counter_2", "between counters 1 and 2 (internal to mTOF v19e)"}, + {"gas_box: node counter_2 overlapping counter_3", "between counters 2 and 3 (internal to mTOF v19e)"}, + {"gas_box: node counter_3 overlapping counter_4", "between counters 3 and 4 (internal to mTOF v19e)"}, + {"gas_box: node counter_4 overlapping counter_5", "between counters 4 and 5 (internal to mTOF v19e)"}, + {"gas_box: node counter_5 overlapping counter_6", "between counters 5 and 6 (internal to mTOF v19e)"}, + {"gas_box: node counter_6 overlapping counter_7", "between counters 6 and 7 (internal to mTOF v19e)"}, + {"counter: node Gap_3 overlapping tof_glass_4", "between gap and glass (internal to mTOF v21f)"}, + {"tof_v21j_mcbmStand: node module_2_0 overlapping module_9_0", "between modules 2 and 9 (internal to mTOF v21j)"}}; + +std::vector<std::string> cbm_pipevac_bmon_overlaps = { + "cave/pipe_v20a_1m_0/pipevac7_0 overlapping cave/tof_v20b_1m_0/module_5_0", + "cave/pipe_v20a_1m_0/pipe7_0 overlapping cave/tof_v20b_1m_0/module_5_0"}; + +std::vector<std::pair<std::string, std::string>> cbm_dets_overlaps = { + {"cave/magnet_container_0 overlapping cave/rich_v17a_3e_0/rich_container_288", "between rich v17a_3e and magnet"}, + {"cave/magnet_container_0 overlapping cave/rich_v17a_1e_0/rich_container_290", "between rich v17a_1e and magnet"}}; + +std::vector<std::pair<std::string, std::string>> cbm_dets_overlaps_sampling = { + {"cave: node magnet_container_0 overlapping rich_v17a_3e_0/rich_container_288", "between rich v17a_3e and magnet"}, + {"cave: node magnet_container_0 overlapping rich_v17a_1e_0/rich_container_290", "between rich v17a_1e and magnet"}, + {"belt_assembly_1: node belt_part3_156 overlapping belt_part4_157", "between parts of belt in ???? (s300e)"}}; + +bool expected_mcbm(TGeoOverlap* ov) +{ + TString OverlapName = ov->GetTitle(); + /// Bmon overlapping vacuum because introduced by mTOF which is placed in cave + for (auto sVacBmon : mcbm_pipevac_bmon_overlaps) { + if (OverlapName.Contains(sVacBmon)) { + std::cout << "Expected Overlap between pipe vacuum and bmon in tof (mCBM)" << endl; + std::cout << ov->GetTitle() << std::endl << std::endl; + return true; + } + } + /// Other detectors overlaps (either internals or caused by alignment matrices) + for (auto pDetOver : mcbm_dets_overlaps) { + if (OverlapName.Contains(pDetOver.first)) { + std::cout << "Expected Overlap " << pDetOver.second << endl; + std::cout << ov->GetTitle() << std::endl << std::endl; + return true; + } + } + return false; +} + +bool expected_mcbm_sampling(TGeoOverlap* ov) +{ + TString OverlapName = ov->GetTitle(); + /// Detectors overlaps only in sampling (either internals or caused by alignment matrices) + for (auto pDetOver : mcbm_dets_overlaps_sampling) { + if (OverlapName.Contains(pDetOver.first)) { + std::cout << "Expected Overlap (sampled) " << pDetOver.second << endl; + std::cout << ov->GetTitle() << std::endl << std::endl; + return true; + } + } + return false; +} + +bool expected_cbm(TGeoOverlap* ov) +{ + TString OverlapName = ov->GetTitle(); + /// Bmon overlapping vacuum because introduced by TOF which is placed in cave (ONLY IN APR21!!!) + for (auto sVacBmon : cbm_pipevac_bmon_overlaps) { + if (OverlapName.Contains(sVacBmon)) { + std::cout << "Expected Overlap between pipe vacuum and bmon in tof (mCBM)" << endl; + std::cout << ov->GetTitle() << std::endl << std::endl; + return true; + } + } + /// Detectors overlaps (either internals or caused by alignment matrices) + for (auto pDetOver : cbm_dets_overlaps) { + if (OverlapName.Contains(pDetOver.first)) { + std::cout << "Expected Overlap " << pDetOver.second << endl; + std::cout << ov->GetTitle() << std::endl << std::endl; + return true; + } + } + return false; +} + +bool expected_cbm_sampling(TGeoOverlap* ov) +{ + TString OverlapName = ov->GetTitle(); + /// Detectors overlaps only in sampling (either internals or caused by alignment matrices) + for (auto pDetOver : cbm_dets_overlaps_sampling) { + if (OverlapName.Contains(pDetOver.first)) { + std::cout << "Expected Overlap (sampled) " << pDetOver.second << endl; + std::cout << ov->GetTitle() << std::endl << std::endl; + return true; + } + } + return false; +} + +void check_overlaps(TString dataset = "test") +{ + // 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 - set the default to 0 overlaps, anyway + // 2017-29-11 - FU - define some expected overlaps between magnet and rich or much + // these overlas are accepted for the time being until + // there is a new magnet geometry + + UInt_t unexpectedOverlaps {0}; + + TString geoFile = dataset + ".geo.root"; + TFile* f = new TFile(geoFile); + if (!f->IsOpen()) { + std::cout << "check_overlaps: geometry file " << geoFile << " is not accessible!" << std::endl; + return; + } + + gGeoManager = (TGeoManager*) f->Get("FAIRGeom"); + + gGeoManager->CheckOverlaps(0.0001); + TIter next(gGeoManager->GetListOfOverlaps()); + TGeoOverlap* ov; + while ((ov = (TGeoOverlap*) next())) { + TString OverlapName = ov->GetTitle(); + + if ((dataset.Contains("mcbm") && expected_mcbm(ov)) || expected_cbm(ov)) { + /// Detected and logged in special function above + continue; + } + else { + cout << "Unexpected Overlap:" << endl; + ov->PrintInfo(); + cout << endl; + unexpectedOverlaps++; + } + } + std::cout << std::endl; + + gGeoManager->CheckOverlaps(0.0001, "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; + + if (unexpectedOverlaps != 0) { + std::cout << " Test failed" << std::endl; + std::cout << " We have in total " << unexpectedOverlaps << " unexpected overlaps." << std::endl; + } + else { + std::cout << " There are no unexpected overlaps." << std::endl; + std::cout << " Test passed" << std::endl; + std::cout << " All ok " << std::endl; + } + + + //RemoveGeoManager(); +} diff --git a/macro/mcbm/CMakeLists.txt b/macro/mcbm/CMakeLists.txt index 6e7ec126df2bf354fcbcd7beb6c896cffeef9c8e..da22a222a66258fe3699e879ad3d883512dd8234 100644 --- a/macro/mcbm/CMakeLists.txt +++ b/macro/mcbm/CMakeLists.txt @@ -4,7 +4,6 @@ GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_digi.C) GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_reco_event.C) GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_match_check.C) GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_hadron_analysis.C) -GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_check_overlaps.C) GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_qa.C) #GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_check_materials.C) @@ -12,9 +11,6 @@ Set(MACRO_DIR ${CMAKE_CURRENT_BINARY_DIR}) GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/geometry/check_media.C ${MACRO_DIR}) # ============================================================================ -# disable dev tests - GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_mc_dev.C) -# disable dev tests - GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_reco_dev.C) - # Put the .rootrc file into the directory from which root is executed. # Otherwise the rootalias file is not loaded File(COPY ${CBMROOT_SOURCE_DIR}/macro/include/.rootrc DESTINATION ${CBMROOT_BINARY_DIR}/macro/mcbm) @@ -133,68 +129,19 @@ ForEach(setup IN LISTS cbm_setup) #Set(_FileName_Dependency data/mcbm_mc_${setup}_ok) #Set_Tests_Properties(${testname} PROPERTIES REQUIRED_FILES ${_FileName_Dependency}) - Set(testname mcbm_overlap_${setup}) - Set(fixture_mcbm_overlap fixture_${testname}) - Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/mcbm/mcbm_check_overlaps.sh \"data/${setup}_test\") - Set_Tests_Properties(${testname} PROPERTIES - TIMEOUT "600" - PASS_REGULAR_EXPRESSION "Test Passed;All ok" - FIXTURES_REQUIRED ${fixture_mcbm_qa_event_mc} - FIXTURES_SETUP ${fixture_mcbm_overlap} - ) - If(NOT ${CBM_TEST_MODEL} MATCHES Experimental) Set(testname mcbm_check_media_${setup}) Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/mcbm/check_media.sh \"data/${setup}_test\") Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "60" PASS_REGULAR_EXPRESSION "Test Passed;All ok" - FIXTURES_REQUIRED ${fixture_mcbm_overlap} + FIXTURES_REQUIRED ${fixture_mcbm_qa_event_mc} ) EndIf() EndForEach(setup IN LISTS cbm_setup) - -# disable dev tests - # Define the different configs to be tested -# disable dev tests - # test all subsystems -# disable dev tests - #List(APPEND cbm_config 801101110 810000000 801000000 800100000 800010000 800001000 800000100 800000010 800000001) -# disable dev tests - # test selected subsystems -# disable dev tests - List(APPEND cbm_config 801101110 801000000 800100000 800010000 800001000 800000100 800000010 800000001) -# disable dev tests - -# disable dev tests - ForEach(config IN LISTS cbm_config) -# disable dev tests - -# disable dev tests - Set(testname mcbm_mc_dev_${config}) -# disable dev tests - Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/mcbm/mcbm_mc_dev.sh ${NumEvents} ${BeamAngle} \"sis18_mcbm_25deg_long_dev\" \"${config}\") -# disable dev tests - Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "30") -# disable dev tests - Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok") -# disable dev tests - -# disable dev tests - Set(dep_mc ${testname}) -# disable dev tests - -# disable dev tests - Set(testname mcbm_reco_dev_${config}) -# disable dev tests - Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/mcbm/mcbm_reco_dev.sh ${NumEvents} \"sis18_mcbm_25deg_long_dev\" \"${config}\") -# disable dev tests - Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "30") -# disable dev tests - Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok") -# disable dev tests - Set_Tests_Properties(${testname} PROPERTIES DEPENDS ${dep_mc}) -# disable dev tests - Set(_FileName_Dependency data/mcbm_mc_dev_${config}_ok) -# disable dev tests - Set_Tests_Properties(${testname} PROPERTIES REQUIRED_FILES ${_FileName_Dependency}) -# disable dev tests - -# disable dev tests - Set(dep_reco ${testname}) -# disable dev tests - -# disable dev tests - #DE Set(testname mcbm_overlap_${config}) -# disable dev tests - #DE Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/mcbm/mcbm_check_overlaps.sh \"sis18_mcbm_25deg_long_dev\") -# disable dev tests - #DE Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "600") -# disable dev tests - #DE Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok") -# disable dev tests - #DE Set_Tests_Properties(${testname} PROPERTIES DEPENDS ${dep_mc}) -# disable dev tests - #DE Set(_FileName_Dependency data/mcbm_mc_${config}_ok) -# disable dev tests - #DE Set_Tests_Properties(${testname} PROPERTIES REQUIRED_FILES ${_FileName_Dependency}) -# disable dev tests - -# disable dev tests - EndForEach(config IN LISTS cbm_config) -# end of test CBM configs from geometry/config - -# disable dev tests - Install(FILES .rootrc mcbm_transport.C mcbm_reco.C mcbm_check_overlaps.C -Install(FILES .rootrc mcbm_transport.C mcbm_digi.C mcbm_reco_event.C mcbm_check_overlaps.C - mcbm_match_check.C mcbm_hadron_analysis.C mcbm_qa.C +Install(FILES .rootrc mcbm_transport.C mcbm_digi.C mcbm_reco_event.C mcbm_match_check.C mcbm_hadron_analysis.C mcbm_qa.C DESTINATION share/cbmroot/macro/mcbm ) Install(DIRECTORY modules DESTINATION share/cbmroot/macro/mcbm) diff --git a/macro/mcbm/mcbm_check_overlaps.C b/macro/mcbm/mcbm_check_overlaps.C deleted file mode 100644 index 7caeda955f2bb42e13c0ef5adb7ddbeabbf5f5c7..0000000000000000000000000000000000000000 --- a/macro/mcbm/mcbm_check_overlaps.C +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright (C) 2017-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt - SPDX-License-Identifier: GPL-3.0-only - Authors: Florian Uhlig, David Emschermann [committer] */ - -void mcbm_check_overlaps(const char* dataset = "test") -{ - // 2020-07-10 - DE - simplify overlap name checking - // 2019-12-20 - FU - adapt expected overlaps to new targetbox name - // 2019-08-13 - FU - Filter "expected overlaps" - // 2017-11-06 - DE - adapt to mCBM - // 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 - set the default to 0 overlaps, anyway - // - // There are some overlaps which we know - // Until they can be fixed we will not mark the test as error but - // we will remove them from the list of unxpected overlaps - - UInt_t unexpectedOverlaps {0}; - UInt_t benchmarkNumber {0}; - - TString geoFile = TString(dataset) + ".geo.root"; - TFile* f = new TFile(geoFile); - if (!f->IsOpen()) { - std::cout << "check_overlaps: geometry file " << geoFile << " is not accessible!" << std::endl; - return; - } - - - gGeoManager = (TGeoManager*) f->Get("FAIRGeom"); - - gGeoManager->CheckOverlaps(0.0001); - TIter next(gGeoManager->GetListOfOverlaps()); - TGeoOverlap* ov; - while ((ov = (TGeoOverlap*) next())) { - TString OverlapName = ov->GetTitle(); - // within the TOF detector geometry - if (OverlapName.Contains("gas_box extruded by: gas_box/counter_0")) { - std::cout << "Expected Overlap between gas_box and gas_box/counter_0" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("gas_box/counter_0 overlapping gas_box/counter_1")) { - std::cout << "Expected Overlap between gas_box/counter_0 and gas_box/counter_1" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // overlap of T0 detector with pipe vacuum geometry - else if (OverlapName.Contains("vacu20_1 overlapping") && OverlapName.Contains("module_5_0")) { - std::cout << "Expected Overlap between pipevacuum and T0 counter" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else { - cout << "Unexpected Overlap:" << endl; - ov->PrintInfo(); - cout << endl; - unexpectedOverlaps++; - } - } - std::cout << std::endl; - - gGeoManager->CheckOverlaps(0.0001, "s"); - TIter next1(gGeoManager->GetListOfOverlaps()); - while ((ov = (TGeoOverlap*) next1())) { - TString OverlapName = ov->GetTitle(); - // within the TOF detector geometry - if (OverlapName.Contains("gas_box: node counter_4 overlapping counter_5")) { - std::cout << "Expected Overlap between counter_4 and counter_5" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("gas_box: node counter_5 overlapping counter_6")) { - std::cout << "Expected Overlap between counter_6 and counter_6" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("gas_box: node counter_1 overlapping counter_2")) { - std::cout << "Expected Overlap between counter_1 and counter_2" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("gas_box: node counter_3 overlapping counter_4")) { - std::cout << "Expected Overlap between counter_3 and counter_4" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("gas_box: node counter_0 overlapping counter_1")) { - std::cout << "Expected Overlap between counter_0 and counter_1" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("gas_box: node counter_2 overlapping counter_3")) { - std::cout << "Expected Overlap between counter_2 and counter_3" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("gas_box: node counter_6 overlapping counter_7")) { - std::cout << "Expected Overlap between counter_6 and counter_7" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("node module_8_0 overlapping module_8_0")) { - std::cout << "Expected Overlap between tof module_8_0 and module_8_0" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("node Gap_3 overlapping tof_glass_4")) { - std::cout << "Expected Overlap between Gap_3 and tof_glass_4" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the TOF detector geometry - else if (OverlapName.Contains("tof_glass_1 overlapping Gap_1")) { - std::cout << "Expected Overlap between Gap_1 and tof_glass_1" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - // within the RICH detector geometry - else if (OverlapName.Contains("node Gas_1 overlapping kapton_1")) { - std::cout << "Expected Overlap between Gas_1 and kapton_1" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else { - cout << "Unexpected Overlap:" << endl; - ov->PrintInfo(); - cout << endl; - unexpectedOverlaps++; - } - } - std::cout << std::endl; - - if (unexpectedOverlaps != benchmarkNumber) { - cout << " Test failed" << endl; - cout << " We have in total " << unexpectedOverlaps << " unexpected overlaps." << endl; - } - else { - cout << " Test passed" << endl; - cout << " All ok " << endl; - } - - RemoveGeoManager(); -} diff --git a/macro/run/CMakeLists.txt b/macro/run/CMakeLists.txt index 1f0b54fd47279bcffb6693adb5fe344f3afbd218..18a5f4cd9dc125441aa1f8c9f26abbea580f13e2 100644 --- a/macro/run/CMakeLists.txt +++ b/macro/run/CMakeLists.txt @@ -16,12 +16,12 @@ GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/geometry/check_media.C ${MA # ===== Copy the .rootrc file into the directory from which root is executed # --- Otherwise the rootalias file is not loaded file(COPY ${CBMROOT_SOURCE_DIR}/macro/include/.rootrc - DESTINATION ${CBMROOT_BINARY_DIR}/macro/run) + DESTINATION ${CBMROOT_BINARY_DIR}/macro/run) # ============================================================================ # ===== Copy configuration file for QA tasks to the build directory ======== file(COPY ${CBMROOT_SOURCE_DIR}/macro/run/qa_config.cbm.yaml - DESTINATION ${CBMROOT_BINARY_DIR}/macro/run) + DESTINATION ${CBMROOT_BINARY_DIR}/macro/run) # ============================================================================ @@ -50,7 +50,7 @@ if(NOT ${CBM_TEST_MODEL} MATCHES Experimental ) sis100_electron sis100_muon_lmvm sis100_muon_jpsi - ) + ) else() List(APPEND cbm_setup sis100_electron sis100_muon_jpsi) endif() @@ -59,10 +59,10 @@ endif() # ===== Cleanup the data directory ======================================= add_test(run_cleanup ${CMAKE_COMMAND} - -P ${CMAKE_SOURCE_DIR}/cmake/scripts/cleanmacrodir.cmake) + -P ${CMAKE_SOURCE_DIR}/cmake/scripts/cleanmacrodir.cmake) set_tests_properties(run_cleanup PROPERTIES - TIMEOUT ${timeOutTime} - FIXTURES_SETUP run_cleanup + TIMEOUT ${timeOutTime} + FIXTURES_SETUP run_cleanup ) # ============================================================================ @@ -92,22 +92,22 @@ foreach(setup IN LISTS cbm_setup) add_test(${testname} ${MACRO_DIR}/run_tra_file.sh \"${input}\" ${nEvents} \"data/${sname}_coll\" \"${setup}\" kGeant3 ${randomSeed} kTRUE) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED run_cleanup - FIXTURES_SETUP fixt_tra_coll_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED run_cleanup + FIXTURES_SETUP fixt_tra_coll_${setup} + RESOURCE_LOCK collParDb_${setup} ) set(testname run_check_media_${sname}) - Add_Test(${testname} ${MACRO_DIR}/check_media.sh \"data/${sname}_coll\") + add_test(${testname} ${MACRO_DIR}/check_media.sh \"data/${sname}_coll\") set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Test Passed;All ok" - FIXTURES_REQUIRED fixt_tra_coll_${setup} - FIXTURES_SETUP fixt_check_media_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Test Passed;All ok" + FIXTURES_REQUIRED fixt_tra_coll_${setup} + FIXTURES_SETUP fixt_check_media_${setup} ) # --- Test run_tra_sign @@ -117,12 +117,12 @@ foreach(setup IN LISTS cbm_setup) add_test(${testname} ${MACRO_DIR}/run_tra_file.sh \"${input}\" ${nEvents} \"data/${sname}_sign\" \"${setup}\" kGeant3 ${randomSeed} kTRUE) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED run_cleanup - FIXTURES_SETUP fixt_tra_sign_${setup} - RESOURCE_LOCK signParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED run_cleanup + FIXTURES_SETUP fixt_tra_sign_${setup} + RESOURCE_LOCK signParDb_${setup} ) # --- Test run_tra_beam @@ -131,12 +131,12 @@ foreach(setup IN LISTS cbm_setup) add_test(${testname} ${MACRO_DIR}/run_tra_beam.sh ${nBeam} \"Au\" 10 -1 \"data/${sname}_beam\" \"${setup}\" kGeant3 ${randomSeed} kTRUE) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED run_cleanup - FIXTURES_SETUP fixt_tra_beam_${setup} - RESOURCE_LOCK beamParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED run_cleanup + FIXTURES_SETUP fixt_tra_beam_${setup} + RESOURCE_LOCK beamParDb_${setup} ) # --- Test run_digi_ev @@ -145,12 +145,12 @@ foreach(setup IN LISTS cbm_setup) add_test(${testname} ${MACRO_DIR}/run_digi.sh \"data/${sname}_coll\" -1 \"data/${sname}_ev\" -1.) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED fixt_check_media_${setup} - FIXTURES_SETUP fixt_digi_ev_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED fixt_check_media_${setup} + FIXTURES_SETUP fixt_digi_ev_${setup} + RESOURCE_LOCK collParDb_${setup} ) # --- Test run_digi_ts @@ -163,29 +163,29 @@ foreach(setup IN LISTS cbm_setup) \"data/${sname}_coll\" -1 \"data/${sname}_ts\"\ ${eventrate} ${tslength} \"data/${sname}_sign\" \"data/${sname}_beam\" ${beamrate}) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED "fixt_check_media_${setup};fixt_tra_sign_${setup};fixt_tra_beam_${setup}" - FIXTURES_SETUP fixt_digi_ts_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED "fixt_check_media_${setup};fixt_tra_sign_${setup};fixt_tra_beam_${setup}" + FIXTURES_SETUP fixt_digi_ts_${setup} + RESOURCE_LOCK collParDb_${setup} ) # --- Test run_reco_ev_ideal # --- Event-by-event reconstruction from event-based simulation # --- Ideal raw event builder set(testname run_${sname}_reco_ev_ideal) - add_test(${testname} ${MACRODIR}/run_reco.sh + add_test(${testname} ${MACRODIR}/run_reco.sh \"data/${sname}_ev\" -1 0 \"data/${sname}_eb_eb_ideal\" \"Ideal\" \"${setup}\" \"data/${sname}_coll\") set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED fixt_digi_ev_${setup} - FIXTURES_SETUP fixt_reco_ev_ideal_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED fixt_digi_ev_${setup} + FIXTURES_SETUP fixt_reco_ev_ideal_${setup} + RESOURCE_LOCK collParDb_${setup} ) - + # --- Test run_reco_offline_ev_ideal # --- Event-by-event reconstruction from event-based simulation, with binary cbmreco_offline # --- Ideal raw event builder @@ -198,10 +198,10 @@ foreach(setup IN LISTS cbm_setup) set(cl_options -i ${inputname} -o ${outputname} -p ${parfilename} -c ${configname} -s ${setup} -w) add_test(NAME ${testname} COMMAND ${binary} ${cl_options}) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FIXTURES_REQUIRED fixt_digi_ev_${setup} - FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FIXTURES_REQUIRED fixt_digi_ev_${setup} + FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} + RESOURCE_LOCK collParDb_${setup} ) # --- Test run_reco_ev_real @@ -219,7 +219,7 @@ foreach(setup IN LISTS cbm_setup) FIXTURES_SETUP fixt_reco_ev_real_${setup} RESOURCE_LOCK collParDb_${setup} ) - + # --- Test run_reco_offline_ev_real # --- Event-by-event reconstruction from event-based simulation, with binary cbmreco_offline # --- Real raw event builder @@ -232,10 +232,10 @@ foreach(setup IN LISTS cbm_setup) set(cl_options -i ${inputname} -o ${outputname} -p ${parfilename} -c ${configname} -s ${setup} -w) add_test(NAME ${testname} COMMAND ${binary} ${cl_options}) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FIXTURES_REQUIRED fixt_digi_ev_${setup} - FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FIXTURES_REQUIRED fixt_digi_ev_${setup} + FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} + RESOURCE_LOCK collParDb_${setup} ) # --- Test run_reco_ts_eb_ideal @@ -246,14 +246,14 @@ foreach(setup IN LISTS cbm_setup) \"data/${sname}_ts\" -1 0 \"data/${sname}_ts_eb_ideal\" \"Ideal\" \"${setup}\" \"data/${sname}_coll\") set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED fixt_digi_ts_${setup} - FIXTURES_SETUP fixt_reco_ts_eb_ideal_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED fixt_digi_ts_${setup} + FIXTURES_SETUP fixt_reco_ts_eb_ideal_${setup} + RESOURCE_LOCK collParDb_${setup} ) - + # --- Test run_reco_offline_ts_eb_ideal # --- Event-by-event reconstruction from time-based simulation, with binary cbmreco_offline # --- Real raw event builder @@ -266,12 +266,12 @@ foreach(setup IN LISTS cbm_setup) set(cl_options -i ${inputname} -o ${outputname} -p ${parfilename} -c ${configname} -s ${setup} -w) add_test(NAME ${testname} COMMAND ${binary} ${cl_options}) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FIXTURES_REQUIRED fixt_digi_ev_${setup} - FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FIXTURES_REQUIRED fixt_digi_ev_${setup} + FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} + RESOURCE_LOCK collParDb_${setup} ) - + # --- Test run_reco_ts_eb_real # --- Event-by-event reconstruction from time-based simulation # --- Real raw event builder @@ -280,14 +280,14 @@ foreach(setup IN LISTS cbm_setup) \"data/${sname}_ts\" -1 0 \"data/${sname}_ts_eb_real\" \"Real\" \"${setup}\" \"data/${sname}_coll\") set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED fixt_digi_ts_${setup} - FIXTURES_SETUP fixt_reco_ts_eb_real_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED fixt_digi_ts_${setup} + FIXTURES_SETUP fixt_reco_ts_eb_real_${setup} + RESOURCE_LOCK collParDb_${setup} ) - + # --- Test run_reco_offline_ts_eb_real # --- Event-by-event reconstruction from event-based simulation, with binary cbmreco_offline # --- Real raw event builder @@ -300,27 +300,27 @@ foreach(setup IN LISTS cbm_setup) set(cl_options -i ${inputname} -o ${outputname} -p ${parfilename} -c ${configname} -s ${setup} -w) add_test(NAME ${testname} COMMAND ${binary} ${cl_options}) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FIXTURES_REQUIRED fixt_digi_ev_${setup} - FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FIXTURES_REQUIRED fixt_digi_ev_${setup} + FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} + RESOURCE_LOCK collParDb_${setup} ) - + # --- Test run_qa # --- Run QA tasks with Event-by-event reconstruction from time-based simulation # --- Real raw event builder set(testname run_${sname}_qa) add_test(${testname} ${MACRODIR}/run_qa.sh - \"data/${sname}_coll\" \"data/${sname}_ts\" \"data/${sname}_ts_eb_real\" - \"data/${sname}_coll\" \"data/${sname}_qa\" \"${setup}\" -1 - \"data/${sname}_sign\" \"data/${sname}_beam\" \"qa_config.cbm.yaml\") + \"data/${sname}_coll\" \"data/${sname}_ts\" \"data/${sname}_ts_eb_real\" + \"data/${sname}_coll\" \"data/${sname}_qa\" \"${setup}\" -1 + \"data/${sname}_sign\" \"data/${sname}_beam\" \"qa_config.cbm.yaml\") set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED "fixt_check_media_${setup};fixt_digi_ts_${setup};fixt_reco_ts_eb_real_${setup}" - FIXTURES_SETUP fixt_qa_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED "fixt_check_media_${setup};fixt_digi_ts_${setup};fixt_reco_ts_eb_real_${setup}" + FIXTURES_SETUP fixt_qa_${setup} + RESOURCE_LOCK collParDb_${setup} ) # --- Test run_reco_ts_tb @@ -330,14 +330,14 @@ foreach(setup IN LISTS cbm_setup) \"data/${sname}_ts\" -1 0 \"data/${sname}_ts_tb\" \"\" \"${setup}\" \"data/${sname}_coll\") set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FAIL_REGULAR_EXPRESSION "segmentation violation" - PASS_REGULAR_EXPRESSION "Macro finished successfully" - FIXTURES_REQUIRED fixt_digi_ts_${setup} - FIXTURES_SETUP fixt_reco_ts_tb_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FAIL_REGULAR_EXPRESSION "segmentation violation" + PASS_REGULAR_EXPRESSION "Macro finished successfully" + FIXTURES_REQUIRED fixt_digi_ts_${setup} + FIXTURES_SETUP fixt_reco_ts_tb_${setup} + RESOURCE_LOCK collParDb_${setup} ) - + # --- Test run_reco_offline_ts_tb # --- Time-based reconstruction from time-based simulation, with binary cbmreco_offline set(testname run_${sname}_reco_offline_ts_tb) @@ -349,12 +349,12 @@ foreach(setup IN LISTS cbm_setup) set(cl_options -i ${inputname} -o ${outputname} -p ${parfilename} -c ${configname} -s ${setup} -w) add_test(NAME ${testname} COMMAND ${binary} ${cl_options}) set_tests_properties(${testname} PROPERTIES - TIMEOUT ${timeOutTime} - FIXTURES_REQUIRED fixt_digi_ev_${setup} - FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} - RESOURCE_LOCK collParDb_${setup} + TIMEOUT ${timeOutTime} + FIXTURES_REQUIRED fixt_digi_ev_${setup} + FIXTURES_SETUP fixt_reco_offline_ev_ideal_${setup} + RESOURCE_LOCK collParDb_${setup} ) - + endforeach(setup IN LISTS cbm_setup) @@ -589,7 +589,8 @@ EndIf() # If(DEFINED ENV{RAW_DATA_PATH} ) ##################### # ============================================================================ -Install(FILES .rootrc run_tra_file.C run_tra_beam.C run_digi.C run_reco.C run_qa.C run_unpack_online.C run_unpack_tsa.C qa_config.cbm.yaml +Install(FILES .rootrc run_tra_file.C run_tra_beam.C run_digi.C run_reco.C run_qa.C run_unpack_online.C run_unpack_tsa.C + qa_config.cbm.yaml DESTINATION share/cbmroot/macro/run ) Install(PROGRAMS run_tests.sh diff --git a/macro/run/check_overlaps.C b/macro/run/check_overlaps.C deleted file mode 100644 index 746d81fb680727fac43b980a7a55e8a9def133f6..0000000000000000000000000000000000000000 --- a/macro/run/check_overlaps.C +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright (C) 2010-2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt - SPDX-License-Identifier: GPL-3.0-only - Authors: Volker Friese, Florian Uhlig [committer] */ - -void check_overlaps(const char* dataset = "test") -{ - // 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 - set the default to 0 overlaps, anyway - // 2017-29-11 - FU - define some expected overlaps between magnet and rich or much - // these overlas are accepted for the time being until - // there is a new magnet geometry - - UInt_t unexpectedOverlaps {0}; - - TString geoFile = TString(dataset) + ".geo.root"; - TFile* f = new TFile(geoFile); - if (!f->IsOpen()) { - std::cout << "check_overlaps: geometry file " << geoFile << " is not accessible!" << std::endl; - return; - } - - gGeoManager = (TGeoManager*) f->Get("FAIRGeom"); - - gGeoManager->CheckOverlaps(0.0001); - TIter next(gGeoManager->GetListOfOverlaps()); - TGeoOverlap* ov; - while ((ov = (TGeoOverlap*) next())) { - TString OverlapName = ov->GetTitle(); - if (OverlapName.Contains("cave/magnet_v15b_0 overlapping cave/much")) { - if (OverlapName.Contains("/absorber_1/absblock1_1/absorber_1")) { - std::cout << "Expected Overlap between much and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else if (OverlapName.Contains("/absorber_1/absblock0_1/absorber_0")) { - std::cout << "Expected Overlap between much and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - } - else if (OverlapName.Contains("cave/magnet_v15a_0 overlapping " - "cave/rich_v17a_1e_0/rich_container_290")) { - std::cout << "Expected Overlap between rich and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else if (OverlapName.Contains("cave/magnet_v15a_0 overlapping " - "cave/rich_v17a_3e_0/rich_container_288")) { - std::cout << "Expected Overlap between rich and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else if (OverlapName.Contains("cave/magnet_container_0 overlapping " - "cave/rich_v17a_3e_0/rich_container_288")) { - std::cout << "Expected Overlap between rich and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else if (OverlapName.Contains("cave/magnet_container_0 overlapping " - "cave/rich_v17a_1e_0/rich_container_290")) { - std::cout << "Expected Overlap between rich and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else { - cout << "Unexpected Overlap:" << endl; - ov->PrintInfo(); - cout << endl; - unexpectedOverlaps++; - } - } - std::cout << std::endl; - - gGeoManager->CheckOverlaps(0.0001, "s"); - TIter next1(gGeoManager->GetListOfOverlaps()); - while ((ov = (TGeoOverlap*) next1())) { - TString OverlapName = ov->GetTitle(); - if (OverlapName.Contains("magnet_v15b_0 overlapping much")) { - if (OverlapName.Contains("/absorber_1/absblock1_1/absorber_1")) { - std::cout << "Expected Overlap between much and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else if (OverlapName.Contains("/absorber_1/absblock0_1/absorber_0")) { - std::cout << "Expected Overlap between much and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - } - else if (OverlapName.Contains("magnet_v15a_0 overlapping " - "rich_v17a_1e_0/rich_container_290")) { - std::cout << "Expected Overlap between rich and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else if (OverlapName.Contains("magnet_v15a_0 overlapping " - "rich_v17a_3e_0/rich_container_288")) { - std::cout << "Expected Overlap between rich and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else if (OverlapName.Contains("magnet_container_0 overlapping " - "rich_v17a_1e_0/rich_container_290")) { - std::cout << "Expected Overlap between rich and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else if (OverlapName.Contains("magnet_container_0 overlapping " - "rich_v17a_3e_0/rich_container_288")) { - std::cout << "Expected Overlap between rich and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else if (OverlapName.Contains("belt_part3_156 overlapping belt_part4_157")) { - std::cout << "Expected Overlap between rich and magnet" << endl; - std::cout << ov->GetTitle() << std::endl << std::endl; - } - else { - std::cout << "Unexpected Overlap:" << std::endl; - ov->PrintInfo(); - std::cout << std::endl; - unexpectedOverlaps++; - } - } - std::cout << std::endl; - - if (unexpectedOverlaps != 0) { - std::cout << " Test failed" << std::endl; - std::cout << " We have in total " << unexpectedOverlaps << " unexpected overlaps." << std::endl; - } - else { - std::cout << " There are no unexpected overlaps." << std::endl; - std::cout << " Test passed" << std::endl; - std::cout << " All ok " << std::endl; - } - - - RemoveGeoManager(); -}