CMS 3D CMS Logo

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>

List of all members.

Public Member Functions

void operator() (TtSemiEvtSolution &)
 TtSemiLRJetCombCalc (TString, std::vector< int >)
 TtSemiLRJetCombCalc ()
 ~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, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and myLR.

00010                                                                                          {
00011   std::cout << "=== Constructing a TtSemiLRJetCombCalc... " << std::endl; 
00012   myLR = new LRHelpFunctions();
00013   addPurity = false;
00014   if(observables[0] == -1) addPurity = true;
00015   myLR -> readObsHistsAndFits(fitInputPath, observables, addPurity);
00016   std::cout << "=== done." << std::endl;
00017 }

TtSemiLRJetCombCalc::~TtSemiLRJetCombCalc (  ) 

Definition at line 21 of file TtSemiLRJetCombCalc.cc.

References myLR.

00021                                           {
00022   delete myLR;
00023 }


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, LRHelpFunctions::obsFitIncluded(), TtSemiEvtSolution::setLRJetCombLRval(), and TtSemiEvtSolution::setLRJetCombProb().

00026                                                             {
00027   
00028   // find the used observables
00029   std::vector<double> obsVals;
00030   for(unsigned int o = 0; o<100; o++){
00031     if( myLR->obsFitIncluded(o) ) {obsVals.push_back(sol.getLRJetCombObsVal(o)); };
00032   }
00033   
00034   // calculate the logLR and the purity
00035   double logLR = myLR->calcLRval(obsVals);
00036   double prob  = -999.;
00037   if(addPurity) prob = myLR->calcProb(logLR);
00038   
00039   // fill these values to the members in the TtSemiEvtSolution
00040   sol.setLRJetCombLRval(logLR);
00041   sol.setLRJetCombProb(prob);
00042 }


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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:46 2009 for CMSSW by  doxygen 1.5.4