CbmRoot
Loading...
Searching...
No Matches
CbmRichElectronIdAnn.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2020 UGiessen/JINR-LIT, Giessen/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Semen Lebedev [committer], Andrey Lebedev */
4
14
15#ifndef CBM_RICH_ELECTRONID_ANN
16#define CBM_RICH_ELECTRONID_ANN
17
18#include "TClonesArray.h" // for ROOTCLING
19
20#include <string>
21
22class CbmRichRing;
23class TMultiLayerPerceptron;
24
25using std::string;
26
37private:
42
43public:
48 {
49 static CbmRichElectronIdAnn fInstance;
50 return fInstance;
51 }
52
53
57 virtual ~CbmRichElectronIdAnn();
58
65 double CalculateAnnValue(int globalTrackIndex, double momentum);
66
71 //void SetAnnWeights(const string& fileName){fAnnWeights = fileName;}
72
73private:
74 string fAnnWeights; // path to the file with weights for ANN
75 TMultiLayerPerceptron* fNN; // Pointer to the ANN
76
77 TClonesArray* fGlobalTracks;
78 TClonesArray* fRichRings;
79
83 void Init();
84
85private:
90
95};
96
97#endif
CbmRichElectronIdAnn()
Standard constructor.
double CalculateAnnValue(int globalTrackIndex, double momentum)
Calculate output value of the ANN.
static CbmRichElectronIdAnn & GetInstance()
string fAnnWeights
Set path to the file with ANN weights.
virtual ~CbmRichElectronIdAnn()
Destructor.
void Init()
Initialize ANN before use.
TMultiLayerPerceptron * fNN
CbmRichElectronIdAnn(const CbmRichElectronIdAnn &)
Copy constructor.
CbmRichElectronIdAnn & operator=(const CbmRichElectronIdAnn &)
Assignment operator.