00001
00004 #ifndef PILEUPREWEIGHTING_IPILEUPREWEIGHTINGTOOL_H
00005 #define PILEUPREWEIGHTING_IPILEUPREWEIGHTINGTOOL_H
00006
00007 #include "AsgTools/IAsgTool.h"
00008 #include "TString.h"
00009 #include "xAODEventInfo/EventInfo.h"
00010
00011 #include "PATInterfaces/ISystematicsTool.h"
00012 #include "AsgAnalysisInterfaces/IGoodRunsListSelectionTool.h"
00013
00016
00017
00018
00019 class TH1;
00020
00021 namespace CP {
00022 class TPileupReweighting;
00023
00024 class IPileupReweightingTool : virtual public CP::ISystematicsTool
00025 {
00026
00027 ASG_TOOL_INTERFACE( CP::IPileupReweightingTool )
00028
00029 public:
00030
00031
00033 virtual float getCombinedWeight( const xAOD::EventInfo& eventInfo ) = 0;
00034
00036 virtual float getCombinedWeight( const xAOD::EventInfo& eventInfo,Double_t x, Double_t y=0. ) = 0;
00037
00039 virtual float getCombinedWeight( const xAOD::EventInfo& eventInfo , const TString& trigger, bool mu_dependent=true ) = 0;
00040
00042 virtual float getUnrepresentedDataWeight( const xAOD::EventInfo& eventInfo ) = 0;
00043
00045 virtual float getDataWeight( const xAOD::EventInfo& eventInfo, const TString& trigger, bool mu_dependent=true ) = 0;
00046
00048 virtual int getRandomRunNumber( const xAOD::EventInfo& eventInfo , bool mu_dependent=true) = 0;
00049
00054 virtual float getCorrectedMu( const xAOD::EventInfo& eventInfo, bool includedDataScaleFactor=false ) {
00055 return getCorrectedAverageInteractionsPerCrossing( eventInfo, includedDataScaleFactor );
00056 }
00057 virtual float getCorrectedAverageInteractionsPerCrossing( const xAOD::EventInfo& eventInfo, bool includedDataScaleFactor=false ) = 0;
00058
00062 virtual float getCorrectedActualInteractionsPerCrossing( const xAOD::EventInfo& eventInfo, bool includedDataScaleFactor=false ) = 0;
00063
00065 virtual double getLumiBlockIntegratedLumi( const xAOD::EventInfo& eventInfo ) = 0;
00066
00071 virtual StatusCode apply ( const xAOD::EventInfo& eventInfo, bool mu_dependent=true ) = 0;
00072
00073
00075 virtual ULong64_t getPRWHash( const xAOD::EventInfo& eventInfo ) = 0;
00076
00077
00078
00080 virtual UInt_t GetRandomLumiBlockNumber(UInt_t runNumber) = 0;
00081
00083 virtual Double_t GetSumOfEventWeights(Int_t channel) = 0;
00084 virtual Double_t GetNumberOfEvents(Int_t channel) = 0;
00085
00087 virtual Double_t GetIntegratedLumi(UInt_t start, UInt_t end) = 0;
00089 virtual Double_t GetIntegratedLumi(const TString& trigger="") = 0;
00091 virtual Double_t GetIntegratedLumi(Int_t periodNumber, UInt_t start, UInt_t end) = 0;
00093 virtual Double_t GetIntegratedLumiFraction(Int_t periodNumber, UInt_t start, UInt_t end) = 0;
00095 virtual Double_t GetIntegratedLumiFraction(Int_t periodNumber, Double_t mu, UInt_t start, UInt_t end) = 0;
00096
00097
00099 virtual Int_t AddPeriod(Int_t periodNumber, UInt_t start, UInt_t end) = 0;
00100 virtual Int_t SetBinning(Int_t nbinsx, Double_t* xbins, Int_t nbinsy=0, Double_t* ybins=0) = 0;
00101 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;
00102 virtual Int_t SetBinning(TH1* hist) = 0;
00103
00105 virtual int fill( const xAOD::EventInfo& eventInfo ) = 0;
00106
00108 virtual int fill( const xAOD::EventInfo& eventInfo, Double_t x, Double_t y=0.) = 0;
00109
00110
00112 virtual CP::TPileupReweighting* expert() = 0;
00113
00114
00115 };
00116
00117 }
00118
00119
00120
00121 #endif