CMS 3D CMS Logo

Public Member Functions | Private Attributes

TtHadLRJetCombCalc Class Reference

#include <TtHadLRJetCombCalc.h>

List of all members.

Public Member Functions

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

Private Attributes

bool addPurity
LRHelpFunctionsmyLR

Detailed Description

Definition at line 19 of file TtHadLRJetCombCalc.h.


Constructor & Destructor Documentation

TtHadLRJetCombCalc::TtHadLRJetCombCalc ( )
TtHadLRJetCombCalc::TtHadLRJetCombCalc ( const TString &  fitInputPath,
const std::vector< int > &  observables 
)

Definition at line 7 of file TtHadLRJetCombCalc.cc.

References addPurity, gather_cfg::cout, and myLR.

{
  std::cout << "=== Constructing a TtHadLRJetCombCalc... " << std::endl; 
  myLR = new LRHelpFunctions();
  addPurity = false;
  if(observables[0] == -1) addPurity = true;
  myLR -> readObsHistsAndFits(fitInputPath, observables, addPurity);
  std::cout << "=== done." << std::endl;
}
TtHadLRJetCombCalc::~TtHadLRJetCombCalc ( )

Definition at line 17 of file TtHadLRJetCombCalc.cc.

References myLR.

{
  delete myLR;
}

Member Function Documentation

void TtHadLRJetCombCalc::operator() ( TtHadEvtSolution sol)

Definition at line 22 of file TtHadLRJetCombCalc.cc.

References addPurity, LRHelpFunctions::calcLRval(), LRHelpFunctions::calcProb(), TtHadEvtSolution::getLRJetCombObsVal(), myLR, python::connectstrParser::o, LRHelpFunctions::obsFitIncluded(), mix_2012_Summer_inTimeOnly_cff::prob, TtHadEvtSolution::setLRJetCombLRval(), and TtHadEvtSolution::setLRJetCombProb().

{  
  // find the used observables
  std::vector<double> obsVals;
  for(unsigned int o = 0; o<100; o++){
    if( myLR->obsFitIncluded(o) ) {obsVals.push_back(sol.getLRJetCombObsVal(o)); };
  }
  
  // calculate the logLR and the purity
  double logLR = myLR->calcLRval(obsVals);
  double prob  = -999.;
  if(addPurity) prob = myLR->calcProb(logLR);
  
  // fill these values to the members in the TtHadEvtSolution
  sol.setLRJetCombLRval(logLR);
  sol.setLRJetCombProb(prob);
}

Member Data Documentation

Definition at line 31 of file TtHadLRJetCombCalc.h.

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

Definition at line 30 of file TtHadLRJetCombCalc.h.

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