ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
AsgAnalysisAlgorithms
AsgAnalysisAlgorithms
EventCutFlowHistAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
#ifndef ASG_ANALYSIS_ALGORITHMS__EVENT_CUT_FLOW_HIST_ALG_H
9
#define ASG_ANALYSIS_ALGORITHMS__EVENT_CUT_FLOW_HIST_ALG_H
10
11
#include <
AnaAlgorithm/AnaAlgorithm.h
>
12
#include <
AsgTools/PropertyWrapper.h
>
13
#include <
SelectionHelpers/ISelectionNameSvc.h
>
14
#include <
SelectionHelpers/SysReadSelectionHandle.h
>
15
#include <
SystematicsHandles/SysReadHandle.h
>
16
#include <
SystematicsHandles/SysListHandle.h
>
17
#include <
xAODEventInfo/EventInfo.h
>
18
#include <
AsgTools/PropertyWrapper.h
>
19
20
namespace
CP
21
{
23
24
class
EventCutFlowHistAlg
final :
public
EL::AnaAlgorithm
25
{
27
public
:
28
using
EL::AnaAlgorithm::AnaAlgorithm
;
29
StatusCode
initialize
()
override
;
30
StatusCode
execute
(
const
EventContext& ctx)
override
;
31
32
34
private
:
35
SysListHandle
m_systematicsList
{
this
};
36
38
private
:
39
SysReadHandle<xAOD::EventInfo>
m_eventInfoHandle
{
40
this
,
"eventInfo"
,
"EventInfo"
,
"the EventInfo container to run on"
};
41
43
private
:
44
SysReadSelectionHandle
m_preselection
{
45
this
,
"preselection"
,
""
,
"the preselection to apply"
};
46
48
private
:
49
Gaudi::Property<std::string>
m_histPattern
{
this
,
"histPattern"
,
"cutflow_%SYS%"
,
"the pattern for histogram names"
};
50
52
private
:
53
ServiceHandle<ISelectionNameSvc>
m_selectionNameSvc
{
"SelectionNameSvc"
,
"EventCutFlowHistAlg"
};
54
56
private
:
57
Gaudi::Property<std::string>
m_histTitle
{
this
,
"histTitle"
,
"event cut flow"
,
"title for the created histograms"
};
58
60
private
:
61
SysReadSelectionHandleArray
m_selections
{
62
this
,
"selections"
, {},
"the inputs to the event cutflow"
};
63
66
private
:
67
unsigned
m_allCutsNum
= 0;
68
70
private
:
71
std::unordered_map<CP::SystematicSet,TH1*>
m_hist
;
72
74
private
:
75
std::vector<std::string>
m_labels
;
76
};
77
}
78
79
#endif
AnaAlgorithm.h
ISelectionNameSvc.h
PropertyWrapper.h
SysListHandle.h
SysReadHandle.h
SysReadSelectionHandle.h
CP::EventCutFlowHistAlg
an algorithm for dumping the an event-level cutflow
Definition
EventCutFlowHistAlg.h:25
CP::EventCutFlowHistAlg::m_labels
std::vector< std::string > m_labels
histogram bin labels
Definition
EventCutFlowHistAlg.h:75
CP::EventCutFlowHistAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
EventCutFlowHistAlg.h:35
CP::EventCutFlowHistAlg::m_histTitle
Gaudi::Property< std::string > m_histTitle
the histogram title to use
Definition
EventCutFlowHistAlg.h:57
CP::EventCutFlowHistAlg::initialize
StatusCode initialize() override
Definition
EventCutFlowHistAlg.cxx:24
CP::EventCutFlowHistAlg::m_selections
SysReadSelectionHandleArray m_selections
the input object selections for which to create a cutflow
Definition
EventCutFlowHistAlg.h:61
CP::EventCutFlowHistAlg::m_hist
std::unordered_map< CP::SystematicSet, TH1 * > m_hist
the created histograms
Definition
EventCutFlowHistAlg.h:71
CP::EventCutFlowHistAlg::m_eventInfoHandle
SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
the jet collection we run on
Definition
EventCutFlowHistAlg.h:39
CP::EventCutFlowHistAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition
EventCutFlowHistAlg.h:44
CP::EventCutFlowHistAlg::m_histPattern
Gaudi::Property< std::string > m_histPattern
the pattern for histogram names
Definition
EventCutFlowHistAlg.h:49
CP::EventCutFlowHistAlg::m_selectionNameSvc
ServiceHandle< ISelectionNameSvc > m_selectionNameSvc
the selection name service
Definition
EventCutFlowHistAlg.h:53
CP::EventCutFlowHistAlg::m_allCutsNum
unsigned m_allCutsNum
the total number of cuts configured (needed to configure histograms)
Definition
EventCutFlowHistAlg.h:67
CP::SysListHandle
a class managing the property to configure the list of systematics to process
Definition
SysListHandle.h:33
CP::SysReadHandle
a data handle for reading systematics varied input data
Definition
SysReadHandle.h:33
CP::SysReadSelectionHandle
a data handle for reading systematically varied selection properties from objects
Definition
SysReadSelectionHandle.h:32
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition
AnaAlgorithm.h:74
EL::AnaAlgorithm::AnaAlgorithm
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition
AnaAlgorithm.cxx:40
EL::AnaAlgorithm::execute
virtual::StatusCode execute()
execute this algorithm
Definition
AnaAlgorithm.cxx:315
ServiceHandle
Definition
ClusterMakerTool.h:36
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
CP::SysReadSelectionHandleArray
SysHandleArray< SysReadSelectionHandle > SysReadSelectionHandleArray
Definition
SysReadSelectionHandle.h:111
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0