ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
SelectionHelpers
Root
SelectionWriteAccessorBits.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
//
9
// includes
10
//
11
12
#include <
SelectionHelpers/SelectionWriteAccessorBits.h
>
13
14
#include <
PATInterfaces/SystematicSet.h
>
15
#include <
SystematicsHandles/ISysHandleBase.h
>
16
#include <
SystematicsHandles/ISystematicsSvc.h
>
17
18
//
19
// method implementations
20
//
21
22
namespace
CP
23
{
24
SelectionWriteAccessorBits ::
25
SelectionWriteAccessorBits (
const
std::string&
name
)
26
:
m_accessor
(
name
),
m_label
(
name
)
27
{}
28
29
30
31
void
SelectionWriteAccessorBits ::
32
setBits (
const
SG::AuxElement
& element,
33
SelectionType
selection
,
34
const
CP::SystematicSet
*
/*sys*/
)
const
35
{
36
m_accessor
(element) =
selection
;
37
}
38
39
40
41
void
SelectionWriteAccessorBits ::
42
setBool (
const
SG::AuxElement
& element,
43
bool
selection
,
44
const
CP::SystematicSet
*
/*sys*/
)
const
45
{
46
if
(
selection
)
47
m_accessor
(element) =
selectionAccept
();
48
else
49
m_accessor
(element) =
selectionAccept
() ^ 0x1;
50
}
51
52
53
54
std::string SelectionWriteAccessorBits ::
55
label ()
const
56
{
57
return
m_label
;
58
}
59
60
61
62
StatusCode SelectionWriteAccessorBits ::
63
fillSystematics (
const
ISystematicsSvc
& svc,
64
const
CP::SystematicSet
& fullAffecting,
65
const
std::vector<CP::SystematicSet>&
/*sysList*/
,
66
ISysObjectHandleBase
& objectHandle)
67
{
68
using namespace
msgSelectionHelpers;
69
70
ANA_CHECK
(svc.setDecorSystematics (objectHandle.
getNamePattern
(),
m_label
, fullAffecting));
71
ANA_CHECK
(objectHandle.
addDecorationDependency
(svc,
m_label
,
true
));
72
return
StatusCode::SUCCESS;
73
}
74
}
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
ISysHandleBase.h
ISystematicsSvc.h
SelectionWriteAccessorBits.h
SystematicSet.h
CP::ISysObjectHandleBase
a ISysHandleBase for a handle to a specific object/container
Definition
ISysHandleBase.h:58
CP::ISysObjectHandleBase::addDecorationDependency
virtual StatusCode addDecorationDependency(const ISystematicsSvc &svc, const std::string &decoName, bool decoWrite)=0
add dependency information for the given decoration
CP::ISysObjectHandleBase::getNamePattern
virtual std::string getNamePattern() const =0
get the name pattern before substitution
CP::ISystematicsSvc
the interface for the central systematics service
Definition
ISystematicsSvc.h:26
CP::SelectionWriteAccessorBits::m_accessor
SG::Decorator< SelectionType > m_accessor
the underlying accessor
Definition
SelectionWriteAccessorBits.h:54
CP::SelectionWriteAccessorBits::m_label
std::string m_label
the label of the accessor
Definition
SelectionWriteAccessorBits.h:58
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition
SystematicSet.h:31
selection
const std::string selection
Definition
fbtTestBasics.cxx:75
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
CP::SelectionType
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Definition
SelectionHelpers.h:26
CP::selectionAccept
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected
Definition
SelectionHelpers.h:35
SG::AuxElement
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
Generated on
for ATLAS Offline Software by
1.17.0