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

#include <IPileupReweightingTool.h>

Inheritance diagram for CP::IPileupReweightingTool:
Collaboration diagram for CP::IPileupReweightingTool:

Public Member Functions

virtual float getCombinedWeight (const xAOD::EventInfo &eventInfo, bool correctUnrepresented=false)=0
 Return combined pileup weight.
virtual float getCombinedWeight (const xAOD::EventInfo &eventInfo, Double_t x, Double_t y=0., bool correctUnrepresented=false)=0
 Same as above, but for a 'custom weight' variable.
virtual float getCombinedWeight (const xAOD::EventInfo &eventInfo, const TString &trigger, bool mu_dependent=true, bool correctUnrepresented=false)=0
 get combined weight (i.e. pileup weight) but with a 1./dataWeight factor applied, this if used for 'prescaling' MC
virtual float getUnrepresentedDataWeight (const xAOD::EventInfo &eventInfo)=0
 When using UnrepresentedDataAction=2, you may want to apply this additional weight to ensure sum of weights are preserved.
virtual float getDataWeight (const xAOD::EventInfo &eventInfo, const TString &trigger, bool mu_dependent=true)=0
 Get the dataWeight used to 'unprescale' data collected from a given trigger combination. mu_dependency is recommended to be true.
virtual float getPrescaleWeight (const xAOD::EventInfo &eventInfo, const TString &trigger, bool mu_dependent=true)=0
 Get weight used to 'prescale' Monte Carlo for given trigger comibnation.
virtual int getRandomRunNumber (const xAOD::EventInfo &eventInfo, bool mu_dependent=true)=0
 Get a random run number for this MC event, mu_dependency is recommended ... jetetmiss seem to like it muchly.
virtual float getCorrectedMu (const xAOD::EventInfo &eventInfo, bool includedDataScaleFactor=false)
 Get the corrected average mu of a lumiblock ... (averaging is over all filled BCID in the fill) The additional flag indicates if the returned value should include the data scale factor or not.
virtual float getCorrectedAverageInteractionsPerCrossing (const xAOD::EventInfo &eventInfo, bool includedDataScaleFactor=false)=0
virtual float getCorrectedActualInteractionsPerCrossing (const xAOD::EventInfo &eventInfo, bool includedDataScaleFactor=false)=0
 Get the actual mu of a lumiblock ... (BCID-specific mu) The additional flag indicates if the returned value should include the data scale factor or not.
virtual double getLumiBlockIntegratedLumi (const xAOD::EventInfo &eventInfo)=0
 Get the integrated lumi of a lumiblock (in pb-1)
virtual StatusCode apply (const xAOD::EventInfo &eventInfo, bool mu_dependent=true)=0
 Decorates with: MC: PileupWeight (CombinedWeight[*UnrepresentedDataWeight if action=2]), RandomRunNumber, RandomLumiBlockNumber, PRWHash Data: corrected_averageInteractionsPerCrossing mu_dependent says if the mu_dependency should be used for random run numbers or the data weights.
virtual ULong64_t getPRWHash (const xAOD::EventInfo &eventInfo)=0
 return the prw hash used for fast updates of weights at the post-processing level ... see the share/makeWeightTree.C script for usage
virtual UInt_t GetRandomLumiBlockNumber (UInt_t runNumber)=0
 Get a random lumiblock number for the given run number.
virtual Double_t GetSumOfEventWeights (Int_t channel)=0
 possible alternative to using the EventBookkeepers info ... assuming you made your PRW Config file!!
virtual Double_t GetNumberOfEvents (Int_t channel)=0
virtual Double_t GetIntegratedLumi (UInt_t start, UInt_t end)=0
 Get the integrated luminosity (in pb-1) between start and end run (inclusive)
virtual Double_t GetIntegratedLumi (const TString &trigger="")=0
 Total lumi (in pb-1) for a given trigger combination .. leave blank for the unprescaled.
