Belle II Software development
LowEnergyPi0IdentificationExpertModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11/* Analysis headers. */
12#include <analysis/dataobjects/ParticleList.h>
13
14/* Basf2 headers. */
15#include <framework/core/Module.h>
16#include <framework/database/DBObjPtr.h>
17#include <framework/datastore/StoreObjPtr.h>
18
19/* C++ headers. */
20#include <string>
21
22namespace Belle2 {
28 namespace MVA {
29 class Expert;
30 class SingleDataset;
31 class Weightfile;
32 }
33
38
39 public:
40
45
50
54 void initialize() override;
55
59 void beginRun() override;
60
64 void event() override;
65
69 void endRun() override;
70
74 void terminate() override;
75
76 private:
77
82 void init_mva(MVA::Weightfile& weightfile);
83
85 std::string m_Pi0ListName;
86
89
92
94 std::string m_identifier = "LowEnergyPi0Identification";
95
97 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>> m_weightfile_representation;
98
100 std::unique_ptr<MVA::Expert> m_expert;
101
103 std::unique_ptr<MVA::SingleDataset> m_dataset;
104
105 };
106
108}
Database representation of a Weightfile object.
std::unique_ptr< MVA::SingleDataset > m_dataset
Pointer to the current dataset.
void event() override
This method is called for each event.
void endRun() override
This method is called if the current run ends.
void terminate() override
This method is called at the end of the event processing.
std::unique_ptr< MVA::Expert > m_expert
Pointer to the current MVA expert.
std::unique_ptr< DBObjPtr< DatabaseRepresentationOfWeightfile > > m_weightfile_representation
Database pointer to the database representation of the weightfile.
void init_mva(MVA::Weightfile &weightfile)
Initialize mva expert, dataset and features Called every time the weightfile in the database changes ...
std::string m_identifier
Database identifier or file used to load the weights.
Abstract base class of all Expert Each MVA library has its own implementation of this class,...
Definition Expert.h:31
Wraps the data of a single event into a Dataset.
Definition Dataset.h:135
The Weightfile class serializes all information about a training into an xml tree.
Definition Weightfile.h:38
Module()
Constructor.
Definition Module.cc:30
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
Abstract base class for different kinds of events.