EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmRichTrainAnnSelect.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmRichTrainAnnSelect.h
1 
10 #ifndef CBM_RICH_TRAIN_ANN_SELECT
11 #define CBM_RICH_TRAIN_ANN_SELECT
12 
13 #include "FairTask.h"
14 #include <vector>
15 #include "CbmRichRingFitterCOP.h"
16 #include "CbmRichRingSelectImpl.h"
17 #include "TH1D.h"
18 using std::vector;
19 
20 //class TH1D;
21 //class TH1;
22 //class CbmRichRingFitterCOP;
23 //class CbmRichRingSelectImpl;
24 class CbmRichRing;
25 
35 {
36 public:
37  Double_t fNofHits;
38  Double_t fAngle;
39  Double_t fHitsOnRing;
40  Double_t fRadPos;
41  Double_t fChi2;
42  Double_t fRadius;
43 };
44 
54 {
55 public:
56 
61 
65  virtual ~CbmRichTrainAnnSelect();
66 
70  virtual InitStatus Init();
71 
75  virtual void Exec(
76  Option_t* option);
77 
81  virtual void FinishTask();
82 
83 private:
84  TClonesArray* fRichRings; // Array of CbmRichRings
85  TClonesArray* fMcTracks; // Array of CbmMCTracks
86  TClonesArray* fRichRingMatches; // Array of CbmRichRingMatch
87 
88  Int_t fEventNumber;
89  Double_t fQuota; // Quality quota for reconstructed ring
90  Int_t fMaxNofTrainSamples; // maximum number of train samples for ANN
93  Double_t fAnnCut;
94 
95  // Difference Fake and True rings histograms BEGIN
96  // [0] = is true; [1] = is fake
97  vector<TH1D*> fhNofHits;
98  vector<TH1D*> fhAngle;
99  vector<TH1D*> fhNofHitsOnRing;
100  vector<TH1D*> fhChi2;
101  vector<TH1D*> fhRadPos;
102  vector<TH1D*> fhRadius;
103 
104  // ANN outputs
105  // [0] = is true; [1] = is fake
106  vector<TH1D*> fhAnnOutput;
107  vector<TH1D*> fhCumProb;
108 
109  // Data for ANN input
110  // [0] = true, [1] = fake
111  vector<vector<RingSelectParam> > fRSParams;
112 
113  CbmRichRingFitterCOP* fFitCOP; // Pointer to COP fitter
114  CbmRichRingSelectImpl* fSelectImpl; // Pointer to ellipse fitter
115 
116  vector<TH1*> fHists; // Store pointer for all histograms
117 
121  void SetRecFlag();
122 
126  void DiffFakeTrueCircle();
127 
131  void TrainAndTestAnn();
132 
136  void Draw();
137 
142 
147 
149 };
150 
151 #endif