Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:11:45

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2020 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #include <boost/test/data/test_case.hpp>
0010 #include <boost/test/unit_test.hpp>
0011 
0012 #include "Acts/Plugins/TGeo/TGeoPrimitivesHelper.hpp"
0013 
0014 #include <string>
0015 #include <vector>
0016 
0017 namespace Acts::Test {
0018 
0019 /// @brief Unit test checking the match probability
0020 BOOST_AUTO_TEST_CASE(TGeoPrimitivesHelper_match) {
0021   BOOST_CHECK(TGeoPrimitivesHelper::match("Pixel*Barrel", "PixelLBarrel"));
0022   BOOST_CHECK(!TGeoPrimitivesHelper::match("Pixel*Barrel", "Strips"));
0023 
0024   std::vector<std::string> candidates = {"Pixel", "Barrel*", "*P*pe"};
0025   BOOST_CHECK(TGeoPrimitivesHelper::match(candidates, "BarrelStrips"));
0026   BOOST_CHECK(TGeoPrimitivesHelper::match(candidates, "BeamPipe"));
0027 }
0028 
0029 }  // namespace Acts::Test