ATLAS Offline Software
Loading...
Searching...
No Matches
TauAnalysisTools::TauSmearingTool Class Reference

#include <TauSmearingTool.h>

Inheritance diagram for TauAnalysisTools::TauSmearingTool:
Collaboration diagram for TauAnalysisTools::TauSmearingTool:

Public Types

Definition of the StoreGate-like object's definition
typedef ServiceHandle< StoreGateSvcMetaStore_t
 Type of the metadata store object in Athena.
typedef const ServiceHandle< StoreGateSvc > & MetaStorePtr_t
 Type of the metadata store pointer in standalone mode.

Public Member Functions

 TauSmearingTool (const std::string &sName)
 Create a proper constructor for Athena.
 ~TauSmearingTool ()
virtual StatusCode initialize ()
 Function initialising the tool.
virtual StatusCode beginInputFile ()
 Function called when a new input file is opened.
virtual CP::CorrectionCode applyCorrection (xAOD::TauJet &xTau) const
 Apply the correction on a modifyable object.
virtual CP::CorrectionCode correctedCopy (const xAOD::TauJet &input, xAOD::TauJet *&output) const
 Create a corrected copy from a constant tau.
virtual bool isAffectedBySystematic (const CP::SystematicVariation &systematic) const
 returns: whether this tool is affected by the given systematis
virtual CP::SystematicSet affectingSystematics () const
 returns: the list of all systematics this tool can be affected by
virtual CP::SystematicSet recommendedSystematics () const
 returns: the list of all systematics this tool recommends to use
virtual StatusCode applySystematicVariation (const CP::SystematicSet &systConfig)
 effects: configure this tool for the given list of systematic variations.
virtual StatusCode sysInitialize ()
 Function initialising the tool in the correct way in Athena.
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Functions providing access to the input/output metadata
MetaStorePtr_t inputMetaStore () const
 Accessor for the input metadata store.
MetaStorePtr_t outputMetaStore () const
 Accessor for the output metadata store.
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.
Callback functions helping in metadata reading/writing
void setUseIncidents (const bool flag)
virtual void handle (const Incident &inc)
 Function receiving incidents from IncidentSvc/TEvent.
virtual StatusCode endInputFile ()
 Function called when the currently open input file got completely processed.
virtual StatusCode beginEvent ()
 Function called when a new events is loaded.
virtual StatusCode metaDataStop ()
 Function called when the tool should write out its metadata.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

asg::AnaToolHandle< ITauSmearingToolm_tCommonSmearingTool
Gaudi::Property< std::string > m_sInputFilePath {this, "InputFilePath", ""}
Gaudi::Property< std::string > m_sRecommendationTag {this, "RecommendationTag", "2025-prerec"}
Gaudi::Property< std::string > m_sCampaign {this, "Campaign", "mc21"}
Gaudi::Property< std::string > m_sGenerator {this, "Generator", "PoPy"}
Gaudi::Property< bool > m_bSkipTruthMatchCheck {this, "SkipTruthMatchCheck", false}
Gaudi::Property< bool > m_bApplyFading {this, "ApplyFading", true}
Gaudi::Property< bool > m_bMVATESQualityCheck {this, "MVATESQualityCheck", true}
Gaudi::Property< bool > m_bApplyInsituCorrection {this, "ApplyInsituCorrection", true}
Gaudi::Property< bool > m_useFastSim {this, "useFastSim", false}
MetaStore_t m_inputMetaStore
 Object accessing the input metadata store.
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store.
bool m_beginInputFileCalled
 Flag helping to discover when the tool misses the opening of the first input file.
bool m_useIncidents
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 30 of file TauSmearingTool.h.

Member Typedef Documentation

◆ MetaStore_t

Type of the metadata store object in Athena.

Definition at line 66 of file AsgMetadataTool.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 68 of file AsgMetadataTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TauSmearingTool()

TauAnalysisTools::TauSmearingTool::TauSmearingTool ( const std::string & sName)

Create a proper constructor for Athena.

Create a constructor for standalone usage

Definition at line 16 of file TauSmearingTool.cxx.

17 : asg::AsgMetadataTool( sName )
18 , m_tCommonSmearingTool(sName+"_CommonSmearingTool", this)
19{}
asg::AnaToolHandle< ITauSmearingTool > m_tCommonSmearingTool

◆ ~TauSmearingTool()

TauAnalysisTools::TauSmearingTool::~TauSmearingTool ( )

Definition at line 21 of file TauSmearingTool.cxx.

22{}

Member Function Documentation