virtual Double_t GetIntegratedLumi (Int_t periodNumber, UInt_t start, UInt_t end)=0
 similar to above, but for only the given mcRunNumber/periodNumber
virtual Double_t GetIntegratedLumiFraction (Int_t periodNumber, UInt_t start, UInt_t end)=0
 return fraction of lumi assigned to periodNumber (or mcRunNumber) that is between start and end data run numbers
virtual Double_t GetIntegratedLumiFraction (Int_t periodNumber, Double_t mu, UInt_t start, UInt_t end)=0
 return fraction of lumi assigned to periodNumber (or mcRunNumber) with given mu, that is between start and end data run numbers
virtual Int_t AddPeriod (Int_t periodNumber, UInt_t start, UInt_t end)=0
 use these methods when generating config files
virtual Int_t SetBinning (Int_t nbinsx, Double_t *xbins, Int_t nbinsy=0, Double_t *ybins=0)=0
virtual Int_t SetUniformBinning (Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy=0, Double_t ylow=0, Double_t yup=0)=0
virtual Int_t SetBinning (TH1 *hist)=0
virtual int fill (const xAOD::EventInfo &eventInfo)=0
 Call this method once per event when in config file generating mode and you want standard mu reweighting.
virtual int fill (const xAOD::EventInfo &eventInfo, Double_t x, Double_t y=0.)=0
 Use this method if you want to do a generic reweighting instead.
virtual CP::TPileupReweightingexpert ()=0
 Get pointer to the underlying tool - expert use only: Will require #include "PileupReweighting/TPileupReweighting.h".
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

Definition at line 28 of file IPileupReweightingTool.h.

Member Function Documentation

◆ AddPeriod()

virtual Int_t CP::IPileupReweightingTool::AddPeriod ( Int_t periodNumber,
UInt_t start,
UInt_t end )
pure virtual

use these methods when generating config files

Implemented in CP::PileupReweightingTool.

◆ 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.

◆ apply()

virtual StatusCode CP::IPileupReweightingTool::apply ( const xAOD::EventInfo & eventInfo,
bool mu_dependent = true )
pure virtual

Decorates with: MC: PileupWeight (CombinedWeight[*UnrepresentedDataWeight if action=2]), RandomRunNumber, RandomLumiBlockNumber, PRWHash Data: corrected_averageInteractionsPerCrossing mu_dependent says if the mu_dependency should be used for random run numbers or the data weights.

You will get random run numbers of 0 for events with zero pileup weight

Implemented in CP::PileupReweightingTool.

◆ 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.

◆ expert()

virtual CP::TPileupReweighting * CP::IPileupReweightingTool::expert ( )
pure virtual

Get pointer to the underlying tool - expert use only: Will require #include "PileupReweighting/TPileupReweighting.h".

Implemented in CP::PileupReweightingTool.

◆ fill() [1/2]

virtual int CP::IPileupReweightingTool::fill ( const xAOD::EventInfo & eventInfo)
pure virtual

Call this method once per event when in config file generating mode and you want standard mu reweighting.

Implemented in CP::PileupReweightingTool.

◆ fill() [2/2]

virtual int CP::IPileupReweightingTool::fill ( const xAOD::EventInfo & eventInfo,
Double_t x,
Double_t y = 0. )
pure virtual

Use this method if you want to do a generic reweighting instead.

Implemented in CP::PileupReweightingTool.

◆ getCombinedWeight() [1/3]

virtual float CP::IPileupReweightingTool::getCombinedWeight ( const xAOD::EventInfo & eventInfo,
bool correctUnrepresented = false )
pure virtual

Return combined pileup weight.

Implemented in CP::PileupReweightingTool.

◆ getCombinedWeight() [2/3]

virtual float CP::IPileupReweightingTool::getCombinedWeight ( const xAOD::EventInfo & eventInfo,
const TString & trigger,
bool mu_dependent = true,
bool correctUnrepresented = false )
pure virtual

