CMS 3D CMS Logo

TtSemiLRSignalSelCalc Class Reference

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

#include <TopQuarkAnalysis/TopLeptonSelection/interface/TtSemiLRSignalSelCalc.h>

List of all members.

Public Member Functions

void operator() (TtSemiEvtSolution &)
 TtSemiLRSignalSelCalc (TString, std::vector< int >)
 TtSemiLRSignalSelCalc ()
 ~TtSemiLRSignalSelCalc ()

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
TtSemiLRSignalSelCalc.h,v 1.2 2008/02/17 11:18:54 rwolf Exp

Definition at line 32 of file TtSemiLRSignalSelCalc.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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 }


Member Data Documentation

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


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