◆ affectingSystematics()

CP::SystematicSet TauAnalysisTools::TauSmearingTool::affectingSystematics ( ) const
virtual

returns: the list of all systematics this tool can be affected by

Implements CP::IReentrantSystematicsTool.

Definition at line 139 of file TauSmearingTool.cxx.

140{
141 return m_tCommonSmearingTool->affectingSystematics();
142}

◆ applyCorrection()

CP::CorrectionCode TauAnalysisTools::TauSmearingTool::applyCorrection ( xAOD::TauJet & xTau) const
virtual

Apply the correction on a modifyable object.

Implements TauAnalysisTools::ITauSmearingTool.

Definition at line 122 of file TauSmearingTool.cxx.

123{
124 return m_tCommonSmearingTool->applyCorrection(xTau);
125}

◆ applySystematicVariation()

StatusCode TauAnalysisTools::TauSmearingTool::applySystematicVariation ( const CP::SystematicSet & systConfig)
virtual

effects: configure this tool for the given list of systematic variations.

any requested systematics that are not affecting this tool will be silently ignored (unless they cause other errors). failures: systematic unknown failures: requesting multiple variations on the same systematic (e.g. up & down) failures: requesting an unsupported variation on an otherwise supported systematic (e.g. a 2 sigma variation and the tool only supports 1 sigma variations) failures: unsupported combination of supported systematic failures: other tool specific errors

Implements CP::ISystematicsTool.

Definition at line 150 of file TauSmearingTool.cxx.

151{
152 return m_tCommonSmearingTool->applySystematicVariation( sSystematicSet );
153}

◆ beginEvent()

StatusCode asg::AsgMetadataTool::beginEvent ( )
protectedvirtualinherited

◆ beginInputFile()

StatusCode TauAnalysisTools::TauSmearingTool::beginInputFile ( )
virtual

Function called when a new input file is opened.

Dummy implementation that can be overridden by the derived tool.

Reimplemented from asg::AsgMetadataTool.

Definition at line 102 of file TauSmearingTool.cxx.

103{
104 if (inputMetaStore()->contains<xAOD::FileMetaData>("FileMetaData")) {
105 const xAOD::FileMetaData* fmd = nullptr;
106 ATH_CHECK( inputMetaStore()->retrieve( fmd, "FileMetaData" ) );
107 std::string simType("");
108 bool result = fmd->value( xAOD::FileMetaData::simFlavour , simType );
109 // if no result -> no simFlavor metadata, so must be data
110 if(result) std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
111
112 if( simType.find("ATLFAST3") != std::string::npos && !m_useFastSim){
113 ATH_MSG_WARNING("Input file is AF3 sample but you are _not_ using AF3 corrections and uncertainties, you should set \"useFastSim\" to \"true\"");
114 } else if (simType.find("FULLG4")!=std::string::npos && m_useFastSim){
115 ATH_MSG_WARNING("Input file is full simulation but you are using AF3 corrections and uncertainties, you should set \"useFastSim\" to \"false\"");
116 }
117 }
118
119 return StatusCode::SUCCESS;
120}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Gaudi::Property< bool > m_useFastSim
MetaStorePtr_t inputMetaStore() const
Accessor for the input metadata store.
@ simFlavour
Fast or Full sim [string].
bool value(MetaDataType type, std::string &val) const
Get a pre-defined string value out of the object.
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
FileMetaData_v1 FileMetaData
Declare the latest version of the class.

◆ correctedCopy()

CP::CorrectionCode TauAnalysisTools::TauSmearingTool::correctedCopy ( const xAOD::TauJet & input,
xAOD::TauJet *& output ) const
virtual

Create a corrected copy from a constant tau.

Implements TauAnalysisTools::ITauSmearingTool.

Definition at line 127 of file TauSmearingTool.cxx.

128{
129 return m_tCommonSmearingTool->correctedCopy(input, output);
130}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ endInputFile()

StatusCode asg::AsgMetadataTool::endInputFile ( )
protectedvirtualinherited

Function called when the currently open input file got completely processed.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperDumperTool, BookkeeperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 193 of file AsgMetadataTool.cxx.

193 {
194
195 // Return gracefully:
196 return StatusCode::SUCCESS;
197 }

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::TEvent, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::TEvent, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ handle()

void asg::AsgMetadataTool::handle ( const Incident & inc)
protectedvirtualinherited

Function receiving incidents from IncidentSvc/TEvent.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 135 of file AsgMetadataTool.cxx.

