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
45 ~ECLClusterPSDModule() override;
46
48 virtual void initialize() override;
49
51 virtual void beginRun() override;
52
55 virtual void event() override;
56
58 virtual const char* eclCalDigitArrayName() const
59 { return "ECLCalDigits" ; }
60
62 virtual const char* eclShowerArrayName() const
63 { return "ECLShowers" ; }
64
65 private:
70
71 const unsigned int maxdigits = 20;
72 const unsigned int m_numMVAvariables = 160;
73 std::string m_MVAidentifier;
74 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>>
76 std::unique_ptr<MVA::Expert> m_expert;
77 std::unique_ptr<MVA::SingleDataset> m_dataset;
81 void initializeMVAweightFile(const std::string& identifier,
82 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>>& weightFileRepresentation);
83
85 void initializeMVA(const std::string& identifier,
86 std::unique_ptr<DBObjPtr<DatabaseRepresentationOfWeightfile>>& weightFileRepresentation, std::unique_ptr<MVA::Expert>& expert);
87
88 double evaluateMVA(const ECLShower* cluster);
89
90 };
91
94 public:
96 virtual const char* eclCalDigitArrayName() const override
97 { return "ECLCalDigitsPureCsI" ; }
98
100 virtual const char* eclShowerArrayName() const override
101 { return "ECLShowersPureCsI" ; }
102
103 };
104
106} // 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.
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.
~ECLClusterPSDModule() override
Destructor.
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.