CbmRoot
Loading...
Searching...
No Matches
CbmMuchTransportQa.cxx
Go to the documentation of this file.
1/* Copyright (C) 2020-2021 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov, Dominik Smith [committer] */
4
13
14#include "CbmMuchTransportQa.h"
15
16#include "CbmMCDataArray.h"
17#include "CbmMCDataManager.h"
18#include "CbmMCTrack.h"
19#include "CbmMuchAddress.h"
20#include "CbmMuchGeoScheme.h"
21#include "CbmMuchPoint.h"
22#include "CbmMuchStation.h"
23#include "CbmQaCanvas.h"
24#include "CbmQaPie.h"
25#include "CbmTimeSlice.h"
26
27#include <FairRootManager.h>
28#include <FairSink.h>
29#include <FairTask.h>
30#include <Logger.h>
31
32#include "TClonesArray.h"
33#include "TDatabasePDG.h"
34#include "TH1.h"
35#include "TH2.h"
36#include "TLegend.h"
37#include "TStyle.h"
38#include <TAxis.h>
39#include <TDirectory.h>
40#include <TMath.h>
41#include <TParameter.h>
42#include <TString.h>
43#include <TVector3.h>
44
45#include <vector>
46
47#define BINS_STA fNstations, 0, fNstations
48
50
51// -------------------------------------------------------------------------
52CbmMuchTransportQa::CbmMuchTransportQa(const char* name, Int_t verbose)
53 : FairTask(name, verbose)
54 , fOutFolder("MuchTransportQA", "Much Transport QA")
55 , fNevents("nEvents", 0)
56 , fvUsNtra()
57 , fvMcPointXY()
58 , fvMcPointPhiZ()
59 , fvMcPointRZ()
60 , fvFraction()
61 , fvMcPointPRatio()
62 , fvMcPointPrimRatio()
63{
64}
65
66// -------------------------------------------------------------------------
68
69// -------------------------------------------------------------------------
71{
72
73 fPoints = nullptr;
74 fMcTracks = nullptr;
75 fOutFolder.Clear();
76 histFolder = nullptr;
77 fNevents.SetVal(0);
78
79 SafeDelete(fhUsNtraAll);
80 SafeDelete(fhUsNtraPrim);
81 SafeDelete(fhUsNtraSec);
82 SafeDelete(fhUsNtraPr);
83 SafeDelete(fhUsNtraPi);
84 SafeDelete(fhUsNtraEl);
85 SafeDelete(fhUsNtraMu);
86 SafeDelete(fhUsNtraKa);
87 fvUsNtra.clear();
88
89 for (uint i = 0; i < fvMcPointXY.size(); i++) {
90 SafeDelete(fvMcPointXY[i]);
91 }
92 for (uint i = 0; i < fvMcPointPhiZ.size(); i++) {
93 SafeDelete(fvMcPointPhiZ[i]);
94 }
95 for (uint i = 0; i < fvMcPointRZ.size(); i++) {
96 SafeDelete(fvMcPointRZ[i]);
97 }
98 fvMcPointXY.clear();
99 fvMcPointPhiZ.clear();
100 fvMcPointRZ.clear();
101
102 SafeDelete(fhNtracks);
103 SafeDelete(fhFractionPrim);
104 SafeDelete(fhFractionSec);
105 SafeDelete(fhFractionPr);
106 SafeDelete(fhFractionPi);
107 SafeDelete(fhFractionEl);
108 SafeDelete(fhFractionMu);
109 SafeDelete(fhFractionKa);
110 fvFraction.clear();
111
112 for (uint i = 0; i < fvMcPointPRatio.size(); i++) {
113 SafeDelete(fvMcPointPRatio[i]);
114 }
115 for (uint i = 0; i < fvMcPointPrimRatio.size(); i++) {
116 SafeDelete(fvMcPointPrimRatio[i]);
117 }
118 fvMcPointPRatio.clear();
119 fvMcPointPrimRatio.clear();
120
121 SafeDelete(fCanvStationXY);
122 SafeDelete(fCanvStationPhiZ);
123 SafeDelete(fCanvStationRZ);
124 SafeDelete(fCanvNtra);
125 SafeDelete(fCanvStationPRatio);
126 SafeDelete(fCanvStationPrimRatio);
127 fNstations = 0;
128}
129
130// -------------------------------------------------------------------------
132{
133 DeInit();
134
135 TDirectory* oldDirectory = gDirectory;
136 fManager = FairRootManager::Instance();
137
138 if (!fManager) {
139 LOG(error) << "No FairRootManager found";
140 return kERROR;
141 }
142
143 fMcManager = dynamic_cast<CbmMCDataManager*>(fManager->GetObject("MCDataManager"));
144
145 fTimeSlice = (CbmTimeSlice*) fManager->GetObject("TimeSlice.");
146 if (!fTimeSlice) { LOG(error) << GetName() << ": No time slice found"; }
147
148 if (fMcManager) {
149 // Get MCTrack array
150 fMcTracks = fMcManager->InitBranch("MCTrack");
151
152 // Get StsPoint array
153 fPoints = fMcManager->InitBranch("MuchPoint");
154 }
155
157 histFolder = fOutFolder.AddFolder("hist", "Histogramms");
158
159 if (!fMcTracks) {
160 LOG(error) << "No MC tracks found";
161 return kERROR;
162 }
163 if (!fPoints) {
164 LOG(error) << "No MC points found";
165 return kERROR;
166 }
168 LOG(fatal) << "No CbmMuchGeoScheme found";
169 return kFATAL;
170 }
171 if (fNstations == 0) {
172 LOG(error) << "CbmMuchGeoScheme is not initialized";
173 return kERROR;
174 }
175 for (Int_t i = 0; i < fNstations; i++) {
177 if (!station) {
178 LOG(fatal) << "Much station " << i << " doesn't exist";
179 return kFATAL;
180 }
181 }
182 fNevents.SetVal(0);
183 histFolder->Add(&fNevents);
184
189 InitCanvases();
190
191 gDirectory = oldDirectory;
192 return kSUCCESS;
193}
194
195// -------------------------------------------------------------------------
197{
198
199 fvUsNtra.clear();
200 std::vector<TH1F*>& v = fvUsNtra;
201 v.push_back(fhUsNtraAll = new TH1F("hUsNtraAll", "N tracks", BINS_STA));
202 v.push_back(fhUsNtraPrim = new TH1F("hUsNtraPrim", "N primary tracks", BINS_STA));
203 v.push_back(fhUsNtraSec = new TH1F("hUsNtraSec", "N secondary tracks", BINS_STA));
204 v.push_back(fhUsNtraPr = new TH1F("hUsNtraPr", "N protons", BINS_STA));
205 v.push_back(fhUsNtraPi = new TH1F("hUsNtraPi", "N pions", BINS_STA));
206 v.push_back(fhUsNtraEl = new TH1F("hUsNtraEl", "N electrons", BINS_STA));
207 v.push_back(fhUsNtraMu = new TH1F("hUsNtraMu", "N muons", BINS_STA));
208 v.push_back(fhUsNtraKa = new TH1F("hUsNtraKa", "N kaons", BINS_STA));
209 for (uint i = 0; i < fvUsNtra.size(); i++) {
210 TH1F* h = fvUsNtra[i];
211 h->SetStats(0);
212 h->GetXaxis()->SetTitle("Station");
213 histFolder->Add(h);
214 }
215}
216
217// -------------------------------------------------------------------------
219{
220
221 fvFraction.clear();
222 std::vector<TH1F*>& v = fvFraction;
223 v.push_back(fhNtracks = new TH1F("hNtracks", "N tracks per event", BINS_STA));
224 v.push_back(fhFractionPrim = new TH1F("hFractionPrim", "Fraction of primary tracks", BINS_STA));
225 v.push_back(fhFractionSec = new TH1F("hFractionSec", "Fraction of secondary tracks", BINS_STA));
226 v.push_back(fhFractionPr = new TH1F("hFractionPr", "Fraction of protons", BINS_STA));
227 v.push_back(fhFractionPi = new TH1F("hFractionPi", "Fraction of pions", BINS_STA));
228 v.push_back(fhFractionEl = new TH1F("hFractionEl", "Fraction of electrons", BINS_STA));
229 v.push_back(fhFractionMu = new TH1F("hFractionMu", "Fraction of muons", BINS_STA));
230 v.push_back(fhFractionKa = new TH1F("hFractionKa", "Fraction of kaons", BINS_STA));
231
232 for (uint i = 0; i < fvFraction.size(); i++) {
233 TH1F* h = fvFraction[i];
234 h->SetStats(0);
235 h->GetXaxis()->SetTitle("Station");
236 if (i == 0) { h->GetYaxis()->SetTitle("N tracks"); }
237 else {
238 h->GetYaxis()->SetTitle("%");
239 }
240 histFolder->Add(h);
241 }
242}
243
244// -------------------------------------------------------------------------
246{
247
248 fvMcPointXY.resize(fNstations);
250 fvMcPointRZ.resize(fNstations);
251 gStyle->SetOptStat(0);
252
253 for (Int_t i = 0; i < fNstations; i++) {
255 Double_t rMax = station->GetRmax();
256 Double_t rMin = station->GetRmin();
257
258 fvMcPointXY[i] = new TH2F(Form("hMcPointXY%i", i + 1), Form("MC point XY : Station %i; X; Y", i + 1), 100,
259 -1.2 * rMax, 1.2 * rMax, 100, -1.2 * rMax, 1.2 * rMax);
260 fvMcPointPhiZ[i] = new TH2F(Form("hMcPointPhiZ%i", i + 1), Form("MC point Phi vs Z : Station %i; Z; Phi", i + 1),
261 100, station->GetZ() - station->GetTubeDz() - 5.,
262 station->GetZ() + station->GetTubeDz() + 5., 100, -200., 200.);
263
264 float dR = rMax - rMin;
265 fvMcPointRZ[i] = new TH2F(Form("hMcPointRZ%i", i + 1), Form("MC point R vs Z : Station %i; Z; R", i + 1), 100,
266 station->GetZ() - station->GetTubeDz() - 5., station->GetZ() + station->GetTubeDz() + 5.,
267 100, rMin - 0.1 * dR, rMax + 0.1 * dR);
268 histFolder->Add(fvMcPointXY[i]);
269 histFolder->Add(fvMcPointPhiZ[i]);
270 histFolder->Add(fvMcPointRZ[i]);
271 }
272}
273
274// -------------------------------------------------------------------------
276{
277
280 for (Int_t i = 0; i < fNstations; i++) {
281 fvMcPointPRatio[i] =
282 new CbmQaPie(Form("fvMcPointPRatio%i", i + 1), Form("McPoint Particle Ratios: Station %i", i + 1), 5);
283
285 new CbmQaPie(Form("fvMcPointPrimRatio%i", i + 1), Form("McPoint Primary/Secondary Track: Station %i", i + 1), 2);
286
289 }
290}
291
292// -------------------------------------------------------------------------
294{
295
296 fCanvStationXY = new CbmQaCanvas("cMcPointXY", "Much: MC point XY", 2 * 400, 2 * 400);
298
299 fCanvStationPhiZ = new CbmQaCanvas("cMcPointPhiZ", "Much: MC point Phi vs Z", 2 * 800, 2 * 400);
301
302 fCanvStationRZ = new CbmQaCanvas("cMcPointRZ", "Much: MC point R vs Z", 2 * 800, 2 * 400);
304
305 fCanvNtra = new CbmQaCanvas("cNparticles", "Much: Particle counts per event", 2 * 800, 2 * 400);
307
308 fCanvStationPRatio = new CbmQaCanvas("cMcPointPRatios", "Much: MC particle ratios", 2 * 400, 2 * 400);
310
312 new CbmQaCanvas("cMcPointPrimRatios", "Much: MC primary/secondary track ratios", 2 * 400, 2 * 400);
314
321}
322
323// -------------------------------------------------------------------------
325{
326 DeInit();
327 return Init();
328}
329
330// -------------------------------------------------------------------------
332{
333 // Get run and runtime database
334
335 // The code currently does not work,
336 // CbmMuchGeoScheme::Instance() must be initialised outside.
337 // - Sergey
338
339 // FairRuntimeDb* db = FairRuntimeDb::instance();
340 // if ( ! db ) Fatal("SetParContainers", "No runtime database");
341 // Get MUCH geometry parameter container
342 // CbmGeoMuchPar *fGeoPar = (CbmGeoMuchPar*)
343 // db->getContainer("CbmGeoMuchPar"); TObjArray *stations =
344 // fGeoPar->GetStations();
345 // TString geoTag;
346 // CbmSetup::Instance()->GetGeoTag(ECbmModuleId::kMuch, geoTag);
347 // bool mcbmFlag = geoTag.Contains("mcbm", TString::kIgnoreCase);
348 // CbmMuchGeoScheme::Instance()->Init(stations, mcbmFlag);
349}
350
351// -------------------------------------------------------------------------
353{
354
355 fNevents.SetVal(fNevents.GetVal() + 1);
356 LOG(debug) << "Event: " << fNevents.GetVal();
357
358 const CbmMatch& sliceMatch = fTimeSlice->GetMatch();
359
360 for (int iLink = 0; iLink < sliceMatch.GetNofLinks(); iLink++) {
361 const CbmLink& eventLink = sliceMatch.GetLink(iLink);
362 int nMuchPoints = fPoints->Size(eventLink);
363 int nMcTracks = fMcTracks->Size(eventLink);
364
365 // bitmask tells which stations were crossed by mc track
366 std::vector<UInt_t> trackStaCross(nMcTracks, 0);
367
368 for (Int_t ip = 0; ip < nMuchPoints; ip++) {
369 CbmLink pointLink = eventLink;
370 pointLink.SetIndex(ip);
371 CbmMuchPoint* point = (CbmMuchPoint*) fPoints->Get(pointLink);
372 Int_t stId = CbmMuchAddress::GetStationIndex(point->GetDetectorID());
373 UInt_t stMask = (1 << stId);
374 Int_t trackId = point->GetTrackID();
375 if (!point) {
376 LOG(fatal) << "Much point " << ip << " doesn't exist";
377 break;
378 } // Check if the point corresponds to a certain MC Track
379 if (trackId < 0 || trackId >= nMcTracks) {
380 LOG(fatal) << "Much point " << ip << ": trackId " << trackId << " doesn't belong to [0," << nMcTracks - 1
381 << "]";
382 break;
383 }
384 CbmLink trackLink = eventLink;
385 trackLink.SetIndex(trackId);
386 CbmMCTrack* mcTrack = (CbmMCTrack*) fMcTracks->Get(trackLink);
387 if (!mcTrack) {
388 LOG(fatal) << "MC track " << trackId << " doesn't exist";
389 break;
390 }
391
392 Int_t motherId = mcTrack->GetMotherId();
393 Int_t pdgCode = mcTrack->GetPdgCode();
394 if (pdgCode == 22 || // photons
395 pdgCode == 2112) // neutrons
396 {
397 continue;
398 }
399
400 if (!(trackStaCross[trackId] & stMask)) { FillCountingHistos(stId, motherId, pdgCode); }
401 trackStaCross[trackId] |= stMask;
403 }
404 }
405}
406
407// -------------------------------------------------------------------------
408void CbmMuchTransportQa::FillCountingHistos(Int_t stId, Int_t motherId, Int_t pdgCode)
409{
410 fhUsNtraAll->Fill(stId);
411 if (motherId == -1) { fhUsNtraPrim->Fill(stId); }
412 else {
413 fhUsNtraSec->Fill(stId);
414 }
415 switch (abs(pdgCode)) {
416 case 2212: // proton
417 fhUsNtraPr->Fill(stId);
418 break;
419 case 211: // pion
420 fhUsNtraPi->Fill(stId);
421 break;
422 case 11: // electron
423 fhUsNtraEl->Fill(stId);
424 break;
425 case 13: // muon
426 fhUsNtraMu->Fill(stId);
427 break;
428 case 321: // kaon
429 fhUsNtraKa->Fill(stId);
430 break;
431 }
432}
433
434// -------------------------------------------------------------------------
436{
437
438 TVector3 v1; // in position of the track
439 TVector3 v2; // out position of the track
440 point->PositionIn(v1);
441 point->PositionOut(v2);
442
443 fvMcPointXY[stId]->Fill(v1.X(), v1.Y());
444 fvMcPointXY[stId]->Fill(v2.X(), v2.Y());
445 fvMcPointPhiZ[stId]->Fill(v1.Z(), v1.Phi() * TMath::RadToDeg());
446 fvMcPointPhiZ[stId]->Fill(v2.Z(), v2.Phi() * TMath::RadToDeg());
447 fvMcPointRZ[stId]->Fill(v1.Z(), v1.Perp());
448 fvMcPointRZ[stId]->Fill(v2.Z(), v2.Perp());
449}
450
451// -------------------------------------------------------------------------
453{
454
455 TDirectory* oldDirectory = gDirectory;
456 fhNtracks->Reset();
457 fhNtracks->Add(fhUsNtraAll, 1. / fNevents.GetVal());
458
459 std::vector<Double_t> errors(fNstations, 0.);
460 fhUsNtraAll->SetError(errors.data());
461
462 for (uint i = 1; i < fvFraction.size(); i++) {
463 fvFraction[i]->Divide(fvUsNtra[i], fhUsNtraAll);
464 fvFraction[i]->Scale(100.);
465 }
468 DrawCanvases();
469
470 gDirectory = oldDirectory;
471 return fOutFolder;
472}
473
474// -------------------------------------------------------------------------
476{
477
478 for (Int_t i = 0; i < fNstations; i++) {
479 fCanvStationXY->cd(i + 1);
480 fvMcPointXY[i]->DrawCopy("colz", "");
481
482 fCanvStationPhiZ->cd(i + 1);
483 fvMcPointPhiZ[i]->DrawCopy("colz", "");
484
485 fCanvStationRZ->cd(i + 1);
486 fvMcPointRZ[i]->DrawCopy("colz", "");
487
488 fCanvStationPRatio->cd(i + 1);
489 fvMcPointPRatio[i]->DrawClone("nol <");
490
491 TLegend* PRatioPieLeg = fvMcPointPRatio[i]->MakeLegend();
492 PRatioPieLeg->SetY1(.56);
493 PRatioPieLeg->SetY2(.86);
494
495 fCanvStationPrimRatio->cd(i + 1);
496 fvMcPointPrimRatio[i]->DrawClone("nol <");
497
498 TLegend* PrimRatioPieLeg = fvMcPointPrimRatio[i]->MakeLegend();
499 PrimRatioPieLeg->SetY1(.71);
500 PrimRatioPieLeg->SetY2(.86);
501 PrimRatioPieLeg->SetX1(.40);
502 PrimRatioPieLeg->SetX2(.90);
503 }
504
505 double scale = (fNevents.GetVal() > 0) ? 1. / fNevents.GetVal() : 0;
506 int i = 1;
507
508 fCanvNtra->cd(i++);
509 fhNtracks->DrawCopy("colz", "");
510
511 fCanvNtra->cd(i++);
512 fhUsNtraPrim->DrawCopy("colz", "")->Scale(scale);
513
514 fCanvNtra->cd(i++);
515 fhUsNtraSec->DrawCopy("colz", "")->Scale(scale);
516
517 fCanvNtra->cd(i++);
518 fhUsNtraPr->DrawCopy("colz", "")->Scale(scale);
519
520 fCanvNtra->cd(i++);
521 fhUsNtraPi->DrawCopy("colz", "")->Scale(scale);
522
523 fCanvNtra->cd(i++);
524 fhUsNtraEl->DrawCopy("colz", "")->Scale(scale);
525
526 fCanvNtra->cd(i++);
527 fhUsNtraMu->DrawCopy("colz", "")->Scale(scale);
528
529 fCanvNtra->cd(i++);
530 fhUsNtraKa->DrawCopy("colz", "")->Scale(scale);
531}
532
533// -------------------------------------------------------------------------
535{
536
537 for (Int_t i = 0; i < fNstations; i++) {
538 Double_t PRatios[] = {fhFractionEl->GetBinContent(i + 1), fhFractionPr->GetBinContent(i + 1),
539 fhFractionPi->GetBinContent(i + 1), fhFractionMu->GetBinContent(i + 1),
540 fhFractionKa->GetBinContent(i + 1)};
541 Int_t PRatiosColors[] = {4, 3, 2, 5, 6};
542
543 fvMcPointPRatio[i]->SetEntryVal(0, PRatios[0]);
544 fvMcPointPRatio[i]->SetEntryVal(1, PRatios[1]);
545 fvMcPointPRatio[i]->SetEntryVal(2, PRatios[2]);
546 fvMcPointPRatio[i]->SetEntryVal(3, PRatios[3]);
547 fvMcPointPRatio[i]->SetEntryVal(4, PRatios[4]);
548 fvMcPointPRatio[i]->SetEntryFillColor(0, PRatiosColors[0]);
549 fvMcPointPRatio[i]->SetEntryFillColor(1, PRatiosColors[1]);
550 fvMcPointPRatio[i]->SetEntryFillColor(2, PRatiosColors[2]);
551 fvMcPointPRatio[i]->SetEntryFillColor(3, PRatiosColors[3]);
552 fvMcPointPRatio[i]->SetEntryFillColor(4, PRatiosColors[4]);
553 fvMcPointPRatio[i]->GetSlice(0)->SetTitle(Form("e: %.1f %%", PRatios[0]));
554 fvMcPointPRatio[i]->GetSlice(1)->SetTitle(Form("p: %.1f %%", PRatios[1]));
555 fvMcPointPRatio[i]->GetSlice(2)->SetTitle(Form("#pi: %.1f %%", PRatios[2]));
556 fvMcPointPRatio[i]->GetSlice(3)->SetTitle(Form("#mu: %.1f %%", PRatios[3]));
557 fvMcPointPRatio[i]->GetSlice(4)->SetTitle(Form("K: %.1f %%", PRatios[4]));
558 fvMcPointPRatio[i]->SetRadius(.33);
559 fvMcPointPRatio[i]->SetLabelsOffset(-.1);
560 fvMcPointPRatio[i]->SetLabelFormat("");
561 }
562}
563
565{
566
567 for (Int_t i = 0; i < fNstations; i++) {
568 Double_t PrimRatios[] = {fhFractionPrim->GetBinContent(i + 1), fhFractionSec->GetBinContent(i + 1)};
569 Int_t PrimRatiosColors[] = {6, 4};
570
571 fvMcPointPrimRatio[i]->SetEntryVal(0, PrimRatios[0]);
572 fvMcPointPrimRatio[i]->SetEntryVal(1, PrimRatios[1]);
573 fvMcPointPrimRatio[i]->SetEntryFillColor(0, PrimRatiosColors[0]);
574 fvMcPointPrimRatio[i]->SetEntryFillColor(1, PrimRatiosColors[1]);
575 fvMcPointPrimRatio[i]->GetSlice(0)->SetTitle(Form("Primary: %.1f %%", PrimRatios[0]));
576 fvMcPointPrimRatio[i]->GetSlice(1)->SetTitle(Form("Secondary: %.1f %%", PrimRatios[1]));
577 fvMcPointPrimRatio[i]->SetRadius(.33);
578 fvMcPointPrimRatio[i]->SetLabelsOffset(-.1);
579 fvMcPointPrimRatio[i]->SetLabelFormat("");
580 }
581}
582
583// -------------------------------------------------------------------------
585{
586
587 if (!FairRootManager::Instance() || !FairRootManager::Instance()->GetSink()) {
588 LOG(error) << "No sink found";
589 return;
590 }
591 FairSink* sink = FairRootManager::Instance()->GetSink();
592 sink->WriteObject(&GetQa(), nullptr);
593}
ClassImp(CbmMuchTransportQa)
#define BINS_STA
Definition of the CbmMuchTransportQa class.
Definition of the CbmQaCanvas class.
Definition of the CbmQaPie class.
fscal v[fmask::Size]
Definition KfSimdPseudo.h:4
TObject * Get(const CbmLink *lnk)
Int_t Size(Int_t fileNumber, Int_t eventNumber)
Task class creating and managing CbmMCDataArray objects.
CbmMCDataArray * InitBranch(const char *name)
int32_t GetMotherId() const
Definition CbmMCTrack.h:69
int32_t GetPdgCode() const
Definition CbmMCTrack.h:68
const CbmLink & GetLink(int32_t i) const
Definition CbmMatch.h:39
int32_t GetNofLinks() const
Definition CbmMatch.h:42
static int32_t GetStationIndex(int32_t address)
CbmMuchStation * GetStation(Int_t iStation) const
static CbmMuchGeoScheme * Instance()
Int_t GetNStations() const
void PositionIn(TVector3 &pos) const
void PositionOut(TVector3 &pos) const
Double_t GetRmin() const
Double_t GetRmax() const
Double_t GetZ() const
Double_t GetTubeDz() const
TH1F * fhFractionPi
fraction of protons
std::vector< TH2F * > fvMcPointRZ
MC point Phi vs Z [N stations].
CbmMCDataArray * fMcTracks
CbmQaCanvas * fCanvStationRZ
TH1F * fhUsNtraMu
number of electrons
void Fill2dSpatialDistributionHistos(CbmMuchPoint *point, Int_t stId)
TParameter< int > fNevents
output folder with histos and canvases
CbmMCDataArray * fPoints
containers
void FillCountingHistos(Int_t stId, Int_t motherId, Int_t pdgCode)
TH1F * fhUsNtraPr
number of secondary tracks
CbmQaCanvas * fCanvStationPRatio
CbmQaCanvas * fCanvStationPhiZ
void Exec(Option_t *option)
TH1F * fhUsNtraKa
number of muons
virtual ~CbmMuchTransportQa()
Destructor.
TFolder fOutFolder
subfolder for histograms
std::vector< CbmQaPie * > fvMcPointPRatio
pointers to the above histos
std::vector< TH2F * > fvMcPointPhiZ
MC point Y vs X [N stations].
TH1F * fhFractionMu
fraction of electrons
FairRootManager * fManager
CbmQaCanvas * fCanvStationXY
MC point particle ratio pie charts [N stations].
std::vector< CbmQaPie * > fvMcPointPrimRatio
MC point particle ratio pie charts [N stations].
TH1F * fhFractionPr
fraction of secondary tracks
TH1F * fhUsNtraSec
number of primary tracks
TH1F * fhUsNtraAll
number of processed events
std::vector< TH1F * > fvUsNtra
number of kaons
TH1F * fhFractionSec
fraction of primary tracks
CbmMuchTransportQa(const char *name="MuchHitFinderQa", Int_t verbose=1)
Constructor.
CbmMCDataManager * fMcManager
TH1F * fhFractionPrim
number of all tracks / event
TH1F * fhFractionKa
fraction of muons
TH1F * fhNtracks
MC point R vs Z [N stations].
TH1F * fhUsNtraPi
number of protons
void SetParContainers()
FairTask methods.
TH1F * fhUsNtraEl
number of pions
TH1F * fhUsNtraPrim
number of all tracks
std::vector< TH2F * > fvMcPointXY
pointers to the above fhUsNtra* histos
CbmQaCanvas * fCanvStationPrimRatio
TH1F * fhFractionEl
fraction of pions
std::vector< TH1F * > fvFraction
fraction of kaons
CbmTimeSlice * fTimeSlice
void Divide2D(int nPads)
Divide canvas into nPads in 2D in a nice way.
Data class with information on a STS local track.
Bookkeeping of time-slice content.
const CbmMatch & GetMatch() const