ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PdgSelectorsTests.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PdgSelectorsTests.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018-2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #include <boost/test/unit_test.hpp>
10 
13 #include "Dataset.hpp"
14 
15 namespace {
18 const auto& muon = Dataset::centralMuon;
19 const auto& antimuon = Dataset::centralAntiMuon;
20 const auto& pion = Dataset::centralPion;
21 } // namespace
22 
23 BOOST_AUTO_TEST_SUITE(FatrasKinematicCasts)
24 
25 BOOST_AUTO_TEST_CASE(PdgSelector) {
27  BOOST_TEST(selectElectron(electron));
28  BOOST_TEST(not selectElectron(positron));
29  BOOST_TEST(not selectElectron(muon));
30  BOOST_TEST(not selectElectron(antimuon));
31  BOOST_TEST(not selectElectron(pion));
32 }
33 
34 BOOST_AUTO_TEST_CASE(AbsPdgSelector) {
36  BOOST_TEST(selectElectronLike(electron));
37  BOOST_TEST(selectElectronLike(positron));
38  BOOST_TEST(not selectElectronLike(muon));
39  BOOST_TEST(not selectElectronLike(antimuon));
40  BOOST_TEST(not selectElectronLike(pion));
41 }
42 
43 BOOST_AUTO_TEST_CASE(PdgExcluder) {
45  BOOST_TEST(excludeMuon(electron));
46  BOOST_TEST(excludeMuon(positron));
47  BOOST_TEST(not excludeMuon(muon));
48  BOOST_TEST(excludeMuon(antimuon));
49  BOOST_TEST(excludeMuon(pion));
50 }
51 
52 BOOST_AUTO_TEST_CASE(AbsPdgExcluder) {
54  BOOST_TEST(excludeMuonLike(electron));
55  BOOST_TEST(excludeMuonLike(positron));
56  BOOST_TEST(not excludeMuonLike(muon));
57  BOOST_TEST(not excludeMuonLike(antimuon));
58  BOOST_TEST(excludeMuonLike(pion));
59 }
60 
61 BOOST_AUTO_TEST_SUITE_END()