ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagDerivationUtils
src
MetadataAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef JETTAGDERIVATIONUTILS_METADATAALG_H
6
#define JETTAGDERIVATIONUTILS_METADATAALG_H
7
8
#include "
AthenaBaseComps/AthAlgorithm.h
"
9
#include "GaudiKernel/ServiceHandle.h"
10
#include "GaudiKernel/IIncidentListener.h"
11
#include "
PATInterfaces/SystematicSet.h
"
12
#include "
PMGAnalysisInterfaces/IPMGTruthWeightTool.h
"
13
#include "
xAODCutFlow/CutBookkeeper.h
"
14
#include "
HDF5Utils/IH5GroupSvc.h
"
15
16
#include "
CutBookkeeperUtils/OriginalAodCounts.h
"
17
18
#include <set>
19
#include <string>
20
21
namespace
ftag
{
22
23
class
MetadataAlg
final :
24
public
AthAlgorithm
,
25
public
IIncidentListener
26
{
27
public
:
28
MetadataAlg
(
const
std::string& name, ISvcLocator* pSvcLocator);
29
30
StatusCode
initialize
()
override
;
31
StatusCode
execute
(
const
EventContext& ctx)
override
;
32
StatusCode
finalize
()
override
;
33
34
// hook to call this alg on each new input file
35
void
handle
(
const
Incident&)
override
;
36
37
private
:
38
ServiceHandle< StoreGateSvc >
m_inputMetaStore
;
39
40
ToolHandle<PMGTools::IPMGTruthWeightTool>
m_truthWeightTool
{
41
this
,
"truthWeightTool"
,
"PMGTools::PMGTruthWeightTool"
,
42
"the truth weight tool"
};
43
ServiceHandle<IH5GroupSvc>
m_output_svc
{
44
this
,
"h5Output"
,
""
,
"output file service"
};
45
Gaudi::Property<std::string>
m_json_output
{
46
this
,
"jsonOutput"
,
""
,
"json output file"
47
};
48
ServiceHandle<IH5GroupSvc>
m_hist_output_svc
{
49
this
,
"h5OutputHists"
,
""
,
50
"output service for histogram output"
};
51
Gaudi::Property<bool>
m_enable_systematics
{
52
this
,
"enableSystematics"
,
true
,
53
"include systematic variations (false = nominal only)"
};
54
Gaudi::Property<std::set<std::string>>
m_allowed_streams
{
55
this
,
"allowedStreams"
,
56
{
"StreamAOD"
,
"StreamEVGEN"
,
"StreamEVNT"
,
57
"StreamDAOD_PHYS"
,
"StreamDAOD_PHYSLITE"
},
58
"CutBookkeeper inputStream values accepted as AllExecutedEvents"
59
};
60
std::unordered_map<size_t, OriginalAodCounts>
m_weights
;
61
62
bool
isGoodBook
(
const
xAOD::CutBookkeeper
& cbk)
const
;
63
64
};
65
66
}
// end namespace ftag
67
68
#endif
AthAlgorithm.h
CutBookkeeper.h
IH5GroupSvc.h
IPMGTruthWeightTool.h
OriginalAodCounts.h
SystematicSet.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
ServiceHandle< StoreGateSvc >
ftag::MetadataAlg::m_truthWeightTool
ToolHandle< PMGTools::IPMGTruthWeightTool > m_truthWeightTool
Definition
MetadataAlg.h:40
ftag::MetadataAlg::m_enable_systematics
Gaudi::Property< bool > m_enable_systematics
Definition
MetadataAlg.h:51
ftag::MetadataAlg::execute
StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
MetadataAlg.cxx:99
ftag::MetadataAlg::m_weights
std::unordered_map< size_t, OriginalAodCounts > m_weights
Definition
MetadataAlg.h:60
ftag::MetadataAlg::m_allowed_streams
Gaudi::Property< std::set< std::string > > m_allowed_streams
Definition
MetadataAlg.h:54
ftag::MetadataAlg::isGoodBook
bool isGoodBook(const xAOD::CutBookkeeper &cbk) const
Definition
MetadataAlg.cxx:72
ftag::MetadataAlg::m_output_svc
ServiceHandle< IH5GroupSvc > m_output_svc
Definition
MetadataAlg.h:43
ftag::MetadataAlg::m_json_output
Gaudi::Property< std::string > m_json_output
Definition
MetadataAlg.h:45
ftag::MetadataAlg::handle
void handle(const Incident &) override
Definition
MetadataAlg.cxx:104
ftag::MetadataAlg::m_hist_output_svc
ServiceHandle< IH5GroupSvc > m_hist_output_svc
Definition
MetadataAlg.h:48
ftag::MetadataAlg::initialize
StatusCode initialize() override
Definition
MetadataAlg.cxx:78
ftag::MetadataAlg::MetadataAlg
MetadataAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
MetadataAlg.cxx:64
ftag::MetadataAlg::m_inputMetaStore
ServiceHandle< StoreGateSvc > m_inputMetaStore
Definition
MetadataAlg.h:38
ftag::MetadataAlg::finalize
StatusCode finalize() override
Definition
MetadataAlg.cxx:181
ftag
Definition
FlowSelectorAlg.cxx:16
xAOD::CutBookkeeper
CutBookkeeper_v1 CutBookkeeper
Define the latest version of the CutBookkeeper class.
Definition
CutBookkeeper.h:17
Generated on
for ATLAS Offline Software by
1.17.0