TopQuarkAnalysis
TopJetCombination
src
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
//
3
#include "
TopQuarkAnalysis/TopJetCombination/interface/TtHadLRJetCombCalc.h
"
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
;
12
myLR
->
readObsHistsAndFits
(fitInputPath, observables,
addPurity
);
13
std::cout
<<
"=== done."
<< std::endl;
14
}
15
16
TtHadLRJetCombCalc::~TtHadLRJetCombCalc
() {
delete
myLR
; }
17
18
void
TtHadLRJetCombCalc::operator()
(
TtHadEvtSolution
& sol) {
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
}
TtHadEvtSolution::getLRJetCombObsVal
double getLRJetCombObsVal(unsigned int) const
Definition:
TtHadEvtSolution.cc:194
TtHadEvtSolution::setLRJetCombProb
void setLRJetCombProb(double plr)
Definition:
TtHadEvtSolution.h:268
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
TtHadLRJetCombCalc::~TtHadLRJetCombCalc
~TtHadLRJetCombCalc()
Definition:
TtHadLRJetCombCalc.cc:16
LRHelpFunctions::readObsHistsAndFits
void readObsHistsAndFits(const TString &, const std::vector< int > &, bool)
Definition:
LRHelpFunctions.cc:212
LRHelpFunctions::obsFitIncluded
bool obsFitIncluded(int)
Definition:
LRHelpFunctions.cc:489
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:42
TtHadLRJetCombCalc::myLR
LRHelpFunctions * myLR
Definition:
TtHadLRJetCombCalc.h:27
TtHadLRJetCombCalc.h
TtHadEvtSolution::setLRJetCombLRval
void setLRJetCombLRval(double clr)
Definition:
TtHadEvtSolution.h:267
TtHadLRJetCombCalc::TtHadLRJetCombCalc
TtHadLRJetCombCalc()
TtHadLRJetCombCalc::addPurity
bool addPurity
Definition:
TtHadLRJetCombCalc.h:28
LRHelpFunctions::calcProb
double calcProb(double)
Definition:
LRHelpFunctions.cc:486
TtHadLRJetCombCalc::operator()
void operator()(TtHadEvtSolution &)
Definition:
TtHadLRJetCombCalc.cc:18
LRHelpFunctions
Help functionalities to implement and evaluate LR ratio method.
Definition:
LRHelpFunctions.h:35
TtHadEvtSolution
Definition:
TtHadEvtSolution.h:21
TtFullHadEvtBuilder_cfi.prob
prob
Definition:
TtFullHadEvtBuilder_cfi.py:33
LRHelpFunctions::calcLRval
double calcLRval(const std::vector< double > &)
Definition:
LRHelpFunctions.cc:378
Generated for CMSSW Reference Manual by
1.8.16