|
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 > &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...
|
|
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 59 of file CommonSmearingTool.cxx.
156 bool compatibility =
true;
158 if(accPtTauEnergyScale.isAvailable(xTau)) {
163 accTESCompatibility(xTau) =
char(compatibility);
176 if( xTau.nTracks() != 1 && xTau.nTracks() != 3) {
183 double dCorrection = 1.;
188 tmpCorrectionCode =
getValue(
"sf"+sProng,
193 return tmpCorrectionCode;
200 double dTotalSystematic2 = 0.;
201 double dDirection = 0.;
208 double dUncertaintySyst = 0.;
209 tmpCorrectionCode =
getValue(
it->second+sProng,
214 return tmpCorrectionCode;
217 dDirection = syst.parameter();
220 dUncertaintySyst *= dDirection;
223 dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
227 dDirection = (dDirection > 0.) ? 1. : -1.;
230 dCorrection *= 1 + dDirection * std::sqrt(dTotalSystematic2);
236 xTau.setP4( xTau.ptFinalCalib() * dCorrection,
237 xTau.eta(), xTau.phi(), xTau.m());
◆ applyCorrection() [3/3]
Apply the correction on a modifyable object.
Implements TauAnalysisTools::ITauSmearingTool.
Definition at line 148 of file CommonSmearingTool.cxx.
156 bool compatibility =
true;
158 if(accPtTauEnergyScale.isAvailable(xTau)) {
163 accTESCompatibility(xTau) =
char(compatibility);
183 double dCorrection = 1.;
188 tmpCorrectionCode =
getValue(
"sf"+sProng,
193 return tmpCorrectionCode;
200 double dTotalSystematic2 = 0.;
201 double dDirection = 0.;
208 double dUncertaintySyst = 0.;
209 tmpCorrectionCode =
getValue(
it->second+sProng,
214 return tmpCorrectionCode;
217 dDirection = syst.parameter();
220 dUncertaintySyst *= dDirection;
223 dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
227 dDirection = (dDirection > 0.) ? 1. : -1.;
230 dCorrection *= 1 + dDirection * std::sqrt(dTotalSystematic2);
237 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 305 of file CommonSmearingTool.cxx.
312 return StatusCode::SUCCESS;
316 double dDirection = 0.;
318 for (
auto& sSyst : sSystematicSet)
324 ATH_MSG_VERBOSE(
"unsupported systematic variation: "<< sSyst.basename()<<
"; skipping this one");
328 if (sSyst.parameter() * dDirection < 0)
330 ATH_MSG_ERROR(
"unsupported set of systematic variations, you should either use only \"UP\" or only \"DOWN\" systematics in one set!");
332 return StatusCode::FAILURE;
334 dDirection = sSyst.parameter();
338 ATH_MSG_ERROR(
"unsupported set of systematic variations, you should not combine \"TAUS_{TRUE|FAKE}_SME_TOTAL\" with other systematic variations!");
340 return StatusCode::FAILURE;
344 sSystematicSetAvailable.
insert(sSyst);
350 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 360 of file CommonSmearingTool.cxx.
363 return StatusCode::SUCCESS;
370 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, 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;
◆ 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 62 of file CommonSmearingTool.cxx.
254 "There's a possible memory leak!" );
259 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+
"_";
210 std::vector<std::string> vSplitNP = {};
211 split(mSF.first,
'_',vSplitNP);
212 std::string sNP = vSplitNP.at(0);
213 std::string sNPUppercase = vSplitNP.at(0);
216 if (sNP ==
"sf")
continue;
219 bool bIsRecommended =
false;
220 if (isupper(sNP.at(0)))
221 bIsRecommended =
true;
224 std::transform(sNPUppercase.begin(), sNPUppercase.end(), sNPUppercase.begin(), toupper);
225 std::string sSystematicString = sSystematicBaseString+sNPUppercase;
237 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 243 of file CommonDiTauSmearingTool.cxx.
247 TH3* hHist =
m_mDTSF.at(sHistName);
250 ATH_MSG_ERROR(
"Histogram with name "<<sHistName<<
" was not found in input file.");
254 double dX =
m_fX(xDiTau);
255 double dY =
m_fY(xDiTau);
256 double dZ =
m_fZ(xDiTau);
259 dX =
std::max(dX,hHist->GetXaxis()->GetXmin());
260 dY =
std::max(dY,hHist->GetYaxis()->GetXmin());
261 dZ =
std::max(dZ,hHist->GetZaxis()->GetXmin());
263 dX =
std::min(dX,hHist->GetXaxis()->GetXmax() * .999);
264 dY =
std::min(dY,hHist->GetYaxis()->GetXmax() * .999);
265 dZ =
std::min(dZ,hHist->GetZaxis()->GetXmax() * .999);
267 int iBin = hHist->FindFixBin(dX,dY,dZ);
268 dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
◆ getValue() [2/3]
Definition at line 95 of file CommonSmearingTool.cxx.
504 TH1* hHist =
m_mSF.at(sHistName);
505 if (hHist ==
nullptr)
507 ATH_MSG_ERROR(
"Histogram with name " << sHistName <<
" was not found in input file.");
511 double dPt =
m_fX(xTau);
515 dPt =
std::max(dPt,hHist->GetXaxis()->GetXmin());
518 dPt =
std::min(dPt,hHist->GetXaxis()->GetXmax() * .999);
521 int iBin = hHist->FindFixBin(dPt,
dEta);
522 dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
526 std::string sTitle = hHist->GetTitle();
529 TF1
f(
"",sTitle.c_str(), 0, 1000);
530 if (sHistName.find(
"sf_") != std::string::npos)
531 dEfficiencyScaleFactor = (dEfficiencyScaleFactor -1.) *
f.Eval(
m_fX(xTau)) + 1.;
533 dEfficiencyScaleFactor *=
f.Eval(
m_fX(xTau));
◆ getValue() [3/3]
|
protectedvirtualinherited |
Definition at line 500 of file CommonSmearingTool.cxx.
504 TH1* hHist =
m_mSF.at(sHistName);
505 if (hHist ==
nullptr)
507 ATH_MSG_ERROR(
"Histogram with name " << sHistName <<
" was not found in input file.");
511 double dPt =
m_fX(xTau);
515 dPt =
std::max(dPt,hHist->GetXaxis()->GetXmin());
518 dPt =
std::min(dPt,hHist->GetXaxis()->GetXmax() * .999);
521 int iBin = hHist->FindFixBin(dPt,
dEta);
522 dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
526 std::string sTitle = hHist->GetTitle();
529 TF1
f(
"",sTitle.c_str(), 0, 1000);
530 if (sHistName.find(
"sf_") != std::string::npos)
531 dEfficiencyScaleFactor = (dEfficiencyScaleFactor -1.) *
f.Eval(
m_fX(xTau)) + 1.;
533 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 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 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 88 of file AsgMetadataTool.cxx.
90 #ifdef XAOD_STANDALONE
92 #else // XAOD_STANDALONE
94 #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 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.
◆ 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 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_bApplyFading
bool TauAnalysisTools::CommonSmearingTool::m_bApplyFading |
|
protectedinherited |
◆ m_bApplyInsituCorrection
bool TauAnalysisTools::CommonSmearingTool::m_bApplyInsituCorrection |
|
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
bool TauAnalysisTools::CommonSmearingTool::m_bMVATESQualityCheck |
|
protectedinherited |
◆ m_bSkipTruthMatchCheck
bool TauAnalysisTools::CommonSmearingTool::m_bSkipTruthMatchCheck |
|
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
std::string TauAnalysisTools::CommonSmearingTool::m_sInputFilePath |
|
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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
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.
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
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.