Help functionalities to implement and evaluate LR ratio method. More...
#include "TopQuarkAnalysis/TopTools/interface/LRHelpFunctions.h"
Public Member Functions | |
double | calcLRval (const std::vector< double > &) |
double | calcProb (double) |
double | calcPtdrLRval (const std::vector< double > &vals, bool useCorrelation=false) |
void | fillLRBackgroundHist (double, double weight=1.0) |
void | fillLRSignalHist (double, double weight=1.0) |
void | fillToBackgroundHists (const 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 (const std::vector< double > &, double weight=1.0) |
void | fillToSignalHists (int, double, double weight=1.0) |
void | initLRHistsAndFits (int, double, double, const char *) |
LRHelpFunctions () | |
LRHelpFunctions (const std::vector< int > &, int, const std::vector< double > &, const std::vector< double > &, const std::vector< const char * > &) | |
LRHelpFunctions (int, double, double, const char *) | |
void | makeAndFitPurityHists () |
void | makeAndFitSoverSplusBHists () |
void | normalizeSandBhists () |
bool | obsFitIncluded (int) |
void | purityPlot (const TString &fname, const TString &extension=TString("eps")) |
void | readObsHistsAndFits (const TString &, const std::vector< int > &, bool) |
void | recreateFitFct (const std::vector< int > &obsNr, const std::vector< const char * > &functions) |
void | setObsFitParameters (int obs, const std::vector< double > &) |
void | setXlabels (const std::vector< std::string > &xLabels) |
void | setYlabels (const std::vector< std::string > &yLabels) |
void | singlePlot (const TString &fname, int obsNbr, const TString &extension=TString("eps")) |
void | storeControlPlots (const TString &) |
void | storeToROOTfile (const 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 36 of file LRHelpFunctions.h.
LRHelpFunctions::LRHelpFunctions | ( | ) |
LRHelpFunctions::LRHelpFunctions | ( | const std::vector< int > & | obsNr, |
int | nrBins, | ||
const std::vector< double > & | obsMin, | ||
const std::vector< double > & | obsMax, | ||
const 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 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 setTDRStyle().
LRHelpFunctions::~LRHelpFunctions | ( | ) |
Definition at line 65 of file LRHelpFunctions.cc.
double LRHelpFunctions::calcLRval | ( | const 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 | ( | const std::vector< double > & | vals, |
bool | useCorrelation = false |
||
) |
Definition at line 375 of file LRHelpFunctions.cc.
References corr, fObsSoverSplusB, hObsCorr, i, j, bookConverter::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 | ( | const 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, bookConverter::max, and min().
void LRHelpFunctions::fillToSignalHists | ( | const 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, relativeConstraints::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 | ( | const TString & | fname, |
const TString & | extension = TString("eps") |
||
) |
Definition at line 563 of file LRHelpFunctions.cc.
References counter::c2, gather_cfg::cout, hEffvsPur, hLRtotB, hLRtotS, hLRtotSoverSplusB, hLRValvsEff, hLRValvsPur, and plotscripts::tdrStyle.
void LRHelpFunctions::readObsHistsAndFits | ( | const TString & | fileName, |
const 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 | ( | const std::vector< int > & | obsNr, |
const 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, |
const std::vector< double > & | fitPars | ||
) |
Definition at line 82 of file LRHelpFunctions.cc.
References personalPlayback::fn, 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 | ( | const TString & | fname, |
int | obsNbr, | ||
const TString & | extension = TString("eps") |
||
) |
Definition at line 519 of file LRHelpFunctions.cc.
References counter::c2, gather_cfg::cout, fObsSoverSplusB, hObsB, hObsS, hObsSoverSplusB, python.connectstrParser::o, obsFitIncluded(), and plotscripts::tdrStyle.
void LRHelpFunctions::storeControlPlots | ( | const TString & | fname | ) |
Definition at line 291 of file LRHelpFunctions.cc.
References EnergyCorrector::c, counter::c2, constructPurity, fObsSoverSplusB, hEffvsPur, hLRtotB, hLRtotS, hLRtotSoverSplusB, hLRValvsEff, hLRValvsPur, hObsB, hObsCorr, hObsS, hObsSoverSplusB, python.connectstrParser::o, and EnergyCorrector::pt.
void LRHelpFunctions::storeToROOTfile | ( | const 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 77 of file LRHelpFunctions.h.
Referenced by initLRHistsAndFits(), LRHelpFunctions(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 75 of file LRHelpFunctions.h.
Referenced by calcProb(), initLRHistsAndFits(), LRHelpFunctions(), makeAndFitPurityHists(), readObsHistsAndFits(), and storeToROOTfile().
|
private |
Definition at line 73 of file LRHelpFunctions.h.
Referenced by calcLRval(), calcPtdrLRval(), LRHelpFunctions(), makeAndFitSoverSplusBHists(), obsFitIncluded(), readObsHistsAndFits(), recreateFitFct(), setObsFitParameters(), singlePlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 76 of file LRHelpFunctions.h.
Referenced by makeAndFitPurityHists(), purityPlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 74 of file LRHelpFunctions.h.
Referenced by fillLRBackgroundHist(), initLRHistsAndFits(), LRHelpFunctions(), makeAndFitPurityHists(), purityPlot(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 74 of file LRHelpFunctions.h.
Referenced by fillLRSignalHist(), initLRHistsAndFits(), LRHelpFunctions(), makeAndFitPurityHists(), purityPlot(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 74 of file LRHelpFunctions.h.
Referenced by initLRHistsAndFits(), LRHelpFunctions(), makeAndFitPurityHists(), purityPlot(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 76 of file LRHelpFunctions.h.
Referenced by makeAndFitPurityHists(), purityPlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 76 of file LRHelpFunctions.h.
Referenced by makeAndFitPurityHists(), purityPlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 71 of file LRHelpFunctions.h.
Referenced by fillToBackgroundHists(), LRHelpFunctions(), makeAndFitSoverSplusBHists(), normalizeSandBhists(), readObsHistsAndFits(), setXlabels(), setYlabels(), singlePlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 72 of file LRHelpFunctions.h.
Referenced by calcPtdrLRval(), fillToSignalCorrelation(), fillToSignalHists(), LRHelpFunctions(), readObsHistsAndFits(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 71 of file LRHelpFunctions.h.
Referenced by fillToSignalHists(), LRHelpFunctions(), makeAndFitSoverSplusBHists(), normalizeSandBhists(), readObsHistsAndFits(), recreateFitFct(), setXlabels(), setYlabels(), singlePlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 71 of file LRHelpFunctions.h.
Referenced by LRHelpFunctions(), makeAndFitSoverSplusBHists(), readObsHistsAndFits(), setXlabels(), singlePlot(), storeControlPlots(), and storeToROOTfile().
|
private |
Definition at line 78 of file LRHelpFunctions.h.
Referenced by calcPtdrLRval(), LRHelpFunctions(), and readObsHistsAndFits().