ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkSUSY
src
PdgConditional.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef DerivationFramework_PdgConditional_H
5
#define DerivationFramework_PdgConditional_H
6
7
#include <variant>
8
#include <functional>
9
10
15
namespace
DerivationFramework
{
16
class
PdgConditional
{
17
public
:
18
//Default c'tor just for testing, *may change*
19
PdgConditional
();
20
//Constructor taking integer pdg code for comparison with a value in operator ==
21
PdgConditional
(
int
pdgIntCode);
22
//Constructor taking unsigned int for comparison with abs(value) in operator ==
23
PdgConditional
(
unsigned
equalInt);
24
//Constructor taking a fully custom binary predicate for use in operator ==
25
PdgConditional
(std::function<
bool
(
int
)> b);
26
//Uses either v, abs(v) or f(v) for comparison with a held value
27
bool
operator==
(
int
v)
const
;
28
private
:
29
//variant member determines behaviour: raw compare, abs compare or use the provided function
30
const
std::variant<int, unsigned, std::function<bool(
int
)>>
m_condition
;
31
};
32
33
}
34
#endif
DerivationFramework::PdgConditional::PdgConditional
PdgConditional()
Definition
PdgConditional.cxx:10
DerivationFramework::PdgConditional::operator==
bool operator==(int v) const
Definition
PdgConditional.cxx:25
DerivationFramework::PdgConditional::m_condition
const std::variant< int, unsigned, std::function< bool(int)> > m_condition
Definition
PdgConditional.h:30
DerivationFramework
THE reconstruction tool.
Definition
ParticleSortingAlg.h:24
Generated on
for ATLAS Offline Software by
1.14.0