PandaRoot
PndPDEFoamClassify.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /* ***************************************
14  * PDEFoam Classifier *
15  * Author: M.Babai@rug.nl *
16  * LICENSE: *
17  * Version: 0.1 beta1. *
18  * License: *
19  * ***************************************
20  */
21 #pragma once
22 #ifndef PND_PDE_FOAMCLASSIFY_H
23 #define PND_PDE_FOAMCLASSIFY_H
24 
25 // Local includes
26 #include "PndGpidClassifier.h"
27 
28 // ROOT AND PANDA
29 #include "TMVA/PDEFoam.h"
30 #include "TMVA/Event.h"
31 
32 class PndPDEFoamClassify //: public PndGpidClassifier
33 {
34  public:
35  PndPDEFoamClassify(const std::string &inputFile, const std::vector<std::string> &classNames, const std::vector<std::string> &varNames);
36  virtual ~PndPDEFoamClassify();
37 
38  void GetMvaValues(std::vector<float> eventData, std::map<std::string, float> &result);
39 
40  const std::string &Classify(std::vector<float> EvtData) const;
41 
42  protected:
43  void ReadInputFile();
44 
45  private:
46  // Functions
48  PndPDEFoamClassify &operator=(const PndPDEFoamClassify &other);
49 
50  // Variables.
51  // Comment:
52  /*
53  * Mabe wee need to inherit from classifiers in order to avoid
54  * double implementation. For the time being, lets use this.
55  */
56  std::string m_inputFile;
57  std::vector<TMVA::PDEFoam *> m_foams;
58  std::vector<PndMvaVariable> m_vars;
59  std::vector<PndMvaClass> m_classes;
60 };
61 #endif // end of interface definition
void GetMvaValues(std::vector< float > eventData, std::map< std::string, float > &result)
PndPDEFoamClassify(const std::string &inputFile, const std::vector< std::string > &classNames, const std::vector< std::string > &varNames)
const std::string & Classify(std::vector< float > EvtData) const
virtual ~PndPDEFoamClassify()