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 <framework/datastore/StoreObjPtr.h>
18
19/* C++ headers. */
20#include <string>
21
22namespace Belle2 {
28 class Particle;
29 namespace MVA {
30 class Expert;
31 class SingleDataset;
32 class Weightfile;
33 }
34
39
40 public:
41
46
51
55 void initialize() override;
56
60 void beginRun() override;
61
65 void event() override;
66
70 void endRun() override;
71
75 void terminate() override;
76
77 private:
78
83 void init_mva(MVA::Weightfile& weightfile);
84
91 float getMaximumVeto(const Particle* gamma1, const Particle* pi0Gamma);
92
99
101 std::string m_GammaListName;
102
104 std::string m_Pi0ListName;
105
108
111
114
116 std::string m_identifier = "LowEnergyPi0Veto";
117
119 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>> m_weightfile_representation;
120
122 std::unique_ptr<MVA::Expert> m_expert;
123
125 std::unique_ptr<MVA::SingleDataset> m_dataset;
126
127 };
128
130}
Database representation of a Weightfile object.
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.
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
Class to store reconstructed particles.
Definition Particle.h:76
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
Abstract base class for different kinds of events.