00001
00002
00012
00013
00014 #ifndef APWeightSumEnsemble_h
00015 #define APWeightSumEnsemble_h
00016
00017 #include "APWeightSum.h"
00018 #include <vector>
00019
00020 class TH1F;
00021 class TVirtualFitter;
00022 class APWeightEntry;
00023
00024 class APWeightSumEnsemble : public APWeightSum {
00025
00026 public:
00027 APWeightSumEnsemble();
00028 virtual ~APWeightSumEnsemble();
00029 void SetRelPrecision(double rel_prec);
00030 void AddWeightToEvt(APWeightEntry* weight);
00031 void FinishEvt(double ext_weight = 1.0);
00033 double GetQuantile(const double prob);
00034 double GetRandom();
00036 double GetEnsemblePDFMode();
00037 double GetEnsemblePDFStdDev();
00039 TH1F *GetPDF();
00041
00042
00043 private:
00044 void Compute();
00045 std::vector< std::vector< APWeightEntry* > > _weight_vector;
00046 std::vector< APWeightEntry* > _current_evt_pdfs;
00047 std::vector< double > _ext_weights;
00048 double _rel_prec;
00049 TH1F *_pdf;
00050 double _ensemble_mode;
00051 double _ensemble_sigma;
00052 bool _ensembleTest_done;
00053 };
00054
00055 #endif