CMS 3D CMS Logo

TtHadLRSignalSelCalc Class Reference

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

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

List of all members.

Public Member Functions

void operator() (TtHadEvtSolution &)
 TtHadLRSignalSelCalc (TString, std::vector< int >)
 TtHadLRSignalSelCalc ()
 ~TtHadLRSignalSelCalc ()

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 - adapted hadronic version mfhansen

Definition at line 29 of file TtHadLRSignalSelCalc.h.


Constructor & Destructor Documentation

TtHadLRSignalSelCalc::TtHadLRSignalSelCalc (  ) 

TtHadLRSignalSelCalc::TtHadLRSignalSelCalc ( TString  fitInputPath,
std::vector< int observables 
)

Definition at line 8 of file TtHadLRSignalSelCalc.cc.

References addPurity, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and myLR.

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

TtHadLRSignalSelCalc::~TtHadLRSignalSelCalc (  ) 

Definition at line 18 of file TtHadLRSignalSelCalc.cc.

References myLR.

00019 {
00020   delete myLR;
00021 }


Member Function Documentation

void TtHadLRSignalSelCalc::operator() ( TtHadEvtSolution sol  ) 

Definition at line 23 of file TtHadLRSignalSelCalc.cc.

References addPurity, LRHelpFunctions::calcLRval(), LRHelpFunctions::calcProb(), TtHadEvtSolution::getLRSignalEvtObsVal(), myLR, LRHelpFunctions::obsFitIncluded(), TtHadEvtSolution::setLRSignalEvtLRval(), and TtHadEvtSolution::setLRSignalEvtProb().

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


Member Data Documentation

bool TtHadLRSignalSelCalc::addPurity [private]

Definition at line 41 of file TtHadLRSignalSelCalc.h.

Referenced by operator()(), and TtHadLRSignalSelCalc().

LRHelpFunctions* TtHadLRSignalSelCalc::myLR [private]

Definition at line 40 of file TtHadLRSignalSelCalc.h.

Referenced by operator()(), TtHadLRSignalSelCalc(), and ~TtHadLRSignalSelCalc().


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