![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <AsgElectronEfficiencyCorrectionTool.h>
|
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 |
|
|
virtual ASG_TOOL_CLASS(AsgElectronEfficiencyCorrectionTool, IAsgElectronEfficiencyCorrectionTool) public | ~AsgElectronEfficiencyCorrectionTool () override final |
| Standard destructor. More...
|
|
virtual StatusCode | initialize () override final |
| Gaudi Service Interface method implementations. More...
|
|
virtual StatusCode | beginInputFile () override final |
| Function called when a new input file is opened. More...
|
|
virtual StatusCode | beginEvent () override final |
| Function called when a new events is loaded. More...
|
|
virtual CP::SystematicSet | affectingSystematics () const override final |
| returns: the list of all systematics this tool can be affected by More...
|
|
virtual CP::SystematicSet | recommendedSystematics () const override final |
| returns: the list of all systematics this tool recommends to use More...
|
|
virtual bool | isAffectedBySystematic (const CP::SystematicVariation &systematic) const override final |
| returns: whether this tool is affected by the given systematis More...
|
|
virtual StatusCode | applySystematicVariation (const CP::SystematicSet &systConfig) override final |
| Configure this tool for the given systematics. More...
|
|
virtual CP::CorrectionCode | getEfficiencyScaleFactor (const xAOD::Electron &inputObject, double &efficiencyScaleFactor) const override final |
|
virtual CP::CorrectionCode | getEfficiencyScaleFactor (const double et, const double cluster_eta, const unsigned int runNumber, double &efficiencyScaleFactor) const override final |
|
virtual CP::CorrectionCode | applyEfficiencyScaleFactor (const xAOD::Electron &inputObject) const override final |
|
virtual int | getNumberOfToys () const override final |
|
virtual void | printCorrelationModels () const override final |
| print available/implemented correlation models More...
|
|
virtual const CP::SystematicSet & | appliedSystematics () const override final |
| returns: the currently applied systematics More...
|
|
virtual int | systUncorrVariationIndex (const xAOD::Electron &inputObject) const override final |
|
StatusCode | registerSystematics () |
|
int | currentSimplifiedUncorrSystRegion (const double cluster_eta, const double et) const |
|
int | currentUncorrSystRegion (const double cluster_eta, const double et) const |
|
StatusCode | InitSystematics () |
| initialize the systematics More...
|
|
virtual StatusCode | getFile (const std::string &recokey, const std::string &idkey, const std::string &isokey, const std::string &trigkey) |
| Gets the correction filename from map. More...
|
|
StatusCode | get_simType_from_metadata (PATCore::ParticleDataType::DataType &result) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
◆ MetaStore_t
◆ MetaStorePtr_t
Type of the metadata store pointer in standalone mode.
Definition at line 68 of file AsgMetadataTool.h.
◆ StoreGateSvc_t
◆ ~AsgElectronEfficiencyCorrectionTool()
AsgElectronEfficiencyCorrectionTool::~AsgElectronEfficiencyCorrectionTool |
( |
| ) |
|
|
finaloverrideprivatevirtual |
◆ affectingSystematics()
CP::SystematicSet AsgElectronEfficiencyCorrectionTool::affectingSystematics |
( |
| ) |
const |
|
finaloverrideprivatevirtual |
◆ appliedSystematics()
|
inlinefinaloverrideprivatevirtual |
◆ applyEfficiencyScaleFactor()
|
finaloverrideprivatevirtual |
◆ applySystematicVariation()
StatusCode AsgElectronEfficiencyCorrectionTool::applySystematicVariation |
( |
const CP::SystematicSet & |
systConfig | ) |
|
|
finaloverrideprivatevirtual |
Configure this tool for the given systematics.
Apply one variation at a time.
Implements CP::ISystematicsTool.
Definition at line 582 of file AsgElectronEfficiencyCorrectionTool.cxx.
598 systConfig, affectingSys, filteredSys)) {
600 "Unsupported combination of systematic variations passed to the tool!");
601 return StatusCode::FAILURE;
604 if (filteredSys.
size() > 1) {
606 "More than one systematic variation passed at the same time");
607 return StatusCode::FAILURE;
610 if (filteredSys.
empty() && !systConfig.
empty()) {
612 for (
const auto& syst : systConfig) {
618 itr =
m_systFilter.insert(std::make_pair(systConfig, filteredSys)).first;
623 return StatusCode::SUCCESS;
◆ beginEvent()
StatusCode AsgElectronEfficiencyCorrectionTool::beginEvent |
( |
| ) |
|
|
finaloverrideprivatevirtual |
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 913 of file AsgElectronEfficiencyCorrectionTool.cxx.
917 return StatusCode::SUCCESS;
919 return StatusCode::SUCCESS;
922 return StatusCode::SUCCESS;
◆ beginInputFile()
StatusCode AsgElectronEfficiencyCorrectionTool::beginInputFile |
( |
| ) |
|
|
finaloverrideprivatevirtual |
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 878 of file AsgElectronEfficiencyCorrectionTool.cxx.
883 return StatusCode::SUCCESS;
888 if (
status == StatusCode::SUCCESS) {
895 :
"fast simulation")));
902 "Applying SF corrections to data while they make sense only for MC");
909 return StatusCode::SUCCESS;
◆ currentSimplifiedUncorrSystRegion()
int AsgElectronEfficiencyCorrectionTool::currentSimplifiedUncorrSystRegion |
( |
const double |
cluster_eta, |
|
|
const double |
et |
|
) |
| const |
|
private |
Definition at line 700 of file AsgElectronEfficiencyCorrectionTool.cxx.
704 int ptbin = std::as_const(*m_UncorrRegions).GetXaxis()->FindBin(
et) - 1;
706 ptbin >= std::as_const(*m_UncorrRegions).GetXaxis()->GetNbins()) {
708 " Found electron with Et = "
709 <<
et / 1000. <<
" GeV, where you specified boundaries of ["
710 << std::as_const(*m_UncorrRegions).GetXaxis()->GetBinLowEdge(1) <<
","
714 std::as_const(*m_UncorrRegions).GetXaxis()->GetNbins())
715 <<
"] for the SIMPLIFIED correlation model ");
719 std::as_const(*m_UncorrRegions).GetYaxis()->FindBin(std::abs(cluster_eta)) -
722 etabin >= std::as_const(*m_UncorrRegions).GetYaxis()->GetNbins()) {
724 " Found electron with |eta| = "
725 << std::abs(cluster_eta) <<
", where you specified boundaries of ["
726 << std::as_const(*m_UncorrRegions).GetYaxis()->GetBinLowEdge(1) <<
","
730 std::as_const(*m_UncorrRegions).GetYaxis()->GetNbins())
731 <<
"] for the SIMPLIFIED correlation model ");
◆ currentUncorrSystRegion()
int AsgElectronEfficiencyCorrectionTool::currentUncorrSystRegion |
( |
const double |
cluster_eta, |
|
|
const double |
et |
|
) |
| const |
|
private |
Definition at line 739 of file AsgElectronEfficiencyCorrectionTool.cxx.
746 float cluster_eta_electron = 0;
749 for (; itr_ptBEGIN != itr_ptEND; ++itr_ptBEGIN) {
750 auto itr_ptBEGINplusOne = itr_ptBEGIN;
751 ++itr_ptBEGINplusOne;
754 if (
et >= itr_ptBEGIN->first &&
756 if ((itr_ptBEGIN->second).at(0) >= 0) {
757 cluster_eta_electron = std::abs(cluster_eta);
759 cluster_eta_electron = (cluster_eta);
761 for (
unsigned int etab = 0; etab < ((itr_ptBEGIN->second).
size());
763 unsigned int etabnext = etab + 1;
766 if ((cluster_eta_electron) >= (itr_ptBEGIN->second).at(etab) &&
767 (etabnext == itr_ptBEGIN->second.size() ||
768 cluster_eta_electron < itr_ptBEGIN->second.at(etabnext))) {
780 reg += (itr_ptBEGIN->second).
size();
784 "returning the maximum index");
◆ 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);
◆ 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.
◆ 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.
◆ 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
◆ get_simType_from_metadata()
Definition at line 926 of file AsgElectronEfficiencyCorrectionTool.cxx.
930 #ifndef XAOD_STANDALONE
936 if (!(
dataType ==
"IS_SIMULATION")) {
939 return StatusCode::SUCCESS;
943 std::string simType(
"");
948 std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
949 result = (simType.find(
"ATLFAST") == std::string::npos)
952 return StatusCode::SUCCESS;
962 std::string simType(
"");
967 return StatusCode::SUCCESS;
970 std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
971 result = (simType.find(
"ATLFAST") == std::string::npos)
974 return StatusCode::SUCCESS;
978 return StatusCode::FAILURE;
◆ getEfficiencyScaleFactor() [1/2]
CP::CorrectionCode AsgElectronEfficiencyCorrectionTool::getEfficiencyScaleFactor |
( |
const double |
et, |
|
|
const double |
cluster_eta, |
|
|
const unsigned int |
runNumber, |
|
|
double & |
efficiencyScaleFactor |
|
) |
| const |
|
finaloverrideprivatevirtual |
Implements IAsgElectronEfficiencyCorrectionTool.
Definition at line 383 of file AsgElectronEfficiencyCorrectionTool.cxx.
406 int indexCorrelated = -999;
407 int correlatedSign = 0;
408 if (!(doSFOnly || doToys || isTotal) && (isFull || isSimplified)) {
410 bool isUncorr = (
sysName.find(
"UncorrUnc") != std::string::npos);
411 int currentUncorReg = -999;
416 }
else if (isSimplified) {
419 if (currentUncorReg < 0) {
431 if (
sysName.find(
"CorrUnc") != std::string::npos) {
433 const auto varNumEnd =
sysName.rfind(
"__");
434 const auto varNumBegin =
sysName.rfind(
"NP") + 2;
436 std::stoi(
sysName.substr(varNumBegin, (varNumEnd - varNumBegin)));
438 indexCorrelated = varIndex;
442 indexCorrelated = varIndex;
460 efficiencyScaleFactor = 1;
464 efficiencyScaleFactor =
result.SF;
476 efficiencyScaleFactor =
sys;
483 return HelperFunc(efficiencyScaleFactor,
sys);
486 return HelperFunc(efficiencyScaleFactor, -1 *
sys);
490 else if (unCorrSign!=0) {
492 return HelperFunc(efficiencyScaleFactor,
sys);
505 return HelperFunc(efficiencyScaleFactor,
sys);
511 return HelperFunc(efficiencyScaleFactor,
sys);
515 if (correlatedSign != 0) {
516 sys = correlatedSign *
result.Corr[indexCorrelated];
517 return HelperFunc(efficiencyScaleFactor,
sys);
◆ getEfficiencyScaleFactor() [2/2]
|
finaloverrideprivatevirtual |
Implements IAsgElectronEfficiencyCorrectionTool.
Definition at line 320 of file AsgElectronEfficiencyCorrectionTool.cxx.
325 efficiencyScaleFactor = 1;
337 if (!randomrunnumber.isAvailable(*eventInfo)) {
339 "Pileup tool not run before using ElectronEfficiencyTool! SFs do not "
340 "reflect PU distribution in data");
343 runNumber = randomrunnumber(*(eventInfo));
348 double cluster_eta(-9999.9);
352 ATH_MSG_ERROR(
"ERROR no cluster associated to the Electron \n");
358 if (accAuthor.isAvailable(inputObject) &&
360 cluster_eta = cluster->
eta();
362 cluster_eta = cluster->
etaBE(2);
367 const double energy = cluster->
e();
368 const double parEta = inputObject.
eta();
369 const double coshEta = std::cosh(parEta);
370 double et = (coshEta != 0.) ?
energy / coshEta : 0.;
379 efficiencyScaleFactor);
◆ getFile()
StatusCode AsgElectronEfficiencyCorrectionTool::getFile |
( |
const std::string & |
recokey, |
|
|
const std::string & |
idkey, |
|
|
const std::string & |
isokey, |
|
|
const std::string & |
trigkey |
|
) |
| |
|
privatevirtual |
Gets the correction filename from map.
Definition at line 825 of file AsgElectronEfficiencyCorrectionTool.cxx.
836 if (!
value.empty()) {
839 if (mapFileName.empty()) {
841 "Map file does not exist, Please set the path and version properly..");
846 <<
" does not exist in the map file, Please configure it properly..");
848 return StatusCode::FAILURE;
852 return StatusCode::SUCCESS;
◆ 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
124 return evtStore()->event()->getKey( ptr );
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
111 return evtStore()->event()->getName( ptr );
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getNumberOfToys()
virtual int AsgElectronEfficiencyCorrectionTool::getNumberOfToys |
( |
| ) |
const |
|
inlinefinaloverrideprivatevirtual |
◆ 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 AsgElectronEfficiencyCorrectionTool::initialize |
( |
| ) |
|
|
finaloverrideprivatevirtual |
Gaudi Service Interface method implementations.
Reimplemented from asg::AsgTool.
Definition at line 150 of file AsgElectronEfficiencyCorrectionTool.cxx.
157 ATH_MSG_ERROR(
"CorrectionFileNameList as well as SFKeys are empty! Please "
158 "configure it properly...");
159 return StatusCode::FAILURE;
175 return StatusCode::FAILURE;
185 ATH_MSG_ERROR(
"No Root file input specified, and not available map file");
186 return StatusCode::FAILURE;
196 return StatusCode::FAILURE;
203 if (
ifile.find(
"efficiencySF.") != std::string::npos) {
206 if (
ifile.find(
"efficiencySF.offline") != std::string::npos) {
209 if (
ifile.find(
"efficiencySF.offline.RecoTrk") != std::string::npos) {
212 if (
ifile.find(
"efficiencySF.offline.Fwd") != std::string::npos) {
215 if (
ifile.find(
"efficiencySF.Isolation") != std::string::npos) {
218 if (
ifile.find(
"efficiency.") != std::string::npos) {
221 if (
ifile.find(
"efficiencySF.ChargeID") != std::string::npos) {
225 ATH_MSG_ERROR(
"Could NOT find systematics Substring file name "
227 return StatusCode::FAILURE;
244 ATH_MSG_ERROR(
"Something went wrong when specifying bins for the "
245 "SIMPLIFIED correlation model ");
246 return StatusCode::FAILURE;
254 return StatusCode::FAILURE;
288 "Could not initialize the TElectronEfficiencyCorrectionTool!");
289 return StatusCode::FAILURE;
294 std::map<float, std::vector<float>>
tmp;
297 for (
const auto&
i :
tmp) {
304 return StatusCode::FAILURE;
308 ATH_MSG_ERROR(
"(registerSystematics() != StatusCode::SUCCESS)");
309 return StatusCode::FAILURE;
314 return StatusCode::FAILURE;
316 return StatusCode::SUCCESS;
◆ InitSystematics()
StatusCode AsgElectronEfficiencyCorrectionTool::InitSystematics |
( |
| ) |
|
|
private |
initialize the systematics
Definition at line 630 of file AsgElectronEfficiencyCorrectionTool.cxx.
676 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), 1);
678 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), -1);
687 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), 1);
689 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), -1);
696 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()
|
finaloverrideprivatevirtual |
◆ 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, top::TopObjectSelection, 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, top::TopObjectSelection, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ printCorrelationModels()
virtual void AsgElectronEfficiencyCorrectionTool::printCorrelationModels |
( |
| ) |
const |
|
inlinefinaloverrideprivatevirtual |
◆ recommendedSystematics()
CP::SystematicSet AsgElectronEfficiencyCorrectionTool::recommendedSystematics |
( |
| ) |
const |
|
finaloverrideprivatevirtual |
◆ registerSystematics()
StatusCode AsgElectronEfficiencyCorrectionTool::registerSystematics |
( |
| ) |
|
|
private |
Definition at line 563 of file AsgElectronEfficiencyCorrectionTool.cxx.
567 if (
registry.registerSystematics(*
this) != StatusCode::SUCCESS) {
569 "Failed to add systematic to list of recommended systematics.");
570 return StatusCode::FAILURE;
572 return StatusCode::SUCCESS;
◆ 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.
◆ systUncorrVariationIndex()
int AsgElectronEfficiencyCorrectionTool::systUncorrVariationIndex |
( |
const xAOD::Electron & |
inputObject | ) |
const |
|
finaloverrideprivatevirtual |
◆ updateVHKA()
◆ m_affectedSys
◆ m_appliedSystematics
◆ 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_correlation_model
int AsgElectronEfficiencyCorrectionTool::m_correlation_model |
|
private |
◆ m_correlation_model_name
std::string AsgElectronEfficiencyCorrectionTool::m_correlation_model_name |
|
private |
◆ m_corrFileNameList
std::vector<std::string> AsgElectronEfficiencyCorrectionTool::m_corrFileNameList |
|
private |
◆ m_corrVarDown
◆ m_corrVarUp
◆ m_dataType
◆ m_dataTypeOverwrite
int AsgElectronEfficiencyCorrectionTool::m_dataTypeOverwrite |
|
private |
◆ m_defaultRandomRunNumber
int AsgElectronEfficiencyCorrectionTool::m_defaultRandomRunNumber |
|
private |
◆ m_detStore
◆ m_eventInfoCollectionName
std::string AsgElectronEfficiencyCorrectionTool::m_eventInfoCollectionName |
|
private |
◆ m_evtStore
◆ m_idKey
std::string AsgElectronEfficiencyCorrectionTool::m_idKey |
|
private |
◆ m_inputMetaStore
◆ m_isoKey
std::string AsgElectronEfficiencyCorrectionTool::m_isoKey |
|
private |
◆ m_mapFile
std::string AsgElectronEfficiencyCorrectionTool::m_mapFile |
|
private |
◆ m_metadata_retrieved
bool AsgElectronEfficiencyCorrectionTool::m_metadata_retrieved = false |
|
private |
◆ m_nCorrSyst
int AsgElectronEfficiencyCorrectionTool::m_nCorrSyst |
|
private |
◆ m_nSimpleUncorrSyst
int AsgElectronEfficiencyCorrectionTool::m_nSimpleUncorrSyst |
|
private |
◆ m_number_of_toys
int AsgElectronEfficiencyCorrectionTool::m_number_of_toys |
|
private |
◆ m_nUncorrSyst
int AsgElectronEfficiencyCorrectionTool::m_nUncorrSyst |
|
private |
◆ m_outputMetaStore
◆ m_pteta_bins
std::vector<std::pair<float, std::vector<float> > > AsgElectronEfficiencyCorrectionTool::m_pteta_bins |
|
private |
◆ m_recoKey
std::string AsgElectronEfficiencyCorrectionTool::m_recoKey |
|
private |
◆ m_resultName
std::string AsgElectronEfficiencyCorrectionTool::m_resultName |
|
private |
◆ m_resultPrefix
std::string AsgElectronEfficiencyCorrectionTool::m_resultPrefix |
|
private |
◆ m_rootTool
◆ m_scale_toys
double AsgElectronEfficiencyCorrectionTool::m_scale_toys |
|
private |
◆ m_seed_toys
int AsgElectronEfficiencyCorrectionTool::m_seed_toys |
|
private |
◆ m_sysSubstring
std::string AsgElectronEfficiencyCorrectionTool::m_sysSubstring |
|
private |
◆ m_systFilter
◆ m_toysBasename
std::string AsgElectronEfficiencyCorrectionTool::m_toysBasename |
|
private |
◆ m_trigKey
std::string AsgElectronEfficiencyCorrectionTool::m_trigKey |
|
private |
◆ m_UncorrRegions
TH2F* AsgElectronEfficiencyCorrectionTool::m_UncorrRegions |
|
private |
◆ m_uncorrSimplfEtaBinsUser
std::vector<float> AsgElectronEfficiencyCorrectionTool::m_uncorrSimplfEtaBinsUser |
|
private |
◆ m_uncorrSimplfEtBinsUser
std::vector<float> AsgElectronEfficiencyCorrectionTool::m_uncorrSimplfEtBinsUser |
|
private |
◆ m_uncorrVarDown
◆ m_uncorrVarUp
◆ m_useIncidents
bool asg::AsgMetadataTool::m_useIncidents |
|
privateinherited |
◆ m_useRandomRunNumber
bool AsgElectronEfficiencyCorrectionTool::m_useRandomRunNumber |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Extra patterns decribing particle interation process.
std::pair< unsigned, float > getToyVariationByBaseName(const std::string &basename) const
the toy variation for the given basename
Helper class to provide type-safe access to aux data.
size_t size() const
returns: size of the set
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool empty() const
returns: whether the set is empty
Class to wrap a set of SystematicVariations.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Helper class to provide constant type-safe access to aux data.
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
#define ATH_MSG_VERBOSE(x)
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
reg
globals -----------------------------------------------------------------—
virtual void setOwner(IDataHandleHolder *o)=0
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
@ OutOfValidityRange
Input object is out of validity range.
@ Error
Some error happened during the object correction.
Description of a calorimeter cluster.
Helper class to provide type-safe access to aux data.
virtual double eta() const
The pseudorapidity ( ) of the particle.
::StatusCode StatusCode
StatusCode definition for legacy code.
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
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.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
@ Ok
The correction was done successfully.
std::string convertToOneKey(const std::string &recokey, const std::string &idkey, const std::string &isokey, const std::string &trigkey)
#define ATH_MSG_WARNING(x)
bool empty() const
returns: whether this is an empty systematic, i.e.
This module implements the central registry for handling systematic uncertainties with CP tools.
const_iterator begin() const
description: const iterator to the beginning of the set
Return value from object correction CP tools.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
std::string getValueByKey(const std::string &mapFile, const std::string &key)
static SystematicVariation makeToyEnsemble(const std::string &basename)
constructor for toy systematics ensemble
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual double e() const
The total energy of the particle.
static StatusCode filterForAffectingSystematics(const SystematicSet &systConfig, const SystematicSet &affectingSystematics, SystematicSet &filteredSystematics)
description: filter the systematics for the affected systematics returns: success guarantee: strong f...
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
static std::string retrieveMetadata(const std::string &folder, const std::string &key, const ServiceHandle< StoreGateSvc > &inputMetaStore)
method that always returns as a string you can use from, e.g, pyROOT with evt = ROOT....