#include <TopQuarkAnalysis/TopLeptonSelection/interface/TtSemiLRSignalSelCalc.h>
Public Member Functions | |
void | operator() (TtSemiEvtSolution &) |
TtSemiLRSignalSelCalc (TString, std::vector< int >) | |
TtSemiLRSignalSelCalc () | |
~TtSemiLRSignalSelCalc () | |
Private Attributes | |
bool | addPurity |
LRHelpFunctions * | myLR |
Definition at line 32 of file TtSemiLRSignalSelCalc.h.
TtSemiLRSignalSelCalc::TtSemiLRSignalSelCalc | ( | ) |
TtSemiLRSignalSelCalc::TtSemiLRSignalSelCalc | ( | TString | fitInputPath, | |
std::vector< int > | observables | |||
) |
Definition at line 10 of file TtSemiLRSignalSelCalc.cc.
References addPurity, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and myLR.
00011 { 00012 std::cout << "=== Constructing a TtSemiLRSignalSelCalc... " << std::endl; 00013 myLR = new LRHelpFunctions(); 00014 addPurity = false; 00015 if(observables[0] == -1) addPurity = true; 00016 myLR -> readObsHistsAndFits(fitInputPath, observables, addPurity); 00017 std::cout << "=== done." << std::endl; 00018 }
TtSemiLRSignalSelCalc::~TtSemiLRSignalSelCalc | ( | ) |
Definition at line 20 of file TtSemiLRSignalSelCalc.cc.
References myLR.
00021 { 00022 delete myLR; 00023 }
void TtSemiLRSignalSelCalc::operator() | ( | TtSemiEvtSolution & | sol | ) |
Definition at line 25 of file TtSemiLRSignalSelCalc.cc.
References addPurity, LRHelpFunctions::calcLRval(), LRHelpFunctions::calcProb(), TtSemiEvtSolution::getLRSignalEvtObsVal(), myLR, LRHelpFunctions::obsFitIncluded(), TtSemiEvtSolution::setLRSignalEvtLRval(), and TtSemiEvtSolution::setLRSignalEvtProb().
00026 { 00027 // find the used observables 00028 std::vector<double> obsVals; 00029 for(unsigned int o = 0; o<100; o++){ 00030 if( myLR->obsFitIncluded(o) ) obsVals.push_back(sol.getLRSignalEvtObsVal(o)); 00031 } 00032 00033 // calculate the logLR and the purity 00034 double logLR = myLR->calcLRval(obsVals); 00035 double prob = -999.; 00036 if(addPurity) prob = myLR->calcProb(logLR); 00037 00038 // fill these values to the members in the TtSemiEvtSolution 00039 sol.setLRSignalEvtLRval(logLR); 00040 sol.setLRSignalEvtProb(prob); 00041 }
bool TtSemiLRSignalSelCalc::addPurity [private] |
Definition at line 45 of file TtSemiLRSignalSelCalc.h.
Referenced by operator()(), and TtSemiLRSignalSelCalc().
LRHelpFunctions* TtSemiLRSignalSelCalc::myLR [private] |
Definition at line 44 of file TtSemiLRSignalSelCalc.h.
Referenced by operator()(), TtSemiLRSignalSelCalc(), and ~TtSemiLRSignalSelCalc().