Class to calculate the jet combination LR value and purity from a root-file with fit functions. More...
#include <TopQuarkAnalysis/TopLeptonSelection/interface/TtSemiLRJetCombCalc.h>
Public Member Functions | |
void | operator() (TtSemiEvtSolution &) |
TtSemiLRJetCombCalc (TString, std::vector< int >) | |
TtSemiLRJetCombCalc () | |
~TtSemiLRJetCombCalc () | |
Private Attributes | |
bool | addPurity |
LRHelpFunctions * | myLR |
Class to calculate the jet combination LR value and purity from a root-file with fit functions.
Definition at line 32 of file TtSemiLRJetCombCalc.h.
TtSemiLRJetCombCalc::TtSemiLRJetCombCalc | ( | ) |
TtSemiLRJetCombCalc::TtSemiLRJetCombCalc | ( | TString | fitInputPath, |
std::vector< int > | observables | ||
) |
Definition at line 10 of file TtSemiLRJetCombCalc.cc.
References addPurity, gather_cfg::cout, and myLR.
TtSemiLRJetCombCalc::~TtSemiLRJetCombCalc | ( | ) |
void TtSemiLRJetCombCalc::operator() | ( | TtSemiEvtSolution & | sol | ) |
Definition at line 26 of file TtSemiLRJetCombCalc.cc.
References addPurity, LRHelpFunctions::calcLRval(), LRHelpFunctions::calcProb(), TtSemiEvtSolution::getLRJetCombObsVal(), myLR, python::connectstrParser::o, LRHelpFunctions::obsFitIncluded(), TtSemiEvtSolution::setLRJetCombLRval(), and TtSemiEvtSolution::setLRJetCombProb().
{ // find the used observables std::vector<double> obsVals; for(unsigned int o = 0; o<100; o++){ if( myLR->obsFitIncluded(o) ) {obsVals.push_back(sol.getLRJetCombObsVal(o)); }; } // calculate the logLR and the purity double logLR = myLR->calcLRval(obsVals); double prob = -999.; if(addPurity) prob = myLR->calcProb(logLR); // fill these values to the members in the TtSemiEvtSolution sol.setLRJetCombLRval(logLR); sol.setLRJetCombProb(prob); }
bool TtSemiLRJetCombCalc::addPurity [private] |
Definition at line 44 of file TtSemiLRJetCombCalc.h.
Referenced by operator()(), and TtSemiLRJetCombCalc().
LRHelpFunctions* TtSemiLRJetCombCalc::myLR [private] |
Definition at line 43 of file TtSemiLRJetCombCalc.h.
Referenced by operator()(), TtSemiLRJetCombCalc(), and ~TtSemiLRJetCombCalc().