ATLAS Offline Software
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 
15 
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 
41 private:
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
APWeightHist::m_SumSys2
std::vector< double > m_SumSys2
Holds the variances of systematic uncertainties for the individual bins.
Definition: APWeightHist.h:45
APWeightEntry
Definition: APWeightEntry.h:25
APWeightHist::m_computed_entries
double m_computed_entries
Flag to store information about the status of the computation.
Definition: APWeightHist.h:42
APWeightHist::APWeightHist
APWeightHist()
Default constructor.
Definition: APWeightHist.cxx:34
bin
Definition: BinsDiffFromStripMedian.h:43
athena.value
value
Definition: athena.py:124
APWeightHist::Fill
int Fill(const double value, APWeightEntry *weight)
< Overloads TH1D's Fill method.
Definition: APWeightHist.cxx:46
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
APWeightHist::GetGraphStatUncert
TGraphAsymmErrors * GetGraphStatUncert(bool autocompute=true)
Extracts the histogram with statistical uncertainties.
Definition: APWeightHist.cxx:156
APWeightHist
Definition: APWeightHist.h:26
covarianceTool.title
title
Definition: covarianceTool.py:542
APWeightHist::~APWeightHist
~APWeightHist()
Default destructor.
Definition: APWeightHist.cxx:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
APWeightHist::m_binned_weights
std::vector< std::vector< APWeightEntry * > > m_binned_weights
Holds all filled weights weights as pointers.
Definition: APWeightHist.h:43
APWeightHist::GetBinPDF
TH1D * GetBinPDF(unsigned int bin, bool autocompute=true)
Definition: APWeightHist.cxx:178
APWeightHist::m_graph_syst
TGraphErrors * m_graph_syst
Holds the histogram with systematic uncertainties.
Definition: APWeightHist.h:47
APWeightHist::m_graph_stat
TGraphAsymmErrors * m_graph_stat
Holds the histogram with statistical uncertainties.
Definition: APWeightHist.h:46
APWeightHist::ClassDef
ClassDef(APWeightHist, 1)
ClassDef for ROOTCINT dictionary.
APWeightHist::m_bin_dists
std::vector< TH1D * > m_bin_dists
Holds the PDFs for the individual bins.
Definition: APWeightHist.h:44
APWeightHist::GetGraphSystUncert
TGraphErrors * GetGraphSystUncert(bool simple=true, bool autocompute=true)
Extracts the histogram with systematic uncertainties.
Definition: APWeightHist.cxx:161
jobOptions.prec
prec
Definition: jobOptions.Superchic_UPC_yyMuMu.py:20
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:67