Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <AsgElectronEfficiencyCorrectionTool.h>
|
void | callSingleEvent (columnar::ElectronRange electrons, columnar::EventInfoId event) const |
|
void | callEvents (columnar::EventContextRange events) const override |
|
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 |
|
CP::CorrectionCode | getEfficiencyScaleFactor (columnar::ElectronId inputObject, double &efficiencyScaleFactor, columnar::EventInfoId info) const |
|
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 |
|
int | systUncorrVariationIndex (columnar::ElectronId inputObject) const |
|
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 599 of file AsgElectronEfficiencyCorrectionTool.cxx.
615 systConfig, affectingSys, filteredSys)) {
617 "Unsupported combination of systematic variations passed to the tool!");
618 return StatusCode::FAILURE;
621 if (filteredSys.
size() > 1) {
623 "More than one systematic variation passed at the same time");
624 return StatusCode::FAILURE;
627 if (filteredSys.
empty() && !systConfig.
empty()) {
629 for (
const auto& syst : systConfig) {
635 itr =
m_systFilter.insert(std::make_pair(systConfig, filteredSys)).first;
640 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 934 of file AsgElectronEfficiencyCorrectionTool.cxx.
938 return StatusCode::SUCCESS;
940 return StatusCode::SUCCESS;
943 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 899 of file AsgElectronEfficiencyCorrectionTool.cxx.
904 return StatusCode::SUCCESS;
909 if (
status == StatusCode::SUCCESS) {
916 :
"fast simulation")));
923 "Applying SF corrections to data while they make sense only for MC");
930 return StatusCode::SUCCESS;
◆ callEvents()
◆ callSingleEvent()
◆ currentSimplifiedUncorrSystRegion()
int AsgElectronEfficiencyCorrectionTool::currentSimplifiedUncorrSystRegion |
( |
const double |
cluster_eta, |
|
|
const double |
et |
|
) |
| const |
|
private |
Definition at line 717 of file AsgElectronEfficiencyCorrectionTool.cxx.
721 int ptbin = std::as_const(*m_UncorrRegions).GetXaxis()->FindBin(
et) - 1;
723 ptbin >= std::as_const(*m_UncorrRegions).GetXaxis()->GetNbins()) {
725 " Found electron with Et = "
726 <<
et / 1000. <<
" GeV, where you specified boundaries of ["
727 << std::as_const(*m_UncorrRegions).GetXaxis()->GetBinLowEdge(1) <<
","
731 std::as_const(*m_UncorrRegions).GetXaxis()->GetNbins())
732 <<
"] for the SIMPLIFIED correlation model ");
736 std::as_const(*m_UncorrRegions).GetYaxis()->FindBin(std::abs(cluster_eta)) -
739 etabin >= std::as_const(*m_UncorrRegions).GetYaxis()->GetNbins()) {
741 " Found electron with |eta| = "
742 << std::abs(cluster_eta) <<
", where you specified boundaries of ["
743 << std::as_const(*m_UncorrRegions).GetYaxis()->GetBinLowEdge(1) <<
","
747 std::as_const(*m_UncorrRegions).GetYaxis()->GetNbins())
748 <<
"] for the SIMPLIFIED correlation model ");
◆ currentUncorrSystRegion()
int AsgElectronEfficiencyCorrectionTool::currentUncorrSystRegion |
( |
const double |
cluster_eta, |
|
|
const double |
et |
|
) |
| const |
|
private |
Definition at line 756 of file AsgElectronEfficiencyCorrectionTool.cxx.
763 float cluster_eta_electron = 0;
766 for (; itr_ptBEGIN != itr_ptEND; ++itr_ptBEGIN) {
767 auto itr_ptBEGINplusOne = itr_ptBEGIN;
768 ++itr_ptBEGINplusOne;
771 if (
et >= itr_ptBEGIN->first &&
773 if ((itr_ptBEGIN->second).at(0) >= 0) {
774 cluster_eta_electron = std::abs(cluster_eta);
776 cluster_eta_electron = (cluster_eta);
778 for (
unsigned int etab = 0; etab < ((itr_ptBEGIN->second).
size());
780 unsigned int etabnext = etab + 1;
783 if ((cluster_eta_electron) >= (itr_ptBEGIN->second).at(etab) &&
784 (etabnext == itr_ptBEGIN->second.size() ||
785 cluster_eta_electron < itr_ptBEGIN->second.at(etabnext))) {
797 reg += (itr_ptBEGIN->second).
size();
801 "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);
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
◆ get_simType_from_metadata()
Definition at line 947 of file AsgElectronEfficiencyCorrectionTool.cxx.
951 #ifndef XAOD_STANDALONE
957 if (!(
dataType ==
"IS_SIMULATION")) {
960 return StatusCode::SUCCESS;
964 std::string simType(
"");
969 std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
970 result = (simType.find(
"ATLFAST") == std::string::npos)
973 return StatusCode::SUCCESS;
983 std::string simType(
"");
988 return StatusCode::SUCCESS;
991 std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
992 result = (simType.find(
"ATLFAST") == std::string::npos)
995 return StatusCode::SUCCESS;
999 return StatusCode::FAILURE;
◆ getEfficiencyScaleFactor() [1/3]
Definition at line 348 of file AsgElectronEfficiencyCorrectionTool.cxx.
355 efficiencyScaleFactor = 1;
359 if (!
acc.randomrunnumber.isAvailable(eventInfo)) {
361 "Pileup tool not run before using ElectronEfficiencyTool! SFs do not "
362 "reflect PU distribution in data");
370 double cluster_eta(-9999.9);
372 auto cluster =
acc.caloClusterAcc (inputObject) [0].value();
375 if (
acc.accAuthor.isAvailable(inputObject) &&
377 cluster_eta =
acc.clusterEtaAcc (cluster);
379 cluster_eta =
acc.clusterEtaBEAcc (cluster, 2);
384 const double energy =
acc.clusterEAcc(cluster);
385 const double parEta =
acc.m_eta(inputObject);
386 const double coshEta = std::cosh(parEta);
387 double et = (coshEta != 0.) ?
energy / coshEta : 0.;
396 efficiencyScaleFactor);
◆ getEfficiencyScaleFactor() [2/3]
CP::CorrectionCode AsgElectronEfficiencyCorrectionTool::getEfficiencyScaleFactor |
( |
const double |
et, |
|
|
const double |
cluster_eta, |
|
|
const unsigned int |
runNumber, |
|
|
double & |
efficiencyScaleFactor |
|
) |
| const |
|
finaloverrideprivatevirtual |
Implements IAsgElectronEfficiencyCorrectionTool.
Definition at line 400 of file AsgElectronEfficiencyCorrectionTool.cxx.
423 int indexCorrelated = -999;
424 int correlatedSign = 0;
425 if (!(doSFOnly || doToys || isTotal) && (isFull || isSimplified)) {
427 bool isUncorr = (
sysName.find(
"UncorrUnc") != std::string::npos);
428 int currentUncorReg = -999;
433 }
else if (isSimplified) {
436 if (currentUncorReg < 0) {
448 if (
sysName.find(
"CorrUnc") != std::string::npos) {
450 const auto varNumEnd =
sysName.rfind(
"__");
451 const auto varNumBegin =
sysName.rfind(
"NP") + 2;
453 std::stoi(
sysName.substr(varNumBegin, (varNumEnd - varNumBegin)));
455 indexCorrelated = varIndex;
459 indexCorrelated = varIndex;
477 efficiencyScaleFactor = 1;
481 efficiencyScaleFactor =
result.SF;
493 efficiencyScaleFactor =
sys;
500 return HelperFunc(efficiencyScaleFactor,
sys);
503 return HelperFunc(efficiencyScaleFactor, -1 *
sys);
507 else if (unCorrSign!=0) {
509 return HelperFunc(efficiencyScaleFactor,
sys);
522 return HelperFunc(efficiencyScaleFactor,
sys);
528 return HelperFunc(efficiencyScaleFactor,
sys);
532 if (correlatedSign != 0) {
533 sys = correlatedSign *
result.Corr[indexCorrelated];
534 return HelperFunc(efficiencyScaleFactor,
sys);
◆ getEfficiencyScaleFactor() [3/3]
|
finaloverrideprivatevirtual |
◆ 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 846 of file AsgElectronEfficiencyCorrectionTool.cxx.
857 if (!
value.empty()) {
860 if (mapFileName.empty()) {
862 "Map file does not exist, Please set the path and version properly..");
867 <<
" does not exist in the map file, Please configure it properly..");
869 return StatusCode::FAILURE;
873 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
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
◆ 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 151 of file AsgElectronEfficiencyCorrectionTool.cxx.
158 ATH_MSG_ERROR(
"CorrectionFileNameList as well as SFKeys are empty! Please "
159 "configure it properly...");
160 return StatusCode::FAILURE;
176 return StatusCode::FAILURE;
186 ATH_MSG_ERROR(
"No Root file input specified, and not available map file");
187 return StatusCode::FAILURE;
197 return StatusCode::FAILURE;
204 if (
ifile.find(
"efficiencySF.") != std::string::npos) {
207 if (
ifile.find(
"efficiencySF.offline") != std::string::npos) {
210 if (
ifile.find(
"efficiencySF.offline.RecoTrk") != std::string::npos) {
213 if (
ifile.find(
"efficiencySF.offline.Fwd") != std::string::npos) {
216 if (
ifile.find(
"efficiencySF.Isolation") != std::string::npos) {
219 if (
ifile.find(
"efficiency.") != std::string::npos) {
222 if (
ifile.find(
"efficiencySF.ChargeID") != std::string::npos) {
226 ATH_MSG_ERROR(
"Could NOT find systematics Substring file name "
228 return StatusCode::FAILURE;
245 ATH_MSG_ERROR(
"Something went wrong when specifying bins for the "
246 "SIMPLIFIED correlation model ");
247 return StatusCode::FAILURE;
255 return StatusCode::FAILURE;
289 "Could not initialize the TElectronEfficiencyCorrectionTool!");
290 return StatusCode::FAILURE;
295 std::map<float, std::vector<float>>
tmp;
298 for (
const auto&
i :
tmp) {
307 " but input does not contain necessary histograms.");
308 return StatusCode::FAILURE;
314 return StatusCode::FAILURE;
318 ATH_MSG_ERROR(
"(registerSystematics() != StatusCode::SUCCESS)");
319 return StatusCode::FAILURE;
324 return StatusCode::FAILURE;
331 return StatusCode::SUCCESS;
◆ InitSystematics()
StatusCode AsgElectronEfficiencyCorrectionTool::InitSystematics |
( |
| ) |
|
|
private |
initialize the systematics
Definition at line 647 of file AsgElectronEfficiencyCorrectionTool.cxx.
693 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), 1);
695 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), -1);
704 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), 1);
706 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), -1);
713 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, 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.
◆ printCorrelationModels()
virtual void AsgElectronEfficiencyCorrectionTool::printCorrelationModels |
( |
| ) |
const |
|
inlinefinaloverrideprivatevirtual |
◆ recommendedSystematics()
CP::SystematicSet AsgElectronEfficiencyCorrectionTool::recommendedSystematics |
( |
| ) |
const |
|
finaloverrideprivatevirtual |
◆ registerSystematics()
StatusCode AsgElectronEfficiencyCorrectionTool::registerSystematics |
( |
| ) |
|
|
private |
Definition at line 580 of file AsgElectronEfficiencyCorrectionTool.cxx.
584 if (
registry.registerSystematics(*
this) != StatusCode::SUCCESS) {
586 "Failed to add systematic to list of recommended systematics.");
587 return StatusCode::FAILURE;
589 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() [1/2]
int AsgElectronEfficiencyCorrectionTool::systUncorrVariationIndex |
( |
columnar::ElectronId |
inputObject | ) |
const |
|
private |
Definition at line 816 of file AsgElectronEfficiencyCorrectionTool.cxx.
820 int currentSystRegion = -999;
821 double cluster_eta(-9999.9);
824 et =
acc.m_pt(inputObject);
825 const auto cluster =
acc.caloClusterAcc (inputObject) [0].value();
826 cluster_eta =
acc.clusterEtaBEAcc (cluster, 2);
841 return currentSystRegion;
◆ systUncorrVariationIndex() [2/2]
int AsgElectronEfficiencyCorrectionTool::systUncorrVariationIndex |
( |
const xAOD::Electron & |
inputObject | ) |
const |
|
finaloverrideprivatevirtual |
◆ updateVHKA()
◆ m_accessors
std::unique_ptr<Accessors> AsgElectronEfficiencyCorrectionTool::m_accessors |
◆ 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
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
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)
virtual void setOwner(IDataHandleHolder *o)=0
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.
POOL::TEvent event(POOL::TEvent::kClassAccess)
Helper class to provide type-safe access to aux data.
::StatusCode StatusCode
StatusCode definition for legacy code.
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
a class representing a single object (electron, muons, etc.)
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.
void resetAccessor(AccessorTemplate< CI, CT, CAM, CM > &accessor, ColumnarTool< CM > &columnBase, const std::string &name, ColumnInfo &&info={})
reset a column accessor to point to a new column
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>
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....