CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TtSemiLRJetCombCalc Class Reference

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 ()
 
 TtSemiLRJetCombCalc (TString, std::vector< int >)
 
 ~TtSemiLRJetCombCalc ()
 

Private Attributes

bool addPurity
 
LRHelpFunctionsmyLR
 

Detailed Description

Class to calculate the jet combination LR value and purity from a root-file with fit functions.

Author
Jan Heyninck
Version
Id:
TtSemiLRJetCombCalc.h,v 1.4 2008/02/17 11:27:11 rwolf Exp

Definition at line 32 of file TtSemiLRJetCombCalc.h.

Constructor & Destructor Documentation

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.

10  {
11  std::cout << "=== Constructing a TtSemiLRJetCombCalc... " << std::endl;
12  myLR = new LRHelpFunctions();
13  addPurity = false;
14  if(observables[0] == -1) addPurity = true;
15  myLR -> readObsHistsAndFits(fitInputPath, observables, addPurity);
16  std::cout << "=== done." << std::endl;
17 }
Help functionalities to implement and evaluate LR ratio method.
LRHelpFunctions * myLR
tuple cout
Definition: gather_cfg.py:121
TtSemiLRJetCombCalc::~TtSemiLRJetCombCalc ( )

Definition at line 21 of file TtSemiLRJetCombCalc.cc.

References myLR.

21  {
22  delete myLR;
23 }
LRHelpFunctions * myLR

Member Function Documentation

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().

26  {
27 
28  // find the used observables
29  std::vector<double> obsVals;
30  for(unsigned int o = 0; o<100; o++){
31  if( myLR->obsFitIncluded(o) ) {obsVals.push_back(sol.getLRJetCombObsVal(o)); };
32  }
33 
34  // calculate the logLR and the purity
35  double logLR = myLR->calcLRval(obsVals);
36  double prob = -999.;
37  if(addPurity) prob = myLR->calcProb(logLR);
38 
39  // fill these values to the members in the TtSemiEvtSolution
40  sol.setLRJetCombLRval(logLR);
41  sol.setLRJetCombProb(prob);
42 }
double calcProb(double)
bool obsFitIncluded(int)
double getLRJetCombObsVal(unsigned int) const
void setLRJetCombProb(double plr)
double calcLRval(std::vector< double >)
void setLRJetCombLRval(double clr)
LRHelpFunctions * myLR

Member Data Documentation

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().