CbmRoot
CbmRichMCbmQaRichOnly.h
Go to the documentation of this file.
1 #ifndef MCBM_RICH_QA_RICH_ONLY
2 #define MCBM_RICH_QA_RICH_ONLY
3 
4 #include "CbmEvent.h"
6 #include "FairTask.h"
7 class TClonesArray;
8 class CbmRichRing;
9 class CbmRichHit;
10 class CbmTofTracklet;
11 class CbmHistManager;
12 class TVector3;
13 class CbmDigiManager;
15 
16 #include <array>
17 #include <map>
18 #include <tuple>
19 #include <vector>
20 
21 using namespace std;
22 
23 
24 class CbmRichMCbmQaRichOnly : public FairTask {
25 
26 public:
31 
35  virtual ~CbmRichMCbmQaRichOnly() {};
36 
40  virtual InitStatus Init();
41 
45  virtual void Exec(Option_t* option);
46 
50  virtual void Finish();
51 
56  void SetOutputDir(const string& dir) { fOutputDir = dir; }
57 
58 
62  void DrawFromFile(const string& fileName, const string& outputDir);
63 
67  void DoRestrictToAcc() { fRestrictToAcc = true; }
68 
69 
73  void DoRestrictToFullAcc(bool val = true) { fRestrictToFullAcc = val; }
74 
75 
79  void DoDrawCanvas(bool val = true) { fDoDrawCanvas = val; }
80 
84  void DoWriteHistToFile(bool val = true) { fDoWriteHistToFile = val; }
85 
89  void XOffsetHistos(Double_t val = 0.) { fXOffsetHisto = val; }
90 
94  void SetMaxNofDrawnEvents(Int_t val = 100) { fMaxNofDrawnEvents = val; }
95 
99  void SetTriggerRichHits(Int_t val = 0) { fTriggerRichHits = val; }
100 
101 private:
103 
104  TClonesArray* fRichHits;
105 
106  TClonesArray* fRichRings;
107 
108  TClonesArray* fCbmEvent;
109 
111 
112  Double_t fXOffsetHisto;
113 
114  Int_t fEventNum;
115 
117 
119 
121 
123 
125 
126 
127  string fOutputDir; // output dir for results
128 
129  bool fRestrictToAcc = false;
130  bool fRestrictToFullAcc = false;
131 
132  bool fDoWriteHistToFile = true;
133  bool fDoDrawCanvas = true;
134 
135  std::array<Double_t, 2304> ICD_offset_read;
136  std::array<Double_t, 2304> ICD_offset;
137  std::array<uint32_t, 2304> ICD_offset_cnt;
138 
139  CbmRichMCbmSEDisplay* fSeDisplay = nullptr;
140 
141 
145  void InitHistograms();
146 
150  void DrawHist();
151 
152  void RichRings();
153 
154  void DrawEvent(CbmEvent* ev, std::vector<int>& ringIndx, bool full);
155 
156  void DrawRing(CbmRichRing* ring) { DrawRing(ring, false); };
157 
158  void DrawRing(CbmRichRing* ring, bool full);
159 
160 
161  bool doToT(CbmRichHit* hit);
162 
163 
164  void analyseRing(CbmRichRing* ring, CbmEvent* ev);
165 
166  Bool_t cutRadius(CbmRichRing* ring);
167 
168  void save_ICD(std::array<Double_t, 2304>& offsets, unsigned int iteration);
169 
170  void read_ICD(std::array<Double_t, 2304>& offsets, unsigned int iteration);
171 
176 
181 
182 
183  ClassDef(CbmRichMCbmQaRichOnly, 1)
184 };
185 
186 #endif
CbmRichMCbmQaRichOnly
Definition: CbmRichMCbmQaRichOnly.h:24
CbmRichRingFinderHoughImpl.h
Ring finder implementation based on Hough Transform method.
CbmRichMCbmQaRichOnly::ICD_offset_cnt
std::array< uint32_t, 2304 > ICD_offset_cnt
Definition: CbmRichMCbmQaRichOnly.h:137
CbmRichMCbmQaRichOnly::SetOutputDir
void SetOutputDir(const string &dir)
Set output directory where you want to write results (figures and json).
Definition: CbmRichMCbmQaRichOnly.h:56
CbmRichMCbmSEDisplay
Definition: CbmRichMCbmSEDisplay.h:17
CbmRichMCbmQaRichOnly::DoWriteHistToFile
void DoWriteHistToFile(bool val=true)
Definition: CbmRichMCbmQaRichOnly.h:84
CbmRichMCbmQaRichOnly::fMaxNofDrawnEvents
Int_t fMaxNofDrawnEvents
Definition: CbmRichMCbmQaRichOnly.h:122
CbmTofTracklet
Provides information on attaching a TofHit to a TofTrack.
Definition: CbmTofTracklet.h:25
CbmRichMCbmQaRichOnly::fEventNum
Int_t fEventNum
Definition: CbmRichMCbmQaRichOnly.h:114
CbmRichRing
Definition: CbmRichRing.h:17
CbmRichMCbmQaRichOnly::DoRestrictToAcc
void DoRestrictToAcc()
Definition: CbmRichMCbmQaRichOnly.h:67
CbmRichMCbmQaRichOnly::XOffsetHistos
void XOffsetHistos(Double_t val=0.)
Definition: CbmRichMCbmQaRichOnly.h:89
CbmRichMCbmQaRichOnly::fNofDrawnRichTofEv
Int_t fNofDrawnRichTofEv
Definition: CbmRichMCbmQaRichOnly.h:118
CbmRichMCbmQaRichOnly::DoDrawCanvas
void DoDrawCanvas(bool val=true)
Definition: CbmRichMCbmQaRichOnly.h:79
CbmRichMCbmQaRichOnly::operator=
CbmRichMCbmQaRichOnly & operator=(const CbmRichMCbmQaRichOnly &)
Assignment operator.
CbmRichMCbmQaRichOnly::fNofDrawnRings
Int_t fNofDrawnRings
Definition: CbmRichMCbmQaRichOnly.h:116
CbmRichMCbmQaRichOnly::CbmRichMCbmQaRichOnly
CbmRichMCbmQaRichOnly(const CbmRichMCbmQaRichOnly &)
Copy constructor.
CbmEvent.h
CbmRichMCbmQaRichOnly::fOutputDir
string fOutputDir
Definition: CbmRichMCbmQaRichOnly.h:127
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmRichMCbmQaRichOnly::DrawRing
void DrawRing(CbmRichRing *ring)
Definition: CbmRichMCbmQaRichOnly.h:156
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmRichMCbmQaRichOnly::fNofDrawnEvents
Int_t fNofDrawnEvents
Definition: CbmRichMCbmQaRichOnly.h:120
CbmRichMCbmQaRichOnly::fTriggerRichHits
Int_t fTriggerRichHits
Definition: CbmRichMCbmQaRichOnly.h:124
fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmTofAnaTestbeam.cxx:88
CbmRichMCbmQaRichOnly::DoRestrictToFullAcc
void DoRestrictToFullAcc(bool val=true)
Definition: CbmRichMCbmQaRichOnly.h:73
CbmRichMCbmQaRichOnly::fRichHits
TClonesArray * fRichHits
Definition: CbmRichMCbmQaRichOnly.h:104
CbmRichMCbmQaRichOnly::fRichRings
TClonesArray * fRichRings
Definition: CbmRichMCbmQaRichOnly.h:106
CbmRichMCbmQaRichOnly::SetTriggerRichHits
void SetTriggerRichHits(Int_t val=0)
Definition: CbmRichMCbmQaRichOnly.h:99
CbmRichMCbmQaRichOnly::ICD_offset
std::array< Double_t, 2304 > ICD_offset
Definition: CbmRichMCbmQaRichOnly.h:136
CbmRichMCbmQaRichOnly::fCbmEvent
TClonesArray * fCbmEvent
Definition: CbmRichMCbmQaRichOnly.h:108
CbmRichMCbmQaRichOnly::fXOffsetHisto
Double_t fXOffsetHisto
Definition: CbmRichMCbmQaRichOnly.h:112
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmRichMCbmQaRichOnly::~CbmRichMCbmQaRichOnly
virtual ~CbmRichMCbmQaRichOnly()
Standard destructor.
Definition: CbmRichMCbmQaRichOnly.h:35
CbmRichMCbmQaRichOnly::ICD_offset_read
std::array< Double_t, 2304 > ICD_offset_read
Definition: CbmRichMCbmQaRichOnly.h:135
CbmRichMCbmQaRichOnly::SetMaxNofDrawnEvents
void SetMaxNofDrawnEvents(Int_t val=100)
Definition: CbmRichMCbmQaRichOnly.h:94
CbmRichMCbmQaRichOnly::fHM
CbmHistManager * fHM
Definition: CbmRichMCbmQaRichOnly.h:110
CbmRichHit
Definition: CbmRichHit.h:19
CbmRichMCbmQaRichOnly::DrawEvent
void DrawEvent(CbmEvent *ev, std::vector< int > &ringIndx, bool full)