|
ATLAS Offline Software
|
#include <DiTauEfficiencyCorrectionsTool.h>
|
| DiTauEfficiencyCorrectionsTool (const std::string &sName) |
| Create a proper constructor for Athena. More...
|
|
| ~DiTauEfficiencyCorrectionsTool () |
|
virtual StatusCode | initialize () |
| Function initialising the tool. More...
|
|
virtual void | printConfig () const |
| Print tool configuration. More...
|
|
virtual CP::CorrectionCode | getEfficiencyScaleFactor (const xAOD::DiTauJet &xDiTau, double &eff, unsigned int iRunNumber=0, unsigned int iMu=0) |
| Get the ditau Efficiency Scale Factor as a return value. More...
|
|
virtual CP::CorrectionCode | applyEfficiencyScaleFactor (const xAOD::DiTauJet &xDiTau, unsigned int iRunNumber=0, unsigned int iMu=0) |
| decorate the ditau jet with eff scale factor More...
|
|
virtual bool | isAffectedBySystematic (const CP::SystematicVariation &systematic) const |
| returns whether this tool is affected by the given systematic More...
|
|
virtual CP::SystematicSet | affectingSystematics () const |
| returns: the list of all systematics this tool can be affected by More...
|
|
virtual CP::SystematicSet | recommendedSystematics () const |
| returns: the list of all systematics this tool recommends to use More...
|
|
virtual StatusCode | applySystematicVariation (const CP::SystematicSet &systConfig) |
| apply systematic variations More...
|
|
virtual bool | isSupportedRunNumber (int) const |
| check if run number is supperted in recommendations More...
|
|
virtual void | print () const =0 |
| Print the state of the tool. More...
|
|
virtual StatusCode | sysInitialize () |
| Function initialising the tool in the correct way in Athena. More...
|
|
virtual void | print () const |
| Print the state of the tool. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
◆ MetaStore_t
◆ MetaStorePtr_t
Type of the metadata store pointer in standalone mode.
Definition at line 68 of file AsgMetadataTool.h.
◆ StoreGateSvc_t
◆ DiTauEfficiencyCorrectionsTool()
TauAnalysisTools::DiTauEfficiencyCorrectionsTool::DiTauEfficiencyCorrectionsTool |
( |
const std::string & |
sName | ) |
|
◆ ~DiTauEfficiencyCorrectionsTool()
TauAnalysisTools::DiTauEfficiencyCorrectionsTool::~DiTauEfficiencyCorrectionsTool |
( |
| ) |
|
◆ affectingSystematics()
CP::SystematicSet TauAnalysisTools::DiTauEfficiencyCorrectionsTool::affectingSystematics |
( |
| ) |
const |
|
virtual |
◆ applyEfficiencyScaleFactor()
◆ applySystematicVariation()
StatusCode TauAnalysisTools::DiTauEfficiencyCorrectionsTool::applySystematicVariation |
( |
const CP::SystematicSet & |
systConfig | ) |
|
|
virtual |
◆ beginEvent()
StatusCode TauAnalysisTools::DiTauEfficiencyCorrectionsTool::beginEvent |
( |
| ) |
|
|
privatevirtual |
◆ beginInputFile()
StatusCode asg::AsgMetadataTool::beginInputFile |
( |
| ) |
|
|
protectedvirtualinherited |
Function called when a new input file is opened.
Dummy implementation that can be overridden by the derived tool.
Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, PMGTools::PMGTruthWeightTool, BookkeeperTool, xAODMaker::FileMetaDataTool, BookkeeperDumperTool, Trig::TrigDecisionTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, Trig::xAODBunchCrossingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, and TauAnalysisTools::TauSmearingTool.
Definition at line 180 of file AsgMetadataTool.cxx.
183 return StatusCode::SUCCESS;
◆ ConvertJetIDToString()
std::string TauAnalysisTools::DiTauEfficiencyCorrectionsTool::ConvertJetIDToString |
( |
const int |
iLevel | ) |
const |
|
private |
Definition at line 229 of file DiTauEfficiencyCorrectionsTool.cxx.
234 return "ditaureconstruction";
237 return "jetbdtsigveryloose";
240 return "jetbdtsigloose";
243 return "jetbdtsigmedium";
246 return "jetbdtsigtight";
249 assert(
false &&
"No valid ID level passed. Breaking up ...");
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ endInputFile()
StatusCode asg::AsgMetadataTool::endInputFile |
( |
| ) |
|
|
protectedvirtualinherited |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ getEfficiencyScaleFactor()
CP::CorrectionCode TauAnalysisTools::DiTauEfficiencyCorrectionsTool::getEfficiencyScaleFactor |
( |
const xAOD::DiTauJet & |
xDiTau, |
|
|
double & |
eff, |
|
|
unsigned int |
iRunNumber = 0 , |
|
|
unsigned int |
iMu = 0 |
|
) |
| |
|
virtual |
◆ getKey()
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
-
ptr | The 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.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ 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
-
ptr | The 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.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ 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 130 of file AsgMetadataTool.cxx.
136 if( inc.type() == IncidentType::BeginInputFile ) {
140 throw std::runtime_error(
"Couldn't call beginInputFile()" );
142 }
else if( inc.type() == IncidentType::EndInputFile ) {
145 throw std::runtime_error(
"Couldn't call endInputFile()" );
147 }
else if( inc.type() == IncidentType::BeginEvent ) {
155 throw std::runtime_error(
"Couldn't call beginInputFile()" );
160 throw std::runtime_error(
"Couldn't call beginEvent()" );
163 #ifdef XAOD_STANDALONE
164 }
else if( inc.type() == IncidentType::MetaDataStop ) {
167 throw std::runtime_error(
"Couldn't call metaDataStop()" );
170 #endif // XAOD_STANDALONE
172 ATH_MSG_WARNING(
"Unknown incident type received in AsgMetaDataTool: " << inc.type() );
◆ initialize()
StatusCode TauAnalysisTools::DiTauEfficiencyCorrectionsTool::initialize |
( |
| ) |
|
|
virtual |
Function initialising the tool.
Reimplemented from asg::AsgTool.
Definition at line 49 of file DiTauEfficiencyCorrectionsTool.cxx.
52 ATH_MSG_INFO(
"Initializing DiTauEfficiencyCorrectionsTool" );
55 ATH_MSG_WARNING(
"Truth match check will be skipped. This is ONLY FOR TESTING PURPOSE!");
67 return StatusCode::FAILURE;
72 ATH_CHECK((**it).setProperty(
"OutputLevel", this->msg().level()));
78 if (!
registry.registerSystematics(*
this))
81 return StatusCode::FAILURE;
86 return StatusCode::SUCCESS;
◆ initializeTools_2017_moriond()
StatusCode TauAnalysisTools::DiTauEfficiencyCorrectionsTool::initializeTools_2017_moriond |
( |
| ) |
|
|
private |
Initialize Moriond 2017 recommendations.
Definition at line 201 of file DiTauEfficiencyCorrectionsTool.cxx.
203 std::string sDirectory =
"TauAnalysisTools/" + std::string(sSharedFilesVersion) +
"/EfficiencyCorrections/";
222 ATH_MSG_WARNING(
"unsupported EfficiencyCorrectionsType with enum " << iEfficiencyCorrectionType);
225 return StatusCode::SUCCESS;
◆ inputHandles()
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 88 of file AsgMetadataTool.cxx.
90 #ifdef XAOD_STANDALONE
92 #else // XAOD_STANDALONE
94 #endif // XAOD_STANDALONE
◆ isAffectedBySystematic()
returns whether this tool is affected by the given systematic
returns: whether this tool is affected by the given systematis
- Parameters
-
- Returns
- true
-
false
Implements CP::ISystematicsTool.
Definition at line 157 of file DiTauEfficiencyCorrectionsTool.cxx.
160 if ((**it)->isAffectedBySystematic(systematic))
◆ isSupportedRunNumber()
virtual bool TauAnalysisTools::DiTauEfficiencyCorrectionsTool::isSupportedRunNumber |
( |
int |
| ) |
const |
|
inlinevirtual |
check if run number is supperted in recommendations
- Parameters
-
- Returns
- true if ditau recommendations support this run
- Note
- currently no implementaion exists, alwasys returns true
Definition at line 98 of file DiTauEfficiencyCorrectionsTool.h.
◆ metaDataStop()
StatusCode asg::AsgMetadataTool::metaDataStop |
( |
| ) |
|
|
protectedvirtualinherited |
◆ msg() [1/2]
◆ msg() [2/2]
◆ 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.
◆ msgLvl()
◆ outputHandles()
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 97 of file AsgMetadataTool.cxx.
99 #ifdef XAOD_STANDALONE
101 #else // XAOD_STANDALONE
103 #endif // XAOD_STANDALONE
◆ print() [1/2]
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ print() [2/2]
virtual void asg::IAsgTool::print |
( |
| ) |
const |
|
pure virtualinherited |
Print the state of the tool.
Implemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ printConfig()
void TauAnalysisTools::DiTauEfficiencyCorrectionsTool::printConfig |
( |
| ) |
const |
|
virtual |
◆ recommendedSystematics()
CP::SystematicSet TauAnalysisTools::DiTauEfficiencyCorrectionsTool::recommendedSystematics |
( |
| ) |
const |
|
virtual |
◆ renounce()
◆ renounceArray()
◆ setUseIncidents()
void asg::AsgMetadataTool::setUseIncidents |
( |
const bool |
flag | ) |
|
|
inlineprotectedinherited |
◆ 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 110 of file AsgMetadataTool.cxx.
112 #ifndef XAOD_STANDALONE
119 incSvc->addListener(
this, IncidentType::BeginEvent, 0,
false );
124 #endif // not XAOD_STANDALONE
127 return StatusCode::SUCCESS;
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ 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_bIsConfigured
bool TauAnalysisTools::DiTauEfficiencyCorrectionsTool::m_bIsConfigured |
|
private |
◆ m_bIsData
bool TauAnalysisTools::DiTauEfficiencyCorrectionsTool::m_bIsData |
|
private |
◆ m_bSkipTruthMatchCheck
bool TauAnalysisTools::DiTauEfficiencyCorrectionsTool::m_bSkipTruthMatchCheck |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_iJetIDLevel
int TauAnalysisTools::DiTauEfficiencyCorrectionsTool::m_iJetIDLevel |
|
private |
◆ m_inputMetaStore
◆ m_outputMetaStore
◆ m_sInputFilePathJetIDHadTau
std::string TauAnalysisTools::DiTauEfficiencyCorrectionsTool::m_sInputFilePathJetIDHadTau |
|
private |
◆ m_sRecommendationTag
std::string TauAnalysisTools::DiTauEfficiencyCorrectionsTool::m_sRecommendationTag |
|
private |
◆ m_sVarNameJetIDHadTau
std::string TauAnalysisTools::DiTauEfficiencyCorrectionsTool::m_sVarNameJetIDHadTau |
|
private |
◆ m_useIncidents
bool asg::AsgMetadataTool::m_useIncidents |
|
privateinherited |
◆ m_varHandleArraysDeclared
◆ m_vCommonEfficiencyTools
◆ m_vEfficiencyCorrectionTypes
std::vector<int> TauAnalysisTools::DiTauEfficiencyCorrectionsTool::m_vEfficiencyCorrectionTypes |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Class to wrap a set of SystematicVariations.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
@ IS_SIMULATION
true: simulation, false: data
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set
Class describing the basic event information.
@ Ok
The correction was done successfully.
#define ATH_MSG_WARNING(x)
This module implements the central registry for handling systematic uncertainties with CP tools.
Return value from object correction CP tools.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
bool eventType(EventType type) const
Check for one particular bitmask value.
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.