CMS 3D CMS Logo

TtHadLRJetCombCalc.cc
Go to the documentation of this file.
1 // copied TtSemiLRJetCombCalc.cc,v 1.4 2007/06/18 14:08:16 by heyninck
2 //
4 
5 // constructor with path; default should not be used
6 TtHadLRJetCombCalc::TtHadLRJetCombCalc(const TString& fitInputPath, const std::vector<int>& observables) {
7  std::cout << "=== Constructing a TtHadLRJetCombCalc... " << std::endl;
8  myLR = new LRHelpFunctions();
9  addPurity = false;
10  if (observables[0] == -1)
11  addPurity = true;
13  std::cout << "=== done." << std::endl;
14 }
15 
17 
19  // find the used observables
20  std::vector<double> obsVals;
21  for (unsigned int o = 0; o < 100; o++) {
22  if (myLR->obsFitIncluded(o)) {
23  obsVals.push_back(sol.getLRJetCombObsVal(o));
24  };
25  }
26 
27  // calculate the logLR and the purity
28  double logLR = myLR->calcLRval(obsVals);
29  double prob = -999.;
30  if (addPurity)
31  prob = myLR->calcProb(logLR);
32 
33  // fill these values to the members in the TtHadEvtSolution
34  sol.setLRJetCombLRval(logLR);
35  sol.setLRJetCombProb(prob);
36 }
double calcLRval(const std::vector< double > &)
void operator()(TtHadEvtSolution &)
LRHelpFunctions * myLR
double calcProb(double)
Help functionalities to implement and evaluate LR ratio method.
bool obsFitIncluded(int)
void readObsHistsAndFits(const TString &, const std::vector< int > &, bool)
constexpr float sol
Definition: Config.h:13