135 {
136
137 // Tell the user what's happening:
138 ATH_MSG_VERBOSE( "Callback received with incident: " << inc.type() );
139
140 // Call the appropriate member function:
141 if( inc.type() == IncidentType::BeginInputFile ) {
143 if( beginInputFile().isFailure() ) {
144 ATH_MSG_FATAL( "Failed to call beginInputFile()" );
145 throw std::runtime_error( "Couldn't call beginInputFile()" );
146 }
147 } else if( inc.type() == IncidentType::EndInputFile ) {
148 if( endInputFile().isFailure() ) {
149 ATH_MSG_FATAL( "Failed to call endInputFile()" );
150 throw std::runtime_error( "Couldn't call endInputFile()" );
151 }
152 } else if( inc.type() == IncidentType::BeginEvent ) {
153 // If the tool didn't catch the begin input file incident for the
154 // first input file of the job, then call the appropriate function
155 // now.
156 if( ! m_beginInputFileCalled ) {
158 if( beginInputFile().isFailure() ) {
159 ATH_MSG_FATAL( "Failed to call beginInputFile()" );
160 throw std::runtime_error( "Couldn't call beginInputFile()" );
161 }
162 }
163 if( beginEvent().isFailure() ) {
164 ATH_MSG_FATAL( "Failed to call beginEvent()" );
165 throw std::runtime_error( "Couldn't call beginEvent()" );
166 }
167
168 #ifdef XAOD_STANDALONE
169 } else if( inc.type() == IncidentType::MetaDataStop ) {
170 if( metaDataStop().isFailure() ) {
171 ATH_MSG_FATAL( "Failed to call metaDataStop()" );
172 throw std::runtime_error( "Couldn't call metaDataStop()" );
173 }
174
175 #endif // XAOD_STANDALONE
176 } else {
177 ATH_MSG_WARNING( "Unknown incident type received in AsgMetaDataTool: " << inc.type() );
178 }
179
180 return;
181 }
#define ATH_MSG_FATAL(x)
#define ATH_MSG_VERBOSE(x)
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
virtual StatusCode beginEvent()
Function called when a new events is loaded.
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.

◆ initialize()

StatusCode TauAnalysisTools::TauSmearingTool::initialize ( void )
virtual

Function initialising the tool.

Reimplemented from asg::AsgTool.

Definition at line 24 of file TauSmearingTool.cxx.

