ATLAS Offline Software
APWeightSumEnsemble.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 
18 #ifndef APWeightSumEnsemble_h
19 #define APWeightSumEnsemble_h
20 
21 #include "APWeightSum.h"
22 #include <vector>
23 
24 class TH1F;
25 class TVirtualFitter;
26 class APWeightEntry;
27 
29 
30 public:
32  virtual ~APWeightSumEnsemble();
33  void SetRelPrecision(double rel_prec);
35  void FinishEvt(double ext_weight = 1.0);
37  double GetQuantile(const double prob);
38  double GetRandom();
40  double GetEnsemblePDFMode();
41  double GetEnsemblePDFStdDev();
43  TH1F *GetPDF();
45  ClassDef(APWeightSumEnsemble,1)
46 
47 private:
48  void Compute();
49  std::vector< std::vector< APWeightEntry* > > m_weight_vector;
50  std::vector< APWeightEntry* > m_current_evt_pdfs;
51  std::vector< double > m_ext_weights;
52  double m_rel_prec;
54  double m_ensemble_mode;
57 };
58 
59 #endif
APWeightSumEnsemble::GetQuantile
double GetQuantile(const double prob)
Returns the quantlile for p=prob for the distribution.
Definition: APWeightSumEnsemble.cxx:37
APWeightEntry
Definition: APWeightEntry.h:25
APWeightSumEnsemble::GetPDF
TH1F * GetPDF()
Returns the calculated PDF.
Definition: APWeightSumEnsemble.cxx:60
APWeightSumEnsemble::m_rel_prec
double m_rel_prec
Holds the relative precision of the gaussian fit to stop the ensemble test at.
Definition: APWeightSumEnsemble.h:52
covarianceTool.prob
prob
Definition: covarianceTool.py:678
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
APWeightSumEnsemble::m_ensemble_sigma
double m_ensemble_sigma
Holds the standard deviation from ensemble test.
Definition: APWeightSumEnsemble.h:55
APWeightSum.h
APWeightSumEnsemble::SetRelPrecision
void SetRelPrecision(double rel_prec)
Sets the relative precision of the gaussian fit to stop the ensemble test at.
Definition: APWeightSumEnsemble.cxx:26
APWeightSumEnsemble::m_ensembleTest_done
bool m_ensembleTest_done
Flag if the ensemble test has been performed with the current set of weights.
Definition: APWeightSumEnsemble.h:56
APWeightSumEnsemble::GetRandom
double GetRandom()
Returns a random value according to the pdf.
Definition: APWeightSumEnsemble.cxx:45
APWeightSumEnsemble
Definition: APWeightSumEnsemble.h:28
APWeightSumEnsemble::m_current_evt_pdfs
std::vector< APWeightEntry * > m_current_evt_pdfs
Holds the weight objects for the current event.
Definition: APWeightSumEnsemble.h:50
APWeightSumEnsemble::APWeightSumEnsemble
APWeightSumEnsemble()
Default constructor.
Definition: APWeightSumEnsemble.cxx:13
APWeightSumEnsemble::GetEnsemblePDFMode
double GetEnsemblePDFMode()
Returns the Mode (= sum of weights from PDF).
Definition: APWeightSumEnsemble.cxx:50
TH1F
Definition: rootspy.cxx:320
APWeightSumEnsemble::AddWeightToEvt
void AddWeightToEvt(APWeightEntry *weight)
Adds a weight to the sum of weights.
Definition: APWeightSumEnsemble.cxx:31
APWeightSumEnsemble::m_ext_weights
std::vector< double > m_ext_weights
Holds the external event weight provided when finishing the respective events.
Definition: APWeightSumEnsemble.h:51
APWeightSumEnsemble::~APWeightSumEnsemble
virtual ~APWeightSumEnsemble()
Default destructor.
Definition: APWeightSumEnsemble.cxx:22
APWeightSumEnsemble::m_pdf
TH1F * m_pdf
Holds the TH1F instance from the arrays if computed.
Definition: APWeightSumEnsemble.h:53
APWeightSumEnsemble::GetEnsemblePDFStdDev
double GetEnsemblePDFStdDev()
Returns the standard deviation from PDF .
Definition: APWeightSumEnsemble.cxx:55
APWeightSumEnsemble::FinishEvt
void FinishEvt(double ext_weight=1.0)
Finishes the current event and calculates the event weight.
Definition: APWeightSumEnsemble.cxx:65
APWeightSum
Definition: APWeightSum.h:29
APWeightSumEnsemble::m_ensemble_mode
double m_ensemble_mode
Holds the Mode (= sum of weights from PDF) from ensemble test.
Definition: APWeightSumEnsemble.h:54
APWeightSumEnsemble::m_weight_vector
ClassDef(APWeightSumEnsemble, 1) private std::vector< std::vector< APWeightEntry * > > m_weight_vector
< Performs the ensemble test to model final PDF.
Definition: APWeightSumEnsemble.h:45