ATLAS Offline Software
Loading...
Searching...
No Matches
LikelihoodMultiDTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8
9#include "GaudiKernel/DataObject.h"
10#include "GaudiKernel/MsgStream.h"
12#include <string>
13#include <utility>
14#include <vector>
15#include <cmath>
16
17#include "GaudiKernel/ITHistSvc.h"
18#include "TH1.h"
19#include "TH2.h"
20#include "TH3.h"
21
22namespace Analysis
23{
24
25 LikelihoodMultiDTool::LikelihoodMultiDTool(const std::string& t, const std::string& n, const IInterface* p) :
26 AthAlgTool(t,n,p),
27 m_histoSvc(0),
28 //m_allLhVariables(std::vector<std::string>()),
30 m_mapOfAllHistos(std::vector<std::map<std::string, TH1*>* >()),
35 m_likelihoodVector(std::vector<double>()),
36 m_nhis1D(0),
37 m_nhis2D(0),
38 m_nhis3D(0),
39 m_DoInterpol(false),
42 m_nSmooth1D(1),
43 m_normProb(true)
44 {
45 declareInterface<LikelihoodMultiDTool>(this);
46 declareProperty("WriteSmoothedHistos", m_WriteSmoothedHistos);
47 declareProperty("NSmooth1D", m_nSmooth1D);
48 declareProperty("NormalizeProb", m_normProb);
49 }
50
52 {
53 for (std::vector< std::map<std::string, TH1*>* >::iterator itr = m_mapOfAllHistos.begin();
54 itr != m_mapOfAllHistos.end(); ++itr) delete (*itr);
55 }
56
58 {
59
60 StatusCode sc = service("THistSvc", m_histoSvc);
61 if (sc.isFailure())
62 {
63 ATH_MSG_FATAL("THistSvc not found!");
64 return StatusCode::FAILURE;
65 }
66 //
67 return StatusCode::SUCCESS;
68 }
69
71 {
72 return StatusCode::SUCCESS;
73 }
74
75 void LikelihoodMultiDTool::prepareHistosFromFile(const std::string& refFileName) {
76 MsgStream mlog(msgSvc(),name());
77 ATH_MSG_DEBUG("refFileName = "<<refFileName);
78 // the tmpHistoMap belongs to m_mapOfAllHistos and is deleted at the end in the destructor of LikelihoodMultiDTool()
79 std::map<std::string, TH1*>* tmpHistoMap = new std::map<std::string, TH1*>();
80 // loop on requested histos:
81 for (std::vector<std::string>::iterator itr = m_useTheseLhVariables.begin() ;
82 itr != m_useTheseLhVariables.end() ; ++itr ) {
83 std::string histoName = *itr;
84 std::vector<std::string> grades;
85 // parse histo name to extract words separated by _ sign:
86 // first word is the histo base name, following ones are the grades
87 // first word is jet category, 2nd is the histo base name, following ones are the grades
88 std::vector<std::string> words;
89
90 ATH_MSG_DEBUG("decoding histoName = "<<histoName);
91
92 const std::string delim("_");
93 std::string::size_type sPos, sEnd, sLen;
94 sPos = histoName.find_first_not_of(delim);
95 while ( sPos != std::string::npos ) {
96 sEnd = histoName.find_first_of(delim, sPos);
97 if(sEnd==std::string::npos) sEnd = histoName.length();
98 sLen = sEnd - sPos;
99 std::string word = histoName.substr(sPos,sLen);
100
101 ATH_MSG_DEBUG(" -> word = "<<word);
102
103 words.push_back(word);
104 sPos = histoName.find_first_not_of(delim, sEnd);
105 }
106 // first treat cases with a single or no grade:
107 int nGrade = words.size() - 2;
108 TH1* histoSum(0);
109 if(nGrade==0) {
110 ATH_MSG_DEBUG("Histo "<<histoName<<" has "<<nGrade<<" grade: direct retrieval");
111 histoSum = this->retrieveHistoFromFile(refFileName, words[1], words[0]);
112 } else if(nGrade==1) {
113 ATH_MSG_DEBUG("Histo "<<histoName<<" has "<<nGrade<<" grade: direct retrieval");
114 histoSum = this->retrieveHistoFromFile(refFileName, words[1]+"_"+words[2], words[0]);
115 } else {
116 // for many grades, get individual histos and sum them up:
117 ATH_MSG_DEBUG("Histo "<<histoName<<" has "<<nGrade<<" grades:");
118 for(int i=1;i<=nGrade;i++) {
119 ATH_MSG_DEBUG(" -> retrieving histo for grade "<<i<<" : "<<words[1]<<" "<<words[i+1]);
120 TH1* histo = this->retrieveHistoFromFile(refFileName, words[1]+"_"+words[i+1], words[0]);
121 ATH_MSG_DEBUG(" #entries= "<<histo->GetEntries());
122 if(1==i) {
123 histoSum = histo;
124 } else {
125 histoSum->Add(histo,1.);
126 }
127 ATH_MSG_DEBUG(" #entries for Sum= "<<histoSum->GetEntries());
128 }
129 }
130 if(histoSum) {
131 // smooth and normalize:
132 double norm = histoSum->Integral();
133 if(norm) {
134 if(1==histoSum->GetDimension() && m_nSmooth1D) {
135 if(histoName.find("N2T")==std::string::npos){ // do not smooth N2T
136 if(norm>10000)histoSum->Smooth(m_nSmooth1D);
137 else histoSum->Smooth((int)(m_nSmooth1D*100./sqrt(norm)));
138 }
139 }
140 if(2==histoSum->GetDimension()) {
141 int m2d=3;
142 if(refFileName.find("Bkg/")!=std::string::npos) m2d=5;
143 bool debug = mlog.level()<=MSG::DEBUG ? true : false;
144 // do not smooth Sip3D for the time being
145 if(histoName.find("Sip3D")==std::string::npos) HistoHelperRoot::smoothASH2D(dynamic_cast<TH2*>(histoSum), m2d, m2d, debug);
146 }
147 if(3==histoSum->GetDimension()) {
148 int m3d1=3;
149 int m3d3=2;
150 bool debug = mlog.level()<=MSG::DEBUG ? true : false;
151 HistoHelperRoot::smoothASH3D(dynamic_cast<TH3*>(histoSum), m3d1, m3d1, m3d3, debug);
152 }
153 norm = histoSum->Integral();
154 histoSum->Scale(1./norm);
155 } else {
156 ATH_MSG_WARNING("Histo "<<histoName<<" is empty!");
157 }
158 // store: if >= 2 grades in one histo, the histoName is the name of the first Grade
159 // Change LV 2005/10/09: if >=2 grades, insert a copy for each grade:
160 std::string namemap = histoName;
161 if (nGrade == 0) {
162 namemap = words[0]+"_"+words[1];
163 ATH_MSG_VERBOSE("Inserting as " << namemap);
164 tmpHistoMap->insert(std::pair<std::string, TH1*>(namemap, histoSum));
165 }
166 for(int i=1;i<=nGrade;i++) {
167 namemap = words[0] + "_" + words[1] + "_" + words[i+1];
168 ATH_MSG_VERBOSE("Inserting as " << namemap);
169 tmpHistoMap->insert(std::pair<std::string, TH1*>(namemap, histoSum));
170 }
171 // Also for control, store the smoothed histograms in a file
173 std::string namedir = refFileName; namedir = namedir.substr((namedir.erase(namedir.size()-1,1)).rfind('/')+1)+"/";
174 std::string namehis = histoSum->GetName();
175 ATH_MSG_VERBOSE("Registering smoothed histogram in " << namedir);
176 TH1* histoSumClone = (TH1*)histoSum->Clone();
177 StatusCode sc = m_histoSvc->regHist("/ControlFile/"+namedir+namehis, histoSumClone);
178 if (sc.isFailure()) {
179 ATH_MSG_ERROR("Cannot store the smoothed histogram in the control file !");
180 }
181 }
182 }
183 }
184 ATH_MSG_DEBUG("I found "<<m_nhis1D<<" 1D histos, "<<m_nhis2D<<" 2D histos and "<<m_nhis3D<<" 3D histos");
185 if (m_nhis1D+m_nhis2D+m_nhis3D) m_mapOfAllHistos.push_back(tmpHistoMap);
186 }
187
188 TH1* LikelihoodMultiDTool::retrieveHistoFromFile(const std::string& refFileName,
189 const std::string& histoName,
190 const std::string& jetPrefix) {
191 std::string fullPath(refFileName+histoName);
192 ATH_MSG_VERBOSE("Retrieving histo: " << fullPath);
193 bool is1D = false, is2D = false, is3D = false;
194 TH1* tmphisto(0);
195 StatusCode sc = m_histoSvc->regHist(fullPath);
196 if(sc.isFailure()) {};
197 sc = m_histoSvc->getHist(fullPath,tmphisto);
198 int dim = 0;
199 if (sc.isSuccess()) {
200 dim = tmphisto->GetDimension();
201 if (dim == 1) {
202 is1D = true;
203 m_nhis1D++;
204 } else if (dim == 2) {
205 is2D = true;
206 m_nhis2D++;
207 } else if (dim == 3) {
208 is3D = true;
209 m_nhis3D++;
210 } else {
211 ATH_MSG_DEBUG("cannot retrieve histo " << fullPath << " Unexpected dimension "<< dim);
212 return tmphisto;
213 }
214 } else {
215 ATH_MSG_DEBUG("I COULD NOT RETRIEVE HISTO: " << fullPath);
216 return tmphisto;
217 }
219 unsigned int bins = (tmphisto->GetXaxis())->GetNbins();
220 double minx = (tmphisto->GetXaxis())->GetXmin();
221 double maxx = (tmphisto->GetXaxis())->GetXmax();
222 if (is1D) {
223 m_histoLimitsMap1D[jetPrefix+"_"+histoName] = HistoLimits(bins, minx, maxx);
224 ATH_MSG_DEBUG("Histo "<< jetPrefix+"_"+histoName << " properties: ");
225 ATH_MSG_DEBUG(bins <<" bins X between " << minx <<" and " << maxx);
226 } else if (is2D) {
227 unsigned int binsy = (tmphisto->GetYaxis())->GetNbins();
228 double miny = (tmphisto->GetYaxis())->GetXmin();
229 double maxy = (tmphisto->GetYaxis())->GetXmax();
230 m_histoLimitsMap2D[jetPrefix+"_"+histoName] = HistoLimits(bins, minx, maxx, binsy, miny, maxy);
231 ATH_MSG_DEBUG("Histo "<< jetPrefix+"_"+histoName << " properties: ");
232 ATH_MSG_DEBUG(bins <<" bins X between " << minx <<" and " << maxx );
233 ATH_MSG_DEBUG(binsy <<" bins Y between " << miny <<" and " << maxy);
234 } else if (is3D) {
235 unsigned int binsy = (tmphisto->GetYaxis())->GetNbins();
236 double miny = (tmphisto->GetYaxis())->GetXmin();
237 double maxy = (tmphisto->GetYaxis())->GetXmax();
238 unsigned int binsz = (tmphisto->GetZaxis())->GetNbins();
239 double minz = (tmphisto->GetZaxis())->GetXmin();
240 double maxz = (tmphisto->GetZaxis())->GetXmax();
241 m_histoLimitsMap3D[jetPrefix+"_"+histoName] = HistoLimits(bins, minx, maxx, binsy, miny, maxy, binsz, minz, maxz);
242
243 ATH_MSG_DEBUG("Histo "<< jetPrefix+"_"+histoName << " properties: ");
244 ATH_MSG_DEBUG(bins <<" bins X between " << minx <<" and " << maxx);
245 ATH_MSG_DEBUG(binsy <<" bins Y between " << miny <<" and " << maxy);
246 ATH_MSG_DEBUG(binsz <<" bins Z between " << minz <<" and " << maxz);
247 }
248 return tmphisto;
249 }
250
251 void LikelihoodMultiDTool::setLhVariableValue(std::vector<Slice>& value)
252 {
253 m_lhVariableValues=value;
254 }
256 {
257 std::vector<Slice> tmpVector;
258 tmpVector.push_back(value);
259 setLhVariableValue(tmpVector);
260 }
261
262
264 m_likelihoodVector.clear();
265 std::vector<double> probDensityPerEventClassAllVariables;
266 ATH_MSG_VERBOSE("The sizes of the maps "<<m_mapOfAllHistos.size()<<" "<<m_nbHypotheses);
267 probDensityPerEventClassAllVariables.resize(m_nbHypotheses);
268 for (unsigned int i = 0 ; i < m_nbHypotheses; ++i) {
269 probDensityPerEventClassAllVariables[i]=1.;
270 }
271
272 // Loop on Tracks in the Jet (IP) / Vertices in the Jet (SV)
273 for (unsigned int iel = 0; iel<m_lhVariableValues.size(); iel++) {
274 int ncompo = m_lhVariableValues[iel].composites.size();
275 ATH_MSG_VERBOSE("-- element "<<iel<<" "<<m_lhVariableValues[iel].name<<" has "<<ncompo<<" composites.");
276 // Loop on variables that make up the Tag, e.g.
277 // one 1D for IP2D, one 2D for IP3D, one 1D and one 2D for SV1, one 3D for SV2
278 for (int icompo = 0;icompo<ncompo;icompo++) {
279 double sum(0.);
280 std::vector<double> tmpVector;
281 std::string histName = m_lhVariableValues[iel].composites[icompo].name;
282 int idim = m_lhVariableValues[iel].composites[icompo].atoms.size();
283 ATH_MSG_VERBOSE(" -- composite "<<icompo<<" histo= "<<histName<<" dim= "<<idim);
284 if (idim == 1) {
285 const HistoLimits& histoLimits = (*(m_histoLimitsMap1D.find(histName))).second;
286 // Loop on Hypotheses : b or light for the time being...
287 for (std::vector< std::map<std::string, TH1*>* >::iterator
288 itr2 = m_mapOfAllHistos.begin() ;
289 itr2 != m_mapOfAllHistos.end() ; ++itr2 ) {
290 if( (*itr2)->find(histName) != (*itr2)->end() ) {
291 TH1* tmpHisto = (*((*itr2)->find(histName))).second;
292 double value = m_lhVariableValues[iel].composites[icompo].atoms[0].value;
293 int bin((tmpHisto->GetXaxis())->FindBin(value));
294 double tmp(0);
295 if(!m_DoInterpol) {
296 if(value>= histoLimits.xmax) bin = histoLimits.bins;
297 if(value<= histoLimits.xmin) bin = 1;
298 tmp = tmpHisto->GetBinContent(bin);
299 }
300 else {
301 tmp = HistoHelperRoot::Interpol1d(value,dynamic_cast<TH1*>(tmpHisto));
302 }
303 ATH_MSG_VERBOSE(" (1D) value= "<<value<<" bin= "<<bin<< " f = "<<tmp);
304 if (!m_normProb) {
305 double binw = tmpHisto->GetBinWidth(bin);
306 if(binw != 0.)tmp /= binw;
307 else ATH_MSG_ERROR("Bin width is 0.");
308 ATH_MSG_VERBOSE(" (1D) value= "<<value<<" bin= "<<bin<<" binw= "<<binw<< " f = "<<tmp);
309 }
310 tmpVector.push_back(tmp);
311 sum += tmp;
312 }
313 }
314 } else if (idim == 2) {
315 const HistoLimits& histoLimits = (*(m_histoLimitsMap2D.find(histName))).second;
316 for (std::vector< std::map<std::string, TH1*>* >::iterator
317 itr2 = m_mapOfAllHistos.begin() ;
318 itr2 != m_mapOfAllHistos.end() ; ++itr2 ) {
319 if( (*itr2)->find(histName) != (*itr2)->end() ) {
320 TH1* tmpHisto = (*((*itr2)->find(histName))).second;
321 ATH_MSG_VERBOSE("tmpHisto="<<tmpHisto);
322 double valuex = m_lhVariableValues[iel].composites[icompo].atoms[0].value;
323 double valuey = m_lhVariableValues[iel].composites[icompo].atoms[1].value;
324 int binx((tmpHisto->GetXaxis())->FindBin(valuex));
325 int biny((tmpHisto->GetYaxis())->FindBin(valuey));
326 if(valuex>= histoLimits.xmax) binx = histoLimits.bins;
327 if(valuex<= histoLimits.xmin) binx = 1;
328 if(valuey>= histoLimits.ymax) biny = histoLimits.binsy;
329 if(valuey<= histoLimits.ymin) biny = 1;
330 double tmp(tmpHisto->GetBinContent(binx,biny));
331 ATH_MSG_VERBOSE(" (2D) value= "<<valuex<<" "<<valuey<<" bin= "<<binx<<" "<<biny<< " f = "<<tmp);
332 if (!m_normProb) {
333 double binw = tmpHisto->GetXaxis()->GetBinWidth(binx) * tmpHisto->GetYaxis()->GetBinWidth(biny);
334 if(binw != 0.)tmp /= binw;
335 else ATH_MSG_ERROR("Bin area is 0.");
336 ATH_MSG_VERBOSE(" (2D) value= "<<valuex<<" "<<valuey<<" bin= "<<binx<<" "<<biny<<" binw= "<<binw<< " f = "<<tmp);
337 }
338 tmpVector.push_back(tmp);
339 sum += tmp;
340 }
341 }
342 } else if (idim == 3) {
343 const HistoLimits& histoLimits = (*(m_histoLimitsMap3D.find(histName))).second;
344 for (std::vector< std::map<std::string, TH1*>* >::iterator
345 itr2 = m_mapOfAllHistos.begin() ;
346 itr2 != m_mapOfAllHistos.end() ; ++itr2 ) {
347 if( (*itr2)->find(histName) != (*itr2)->end() ) {
348 TH1* tmpHisto = (*((*itr2)->find(histName))).second;
349 double valuex = m_lhVariableValues[iel].composites[icompo].atoms[0].value;
350 double valuey = m_lhVariableValues[iel].composites[icompo].atoms[1].value;
351 double valuez = m_lhVariableValues[iel].composites[icompo].atoms[2].value;
352 int binx((tmpHisto->GetXaxis())->FindBin(valuex));
353 int biny((tmpHisto->GetYaxis())->FindBin(valuey));
354 int binz((tmpHisto->GetZaxis())->FindBin(valuez));
355 if(valuex>= histoLimits.xmax) binx = histoLimits.bins;
356 if(valuex<= histoLimits.xmin) binx = 1;
357 if(valuey>= histoLimits.ymax) biny = histoLimits.binsy;
358 if(valuey<= histoLimits.ymin) biny = 1;
359 if(valuez>= histoLimits.zmax) binz = histoLimits.binsz;
360 if(valuez<= histoLimits.zmin) binz = 1;
361 double tmpNoInt(tmpHisto->GetBinContent(binx,biny,binz));
362 double tmp(HistoHelperRoot::Interpol3d(valuex,valuey,valuez,dynamic_cast<TH3*>(tmpHisto)));
363 ATH_MSG_VERBOSE(" (3D) value= "<<valuex<<" "<<valuey<<" "<<valuez <<" bin= "<<binx<<" "<<biny<<" "<<binz<<" binContent = "<<tmp<< " binContentNoInt = "<< tmpNoInt);
364 if (!m_normProb) {
365 double binw =
366 tmpHisto->GetXaxis()->GetBinWidth(binx) *
367 tmpHisto->GetYaxis()->GetBinWidth(biny) *
368 tmpHisto->GetZaxis()->GetBinWidth(binz);
369 if(binw != 0.) {
370 tmpNoInt /= binw;
371 tmp /= binw;
372 }
373 else ATH_MSG_ERROR("Bin volume is 0.");
374 ATH_MSG_VERBOSE(" (3D) value= "<<valuex<<" "<<valuey<<" "<<valuez <<" bin= "<<binx<<" "<<biny<<" "<<binz<<" binw= "<<binw<<" binContent = "<<tmp<< " binContentNoInt = "<< tmpNoInt);
375 }
376 if (m_DoInterpol) {
377 tmpVector.push_back(tmp);
378 sum += tmp;
379 } else {
380 tmpVector.push_back(tmpNoInt);
381 sum += tmpNoInt;
382 }
383 }
384 }
385 } else {
386 ATH_MSG_WARNING("No more that 3D pdf for the time being !");
387 }
388 unsigned int classCount(0);
389 for (std::vector<double>::iterator itr3 = tmpVector.begin(); itr3 != tmpVector.end(); ++itr3) {
390 if (sum != 0.) {
391 ATH_MSG_VERBOSE("pb + pu = "<<sum);
392 double p = (*itr3);
393 if (m_normProb) p /= sum;
394 probDensityPerEventClassAllVariables[classCount] *= p;
395 } else {
396 ATH_MSG_WARNING("Empty bins for all hypothesis... The discriminating variables are not taken into account in this jet");
397 ATH_MSG_WARNING("Check your inputs");
398 }
399 ATH_MSG_VERBOSE(" probDensity= "<<probDensityPerEventClassAllVariables[classCount]<<" ic= "<<classCount);
400 classCount++;
401 }
402 ATH_MSG_VERBOSE(" Final probDensity= "<<probDensityPerEventClassAllVariables);
403 }
404 }
405 ATH_MSG_VERBOSE(" Ending ...");
406 m_likelihoodVector=probDensityPerEventClassAllVariables;
407 return m_likelihoodVector;
408 }
409
410 const std::vector<double>& LikelihoodMultiDTool::tagLikelihood()
411 {
412 return m_likelihoodVector;
413 }
414
416 {
417 unsigned int num = m_mapOfAllHistos.size();
418 ATH_MSG_INFO("Currently I hold histos of " << num << " input files");
419 }
420
421 double LikelihoodMultiDTool::getEff(const std::string& refFileName, const std::string& histoName, const std::string& mode)
422 {
423 //
424 StatusCode scs = SUCCESS, scg = SUCCESS;
425 std::string fullPathSel(refFileName+histoName+"Eff"+mode);
426 std::string fullPathGen(refFileName+histoName+"Norm"+mode);
427 ATH_MSG_VERBOSE("Retrieving histo for efficiency computation: " << fullPathSel);
428 ATH_MSG_VERBOSE("Retrieving histo for efficiency computation: " << fullPathGen);
429 TH1 *sel(0), *gen(0);
430 scs = m_histoSvc->regHist(fullPathSel);
431 scg = m_histoSvc->regHist(fullPathGen);
432 if (scs.isSuccess() && scg.isSuccess()) {
433 scs = m_histoSvc->getHist(fullPathSel,sel);
434 scg = m_histoSvc->getHist(fullPathGen,gen);
435 if (sel && gen && scs.isSuccess() && scg.isSuccess()) {
436 double nsel = sel->GetEntries(); // I need also the over/under flow for the efficiency !!!
437 double ngen = gen->GetEntries();
438 if (ngen != 0) {
439 ATH_MSG_VERBOSE("N RecSvx = " << nsel << " in a total of "<< ngen << " jets.");
440 return nsel/ngen;
441 } else {
442 ATH_MSG_ERROR("Pb in computing Svx efficiency " << nsel << " "<< ngen);
443 return 0.;
444 }
445 }
446 } else {
447 // already there...
448 scs = m_histoSvc->getHist(fullPathSel,sel);
449 scg = m_histoSvc->getHist(fullPathGen,gen);
450 if (sel && gen && scs.isSuccess() && scg.isSuccess()) {
451 double nsel = sel->GetEntries();
452 double ngen = gen->GetEntries();
453 if (ngen != 0) {
454 ATH_MSG_VERBOSE("N RecSvx = " << nsel << " in a total of "<< ngen << " jets.");
455 return nsel/ngen;
456 } else {
457 ATH_MSG_ERROR("Pb in computing Svx efficiency " << nsel << " "<< ngen);
458 return 0.;
459 }
460 }
461 }
462 ATH_MSG_ERROR("Pb in computing Svx efficiency ");
463 return 0.;
464 }
465
466 void LikelihoodMultiDTool::addLhVariableToUse(const std::string& var) {
467 m_useTheseLhVariables.push_back(var);
468 }
469
470}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
const bool debug
static const std::vector< std::string > bins
static double Interpol3d(double, double, double, TH3 *)
static double Interpol1d(double, TH1 *)
static void smoothASH2D(TH2 *, int m1=3, int m2=3, bool debug=false)
static void smoothASH3D(TH3 *, int m1=3, int m2=3, int m3=2, bool debug=false)
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 &)
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:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
STL class.
STL class.
The namespace of all packages in PhysicsAnalysis/JetTagging.
STL namespace.