EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmRichTrainAnnElectrons.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmRichTrainAnnElectrons.h
1 
10 #ifndef CbmRichTrainAnnElectrons_H
11 #define CbmRichTrainAnnElectrons_H
12 
13 #include "FairTask.h"
14 #include "TH2D.h"
15 
16 //class TH1;
17 //class TH1D;
18 //class TH2D;
19 class TClonesArray;
20 
21 #include <vector>
22 
23 using std::vector;
24 
34 {
35 public:
36  Double_t fAaxis;
37  Double_t fBaxis;
38  Double_t fPhi;
39  Double_t fRadAngle;
40  Double_t fChi2;
41  Double_t fRadPos;
42  Double_t fNofHits;
43  Double_t fDistance;
44  Double_t fMomentum;
45 };
46 
47 
57 
58 public:
59 
64 
68  virtual ~CbmRichTrainAnnElectrons();
69 
73  virtual InitStatus Init();
74 
78  virtual void Exec(
79  Option_t* option);
80 
84  virtual void FinishTask();
85 
86 private:
87  Int_t fEventNum;
88  TClonesArray* fRichHits;
89  TClonesArray* fRichRings;
90  TClonesArray* fRichPoints;
91  TClonesArray* fMCTracks;
92  TClonesArray* fRichRingMatches;
93  TClonesArray* fRichProj;
94  TClonesArray* fStsTrackMatches;
95  TClonesArray* fGlobalTracks;
96  TClonesArray* fStsTracks;
97 
99  Double_t fQuota;
100  Int_t fMaxNofTrainSamples; // maximum number of train samples for ANN
101 
104  Double_t fAnnCut;
105  // ANN outputs
106  // [0] = electrons; [1] = pions
107  vector<TH1D*> fhAnnOutput;
108  vector<TH1D*> fhCumProb;
109 
110  // Data for ANN input
111  // [0] = electrons, [1] = pions
112  vector<vector<RingElectronParam> > fRElIdParams;
113 
114  // difference between electrons and pions
115  // [0] = is electron; [1] = is pion
116  vector<TH1D*> fhAaxis; //major half axis
117  vector<TH1D*> fhBaxis; //minor half axis
118  // vector<TH1D*> fhAaxisCor; // major half axis after correction
119  // vector<TH1D*> fhBaxisCor; //minor half axis after correction
120  vector<TH1D*> fhDistTrueMatch; // distance between ring center and track projection for true matches
121  vector<TH1D*> fhDistMisMatch; // distance between ring center and track projection for wrong matches
122  vector<TH1D*> fhNofHits; // number of hits in ring
123  vector<TH1D*> fhChi2; // chi2 of the fit
124  vector<TH1D*> fhRadPos; // radial position of a ring onto the photodetector plane
125  vector<TH2D*> fhAaxisVsMom; // major half axis vs. momentum
126  vector<TH2D*> fhBaxisVsMom; // minor half axis vs. momentum
127  vector<TH2D*> fhPhiVsRadAng; // ellipse rotation angle vs. radial angle
128 
129  vector<TH1*> fHists; // Store pointer for all histograms
130 
134  void DiffElandPi();
135 
139  void TrainAndTestAnn();
140 
144  void Draw();
145 
150 
155 
157 };
158 
159 #endif
160