ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
ReweightUtils
ReweightUtils
APReweight.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
16
17
#ifndef APReweight_h
18
#define APReweight_h
19
20
#include "
APReweightBase.h
"
21
#include <string>
22
#include <vector>
23
24
class
TTree;
25
class
TH1;
26
class
TH1D;
27
class
TAxis;
28
class
APWeightEntry
;
29
30
class
APReweight
:
public
APReweightBase
{
31
32
public
:
33
APReweight
();
34
APReweight
(TTree* denominator,
const
std::string& denominator_branch, TTree* numerator,
const
std::string& numerator_branch,
unsigned
int
n_bins,
double
x_min,
double
x_max,
bool
isTrig =
false
);
35
APReweight
(std::vector< double > denominator, std::vector< double > numerator,
unsigned
int
n_bins,
double
x_min,
double
x_max,
bool
isTrig =
false
);
36
APReweight
(TH1* denominator_in, TH1* numerator_in,
bool
isTrig =
false
);
37
virtual
~APReweight
();
38
39
void
ReadEfficiency
(TH1* efficiency_in, TH1* err_low_in, TH1* err_high_in = 0);
40
41
APWeightEntry
*
GetBinWeight
(
unsigned
int
bin
)
const
;
42
APWeightEntry
*
GetWeight
(
double
value)
const
;
43
44
double
GetSampleScale
()
const
;
45
unsigned
int
NBins
()
const
;
46
unsigned
int
GetBin
(
double
value)
const
;
47
48
const
TH1D*
GetDenominatorHist
()
const
;
49
const
TH1D*
GetNumeratorHist
()
const
;
50
51
void
SetSystUncert
(
double
rel_uncert);
52
void
SetQuietMode
(
bool
isQuiet =
true
);
53
54
ClassDef(
APReweight
, 1)
55
56
private
:
57
TH1D* m_denominator_hist;
58
TH1D*
m_numerator_hist
;
59
std::vector< APWeightEntry* >
m_weights
;
60
unsigned
int
m_n_bins
;
61
TAxis *
m_axis
;
62
};
63
64
#endif
APReweightBase.h
APReweightBase::APReweightBase
APReweightBase()
Default constructor.
Definition
APReweightBase.cxx:10
APReweight::GetDenominatorHist
const TH1D * GetDenominatorHist() const
Get original denominator histogram.
Definition
APReweight.cxx:158
APReweight::APReweight
APReweight()
Default constructor.
Definition
APReweight.cxx:15
APReweight::~APReweight
virtual ~APReweight()
Default destructor.
Definition
APReweight.cxx:138
APReweight::SetQuietMode
void SetQuietMode(bool isQuiet=true)
Sets the flag to turn off messages.
Definition
APReweight.cxx:190
APReweight::m_n_bins
unsigned int m_n_bins
Holds the amount of bins.
Definition
APReweight.h:60
APReweight::ReadEfficiency
void ReadEfficiency(TH1 *efficiency_in, TH1 *err_low_in, TH1 *err_high_in=0)
Read efficiencies and upper/lower uncertainty (if numerator/denominator not applicable (e....
Definition
APReweight.cxx:120
APReweight::m_numerator_hist
ClassDef(APReweight, 1) private TH1D * m_numerator_hist
< Holds the original denominator histogram.
Definition
APReweight.h:54
APReweight::GetSampleScale
double GetSampleScale() const
Get scale factor that was calculated from sample sizes upon instantiation.
Definition
APReweight.cxx:166
APReweight::GetWeight
APWeightEntry * GetWeight(double value) const
Get Weight entry for a given value.
Definition
APReweight.cxx:154
APReweight::GetBinWeight
APWeightEntry * GetBinWeight(unsigned int bin) const
Get Weight entry for a given bin number.
Definition
APReweight.cxx:149
APReweight::m_weights
std::vector< APWeightEntry * > m_weights
Holds all weight entries.
Definition
APReweight.h:59
APReweight::NBins
unsigned int NBins() const
Get amount of bins.
Definition
APReweight.cxx:170
APReweight::GetNumeratorHist
const TH1D * GetNumeratorHist() const
Get original numerator histogram.
Definition
APReweight.cxx:162
APReweight::GetBin
unsigned int GetBin(double value) const
Get bin number that corresponds to a given value.
Definition
APReweight.cxx:174
APReweight::m_axis
TAxis * m_axis
Holds the axis of the APReweight instance (from input histograms).
Definition
APReweight.h:61
APReweight::SetSystUncert
void SetSystUncert(double rel_uncert)
Set the global relative (!) systematic uncertainty of all efficiencies/weights.
Definition
APReweight.cxx:184
APWeightEntry
Class to store a single weight entry (one bin).
Definition
APWeightEntry.h:25
bin
Definition
BinsDiffFromStripMedian.h:43
Generated on
for ATLAS Offline Software by
1.17.0