Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ParticleSelectors.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ParticleSelectors.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2018-2021 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
#pragma once
10
11
#include "
Acts/Definitions/PdgParticle.hpp
"
12
#include "
ActsFatras/EventData/Particle.hpp
"
13
14
namespace
ActsFatras {
15
17
struct
EveryParticle
{
18
bool
operator()
(
const
Particle
&
/*particle*/
)
const
{
return
true
; }
19
};
20
22
struct
NeutralSelector
{
23
bool
operator()
(
const
Particle
&
particle
)
const
{
24
return
(particle.
charge
() ==
Particle::Scalar
(0));
25
}
26
};
27
29
struct
ChargedSelector
{
30
bool
operator()
(
const
Particle
&
particle
)
const
{
31
return
(particle.
charge
() !=
Particle::Scalar
(0));
32
}
33
};
34
36
struct
PositiveSelector
{
37
bool
operator()
(
const
Particle
&
particle
)
const
{
38
return
(
Particle::Scalar
(0) < particle.
charge
());
39
}
40
};
41
43
struct
NegativeSelector
{
44
bool
operator()
(
const
Particle
&
particle
)
const
{
45
return
(particle.
charge
() <
Particle::Scalar
(0));
46
}
47
};
48
52
template
<Acts::PdgParticle Pdg>
53
struct
PdgSelector
{
54
bool
operator()
(
const
Particle
&
particle
)
const
{
55
return
(particle.
pdg
() == Pdg);
56
}
57
};
58
60
template
<Acts::PdgParticle Pdg>
61
struct
AbsPdgSelector
{
62
bool
operator()
(
const
Particle
&
particle
)
const
{
63
return
(
makeAbsolutePdgParticle
(particle.
pdg
()) ==
64
makeAbsolutePdgParticle
(Pdg));
65
}
66
};
67
71
template
<Acts::PdgParticle Pdg>
72
struct
PdgExcluder
{
73
bool
operator()
(
const
Particle
&
particle
)
const
{
74
return
(particle.
pdg
() != Pdg);
75
}
76
};
77
79
template
<Acts::PdgParticle Pdg>
80
struct
AbsPdgExcluder
{
81
bool
operator()
(
const
Particle
&
particle
)
const
{
82
return
(
makeAbsolutePdgParticle
(particle.
pdg
()) !=
83
makeAbsolutePdgParticle
(Pdg));
84
}
85
};
86
87
}
// namespace ActsFatras
acts
blob
sPHENIX
Fatras
include
ActsFatras
Selectors
ParticleSelectors.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:41
using
1.8.2 with
sPHENIX GitHub integration