CbmRoot
CbmRichTrainAnnSelect.h
Go to the documentation of this file.
1 
10 #ifndef CBM_RICH_TRAIN_ANN_SELECT
11 #define CBM_RICH_TRAIN_ANN_SELECT
12 
13 #include "CbmRichRingFitterCOP.h"
14 #include "CbmRichRingSelectImpl.h"
15 #include "FairTask.h"
16 #include "TH1D.h"
17 #include <vector>
18 using std::vector;
19 
20 //class TH1D;
21 //class TH1;
22 //class CbmRichRingFitterCOP;
23 //class CbmRichRingSelectImpl;
24 class CbmRichRing;
25 
35 public:
36  Double_t fNofHits;
37  Double_t fAngle;
38  Double_t fHitsOnRing;
39  Double_t fRadPos;
40  Double_t fChi2;
41  Double_t fRadius;
42 };
43 
52 class CbmRichTrainAnnSelect : public FairTask {
53 public:
58 
62  virtual ~CbmRichTrainAnnSelect();
63 
67  virtual InitStatus Init();
68 
72  virtual void Exec(Option_t* option);
73 
77  virtual void FinishTask();
78 
79 private:
80  TClonesArray* fRichRings; // Array of CbmRichRings
81  TClonesArray* fMcTracks; // Array of CbmMCTracks
82  TClonesArray* fRichRingMatches; // Array of CbmRichRingMatch
83 
84  Int_t fEventNumber;
85  Double_t fQuota; // Quality quota for reconstructed ring
86  UInt_t fMaxNofTrainSamples; // maximum number of train samples for ANN
89  Double_t fAnnCut;
90 
91  // Difference Fake and True rings histograms BEGIN
92  // [0] = is true; [1] = is fake
93  vector<TH1D*> fhNofHits;
94  vector<TH1D*> fhAngle;
95  vector<TH1D*> fhNofHitsOnRing;
96  vector<TH1D*> fhChi2;
97  vector<TH1D*> fhRadPos;
98  vector<TH1D*> fhRadius;
99 
100  // ANN outputs
101  // [0] = is true; [1] = is fake
102  vector<TH1D*> fhAnnOutput;
103  vector<TH1D*> fhCumProb;
104 
105  // Data for ANN input
106  // [0] = true, [1] = fake
107  vector<vector<RingSelectParam>> fRSParams;
108 
109  CbmRichRingFitterCOP* fFitCOP; // Pointer to COP fitter
110  CbmRichRingSelectImpl* fSelectImpl; // Pointer to ellipse fitter
111 
112  vector<TH1*> fHists; // Store pointer for all histograms
113 
117  void SetRecFlag();
118 
122  void DiffFakeTrueCircle();
123 
127  void TrainAndTestAnn();
128 
132  void Draw(Option_t* = "");
133 
138 
143 
144  ClassDef(CbmRichTrainAnnSelect, 1)
145 };
146 
147 #endif
CbmRichTrainAnnSelect::fhAngle
vector< TH1D * > fhAngle
Definition: CbmRichTrainAnnSelect.h:94
CbmRichTrainAnnSelect::fhCumProb
vector< TH1D * > fhCumProb
Definition: CbmRichTrainAnnSelect.h:103
RingSelectParam::fAngle
Double_t fAngle
Definition: CbmRichTrainAnnSelect.h:37
RingSelectParam::fChi2
Double_t fChi2
Definition: CbmRichTrainAnnSelect.h:40
CbmRichTrainAnnSelect
Train ANN for fake rejection.
Definition: CbmRichTrainAnnSelect.h:52
CbmRichTrainAnnSelect::fhChi2
vector< TH1D * > fhChi2
Definition: CbmRichTrainAnnSelect.h:96
RingSelectParam::fNofHits
Double_t fNofHits
Definition: CbmRichTrainAnnSelect.h:36
CbmRichTrainAnnSelect::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmRichTrainAnnSelect.cxx:138
CbmRichTrainAnnSelect::Exec
virtual void Exec(Option_t *option)
Inherited from FairTask.
Definition: CbmRichTrainAnnSelect.cxx:167
CbmRichRing
Definition: CbmRichRing.h:17
CbmRichTrainAnnSelect::fhAnnOutput
vector< TH1D * > fhAnnOutput
Definition: CbmRichTrainAnnSelect.h:102
CbmRichTrainAnnSelect::fMcTracks
TClonesArray * fMcTracks
Definition: CbmRichTrainAnnSelect.h:81
RingSelectParam::fRadPos
Double_t fRadPos
Definition: CbmRichTrainAnnSelect.h:39
CbmRichRingFitterCOP
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
Definition: CbmRichRingFitterCOP.h:28
CbmRichTrainAnnSelect::fMaxNofTrainSamples
UInt_t fMaxNofTrainSamples
Definition: CbmRichTrainAnnSelect.h:86
CbmRichTrainAnnSelect::DiffFakeTrueCircle
void DiffFakeTrueCircle()
Fill ring selection parameters in array and histograms.
Definition: CbmRichTrainAnnSelect.cxx:214
CbmRichTrainAnnSelect::fhNofHits
vector< TH1D * > fhNofHits
Definition: CbmRichTrainAnnSelect.h:93
CbmRichTrainAnnSelect::CbmRichTrainAnnSelect
CbmRichTrainAnnSelect()
Default constructor.
Definition: CbmRichTrainAnnSelect.cxx:37
RingSelectParam
Input Parameters for ANN.
Definition: CbmRichTrainAnnSelect.h:34
CbmRichTrainAnnSelect::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmRichTrainAnnSelect.h:82
CbmRichTrainAnnSelect::operator=
CbmRichTrainAnnSelect & operator=(const CbmRichTrainAnnSelect &)
Assignment operator.
CbmRichTrainAnnSelect::~CbmRichTrainAnnSelect
virtual ~CbmRichTrainAnnSelect()
Destructor.
Definition: CbmRichTrainAnnSelect.cxx:136
CbmRichRingSelectImpl
Definition: CbmRichRingSelectImpl.h:28
CbmRichTrainAnnSelect::fSelectImpl
CbmRichRingSelectImpl * fSelectImpl
Definition: CbmRichTrainAnnSelect.h:110
CbmRichTrainAnnSelect::fHists
vector< TH1 * > fHists
Definition: CbmRichTrainAnnSelect.h:112
CbmRichTrainAnnSelect::SetRecFlag
void SetRecFlag()
Set recFlag weather ring was found correctly or not.
Definition: CbmRichTrainAnnSelect.cxx:178
CbmRichRingSelectImpl.h
CbmRichTrainAnnSelect::fRichRings
TClonesArray * fRichRings
Definition: CbmRichTrainAnnSelect.h:80
RingSelectParam::fHitsOnRing
Double_t fHitsOnRing
Definition: CbmRichTrainAnnSelect.h:38
CbmRichRingFitterCOP.h
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
CbmRichTrainAnnSelect::CbmRichTrainAnnSelect
CbmRichTrainAnnSelect(const CbmRichTrainAnnSelect &)
Copy constructor.
CbmRichTrainAnnSelect::fhRadPos
vector< TH1D * > fhRadPos
Definition: CbmRichTrainAnnSelect.h:97
CbmRichTrainAnnSelect::FinishTask
virtual void FinishTask()
Inherited from FairTask.
Definition: CbmRichTrainAnnSelect.cxx:451
CbmRichTrainAnnSelect::Draw
void Draw(Option_t *="")
Draw results.
Definition: CbmRichTrainAnnSelect.cxx:338
CbmRichTrainAnnSelect::fhRadius
vector< TH1D * > fhRadius
Definition: CbmRichTrainAnnSelect.h:98
CbmRichTrainAnnSelect::fhNofHitsOnRing
vector< TH1D * > fhNofHitsOnRing
Definition: CbmRichTrainAnnSelect.h:95
CbmRichTrainAnnSelect::fFitCOP
CbmRichRingFitterCOP * fFitCOP
Definition: CbmRichTrainAnnSelect.h:109
CbmRichTrainAnnSelect::fQuota
Double_t fQuota
Definition: CbmRichTrainAnnSelect.h:85
CbmRichTrainAnnSelect::fRSParams
vector< vector< RingSelectParam > > fRSParams
Definition: CbmRichTrainAnnSelect.h:107
CbmRichTrainAnnSelect::fAnnCut
Double_t fAnnCut
Definition: CbmRichTrainAnnSelect.h:89
CbmRichTrainAnnSelect::fNofFakeLikeTrue
Int_t fNofFakeLikeTrue
Definition: CbmRichTrainAnnSelect.h:87
RingSelectParam::fRadius
Double_t fRadius
Definition: CbmRichTrainAnnSelect.h:41
CbmRichTrainAnnSelect::TrainAndTestAnn
void TrainAndTestAnn()
Train and test ANN.
Definition: CbmRichTrainAnnSelect.cxx:267
CbmRichTrainAnnSelect::fEventNumber
Int_t fEventNumber
Definition: CbmRichTrainAnnSelect.h:84
CbmRichTrainAnnSelect::fNofTrueLikeFake
Int_t fNofTrueLikeFake
Definition: CbmRichTrainAnnSelect.h:88