25{
26 ATH_MSG_INFO( "Initializing TauSmearingTool" );
27
29 ATH_MSG_WARNING("Truth match check will be skipped. This is ONLY FOR TESTING PURPOSE!");
30
31 if (m_sInputFilePath.empty()) {
32 std::string sDirectory = "TauAnalysisTools/" + std::string(sSharedFilesVersion) + "/Smearing/";
33
34 if(m_sRecommendationTag == "2025-prerec") {
35
36 if (m_sCampaign!="mc23" && m_sCampaign!="mc20"){
37 ATH_MSG_ERROR("unknown campaign (mc20|mc23):" << m_sCampaign);
38 return StatusCode::FAILURE;
39 }
40
41 if(m_useFastSim) {
42 ATH_MSG_WARNING("No fast-sim recommendation for tau smearing is available, using full sim");
43 }
44
45 if (m_sCampaign=="mc23") {
46 m_sInputFilePath = sDirectory+"TES_TrueHadTau_RNN_mc23_v1.root";
47 } else {
48 m_sInputFilePath = sDirectory+"TES_TrueHadTau_RNN_mc20_v1.root";
49 }
50
51 } else if (m_sRecommendationTag == "2022-prerec") {
52
53 ATH_MSG_WARNING("2022-prerec tag are pre-recommendations superseeded by 2025-prerec");
54
55 if (m_sCampaign!="mc21" && m_sCampaign!="mc20"){
56 ATH_MSG_ERROR("unknown campaign (mc20|mc21):" << m_sCampaign);
57 return StatusCode::FAILURE;
58 }
59
60 if (m_sGenerator!="PoPy" && m_sCampaign!="Sherpa"){
61 ATH_MSG_ERROR("unknown generator tag (PoPy|Sherpa):" << m_sCampaign);
62 return StatusCode::FAILURE;
63 }
64
65 if(m_useFastSim) {
66 ATH_MSG_WARNING("No fast-sim recommendation for tau smearing is available, using full sim");
67 }
68
69 if (m_sGenerator == "PoPy" && m_sCampaign=="mc20") m_sInputFilePath = sDirectory+"TES_TrueHadTau_PoPy8_mc20-prerec_v2.root";
70 if (m_sCampaign=="mc21") {
71 m_sInputFilePath = sDirectory+"TES_TrueHadTau_PoPy8_mc21-prerec_v2.root";
72 if (m_sGenerator=="Sherpa")ATH_MSG_WARNING("No Sherpa mc21 recommendations available yet, using PoPy8!");
73 }
74 if (m_sGenerator == "Sherpa" && m_sCampaign=="mc20") m_sInputFilePath = sDirectory+"TES_TrueHadTau_Sherpa2211-prerec_v2.root";
75 }
76 else {
77 ATH_MSG_ERROR("unknown recommendation tag " << m_sRecommendationTag);
78 return StatusCode::FAILURE;
79 }
80 }
81 ATH_CHECK(ASG_MAKE_ANA_TOOL(m_tCommonSmearingTool, TauAnalysisTools::CommonSmearingTool));
82 ATH_CHECK(m_tCommonSmearingTool.setProperty("InputFilePath", m_sInputFilePath));
83 ATH_CHECK(m_tCommonSmearingTool.setProperty("SkipTruthMatchCheck", m_bSkipTruthMatchCheck));
84 ATH_CHECK(m_tCommonSmearingTool.setProperty("ApplyFading", m_bApplyFading));
85 ATH_CHECK(m_tCommonSmearingTool.setProperty("MVATESQualityCheck", m_bMVATESQualityCheck));
86 ATH_CHECK(m_tCommonSmearingTool.setProperty("ApplyInsituCorrection", m_bApplyInsituCorrection));
87 ATH_CHECK(m_tCommonSmearingTool.setProperty("OutputLevel", this->msg().level()));
88 ATH_CHECK(m_tCommonSmearingTool.initialize());
89
90 // Add the affecting systematics to the global registry
91 CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance();
92 if (!registry.registerSystematics(*this)) {
93 ATH_MSG_ERROR ("Unable to register the systematics");
94 return StatusCode::FAILURE;
95 }
96
97 return StatusCode::SUCCESS;
98}
#define ASG_MAKE_ANA_TOOL(handle, type)
create the tool in the given tool handle
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
static const char *const sSharedFilesVersion
Version of the calibration files.
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
StatusCode registerSystematics(const IReentrantSystematicsTool &tool)
effects: register all the systematics from the tool
Gaudi::Property< std::string > m_sGenerator
Gaudi::Property< bool > m_bMVATESQualityCheck
Gaudi::Property< std::string > m_sRecommendationTag
Gaudi::Property< std::string > m_sInputFilePath
Gaudi::Property< bool > m_bApplyFading
Gaudi::Property< bool > m_bApplyInsituCorrection
Gaudi::Property< std::string > m_sCampaign
Gaudi::Property< bool > m_bSkipTruthMatchCheck

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ inputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore ( ) const
inherited

Accessor for the input metadata store.

Definition at line 93 of file AsgMetadataTool.cxx.

93 {
94
95#ifdef XAOD_STANDALONE
96 return &m_inputMetaStore;
97#else // XAOD_STANDALONE
98 return m_inputMetaStore;
99#endif // XAOD_STANDALONE
100 }
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.

◆ isAffectedBySystematic()

bool TauAnalysisTools::TauSmearingTool::isAffectedBySystematic ( const CP::SystematicVariation & systematic) const
virtual

returns: whether this tool is affected by the given systematis

Implements CP::ISystematicsTool.

Definition at line 133 of file TauSmearingTool.cxx.

134{
135 return m_tCommonSmearingTool->isAffectedBySystematic( systematic );
136}

◆ metaDataStop()

StatusCode asg::AsgMetadataTool::metaDataStop ( )
protectedvirtualinherited

Function called when the tool should write out its metadata.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperDumperTool, BookkeeperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 209 of file AsgMetadataTool.cxx.

209 {
210
211 // Return gracefully:
212 return StatusCode::SUCCESS;
213 }

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ outputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore ( ) const
inherited

Accessor for the output metadata store.

Definition at line 102 of file AsgMetadataTool.cxx.

102 {
103
104#ifdef XAOD_STANDALONE
105 return &m_outputMetaStore;
106#else // XAOD_STANDALONE
107 return m_outputMetaStore;
108#endif // XAOD_STANDALONE
109 }
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.

◆ print()

◆ recommendedSystematics()

CP::SystematicSet TauAnalysisTools::TauSmearingTool::recommendedSystematics ( ) const
virtual

returns: the list of all systematics this tool recommends to use

Implements CP::IReentrantSystematicsTool.