get combined weight (i.e. pileup weight) but with a 1./dataWeight factor applied, this if used for 'prescaling' MC

Implemented in CP::PileupReweightingTool.

◆ getCombinedWeight() [3/3]

virtual float CP::IPileupReweightingTool::getCombinedWeight ( const xAOD::EventInfo & eventInfo,
Double_t x,
Double_t y = 0.,
bool correctUnrepresented = false )
pure virtual

Same as above, but for a 'custom weight' variable.

Implemented in CP::PileupReweightingTool.

◆ getCorrectedActualInteractionsPerCrossing()

virtual float CP::IPileupReweightingTool::getCorrectedActualInteractionsPerCrossing ( const xAOD::EventInfo & eventInfo,
bool includedDataScaleFactor = false )
pure virtual

Get the actual mu of a lumiblock ... (BCID-specific mu) The additional flag indicates if the returned value should include the data scale factor or not.

Note: if the lumiblock is not present in the input lumicalc file, then -1.0 will be returned

Implemented in CP::PileupReweightingTool.

◆ getCorrectedAverageInteractionsPerCrossing()

virtual float CP::IPileupReweightingTool::getCorrectedAverageInteractionsPerCrossing ( const xAOD::EventInfo & eventInfo,
bool includedDataScaleFactor = false )
pure virtual

Implemented in CP::PileupReweightingTool.

◆ getCorrectedMu()

virtual float CP::IPileupReweightingTool::getCorrectedMu ( const xAOD::EventInfo & eventInfo,
bool includedDataScaleFactor = false )
inlinevirtual

Get the corrected average mu of a lumiblock ... (averaging is over all filled BCID in the fill) The additional flag indicates if the returned value should include the data scale factor or not.

Note: if the lumiblock is not present in the input lumicalc file, then -1.0 will be returned This method will soon be deprecated in favour of the new naming: getCorrectedAverageInteractionsPerCrossing

Definition at line 61 of file IPileupReweightingTool.h.

61 {
62 return getCorrectedAverageInteractionsPerCrossing( eventInfo, includedDataScaleFactor );
63 }
virtual float getCorrectedAverageInteractionsPerCrossing(const xAOD::EventInfo &eventInfo, bool includedDataScaleFactor=false)=0

◆ getDataWeight()

virtual float CP::IPileupReweightingTool::getDataWeight ( const xAOD::EventInfo & eventInfo,
const TString & trigger,
bool mu_dependent = true )
pure virtual

Get the dataWeight used to 'unprescale' data collected from a given trigger combination. mu_dependency is recommended to be true.

Implemented in CP::PileupReweightingTool.

◆ GetIntegratedLumi() [1/3]

virtual Double_t CP::IPileupReweightingTool::GetIntegratedLumi ( const TString & trigger = "")
pure virtual

Total lumi (in pb-1) for a given trigger combination .. leave blank for the unprescaled.

Implemented in CP::PileupReweightingTool.

◆ GetIntegratedLumi() [2/3]

virtual Double_t CP::IPileupReweightingTool::GetIntegratedLumi ( Int_t periodNumber,
UInt_t start,
UInt_t end )
pure virtual

similar to above, but for only the given mcRunNumber/periodNumber

Implemented in CP::PileupReweightingTool.

◆ GetIntegratedLumi() [3/3]

virtual Double_t CP::IPileupReweightingTool::GetIntegratedLumi ( UInt_t start,
UInt_t end )
pure virtual

Get the integrated luminosity (in pb-1) between start and end run (inclusive)

Implemented in CP::PileupReweightingTool.

◆ GetIntegratedLumiFraction() [1/2]

virtual Double_t CP::IPileupReweightingTool::GetIntegratedLumiFraction ( Int_t periodNumber,
Double_t mu,
UInt_t start,
UInt_t end )
pure virtual

