File indexing completed on 2025-01-18 09:12:13
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/PdgParticle.hpp"
0012 #include "ActsFatras/EventData/Particle.hpp"
0013
0014 namespace ActsFatras {
0015
0016
0017 struct EveryParticle {
0018 bool operator()(const Particle & ) const { return true; }
0019 };
0020
0021
0022 struct NeutralSelector {
0023 bool operator()(const Particle &particle) const {
0024 return (particle.charge() == 0.);
0025 }
0026 };
0027
0028
0029 struct ChargedSelector {
0030 bool operator()(const Particle &particle) const {
0031 return (particle.charge() != 0.);
0032 }
0033 };
0034
0035
0036 struct PositiveSelector {
0037 bool operator()(const Particle &particle) const {
0038 return (0. < particle.charge());
0039 }
0040 };
0041
0042
0043 struct NegativeSelector {
0044 bool operator()(const Particle &particle) const {
0045 return (particle.charge() < 0.);
0046 }
0047 };
0048
0049
0050
0051
0052 template <Acts::PdgParticle Pdg>
0053 struct PdgSelector {
0054 bool operator()(const Particle &particle) const {
0055 return (particle.pdg() == Pdg);
0056 }
0057 };
0058
0059
0060 template <Acts::PdgParticle Pdg>
0061 struct AbsPdgSelector {
0062 bool operator()(const Particle &particle) const {
0063 return (makeAbsolutePdgParticle(particle.pdg()) ==
0064 makeAbsolutePdgParticle(Pdg));
0065 }
0066 };
0067
0068
0069
0070
0071 template <Acts::PdgParticle Pdg>
0072 struct PdgExcluder {
0073 bool operator()(const Particle &particle) const {
0074 return (particle.pdg() != Pdg);
0075 }
0076 };
0077
0078
0079 template <Acts::PdgParticle Pdg>
0080 struct AbsPdgExcluder {
0081 bool operator()(const Particle &particle) const {
0082 return (makeAbsolutePdgParticle(particle.pdg()) !=
0083 makeAbsolutePdgParticle(Pdg));
0084 }
0085 };
0086
0087 }