Belle II Software development
LowEnergyPi0VetoExpertModule.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
86 float getMaximumVeto(const Particle* gamma1, const Particle* pi0Gamma);
87
94
96 std::string m_GammaListName;
97
99 std::string m_Pi0ListName;
100
103
106
109
111 std::string m_identifier = "LowEnergyPi0Veto";
112
114 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>> m_weightfile_representation;
115
117 std::unique_ptr<MVA::Expert> m_expert;
118
120 std::unique_ptr<MVA::SingleDataset> m_dataset;
121
122 };
123
125}
Calculation of low-energy pi0 veto value.
std::unique_ptr< MVA::SingleDataset > m_dataset
Pointer to the current dataset.
StoreObjPtr< ParticleList > m_ListGamma
Gamma candidates.
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.
bool m_VetoPi0Daughters
Calculate veto for pi0 daughter photons (maximum over all pairs excluding this pi0).
StoreObjPtr< ParticleList > m_ListPi0
Pi0 candidates.
void init_mva(MVA::Weightfile &weightfile)
Initialize mva expert, dataset and features Called every time the weightfile in the database changes ...
std::string m_GammaListName
Gamma particle list name.
std::string m_Pi0ListName
Pi0 particle list name.
float getMaximumVeto(const Particle *gamma1, const Particle *pi0Gamma)
Get maximum veto value over all gamma pairs including the photon gamma1.
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
Class to store reconstructed particles.
Definition: Particle.h:75
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.