ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
ReweightUtils
ReweightUtils
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
17
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
28
class
APWeightSumEnsemble
:
public
APWeightSum
{
29
30
public
:
31
APWeightSumEnsemble
();
32
virtual
~APWeightSumEnsemble
();
33
void
SetRelPrecision
(
double
rel_prec);
34
void
AddWeightToEvt
(
APWeightEntry
* weight);
35
void
FinishEvt
(
double
ext_weight = 1.0);
36
37
double
GetQuantile
(
const
double
prob);
38
double
GetRandom
();
39
40
double
GetEnsemblePDFMode
();
41
double
GetEnsemblePDFStdDev
();
42
43
TH1F *
GetPDF
();
44
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
;
53
TH1F *
m_pdf
;
54
double
m_ensemble_mode
;
55
double
m_ensemble_sigma
;
56
bool
m_ensembleTest_done
;
57
};
58
59
#endif
APWeightSum.h
APWeightEntry
Class to store a single weight entry (one bin).
Definition
APWeightEntry.h:25
APWeightSumEnsemble::m_pdf
TH1F * m_pdf
Holds the TH1F instance from the arrays if computed.
Definition
APWeightSumEnsemble.h:53
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
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
APWeightSumEnsemble::GetPDF
TH1F * GetPDF()
Returns the calculated PDF.
Definition
APWeightSumEnsemble.cxx:60
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_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::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
APWeightSumEnsemble()
Default constructor.
Definition
APWeightSumEnsemble.cxx:13
APWeightSumEnsemble::~APWeightSumEnsemble
virtual ~APWeightSumEnsemble()
Default destructor.
Definition
APWeightSumEnsemble.cxx:22
APWeightSumEnsemble::GetQuantile
double GetQuantile(const double prob)
Returns the quantlile for p=prob for the distribution.
Definition
APWeightSumEnsemble.cxx:37
APWeightSumEnsemble::GetRandom
double GetRandom()
Returns a random value according to the pdf.
Definition
APWeightSumEnsemble.cxx:45
APWeightSumEnsemble::m_ensemble_sigma
double m_ensemble_sigma
Holds the standard deviation from ensemble test.
Definition
APWeightSumEnsemble.h:55
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::AddWeightToEvt
void AddWeightToEvt(APWeightEntry *weight)
Adds a weight to the sum of weights.
Definition
APWeightSumEnsemble.cxx:31
APWeightSumEnsemble::GetEnsemblePDFStdDev
double GetEnsemblePDFStdDev()
Returns the standard deviation from PDF .
Definition
APWeightSumEnsemble.cxx:55
APWeightSumEnsemble::GetEnsemblePDFMode
double GetEnsemblePDFMode()
Returns the Mode (= sum of weights from PDF).
Definition
APWeightSumEnsemble.cxx:50
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::FinishEvt
void FinishEvt(double ext_weight=1.0)
Finishes the current event and calculates the event weight.
Definition
APWeightSumEnsemble.cxx:65
APWeightSum::APWeightSum
APWeightSum()
Default constructor.
Definition
APWeightSum.cxx:17
python.TrigEgammaMonitorHelper.TH1F
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition
TrigEgammaMonitorHelper.py:24
Generated on
for ATLAS Offline Software by
1.17.0