 |
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, V, H > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
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, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
◆ 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 598 of file AsgElectronEfficiencyCorrectionTool.cxx.
614 systConfig, affectingSys, filteredSys)) {
616 "Unsupported combination of systematic variations passed to the tool!");
617 return StatusCode::FAILURE;
620 if (filteredSys.
size() > 1) {
622 "More than one systematic variation passed at the same time");
623 return StatusCode::FAILURE;
626 if (filteredSys.
empty() && !systConfig.
empty()) {
628 for (
const auto& syst : systConfig) {
634 itr =
m_systFilter.insert(std::make_pair(systConfig, filteredSys)).first;
639 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 933 of file AsgElectronEfficiencyCorrectionTool.cxx.
937 return StatusCode::SUCCESS;
939 return StatusCode::SUCCESS;
942 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 898 of file AsgElectronEfficiencyCorrectionTool.cxx.
903 return StatusCode::SUCCESS;
908 if (
status == StatusCode::SUCCESS) {
915 :
"fast simulation")));
922 "Applying SF corrections to data while they make sense only for MC");
929 return StatusCode::SUCCESS;
◆ callEvents()
◆ callSingleEvent()
◆ currentSimplifiedUncorrSystRegion()
int AsgElectronEfficiencyCorrectionTool::currentSimplifiedUncorrSystRegion |
( |
const double |
cluster_eta, |
|
|
const double |
et |
|
) |
| const |
|
private |
Definition at line 716 of file AsgElectronEfficiencyCorrectionTool.cxx.
720 int ptbin = std::as_const(*m_UncorrRegions).GetXaxis()->FindBin(
et) - 1;
722 ptbin >= std::as_const(*m_UncorrRegions).GetXaxis()->GetNbins()) {
724 " Found electron with Et = "
725 <<
et / 1000. <<
" GeV, where you specified boundaries of ["
726 << std::as_const(*m_UncorrRegions).GetXaxis()->GetBinLowEdge(1) <<
","
730 std::as_const(*m_UncorrRegions).GetXaxis()->GetNbins())
731 <<
"] for the SIMPLIFIED correlation model ");
735 std::as_const(*m_UncorrRegions).GetYaxis()->FindBin(std::abs(cluster_eta)) -
738 etabin >= std::as_const(*m_UncorrRegions).GetYaxis()->GetNbins()) {
740 " Found electron with |eta| = "
741 << std::abs(cluster_eta) <<
", where you specified boundaries of ["
742 << std::as_const(*m_UncorrRegions).GetYaxis()->GetBinLowEdge(1) <<
","
746 std::as_const(*m_UncorrRegions).GetYaxis()->GetNbins())
747 <<
"] for the SIMPLIFIED correlation model ");
◆ currentUncorrSystRegion()
int AsgElectronEfficiencyCorrectionTool::currentUncorrSystRegion |
( |
const double |
cluster_eta, |
|
|
const double |
et |
|
) |
| const |
|
private |
Definition at line 755 of file AsgElectronEfficiencyCorrectionTool.cxx.
762 float cluster_eta_electron = 0;
765 for (; itr_ptBEGIN != itr_ptEND; ++itr_ptBEGIN) {
766 auto itr_ptBEGINplusOne = itr_ptBEGIN;
767 ++itr_ptBEGINplusOne;
770 if (
et >= itr_ptBEGIN->first &&
772 if ((itr_ptBEGIN->second).at(0) >= 0) {
773 cluster_eta_electron = std::abs(cluster_eta);
775 cluster_eta_electron = (cluster_eta);
777 for (
unsigned int etab = 0; etab < ((itr_ptBEGIN->second).
size());
779 unsigned int etabnext = etab + 1;
782 if ((cluster_eta_electron) >= (itr_ptBEGIN->second).at(etab) &&
783 (etabnext == itr_ptBEGIN->second.size() ||
784 cluster_eta_electron < itr_ptBEGIN->second.at(etabnext))) {
796 reg += (itr_ptBEGIN->second).
size();
800 "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 946 of file AsgElectronEfficiencyCorrectionTool.cxx.
950 #ifndef XAOD_STANDALONE
956 if (!(
dataType ==
"IS_SIMULATION")) {
959 return StatusCode::SUCCESS;
963 std::string simType(
"");
968 std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
969 result = (simType.find(
"ATLFAST") == std::string::npos)
972 return StatusCode::SUCCESS;
982 std::string simType(
"");
987 return StatusCode::SUCCESS;
990 std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
991 result = (simType.find(
"ATLFAST") == std::string::npos)
994 return StatusCode::SUCCESS;
998 return StatusCode::FAILURE;
◆ getEfficiencyScaleFactor() [1/3]
Definition at line 347 of file AsgElectronEfficiencyCorrectionTool.cxx.
354 efficiencyScaleFactor = 1;
358 if (!
acc.randomrunnumber.isAvailable(eventInfo)) {
360 "Pileup tool not run before using ElectronEfficiencyTool! SFs do not "
361 "reflect PU distribution in data");
369 double cluster_eta(-9999.9);
371 auto cluster =
acc.caloClusterAcc (inputObject) [0].value();
374 if (
acc.accAuthor.isAvailable(inputObject) &&
376 cluster_eta =
acc.clusterEtaAcc (cluster);
378 cluster_eta =
acc.clusterEtaBEAcc (cluster, 2);
383 const double energy =
acc.clusterEAcc(cluster);
384 const double parEta =
acc.m_eta(inputObject);
385 const double coshEta = std::cosh(parEta);
386 double et = (coshEta != 0.) ?
energy / coshEta : 0.;
395 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 399 of file AsgElectronEfficiencyCorrectionTool.cxx.
422 int indexCorrelated = -999;
423 int correlatedSign = 0;
424 if (!(doSFOnly || doToys || isTotal) && (isFull || isSimplified)) {
426 bool isUncorr = (
sysName.find(
"UncorrUnc") != std::string::npos);
427 int currentUncorReg = -999;
432 }
else if (isSimplified) {
435 if (currentUncorReg < 0) {
447 if (
sysName.find(
"CorrUnc") != std::string::npos) {
449 const auto varNumEnd =
sysName.rfind(
"__");
450 const auto varNumBegin =
sysName.rfind(
"NP") + 2;
452 std::stoi(
sysName.substr(varNumBegin, (varNumEnd - varNumBegin)));
454 indexCorrelated = varIndex;
458 indexCorrelated = varIndex;
476 efficiencyScaleFactor = 1;
480 efficiencyScaleFactor =
result.SF;
492 efficiencyScaleFactor =
sys;
499 return HelperFunc(efficiencyScaleFactor,
sys);
502 return HelperFunc(efficiencyScaleFactor, -1 *
sys);
506 else if (unCorrSign!=0) {
508 return HelperFunc(efficiencyScaleFactor,
sys);
521 return HelperFunc(efficiencyScaleFactor,
sys);
527 return HelperFunc(efficiencyScaleFactor,
sys);
531 if (correlatedSign != 0) {
532 sys = correlatedSign *
result.Corr[indexCorrelated];
533 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 845 of file AsgElectronEfficiencyCorrectionTool.cxx.
856 if (!
value.empty()) {
859 if (mapFileName.empty()) {
861 "Map file does not exist, Please set the path and version properly..");
866 <<
" does not exist in the map file, Please configure it properly..");
868 return StatusCode::FAILURE;
872 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 135 of file AsgMetadataTool.cxx.
141 if( inc.type() == IncidentType::BeginInputFile ) {
145 throw std::runtime_error(
"Couldn't call beginInputFile()" );
147 }
else if( inc.type() == IncidentType::EndInputFile ) {
150 throw std::runtime_error(
"Couldn't call endInputFile()" );
152 }
else if( inc.type() == IncidentType::BeginEvent ) {
160 throw std::runtime_error(
"Couldn't call beginInputFile()" );
165 throw std::runtime_error(
"Couldn't call beginEvent()" );
168 #ifdef XAOD_STANDALONE
169 }
else if( inc.type() == IncidentType::MetaDataStop ) {
172 throw std::runtime_error(
"Couldn't call metaDataStop()" );
175 #endif // XAOD_STANDALONE
177 ATH_MSG_WARNING(
"Unknown incident type received in AsgMetaDataTool: " << inc.type() );
◆ initialize()
StatusCode 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) {
306 " but input does not contain necessary histograms.");
307 return StatusCode::FAILURE;
313 return StatusCode::FAILURE;
317 ATH_MSG_ERROR(
"(registerSystematics() != StatusCode::SUCCESS)");
318 return StatusCode::FAILURE;
323 return StatusCode::FAILURE;
330 return StatusCode::SUCCESS;
◆ InitSystematics()
StatusCode AsgElectronEfficiencyCorrectionTool::InitSystematics |
( |
| ) |
|
|
private |
initialize the systematics
Definition at line 646 of file AsgElectronEfficiencyCorrectionTool.cxx.
692 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), 1);
694 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), -1);
703 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), 1);
705 prefixUncorr + Form(
"UncorrUncertaintyNP%d",
i), -1);
712 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ inputMetaStore()
AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore |
( |
| ) |
const |
|
inherited |
Accessor for the input metadata store.
Definition at line 93 of file AsgMetadataTool.cxx.
95 #ifdef XAOD_STANDALONE
97 #else // XAOD_STANDALONE
99 #endif // XAOD_STANDALONE
◆ isAffectedBySystematic()
|
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 102 of file AsgMetadataTool.cxx.
104 #ifdef XAOD_STANDALONE
106 #else // XAOD_STANDALONE
108 #endif // XAOD_STANDALONE
◆ print() [1/2]
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, LundVariablesTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ print() [2/2]
virtual void asg::IAsgTool::print |
( |
| ) |
const |
|
pure virtualinherited |
Print the state of the tool.
Implemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, LundVariablesTool, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ printCorrelationModels()
virtual void AsgElectronEfficiencyCorrectionTool::printCorrelationModels |
( |
| ) |
const |
|
inlinefinaloverrideprivatevirtual |
◆ recommendedSystematics()
CP::SystematicSet AsgElectronEfficiencyCorrectionTool::recommendedSystematics |
( |
| ) |
const |
|
finaloverrideprivatevirtual |
◆ registerSystematics()
StatusCode AsgElectronEfficiencyCorrectionTool::registerSystematics |
( |
| ) |
|
|
private |
Definition at line 579 of file AsgElectronEfficiencyCorrectionTool.cxx.
583 if (
registry.registerSystematics(*
this) != StatusCode::SUCCESS) {
585 "Failed to add systematic to list of recommended systematics.");
586 return StatusCode::FAILURE;
588 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 115 of file AsgMetadataTool.cxx.
117 #ifndef XAOD_STANDALONE
124 incSvc->addListener(
this, IncidentType::BeginEvent, 0,
false );
129 #endif // not XAOD_STANDALONE
132 return StatusCode::SUCCESS;
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ systUncorrVariationIndex() [1/2]
int AsgElectronEfficiencyCorrectionTool::systUncorrVariationIndex |
( |
columnar::ElectronId |
inputObject | ) |
const |
|
private |
Definition at line 815 of file AsgElectronEfficiencyCorrectionTool.cxx.
819 int currentSystRegion = -999;
820 double cluster_eta(-9999.9);
823 et =
acc.m_pt(inputObject);
824 const auto cluster =
acc.caloClusterAcc (inputObject) [0].value();
825 cluster_eta =
acc.clusterEtaBEAcc (cluster, 2);
840 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
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
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
@ 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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
const 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
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....