ATLAS Offline Software
Loading...
Searching...
No Matches
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
16#include <string>
17#include <vector>
18
19class TH1;
20
21namespace Analysis {
22
23static const InterfaceID IID_NewLikelihoodTool("Analysis::NewLikelihoodTool", 1, 0);
24
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
62 std::vector<std::string> m_vetoSmoothingOf;
63
64 std::vector<std::string> m_histograms;
65
66};
67
68}
69#endif
70
std::vector< std::string > m_histograms
std::vector< std::string > gradeList(const std::string &hname) const
TH1 * prepareHistogram(const std::string &hypo, const std::string &hname) const
virtual ~NewLikelihoodTool()=default
double getEff(const std::string &hypo, const std::string &histo, const std::string &suffix) const
std::vector< std::string > m_hypotheses
bool m_normalizedProb
Treatment of histograms:
std::vector< double > calculateLikelihood(const std::vector< Slice > &lhVariableValues) const
void defineHistogram(const std::string &hname)
SG::ReadCondHandleKey< JetTagCalibCondData > m_readKey
Key of calibration data:
std::vector< std::string > m_vetoSmoothingOf
NewLikelihoodTool(const std::string &, const std::string &, const IInterface *)
virtual StatusCode initialize() override
void smoothAndNormalizeHistogram(TH1 *histo, const std::string &hname) const
static const InterfaceID & interfaceID()
void defineHypotheses(const std::vector< std::string > &)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
The namespace of all packages in PhysicsAnalysis/JetTagging.
static const InterfaceID IID_NewLikelihoodTool("Analysis::NewLikelihoodTool", 1, 0)