![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <MuonScaleFactorCalculator.h>
|
| MuonScaleFactorCalculator (const std::string &name) |
|
virtual | ~MuonScaleFactorCalculator () |
|
| MuonScaleFactorCalculator (const MuonScaleFactorCalculator &rhs)=delete |
|
| MuonScaleFactorCalculator (MuonScaleFactorCalculator &&rhs)=delete |
|
MuonScaleFactorCalculator & | operator= (const MuonScaleFactorCalculator &rhs)=delete |
|
StatusCode | initialize () |
| Dummy implementation of the initialisation function. More...
|
|
StatusCode | execute () |
|
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 | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
template<typename T > |
void | retrieveSystematicTool (const ToolHandle< T > &tool, std::set< std::string > &recommended_systematics) |
|
template<typename T > |
void | applySystematicVariation (ToolHandle< T > &tool, const CP::SystematicSet &systematic) |
|
StatusCode | checkSystematicsImplemented (const std::set< std::string > &recommended, const std::set< std::string > &implemented) |
|
void | decorateTriggerEfficiency (ToolHandle< CP::IMuonTriggerScaleFactors > &tool, const xAOD::Muon &muon, const SG::AuxElement::Decorator< float > &decor) |
|
void | decorateTriggerSF (ToolHandle< CP::IMuonTriggerScaleFactors > &tool, const ConstDataVector< xAOD::MuonContainer > &muon_cont, const SG::AuxElement::Decorator< float > &decor) |
|
void | decorateTrigSFandEff (ToolHandle< CP::IMuonTriggerScaleFactors > &tool, const CP::SystematicSet &systematic, const ConstDataVector< xAOD::MuonContainer > &muon_cont, const SG::AuxElement::Decorator< float > &sf_decor, const SG::AuxElement::Decorator< float > &eff_decor) |
|
void | decorateTriggerSystematics (const ConstDataVector< xAOD::MuonContainer > &trigger_SF_muon) |
|
void | decorateEfficiencySF (ToolHandle< CP::IMuonEfficiencyScaleFactors > &tool, const CP::SystematicSet &systematic, const xAOD::Muon &muon, const SG::AuxElement::Decorator< float > &decor) |
|
void | decorateIsolationSystematics (const xAOD::Muon &muon) |
|
void | decorateTTVASystematics (const xAOD::Muon &muon) |
|
void | decorateIDSFandRecoEff (ToolHandle< CP::IMuonEfficiencyScaleFactors > &tool, const CP::SystematicSet &systematic, const xAOD::Muon &muon, const SG::AuxElement::Decorator< float > &id_sf_decor) |
|
void | decorateIDSFandRecoEffSystematics (const xAOD::Muon &muon) |
|
void | decorateIDSFandRecoEffSystematicsSoftMuon (const xAOD::Muon &muon) |
|
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...
|
|
Definition at line 42 of file MuonScaleFactorCalculator.h.
◆ StoreGateSvc_t
◆ MuonScaleFactorCalculator() [1/3]
top::MuonScaleFactorCalculator::MuonScaleFactorCalculator |
( |
const std::string & |
name | ) |
|
|
explicit |
◆ ~MuonScaleFactorCalculator()
virtual top::MuonScaleFactorCalculator::~MuonScaleFactorCalculator |
( |
| ) |
|
|
inlinevirtual |
◆ MuonScaleFactorCalculator() [2/3]
◆ MuonScaleFactorCalculator() [3/3]
◆ applySystematicVariation()
template<typename T >
void top::MuonScaleFactorCalculator::applySystematicVariation |
( |
ToolHandle< T > & |
tool, |
|
|
const CP::SystematicSet & |
systematic |
|
) |
| |
|
private |
◆ checkSystematicsImplemented()
StatusCode top::MuonScaleFactorCalculator::checkSystematicsImplemented |
( |
const std::set< std::string > & |
recommended, |
|
|
const std::set< std::string > & |
implemented |
|
) |
| |
|
private |
Definition at line 537 of file MuonScaleFactorCalculator.cxx.
539 std::vector<std::string> different_systematics = {};
540 std::set_difference(recommended.begin(),
544 std::back_inserter(different_systematics));
545 if (different_systematics.size()) {
547 for (
auto syst : recommended)
550 for (
auto syst : implemented)
553 for (
const auto& syst : different_systematics)
555 return StatusCode::FAILURE;
557 return StatusCode::SUCCESS;
◆ 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]
◆ decorateEfficiencySF()
Definition at line 667 of file MuonScaleFactorCalculator.cxx.
674 float efficiency_SF = 1.0;
677 "Failed to get " +
tool.name()
678 +
" efficiency SF for " + (systematic.
empty()
679 ?
"Nominal" : systematic.
name()));
680 decor(
muon) = efficiency_SF;
◆ decorateIDSFandRecoEff()
◆ decorateIDSFandRecoEffSystematics()
void top::MuonScaleFactorCalculator::decorateIDSFandRecoEffSystematics |
( |
const xAOD::Muon & |
muon | ) |
|
|
private |
– Syst UP –///
– Syst DOWN –///
– Syst UP –///
– Syst DOWN –///
Definition at line 928 of file MuonScaleFactorCalculator.cxx.
1055 id_sf_decor_stat_up);
1058 id_sf_loose_decor_stat_up);
1061 id_sf_decor_stat_down);
1064 id_sf_loose_decor_stat_down);
1068 id_sf_decor_stat_lowpt_up);
1071 id_sf_loose_decor_stat_lowpt_up);
1074 id_sf_decor_stat_lowpt_down);
1077 id_sf_loose_decor_stat_lowpt_down);
1079 if (
m_config->muonBreakDownSystematics()) {
1083 id_sf_decor_bkg_fraction_up);
1086 id_sf_loose_decor_bkg_fraction_up);
1089 id_sf_decor_bkg_fraction_down);
1092 id_sf_loose_decor_bkg_fraction_down);
1096 id_sf_decor_fit_model_lowpt_up);
1099 id_sf_loose_decor_fit_model_lowpt_up);
1102 id_sf_decor_fit_model_lowpt_down);
1105 id_sf_loose_decor_fit_model_lowpt_down);
1109 id_sf_decor_lumi_uncert_up);
1112 id_sf_loose_decor_lumi_uncert_up);
1115 id_sf_decor_lumi_uncert_down);
1118 id_sf_loose_decor_lumi_uncert_down);
1122 id_sf_decor_matching_up);
1125 id_sf_loose_decor_matching_up);
1128 id_sf_decor_matching_down);
1131 id_sf_loose_decor_matching_down);
1135 id_sf_decor_matching_lowpt_up);
1138 id_sf_loose_decor_matching_lowpt_up);
1141 id_sf_decor_matching_lowpt_down);
1144 id_sf_loose_decor_matching_lowpt_down);
1148 id_sf_decor_mc_xsec_up);
1151 id_sf_loose_decor_mc_xsec_up);
1154 id_sf_decor_mc_xsec_down);
1157 id_sf_loose_decor_mc_xsec_down);
1161 id_sf_decor_pt_dependency_up);
1164 id_sf_loose_decor_pt_dependency_up);
1167 id_sf_decor_pt_dependency_down);
1170 id_sf_loose_decor_pt_dependency_down);
1174 id_sf_decor_qcd_template_up);
1177 id_sf_loose_decor_qcd_template_up);
1180 id_sf_decor_qcd_template_down);
1183 id_sf_loose_decor_qcd_template_down);
1187 id_sf_decor_supression_scale_up);
1190 id_sf_loose_decor_supression_scale_up);
1193 id_sf_decor_supression_scale_down);
1196 id_sf_loose_decor_supression_scale_down);
1200 id_sf_decor_truth_up);
1203 id_sf_loose_decor_truth_up);
1206 id_sf_decor_truth_down);
1209 id_sf_loose_decor_truth_down);
1213 id_sf_decor_truth_lowpt_up);
1216 id_sf_loose_decor_truth_lowpt_up);
1219 id_sf_decor_truth_lowpt_down);
1222 id_sf_loose_decor_truth_lowpt_down);
1226 id_sf_decor_cr1_up);
1229 id_sf_loose_decor_cr1_up);
1232 id_sf_decor_cr1_down);
1235 id_sf_loose_decor_cr1_down);
1239 id_sf_decor_cr2_up);
1242 id_sf_loose_decor_cr2_up);
1245 id_sf_decor_cr2_down);
1248 id_sf_loose_decor_cr2_down);
1252 id_sf_decor_cr3_up);
1255 id_sf_loose_decor_cr3_up);
1258 id_sf_decor_cr3_down);
1261 id_sf_loose_decor_cr3_down);
1265 id_sf_decor_higheta_probeip_up);
1268 id_sf_loose_decor_higheta_probeip_up);
1271 id_sf_decor_higheta_probeip_down);
1274 id_sf_loose_decor_higheta_probeip_down);
1278 id_sf_decor_higheta_probeiso_up);
1281 id_sf_loose_decor_higheta_probeiso_up);
1284 id_sf_decor_higheta_probeiso_down);
1287 id_sf_loose_decor_higheta_probeiso_down);
1291 id_sf_decor_tagpt_up);
1294 id_sf_loose_decor_tagpt_up);
1297 id_sf_decor_tagpt_down);
1300 id_sf_loose_decor_tagpt_down);
1304 id_sf_decor_extrapolation_up);
1307 id_sf_loose_decor_extrapolation_up);
1310 id_sf_decor_extrapolation_lowpt_up);
1313 id_sf_loose_decor_extrapolation_lowpt_up);
1316 id_sf_decor_extrapolation_down);
1319 id_sf_loose_decor_extrapolation_down);
1322 id_sf_decor_extrapolation_lowpt_down);
1325 id_sf_loose_decor_extrapolation_down);
1330 id_sf_decor_syst_up);
1333 id_sf_loose_decor_syst_up);
1338 id_sf_decor_syst_down);
1341 id_sf_loose_decor_syst_down);
1345 id_sf_decor_syst_lowpt_up);
1348 id_sf_loose_decor_syst_lowpt_up);
1353 id_sf_decor_syst_lowpt_down);
1356 id_sf_loose_decor_syst_lowpt_down);
1358 if (
m_config->muonQuality() ==
"HighPt" ||
m_config->muonQualityLoose() ==
"HighPt") {
1361 id_sf_decor_bad_muon_veto_up);
1364 id_sf_decor_bad_muon_veto_down);
1367 id_sf_loose_decor_bad_muon_veto_up);
1370 id_sf_loose_decor_bad_muon_veto_down);
◆ decorateIDSFandRecoEffSystematicsSoftMuon()
void top::MuonScaleFactorCalculator::decorateIDSFandRecoEffSystematicsSoftMuon |
( |
const xAOD::Muon & |
muon | ) |
|
|
private |
– Stat UP –///
– Stat DOWN –///
– Syst UP –///
– Syst DOWN –///
– Stat UP –///
– Stat DOWN –///
– Syst UP –///
– Syst DOWN –///
Definition at line 1374 of file MuonScaleFactorCalculator.cxx.
1387 id_sf_decor_stat_up);
1392 id_sf_decor_stat_down);
1397 id_sf_decor_syst_up);
1402 id_sf_decor_syst_down);
1415 id_sf_decor_stat_lowpt_up);
1420 id_sf_decor_stat_lowpt_down);
1425 id_sf_decor_syst_lowpt_up);
1430 id_sf_decor_syst_lowpt_down);
◆ decorateIsolationSystematics()
void top::MuonScaleFactorCalculator::decorateIsolationSystematics |
( |
const xAOD::Muon & |
muon | ) |
|
|
private |
– Stat UP –///
– Stat DOWN –///
– Syst UP –///
– Syst DOWN –///
– Stat UP –///
– Stat DOWN –///
– Syst UP –///
– Syst DOWN –///
Definition at line 683 of file MuonScaleFactorCalculator.cxx.
741 iso_sf_decor_stat_up);
745 iso_sf_decor_stat_down);
747 if (
m_config->muonBreakDownSystematics())
781 iso_sf_decor_syst_up);
785 iso_sf_decor_syst_down);
792 iso_sf_decor_stat_up(
muon) = 1.0;
793 iso_sf_decor_stat_down(
muon) = 1.0;
794 iso_sf_decor_syst_up(
muon) = 1.0;
795 iso_sf_decor_syst_down(
muon) = 1.0;
802 iso_sf_loose_decor_stat_up);
806 iso_sf_loose_decor_stat_down);
808 if (
m_config->muonBreakDownSystematics())
842 iso_sf_loose_decor_syst_up);
846 iso_sf_loose_decor_syst_down);
851 iso_sf_loose_decor_stat_up(
muon) = 1.0;
852 iso_sf_loose_decor_stat_down(
muon) = 1.0;
853 iso_sf_loose_decor_syst_up(
muon) = 1.0;
854 iso_sf_loose_decor_syst_down(
muon) = 1.0;
◆ decorateTriggerEfficiency()
◆ decorateTriggerSF()
◆ decorateTriggerSystematics()
Definition at line 596 of file MuonScaleFactorCalculator.cxx.
625 trig_sf_decor_stat_up,
626 trig_eff_decor_stat_up);
630 trig_sf_loose_decor_stat_up,
631 trig_eff_loose_decor_stat_up);
636 trig_sf_decor_stat_down,
637 trig_eff_decor_stat_down);
641 trig_sf_loose_decor_stat_down,
642 trig_eff_loose_decor_stat_down);
647 trig_sf_decor_syst_up,
648 trig_eff_decor_syst_up);
652 trig_sf_loose_decor_syst_up,
653 trig_eff_loose_decor_syst_up);
658 trig_sf_decor_syst_down,
659 trig_eff_decor_syst_down);
663 trig_sf_loose_decor_syst_down,
664 trig_eff_loose_decor_syst_down);
◆ decorateTrigSFandEff()
◆ decorateTTVASystematics()
void top::MuonScaleFactorCalculator::decorateTTVASystematics |
( |
const xAOD::Muon & |
muon | ) |
|
|
private |
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode top::MuonScaleFactorCalculator::execute |
( |
| ) |
|
– Loop over all muon collections –///
– Loop over all muons in each collection –///
– Does the muon pass object selection? –///
– Loop over all soft muon collections –///
– Loop over all soft muons in each collection –///
– Does the soft muon pass object selection? –///
Definition at line 292 of file MuonScaleFactorCalculator.cxx.
303 "Failed to retrieve EventInfo");
307 if (eventInfo->isAvailable<
unsigned int>(
"RandomRunNumber"))
runNumber = eventInfo->auxdataConst<
unsigned int>(
309 else ATH_MSG_WARNING(
"Event has not been decorated with RandomRunNumber");
334 if (
m_config->muonForceTrigger() !=
" "){
339 ATH_MSG_DEBUG(
"RunNumber (0 < 2015 < 284484 < 2016 < 324320 < 2017) : ");
344 for (
auto currentSystematic : *
m_config->systSgKeyMapMuons()) {
347 "Failed to retrieve muons");
350 for (
auto muonPtr : *muons) {
352 bool passSelection(
false);
353 if (muonPtr->isAvailable<
char>(
"passPreORSelection")) {
354 if (muonPtr->auxdataConst<
char>(
"passPreORSelection") == 1) {
355 passSelection =
true;
358 if (muonPtr->isAvailable<
char>(
"passPreORSelectionLoose")) {
359 if (muonPtr->auxdataConst<
char>(
"passPreORSelectionLoose") == 1) {
360 passSelection =
true;
364 if (!passSelection)
continue;
373 if (
m_config->muonQuality() ==
"HighPt" ||
m_config->muonQualityLoose() ==
"HighPt") {
410 iso_sf_decor(*muonPtr) = 1.0;
417 iso_sf_loose_decor(*muonPtr) = 1.0;
441 trigger_SF_muon.push_back(muonPtr);
450 trig_sf_decor, trig_eff_decor);
453 trig_sf_loose_decor, trig_eff_loose_decor);
458 if (currentSystematic.first !=
m_config->nominalHashValue())
continue;
472 for (
const auto& currentSystematic : *
m_config->systSgKeyMapSoftMuons()) {
475 "Failed to retrieve softmuons");
478 for (
const xAOD::Muon* muonPtr : *softmuons) {
480 bool passSelection(
false);
481 if (muonPtr->isAvailable<
char>(
"passPreORSelection")) {
482 if (muonPtr->auxdataConst<
char>(
"passPreORSelection") == 1) {
483 passSelection =
true;
487 if (!passSelection)
continue;
503 if (currentSystematic.first !=
m_config->nominalHashValue())
continue;
510 return StatusCode::SUCCESS;
◆ 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
◆ 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
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ initialize()
StatusCode top::MuonScaleFactorCalculator::initialize |
( |
| ) |
|
|
virtual |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
– Not a good reason for this happening at the moment –///
– Not a good reason for this happening at the moment –///
Reimplemented from asg::AsgTool.
Definition at line 143 of file MuonScaleFactorCalculator.cxx.
144 ATH_MSG_INFO(
" top::MuonScaleFactorCalculator initialize");
148 ToolHandle<CP::IMuonTriggerScaleFactors>(
"MuonTriggerScaleFactorsLoose_R21");
150 std::set<std::string> implemented_systematics;
151 if (
m_config->muonBreakDownSystematics()) {
152 implemented_systematics = {
154 "MUON_EFF_ISO_BKGFRACTION",
155 "MUON_EFF_ISO_DRMUJ",
156 "MUON_EFF_ISO_LUMIUNCERT",
157 "MUON_EFF_ISO_MCXSEC",
158 "MUON_EFF_ISO_MLLWINDOW",
159 "MUON_EFF_ISO_QCDTEMPLATE",
160 "MUON_EFF_ISO_SHERPA_POWHEG",
161 "MUON_EFF_ISO_SUPRESSIONSCALE",
162 "MUON_EFF_ISO_EXTRAPOLATION",
163 "MUON_EFF_RECO_BKGFRACTION",
164 "MUON_EFF_RECO_FITMODEL_LOWPT",
165 "MUON_EFF_RECO_LUMIUNCERT",
166 "MUON_EFF_RECO_MATCHING",
167 "MUON_EFF_RECO_MATCHING_LOWPT",
168 "MUON_EFF_RECO_MCXSEC",
169 "MUON_EFF_RECO_PTDEPENDENCY",
170 "MUON_EFF_RECO_QCDTEMPLATE",
171 "MUON_EFF_RECO_STAT",
172 "MUON_EFF_RECO_STAT_LOWPT",
173 "MUON_EFF_RECO_SUPRESSIONSCALE",
174 "MUON_EFF_RECO_TRUTH",
175 "MUON_EFF_RECO_TRUTH_LOWPT",
179 "MUON_EFF_RECO_HIGHETA_PROBEIP",
180 "MUON_EFF_RECO_HIGHETA_PROBEISO",
181 "MUON_EFF_RECO_TAGPT",
182 "MUON_EFF_RECO_EXTRAPOLATION",
183 "MUON_EFF_TTVA_BKGFRACTION",
184 "MUON_EFF_TTVA_LUMIUNCERT",
185 "MUON_EFF_TTVA_MCXSEC",
186 "MUON_EFF_TTVA_QCDTEMPLATE",
187 "MUON_EFF_TTVA_STAT",
188 "MUON_EFF_TTVA_SUPRESSIONSCALE",
189 "MUON_EFF_TTVA_EXTRAPOLATION",
190 "MUON_EFF_TrigStatUncertainty",
191 "MUON_EFF_TrigSystUncertainty",
192 "MUON_EFF_RECO_EXTRAPOLATION_LOWPT",
194 if (
m_config->muonQuality() ==
"HighPt" ||
m_config->muonQualityLoose() ==
"HighPt") {
195 implemented_systematics.insert(
"MUON_EFF_BADMUON_PTDEPENDENCY");
200 implemented_systematics = {
201 "MUON_EFF_RECO_STAT",
202 "MUON_EFF_RECO_STAT_LOWPT",
204 "MUON_EFF_RECO_SYS_LOWPT",
205 "MUON_EFF_TrigStatUncertainty",
206 "MUON_EFF_TrigSystUncertainty",
209 "MUON_EFF_TTVA_STAT",
212 if (
m_config->muonQuality() ==
"HighPt" ||
m_config->muonQualityLoose() ==
"HighPt") {
213 implemented_systematics.insert(
"MUON_EFF_BADMUON_SYS");
217 std::set<std::string> recommended_systematics;
221 recommended_systematics);
223 recommended_systematics);
226 recommended_systematics);
230 recommended_systematics);
234 recommended_systematics);
236 if (
m_config->muonQuality() ==
"HighPt" ||
m_config->muonQualityLoose() ==
"HighPt") {
238 recommended_systematics);
241 if (asg::ToolStore::contains<CP::IMuonEfficiencyScaleFactors>(
"MuonEfficiencyScaleFactorsToolIso")) {
243 recommended_systematics);
247 if (asg::ToolStore::contains<CP::IMuonEfficiencyScaleFactors>(
"MuonEfficiencyScaleFactorsToolLooseIso")) {
249 recommended_systematics);
257 " You can run with MuonIsolation set to"
258 " None if you don't want isolation.");
259 return StatusCode::FAILURE;
264 " You can run with MuonIsolationLoose set to"
265 " None if you don't want isolation.");
266 return StatusCode::FAILURE;
270 recommended_systematics);
273 implemented_systematics),
274 "There are differences between the recommended and implemented"
275 " muon SF systematic uncertainties");
289 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.
◆ 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()
◆ operator=()
◆ 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.
◆ print()
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.
◆ renounce()
◆ renounceArray()
◆ retrieveSystematicTool()
template<typename T >
void top::MuonScaleFactorCalculator::retrieveSystematicTool |
( |
const ToolHandle< T > & |
tool, |
|
|
std::set< std::string > & |
recommended_systematics |
|
) |
| |
|
private |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_config
std::shared_ptr<top::TopConfig> top::MuonScaleFactorCalculator::m_config |
|
private |
◆ m_decor_idSF
std::string top::MuonScaleFactorCalculator::m_decor_idSF |
|
private |
◆ m_decor_idSF_loose
std::string top::MuonScaleFactorCalculator::m_decor_idSF_loose |
|
private |
◆ m_decor_isoSF
std::string top::MuonScaleFactorCalculator::m_decor_isoSF |
|
private |
◆ m_decor_isoSF_loose
std::string top::MuonScaleFactorCalculator::m_decor_isoSF_loose |
|
private |
◆ m_decor_softmuon_idSF
std::string top::MuonScaleFactorCalculator::m_decor_softmuon_idSF |
|
private |
◆ m_decor_triggerEff
std::string top::MuonScaleFactorCalculator::m_decor_triggerEff |
|
private |
◆ m_decor_triggerEff_loose
std::string top::MuonScaleFactorCalculator::m_decor_triggerEff_loose |
|
private |
◆ m_decor_triggerSF
std::string top::MuonScaleFactorCalculator::m_decor_triggerSF |
|
private |
◆ m_decor_triggerSF_loose
std::string top::MuonScaleFactorCalculator::m_decor_triggerSF_loose |
|
private |
◆ m_decor_TTVA
std::string top::MuonScaleFactorCalculator::m_decor_TTVA |
|
private |
◆ m_detStore
◆ m_do_muon_isolation_SFs
bool top::MuonScaleFactorCalculator::m_do_muon_isolation_SFs |
|
private |
◆ m_do_muon_isolation_SFs_loose
bool top::MuonScaleFactorCalculator::m_do_muon_isolation_SFs_loose |
|
private |
◆ m_evtStore
◆ m_iso_bkg_fraction_DOWN
◆ m_iso_bkg_fraction_UP
◆ m_iso_drmuj_DOWN
◆ m_iso_drmuj_UP
◆ m_iso_extrapolation_DOWN
◆ m_iso_extrapolation_UP
◆ m_iso_lumi_uncert_DOWN
◆ m_iso_lumi_uncert_UP
◆ m_iso_mc_xsec_DOWN
◆ m_iso_mc_xsec_UP
◆ m_iso_mllwindow_DOWN
◆ m_iso_mllwindow_UP
◆ m_iso_qcd_template_DOWN
◆ m_iso_qcd_template_UP
◆ m_iso_sherpa_powheg_DOWN
◆ m_iso_sherpa_powheg_UP
◆ m_iso_stat_DOWN
◆ m_iso_stat_UP
◆ m_iso_supression_scale_DOWN
◆ m_iso_supression_scale_UP
◆ m_iso_syst_DOWN
◆ m_iso_syst_UP
◆ m_muon_trigger_sf_config
std::string top::MuonScaleFactorCalculator::m_muon_trigger_sf_config = "" |
|
private |
◆ m_muonEfficiencyCorrectionsTool
◆ m_muonEfficiencyCorrectionsToolBadMuonVeto
◆ m_muonEfficiencyCorrectionsToolIso
◆ m_muonEfficiencyCorrectionsToolLoose
◆ m_muonEfficiencyCorrectionsToolLooseIso
◆ m_muonEfficiencyCorrectionsToolTTVA
◆ m_muonTriggerScaleFactors
◆ m_muonTriggerScaleFactors_2015
◆ m_muonTriggerScaleFactors_2016
◆ m_muonTriggerScaleFactors_R21
◆ m_muonTriggerScaleFactorsLoose
◆ m_muonTriggerScaleFactorsLoose_2015
◆ m_muonTriggerScaleFactorsLoose_2016
◆ m_muonTriggerScaleFactorsLoose_R21
◆ m_reco_bad_muon_veto_DOWN
◆ m_reco_bad_muon_veto_UP
◆ m_reco_bkg_fraction_DOWN
◆ m_reco_bkg_fraction_UP
◆ m_reco_cr1_DOWN
◆ m_reco_cr1_UP
◆ m_reco_cr2_DOWN
◆ m_reco_cr2_UP
◆ m_reco_cr3_DOWN
◆ m_reco_cr3_UP
◆ m_reco_extrapolation_DOWN
◆ m_reco_extrapolation_lowpt_DOWN
◆ m_reco_extrapolation_lowpt_UP
◆ m_reco_extrapolation_UP
◆ m_reco_fit_model_lowpt_DOWN
◆ m_reco_fit_model_lowpt_UP
◆ m_reco_higheta_probeip_DOWN
◆ m_reco_higheta_probeip_UP
◆ m_reco_higheta_probeiso_DOWN
◆ m_reco_higheta_probeiso_UP
◆ m_reco_lumi_uncert_DOWN
◆ m_reco_lumi_uncert_UP
◆ m_reco_matching_DOWN
◆ m_reco_matching_lowpt_DOWN
◆ m_reco_matching_lowpt_UP
◆ m_reco_matching_UP
◆ m_reco_mc_xsec_DOWN
◆ m_reco_mc_xsec_UP
◆ m_reco_pt_dependency_DOWN
◆ m_reco_pt_dependency_UP
◆ m_reco_qcd_template_DOWN
◆ m_reco_qcd_template_UP
◆ m_reco_stat_DOWN
◆ m_reco_stat_lowpt_DOWN
◆ m_reco_stat_lowpt_UP
◆ m_reco_stat_UP
◆ m_reco_supression_scale_DOWN
◆ m_reco_supression_scale_UP
◆ m_reco_syst_DOWN
◆ m_reco_syst_lowpt_DOWN
◆ m_reco_syst_lowpt_UP
◆ m_reco_syst_UP
◆ m_reco_tagpt_DOWN
◆ m_reco_tagpt_UP
◆ m_reco_truth_DOWN
◆ m_reco_truth_lowpt_DOWN
◆ m_reco_truth_lowpt_UP
◆ m_reco_truth_UP
◆ m_softmuonEfficiencyCorrectionsTool
◆ m_systNominal
◆ m_trig_sf_stat_DOWN
◆ m_trig_sf_stat_UP
◆ m_trig_sf_syst_DOWN
◆ m_trig_sf_syst_UP
◆ m_TTVA_bkg_fraction_DOWN
◆ m_TTVA_bkg_fraction_UP
◆ m_TTVA_extrapolation_DOWN
◆ m_TTVA_extrapolation_UP
◆ m_TTVA_lumi_uncert_DOWN
◆ m_TTVA_lumi_uncert_UP
◆ m_TTVA_mc_xsec_DOWN
◆ m_TTVA_mc_xsec_UP
◆ m_TTVA_qcd_template_DOWN
◆ m_TTVA_qcd_template_UP
◆ m_TTVA_stat_DOWN
◆ m_TTVA_stat_UP
◆ m_TTVA_supression_scale_DOWN
◆ m_TTVA_supression_scale_UP
◆ m_TTVA_syst_DOWN
◆ m_TTVA_syst_UP
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
ToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencyCorrectionsToolTTVA
void decorateTTVASystematics(const xAOD::Muon &muon)
void decorateTriggerSF(ToolHandle< CP::IMuonTriggerScaleFactors > &tool, const ConstDataVector< xAOD::MuonContainer > &muon_cont, const SG::AuxElement::Decorator< float > &decor)
CP::SystematicSet m_reco_fit_model_lowpt_UP
CP::SystematicSet m_iso_syst_DOWN
std::string m_decor_triggerEff_loose
CP::SystematicSet m_reco_matching_DOWN
CP::SystematicSet m_iso_bkg_fraction_UP
CP::SystematicSet m_reco_truth_lowpt_DOWN
CP::SystematicSet m_reco_truth_DOWN
CP::SystematicSet m_iso_lumi_uncert_UP
CP::SystematicSet m_iso_bkg_fraction_DOWN
ToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencyCorrectionsTool
CP::SystematicSet m_iso_supression_scale_UP
CP::SystematicSet m_iso_sherpa_powheg_DOWN
CP::SystematicSet m_reco_mc_xsec_UP
CP::SystematicSet m_reco_bad_muon_veto_DOWN
CP::SystematicSet m_reco_matching_lowpt_UP
CP::SystematicSet m_reco_pt_dependency_UP
CP::SystematicSet m_trig_sf_stat_DOWN
std::string m_decor_triggerEff
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
void decorateTrigSFandEff(ToolHandle< CP::IMuonTriggerScaleFactors > &tool, const CP::SystematicSet &systematic, const ConstDataVector< xAOD::MuonContainer > &muon_cont, const SG::AuxElement::Decorator< float > &sf_decor, const SG::AuxElement::Decorator< float > &eff_decor)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencyCorrectionsToolIso
void decorateIsolationSystematics(const xAOD::Muon &muon)
CP::SystematicSet m_reco_tagpt_DOWN
CP::SystematicSet m_reco_mc_xsec_DOWN
CP::SystematicSet m_reco_syst_lowpt_UP
CP::SystematicSet m_reco_fit_model_lowpt_DOWN
bool empty() const
returns: whether the set is empty
CP::SystematicSet m_reco_lumi_uncert_UP
CP::SystematicSet m_iso_supression_scale_DOWN
CP::SystematicSet m_TTVA_bkg_fraction_UP
CP::SystematicSet m_reco_qcd_template_DOWN
CP::SystematicSet m_reco_truth_lowpt_UP
std::string m_decor_triggerSF
std::string m_muon_trigger_sf_config
CP::SystematicSet m_reco_higheta_probeip_UP
Class to wrap a set of SystematicVariations.
CP::SystematicSet m_reco_matching_UP
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
ToolHandle< CP::IMuonTriggerScaleFactors > m_muonTriggerScaleFactorsLoose_R21
std::vector< SG::VarHandleKeyArray * > m_vhka
std::string m_decor_isoSF_loose
void decorateTriggerEfficiency(ToolHandle< CP::IMuonTriggerScaleFactors > &tool, const xAOD::Muon &muon, const SG::AuxElement::Decorator< float > &decor)
std::string name() const
returns: the systematics joined into a single string.
CP::SystematicSet m_TTVA_syst_DOWN
CP::SystematicSet m_TTVA_syst_UP
std::shared_ptr< top::TopConfig > m_config
CP::SystematicSet m_reco_extrapolation_lowpt_DOWN
CP::SystematicSet m_TTVA_lumi_uncert_UP
CP::SystematicSet m_reco_cr1_UP
CP::SystematicSet m_reco_supression_scale_UP
CP::SystematicSet m_reco_cr3_UP
CP::SystematicSet m_reco_higheta_probeip_DOWN
CP::SystematicSet m_iso_sherpa_powheg_UP
CP::SystematicSet m_TTVA_extrapolation_DOWN
CP::SystematicSet m_trig_sf_stat_UP
CP::SystematicSet m_reco_stat_lowpt_UP
void retrieveSystematicTool(const ToolHandle< T > &tool, std::set< std::string > &recommended_systematics)
std::string m_decor_softmuon_idSF
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
CP::SystematicSet m_reco_supression_scale_DOWN
virtual void setOwner(IDataHandleHolder *o)=0
CP::SystematicSet m_reco_bkg_fraction_DOWN
CP::SystematicSet m_reco_extrapolation_DOWN
CP::SystematicSet m_reco_bkg_fraction_UP
CP::SystematicSet m_trig_sf_syst_DOWN
CP::SystematicSet m_iso_stat_UP
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
CP::SystematicSet m_systNominal
CP::SystematicSet m_TTVA_stat_UP
CP::SystematicSet m_reco_syst_UP
CP::SystematicSet m_reco_stat_DOWN
Helper class to provide type-safe access to aux data.
bool m_do_muon_isolation_SFs
CP::SystematicSet m_TTVA_supression_scale_UP
CP::SystematicSet m_iso_stat_DOWN
CP::SystematicSet m_TTVA_qcd_template_DOWN
CP::SystematicSet m_iso_extrapolation_UP
CP::SystematicSet m_reco_stat_lowpt_DOWN
ToolHandle< CP::IMuonTriggerScaleFactors > m_muonTriggerScaleFactors
CP::SystematicSet m_iso_extrapolation_DOWN
void decorateEfficiencySF(ToolHandle< CP::IMuonEfficiencyScaleFactors > &tool, const CP::SystematicSet &systematic, const xAOD::Muon &muon, const SG::AuxElement::Decorator< float > &decor)
ToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencyCorrectionsToolLooseIso
CP::SystematicSet m_iso_mllwindow_DOWN
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
CP::SystematicSet m_TTVA_lumi_uncert_DOWN
CP::SystematicSet m_iso_syst_UP
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
CP::SystematicSet m_iso_mc_xsec_DOWN
void decorateIDSFandRecoEffSystematicsSoftMuon(const xAOD::Muon &muon)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
CP::SystematicSet m_iso_mllwindow_UP
CP::SystematicSet m_reco_cr3_DOWN
CP::SystematicSet m_TTVA_bkg_fraction_DOWN
CP::SystematicSet m_reco_bad_muon_veto_UP
StatusCode checkSystematicsImplemented(const std::set< std::string > &recommended, const std::set< std::string > &implemented)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::string m_decor_idSF_loose
std::string m_decor_isoSF
CP::SystematicSet m_reco_qcd_template_UP
std::string m_decor_triggerSF_loose
CP::SystematicSet m_TTVA_supression_scale_DOWN
CP::SystematicSet m_reco_cr2_DOWN
CP::SystematicSet m_trig_sf_syst_UP
ToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencyCorrectionsToolBadMuonVeto
CP::SystematicSet m_reco_higheta_probeiso_DOWN
ToolHandle< CP::IMuonTriggerScaleFactors > m_muonTriggerScaleFactorsLoose
ToolHandle< CP::IMuonTriggerScaleFactors > m_muonTriggerScaleFactors_R21
CP::SystematicSet m_reco_lumi_uncert_DOWN
CP::SystematicSet m_iso_lumi_uncert_DOWN
void applySystematicVariation(ToolHandle< T > &tool, const CP::SystematicSet &systematic)
Class describing the basic event information.
CP::SystematicSet m_reco_tagpt_UP
CP::SystematicSet m_TTVA_qcd_template_UP
CP::SystematicSet m_iso_qcd_template_DOWN
void decorateIDSFandRecoEff(ToolHandle< CP::IMuonEfficiencyScaleFactors > &tool, const CP::SystematicSet &systematic, const xAOD::Muon &muon, const SG::AuxElement::Decorator< float > &id_sf_decor)
CP::SystematicSet m_reco_truth_UP
CP::SystematicSet m_TTVA_extrapolation_UP
CP::SystematicSet m_iso_mc_xsec_UP
void decorateIDSFandRecoEffSystematics(const xAOD::Muon &muon)
CP::SystematicSet m_TTVA_mc_xsec_UP
CP::SystematicSet m_iso_qcd_template_UP
void decorateTriggerSystematics(const ConstDataVector< xAOD::MuonContainer > &trigger_SF_muon)
#define ATH_MSG_WARNING(x)
DataVector adapter that acts like it holds const pointers.
CP::SystematicSet m_reco_syst_lowpt_DOWN
ToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencyCorrectionsToolLoose
bool m_do_muon_isolation_SFs_loose
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
CP::SystematicSet m_reco_cr2_UP
CP::SystematicSet m_TTVA_mc_xsec_DOWN
CP::SystematicSet m_reco_matching_lowpt_DOWN
CP::SystematicSet m_TTVA_stat_DOWN
CP::SystematicSet m_reco_pt_dependency_DOWN
CP::SystematicSet m_reco_syst_DOWN
CP::SystematicSet m_reco_stat_UP
CP::SystematicSet m_iso_drmuj_UP
CP::SystematicSet m_reco_extrapolation_UP
ToolHandle< CP::IMuonEfficiencyScaleFactors > m_softmuonEfficiencyCorrectionsTool
CP::SystematicSet m_reco_higheta_probeiso_UP
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
CP::SystematicSet m_iso_drmuj_DOWN
CP::SystematicSet m_reco_extrapolation_lowpt_UP
CP::SystematicSet m_reco_cr1_DOWN