ATLAS Offline Software
Loading...
Searching...
No Matches
LikelihoodMultiDTool.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_LIKELIHOODMULTIDTOOL_H
6#define JETTAGTOOLS_LIKELIHOODMULTIDTOOL_H
7/******************************************************
8 @class LikelihoodMultiDTool
9 DESCRIPTION:
10 Helper class for likelihood calculations
11********************************************************/
12
14#include <string>
15#include <vector>
16#include <map>
17
19
21
22class ITHistSvc;
23class TH1;
24
25namespace Analysis
26{
27
28static const InterfaceID IID_LikelihoodMultiDTool("Analysis::LikelihoodMultiDTool", 1, 0);
29
31{
32
33 public:
34
35 LikelihoodMultiDTool(const std::string&,const std::string&,const IInterface*);
36 virtual ~LikelihoodMultiDTool();
37
39 StatusCode initialize();
41 StatusCode finalize();
42
43 static const InterfaceID& interfaceID() { return IID_LikelihoodMultiDTool; };
44
45 void prepareHistosFromFile(const std::string& refFileName);
46 TH1* retrieveHistoFromFile(const std::string& refFileName,
47 const std::string& histoName, const std::string& jetPrefix);
48 void setLhVariableValue(std::vector<Slice>& value);
49 void setLhVariableValue(Slice& value);
50 std::vector<double> calculateLikelihood();
51 const std::vector<double>& tagLikelihood();
52 void printStatus();
53 double getEff(const std::string& , const std::string& , const std::string&);
54 void addLhVariableToUse(const std::string&);
56 void setInterpolFlag(bool f) {m_DoInterpol = f;}
58
59 private:
60
61 ITHistSvc* m_histoSvc;
62
63 // Filled once at the beginning of an run
64 //std::vector<std::string> m_allLhVariables; //!< names of all likelihood variables in the histogram file
65 std::vector<std::string> m_useTheseLhVariables;
66
71 std::vector< std::map<std::string, TH1*>* > m_mapOfAllHistos;
72
76 std::map<std::string, HistoLimits> m_histoLimitsMap1D;
77 std::map<std::string, HistoLimits> m_histoLimitsMap2D;
78 std::map<std::string, HistoLimits> m_histoLimitsMap3D;
79
80 // Filled once per event
86 std::vector<Slice> m_lhVariableValues;
87
90 std::vector<double> m_likelihoodVector;
91
96
97 //
100
101 unsigned int m_nbHypotheses; // nb of hypotheses (default 2: b | u)
102
103 // for soft-mu:
106
107};
108
109}
110#endif
111
std::vector< std::string > m_useTheseLhVariables
names of lh variables which one wants to use (subset of m_allLhVariables)
StatusCode finalize()
AlgTool finalize method.
StatusCode initialize()
AlgTool initailize method.
double getEff(const std::string &, const std::string &, const std::string &)
static const InterfaceID & interfaceID()
std::map< std::string, HistoLimits > m_histoLimitsMap2D
std::map< std::string, HistoLimits > m_histoLimitsMap3D
std::vector< Slice > m_lhVariableValues
Contains the value of the likelihood variable with the key std::string.
LikelihoodMultiDTool(const std::string &, const std::string &, const IInterface *)
std::vector< double > calculateLikelihood()
std::map< std::string, HistoLimits > m_histoLimitsMap1D
To hold the histo limits.
void addLhVariableToUse(const std::string &)
void setLhVariableValue(std::vector< Slice > &value)
std::vector< double > m_likelihoodVector
Contains the combined likelihood for each input file category.
TH1 * retrieveHistoFromFile(const std::string &refFileName, const std::string &histoName, const std::string &jetPrefix)
void prepareHistosFromFile(const std::string &refFileName)
const std::vector< double > & tagLikelihood()
std::vector< std::map< std::string, TH1 * > * > m_mapOfAllHistos
For every histogram input file this vector contains a map with the names of the histograms as a key a...
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_LikelihoodMultiDTool("Analysis::LikelihoodMultiDTool", 1, 0)