ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
AsgAnalysisAlgorithms
AsgAnalysisAlgorithms
AsgCutBookkeeperAlg.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__ASG_CUT_BOOKKEEPER_ALG_H
9
#define ASG_ANALYSIS_ALGORITHMS__ASG_CUT_BOOKKEEPER_ALG_H
10
11
#include <
AnaAlgorithm/AnaAlgorithm.h
>
12
#include <
AsgServices/ServiceHandle.h
>
13
#include <
PATInterfaces/SystematicSet.h
>
14
#include <
PMGAnalysisInterfaces/IPMGTruthWeightTool.h
>
15
#include <
SystematicsHandles/ISystematicsSvc.h
>
16
#include <
xAODCutFlow/CutBookkeeper.h
>
17
#include <
AsgTools/PropertyWrapper.h
>
18
19
namespace
CP
20
{
23
24
class
AsgCutBookkeeperAlg
final :
public
EL::AnaAlgorithm
25
{
27
public
:
28
using
EL::AnaAlgorithm::AnaAlgorithm
;
29
30
public
:
32
StatusCode
initialize
()
override
;
33
34
public
:
36
StatusCode
fileExecute
()
override
;
37
38
public
:
40
StatusCode
finalize
()
override
;
41
42
private
:
44
void
processCutBookkeeper
(
const
xAOD::CutBookkeeper
*cbk,
45
size_t
index
);
46
48
private
:
49
Gaudi::Property<bool>
m_enableSystematics
{
this
,
"enableSystematics"
,
false
,
"enable systematics"
};
50
52
private
:
53
ToolHandle<PMGTools::IPMGTruthWeightTool>
m_truthWeightTool
{
this
,
"truthWeightTool"
,
"PMGTools::PMGTruthWeightTool"
,
"the truth weight tool"
};
54
56
private
:
57
ServiceHandle<ISystematicsSvc>
m_systematics
{
this
,
"systematics"
,
"SystematicsSvc"
,
"systematics service"
};
58
60
private
:
61
Gaudi::Property<uint32_t>
m_runNumber
{
this
,
"runNumber"
, 0,
"the run number we are processing"
};
62
64
private
:
65
uint32_t
m_mcChannelNumber
{};
66
68
private
:
69
struct
WeightsGroup
70
{
71
float
nEventsProcessed
{};
72
float
sumOfWeights
{};
73
float
sumOfWeightsSquared
{};
74
};
75
77
private
:
78
std::vector<std::string>
m_allowed_streams
{
"StreamRDO"
,
"StreamAOD"
,
"StreamEVGEN"
,
"StreamEVNT"
};
79
81
private
:
82
std::unordered_map<size_t, WeightsGroup>
m_weights
;
83
85
private
:
86
Gaudi::Property<std::string>
m_histPattern
{
this
,
"histPattern"
,
"CutBookkeeper_%DSID%_%RUN%_%SYS%"
,
"the pattern for histogram names"
};
87
};
88
}
89
90
#endif
AnaAlgorithm.h
CutBookkeeper.h
IPMGTruthWeightTool.h
ISystematicsSvc.h
PropertyWrapper.h
ServiceHandle.h
SystematicSet.h
CP::AsgCutBookkeeperAlg
an algorithm for dumping the CutBookkeeper metadata into a histogram
Definition
AsgCutBookkeeperAlg.h:25
CP::AsgCutBookkeeperAlg::m_systematics
ServiceHandle< ISystematicsSvc > m_systematics
the systematics service
Definition
AsgCutBookkeeperAlg.h:57
CP::AsgCutBookkeeperAlg::m_runNumber
Gaudi::Property< uint32_t > m_runNumber
run number we are processing
Definition
AsgCutBookkeeperAlg.h:61
CP::AsgCutBookkeeperAlg::initialize
StatusCode initialize() override
initialize
Definition
AsgCutBookkeeperAlg.cxx:31
CP::AsgCutBookkeeperAlg::m_mcChannelNumber
uint32_t m_mcChannelNumber
MC channel number we are processing.
Definition
AsgCutBookkeeperAlg.h:65
CP::AsgCutBookkeeperAlg::m_enableSystematics
Gaudi::Property< bool > m_enableSystematics
flag to enable systematics
Definition
AsgCutBookkeeperAlg.h:49
CP::AsgCutBookkeeperAlg::m_histPattern
Gaudi::Property< std::string > m_histPattern
the pattern for histogram names
Definition
AsgCutBookkeeperAlg.h:86
CP::AsgCutBookkeeperAlg::m_truthWeightTool
ToolHandle< PMGTools::IPMGTruthWeightTool > m_truthWeightTool
the truth weight tool
Definition
AsgCutBookkeeperAlg.h:53
CP::AsgCutBookkeeperAlg::m_allowed_streams
std::vector< std::string > m_allowed_streams
input streams that we can run the CutBookkeepers against
Definition
AsgCutBookkeeperAlg.h:78
CP::AsgCutBookkeeperAlg::processCutBookkeeper
void processCutBookkeeper(const xAOD::CutBookkeeper *cbk, size_t index)
process a CutBookkeeper
Definition
AsgCutBookkeeperAlg.cxx:178
CP::AsgCutBookkeeperAlg::fileExecute
StatusCode fileExecute() override
run once on each file
Definition
AsgCutBookkeeperAlg.cxx:80
CP::AsgCutBookkeeperAlg::finalize
StatusCode finalize() override
finalize
Definition
AsgCutBookkeeperAlg.cxx:200
CP::AsgCutBookkeeperAlg::m_weights
std::unordered_map< size_t, WeightsGroup > m_weights
weights map
Definition
AsgCutBookkeeperAlg.h:82
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
ServiceHandle
Definition
ClusterMakerTool.h:36
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
index
Definition
index.py:1
xAOD::CutBookkeeper
CutBookkeeper_v1 CutBookkeeper
Define the latest version of the CutBookkeeper class.
Definition
CutBookkeeper.h:17
xAOD::uint32_t
setEventNumber uint32_t
Definition
EventInfo_v1.cxx:127
CP::AsgCutBookkeeperAlg::WeightsGroup
weights helper struct
Definition
AsgCutBookkeeperAlg.h:70
CP::AsgCutBookkeeperAlg::WeightsGroup::nEventsProcessed
float nEventsProcessed
Definition
AsgCutBookkeeperAlg.h:71
CP::AsgCutBookkeeperAlg::WeightsGroup::sumOfWeightsSquared
float sumOfWeightsSquared
Definition
AsgCutBookkeeperAlg.h:73
CP::AsgCutBookkeeperAlg::WeightsGroup::sumOfWeights
float sumOfWeights
Definition
AsgCutBookkeeperAlg.h:72
Generated on
for ATLAS Offline Software by
1.17.0