EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmRichUrqmdTest.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmRichUrqmdTest.h
1 
10 #ifndef CBM_RICH_URQMD_TEST
11 #define CBM_RICH_URQMD_TEST
12 
13 #include "FairTask.h"
14 class TH1;
15 class TH2;
16 class TH1D;
17 class TH2D;
18 class TClonesArray;
19 class CbmRichRing;
20 class TCanvas;
21 
22 #include <vector>
23 #include <map>
24 
25 using namespace std;
26 
35 class CbmRichUrqmdTest : public FairTask
36 {
37 
38 public:
43 
47  virtual ~CbmRichUrqmdTest();
48 
52  virtual InitStatus Init();
53 
57  virtual void Exec(
58  Option_t* option);
59 
63  virtual void Finish();
64 
65 
70  void SetOutputDir(const string& dir) {fOutputDir = dir;}
71 
72 
73 private:
74 
78  void InitHistograms();
79 
83  void FillRichRingNofHits();
84 
88  void NofRings();
89 
93  void NofHits();
94 
98  void NofProjections();
99 
103  void Vertex();
104 
105 
109  void DrawHist();
110 
111  TCanvas* CreateCanvas(
112  const string& name,
113  const string& title,
114  int width,
115  int height);
116 
117  void SaveCanvasToImage();
118 
123 
127  CbmRichUrqmdTest& operator=(const CbmRichUrqmdTest&);
128 
129 
130  string fOutputDir; // output dir for results
131 
132  TClonesArray* fRichHits;
133  TClonesArray* fRichRings;
134  TClonesArray* fRichPoints;
135  TClonesArray* fMcTracks;
136  TClonesArray* fRichRingMatches;
137  TClonesArray* fRichProjections;
138 
139 
140  vector<TCanvas*> fCanvas;
141 
142  Int_t fEventNum;
143  Int_t fMinNofHits; // Min number of hits in ring for detector acceptance calculation.
144 
145  // Number of hits in the MC RICH ring
146  std::map<Int_t, Int_t> fNofHitsInRingMap;
147 
155 
157  TH1* fh_gamma_target_mom; // secondary electrons from gamma conversion from target region vertex < 0.5
158  TH1* fh_gamma_nontarget_mom;// secondary electrons from gamma conversion NOT from target region vertex > 0.5
159  TH1* fh_pi_mom;
161  TH1* fh_mu_mom;
162 
166 
169 
173 
174  vector<TH1*> fHists; // store all TH1 pointers of the histogram
175 
176  ClassDef(CbmRichUrqmdTest,1)
177 };
178 
179 #endif
180