CbmRoot
Loading...
Searching...
No Matches
CbmRichMCbmAerogelAna.cxx
Go to the documentation of this file.
1/* Copyright (C) 2020-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
6
7#include "CbmDigiManager.h"
8#include "CbmDrawHist.h"
9#include "CbmEvent.h"
10#include "CbmGlobalTrack.h"
11#include "CbmHistManager.h"
12#include "CbmMatchRecoToMC.h"
13#include "CbmRichConverter.h"
14#include "CbmRichDigi.h"
15#include "CbmRichDraw.h"
16#include "CbmRichGeoManager.h"
17#include "CbmRichHit.h"
18#include "CbmRichPoint.h"
19#include "CbmRichRing.h"
21#include "CbmRichUtil.h"
22#include "CbmTofDigi.h"
23#include "CbmTofHit.h"
24#include "CbmTofTracklet.h"
25#include "CbmTrackMatchNew.h"
26#include "CbmTrdTrack.h"
27#include "CbmUtils.h"
28#include "TCanvas.h"
29#include "TClonesArray.h"
30#include "TEllipse.h"
31#include "TF1.h"
32#include "TGeoBBox.h"
33#include "TGeoManager.h"
34#include "TGeoNode.h"
35#include "TH1.h"
36#include "TH1D.h"
37#include "TLatex.h"
38#include "TLine.h"
39#include "TMarker.h"
40#include "TMath.h"
41#include "TStyle.h"
42
43#include <TFile.h>
44
45#include <boost/assign/list_of.hpp>
46
47#include <cmath>
48#include <iostream>
49#include <sstream>
50#include <string>
51
52using namespace std;
53using boost::assign::list_of;
54
55#define RichZPos 348.
56
58 : FairTask("CbmRichMCbmAerogelAna")
59 , fRichHits(nullptr)
60 , fRichRings(nullptr)
61 , fCbmEvent(nullptr)
62 , fHM(nullptr)
63 , fXOffsetHisto(12.)
64 , fEventNum(0)
65 , fNofDrawnRings(0)
66 , fNofDrawnRichTofEv(0)
67 , fNofDrawnEvents(0)
68 , fOutputDir("result")
69{
70}
71
73{
74 cout << "CbmRichMCbmAerogelAna::Init" << endl;
75
76 FairRootManager* ioman = FairRootManager::Instance();
77 if (nullptr == ioman) {
78 Fatal("CbmRichMCbmQaReal::Init", "RootManager not instantised!");
79 }
80
82 fDigiMan->Init();
83
84 if (!fDigiMan->IsPresent(ECbmModuleId::kRich)) Fatal("CbmRichMCbmQaReal::Init", "No Rich Digis!");
85
86 if (!fDigiMan->IsPresent(ECbmModuleId::kTof)) Fatal("CbmRichMCbmQaReal::Init", "No Tof Digis!");
87
88 fRichHits = (TClonesArray*) ioman->GetObject("RichHit");
89 if (nullptr == fRichHits) {
90 Fatal("CbmRichMCbmAerogelAna::Init", "No Rich Hits!");
91 }
92
93 fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
94 if (nullptr == fRichRings) {
95 Fatal("CbmRichMCbmAerogelAna::Init", "No Rich Rings!");
96 }
97
98
99 // fTofHits =(TClonesArray*) ioman->GetObject("TofHit");
100 // if (nullptr == fTofHits) { Fatal("CbmRichMCbmQaReal::Init", "No Tof Hits!");}
101
102 // fTofTracks =(TClonesArray*) ioman->GetObject("TofTracks");
103 // if (nullptr == fTofTracks) { Fatal("CbmRichMCbmQaReal::Init", "No Tof Tracks!");}
104
105 // fBmonDigis =(TClonesArray*) ioman->GetObject("CbmBmonDigi");
106 // if (nullptr == fBmonDigis) { Fatal("CbmRichMCbmQaReal::Init", "No Bmon Digis!");}
107
108 //fBmonDigis = ioman->InitObjectAs<std::vector<CbmTofDigi> const *>("BmonDigi");
109
110 fCbmEvent = dynamic_cast<TClonesArray*>(ioman->GetObject("CbmEvent"));
111 if (nullptr == fCbmEvent) {
112 Fatal("fTofDigis::Init", "No Event!");
113 }
114
116
117 return kSUCCESS;
118}
119
121{
122 fHM = new CbmHistManager();
123
124 fHM->Create1<TH1D>("fhNofEvents", "fhNofEvents;Entries", 1, 0.5, 1.5);
125 fHM->Create1<TH1D>("fhNofCbmEvents", "fhNofCbmEvents;Entries", 1, 0.5, 1.5);
126 fHM->Create1<TH1D>("fhNofCbmEventsRing", "fhNofCbmEventsRing;Entries", 1, 0.5, 1.5);
127
128 fHM->Create1<TH1D>("fhHitsInTimeslice", "fhHitsInTimeslice;Timeslice;#Hits", 200, 1, 200);
129
130 // nof objects per timeslice
131 fHM->Create1<TH1D>("fhNofRichDigisInTimeslice", "fhNofRichDigisInTimeslice;# RICH digis / timeslice;Entries", 100,
132 -0.5, 999.5);
133 fHM->Create1<TH1D>("fhNofRichHitsInTimeslice", "fhNofRichHitsInTimeslice;# RICH hits / timeslice;Entries", 100, -0.5,
134 999.5);
135 fHM->Create1<TH1D>("fhNofRichRingsInTimeslice", "fhNofRichRingsInTimeslice;# RICH rings / timeslice;Entries", 10,
136 -0.5, 9.5);
137
138 // RICH hits
139 fHM->Create2<TH2D>("fhRichHitXY", "fhRichHitXY;RICH hit X [cm];RICH hit Y [cm];Entries", 67, -20.1 + fXOffsetHisto,
140 20.1 + fXOffsetHisto, 84, -25.2, 25.2);
141 fHM->Create2<TH2D>("fhEventRichHitXY", "fhEventRichHitXY;RICH hit X [cm];RICH hit Y [cm];Entries", 67,
142 -20.1 + fXOffsetHisto, 20.1 + fXOffsetHisto, 84, -25.2, 25.2);
143 fHM->Create1<TH1D>("fhEventRichHitX", "fhEventRichHitX;RICH hit X [cm];Entries", 67, -20.1 + fXOffsetHisto,
144 20.1 + fXOffsetHisto);
145 fHM->Create1<TH1D>("fhEventRichHitY", "fhEventRichHitY;RICH hit Y [cm];Entries", 84, -25.2, 25.2);
146 fHM->Create1<TH1D>("fhRichHitX", "fhRichHitX;RICH hit X [cm];Entries", 67, -20.1 + fXOffsetHisto,
147 20.1 + fXOffsetHisto);
148 fHM->Create1<TH1D>("fhRichHitY", "fhRichHitY;RICH hit Y [cm];Entries", 84, -25.2, 25.2);
149
150 //ToT
151 fHM->Create1<TH1D>("fhRichDigisToT", "fhRichDigisToT;ToT [ns];Entries", 601, 9.975, 40.025);
152 fHM->Create1<TH1D>("fhRichHitToT", "fhRichHitToT;ToT [ns];Entries", 601, 9.975, 40.025);
153
154 // RICH rings
155 fHM->Create2<TH2D>("fhRichRingXY", "fhRichRingXY;Ring center X [cm];Ring center Y [cm];Entries", 100,
156 -20 + fXOffsetHisto, 20 + fXOffsetHisto, 100, -20, 20);
157 fHM->Create1<TH1D>("fhRichRingRadius", "fhRichRingRadius;Ring radius [cm];Entries", 100, 0., 7.);
158 fHM->Create1<TH1D>("fhNofHitsInRing", "fhNofHitsInRing;# hits in ring;Entries", 50, -0.5, 49.5);
159
160 // RICH rings aerogel/ Event
161 fHM->Create2<TH2D>("fhEventRichRingXY", "fhEventRichRingXY;Ring center X [cm];Ring center Y [cm];Entries", 100,
162 -20 + fXOffsetHisto, 20 + fXOffsetHisto, 100, -20, 20);
163 fHM->Create1<TH1D>("fhEventRichRingRadius", "fhEventRichRingRadius;Ring radius [cm];Entries", 100, 0., 7.);
164 fHM->Create1<TH1D>("fhEventNofHitsInRing", "fhEventNofHitsInRing;# hits in ring;Entries", 50, -0.5, 49.5);
165 fHM->Create1<TH1D>("fhEventNofHitsInRingTop", "fhEventNofHitsInRingTop;# hits in ring;Entries", 50, -0.5, 49.5);
166 fHM->Create1<TH1D>("fhEventNofHitsInRingBottom", "fhEventNofHitsInRingBottom;# hits in ring;Entries", 50, -0.5, 49.5);
167
168 fHM->Create1<TH1D>("fhEventRichHitToT", "fhRichHitToT;ToT [ns];Entries", 601, 9.975, 40.025);
169
170 fHM->Create1<TH1D>("fhEventRichRingRadiusTop", "fhEventRichRingRadiusTop;Ring radius [cm];Entries", 100, 0., 7.);
171 fHM->Create1<TH1D>("fhEventRichRingRadiusBottom", "fhEventRichRingRadiusBottom;Ring radius [cm];Entries", 100, 0.,
172 7.);
173
174 fHM->Create1<TH1D>("fhNofRingsTopBottom", "fhNofRingsTopBottom;Entries", 2, -0.5, 1.5);
175}
176
177
178void CbmRichMCbmAerogelAna::Exec(Option_t* /*option*/)
179{
180 fEventNum++;
181 fHM->H1("fhNofEvents")->Fill(1);
182 cout << "CbmRichMCbmAerogelAna, event No. " << fEventNum << endl;
183
184 {
185 for (int i = 0; i < fDigiMan->GetNofDigis(ECbmModuleId::kRich); i++) {
186 const CbmRichDigi* richDigi = fDigiMan->Get<CbmRichDigi>(i);
187 fHM->H1("fhRichDigisToT")->Fill(richDigi->GetToT());
188 }
189 }
190
191 int nofRichHits = fRichHits->GetEntriesFast();
192 fHM->H1("fhNofRichHitsInTimeslice")->Fill(nofRichHits);
193 fHM->H1("fhHitsInTimeslice")->Fill(fEventNum, nofRichHits);
194 for (int iH = 0; iH < nofRichHits; iH++) {
195 CbmRichHit* richHit = static_cast<CbmRichHit*>(fRichHits->At(iH));
196 fHM->H2("fhRichHitXY")->Fill(richHit->GetX(), richHit->GetY());
197 fHM->H1("fhRichHitToT")->Fill(richHit->GetToT());
198 fHM->H1("fhRichHitX")->Fill(richHit->GetX());
199 fHM->H1("fhRichHitY")->Fill(richHit->GetY());
200 //printf("HitToT: %f \n", richHit->GetToT());
201 }
202
203
204 //CBMEVENT
205 auto fNCbmEvent = fCbmEvent->GetEntriesFast();
206
207 for (int i = 0; i < fNCbmEvent; i++) {
208 fHM->H1("fhNofCbmEvents")->Fill(1);
209 CbmEvent* ev = static_cast<CbmEvent*>(fCbmEvent->At(i));
210 std::vector<int> ringIndx; // Rings in CbmEvent
211 std::vector<int> evRichHitIndx;
212
213
214 for (size_t j = 0; j < ev->GetNofData(ECbmDataType::kRichHit); j++) {
215 auto iRichHit = ev->GetIndex(ECbmDataType::kRichHit, j);
216 evRichHitIndx.push_back(iRichHit);
217
218 int nofRichRings = fRichRings->GetEntriesFast();
219 for (int l = 0; l < nofRichRings; l++) {
220 CbmRichRing* ring = static_cast<CbmRichRing*>(fRichRings->At(l));
221 auto NofRingHits = ring->GetNofHits();
222 for (int m = 0; m < NofRingHits; m++) {
223 auto RingHitIndx = ring->GetHit(m);
224 if (RingHitIndx == iRichHit) {
225 Bool_t used = false;
226 for (auto check : ringIndx) {
227 if (check == l) {
228 used = true;
229 break;
230 }
231 }
232 if (used == false) ringIndx.push_back(l);
233 break;
234 }
235 }
236 }
237 }
238
239
240 //DrawEvent(ev, ringIndx, 1);
241
242
243 if (ringIndx.size() > 0) { // Ring in CbmEvent
244 //loop over all Hits in a CbmEvent with Ring:
245 for (size_t j = 0; j < ev->GetNofData(ECbmDataType::kRichHit); j++) {
246 auto iRichHit = ev->GetIndex(ECbmDataType::kRichHit, j);
247 CbmRichHit* richHit = static_cast<CbmRichHit*>(fRichHits->At(iRichHit));
248 fHM->H1("fhEventRichHitToT")->Fill(richHit->GetToT());
249 fHM->H2("fhEventRichHitXY")->Fill(richHit->GetX(), richHit->GetY());
250 fHM->H1("fhEventRichHitX")->Fill(richHit->GetX());
251 fHM->H1("fhEventRichHitY")->Fill(richHit->GetY());
252 }
253
254
255 //loop over rings in CbmEvent
256 for (unsigned int rings = 0; rings < ringIndx.size(); rings++) {
257 CbmRichRing* ring = static_cast<CbmRichRing*>(fRichRings->At(ringIndx[rings]));
258 if (ring == nullptr) continue;
259
260 fHM->H2("fhEventRichRingXY")->Fill(ring->GetCenterX(), ring->GetCenterY());
261 fHM->H1("fhEventRichRingRadius")->Fill(ring->GetRadius());
262 fHM->H1("fhEventNofHitsInRing")->Fill(ring->GetNofHits());
263
264 // for now ignore overlap of hits in crossover region!
265 if (ring->GetCenterY() >= 0.) { // new Aerogel Block
266 fHM->H1("fhEventNofHitsInRingTop")->Fill(ring->GetNofHits());
267 fHM->H1("fhEventRichRingRadiusTop")->Fill(ring->GetRadius());
268 fHM->H1("fhNofRingsTopBottom")->Fill(0);
269 }
270 else { // Aerogel from Mar2019
271 fHM->H1("fhEventNofHitsInRingBottom")->Fill(ring->GetNofHits());
272 fHM->H1("fhEventRichRingRadiusBottom")->Fill(ring->GetRadius());
273 fHM->H1("fhNofRingsTopBottom")->Fill(1);
274 }
275 }
276
277 //DrawRichTofEv(RichTofEv);
278 fHM->H1("fhNofCbmEventsRing")->Fill(1);
279 }
280 } //End CbmEvent loop
281
282
283 RichRings();
284}
285
287{
288 int nofRichRings = fRichRings->GetEntriesFast();
289 //fHM->H1("fhNofRichRingsInTimeslice")->Fill(nofRichRings);
290 for (int i = 0; i < nofRichRings; i++) {
291 CbmRichRing* ring = static_cast<CbmRichRing*>(fRichRings->At(i));
292 if (ring == nullptr) continue;
293 //DrawRing(ring);
294 fHM->H2("fhRichRingXY")->Fill(ring->GetCenterX(), ring->GetCenterY());
295 fHM->H1("fhRichRingRadius")->Fill(ring->GetRadius());
296 fHM->H1("fhNofHitsInRing")->Fill(ring->GetNofHits());
297 }
298}
299
300
302{
303 cout.precision(4);
304
305 //SetDefaultDrawStyle();
306 double nofEvents = fHM->H1("fhNofCbmEvents")->GetEntries();
307 fHM->ScaleByPattern("fh_.*", 1. / nofEvents);
308
309 {
310 fHM->CreateCanvas("rich_mcbm_fhNofCbmEvents", "rich_mcbm_fhNofCbmEvents", 600, 600);
311 DrawH1(fHM->H1("fhNofCbmEvents"));
312 }
313
314 {
315 fHM->CreateCanvas("rich_mcbm_fhNofCbmEventsRing", "rich_mcbm_fhNofCbmEventsRing", 600, 600);
316 DrawH1(fHM->H1("fhNofCbmEventsRing"));
317 }
318
319 {
320 fHM->CreateCanvas("rich_mcbm_fhNofEvents", "rich_mcbm_fhNofEvents", 600, 600);
321 DrawH1(fHM->H1("fhNofEvents"));
322 }
323
324
325 {
326 TCanvas* c = fHM->CreateCanvas("rich_mcbm_XY", "rich_mcbm_XY", 1200, 600);
327 c->Divide(2, 1);
328 c->cd(1);
329 DrawH2(fHM->H2("fhRichHitXY"));
330 c->cd(2);
331 DrawH2(fHM->H2("fhRichRingXY"));
332 }
333
334
335 {
336 TCanvas* c = fHM->CreateCanvas("rich_mcbm_XY_inEvent", "rich_mcbm_XY_inEvent", 1200, 600);
337 c->Divide(2, 1);
338 c->cd(1);
339 DrawH2(fHM->H2("fhEventRichHitXY"));
340 c->cd(2);
341 DrawH2(fHM->H2("fhEventRichRingXY"));
342 }
343
344
345 {
346 TCanvas* c = fHM->CreateCanvas("rich_mcbm_X_and_Y_inEvent", "rich_mcbm_X_and_Y_inEvent", 1200, 600);
347 c->Divide(2, 1);
348 c->cd(1);
349 DrawH1(fHM->H1("fhRichHitX"));
350 c->cd(2);
351 DrawH1(fHM->H1("fhRichHitY"));
352 }
353
354 {
355 TCanvas* c = fHM->CreateCanvas("rich_mcbm_X_and_Y_inEventWithRing", "rich_mcbm_X_and_Y_inEventWithRing", 1200, 600);
356 c->Divide(2, 1);
357 c->cd(1);
358 DrawH1(fHM->H1("fhEventRichHitX"));
359 c->cd(2);
360 DrawH1(fHM->H1("fhEventRichHitY"));
361 }
362
363 {
364 TCanvas* c = fHM->CreateCanvas("rich_ToT", "rich_ToT", 1200, 600);
365 c->Divide(2, 1);
366 c->cd(1);
367 DrawH1(fHM->H1("fhRichDigisToT"));
368 c->cd(2);
369 DrawH1(fHM->H1("fhRichHitToT"));
370 }
371
372 {
373 TCanvas* c = fHM->CreateCanvas("rich_ToT_Event", "rich_ToT_Event", 1200, 600);
374 c->Divide(2, 1);
375 c->cd(1);
376 DrawH1(fHM->H1("fhRichHitToT"));
377 c->cd(2);
378 DrawH1(fHM->H1("fhEventRichHitToT"));
379 }
380
381
382 {
383 TCanvas* c = fHM->CreateCanvas("rich_mcbm_rings", "rich_mcbm_rings", 1200, 600);
384 c->Divide(2, 1);
385 c->cd(1);
386 DrawH1(fHM->H1("fhRichRingRadius"));
387 c->cd(2);
388 DrawH1(fHM->H1("fhNofHitsInRing"));
389 }
390
391 {
392 TCanvas* c = fHM->CreateCanvas("rich_mcbm_rings_inEvent", "rich_mcbm_rings_inEvent", 1200, 600);
393 c->Divide(2, 1);
394 c->cd(1);
395 DrawH1(fHM->H1("fhEventRichRingRadius"));
396 c->cd(2);
397 DrawH1(fHM->H1("fhEventNofHitsInRing"));
398 }
399
400 {
401 TCanvas* c = fHM->CreateCanvas("rich_Aerogel_Top_Bottom_Hits", "rich_Aerogel_Top_Bottom_Hits", 1200, 600);
402 c->Divide(2, 1);
403 c->cd(1);
404 DrawH1(fHM->H1("fhEventNofHitsInRingTop"));
405 unsigned int sumHitsTop = 0;
406 for (unsigned int i = 1; i <= 50; i++) {
407 sumHitsTop += fHM->H1("fhEventNofHitsInRingTop")->GetBinContent(i) * (i - 1);
408 }
409 std::cout << "Sum Hits Top: " << sumHitsTop << std::endl;
410
411 c->cd(2);
412 DrawH1(fHM->H1("fhEventNofHitsInRingBottom"));
413 unsigned int sumHitsBottom = 0;
414 for (unsigned int i = 1; i <= 50; i++) {
415 sumHitsBottom += fHM->H1("fhEventNofHitsInRingBottom")->GetBinContent(i) * (i - 1);
416 }
417 std::cout << "Sum Hits Bottom: " << sumHitsBottom << std::endl;
418 }
419
420 {
421 TCanvas* c = fHM->CreateCanvas("rich_Aerogel_Top_Bottom_Radius", "rich_Aerogel_Top_Bottom_Radius", 1200, 600);
422 c->Divide(2, 1);
423 c->cd(1);
424 DrawH1(fHM->H1("fhEventRichRingRadiusTop"));
425 c->cd(2);
426 DrawH1(fHM->H1("fhEventRichRingRadiusBottom"));
427 }
428
429
430 {
431 fHM->CreateCanvas("rich_Aerogel_#RingsTopVsBottom", "rich_Aerogel_#RingsTopVsBottom", 1200, 600);
432 fHM->H1("fhNofRingsTopBottom")->Draw("HIST TEXT");
433 }
434}
435
436
438{
439 //std::cout<<"Tracks: "<< fTofTracks->GetEntriesFast() <<std::endl;
440 std::cout << "Drawing Hists...";
441 DrawHist();
442 std::cout << "DONE!" << std::endl;
443
444 if (this->fDoDrawCanvas) {
446 std::cout << "Canvas saved to Images!" << std::endl;
447 }
448
449 if (this->fDoWriteHistToFile) {
451 TFile* oldFile = gFile;
452 TDirectory* oldir = gDirectory;
453
454 std::string s = fOutputDir + "/RecoHists.root";
455 TFile* outFile = new TFile(s.c_str(), "RECREATE");
456 if (outFile->IsOpen()) {
457 fHM->WriteToFile();
458 std::cout << "Written to Root-file \"" << s << "\" ...";
459 outFile->Close();
460 std::cout << "Done!" << std::endl;
461 }
463 gFile = oldFile;
464 gDirectory->cd(oldir->GetPath());
465 }
466}
467
468
469void CbmRichMCbmAerogelAna::DrawFromFile(const string& fileName, const string& outputDir)
470{
471 fOutputDir = outputDir;
472
474 TFile* oldFile = gFile;
475 TDirectory* oldDir = gDirectory;
476
477 if (fHM != nullptr) delete fHM;
478
479 fHM = new CbmHistManager();
480 TFile* file = new TFile(fileName.c_str());
481 fHM->ReadFromFile(file);
482 DrawHist();
483
485
487 gFile = oldFile;
488 gDirectory = oldDir;
489}
490
491
493{
494 bool check = false;
495 if ((hit->GetToT() > 23.7) && (hit->GetToT() < 30.0)) check = true;
496
497 return check;
498}
499
500
502{
503 if (ring->GetRadius() > 1. && ring->GetRadius() < 100.) return true;
504
505 return false;
506}
507
508
TClonesArray * rings
ClassImp(CbmConverterManager)
@ kTof
Time-of-flight Detector.
@ kRich
Ring-Imaging Cherenkov Detector.
void DrawH1(TH1 *hist, HistScale logx, HistScale logy, const string &drawOpt, Int_t color, Int_t lineWidth, Int_t lineStyle, Int_t markerSize, Int_t markerStyle)
void DrawH2(TH2 *hist, HistScale logx, HistScale logy, HistScale logz, const string &drawOpt)
Helper functions for drawing 1D and 2D histograms and graphs.
Histogram manager.
FairTask for matching RECO data to MC.
Convert internal data classes to cbmroot common data classes.
Ring finder implementation based on Hough Transform method.
static Int_t GetNofDigis(ECbmModuleId systemId)
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
InitStatus Init()
Initialisation.
const Digi * Get(Int_t index) const
Get a digi object.
static CbmDigiManager * Instance()
Static instance.
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
size_t GetNofData() const
Definition CbmEvent.cxx:53
uint32_t GetIndex(ECbmDataType type, uint32_t iData)
Definition CbmEvent.cxx:42
Histogram manager.
TCanvas * CreateCanvas(const std::string &name, const std::string &title, Int_t width, Int_t height)
Create and draw TCanvas and store pointer to it.
void SaveCanvasToImage(const std::string &outputDir, const std::string &options="png,eps")
Save all stored canvases to images.
TH2 * H2(const std::string &name) const
Return pointer to TH2 histogram.
void Create2(const std::string &name, const std::string &title, Int_t nofBinsX, Double_t minBinX, Double_t maxBinX, Int_t nofBinsY, Double_t minBinY, Double_t maxBinY)
Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real ob...
void ReadFromFile(TFile *file)
Read histograms from file.
void ScaleByPattern(const std::string &pattern, Double_t scale)
Scale histograms which name matches specified pattern.
void WriteToFile()
Write all objects to current opened file.
void Create1(const std::string &name, const std::string &title, Int_t nofBins, Double_t minBin, Double_t maxBin)
Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real ob...
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
double GetY() const
Definition CbmPixelHit.h:74
double GetX() const
Definition CbmPixelHit.h:73
double GetToT() const
Definition CbmRichDigi.h:78
double GetToT() const
Definition CbmRichHit.h:67
void DrawFromFile(const string &fileName, const string &outputDir)
Draw histogram from file.
bool doToT(CbmRichHit *hit)
void DrawHist()
Draw histograms.
CbmRichMCbmAerogelAna()
Standard constructor.
virtual void Finish()
Inherited from FairTask.
void InitHistograms()
Initialize histograms.
Bool_t cutRadius(CbmRichRing *ring)
virtual void Exec(Option_t *option)
Inherited from FairTask.
virtual InitStatus Init()
Inherited from FairTask.
uint32_t GetHit(int32_t i) const
Definition CbmRichRing.h:39
float GetRadius() const
Definition CbmRichRing.h:79
int32_t GetNofHits() const
Definition CbmRichRing.h:37
float GetCenterX() const
Definition CbmRichRing.h:77
float GetCenterY() const
Definition CbmRichRing.h:78
Hash for CbmL1LinkKey.