CbmRoot
Loading...
Searching...
No Matches
CbmRichMCbmQaRichOnly.h
Go to the documentation of this file.
1/* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef MCBM_RICH_QA_RICH_ONLY
6#define MCBM_RICH_QA_RICH_ONLY
7
8#include "CbmEvent.h"
10#include "FairTask.h"
11class TClonesArray;
12class CbmRichRing;
13class CbmRichHit;
14class CbmTofTracklet;
15class CbmHistManager;
16class TVector3;
17class CbmDigiManager;
19
20#include <array>
21#include <map>
22#include <tuple>
23#include <vector>
24
25using namespace std;
26
27
28class CbmRichMCbmQaRichOnly : public FairTask {
29
30 public:
35
40
44 virtual InitStatus Init();
45
49 virtual void Exec(Option_t* option);
50
54 virtual void Finish();
55
60 void SetOutputDir(const string& dir) { fOutputDir = dir; }
61
62
66 void DrawFromFile(const string& fileName, const string& outputDir);
67
72
73
77 void DoRestrictToFullAcc(bool val = true) { fRestrictToFullAcc = val; }
78
79
83 void DoDrawCanvas(bool val = true) { fDoDrawCanvas = val; }
84
88 void DoWriteHistToFile(bool val = true) { fDoWriteHistToFile = val; }
89
93 void XOffsetHistos(Double_t val = 0.) { fXOffsetHisto = val; }
94
98 void SetMaxNofDrawnEvents(Int_t val = 100) { fMaxNofDrawnEvents = val; }
99
103 void SetTriggerRichHits(Int_t val = 0) { fTriggerRichHits = val; }
104
108 void SetIcdGeneration(bool val = true) { fGenerateICD = val; }
109
113 void SetTotRich(Double_t min, Double_t max)
114 {
115 fTotMin = min;
116 fTotMax = max;
117 }
118
119
120 private:
122
123 TClonesArray* fRichHits;
124
125 TClonesArray* fRichRings;
126
127 TClonesArray* fCbmEvent;
128
130
132
133 Double_t fTotMin = 0.0;
134
135 Double_t fTotMax = 100.0;
136
138
140
142
144
146
148
149
150 string fOutputDir; // output dir for results
151
152 bool fRestrictToAcc = false;
153 bool fRestrictToFullAcc = false;
154
156 bool fDoDrawCanvas = true;
157
158 bool fGenerateICD = false;
159
160 std::array<Double_t, 2304> ICD_offset_read;
161 std::array<Double_t, 2304> ICD_offset;
162 std::array<uint32_t, 2304> ICD_offset_cnt;
163
165
166
170 void InitHistograms();
171
175 void DrawHist();
176
177 void RichRings();
178
179 void DrawEvent(CbmEvent* ev, std::vector<int>& ringIndx, bool full);
180
181 void DrawRing(CbmRichRing* ring) { DrawRing(ring, false); };
182
183 void DrawRing(CbmRichRing* ring, bool full);
184
185
186 bool doToT(CbmRichHit* hit);
187
188
189 void analyseRing(CbmRichRing* ring, CbmEvent* ev);
190
191 Bool_t cutRadius(CbmRichRing* ring);
192
193 void save_ICD(std::array<Double_t, 2304>& offsets, unsigned int iteration);
194
195 void read_ICD(std::array<Double_t, 2304>& offsets, unsigned int iteration);
196
201
206
207
208 ClassDef(CbmRichMCbmQaRichOnly, 1)
209};
210
211#endif
Ring finder implementation based on Hough Transform method.
friend fscal max(fscal x, fscal y)
friend fscal min(fscal x, fscal y)
CbmDigiManager.
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
Histogram manager.
virtual void Exec(Option_t *option)
Inherited from FairTask.
CbmRichMCbmQaRichOnly()
Standard constructor.
void SetIcdGeneration(bool val=true)
CbmRichMCbmSEDisplay * fSeDisplay
void DoRestrictToFullAcc(bool val=true)
bool doToT(CbmRichHit *hit)
std::array< Double_t, 2304 > ICD_offset
void SetMaxNofDrawnEvents(Int_t val=100)
void InitHistograms()
Initialize histograms.
void DrawRing(CbmRichRing *ring)
std::array< Double_t, 2304 > ICD_offset_read
void XOffsetHistos(Double_t val=0.)
void DrawFromFile(const string &fileName, const string &outputDir)
Draw histogram from file.
void read_ICD(std::array< Double_t, 2304 > &offsets, unsigned int iteration)
virtual void Finish()
Inherited from FairTask.
virtual InitStatus Init()
Inherited from FairTask.
void DoWriteHistToFile(bool val=true)
void save_ICD(std::array< Double_t, 2304 > &offsets, unsigned int iteration)
void analyseRing(CbmRichRing *ring, CbmEvent *ev)
void SetTriggerRichHits(Int_t val=0)
void SetOutputDir(const string &dir)
Set output directory where you want to write results (figures and json).
CbmRichMCbmQaRichOnly & operator=(const CbmRichMCbmQaRichOnly &)
Assignment operator.
void DrawEvent(CbmEvent *ev, std::vector< int > &ringIndx, bool full)
virtual ~CbmRichMCbmQaRichOnly()
Standard destructor.
void SetTotRich(Double_t min, Double_t max)
std::array< uint32_t, 2304 > ICD_offset_cnt
void DoDrawCanvas(bool val=true)
Bool_t cutRadius(CbmRichRing *ring)
CbmRichMCbmQaRichOnly(const CbmRichMCbmQaRichOnly &)
Copy constructor.
void DrawHist()
Draw histograms.
Provides information on attaching a TofHit to a TofTrack.
Hash for CbmL1LinkKey.