ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagTools
JetTagTools
NewLikelihoodTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef JETTAGTOOLS_NEWLIKELIHOODMULTIDTOOL_H
6
#define JETTAGTOOLS_NEWLIKELIHOODMULTIDTOOL_H
7
/******************************************************
8
@class NewLikelihoodTool
9
DESCRIPTION:
10
Helper class for likelihood calculations
11
********************************************************/
12
13
#include "
AthenaBaseComps/AthAlgTool.h
"
14
#include "
JetTagTools/LikelihoodComponents.h
"
15
#include "
JetTagCalibration/JetTagCalibCondData.h
"
16
#include <string>
17
#include <vector>
18
19
class
TH1;
20
21
namespace
Analysis
{
22
23
static
const
InterfaceID
IID_NewLikelihoodTool
(
"Analysis::NewLikelihoodTool"
, 1, 0);
24
25
class
NewLikelihoodTool
:
public
AthAlgTool
{
26
27
public
:
28
29
NewLikelihoodTool
(
const
std::string&,
const
std::string&,
const
IInterface*);
30
virtual
~NewLikelihoodTool
() =
default
;
31
32
virtual
StatusCode
initialize
()
override
;
33
34
static
const
InterfaceID&
interfaceID
() {
return
IID_NewLikelihoodTool
; };
35
36
void
defineHypotheses
(
const
std::vector<std::string>&);
37
38
void
defineHistogram
(
const
std::string& hname);
39
TH1*
prepareHistogram
(
const
std::string& hypo,
const
std::string& hname)
const
;
40
void
smoothAndNormalizeHistogram
(TH1* histo,
const
std::string& hname)
const
;
41
42
std::vector<double>
calculateLikelihood
(
const
std::vector<Slice>& lhVariableValues)
const
;
43
44
void
printStatus
()
const
;
45
46
// helper functions:
47
double
getEff
(
const
std::string& hypo,
const
std::string& histo,
const
std::string& suffix)
const
;
48
std::vector<std::string>
gradeList
(
const
std::string& hname)
const
;
49
50
private
:
51
52
std::string
m_taggerName
;
// tagger this tool refers to
53
std::vector<std::string>
m_hypotheses
;
// likelihood hypotheses: usually B or U
54
56
SG::ReadCondHandleKey<JetTagCalibCondData>
m_readKey
{
this
,
"HistosKey"
,
"JetTagCalibHistosKey"
,
"Key of input (derived) JetTag calibration data"
};
57
59
bool
m_normalizedProb
;
60
bool
m_interpolate
;
61
int
m_smoothNTimes
;
62
std::vector<std::string>
m_vetoSmoothingOf
;
63
64
std::vector<std::string>
m_histograms
;
65
66
};
67
68
}
69
#endif
70
AthAlgTool.h
JetTagCalibCondData.h
LikelihoodComponents.h
Analysis::NewLikelihoodTool::m_histograms
std::vector< std::string > m_histograms
Definition
NewLikelihoodTool.h:64
Analysis::NewLikelihoodTool::gradeList
std::vector< std::string > gradeList(const std::string &hname) const
Definition
NewLikelihoodTool.cxx:62
Analysis::NewLikelihoodTool::prepareHistogram
TH1 * prepareHistogram(const std::string &hypo, const std::string &hname) const
Definition
NewLikelihoodTool.cxx:101
Analysis::NewLikelihoodTool::~NewLikelihoodTool
virtual ~NewLikelihoodTool()=default
Analysis::NewLikelihoodTool::getEff
double getEff(const std::string &hypo, const std::string &histo, const std::string &suffix) const
Definition
NewLikelihoodTool.cxx:393
Analysis::NewLikelihoodTool::m_hypotheses
std::vector< std::string > m_hypotheses
Definition
NewLikelihoodTool.h:53
Analysis::NewLikelihoodTool::m_normalizedProb
bool m_normalizedProb
Treatment of histograms:
Definition
NewLikelihoodTool.h:59
Analysis::NewLikelihoodTool::calculateLikelihood
std::vector< double > calculateLikelihood(const std::vector< Slice > &lhVariableValues) const
Definition
NewLikelihoodTool.cxx:224
Analysis::NewLikelihoodTool::printStatus
void printStatus() const
Definition
NewLikelihoodTool.cxx:54
Analysis::NewLikelihoodTool::defineHistogram
void defineHistogram(const std::string &hname)
Analysis::NewLikelihoodTool::m_readKey
SG::ReadCondHandleKey< JetTagCalibCondData > m_readKey
Key of calibration data:
Definition
NewLikelihoodTool.h:56
Analysis::NewLikelihoodTool::m_taggerName
std::string m_taggerName
Definition
NewLikelihoodTool.h:52
Analysis::NewLikelihoodTool::m_vetoSmoothingOf
std::vector< std::string > m_vetoSmoothingOf
Definition
NewLikelihoodTool.h:62
Analysis::NewLikelihoodTool::NewLikelihoodTool
NewLikelihoodTool(const std::string &, const std::string &, const IInterface *)
Definition
NewLikelihoodTool.cxx:20
Analysis::NewLikelihoodTool::m_interpolate
bool m_interpolate
Definition
NewLikelihoodTool.h:60
Analysis::NewLikelihoodTool::initialize
virtual StatusCode initialize() override
Definition
NewLikelihoodTool.cxx:45
Analysis::NewLikelihoodTool::smoothAndNormalizeHistogram
void smoothAndNormalizeHistogram(TH1 *histo, const std::string &hname) const
Definition
NewLikelihoodTool.cxx:158
Analysis::NewLikelihoodTool::interfaceID
static const InterfaceID & interfaceID()
Definition
NewLikelihoodTool.h:34
Analysis::NewLikelihoodTool::m_smoothNTimes
int m_smoothNTimes
Definition
NewLikelihoodTool.h:61
Analysis::NewLikelihoodTool::defineHypotheses
void defineHypotheses(const std::vector< std::string > &)
Definition
NewLikelihoodTool.cxx:50
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
IConstituent.h:25
Analysis::IID_NewLikelihoodTool
static const InterfaceID IID_NewLikelihoodTool("Analysis::NewLikelihoodTool", 1, 0)
Generated on
for ATLAS Offline Software by
1.17.0