CbmRoot
CbmRichGeoTest.h
Go to the documentation of this file.
1 
10 #ifndef CBMRICHGEOTEST
11 #define CBMRICHGEOTEST
12 
13 #include "FairTask.h"
14 
15 class TH1;
16 class TH2;
17 class TH3;
18 class TH1D;
19 class TH2D;
20 class TH3D;
21 class TClonesArray;
24 class CbmRichRing;
25 class CbmRichRingLight;
26 class TCanvas;
27 class CbmHistManager;
28 class TVector3;
29 class CbmMCDataArray;
30 class CbmMCEventList;
31 class CbmDigiManager;
32 
33 #include <string>
34 #include <vector>
35 
36 using namespace std;
37 
46 class CbmRichGeoTest : public FairTask {
47 
48 public:
53 
57  virtual ~CbmRichGeoTest();
58 
62  virtual InitStatus Init();
63 
67  virtual void Exec(Option_t* option);
68 
72  virtual void Finish();
73 
78  void SetOutputDir(const string& dir) { fOutputDir = dir; }
79 
83  void DrawFromFile(const string& fileName, const string& outputDir);
84 
85  void SetDrawPmts(Bool_t draw) { fDrawPmts = draw; }
86  void SetDrawEventDisplay(Bool_t draw) { fDrawEventDisplay = draw; }
87 
88 private:
92  void InitHistograms();
93 
94 
98  void ProcessMc();
99 
103  void RingParameters();
104 
111  void FitAndFillHistEllipse(Int_t histIndex,
112  CbmRichRingLight* ring,
113  Double_t momentum);
114 
121  void FitAndFillHistCircle(Int_t histIndex,
122  CbmRichRingLight* ring,
123  Double_t momentum);
124 
132  void FillMcVsHitFitEllipse(CbmRichRingLight* ring, CbmRichRingLight* ringMc);
133 
141  void FillMcVsHitFitCircle(CbmRichRingLight* ring, CbmRichRingLight* ringMc);
142 
146  void ProcessHits();
147 
152  TH1D* CreateAccVsMinNofHitsHist();
153 
157  void DrawHist();
158 
164  void DrawRing(CbmRichRingLight* ringHit, CbmRichRingLight* ringPoint);
165 
166 
167  void DrawH2MeanRms(TH2* hist, const string& canvasName);
168 
172  void DrawPmts();
173 
174  void DrawPmtPoint(const string& coordinates,
175  const vector<Int_t>& ids,
176  Bool_t isDrawPixel);
177 
183  string CalcEfficiency(TH1* histRec, TH1* histAcc);
184 
189 
194 
195  string fOutputDir; // output directory for results
196 
197  TClonesArray* fRichHits;
198  TClonesArray* fRichRings;
203  TClonesArray* fRichRingMatches;
205 
206  // rings will be fitted on a fly
209 
210  CbmHistManager* fHM; // Histogram manager
211 
212  Int_t fEventNum;
213  Int_t
214  fMinNofHits; // Min number of hits in ring for detector acceptance calculation.
215 
216  // fitting efficiency
217  Double_t fMinAaxis;
218  Double_t fMaxAaxis;
219  Double_t fMinBaxis;
220  Double_t fMaxBaxis;
221  Double_t fMinRadius;
222  Double_t fMaxRadius;
223 
224  Int_t fNofDrawnRings; // store number of drawn rings
225  Bool_t fDrawPmts; // draw pixels and PMTs to test rotation procedure
227 
228  ClassDef(CbmRichGeoTest, 1)
229 };
230 
231 #endif
CbmRichGeoTest::fMaxAaxis
Double_t fMaxAaxis
Definition: CbmRichGeoTest.h:218
CbmRichGeoTest::fHM
CbmHistManager * fHM
Definition: CbmRichGeoTest.h:210
CbmRichRingFitterEllipseTau
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Definition: CbmRichRingFitterEllipseTau.h:35
CbmRichGeoTest::fMcTracks
CbmMCDataArray * fMcTracks
Definition: CbmRichGeoTest.h:202
CbmRichGeoTest::fDrawEventDisplay
Bool_t fDrawEventDisplay
Definition: CbmRichGeoTest.h:226
CbmRichGeoTest::fMaxBaxis
Double_t fMaxBaxis
Definition: CbmRichGeoTest.h:220
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmRichGeoTest
RICH geometry checking and testing.
Definition: CbmRichGeoTest.h:46
CbmRichRing
Definition: CbmRichRing.h:17
CbmRichGeoTest::fRichPoints
CbmMCDataArray * fRichPoints
Definition: CbmRichGeoTest.h:201
CbmRichGeoTest::fMinAaxis
Double_t fMinAaxis
Definition: CbmRichGeoTest.h:217
CbmRichRingFitterCOP
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
Definition: CbmRichRingFitterCOP.h:28
CbmRichGeoTest::fMaxRadius
Double_t fMaxRadius
Definition: CbmRichGeoTest.h:222
CbmRichGeoTest::fTauFit
CbmRichRingFitterEllipseTau * fTauFit
Definition: CbmRichGeoTest.h:208
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmRichGeoTest::fRichRings
TClonesArray * fRichRings
Definition: CbmRichGeoTest.h:198
CbmRichGeoTest::SetDrawEventDisplay
void SetDrawEventDisplay(Bool_t draw)
Definition: CbmRichGeoTest.h:86
CbmRichGeoTest::fRichHits
TClonesArray * fRichHits
Definition: CbmRichGeoTest.h:197
CbmRichGeoTest::fCopFit
CbmRichRingFitterCOP * fCopFit
Definition: CbmRichGeoTest.h:207
CbmRichGeoTest::fMinRadius
Double_t fMinRadius
Definition: CbmRichGeoTest.h:221
CbmRichGeoTest::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmRichGeoTest.h:203
CbmRichGeoTest::SetDrawPmts
void SetDrawPmts(Bool_t draw)
Definition: CbmRichGeoTest.h:85
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmMCEventList
Container class for MC events with number, file and start time.
Definition: CbmMCEventList.h:38
CbmRichGeoTest::CbmRichGeoTest
CbmRichGeoTest(const CbmRichGeoTest &)
Copy constructor.
CbmRichGeoTest::SetOutputDir
void SetOutputDir(const string &dir)
Set output directory where you want to write results (figures and json).
Definition: CbmRichGeoTest.h:78
CbmRichGeoTest::fEventList
CbmMCEventList * fEventList
Definition: CbmRichGeoTest.h:204
fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmTofAnaTestbeam.cxx:88
CbmRichGeoTest::fRichRefPlanePoints
CbmMCDataArray * fRichRefPlanePoints
Definition: CbmRichGeoTest.h:199
CbmRichGeoTest::fMinBaxis
Double_t fMinBaxis
Definition: CbmRichGeoTest.h:219
CbmRichGeoTest::operator=
CbmRichGeoTest & operator=(const CbmRichGeoTest &)
Assignment operator.
CbmRichGeoTest::fOutputDir
string fOutputDir
Definition: CbmRichGeoTest.h:195
CbmRichGeoTest::fMinNofHits
Int_t fMinNofHits
Definition: CbmRichGeoTest.h:214
CbmRichGeoTest::fNofDrawnRings
Int_t fNofDrawnRings
Definition: CbmRichGeoTest.h:224
CbmRichRingLight
Definition: CbmRichRingLight.h:39
CbmRichGeoTest::fEventNum
Int_t fEventNum
Definition: CbmRichGeoTest.h:212
CbmRichGeoTest::fDrawPmts
Bool_t fDrawPmts
Definition: CbmRichGeoTest.h:225