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 35 of file LRHelpFunctions.h.
LRHelpFunctions::LRHelpFunctions | ( | ) |
Definition at line 5 of file LRHelpFunctions.cc.
References constructPurity, and plotscripts::setTDRStyle().
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 11 of file LRHelpFunctions.cc.
References constructPurity, fObsSoverSplusB, stringResolutionProvider_cfi::functions, hObsB, hObsCorr, hObsS, hObsSoverSplusB, EcalTangentSkim_cfg::o, obsNumbers, and plotscripts::setTDRStyle().
LRHelpFunctions::LRHelpFunctions | ( | int | nrLRbins, |
double | LRmin, | ||
double | LRmax, | ||
const char * | LRfunction | ||
) |
Definition at line 66 of file LRHelpFunctions.cc.
References constructPurity, fLRtotSoverSplusB, hLRtotB, hLRtotS, hLRtotSoverSplusB, and plotscripts::setTDRStyle().
LRHelpFunctions::~LRHelpFunctions | ( | ) |
Definition at line 83 of file LRHelpFunctions.cc.
double LRHelpFunctions::calcLRval | ( | const std::vector< double > & | vals | ) |
Definition at line 378 of file LRHelpFunctions.cc.
References fObsSoverSplusB, dqm-mbProfile::log, and EcalTangentSkim_cfg::o.
Referenced by TtHadLRJetCombCalc::operator()(), TtHadLRSignalSelCalc::operator()(), TtSemiLRJetCombCalc::operator()(), and TtSemiLRSignalSelCalc::operator()().
double LRHelpFunctions::calcProb | ( | double | logLR | ) |
Definition at line 486 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 391 of file LRHelpFunctions.cc.
References alignCSCRings::corr, fObsSoverSplusB, hObsCorr, mps_fire::i, dqmiolumiharvest::j, SiStripPI::max, SiStripPI::min, EcalTangentSkim_cfg::o, obsNumbers, funct::pow(), and muonME0PseudoDigis_cfi::useCorrelation.
void LRHelpFunctions::fillLRBackgroundHist | ( | double | val, |
double | weight = 1.0 |
||
) |
Definition at line 428 of file LRHelpFunctions.cc.
References hLRtotB, and heppy_batch::val.
void LRHelpFunctions::fillLRSignalHist | ( | double | val, |
double | weight = 1.0 |
||
) |
Definition at line 422 of file LRHelpFunctions.cc.
References hLRtotS, and heppy_batch::val.
void LRHelpFunctions::fillToBackgroundHists | ( | const std::vector< double > & | obsVals, |
double | weight = 1.0 |
||
) |
Definition at line 153 of file LRHelpFunctions.cc.
References HcalObjRepresent::Fill(), hObsB, and EcalTangentSkim_cfg::o.
void LRHelpFunctions::fillToBackgroundHists | ( | int | obsNbr, |
double | obsVal, | ||
double | weight = 1.0 |
||
) |
Definition at line 159 of file LRHelpFunctions.cc.
void LRHelpFunctions::fillToSignalCorrelation | ( | int | obsNbr1, |
double | obsVal1, | ||
int | obsNbr2, | ||
double | obsVal2, | ||
double | weight | ||
) |
Definition at line 135 of file LRHelpFunctions.cc.
References hObsCorr, mps_fire::i, SiStripPI::max, and SiStripPI::min.
void LRHelpFunctions::fillToSignalHists | ( | const std::vector< double > & | obsVals, |
double | weight = 1.0 |
||
) |
Definition at line 110 of file LRHelpFunctions.cc.
References hObsCorr, hObsS, and EcalTangentSkim_cfg::o.
void LRHelpFunctions::fillToSignalHists | ( | int | obsNbr, |
double | obsVal, | ||
double | weight = 1.0 |
||
) |
Definition at line 122 of file LRHelpFunctions.cc.
void LRHelpFunctions::initLRHistsAndFits | ( | int | nrLRbins, |
double | LRmin, | ||
double | LRmax, | ||
const char * | LRfunction | ||
) |
Definition at line 86 of file LRHelpFunctions.cc.
References constructPurity, fLRtotSoverSplusB, hLRtotB, hLRtotS, and hLRtotSoverSplusB.
void LRHelpFunctions::makeAndFitPurityHists | ( | ) |
Definition at line 434 of file LRHelpFunctions.cc.
References b, gather_cfg::cout, PA_MinBiasSkim_cff::cut, fLRtotSoverSplusB, hEffvsPur, hLRtotB, hLRtotS, hLRtotSoverSplusB, hLRValvsEff, hLRValvsPur, funct::pow(), and mathSSE::sqrt().
void LRHelpFunctions::makeAndFitSoverSplusBHists | ( | ) |
Definition at line 192 of file LRHelpFunctions.cc.
References b, relativeConstraints::error, fObsSoverSplusB, hObsB, hObsS, hObsSoverSplusB, EcalTangentSkim_cfg::o, funct::pow(), and mathSSE::sqrt().
void LRHelpFunctions::normalizeSandBhists | ( | ) |
Definition at line 172 of file LRHelpFunctions.cc.
References b, hObsB, hObsS, mps_fire::i, and EcalTangentSkim_cfg::o.
bool LRHelpFunctions::obsFitIncluded | ( | int | o | ) |
Definition at line 489 of file LRHelpFunctions.cc.
References f, fObsSoverSplusB, and EcalTangentSkim_cfg::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 572 of file LRHelpFunctions.cc.
References gather_cfg::cout, runGCPTkAlMap::extension, alignmentValidation::fname, 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 212 of file LRHelpFunctions.cc.
References constructPurity, gather_cfg::cout, MillePedeFileConverter_cfg::fileName, fLRtotSoverSplusB, fObsSoverSplusB, hLRtotB, hLRtotS, hLRtotSoverSplusB, hObsB, hObsCorr, hObsS, hObsSoverSplusB, GetRecoTauVFromDQM_MC_cff::next, and obsNumbers.
Referenced by TtHadLRJetCombCalc::TtHadLRJetCombCalc(), TtHadLRSignalSelCalc::TtHadLRSignalSelCalc(), TtSemiLRJetCombCalc::TtSemiLRJetCombCalc(), and TtSemiLRSignalSelCalc::TtSemiLRSignalSelCalc().
void LRHelpFunctions::recreateFitFct | ( | const std::vector< int > & | obsNr, |
const std::vector< const char *> & | functions | ||
) |
Definition at line 53 of file LRHelpFunctions.cc.
References fObsSoverSplusB, stringResolutionProvider_cfi::functions, hObsS, and EcalTangentSkim_cfg::o.
void LRHelpFunctions::setObsFitParameters | ( | int | obs, |
const std::vector< double > & | fitPars | ||
) |
Definition at line 97 of file LRHelpFunctions.cc.
References L1TowerCalibrationProducer_cfi::fit, personalPlayback::fn, fObsSoverSplusB, and AlCaHLTBitMon_ParallelJobs::p.
void LRHelpFunctions::setXlabels | ( | const std::vector< std::string > & | xLabels | ) |
Definition at line 501 of file LRHelpFunctions.cc.
References gather_cfg::cout, hObsB, hObsS, hObsSoverSplusB, and mps_fire::i.
void LRHelpFunctions::setYlabels | ( | const std::vector< std::string > & | yLabels | ) |
Definition at line 515 of file LRHelpFunctions.cc.
References gather_cfg::cout, hObsB, hObsS, and mps_fire::i.
void LRHelpFunctions::singlePlot | ( | const TString & | fname, |
int | obsNbr, | ||
const TString & | extension = TString("eps") |
||
) |
Definition at line 527 of file LRHelpFunctions.cc.
References gather_cfg::cout, runGCPTkAlMap::extension, alignmentValidation::fname, fObsSoverSplusB, hObsB, hObsS, hObsSoverSplusB, EcalTangentSkim_cfg::o, obsFitIncluded(), and plotscripts::tdrStyle.
void LRHelpFunctions::storeControlPlots | ( | const TString & | fname | ) |
Definition at line 311 of file LRHelpFunctions.cc.
References c, constructPurity, alignmentValidation::fname, fObsSoverSplusB, hEffvsPur, hLRtotB, hLRtotS, hLRtotSoverSplusB, hLRValvsEff, hLRValvsPur, hObsB, hObsCorr, hObsS, hObsSoverSplusB, createfilelist::int, EcalTangentSkim_cfg::o, and DiDispStaMuonMonitor_cfi::pt.
void LRHelpFunctions::storeToROOTfile | ( | const TString & | fname | ) |
Definition at line 280 of file LRHelpFunctions.cc.
References constructPurity, fLRtotSoverSplusB, alignmentValidation::fname, fObsSoverSplusB, hEffvsPur, hLRtotB, hLRtotS, hLRtotSoverSplusB, hLRValvsEff, hLRValvsPur, hObsB, hObsCorr, hObsS, hObsSoverSplusB, and EcalTangentSkim_cfg::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().