#include <TopQuarkAnalysis/TopJetCombination/interface/TtHadLRJetCombCalc.h>
Public Member Functions | |
void | operator() (TtHadEvtSolution &) |
TtHadLRJetCombCalc (TString, std::vector< int >) | |
TtHadLRJetCombCalc () | |
~TtHadLRJetCombCalc () | |
Private Attributes | |
bool | addPurity |
LRHelpFunctions * | myLR |
Definition at line 19 of file TtHadLRJetCombCalc.h.
TtHadLRJetCombCalc::TtHadLRJetCombCalc | ( | ) |
TtHadLRJetCombCalc::TtHadLRJetCombCalc | ( | TString | fitInputPath, | |
std::vector< int > | observables | |||
) |
Definition at line 7 of file TtHadLRJetCombCalc.cc.
References addPurity, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and myLR.
00008 { 00009 std::cout << "=== Constructing a TtHadLRJetCombCalc... " << std::endl; 00010 myLR = new LRHelpFunctions(); 00011 addPurity = false; 00012 if(observables[0] == -1) addPurity = true; 00013 myLR -> readObsHistsAndFits(fitInputPath, observables, addPurity); 00014 std::cout << "=== done." << std::endl; 00015 }
TtHadLRJetCombCalc::~TtHadLRJetCombCalc | ( | ) |
Definition at line 17 of file TtHadLRJetCombCalc.cc.
References myLR.
00018 { 00019 delete myLR; 00020 }
void TtHadLRJetCombCalc::operator() | ( | TtHadEvtSolution & | sol | ) |
Definition at line 22 of file TtHadLRJetCombCalc.cc.
References addPurity, LRHelpFunctions::calcLRval(), LRHelpFunctions::calcProb(), TtHadEvtSolution::getLRJetCombObsVal(), myLR, LRHelpFunctions::obsFitIncluded(), TtHadEvtSolution::setLRJetCombLRval(), and TtHadEvtSolution::setLRJetCombProb().
00023 { 00024 // find the used observables 00025 std::vector<double> obsVals; 00026 for(unsigned int o = 0; o<100; o++){ 00027 if( myLR->obsFitIncluded(o) ) {obsVals.push_back(sol.getLRJetCombObsVal(o)); }; 00028 } 00029 00030 // calculate the logLR and the purity 00031 double logLR = myLR->calcLRval(obsVals); 00032 double prob = -999.; 00033 if(addPurity) prob = myLR->calcProb(logLR); 00034 00035 // fill these values to the members in the TtHadEvtSolution 00036 sol.setLRJetCombLRval(logLR); 00037 sol.setLRJetCombProb(prob); 00038 }
bool TtHadLRJetCombCalc::addPurity [private] |
Definition at line 31 of file TtHadLRJetCombCalc.h.
Referenced by operator()(), and TtHadLRJetCombCalc().
LRHelpFunctions* TtHadLRJetCombCalc::myLR [private] |
Definition at line 30 of file TtHadLRJetCombCalc.h.
Referenced by operator()(), TtHadLRJetCombCalc(), and ~TtHadLRJetCombCalc().