Belle II Software development
ECLClusterPSD.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/* Basf2 headers. */
12#include <framework/core/Module.h>
13#include <framework/database/DBObjPtr.h>
14#include <framework/datastore/StoreArray.h>
15
16namespace Belle2 {
21
23 class ECLShower;
24 class ECLCalDigit;
25
26 namespace MVA {
27 class Expert;
28 class SingleDataset;
29 }
30
36
37 public:
38
42
46
48 virtual void initialize() override;
49
51 virtual void beginRun() override;
52
55 virtual void event() override;
56
58 virtual void endRun() override;
59
61 virtual void terminate() override;
62
64 virtual const char* eclCalDigitArrayName() const
65 { return "ECLCalDigits" ; }
66
68 virtual const char* eclShowerArrayName() const
69 { return "ECLShowers" ; }
70
71 private:
76
77 const unsigned int maxdigits = 20;
78 const unsigned int m_numMVAvariables = 160;
79 std::string m_MVAidentifier;
80 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>>
82 std::unique_ptr<MVA::Expert> m_expert;
83 std::unique_ptr<MVA::SingleDataset> m_dataset;
87 void initializeMVAweightFile(const std::string& identifier,
88 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>>& weightFileRepresentation);
89
91 void initializeMVA(const std::string& identifier,
92 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>>& weightFileRepresentation, std::unique_ptr<MVA::Expert>& expert);
93
94 double evaluateMVA(const ECLShower* cluster);
95
96 };
97
100 public:
102 virtual const char* eclCalDigitArrayName() const override
103 { return "ECLCalDigitsPureCsI" ; }
104
106 virtual const char* eclShowerArrayName() const override
107 { return "ECLShowersPureCsI" ; }
108
109 };
110
112} // end Belle2 namespace
Class for accessing objects in the database.
Definition DBObjPtr.h:21
Database representation of a Weightfile object.
Class to store calibrated ECLDigits: ECLCalDigits.
Definition ECLCalDigit.h:23
virtual const char * eclShowerArrayName() const
ECLShowers array name.
StoreArray< ECLShower > m_eclShowers
ECLShower's.
std::unique_ptr< MVA::SingleDataset > m_dataset
Pointer to the current dataset.
virtual void initialize() override
Initialize variables.
virtual void event() override
event per event.
virtual void endRun() override
end run.
virtual void terminate() override
terminate.
std::unique_ptr< MVA::Expert > m_expert
Pointer to the current MVA Expert.
const unsigned int maxdigits
Max number of digits mva can include.
const unsigned int m_numMVAvariables
number of variables expected in the MVA weightfile
std::unique_ptr< DBObjPtr< DatabaseRepresentationOfWeightfile > > m_weightfile_representation
Database pointer to the Database representation of the MVA weightfile.
virtual void beginRun() override
begin run.
void initializeMVAweightFile(const std::string &identifier, std::unique_ptr< DBObjPtr< DatabaseRepresentationOfWeightfile > > &weightFileRepresentation)
initialize MVA weight file from DB
double m_CrystalHadronEnergyThreshold
hadron component energy threshold to classify as hadron.
std::string m_MVAidentifier
MVA - weight-file.
virtual const char * eclCalDigitArrayName() const
ECLCalDigits array name.
double evaluateMVA(const ECLShower *cluster)
Evaluates mva.
StoreArray< ECLCalDigit > m_eclCalDigits
ECLCalDigit's.
void initializeMVA(const std::string &identifier, std::unique_ptr< DBObjPtr< DatabaseRepresentationOfWeightfile > > &weightFileRepresentation, std::unique_ptr< MVA::Expert > &expert)
Load MVA weight file and set pointer of expert.
double m_CrystalHadronIntensityThreshold
hadron component intensity threshold to classify as hadron.
Class derived from ECL, only difference are the names.
virtual const char * eclCalDigitArrayName() const override
PureCsI Name of the ECLCalDigitsPureCsI.
virtual const char * eclShowerArrayName() const override
PureCsI Name of the ECLShowersPureCsI.
Class to store ECL Showers.
Definition ECLShower.h:30
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
Module()
Constructor.
Definition Module.cc:30
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Abstract base class for different kinds of events.