Help functionalities to implement and evaluate LR ratio method. More...
#include "TopQuarkAnalysis/TopTools/interface/LRHelpFunctions.h"
Public Member Functions | |
double | calcLRval (std::vector< double >) |
double | calcProb (double) |
double | calcPtdrLRval (std::vector< double > vals, bool useCorrelation=false) |
void | fillLRBackgroundHist (double, double weight=1.0) |
void | fillLRSignalHist (double, double weight=1.0) |
void | fillToBackgroundHists (std::vector< double >, double weight=1.0) |
void | fillToBackgroundHists (int, double, double weight=1.0) |
void | fillToSignalCorrelation (int obsNbr1, double obsVal1, int obsNbr2, double obsVal2, double weight) |
void | fillToSignalHists (std::vector< double >, double weight=1.0) |
void | fillToSignalHists (int, double, double weight=1.0) |
void | initLRHistsAndFits (int, double, double, const char *) |
LRHelpFunctions () | |
LRHelpFunctions (std::vector< int >, int, std::vector< double >, std::vector< double >, std::vector< const char * >) | |
LRHelpFunctions (int, double, double, const char *) | |
void | makeAndFitPurityHists () |
void | makeAndFitSoverSplusBHists () |
void | normalizeSandBhists () |
bool | obsFitIncluded (int) |
void | purityPlot (TString fname, TString extension=TString("eps")) |
void | readObsHistsAndFits (TString, std::vector< int >, bool) |
void | recreateFitFct (std::vector< int > obsNr, std::vector< const char * > functions) |
void | setObsFitParameters (int obs, std::vector< double >) |
void | setXlabels (const std::vector< std::string > &xLabels) |
void | setYlabels (const std::vector< std::string > &yLabels) |
void | singlePlot (TString fname, int obsNbr, TString extension=TString("eps")) |
void | storeControlPlots (TString) |
void | storeToROOTfile (TString) |
~LRHelpFunctions () | |
Private Attributes | |
bool | constructPurity |
TF1 * | fLRtotSoverSplusB |
std::vector< TF1 * > | fObsSoverSplusB |
TGraph * | hEffvsPur |
TH1F * | hLRtotB |
TH1F * | hLRtotS |
TH1F * | hLRtotSoverSplusB |
TGraph * | hLRValvsEff |
TGraph * | hLRValvsPur |
std::vector< TH1F * > | hObsB |
std::vector< TH2F * > | hObsCorr |
std::vector< TH1F * > | hObsS |
std::vector< TH1F * > | hObsSoverSplusB |
std::vector< int > | obsNumbers |
Help functionalities to implement and evaluate LR ratio method.
Definition at line 37 of file LRHelpFunctions.h.
LRHelpFunctions::LRHelpFunctions | ( | ) |
Definition at line 5 of file LRHelpFunctions.cc.
References constructPurity, and plotscripts::setTDRStyle().
LRHelpFunctions::LRHelpFunctions | ( | std::vector< int > | obsNr, |
int | nrBins, | ||
std::vector< double > | obsMin, | ||
std::vector< double > | obsMax, | ||
std::vector< const char * > | functions | ||
) |
Definition at line 12 of file LRHelpFunctions.cc.
References constructPurity, fObsSoverSplusB, hObsB, hObsCorr, hObsS, hObsSoverSplusB, python.connectstrParser::o, obsNumbers, and plotscripts::setTDRStyle().
LRHelpFunctions::LRHelpFunctions | ( | int | nrLRbins, |
double | LRmin, | ||
double | LRmax, | ||
const char * | LRfunction | ||
) |
Definition at line 47 of file LRHelpFunctions.cc.
References constructPurity, fLRtotSoverSplusB, hLRtotB, hLRtotS, hLRtotSoverSplusB, and plotscripts::setTDRStyle().
LRHelpFunctions::~LRHelpFunctions | ( | ) |
Definition at line 65 of file LRHelpFunctions.cc.
double LRHelpFunctions::calcLRval | ( | std::vector< double > | vals | ) |
Definition at line 361 of file LRHelpFunctions.cc.
References fObsSoverSplusB, create_public_lumi_plots::log, and python.connectstrParser::o.
Referenced by TtHadLRJetCombCalc::operator()(), TtHadLRSignalSelCalc::operator()(), TtSemiLRJetCombCalc::operator()(), and TtSemiLRSignalSelCalc::operator()().
double LRHelpFunctions::calcProb | ( | double | logLR | ) |
Definition at line 474 of file LRHelpFunctions.cc.
References fLRtotSoverSplusB.
Referenced by TtHadLRJetCombCalc::operator()(), TtHadLRSignalSelCalc::operator()(), TtSemiLRJetCombCalc::operator()(), and TtSemiLRSignalSelCalc::operator()().
double LRHelpFunctions::calcPtdrLRval | ( | std::vector< double > | vals, |
bool | useCorrelation = false |
||
) |
Definition at line 375 of file LRHelpFunctions.cc.
References corr, fObsSoverSplusB, hObsCorr, i, j, max(), min, python.connectstrParser::o, obsNumbers, and funct::pow().
void LRHelpFunctions::fillLRBackgroundHist | ( | double | val, |
double | weight = 1.0 |
||
) |
Definition at line 410 of file LRHelpFunctions.cc.
References HcalObjRepresent::Fill(), and hLRtotB.
void LRHelpFunctions::fillLRSignalHist | ( | double | val, |
double | weight = 1.0 |
||
) |
Definition at line 402 of file LRHelpFunctions.cc.
References HcalObjRepresent::Fill(), and hLRtotS.
void LRHelpFunctions::fillToBackgroundHists | ( | std::vector< double > | obsVals, |
double | weight = 1.0 |
||
) |
Definition at line 138 of file LRHelpFunctions.cc.
References HcalObjRepresent::Fill(), hObsB, and python.connectstrParser::o.
void LRHelpFunctions::fillToBackgroundHists | ( | int | obsNbr, |
double | obsVal, | ||
double | weight = 1.0 |
||
) |
Definition at line 143 of file LRHelpFunctions.cc.
void LRHelpFunctions::fillToSignalCorrelation | ( | int | obsNbr1, |
double | obsVal1, | ||
int | obsNbr2, | ||
double | obsVal2, | ||
double | weight | ||
) |
Definition at line 121 of file LRHelpFunctions.cc.
References HcalObjRepresent::Fill(), hObsCorr, i, max(), and min.
void LRHelpFunctions::fillToSignalHists | ( | std::vector< double > | obsVals, |
double | weight = 1.0 |
||
) |
Definition at line 98 of file LRHelpFunctions.cc.
References HcalObjRepresent::Fill(), hObsCorr, hObsS, and python.connectstrParser::o.
void LRHelpFunctions::fillToSignalHists | ( | int | obsNbr, |
double | obsVal, | ||
double | weight = 1.0 |
||
) |
Definition at line 110 of file LRHelpFunctions.cc.
void LRHelpFunctions::initLRHistsAndFits | ( | int | nrLRbins, |
double | LRmin, | ||
double | LRmax, | ||
const char * | LRfunction | ||
) |
Definition at line 69 of file LRHelpFunctions.cc.
References constructPurity, fLRtotSoverSplusB, hLRtotB, hLRtotS, and hLRtotSoverSplusB.
void LRHelpFunctions::makeAndFitPurityHists | ( | ) |
Definition at line 418 of file LRHelpFunctions.cc.
References b, gather_cfg::cout, GOODCOLL_filter_cfg::cut, fLRtotSoverSplusB, hEffvsPur, hLRtotB, hLRtotS, hLRtotSoverSplusB, hLRValvsEff, hLRValvsPur, funct::pow(), and mathSSE::sqrt().
void LRHelpFunctions::makeAndFitSoverSplusBHists | ( | ) |
Definition at line 176 of file LRHelpFunctions.cc.
References b, error, fObsSoverSplusB, hObsB, hObsS, hObsSoverSplusB, python.connectstrParser::o, funct::pow(), and mathSSE::sqrt().
void LRHelpFunctions::normalizeSandBhists | ( | ) |
Definition at line 154 of file LRHelpFunctions.cc.
References b, hObsB, hObsS, i, and python.connectstrParser::o.
bool LRHelpFunctions::obsFitIncluded | ( | int | o | ) |
Definition at line 480 of file LRHelpFunctions.cc.
References f, fObsSoverSplusB, and python.connectstrParser::o.
Referenced by TtHadLRJetCombCalc::operator()(), TtHadLRSignalSelCalc::operator()(), TtSemiLRJetCombCalc::operator()(), TtSemiLRSignalSelCalc::operator()(), and singlePlot().
void LRHelpFunctions::purityPlot | ( | TString | fname, |
TString | extension = TString("eps") |
||
) |
Definition at line 563 of file LRHelpFunctions.cc.
References HiggsCouplings::c5, gather_cfg::cout, hEffvsPur, hLRtotB, hLRtotS, hLRtotSoverSplusB, hLRValvsEff, hLRValvsPur, and plotscripts::tdrStyle.
void LRHelpFunctions::readObsHistsAndFits | ( | TString | fileName, |
std::vector< int > | observables, | ||
bool | readLRplots | ||
) |
Definition at line 192 of file LRHelpFunctions.cc.
References constructPurity, gather_cfg::cout, fLRtotSoverSplusB, fObsSoverSplusB, hLRtotB, hLRtotS, hLRtotSoverSplusB, hObsB, hObsCorr, hObsS, hObsSoverSplusB, list(), GetRecoTauVFromDQM_MC_cff::next, and obsNumbers.
void LRHelpFunctions::recreateFitFct | ( | std::vector< int > | obsNr, |
std::vector< const char * > | functions | ||
) |
Definition at line 38 of file LRHelpFunctions.cc.
References fObsSoverSplusB, hObsS, and python.connectstrParser::o.
void LRHelpFunctions::setObsFitParameters | ( | int | obs, |
std::vector< double > | fitPars | ||
) |
Definition at line 82 of file LRHelpFunctions.cc.
References fObsSoverSplusB, and AlCaHLTBitMon_ParallelJobs::p.
void LRHelpFunctions::setXlabels | ( | const std::vector< std::string > & | xLabels | ) |
Definition at line 489 of file LRHelpFunctions.cc.
References gather_cfg::cout, hObsB, hObsS, hObsSoverSplusB, and i.
void LRHelpFunctions::setYlabels | ( | const std::vector< std::string > & | yLabels | ) |
Definition at line 505 of file LRHelpFunctions.cc.
References gather_cfg::cout, hObsB, hObsS, and i.
void LRHelpFunctions::singlePlot | ( | TString | fname, |
int | obsNbr, | ||
TString | extension = TString("eps") |
||
) |
Definition at line 519 of file LRHelpFunctions.cc.
References gather_cfg::cout, fObsSoverSplusB, hObsB, hObsS, hObsSoverSplusB, python.connectstrParser::o, obsFitIncluded(), and plotscripts::tdrStyle.
void LRHelpFunctions::storeControlPlots | ( | TString | fname | ) |
Definition at line 291 of file LRHelpFunctions.cc.
References trackerHits::c, HiggsCouplings::c5, constructPurity, fObsSoverSplusB, hEffvsPur, hLRtotB, hLRtotS, hLRtotSoverSplusB, hLRValvsEff, hLRValvsPur, hObsB, hObsCorr, hObsS, hObsSoverSplusB, and python.connectstrParser::o.
void LRHelpFunctions::storeToROOTfile | ( | TString | fname | ) |
Definition at line 256 of file LRHelpFunctions.cc.
References constructPurity, fLRtotSoverSplusB, fObsSoverSplusB, hEffvsPur, hLRtotB, hLRtotS, hLRtotSoverSplusB, hLRValvsEff, hLRValvsPur, hObsB, hObsCorr, hObsS, hObsSoverSplusB, and python.connectstrParser::o.
|
private |
Definition at line 78 of file LRHelpFunctions.h.
Referenced by initLRHistsAndFits(), LRHelpFunctions(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 76 of file LRHelpFunctions.h.
Referenced by calcProb(), initLRHistsAndFits(), LRHelpFunctions(), makeAndFitPurityHists(), readObsHistsAndFits(), and storeToROOTfile().
|
private |
Definition at line 74 of file LRHelpFunctions.h.
Referenced by calcLRval(), calcPtdrLRval(), LRHelpFunctions(), makeAndFitSoverSplusBHists(), obsFitIncluded(), readObsHistsAndFits(), recreateFitFct(), setObsFitParameters(), singlePlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 77 of file LRHelpFunctions.h.
Referenced by makeAndFitPurityHists(), purityPlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 75 of file LRHelpFunctions.h.
Referenced by fillLRBackgroundHist(), initLRHistsAndFits(), LRHelpFunctions(), makeAndFitPurityHists(), purityPlot(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 75 of file LRHelpFunctions.h.
Referenced by fillLRSignalHist(), initLRHistsAndFits(), LRHelpFunctions(), makeAndFitPurityHists(), purityPlot(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 75 of file LRHelpFunctions.h.
Referenced by initLRHistsAndFits(), LRHelpFunctions(), makeAndFitPurityHists(), purityPlot(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 77 of file LRHelpFunctions.h.
Referenced by makeAndFitPurityHists(), purityPlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 77 of file LRHelpFunctions.h.
Referenced by makeAndFitPurityHists(), purityPlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 72 of file LRHelpFunctions.h.
Referenced by fillToBackgroundHists(), LRHelpFunctions(), makeAndFitSoverSplusBHists(), normalizeSandBhists(), readObsHistsAndFits(), setXlabels(), setYlabels(), singlePlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 73 of file LRHelpFunctions.h.
Referenced by calcPtdrLRval(), fillToSignalCorrelation(), fillToSignalHists(), LRHelpFunctions(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 72 of file LRHelpFunctions.h.
Referenced by fillToSignalHists(), LRHelpFunctions(), makeAndFitSoverSplusBHists(), normalizeSandBhists(), readObsHistsAndFits(), recreateFitFct(), setXlabels(), setYlabels(), singlePlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 72 of file LRHelpFunctions.h.
Referenced by LRHelpFunctions(), makeAndFitSoverSplusBHists(), readObsHistsAndFits(), setXlabels(), singlePlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 79 of file LRHelpFunctions.h.
Referenced by calcPtdrLRval(), LRHelpFunctions(), and readObsHistsAndFits().