Definition at line 145 of file TauSmearingTool.cxx.

146{
147 return m_tCommonSmearingTool->recommendedSystematics();
148}

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setUseIncidents()

void asg::AsgMetadataTool::setUseIncidents ( const bool flag)
inlineprotectedinherited

Definition at line 132 of file AsgMetadataTool.h.

133 {
135 }
bool flag
Definition master.py:29

◆ sysInitialize()

StatusCode asg::AsgMetadataTool::sysInitialize ( )
virtualinherited

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.

Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.

Definition at line 115 of file AsgMetadataTool.cxx.

115 {
116
117#ifndef XAOD_STANDALONE
118 if (m_useIncidents) {
119 // Connect to the IncidentSvc:
120 ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
121 ATH_CHECK( incSvc.retrieve() );
122
123 // Set up the right callbacks: don't rethrow exceptions, any failure and we should end
124 incSvc->addListener( this, IncidentType::BeginEvent, 0, false );
125 }
126 // Let the base class do its thing:
127 ATH_CHECK( AlgTool::sysInitialize() );
128
129#endif // not XAOD_STANDALONE
130
131 // Return gracefully:
132 return StatusCode::SUCCESS;
133 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_bApplyFading

Gaudi::Property<bool> TauAnalysisTools::TauSmearingTool::m_bApplyFading {this, "ApplyFading", true}
private

Definition at line 74 of file TauSmearingTool.h.

74{this, "ApplyFading", true};

◆ m_bApplyInsituCorrection

Gaudi::Property<bool> TauAnalysisTools::TauSmearingTool::m_bApplyInsituCorrection {this, "ApplyInsituCorrection", true}
private

Definition at line 76 of file TauSmearingTool.h.

76{this, "ApplyInsituCorrection", true};

◆ m_beginInputFileCalled

bool asg::AsgMetadataTool::m_beginInputFileCalled
privateinherited

Flag helping to discover when the tool misses the opening of the first input file.

Definition at line 126 of file AsgMetadataTool.h.

◆ m_bMVATESQualityCheck

Gaudi::Property<bool> TauAnalysisTools::TauSmearingTool::m_bMVATESQualityCheck {this, "MVATESQualityCheck", true}
private

Definition at line 75 of file TauSmearingTool.h.

75{this, "MVATESQualityCheck", true};

◆ m_bSkipTruthMatchCheck

Gaudi::Property<bool> TauAnalysisTools::TauSmearingTool::m_bSkipTruthMatchCheck {this, "SkipTruthMatchCheck", false}
private

Definition at line 73 of file TauSmearingTool.h.

73{this, "SkipTruthMatchCheck", false};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_inputMetaStore

MetaStore_t asg::AsgMetadataTool::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 119 of file AsgMetadataTool.h.

◆ m_outputMetaStore

MetaStore_t asg::AsgMetadataTool::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 121 of file AsgMetadataTool.h.

◆ m_sCampaign

Gaudi::Property<std::string> TauAnalysisTools::TauSmearingTool::m_sCampaign {this, "Campaign", "mc21"}
private

Definition at line 71 of file TauSmearingTool.h.

71{this, "Campaign", "mc21"};

◆ m_sGenerator

Gaudi::Property<std::string> TauAnalysisTools::TauSmearingTool::m_sGenerator {this, "Generator", "PoPy"}
private

Definition at line 72 of file TauSmearingTool.h.

72{this, "Generator", "PoPy"};

◆ m_sInputFilePath

Gaudi::Property<std::string> TauAnalysisTools::TauSmearingTool::m_sInputFilePath {this, "InputFilePath", ""}
private

Definition at line 69 of file TauSmearingTool.h.

69{this, "InputFilePath", ""};

◆ m_sRecommendationTag

Gaudi::Property<std::string> TauAnalysisTools::TauSmearingTool::m_sRecommendationTag {this, "RecommendationTag", "2025-prerec"}
private

Definition at line 70 of file TauSmearingTool.h.

70{this, "RecommendationTag", "2025-prerec"};

◆ m_tCommonSmearingTool

asg::AnaToolHandle<ITauSmearingTool> TauAnalysisTools::TauSmearingTool::m_tCommonSmearingTool
private

Definition at line 67 of file TauSmearingTool.h.

◆ m_useFastSim

Gaudi::Property<bool> TauAnalysisTools::TauSmearingTool::m_useFastSim {this, "useFastSim", false}
private

Definition at line 77 of file TauSmearingTool.h.

77{this, "useFastSim", false};

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: