ATLAS Offline Software
Loading...
Searching...
No Matches
CP::IEfficiencyScaleFactorTool Class Referenceabstract

General interface for tools providing analysis efficiency scale factors. More...

#include <IEfficiencyScaleFactorTool.h>

Inheritance diagram for CP::IEfficiencyScaleFactorTool:
Collaboration diagram for CP::IEfficiencyScaleFactorTool:

Public Member Functions

virtual ~IEfficiencyScaleFactorTool ()=default
 Default destructor.
virtual CorrectionCode getEfficiencyScaleFactor (const xAOD::IParticle &p, double &sf) const =0
 Retrieve an efficiency scale factor for a particle type object.
virtual CorrectionCode applyEfficiencyScaleFactor (const xAOD::IParticle &p) const =0
 Decorate a particle with its efficiency scale factor.
virtual bool isAffectedBySystematic (const SystematicVariation &systematic) const =0
 Declare the interface that this class provides.
virtual StatusCode applySystematicVariation (const SystematicSet &systConfig)=0
 effects: configure this tool for the given list of systematic variations.
virtual SystematicSet affectingSystematics () const =0
 the list of all systematics this tool can be affected by
virtual SystematicSet recommendedSystematics () const =0
 the list of all systematics this tool recommends to use
virtual void print () const =0
 Print the state of the tool.

Detailed Description

General interface for tools providing analysis efficiency scale factors.

This is a generic interface that should be implemented by all analysis tools that provide efficiency scale factors for xAOD::IParticle type objects.

Note
If your tool needs type specific variables that the xAOD::IParticle interface doesn't provide, please rely on the xAOD::IParticle::type() function to identify whether you received an appropriate object. And then use static_cast to cast the reference to the right type. Like:
if( p.type() != xAOD::Type::Electron ) {
ATH_MSG_ERROR( "Object of wrong type (" << p.type() << ") received" );
}
const xAOD::Electron& el = static_cast< const xAOD::Electron& >( p );
#define ATH_MSG_ERROR(x)
@ Error
Some error happened during the object correction.
@ Electron
The object is an electron.
Definition ObjectType.h:46
Electron_v1 Electron
Definition of the current "egamma version".

Just be very careful about writing the code correctly, as a wrong static_cast could lead to memory corruption. But since its much faster than dynamic_cast, it's still recommended to use this sort of code.

Revision
790193
Date
2016-12-16 17:36:15 +0100 (Fri, 16 Dec 2016)

Definition at line 51 of file IEfficiencyScaleFactorTool.h.

Constructor & Destructor Documentation

◆ ~IEfficiencyScaleFactorTool()

virtual CP::IEfficiencyScaleFactorTool::~IEfficiencyScaleFactorTool ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ affectingSystematics()

virtual SystematicSet CP::IReentrantSystematicsTool::affectingSystematics ( ) const
pure virtualinherited

the list of all systematics this tool can be affected by

Implemented in AsgElectronEfficiencyCorrectionTool, AsgPhotonEfficiencyCorrectionTool, BaseFakeBkgTool, BTaggingEfficiencyJsonTool, BTaggingEfficiencyTool, BTaggingEigenVectorRecompositionTool, BTaggingTruthTaggingTool, CP::BaseFakeBkgTool, CP::EgammaCalibrationAndSmearingTool, CP::ElectronChargeEfficiencyCorrectionTool, CP::FFJetSmearingTool, CP::IIsolationCorrectionTool, CP::IsolationCorrectionTool, CP::JetQGTagger, CP::JetTileCorrectionTool, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, CP::MuonCalibIntScaleSmearTool, CP::MuonCalibTool, CP::MuonEfficiencyScaleFactors, CP::MuonTriggerScaleFactors, CP::PileupReweightingTool, CP::SystematicsTool, InDet::IInDetTrackBiasingTool, InDet::IInDetTrackSmearingTool, InDet::IInDetTrackTruthFilterTool, InDet::IJetTrackFilterTool, InDet::InclusiveTrackFilterTool, InDet::InDetTrackBiasingTool, InDet::InDetTrackSmearingTool, InDet::InDetTrackSystematicsTool, InDet::InDetTrackTruthFilterTool, InDet::JetTrackFilterTool, JetUncertaintiesTool, met::METSystematicsTool, ParticleScaleFactorTool, PMGTools::PMGHFProductionFractionTool, PMGTools::PMGTruthWeightTool, SimpleElectronEfficiencyCorrectionTool, SimpleMuonTriggerScaleFactors, SimplePhotonEfficiencyCorrectionTool, TauAnalysisTools::CommonEfficiencyTool, TauAnalysisTools::CommonSmearingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, TauAnalysisTools::DiTauSmearingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, TauAnalysisTools::TauSmearingTool, and TrigGlobalEfficiencyCorrectionTool.

