ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
ReweightUtils
ReweightUtils
APWeightHist.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
16
17
#ifndef APWeightHist_h
18
#define APWeightHist_h
19
#include "TH1D.h"
20
#include <string>
21
22
class
APWeightEntry
;
23
class
TGraphErrors;
24
class
TGraphAsymmErrors;
25
26
class
APWeightHist
:
public
TH1D {
27
28
public
:
29
APWeightHist
(
const
char
*name,
const
char
*title,
const
int
n_bins,
const
float
x_min,
const
float
x_max);
30
APWeightHist
();
31
~APWeightHist
();
32
using
TH1D::Fill;
33
int
Fill
(
const
double
value,
APWeightEntry
* weight);
34
TGraphAsymmErrors*
GetGraphStatUncert
(
bool
autocompute =
true
);
35
TGraphErrors*
GetGraphSystUncert
(
bool
simple =
true
,
bool
autocompute =
true
);
36
void
ComputeGraph
(
const
int
prec = 250);
37
TH1D*
GetBinPDF
(
unsigned
int
bin
,
bool
autocompute =
true
);
/* Retrieves the PDF of a bin (starting with bin=1 in accordance with the TH1 classes, over- & underflow bins not accessible) */
38
39
ClassDef
(
APWeightHist
,1);
40
41
private
:
42
double
m_computed_entries
;
43
std::vector< std::vector< APWeightEntry* > >
m_binned_weights
;
44
std::vector< TH1D* >
m_bin_dists
;
45
std::vector< double >
m_SumSys2
;
46
TGraphAsymmErrors*
m_graph_stat
;
47
TGraphErrors*
m_graph_syst
;
48
//int m_prec; /*!< Holds the calculation precision (= amount of histograms & binning factor). */
49
50
};
51
52
#endif
APWeightEntry
Class to store a single weight entry (one bin).
Definition
APWeightEntry.h:25
APWeightHist::APWeightHist
APWeightHist(const char *name, const char *title, const int n_bins, const float x_min, const float x_max)
Constructor which takes histo title, amount of bins and the range and optionally the preicision to us...
Definition
APWeightHist.cxx:18
APWeightHist::ClassDef
ClassDef(APWeightHist, 1)
ClassDef for ROOTCINT dictionary.
APWeightHist::ComputeGraph
void ComputeGraph(const int prec=250)
Computes the resulting graph from all added ntuples and calculates the uncertainties for all bins.
Definition
APWeightHist.cxx:69
APWeightHist::Fill
int Fill(const double value, APWeightEntry *weight)
< Overloads TH1D's Fill method.
Definition
APWeightHist.cxx:46
APWeightHist::APWeightHist
APWeightHist()
Default constructor.
Definition
APWeightHist.cxx:34
APWeightHist::m_binned_weights
std::vector< std::vector< APWeightEntry * > > m_binned_weights
Holds all filled weights weights as pointers.
Definition
APWeightHist.h:43
APWeightHist::m_graph_stat
TGraphAsymmErrors * m_graph_stat
Holds the histogram with statistical uncertainties.
Definition
APWeightHist.h:46
APWeightHist::GetBinPDF
TH1D * GetBinPDF(unsigned int bin, bool autocompute=true)
Definition
APWeightHist.cxx:180
APWeightHist::m_SumSys2
std::vector< double > m_SumSys2
Holds the variances of systematic uncertainties for the individual bins.
Definition
APWeightHist.h:45
APWeightHist::~APWeightHist
~APWeightHist()
Default destructor.
Definition
APWeightHist.cxx:42
APWeightHist::m_bin_dists
std::vector< TH1D * > m_bin_dists
Holds the PDFs for the individual bins.
Definition
APWeightHist.h:44
APWeightHist::m_graph_syst
TGraphErrors * m_graph_syst
Holds the histogram with systematic uncertainties.
Definition
APWeightHist.h:47
APWeightHist::GetGraphStatUncert
TGraphAsymmErrors * GetGraphStatUncert(bool autocompute=true)
Extracts the histogram with statistical uncertainties.
Definition
APWeightHist.cxx:158
APWeightHist::GetGraphSystUncert
TGraphErrors * GetGraphSystUncert(bool simple=true, bool autocompute=true)
Extracts the histogram with systematic uncertainties.
Definition
APWeightHist.cxx:163
APWeightHist::m_computed_entries
double m_computed_entries
Flag to store information about the status of the computation.
Definition
APWeightHist.h:42
bin
Definition
BinsDiffFromStripMedian.h:43
Generated on
for ATLAS Offline Software by
1.17.0