return fraction of lumi assigned to periodNumber (or mcRunNumber) with given mu, that is between start and end data run numbers

Implemented in CP::PileupReweightingTool.

◆ GetIntegratedLumiFraction() [2/2]

virtual Double_t CP::IPileupReweightingTool::GetIntegratedLumiFraction ( Int_t periodNumber,
UInt_t start,
UInt_t end )
pure virtual

return fraction of lumi assigned to periodNumber (or mcRunNumber) that is between start and end data run numbers

Implemented in CP::PileupReweightingTool.

◆ getLumiBlockIntegratedLumi()

virtual double CP::IPileupReweightingTool::getLumiBlockIntegratedLumi ( const xAOD::EventInfo & eventInfo)
pure virtual

Get the integrated lumi of a lumiblock (in pb-1)

Implemented in CP::PileupReweightingTool.

◆ GetNumberOfEvents()

virtual Double_t CP::IPileupReweightingTool::GetNumberOfEvents ( Int_t channel)
pure virtual

Implemented in CP::PileupReweightingTool.

◆ getPrescaleWeight()

virtual float CP::IPileupReweightingTool::getPrescaleWeight ( const xAOD::EventInfo & eventInfo,
const TString & trigger,
bool mu_dependent = true )
pure virtual

Get weight used to 'prescale' Monte Carlo for given trigger comibnation.

Implemented in CP::PileupReweightingTool.

◆ getPRWHash()

virtual ULong64_t CP::IPileupReweightingTool::getPRWHash ( const xAOD::EventInfo & eventInfo)
pure virtual

return the prw hash used for fast updates of weights at the post-processing level ... see the share/makeWeightTree.C script for usage

Implemented in CP::PileupReweightingTool.

◆ GetRandomLumiBlockNumber()

virtual UInt_t CP::IPileupReweightingTool::GetRandomLumiBlockNumber ( UInt_t runNumber)
pure virtual

Get a random lumiblock number for the given run number.

Implemented in CP::PileupReweightingTool.

◆ getRandomRunNumber()

virtual int CP::IPileupReweightingTool::getRandomRunNumber ( const xAOD::EventInfo & eventInfo,
bool mu_dependent = true )
pure virtual

Get a random run number for this MC event, mu_dependency is recommended ... jetetmiss seem to like it muchly.

Implemented in CP::PileupReweightingTool.

◆ GetSumOfEventWeights()

virtual Double_t CP::IPileupReweightingTool::GetSumOfEventWeights ( Int_t channel)
pure virtual

possible alternative to using the EventBookkeepers info ... assuming you made your PRW Config file!!

Implemented in CP::PileupReweightingTool.

◆ getUnrepresentedDataWeight()

virtual float CP::IPileupReweightingTool::getUnrepresentedDataWeight ( const xAOD::EventInfo & eventInfo)
pure virtual

When using UnrepresentedDataAction=2, you may want to apply this additional weight to ensure sum of weights are preserved.

Implemented in CP::PileupReweightingTool.

◆ 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.

◆ SetBinning() [1/2]

virtual Int_t CP::IPileupReweightingTool::SetBinning ( Int_t nbinsx,
Double_t * xbins,
Int_t nbinsy = 0,
Double_t * ybins = 0 )
pure virtual

Implemented in CP::PileupReweightingTool.

◆ SetBinning() [2/2]

virtual Int_t CP::IPileupReweightingTool::SetBinning ( TH1 * hist)
pure virtual

Implemented in CP::PileupReweightingTool.

◆ SetUniformBinning()

virtual Int_t CP::IPileupReweightingTool::SetUniformBinning ( Int_t nbinsx,
Double_t xlow,
Double_t xup,
Int_t nbinsy = 0,
Double_t ylow = 0,
Double_t yup = 0 )
pure virtual

Implemented in CP::PileupReweightingTool.


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