EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ChargeSelectorsTests.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ChargeSelectorsTests.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
11
#include "
ActsFatras/Selectors/ChargeSelectors.hpp
"
12
13
#include "
Dataset.hpp
"
14
15
using namespace
ActsFatras;
16
17
BOOST_AUTO_TEST_SUITE(FatrasChargeSelectors)
18
19
BOOST_AUTO_TEST_CASE
(NegativeParticle) {
20
const
auto
&
particle
=
Dataset::centralElectron
;
21
BOOST_CHECK(not
NeutralSelector
()(
particle
));
22
BOOST_CHECK(
ChargedSelector
()(
particle
));
23
BOOST_CHECK(not
PositiveSelector
()(
particle
));
24
BOOST_CHECK(
NegativeSelector
()(
particle
));
25
}
26
27
BOOST_AUTO_TEST_CASE
(NeutralParticle) {
28
const
auto
&
particle
=
Dataset::centralNeutron
;
29
BOOST_CHECK(
NeutralSelector
()(
particle
));
30
BOOST_CHECK(not
ChargedSelector
()(
particle
));
31
BOOST_CHECK(not
PositiveSelector
()(
particle
));
32
BOOST_CHECK(not
NegativeSelector
()(
particle
));
33
}
34
35
BOOST_AUTO_TEST_CASE
(PositiveParticle) {
36
const
auto
&
particle
=
Dataset::centralPositron
;
37
BOOST_CHECK(not
NeutralSelector
()(
particle
));
38
BOOST_CHECK(
ChargedSelector
()(
particle
));
39
BOOST_CHECK(
PositiveSelector
()(
particle
));
40
BOOST_CHECK(not
NegativeSelector
()(
particle
));
41
}
42
43
BOOST_AUTO_TEST_SUITE_END()
acts
blob
sPHENIX
Tests
UnitTests
Fatras
Selectors
ChargeSelectorsTests.cpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:28
using
1.8.2 with
EIC GitHub integration