 |
ATLAS Offline Software
|
#include <CommonDiTauSmearingTool.h>
|
| CommonDiTauSmearingTool (const std::string &sName) |
| Create a proper constructor for Athena. More...
|
|
virtual StatusCode | initialize () override |
| Dummy implementation of the initialisation function. More...
|
|
virtual CP::CorrectionCode | applyCorrection (xAOD::DiTauJet &xDiTau) override |
| Declare the interface that the class provides. More...
|
|
virtual CP::CorrectionCode | correctedCopy (const xAOD::DiTauJet &xDiTau, xAOD::DiTauJet *&xDiTauCopy) override |
| Create a corrected copy from a constant ditau. More...
|
|
virtual CP::CorrectionCode | applyCorrection (xAOD::TauJet &xTau) const |
| Apply the correction on a modifiable object. More...
|
|
virtual CP::CorrectionCode | correctedCopy (const xAOD::TauJet &xTau, xAOD::TauJet *&xTauCopy) const |
| Create a corrected copy from a constant ditau. More...
|
|
virtual CP::CorrectionCode | applyCorrection (xAOD::TauJet &xTau) const |
| Apply the correction on a modifyable object. More...
|
|
virtual CP::CorrectionCode | correctedCopy (const xAOD::TauJet &xTau, xAOD::TauJet *&xTauCopy) const |
| Create a corrected copy from a constant tau. More...
|
|
virtual bool | isAffectedBySystematic (const CP::SystematicVariation &systematic) const |
| returns: whether this tool is affected by the given systematics 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 &sSystematicSet) |
| configure this tool for the given list of systematic variations. More...
|
|
virtual void | print () const =0 |
| Print the state of the tool. More...
|
|
virtual void | print () const |
| Print the state of the tool. More...
|
|
virtual StatusCode | sysInitialize () |
| Function initialising the tool in the correct way in Athena. 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, V, H > &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 |
|
|
template<class T > |
void | ReadInputs (TFile *fFile, std::map< std::string, T > &mMap) |
|
virtual CP::CorrectionCode | getValue (const std::string &sHistName, const xAOD::DiTauJet &xDiTau, double &dCorrectionFactor) const |
|
void | generateSystematicSets () |
|
virtual CP::CorrectionCode | getValue (const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const |
|
std::string | ConvertProngToString (const int iProngness) const |
|
virtual CP::CorrectionCode | getValue (const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const |
|
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution More...
|
|
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. More...
|
|
|
std::map< std::string, TH3 * > | m_mDTSF |
|
double(* | m_fX )(const xAOD::DiTauJet &xDiTau) |
|
double(* | m_fY )(const xAOD::DiTauJet &xDiTau) |
|
double(* | m_fZ )(const xAOD::DiTauJet &xDiTau) |
|
std::map< std::string, TH1 * > | m_mSF |
|
std::unordered_map< CP::SystematicSet, std::string > | m_mSystematicSets |
|
const CP::SystematicSet * | m_sSystematicSet |
|
std::map< std::string, int > | m_mSystematics |
|
std::map< std::string, std::string > | m_mSystematicsHistNames |
|
Gaudi::Property< std::string > | m_sInputFilePath {this, "InputFilePath", ""} |
|
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} |
|
bool | m_bIsData |
|
bool | m_bIsConfigured |
|
asg::AnaToolHandle< ITauToolBase > | m_tTauCombinedTES |
|
TruthMatchedParticleType | m_eCheckTruth |
|
CP::SystematicSet | m_sAffectingSystematics |
|
CP::SystematicSet | m_sRecommendedSystematics |
|
|
virtual StatusCode | beginEvent () |
| Function called when a new events is loaded. More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 34 of file CommonDiTauSmearingTool.h.
◆ MetaStore_t
◆ MetaStorePtr_t
Type of the metadata store pointer in standalone mode.
Definition at line 68 of file AsgMetadataTool.h.
◆ StoreGateSvc_t
◆ CommonDiTauSmearingTool()
CommonDiTauSmearingTool::CommonDiTauSmearingTool |
( |
const std::string & |
sName | ) |
|
◆ affectingSystematics()
◆ applyCorrection() [1/3]
Declare the interface that the class provides.
Apply the correction on a modifiable object
Implements TauAnalysisTools::IDiTauSmearingTool.
Definition at line 68 of file CommonDiTauSmearingTool.cxx.
80 double dCorrection = 1.;
87 return tmpCorrectionCode;
93 double dTotalSystematic2 = 0;
94 double dDirection = 0;
101 double dUncertaintySyst = 0;
108 return tmpCorrectionCode;
111 dDirection = syst.parameter();
114 dUncertaintySyst *= dDirection;
117 dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
121 dDirection = (dDirection > 0) ? +1 : -1;
124 dCorrection *= 1 + dDirection * std::sqrt(dTotalSystematic2);
128 xDiTau.
setP4( xDiTau.
pt() * dCorrection,
129 xDiTau.
eta(), xDiTau.
phi(), xDiTau.
m());
◆ applyCorrection() [2/3]
Apply the correction on a modifiable object.
Definition at line 60 of file CommonSmearingTool.cxx.
151 bool compatibility =
true;
153 if(accPtTauEnergyScale.isAvailable(xTau)) {
158 accTESCompatibility(xTau) =
char(compatibility);
171 if( xTau.nTracks() != 1 && xTau.nTracks() != 3) {
178 double dCorrection = 1.;
183 tmpCorrectionCode =
getValue(
"sf"+sProng,
188 return tmpCorrectionCode;
195 double dTotalSystematic2 = 0.;
196 double dDirection = 0.;
203 double dUncertaintySyst = 0.;
204 tmpCorrectionCode =
getValue(
it->second+sProng,
209 return tmpCorrectionCode;
212 dDirection = syst.parameter();
215 dUncertaintySyst *= dDirection;
218 dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
222 dDirection = (dDirection > 0.) ? 1. : -1.;
225 dCorrection *= 1 + dDirection * std::sqrt(dTotalSystematic2);
231 xTau.setP4( xTau.ptFinalCalib() * dCorrection,
232 xTau.eta(), xTau.phi(), xTau.m());
◆ applyCorrection() [3/3]
Apply the correction on a modifyable object.
Implements TauAnalysisTools::ITauSmearingTool.
Definition at line 143 of file CommonSmearingTool.cxx.
151 bool compatibility =
true;
153 if(accPtTauEnergyScale.isAvailable(xTau)) {
158 accTESCompatibility(xTau) =
char(compatibility);
178 double dCorrection = 1.;
183 tmpCorrectionCode =
getValue(
"sf"+sProng,
188 return tmpCorrectionCode;
195 double dTotalSystematic2 = 0.;
196 double dDirection = 0.;
203 double dUncertaintySyst = 0.;
204 tmpCorrectionCode =
getValue(
it->second+sProng,
209 return tmpCorrectionCode;
212 dDirection = syst.parameter();
215 dUncertaintySyst *= dDirection;
218 dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
222 dDirection = (dDirection > 0.) ? 1. : -1.;
225 dCorrection *= 1 + dDirection * std::sqrt(dTotalSystematic2);
232 xTau.
eta(), xTau.
phi(), xTau.
m());
◆ applySystematicVariation()
configure this tool for the given list of systematic variations.
any requested systematics that are not affecting this tool will be silently ignored
Implements CP::ISystematicsTool.
Definition at line 300 of file CommonSmearingTool.cxx.
307 return StatusCode::SUCCESS;
311 double dDirection = 0.;
313 for (
auto& sSyst : sSystematicSet)
319 ATH_MSG_VERBOSE(
"unsupported systematic variation: "<< sSyst.basename()<<
"; skipping this one");
323 if (sSyst.parameter() * dDirection < 0)
325 ATH_MSG_ERROR(
"unsupported set of systematic variations, you should either use only \"UP\" or only \"DOWN\" systematics in one set!");
327 return StatusCode::FAILURE;
329 dDirection = sSyst.parameter();
333 ATH_MSG_ERROR(
"unsupported set of systematic variations, you should not combine \"TAUS_{TRUE|FAKE}_SME_TOTAL\" with other systematic variations!");
335 return StatusCode::FAILURE;
339 sSystematicSetAvailable.
insert(sSyst);
345 return StatusCode::SUCCESS;
◆ beginEvent()
StatusCode CommonSmearingTool::beginEvent |
( |
| ) |
|
|
privatevirtualinherited |
Function called when a new events is loaded.
Dummy implementation that can be overridden by the derived tool.
Reimplemented from asg::AsgMetadataTool.
Definition at line 355 of file CommonSmearingTool.cxx.
358 return StatusCode::SUCCESS;
365 return StatusCode::SUCCESS;
◆ 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, BookkeeperDumperTool, Trig::TrigDecisionTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, Trig::xAODBunchCrossingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, and TauAnalysisTools::TauSmearingTool.
Definition at line 185 of file AsgMetadataTool.cxx.
188 return StatusCode::SUCCESS;
◆ ConvertProngToString()
std::string CommonSmearingTool::ConvertProngToString |
( |
const int |
iProngness | ) |
const |
|
protectedinherited |
◆ correctedCopy() [1/3]
◆ correctedCopy() [2/3]
Create a corrected copy from a constant ditau.
Definition at line 63 of file CommonSmearingTool.cxx.
249 "There's a possible memory leak!" );
254 xTauCopy->makePrivateStore( xTau );
◆ correctedCopy() [3/3]
◆ 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
◆ generateSystematicSets()
void CommonDiTauSmearingTool::generateSystematicSets |
( |
| ) |
|
|
protected |
Definition at line 185 of file CommonDiTauSmearingTool.cxx.
187 std::vector<std::string> vInputFilePath;
189 std::string sInputFileName = vInputFilePath.back();
192 std::vector<std::string> vSplitInputFilePath = {};
193 split(sInputFileName,
'_',vSplitInputFilePath);
194 std::string sEfficiencyType = vSplitInputFilePath.at(0);
195 std::string sTruthType = vSplitInputFilePath.at(1);
196 std::transform(sEfficiencyType.begin(), sEfficiencyType.end(), sEfficiencyType.begin(), toupper);
197 std::transform(sTruthType.begin(), sTruthType.end(), sTruthType.begin(), toupper);
198 std::string sSystematicBaseString =
"TAUS_"+sTruthType+
"_SME_"+sEfficiencyType+
"_";
207 std::vector<std::string> vSplitNP = {};
208 split(mSF.first,
'_',vSplitNP);
209 std::string sNP = vSplitNP.at(0);
210 std::string sNPUppercase = vSplitNP.at(0);
213 if (sNP ==
"sf")
continue;
216 bool bIsRecommended =
false;
217 if (isupper(sNP.at(0)))
218 bIsRecommended =
true;
221 std::transform(sNPUppercase.begin(), sNPUppercase.end(), sNPUppercase.begin(), toupper);
222 std::string sSystematicString = sSystematicBaseString+sNPUppercase;
234 ATH_MSG_DEBUG(
"connected histogram base name " << sNP <<
" with systematic " <<sSystematicString);
◆ 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.
◆ getValue() [1/3]
Definition at line 240 of file CommonDiTauSmearingTool.cxx.
244 TH3* hHist =
m_mDTSF.at(sHistName);
247 ATH_MSG_ERROR(
"Histogram with name "<<sHistName<<
" was not found in input file.");
251 double dX =
m_fX(xDiTau);
252 double dY =
m_fY(xDiTau);
253 double dZ =
m_fZ(xDiTau);
256 dX =
std::max(dX,hHist->GetXaxis()->GetXmin());
257 dY =
std::max(dY,hHist->GetYaxis()->GetXmin());
258 dZ =
std::max(dZ,hHist->GetZaxis()->GetXmin());
260 dX =
std::min(dX,hHist->GetXaxis()->GetXmax() * .999);
261 dY =
std::min(dY,hHist->GetYaxis()->GetXmax() * .999);
262 dZ =
std::min(dZ,hHist->GetZaxis()->GetXmax() * .999);
264 int iBin = hHist->FindFixBin(dX,dY,dZ);
265 dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
◆ getValue() [2/3]
Definition at line 96 of file CommonSmearingTool.cxx.
497 TH1* hHist =
m_mSF.at(sHistName);
498 if (hHist ==
nullptr)
500 ATH_MSG_ERROR(
"Histogram with name " << sHistName <<
" was not found in input file.");
504 double dPt =
m_fX(xTau);
508 dPt =
std::max(dPt,hHist->GetXaxis()->GetXmin());
511 dPt =
std::min(dPt,hHist->GetXaxis()->GetXmax() * .999);
514 int iBin = hHist->FindFixBin(dPt,
dEta);
515 dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
519 std::string sTitle = hHist->GetTitle();
522 TF1
f(
"",sTitle.c_str(), 0, 1000);
523 if (sHistName.find(
"sf_") != std::string::npos)
524 dEfficiencyScaleFactor = (dEfficiencyScaleFactor -1.) *
f.Eval(
m_fX(xTau)) + 1.;
526 dEfficiencyScaleFactor *=
f.Eval(
m_fX(xTau));
◆ getValue() [3/3]
|
protectedvirtualinherited |
Definition at line 493 of file CommonSmearingTool.cxx.
497 TH1* hHist =
m_mSF.at(sHistName);
498 if (hHist ==
nullptr)
500 ATH_MSG_ERROR(
"Histogram with name " << sHistName <<
" was not found in input file.");
504 double dPt =
m_fX(xTau);
508 dPt =
std::max(dPt,hHist->GetXaxis()->GetXmin());
511 dPt =
std::min(dPt,hHist->GetXaxis()->GetXmax() * .999);
514 int iBin = hHist->FindFixBin(dPt,
dEta);
515 dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
519 std::string sTitle = hHist->GetTitle();
522 TF1
f(
"",sTitle.c_str(), 0, 1000);
523 if (sHistName.find(
"sf_") != std::string::npos)
524 dEfficiencyScaleFactor = (dEfficiencyScaleFactor -1.) *
f.Eval(
m_fX(xTau)) + 1.;
526 dEfficiencyScaleFactor *=
f.Eval(
m_fX(xTau));
◆ 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.
141 if( inc.type() == IncidentType::BeginInputFile ) {
145 throw std::runtime_error(
"Couldn't call beginInputFile()" );
147 }
else if( inc.type() == IncidentType::EndInputFile ) {
150 throw std::runtime_error(
"Couldn't call endInputFile()" );
152 }
else if( inc.type() == IncidentType::BeginEvent ) {
160 throw std::runtime_error(
"Couldn't call beginInputFile()" );
165 throw std::runtime_error(
"Couldn't call beginEvent()" );
168 #ifdef XAOD_STANDALONE
169 }
else if( inc.type() == IncidentType::MetaDataStop ) {
172 throw std::runtime_error(
"Couldn't call metaDataStop()" );
175 #endif // XAOD_STANDALONE
177 ATH_MSG_WARNING(
"Unknown incident type received in AsgMetaDataTool: " << inc.type() );
◆ initialize()
StatusCode CommonDiTauSmearingTool::initialize |
( |
| ) |
|
|
overridevirtual |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
Reimplemented from TauAnalysisTools::CommonSmearingTool.
Definition at line 35 of file CommonDiTauSmearingTool.cxx.
43 std::unique_ptr< TFile > fSF( TFile::Open(sInputFilePath.c_str(),
"READ") );
46 ATH_MSG_FATAL(
"Could not open file " << sInputFilePath.c_str());
47 return StatusCode::FAILURE;
57 return StatusCode::FAILURE;
59 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 93 of file AsgMetadataTool.cxx.
95 #ifdef XAOD_STANDALONE
97 #else // XAOD_STANDALONE
99 #endif // XAOD_STANDALONE
◆ isAffectedBySystematic()
◆ 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 102 of file AsgMetadataTool.cxx.
104 #ifdef XAOD_STANDALONE
106 #else // XAOD_STANDALONE
108 #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, LundVariablesTool, 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, LundVariablesTool, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ ReadInputs()
template<class T >
void CommonDiTauSmearingTool::ReadInputs |
( |
TFile * |
fFile, |
|
|
std::map< std::string, T > & |
mMap |
|
) |
| |
|
protected |
Definition at line 160 of file CommonDiTauSmearingTool.cxx.
168 TIter itNext(fFile->GetListOfKeys());
169 while ((kKey = (TKey*)itNext()))
171 TClass *cClass = gROOT->GetClass(kKey->GetClassName());
172 std::string sKeyName = kKey->GetName();
174 if (!cClass->InheritsFrom(
"TH3"))
177 T tObj = (
T)kKey->ReadObj();
178 tObj->SetDirectory(0);
179 mMap[sKeyName] = tObj;
◆ recommendedSystematics()
◆ 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 115 of file AsgMetadataTool.cxx.
117 #ifndef XAOD_STANDALONE
124 incSvc->addListener(
this, IncidentType::BeginEvent, 0,
false );
129 #endif // not XAOD_STANDALONE
132 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_bApplyFading
Gaudi::Property<bool> TauAnalysisTools::CommonSmearingTool::m_bApplyFading {this, "ApplyFading", true} |
|
protectedinherited |
◆ m_bApplyInsituCorrection
Gaudi::Property<bool> TauAnalysisTools::CommonSmearingTool::m_bApplyInsituCorrection {this, "ApplyInsituCorrection", true} |
|
protectedinherited |
◆ 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::CommonSmearingTool::m_bIsConfigured |
|
protectedinherited |
◆ m_bIsData
bool TauAnalysisTools::CommonSmearingTool::m_bIsData |
|
protectedinherited |
◆ m_bMVATESQualityCheck
Gaudi::Property<bool> TauAnalysisTools::CommonSmearingTool::m_bMVATESQualityCheck {this, "MVATESQualityCheck", true} |
|
protectedinherited |
◆ m_bSkipTruthMatchCheck
Gaudi::Property<bool> TauAnalysisTools::CommonSmearingTool::m_bSkipTruthMatchCheck {this, "SkipTruthMatchCheck", false} |
|
protectedinherited |
◆ m_detStore
◆ m_eCheckTruth
◆ m_evtStore
◆ m_fX
◆ m_fY
◆ m_fZ
◆ m_inputMetaStore
◆ m_mDTSF
std::map<std::string, TH3*> TauAnalysisTools::CommonDiTauSmearingTool::m_mDTSF |
|
protected |
◆ m_mSF
std::map<std::string, TH1*> TauAnalysisTools::CommonSmearingTool::m_mSF |
|
protectedinherited |
◆ m_mSystematics
std::map<std::string, int> TauAnalysisTools::CommonSmearingTool::m_mSystematics |
|
protectedinherited |
◆ m_mSystematicSets
std::unordered_map< CP::SystematicSet, std::string > TauAnalysisTools::CommonSmearingTool::m_mSystematicSets |
|
protectedinherited |
◆ m_mSystematicsHistNames
std::map<std::string, std::string> TauAnalysisTools::CommonSmearingTool::m_mSystematicsHistNames |
|
protectedinherited |
◆ m_outputMetaStore
◆ m_sAffectingSystematics
◆ m_sInputFilePath
Gaudi::Property<std::string> TauAnalysisTools::CommonSmearingTool::m_sInputFilePath {this, "InputFilePath", ""} |
|
protectedinherited |
◆ m_sRecommendedSystematics
◆ m_sSystematicSet
◆ m_tTauCombinedTES
◆ m_useIncidents
bool asg::AsgMetadataTool::m_useIncidents |
|
privateinherited |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
virtual double m() const
The invariant mass of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
bool getTESCompatibility(const xAOD::TauJet &tau) const
Check if MVA TES and CaloTES are compatible, invoked by TauSmearing tool.
virtual double eta() const
The pseudorapidity ( ) of the particle.
size_t size() const
returns: size of the set
DiTauJet_v1 DiTauJet
Definition of the current version.
bool empty() const
returns: whether the set is empty
virtual double m() const
The invariant mass of the particle.
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Class to wrap a set of SystematicVariations.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual double eta() const
The pseudorapidity ( ) of the particle.
#define ATH_MSG_VERBOSE(x)
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
@ IS_SIMULATION
true: simulation, false: data
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual double phi() const
The azimuthal angle ( ) of the particle.
@ Error
Some error happened during the object correction.
virtual double phi() const
The azimuthal angle ( ) of the particle.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
const_iterator end() const
description: const iterator to the end of the set
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)
TauJet_v3 TauJet
Definition of the current "tau version".
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
void makePrivateStore()
Create a new (empty) private store for this object.
Class describing the basic event information.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
iterator find(const SystematicVariation &sys) const
description: find an element in the set
@ Ok
The correction was done successfully.
#define ATH_MSG_WARNING(x)
Return value from object correction CP tools.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
double ptFinalCalib() const
bool eventType(EventType type) const
Check for one particular bitmask value.