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 <mva/dataobjects/DatabaseRepresentationOfWeightfile.h>
18#include <mva/interface/Expert.h>
19#include <mva/interface/Weightfile.h>
20
21/* C++ headers. */
22#include <string>
23
24namespace Belle2 {
34
35 public:
36
41
46
50 void initialize() override;
51
55 void beginRun() override;
56
60 void event() override;
61
65 void endRun() override;
66
70 void terminate() override;
71
72 private:
73
78 void init_mva(MVA::Weightfile& weightfile);
79
81 std::string m_Pi0ListName;
82
85
88
90 std::string m_identifier = "LowEnergyPi0Identification";
91
93 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>> m_weightfile_representation;
94
96 std::unique_ptr<MVA::Expert> m_expert;
97
99 std::unique_ptr<MVA::SingleDataset> m_dataset;
100
101 };
102
104}
Calculation of low-energy pi0 identification value.
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 beginRun() override
Called when entering a new run.
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.
The Weightfile class serializes all information about a training into an xml tree.
Definition: Weightfile.h:38
Base class for Modules.
Definition: Module.h:72
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.