CP::PileupReweightingTool Class Reference

#include <PileupReweightingTool.h>

Inheritance diagram for CP::PileupReweightingTool:
asg::AsgTool CP::TPileupReweighting CP::IPileupReweightingTool asg::IAsgTool CP::ISystematicsTool asg::IAsgTool

List of all members.

Public Member Functions

virtual UInt_t GetRandomLumiBlockNumber (UInt_t runNumber)
 Get a random lumiblock number for the given run number.
virtual Double_t GetIntegratedLumi (UInt_t start, UInt_t end)
 Get the integrated luminosity (in pb-1) between start and end run (inclusive).
virtual Double_t GetIntegratedLumi (const TString &trigger)
 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)
virtual Double_t GetIntegratedLumiFraction (Int_t periodNumber, UInt_t start, UInt_t end)
virtual Double_t GetIntegratedLumiFraction (Int_t periodNumber, Double_t mu, UInt_t start, UInt_t end)
virtual Int_t AddPeriod (Int_t periodNumber, UInt_t start, UInt_t end)
 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)
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)
virtual Int_t SetBinning (TH1 *hist)
virtual Double_t GetSumOfEventWeights (Int_t channel)
 helpful alternative to using the EventBookkeepers info ... assuming you made your PRW Config file!!
virtual Double_t GetNumberOfEvents (Int_t channel)
 PileupReweightingTool (const std::string &name)
 Constructor for standalone usage.
virtual StatusCode initialize ()
 Function initialising the tool.
virtual StatusCode finalize ()
 Finalize - can call the WriteToFile for us.
virtual StatusCode apply (const xAOD::EventInfo &eventInfo, bool mu_dependent)
virtual float getCombinedWeight (const xAOD::EventInfo &eventInfo)
 Return combined pileup weight.
virtual float getCombinedWeight (const xAOD::EventInfo &eventInfo, Double_t x, Double_t y)
 Same as above, but for a 'custom weight' variable.
virtual float getCombinedWeight (const xAOD::EventInfo &eventInfo, const TString &trigger, bool mu_dependent)
 get combined weight (i.e. pileup weight) but with a 1./dataWeight factor applied, this if used for 'prescaling' MC
virtual ULong64_t getPRWHash (const xAOD::EventInfo &eventInfo)
 return the prw hash used for fast updates of weights at the post-processing level ... see the share/makeWeightTree.C script for usage
virtual float getCorrectedAverageInteractionsPerCrossing (const xAOD::EventInfo &eventInfo, bool includeDataScaleFactor)
 Get the mu of a lumiblock ... needed to 'correct' the number in datasets.
virtual float getCorrectedActualInteractionsPerCrossing (const xAOD::EventInfo &eventInfo, bool includeDataScaleFactor)
 Get the corrected 'actual' interactions per crossing.
virtual double getLumiBlockIntegratedLumi (const xAOD::EventInfo &eventInfo)
 Get the integrated lumi of a lumiblock (in pb-1).
virtual float getUnrepresentedDataWeight (const xAOD::EventInfo &eventInfo)
 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)
 Get the dataWeight used to 'unprescale' data collected from a given trigger combination. mu_dependency is recommended to be true.
virtual int getRandomRunNumber (const xAOD::EventInfo &eventInfo, bool mu_dependent)
 Get a random run number for this MC event, using mu-dependent randomization by default ... jetetmiss seem to like it muchly.
virtual int fill (const xAOD::EventInfo &eventInfo)
 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)
 Use this method if you want to do a generic reweighting instead.
virtual CP::TPileupReweightingexpert ()
 Get pointer to the underlying tool - expert use only. Will require include "PileupReweighting/TPileupReweighting.h".
bool isAffectedBySystematic (const CP::SystematicVariation &systematic) const
 The ISystematicsTool methods.
CP::SystematicSet affectingSystematics () const
 returns: the list of all systematics this tool can be affected by
CP::SystematicSet recommendedSystematics () const
 returns: the list of all systematics this tool recommends to use
CP::SystematicCode applySystematicVariation (const CP::SystematicSet &systConfig)
void updateHandler (Property &)

Static Public Member Functions

static Version_t Class_Version ()

Protected Member Functions

virtual bool runLbnOK (Int_t runNbr, Int_t lbn)
virtual bool passTriggerBeforePrescale (const TString &trigger) const

Detailed Description

Implementation of the PileupReweighting tool

Author:
Will Buttinger

Member Function Documentation

StatusCode CP::PileupReweightingTool::apply ( const xAOD::EventInfo eventInfo,
bool  mu_dependent 
) [virtual]

Decorates with: MC: PileupWeight (CombinedWeight[*UnrepresentedDataWeight if action=2]), RandomRunNumber, RandomLumiBlockNumber 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

Implements CP::IPileupReweightingTool.

CP::SystematicCode CP::PileupReweightingTool::applySystematicVariation ( const CP::SystematicSet systConfig  )  [virtual]

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

Implements CP::ISystematicsTool.

virtual Double_t CP::PileupReweightingTool::GetIntegratedLumi ( Int_t  periodNumber,
UInt_t  start,
UInt_t  end 
) [inline, virtual]

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

Implements CP::IPileupReweightingTool.

virtual Double_t CP::PileupReweightingTool::GetIntegratedLumiFraction ( Int_t  periodNumber,
Double_t  mu,
UInt_t  start,
UInt_t  end 
) [inline, virtual]

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

Implements CP::IPileupReweightingTool.

virtual Double_t CP::PileupReweightingTool::GetIntegratedLumiFraction ( Int_t  periodNumber,
UInt_t  start,
UInt_t  end 
) [inline, virtual]

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

Implements CP::IPileupReweightingTool.

int CP::PileupReweightingTool::getRandomRunNumber ( const xAOD::EventInfo eventInfo,
bool  mu_dependent 
) [virtual]

Get a random run number for this MC event, using mu-dependent randomization by default ... jetetmiss seem to like it muchly.

Get a random run number for this MC event, mu_dependency is not recommended for this.

Implements CP::IPileupReweightingTool.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1