  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
Go to the documentation of this file.
    5 #define APWeightSumEnsemble_cxx 
   10 #include "TVirtualFitter.h" 
   39   double prob_in[1] = {
prob};
 
   41   m_pdf->GetQuantiles(1, quant, prob_in);
 
   47   return m_pdf->GetRandom();
 
   72 void APWeightSumEnsemble::Compute() {
 
   73   if ( 
m_current_evt_pdfs.size() > 0 ) std::cout << 
"ERROR in APWeightSumEnsemble::Compute: Last event was not finished and will not be taken into account for the calculation!" << std::endl;
 
   78   for (
unsigned int i = 0; 
i < 100000000; ++
i) { 
 
   79     double sum_weights = 0.0;
 
   87     m_pdf->Fill(sum_weights);
 
   89       m_pdf->Fit(
"gaus", 
"0Q");
 
   90       TVirtualFitter *
fitter = TVirtualFitter::GetFitter();
 
   95   m_pdf->Fit(
"gaus", 
"0Q");
 
   96   TVirtualFitter *
fitter = TVirtualFitter::GetFitter();
 
  
const ShapeFitter * fitter
 
double GetQuantile(const double prob)
Returns the quantlile for p=prob for the distribution.
 
void FinishEvt(double ext_weight=1.0)
Finishes the current event and calculates the event weight.
 
unsigned long int m_k_evt_orig
Holds the original amount of unweighted counts ("sum of 1's").
 
TH1F * GetPDF()
Returns the calculated PDF.
 
double m_rel_prec
Holds the relative precision of the gaussian fit to stop the ensemble test at.
 
double m_k_evt_weight
Holds the sum of weights.
 
double m_ensemble_sigma
Holds the standard deviation from ensemble test.
 
void SetRelPrecision(double rel_prec)
Sets the relative precision of the gaussian fit to stop the ensemble test at.
 
bool m_ensembleTest_done
Flag if the ensemble test has been performed with the current set of weights.
 
double GetRandom()
Returns a random value according to the pdf.
 
std::vector< APWeightEntry * > m_current_evt_pdfs
Holds the weight objects for the current event.
 
APWeightSumEnsemble()
Default constructor.
 
double GetEnsemblePDFMode()
Returns the Mode (= sum of weights from PDF).
 
void AddWeightToEvt(APWeightEntry *weight)
Adds a weight to the sum of weights.
 
std::vector< double > m_ext_weights
Holds the external event weight provided when finishing the respective events.
 
virtual ~APWeightSumEnsemble()
Default destructor.
 
TH1F * m_pdf
Holds the TH1F instance from the arrays if computed.
 
double GetEnsemblePDFStdDev()
Returns the standard deviation from PDF .
 
void AddWeightToEvt(APWeightEntry *weight)
Adds a weight to the sum of weights.
 
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
 
void FinishEvt(double ext_weight=1.0)
Finishes the current event and calculates the event weight.
 
double m_ensemble_mode
Holds the Mode (= sum of weights from PDF) from ensemble test.
 
ClassDef(APWeightSumEnsemble, 1) private std::vector< std::vector< APWeightEntry * > > m_weight_vector
< Performs the ensemble test to model final PDF.