CbmRoot
Loading...
Searching...
No Matches
CbmMuchDigitizerQa.h
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: Evgeny Kryshen, Dominik Smith [committer], Sergey Gorbunov, Vikas Singhal, Ekata Nandy */
4
5/*** \brief Definition of the CbmMuchDigitizerQa class
6 * \date 25.09.2020 **/
7
8#ifndef CbmMuchDigitizerQa_H
9#define CbmMuchDigitizerQa_H
10
11#include "CbmLink.h"
12#include "CbmMuchPointInfo.h"
13
14#include "FairTask.h"
15
16#include "TFolder.h"
17#include "TParameter.h"
18
19#include <map>
20#include <vector>
21
22class TBuffer;
23class TClass;
24class TClonesArray;
25class TF1;
26class TMemberInspector;
28class CbmDigiManager;
29class CbmQaCanvas;
30class TCanvas;
31class TH1F;
32class TH2F;
33class TVector2;
34class CbmMuchPad;
35class CbmMCDataArray;
37class CbmTimeSlice;
38class FairRootManager;
39
44class CbmMuchDigitizerQa : public FairTask {
45
46public:
47 CbmMuchDigitizerQa(const char* name = "MuchHitFinderQa", Int_t verbose = 1);
48 virtual ~CbmMuchDigitizerQa();
49 virtual InitStatus Init();
50 virtual void Exec(Option_t* option);
51 virtual void Finish();
52 virtual void SetParContainers();
53
56 TFolder& GetQa();
57
58private:
61
62 static Double_t LandauMPV(Double_t* x, Double_t* par);
63 static Double_t MPV_n_e(Double_t Tkin, Double_t mass);
64
68 void OccupancyQa();
69
71 const CbmMuchPad* GetPad(UInt_t address) const;
72
73 void InitChargeHistos();
74 void InitPadHistos();
75 void InitLengthHistos();
77 void InitFits();
78 void InitCanvases();
79 void DeInit();
80
81 int CheckConsistency();
82 int ProcessMCPoints();
84 void FillChargePerPoint();
88
89 void DrawChargeCanvases();
90 void DrawPadCanvases();
91 void DrawLengthCanvases();
92 void OutputNvsS();
93
94 TFolder* histFolder;
95
96 // setup
97 FairRootManager* fManager = nullptr;
100
101 // geometry
103 Int_t fNstations = 0;
105
106 // containers
109 TClonesArray* fDigis = nullptr;
110 TClonesArray* fDigiMatches = nullptr;
111
112 std::map<CbmLink, CbmMuchPointInfo> fMcPointInfoMap = {};
113
115 {
116 assert(fMcPointInfoMap.find(link) != fMcPointInfoMap.end());
117 return fMcPointInfoMap[link];
118 }
119
120 TFolder fOutFolder;
121 TParameter<int> fNevents;
122
123 // internal unscaled histograms, need to be scaled at the output
124 std::vector<TH1F*> fvUsPadsFiredR; // fired pads vs R, per station
125 std::vector<TH2F*> fvUsPadsFiredXY; // fired pads vs XY, per station
126
127 // output histograms
128 TH1F* fhTrackCharge = nullptr;
129 TH1F* fhTrackChargeLog = nullptr;
130 TH1F* fhTrackChargePr_1GeV_3mm = nullptr;
131
132 TH1F* fhTrackLength = nullptr;
133 TH1F* fhTrackLengthPi = nullptr;
134 TH1F* fhTrackLengthPr = nullptr;
135 TH1F* fhTrackLengthEl = nullptr;
136
145 TH2F* fhNpadsVsS = nullptr;
146
147 std::vector<TH1F*> fvTrackCharge; // MC point charge per station
148 std::vector<TH1F*> fvPadsTotalR; // number of pads vs R, per station
149 std::vector<TH1F*> fvPadsFiredR; // fired pads vs R, per station
150 std::vector<TH1F*> fvPadOccupancyR; // pad occupancy vs R, per station
151
152 // output canvaces with histogramm collections
162
163 TF1* fFitEl = nullptr;
164 TF1* fFitPi = nullptr;
165 TF1* fFitPr = nullptr;
166
167 Int_t fnPadSizesX = 0;
168 Int_t fnPadSizesY = 0;
169
170 Double_t fPadMinLx = 0.;
171 Double_t fPadMinLy = 0.;
172 Double_t fPadMaxLx = 0.;
173 Double_t fPadMaxLy = 0.;
174
175 ClassDef(CbmMuchDigitizerQa, 0)
176};
177
178#endif
CbmDigiManager.
Access to a MC data branch for time-based analysis.
Task class creating and managing CbmMCDataArray objects.
virtual void SetParContainers()
CbmTimeSlice * fTimeSlice
TH1F * fhTrackChargeLog
MC point charge.
std::vector< TH1F * > fvUsPadsFiredR
number of processed events
CbmQaCanvas * fCanvStationCharge
CbmMuchDigitizerQa & operator=(const CbmMuchDigitizerQa &)
CbmQaCanvas * fCanvChargeVsEnergy
CbmMuchDigitizerQa(const CbmMuchDigitizerQa &)
static Double_t LandauMPV(Double_t *x, Double_t *par)
CbmMCDataManager * fMcManager
const CbmMuchPad * GetPad(UInt_t address) const
get pad from the digi address
std::vector< TH2F * > fvUsPadsFiredXY
FairRootManager * fManager
folder wich contains histogramms
CbmQaCanvas * fCanvPadOccupancyR
CbmQaCanvas * fCanvPadsTotalR
virtual void Exec(Option_t *option)
std::vector< TH1F * > fvPadsFiredR
CbmMuchGeoScheme * fGeoScheme
CbmMuchPointInfo & getPointInfo(const CbmLink &link)
map point link -> point info
CbmMuchDigitizerQa(const char *name="MuchHitFinderQa", Int_t verbose=1)
TParameter< int > fNevents
output folder with histos and canvases
CbmQaCanvas * fCanvChargeVsLength
CbmQaCanvas * fCanvNpadsVsArea
CbmQaCanvas * fCanvTrackLength
CbmMCDataArray * fMCTracks
TH1F * fhTrackLength
MC point charge for selected protons.
CbmDigiManager * fDigiManager
std::vector< TH1F * > fvPadOccupancyR
static Double_t MPV_n_e(Double_t Tkin, Double_t mass)
std::map< CbmLink, CbmMuchPointInfo > fMcPointInfoMap
CbmMCDataArray * fPoints
TH1F * fhTrackChargePr_1GeV_3mm
MC point charge log scale.
CbmQaCanvas * fCanvUsPadsFiredXY
virtual InitStatus Init()
TClonesArray * fDigiMatches
std::vector< TH1F * > fvPadsTotalR
std::vector< TH1F * > fvTrackCharge
Bookkeeping of time-slice content.