◆ applyEfficiencyScaleFactor()

virtual CorrectionCode CP::IEfficiencyScaleFactorTool::applyEfficiencyScaleFactor ( const xAOD::IParticle & p) const
pure virtual

Decorate a particle with its efficiency scale factor.

This function can be used to decorate a particle type object with an efficiency scale factor. The name and type of the scale factor variable is up to the specific tool implementation.

Parameters
pThe particle for which a scale factor is to be calculated
Returns
CP::CorrectionCode::Error in case of a serious problem, CP::CorrectionCode::OutOfValidityRange if no scale factor is available for the received object, or CP::CorrectionCode::Ok if the scale factor could be correctly provided

◆ applySystematicVariation()

virtual StatusCode CP::ISystematicsTool::applySystematicVariation ( const SystematicSet & systConfig)
pure virtualinherited

effects: configure this tool for the given list of systematic variations.

any requested systematics that are not affecting this tool will be silently ignored (unless they cause other errors). failures: systematic unknown failures: requesting multiple variations on the same systematic (e.g. up & down) failures: requesting an unsupported variation on an otherwise supported systematic (e.g. a 2 sigma variation and the tool only supports 1 sigma variations) failures: unsupported combination of supported systematic failures: other tool specific errors

Implemented in AsgElectronEfficiencyCorrectionTool, AsgPhotonEfficiencyCorrectionTool, BaseFakeBkgTool, BTaggingEfficiencyTool, BTaggingEigenVectorRecompositionTool, BTaggingTruthTaggingTool, CP::BaseFakeBkgTool, CP::EgammaCalibrationAndSmearingTool, CP::ElectronChargeEfficiencyCorrectionTool, CP::FFJetSmearingTool, CP::IIsolationCorrectionTool, CP::IsolationCorrectionTool, CP::JetQGTagger, CP::JetTileCorrectionTool, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, CP::MuonCalibIntScaleSmearTool, CP::MuonCalibTool, CP::MuonEfficiencyScaleFactors, CP::MuonTriggerScaleFactors, CP::PileupReweightingTool, CP::SystematicsTool, InDet::IInDetTrackBiasingTool, InDet::IInDetTrackSmearingTool, InDet::IInDetTrackTruthFilterTool, InDet::IJetTrackFilterTool, InDet::InclusiveTrackFilterTool, InDet::InDetTrackBiasingTool, InDet::InDetTrackSmearingTool, InDet::InDetTrackSystematicsTool, InDet::InDetTrackTruthFilterTool, InDet::JetTrackFilterTool, JetUncertaintiesTool, met::METSystematicsTool, ParticleScaleFactorTool, SimpleElectronEfficiencyCorrectionTool, SimpleMuonTriggerScaleFactors, SimplePhotonEfficiencyCorrectionTool, TauAnalysisTools::CommonEfficiencyTool, TauAnalysisTools::CommonSmearingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, TauAnalysisTools::DiTauSmearingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, TauAnalysisTools::TauSmearingTool, and TrigGlobalEfficiencyCorrectionTool.

◆ getEfficiencyScaleFactor()

virtual CorrectionCode CP::IEfficiencyScaleFactorTool::getEfficiencyScaleFactor ( const xAOD::IParticle & p,
double & sf ) const
pure virtual

Retrieve an efficiency scale factor for a particle type object.

This function is used to retrieve the efficiency scale factor for a specific particle object.

Parameters
pThe particle for which a scale factor is to be calculated
sfA reference to the scale factor variable to be set
Returns
CP::CorrectionCode::Error in case of a serious problem, CP::CorrectionCode::OutOfValidityRange if no scale factor is available for the received object, or CP::CorrectionCode::Ok if the scale factor could be correctly provided

