CbmRoot
CbmMuchTransportQa.h
Go to the documentation of this file.
1 
10 #ifndef CbmMuchTransportQa_H
11 #define CbmMuchTransportQa_H
12 
13 #include "CbmGeoMuchPar.h"
14 #include "CbmMCTrack.h"
15 #include "CbmMuchGeoScheme.h"
16 #include "CbmMuchPoint.h"
17 #include "CbmMuchStation.h"
18 #include "CbmQaCanvas.h"
19 #include "FairLogger.h"
20 #include "FairRootFileSink.h"
21 #include "FairRootManager.h"
22 #include "FairRun.h"
23 #include "FairRuntimeDb.h"
24 #include "FairTask.h"
25 #include "TClonesArray.h"
26 #include "TDatabasePDG.h"
27 #include "TFolder.h"
28 #include "TH1.h"
29 #include "TH2.h"
30 #include "TLegend.h"
31 #include "TParameter.h"
32 #include "TParticlePDG.h"
33 #include "TPie.h"
34 #include "TPieSlice.h"
35 #include "TString.h"
36 #include "TStyle.h"
37 #include <cassert>
38 #include <vector>
39 
40 #define BINS_STA fNstations, 0, fNstations
41 
46 class CbmMuchTransportQa : public FairTask {
47 
48 public:
50  CbmMuchTransportQa(const char* name = "MuchHitFinderQa", Int_t verbose = 1);
54 
56  virtual ~CbmMuchTransportQa();
57 
59  void SetParContainers();
60  InitStatus Init();
61  InitStatus ReInit();
62  void Exec(Option_t* option);
63  void Finish();
64 
67  TFolder& GetQa();
68 
69 private:
70  void InitCountingHistos();
71  void InitFractionHistos();
73  void InitRatioPieCharts();
74  void InitCanvases();
75  void FillCountingHistos(Int_t stId, Int_t motherId, Int_t pdgCode);
76  void Fill2dSpatialDistributionHistos(CbmMuchPoint* point, Int_t stId);
77 
80  void DeInit();
81 
82  void MakePRatioPieCharts();
84  void DrawCanvases();
85 
87  Int_t fNstations = 0;
88 
90  TClonesArray* fPoints = nullptr;
91  TClonesArray* fMcTracks = nullptr;
93 
94  TFolder* histFolder;
95  TFolder fOutFolder;
96  TParameter<int> fhNevents;
97 
99  TH1F* fhUsNtraAll = nullptr;
100  TH1F* fhUsNtraPrim = nullptr;
101  TH1F* fhUsNtraSec = nullptr;
102  TH1F* fhUsNtraPr = nullptr;
103  TH1F* fhUsNtraPi = nullptr;
104  TH1F* fhUsNtraEl = nullptr;
105  TH1F* fhUsNtraMu = nullptr;
106  TH1F* fhUsNtraKa = nullptr;
107  std::vector<TH1F*> fvUsNtra;
108 
110  std::vector<TH2F*> fvMcPointXY;
111  std::vector<TH2F*> fvMcPointPhiZ;
112  std::vector<TH2F*> fvMcPointRZ;
113 
114  TH1F* fhNtracks = nullptr;
115  TH1F* fhFractionPrim = nullptr;
116  TH1F* fhFractionSec = nullptr;
117  TH1F* fhFractionPr = nullptr;
118  TH1F* fhFractionPi = nullptr;
119  TH1F* fhFractionEl = nullptr;
120  TH1F* fhFractionMu = nullptr;
121  TH1F* fhFractionKa = nullptr;
122  std::vector<TH1F*> fvFraction;
123 
125  std::vector<TPie*>
127  std::vector<TPie*>
129 
130  // output canvaces with histogramm collections
135 
136  // output canvaces with pie chart collections
139 
140  ClassDef(CbmMuchTransportQa, 0)
141 };
142 
143 #endif
CbmMuchTransportQa::fNstations
Int_t fNstations
geometry
Definition: CbmMuchTransportQa.h:87
CbmMuchTransportQa
Definition: CbmMuchTransportQa.h:46
CbmMuchTransportQa::Exec
void Exec(Option_t *option)
Definition: CbmMuchTransportQa.cxx:330
CbmMuchPoint
Definition: CbmMuchPoint.h:21
CbmMuchTransportQa::fvMcPointPhiZ
std::vector< TH2F * > fvMcPointPhiZ
MC point Y vs X [N stations].
Definition: CbmMuchTransportQa.h:111
CbmMuchTransportQa::fhNtracks
TH1F * fhNtracks
MC point R vs Z [N stations].
Definition: CbmMuchTransportQa.h:114
CbmMuchTransportQa::Fill2dSpatialDistributionHistos
void Fill2dSpatialDistributionHistos(CbmMuchPoint *point, Int_t stId)
Definition: CbmMuchTransportQa.cxx:413
CbmMuchTransportQa::fMcTracks
TClonesArray * fMcTracks
Definition: CbmMuchTransportQa.h:91
CbmMuchTransportQa::CbmMuchTransportQa
CbmMuchTransportQa(const char *name="MuchHitFinderQa", Int_t verbose=1)
Constructor.
Definition: CbmMuchTransportQa.cxx:14
CbmMuchTransportQa::fCanvUsNtra
CbmQaCanvas * fCanvUsNtra
Definition: CbmMuchTransportQa.h:134
CbmMuchTransportQa::~CbmMuchTransportQa
virtual ~CbmMuchTransportQa()
Destructor.
Definition: CbmMuchTransportQa.cxx:28
CbmMuchTransportQa::fhUsNtraPr
TH1F * fhUsNtraPr
number of secondary tracks
Definition: CbmMuchTransportQa.h:102
CbmMuchTransportQa::fhFractionSec
TH1F * fhFractionSec
fraction of primary tracks
Definition: CbmMuchTransportQa.h:116
CbmMuchTransportQa::histFolder
TFolder * histFolder
Definition: CbmMuchTransportQa.h:94
CbmMuchTransportQa::InitRatioPieCharts
void InitRatioPieCharts()
Definition: CbmMuchTransportQa.cxx:244
CbmMuchTransportQa::InitFractionHistos
void InitFractionHistos()
Definition: CbmMuchTransportQa.cxx:167
CbmMuchTransportQa::fvFraction
std::vector< TH1F * > fvFraction
fraction of kaons
Definition: CbmMuchTransportQa.h:122
CbmMuchTransportQa::InitCanvases
void InitCanvases()
Definition: CbmMuchTransportQa.cxx:264
CbmMuchTransportQa::MakePRatioPieCharts
void MakePRatioPieCharts()
Definition: CbmMuchTransportQa.cxx:525
CbmMuchTransportQa::DeInit
void DeInit()
Definition: CbmMuchTransportQa.cxx:32
CbmMuchTransportQa::fhFractionEl
TH1F * fhFractionEl
fraction of pions
Definition: CbmMuchTransportQa.h:119
CbmMuchTransportQa::fhFractionPr
TH1F * fhFractionPr
fraction of secondary tracks
Definition: CbmMuchTransportQa.h:117
CbmQaCanvas.h
Definition of the CbmQaCanvas class.
CbmMuchTransportQa::InitCountingHistos
void InitCountingHistos()
Definition: CbmMuchTransportQa.cxx:145
CbmMuchTransportQa::ReInit
InitStatus ReInit()
Definition: CbmMuchTransportQa.cxx:302
CbmMuchTransportQa::MakePrimRatioPieCharts
void MakePrimRatioPieCharts()
Definition: CbmMuchTransportQa.cxx:558
CbmMuchPoint.h
CbmMuchTransportQa::fCanvStationXY
CbmQaCanvas * fCanvStationXY
MC point particle ratio pie charts [N stations].
Definition: CbmMuchTransportQa.h:131
CbmMuchTransportQa::DrawCanvases
void DrawCanvases()
Definition: CbmMuchTransportQa.cxx:452
CbmGeoMuchPar.h
CbmMuchTransportQa::fhUsNtraSec
TH1F * fhUsNtraSec
number of primary tracks
Definition: CbmMuchTransportQa.h:101
CbmMuchTransportQa::SetParContainers
void SetParContainers()
FairTask methods.
Definition: CbmMuchTransportQa.cxx:309
CbmMuchTransportQa::fvMcPointRZ
std::vector< TH2F * > fvMcPointRZ
MC point Phi vs Z [N stations].
Definition: CbmMuchTransportQa.h:112
CbmMuchTransportQa::fhUsNtraAll
TH1F * fhUsNtraAll
number of processed events
Definition: CbmMuchTransportQa.h:99
CbmMuchTransportQa::fhFractionPrim
TH1F * fhFractionPrim
number of all tracks / event
Definition: CbmMuchTransportQa.h:115
CbmMuchTransportQa::fvMcPointPrimRatio
std::vector< TPie * > fvMcPointPrimRatio
MC point particle ratio pie charts [N stations].
Definition: CbmMuchTransportQa.h:128
CbmMuchTransportQa::fhUsNtraEl
TH1F * fhUsNtraEl
number of pions
Definition: CbmMuchTransportQa.h:104
CbmMuchTransportQa::fhNevents
TParameter< int > fhNevents
output folder with histos and canvases
Definition: CbmMuchTransportQa.h:96
CbmMuchTransportQa::FillCountingHistos
void FillCountingHistos(Int_t stId, Int_t motherId, Int_t pdgCode)
Definition: CbmMuchTransportQa.cxx:384
CbmMuchTransportQa::fvUsNtra
std::vector< TH1F * > fvUsNtra
number of kaons
Definition: CbmMuchTransportQa.h:107
CbmMuchTransportQa::fhFractionPi
TH1F * fhFractionPi
fraction of protons
Definition: CbmMuchTransportQa.h:118
CbmMuchTransportQa::fvMcPointPRatio
std::vector< TPie * > fvMcPointPRatio
pointers to the above histos
Definition: CbmMuchTransportQa.h:126
CbmMuchTransportQa::fCanvStationPrimRatio
CbmQaCanvas * fCanvStationPrimRatio
Definition: CbmMuchTransportQa.h:138
CbmMuchTransportQa::fhUsNtraMu
TH1F * fhUsNtraMu
number of electrons
Definition: CbmMuchTransportQa.h:105
CbmMuchTransportQa::fhFractionMu
TH1F * fhFractionMu
fraction of electrons
Definition: CbmMuchTransportQa.h:120
CbmQaCanvas
Definition: CbmQaCanvas.h:27
CbmMuchTransportQa::fhUsNtraKa
TH1F * fhUsNtraKa
number of muons
Definition: CbmMuchTransportQa.h:106
CbmMuchTransportQa::fCanvStationPRatio
CbmQaCanvas * fCanvStationPRatio
Definition: CbmMuchTransportQa.h:137
CbmMuchTransportQa::GetQa
TFolder & GetQa()
Definition: CbmMuchTransportQa.cxx:430
CbmMCTrack.h
CbmMuchTransportQa::fhUsNtraPrim
TH1F * fhUsNtraPrim
number of all tracks
Definition: CbmMuchTransportQa.h:100
CbmMuchTransportQa::fhUsNtraPi
TH1F * fhUsNtraPi
number of protons
Definition: CbmMuchTransportQa.h:103
CbmMuchTransportQa::operator=
CbmMuchTransportQa & operator=(const CbmMuchTransportQa &)=delete
CbmMuchTransportQa::fvMcPointXY
std::vector< TH2F * > fvMcPointXY
pointers to the above fhUsNtra* histos
Definition: CbmMuchTransportQa.h:110
CbmMuchTransportQa::Finish
void Finish()
Definition: CbmMuchTransportQa.cxx:580
CbmMuchGeoScheme.h
CbmMuchTransportQa::fCanvStationRZ
CbmQaCanvas * fCanvStationRZ
Definition: CbmMuchTransportQa.h:133
CbmMuchTransportQa::fhFractionKa
TH1F * fhFractionKa
fraction of muons
Definition: CbmMuchTransportQa.h:121
CbmMuchTransportQa::Init2dSpatialDistributionHistos
void Init2dSpatialDistributionHistos()
Definition: CbmMuchTransportQa.cxx:200
CbmMuchTransportQa::fPoints
TClonesArray * fPoints
containers
Definition: CbmMuchTransportQa.h:90
CbmMuchStation.h
CbmMuchTransportQa::CbmMuchTransportQa
CbmMuchTransportQa(const CbmMuchTransportQa &)=delete
Deactivated copy constructors.
CbmMuchTransportQa::fCanvStationPhiZ
CbmQaCanvas * fCanvStationPhiZ
Definition: CbmMuchTransportQa.h:132
CbmMuchTransportQa::fOutFolder
TFolder fOutFolder
subfolder for histograms
Definition: CbmMuchTransportQa.h:95
CbmMuchTransportQa::Init
InitStatus Init()
Definition: CbmMuchTransportQa.cxx:95