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 {
22 class DatabaseRepresentationOfWeightfile;
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:
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);
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
This module computes shower variables using pulse shape information from offline two component fits.
Definition: ECLClusterPSD.h:35
virtual const char * eclShowerArrayName() const
ECLShowers array name.
Definition: ECLClusterPSD.h:68
ECLClusterPSDModule()
Constructor.
StoreArray< ECLShower > m_eclShowers
ECLShower's.
Definition: ECLClusterPSD.h:75
std::unique_ptr< MVA::SingleDataset > m_dataset
Pointer to the current dataset.
Definition: ECLClusterPSD.h:83
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.
Definition: ECLClusterPSD.h:82
const unsigned int maxdigits
Max number of digits mva can include.
Definition: ECLClusterPSD.h:77
const unsigned int m_numMVAvariables
number of variables expected in the MVA weightfile
Definition: ECLClusterPSD.h:78
std::unique_ptr< DBObjPtr< DatabaseRepresentationOfWeightfile > > m_weightfile_representation
Database pointer to the Database representation of the MVA weightfile.
Definition: ECLClusterPSD.h:81
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.
Definition: ECLClusterPSD.h:72
std::string m_MVAidentifier
MVA - weight-file.
Definition: ECLClusterPSD.h:79
virtual const char * eclCalDigitArrayName() const
ECLCalDigits array name.
Definition: ECLClusterPSD.h:64
double evaluateMVA(const ECLShower *cluster)
Evaluates mva.
StoreArray< ECLCalDigit > m_eclCalDigits
ECLCalDigit's.
Definition: ECLClusterPSD.h:74
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.
Definition: ECLClusterPSD.h:73
Class derived from ECL, only difference are the names.
Definition: ECLClusterPSD.h:99
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
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.