ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkMCTruth
src
TruthMetaDataWriter.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef DERIVATIONFRAMEWORK_TRUTHMETADATAWRITER_H
6
#define DERIVATIONFRAMEWORK_TRUTHMETADATAWRITER_H
7
8
#include "
AthenaBaseComps/AthAlgTool.h
"
9
#include "
CxxUtils/checker_macros.h
"
10
#include "
DerivationFrameworkInterfaces/IAugmentationTool.h
"
11
12
// Handles to services
13
#include "GaudiKernel/ServiceHandle.h"
14
#include "
StoreGate/ReadHandleKey.h
"
15
16
// Service for the metadata (tag info)
17
#include "
EventInfoMgt/ITagInfoMgr.h
"
18
19
// Service for the weights
20
#include "
GenInterfaces/IHepMCWeightSvc.h
"
21
22
// EDM classes - typedefs, so have to #include them
23
#include "
xAODTruth/TruthMetaDataContainer.h
"
24
#include "
xAODEventInfo/EventInfo.h
"
25
26
// Standard library includes
27
#include <string>
28
#include <unordered_set>
29
30
// Forward declarations
31
class
IHepMCWeightSvc
;
32
33
namespace
DerivationFramework
{
34
35
class
ATLAS_NOT_THREAD_SAFE
TruthMetaDataWriter
:
public
extends<AthAlgTool, IAugmentationTool> {
36
// ^ meta-data handling in addBranches
37
public
:
38
39
using
base_class::base_class;
40
41
virtual
StatusCode
initialize
()
override
final
;
42
virtual
StatusCode
addBranches
(
const
EventContext& ctx)
const
override
final
;
43
44
private
:
46
ServiceHandle< StoreGateSvc >
m_metaStore
{
this
,
"MetaDataStore"
,
"MetaDataStore"
};
48
ServiceHandle< IHepMCWeightSvc >
m_weightSvc
{
this
,
"HepMCWeightSvc"
,
"HepMCWeightSvc/HepMCWeightSvc"
};
50
xAOD::TruthMetaDataContainer
*
m_tmd
{};
52
Gaudi::Property<std::string>
m_metaName
{
this
,
"MetaObjectName"
,
"TruthMetaData"
};
// FIXME WriteHandle???
54
mutable
std::unordered_set<uint32_t>
m_existingMetaDataChan
;
56
ServiceHandle< ITagInfoMgr >
m_tagInfoMgr
{
57
"TagInfoMgr"
, name()};
58
// ReadHandle key for EventInfo
59
SG::ReadHandleKey<xAOD::EventInfo>
m_eventInfoKey
{
this
,
"EventInfoKey"
,
"EventInfo"
,
"EventInfo key"
};
60
61
};
62
}
63
64
#endif
AthAlgTool.h
IAugmentationTool.h
IHepMCWeightSvc.h
ITagInfoMgr.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TruthMetaDataContainer.h
checker_macros.h
Define macros for attributes used to control the static checker.
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition
checker_macros.h:212
DerivationFramework::TruthMetaDataWriter
Definition
TruthMetaDataWriter.h:35
DerivationFramework::TruthMetaDataWriter::m_tmd
xAOD::TruthMetaDataContainer * m_tmd
The meta data container to be written out.
Definition
TruthMetaDataWriter.h:50
DerivationFramework::TruthMetaDataWriter::m_existingMetaDataChan
std::unordered_set< uint32_t > m_existingMetaDataChan
Set for tracking the mc channels for which we already added meta data.
Definition
TruthMetaDataWriter.h:54
DerivationFramework::TruthMetaDataWriter::m_weightSvc
ServiceHandle< IHepMCWeightSvc > m_weightSvc
Service for retrieving the weight names.
Definition
TruthMetaDataWriter.h:48
DerivationFramework::TruthMetaDataWriter::m_tagInfoMgr
ServiceHandle< ITagInfoMgr > m_tagInfoMgr
TagInfoMgr to get information out of /TagInfo.
Definition
TruthMetaDataWriter.h:56
DerivationFramework::TruthMetaDataWriter::m_metaName
Gaudi::Property< std::string > m_metaName
SG key and name for meta data.
Definition
TruthMetaDataWriter.h:52
DerivationFramework::TruthMetaDataWriter::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override final
Definition
TruthMetaDataWriter.cxx:45
DerivationFramework::TruthMetaDataWriter::m_metaStore
ServiceHandle< StoreGateSvc > m_metaStore
Connection to the metadata store.
Definition
TruthMetaDataWriter.h:46
DerivationFramework::TruthMetaDataWriter::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition
TruthMetaDataWriter.h:59
IHepMCWeightSvc
IService to read/write HepMC's WeightContainer key names from/to IOVMetaDataContainers author: will b...
Definition
IHepMCWeightSvc.h:18
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
ServiceHandle< StoreGateSvc >
DerivationFramework
THE reconstruction tool.
Definition
CascadeTools.h:16
xAOD::TruthMetaDataContainer
TruthMetaDataContainer_v1 TruthMetaDataContainer
Declare the latest version of the truth vertex container.
Definition
TruthMetaDataContainer.h:17
initialize
void initialize()
Definition
run_EoverP.cxx:894
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0