◆ isAffectedBySystematic()

virtual bool CP::ISystematicsTool::isAffectedBySystematic ( const SystematicVariation & systematic) const
pure virtualinherited

Declare the interface that this class provides.

returns: whether this tool is affected by the given systematics

Implemented in AsgElectronEfficiencyCorrectionTool, AsgPhotonEfficiencyCorrectionTool, BaseFakeBkgTool, BTaggingEfficiencyTool, BTaggingEigenVectorRecompositionTool, BTaggingTruthTaggingTool, CP::BaseFakeBkgTool, CP::EgammaCalibrationAndSmearingTool, CP::ElectronChargeEfficiencyCorrectionTool, CP::FFJetSmearingTool, CP::IIsolationCorrectionTool, CP::IsolationCorrectionTool, CP::JetQGTagger, CP::JetTileCorrectionTool, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, CP::MuonCalibIntScaleSmearTool, CP::MuonCalibTool, CP::MuonEfficiencyScaleFactors, CP::MuonTriggerScaleFactors, CP::PileupReweightingTool, CP::SystematicsTool, InDet::IInDetTrackBiasingTool, InDet::IInDetTrackSmearingTool, InDet::IInDetTrackTruthFilterTool, InDet::IJetTrackFilterTool, InDet::InclusiveTrackFilterTool, InDet::InDetTrackBiasingTool, InDet::InDetTrackSmearingTool, InDet::InDetTrackSystematicsTool, InDet::InDetTrackTruthFilterTool, InDet::JetTrackFilterTool, JetUncertaintiesTool, met::METSystematicsTool, ParticleScaleFactorTool, SimpleElectronEfficiencyCorrectionTool, SimpleMuonTriggerScaleFactors, SimplePhotonEfficiencyCorrectionTool, TauAnalysisTools::CommonEfficiencyTool, TauAnalysisTools::CommonSmearingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, TauAnalysisTools::DiTauSmearingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, TauAnalysisTools::TauSmearingTool, and TrigGlobalEfficiencyCorrectionTool.

◆ print()

◆ recommendedSystematics()

virtual SystematicSet CP::IReentrantSystematicsTool::recommendedSystematics ( ) const
pure virtualinherited

the list of all systematics this tool recommends to use

Implemented in AsgElectronEfficiencyCorrectionTool, AsgPhotonEfficiencyCorrectionTool, BaseFakeBkgTool, BTaggingEfficiencyJsonTool, BTaggingEfficiencyTool, BTaggingEigenVectorRecompositionTool, BTaggingTruthTaggingTool, CP::BaseFakeBkgTool, CP::EgammaCalibrationAndSmearingTool, CP::ElectronChargeEfficiencyCorrectionTool, CP::FFJetSmearingTool, CP::IIsolationCorrectionTool, CP::IsolationCorrectionTool, CP::JetQGTagger, CP::JetTileCorrectionTool, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, CP::MuonCalibIntScaleSmearTool, CP::MuonCalibTool, CP::MuonEfficiencyScaleFactors, CP::MuonTriggerScaleFactors, CP::PileupReweightingTool, CP::SystematicsTool, InDet::IInDetTrackBiasingTool, InDet::IInDetTrackSmearingTool, InDet::IInDetTrackTruthFilterTool, InDet::IJetTrackFilterTool, InDet::InclusiveTrackFilterTool, InDet::InDetTrackBiasingTool, InDet::InDetTrackSmearingTool, InDet::InDetTrackSystematicsTool, InDet::InDetTrackTruthFilterTool, InDet::JetTrackFilterTool, JetUncertaintiesTool, met::METSystematicsTool, ParticleScaleFactorTool, PMGTools::PMGHFProductionFractionTool, PMGTools::PMGTruthWeightTool, SimpleElectronEfficiencyCorrectionTool, SimpleMuonTriggerScaleFactors, SimplePhotonEfficiencyCorrectionTool, TauAnalysisTools::CommonEfficiencyTool, TauAnalysisTools::CommonSmearingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, TauAnalysisTools::DiTauSmearingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, TauAnalysisTools::TauSmearingTool, and TrigGlobalEfficiencyCorrectionTool.


The documentation for this class was generated from the following file: