BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnGemDigitizerQAHistograms.cxx
Go to the documentation of this file.
1
#include "
BmnGemDigitizerQAHistograms.h
"
2
3
#include "
BmnManageQA.h
"
4
5
BmnGemDigitizerQAHistograms::BmnGemDigitizerQAHistograms
()
6
:
_hX_local
(0)
7
,
_hY_local
(0)
8
,
_hZ_local
(0)
9
,
_hXY_local
(0)
10
,
_hYZ_local
(0)
11
,
_hXZ_local
(0)
12
,
_hADCX
(0)
13
,
_hADCY
(0)
14
,
_hDigiX
(0)
15
,
_hDigiY
(0)
16
,
_hDigiAdcX
(0)
17
,
_hDigiAdcY
(0)
18
//_hRZ_global(0), _hYZ_local(0),
19
//_hSect_dig(0), _hADC_dig(0),
20
//_hX_dig(0), _hY_dig(0), _hZ_dig(0),
21
//_h3D_dig(0), _h3D_el(0),
22
//_hDiffuseXY(0), _hDistortXY(0),
23
//_hX_global(0), _hY_global(0), _hZ_global(0), _hXY_global(0),
24
//_hX_local(0), _hY_local(0), _hZ_local(0), _hXY_local(0),
25
//_hXT_dig_1(0), _hXT_dig_20(0), _hXT_dig_5(0), _hXT_dig_10(0), _hXT_dig_40(0), _hXT_dig_60(0)
26
{
27
geo
=
new
BmnGemGeo
();
28
for
(
Int_t
i
= 0;
i
<
geo
->GetNumOfStations();
i
++) {
29
X
[
i
] = NULL;
30
Y
[
i
] = NULL;
31
XY
[
i
] = NULL;
32
ADCX
[
i
] = NULL;
33
ADCY
[
i
] = NULL;
34
}
35
}
36
37
BmnGemDigitizerQAHistograms::BmnGemDigitizerQAHistograms
(
const
std::string& suffix)
38
:
_hX_local
(0)
39
,
_hY_local
(0)
40
,
_hZ_local
(0)
41
,
_hXY_local
(0)
42
,
_hYZ_local
(0)
43
,
_hXZ_local
(0)
44
,
_hADCX
(0)
45
,
_hADCY
(0)
46
,
_hDigiX
(0)
47
,
_hDigiY
(0)
48
,
_hDigiAdcX
(0)
49
,
_hDigiAdcY
(0)
50
//_hRZ_global(0), _hYZ_local(0),
51
//_hSect_dig(0), _hADC_dig(0),
52
//_hX_dig(0), _hY_dig(0), _hZ_dig(0),
53
//_h3D_dig(0),
54
//_hDiffuseXY(0), _hDistortXY(0),
55
//_hX_global(0), _hY_global(0), _hZ_global(0), _hXY_global(0),
56
//_hX_local(0), _hY_local(0), _hZ_local(0), _hXY_local(0),
57
//_hXT_dig_1(0), _hXT_dig_20(0), _hXT_dig_5(0), _hXT_dig_10(0), _hXT_dig_40(0), _hXT_dig_60(0)
58
{
59
geo
=
new
BmnGemGeo
();
60
for
(
Int_t
i
= 0;
i
<
geo
->GetNumOfStations();
i
++) {
61
X
[
i
] = NULL;
62
Y
[
i
] = NULL;
63
XY
[
i
] = NULL;
64
ADCX
[
i
] = NULL;
65
ADCY
[
i
] = NULL;
66
DIGIX
[
i
] = NULL;
67
DIGIADCX
[
i
] = NULL;
68
}
69
}
70
71
BmnGemDigitizerQAHistograms::~BmnGemDigitizerQAHistograms
()
72
{
73
delete
_hYZ_local
;
74
delete
_hX_local
;
75
delete
_hY_local
;
76
delete
_hZ_local
;
77
delete
_hXY_local
;
78
delete
_hXZ_local
;
79
delete
_hADCX
;
80
delete
_hADCY
;
81
delete
_hDigiX
;
82
delete
_hDigiY
;
83
delete
_hDigiAdcX
;
84
delete
_hDigiAdcY
;
85
86
for
(
Int_t
i
= 0;
i
<
geo
->GetNumOfStations();
i
++) {
87
delete
X
[
i
];
88
delete
Y
[
i
];
89
delete
XY
[
i
];
90
delete
ADCX
[
i
];
91
delete
ADCY
[
i
];
92
delete
DIGIX
[
i
];
93
delete
DIGIY
[
i
];
94
delete
DIGIADCX
[
i
];
95
delete
DIGIADCY
[
i
];
96
}
97
delete
geo
;
98
}
99
100
void
BmnGemDigitizerQAHistograms::Initialize
()
101
{
102
Float_t
Xmin =
geo
->GetX0();
103
Float_t
Ymin =
geo
->GetY0();
104
Float_t
Zmin =
geo
->GetZ0();
105
Float_t
Zmax = Zmin +
geo
->GetDistAlongZ() *
geo
->GetNumOfStations();
106
107
// UInt_t nTimeBin = 512;
108
// TpcSector* sector = new TpcSector();
109
// UInt_t nSectors = sector->GetNSectors();
110
// UInt_t nRows = sector->GetNumRows();
111
//// UInt_t nInRows = sector->GetNumInnerRows();
112
// UInt_t nPads = sector->GetNumPadsInRow(nRows - 1) * 2;
113
// Float_t zMax = sector->GetLength();
114
// Float_t maxX = sector->GetMaxX();
115
// Float_t maxY = sector->GetSectHeight() + 1.0;
116
// Float_t Rmax = sector->GetRmin() + sector->GetSectHeight();
117
//
118
// _h3D_el = CreateHistogram3("3D distribution of electrons in TPC", "X (cm)", "Y (cm)", "Z (cm)", 200, -150,
119
// 150, 200, -150, 150, 200, -zMax, zMax);
120
121
const
Int_t
dim
= 500;
122
123
_hX_local
=
124
CreateHistogram1
(
"local X distribution of electrons in all GEM-stations"
,
_suffix
,
"X, cm"
, 100, Xmin, -Xmin);
125
_hY_local
=
126
CreateHistogram1
(
"local Y distribution of electrons in all GEM-stations"
,
_suffix
,
"Y, cm"
, 100, Ymin, -Ymin);
127
_hZ_local
=
128
CreateHistogram1
(
"local Z distribution of electrons in all GEM-stations"
,
_suffix
,
"Z, cm"
, 100, Zmin, Zmax);
129
130
Char_t
buffX[
dim
] =
" "
, buffY[
dim
] =
" "
, buffZ[
dim
] =
" "
;
131
132
for
(
Int_t
i
= 0;
i
<
geo
->GetNumOfStations();
i
++) {
133
134
sprintf(buffX,
"local X distribution of electrons in GEM%d"
,
i
);
135
sprintf(buffY,
"local Y distribution of electrons in GEM%d"
,
i
);
136
137
X
[
i
] =
CreateHistogram1
(buffX,
_suffix
,
"X, cm"
, 100, Xmin, -Xmin);
138
Y
[
i
] =
CreateHistogram1
(buffY,
_suffix
,
"Y, cm"
, 100, Ymin, -Ymin);
139
}
140
141
_hXY_local
=
CreateHistogram2
(
"local XY distribution of electrons in all GEM-stations"
,
_suffix
,
"X, cm"
,
"Y, cm"
,
142
500, Xmin, -Xmin, 500, Ymin, -Ymin);
143
_hYZ_local
=
CreateHistogram2
(
"local YZ distribution of electrons in all GEM-stations"
,
_suffix
,
"Y, cm"
,
"Z, cm"
,
144
500, Ymin, -Ymin, 500, Zmin, Zmax);
145
_hXZ_local
=
CreateHistogram2
(
"local XZ distribution of electrons in all GEM-stations"
,
_suffix
,
"X, cm"
,
"Z, cm"
,
146
500, Xmin, -Xmin, 500, Zmin, Zmax);
147
148
for
(
Int_t
i
= 0;
i
<
geo
->GetNumOfStations();
i
++) {
149
150
sprintf(buffX,
"local XY distribution of electrons in GEM%d"
,
i
);
151
sprintf(buffY,
"local YZ distribution of electrons in GEM%d"
,
i
);
152
sprintf(buffZ,
"local XZ distribution of electrons in GEM%d"
,
i
);
153
154
XY
[
i
] =
CreateHistogram2
(buffX,
_suffix
,
"X, cm"
,
"Y, cm"
, 500, Xmin, -Xmin, 500, Ymin, -Ymin);
155
}
156
157
_hADCX
=
CreateHistogram1
(
"X_ADC distribution in all GEM-stations"
,
_suffix
,
"ADC, x-strips"
, 100, 0., 10000.);
158
_hADCY
=
CreateHistogram1
(
"Y_ADC distribution in all GEM-stations"
,
_suffix
,
"ADC, y-strips"
, 100, 0., 10000.);
159
160
for
(
Int_t
i
= 0;
i
<
geo
->GetNumOfStations();
i
++) {
161
162
sprintf(buffX,
"X_ADC distribution in GEM%d"
,
i
);
163
sprintf(buffY,
"Y_ADC distribution in GEM%d"
,
i
);
164
165
ADCX
[
i
] =
CreateHistogram1
(buffX,
_suffix
,
"ADC, x-strips"
, 100, 0., 10000.);
166
ADCY
[
i
] =
CreateHistogram1
(buffY,
_suffix
,
"ADC, y-strips"
, 100, 0., 10000.);
167
}
168
169
_hDigiX
=
CreateHistogram1
(
"X_DIGIT distribution in all GEM-stations"
,
_suffix
,
"DIGITS, x-strips"
, 100, 0., 2000.);
170
_hDigiY
=
CreateHistogram1
(
"Y_DIGIT distribution in all GEM-stations"
,
_suffix
,
"DIGITS, y-strips"
, 100, 0., 2000.);
171
172
for
(
Int_t
i
= 0;
i
<
geo
->GetNumOfStations();
i
++) {
173
174
sprintf(buffX,
"X_DIGIT distribution in GEM%d"
,
i
);
175
sprintf(buffY,
"Y_DIGIT distribution in GEM%d"
,
i
);
176
177
DIGIX
[
i
] =
CreateHistogram1
(buffX,
_suffix
,
"DIGITS, x-strips"
, 100, 0., 2000.);
178
DIGIY
[
i
] =
CreateHistogram1
(buffY,
_suffix
,
"DIGITS, y-strips"
, 100, 0., 2000.);
179
}
180
181
_hDigiAdcX
=
CreateHistogram1
(
"X_DIGIT distribution weighted to ADC in all GEM-stations"
,
_suffix
,
182
"DIGITS, x-strips"
, 100, 0., 2000.);
183
_hDigiAdcY
=
CreateHistogram1
(
"Y_DIGIT distribution weighted to ADC in all GEM-stations"
,
_suffix
,
184
"DIGITS, y-strips"
, 100, 0., 2000.);
185
186
for
(
Int_t
i
= 0;
i
<
geo
->GetNumOfStations();
i
++) {
187
188
sprintf(buffX,
"X_DIGIT weighted to ADC distribution in GEM%d"
,
i
);
189
sprintf(buffY,
"Y_DIGIT weighted to ADC distribution in GEM%d"
,
i
);
190
191
DIGIADCX
[
i
] =
CreateHistogram1
(buffX,
_suffix
,
"DIGITS weighted to ADC, x-strips"
, 100, 0., 2000.);
192
DIGIADCY
[
i
] =
CreateHistogram1
(buffY,
_suffix
,
"DIGITS weighted to ADC, y-strips"
, 100, 0., 2000.);
193
}
194
//
195
// _hX_global = CreateHistogram1("global X distribution of electrons in TPC", _suffix, "X, cm", 200, -150, 150);
196
// _hY_global = CreateHistogram1("global Y distribution of electrons in TPC", _suffix, "Y, cm", 200, -150, 150);
197
// _hZ_global = CreateHistogram1("global Z distribution of electrons in TPC", _suffix, "Z, cm", 200, -zMax,
198
// zMax); _hXY_global = CreateHistogram2("global XY distribution of electrons in TPC", _suffix, "X, cm", "Y, cm",
199
// 800, -150, 150, 800, -150, 150); _hRZ_global = CreateHistogram2("global ZR distribution of electrons in TPC",
200
// _suffix, "Z, cm", "R, cm", 800, -zMax, zMax, 800, -Rmax, Rmax);
201
//
202
// _hSect_dig = CreateHistogram1("Sector distribution of TPC digits", _suffix, "number of sector", nSectors, 0,
203
// nSectors); _hADC_dig = CreateHistogram1("Charge distribution of TPC digits", _suffix, "charge", 200, 900,
204
// 2000000); _hX_dig = CreateHistogram1("X distribution of TPC digits", _suffix, "X, pads", nPads, 0, nPads);
205
// _hY_dig = CreateHistogram1("Y distribution of TPC digits", _suffix, "Y, pad rows", nRows, 0, nRows);
206
// _hZ_dig = CreateHistogram1("Z distribution of TPC digits", _suffix, "Z, time bins", nTimeBin, 0, nTimeBin);
207
// _hXY_dig = CreateHistogram2("XY distribution of TPC digits", _suffix, "X, pads", "Y, pad rows", nPads, 0,
208
// nPads, nRows, 0, nRows); _h3D_dig = CreateHistogram3("XYZ distribution of TPC digits", _suffix, "X, pads", "Y,
209
// pad rows", "Z, time bins", nPads, 0, nPads, nRows, 0, nRows, nTimeBin, 0, nTimeBin); _hDiffuseXY =
210
// CreateHistogram2("XY diffuse of electrons", _suffix, "X (cm)", "Y (cm)", 400, -2.0, 2.0, 400, -2.0, 2.0);
211
// _hDistortXY = CreateHistogram2("XY distortion of electrons", _suffix, "X (cm)", "Y (cm)", 400, -2.0, 2.0, 400,
212
// -2.0, 2.0);
213
//
214
// _hXT_dig_1 = CreateHistogram2("XT distribution of TPC digits on PadRow #1", _suffix, "X, pads", "T, time
215
// bins", nPads, 0, nPads, nTimeBin, 0, nTimeBin); _hXT_dig_5 = CreateHistogram2("XT distribution of TPC digits
216
// on PadRow #5", _suffix, "X, pads", "T, time bins", nPads, 0, nPads, nTimeBin, 0, nTimeBin); _hXT_dig_10 =
217
// CreateHistogram2("XT distribution of TPC digits on PadRow #10", _suffix, "X, pads", "T, time bins", nPads, 0,
218
// nPads, nTimeBin, 0, nTimeBin); _hXT_dig_20 = CreateHistogram2("XT distribution of TPC digits on PadRow #20",
219
// _suffix, "X, pads", "T, time bins", nPads, 0, nPads, nTimeBin, 0, nTimeBin); _hXT_dig_40 =
220
// CreateHistogram2("XT distribution of TPC digits on PadRow #40", _suffix, "X, pads", "T, time bins", nPads, 0,
221
// nPads, nTimeBin, 0, nTimeBin); _hXT_dig_60 = CreateHistogram2("XT distribution of TPC digits on PadRow #60",
222
// _suffix, "X, pads", "T, time bins", nPads, 0, nPads, nTimeBin, 0, nTimeBin);
223
}
224
225
void
BmnGemDigitizerQAHistograms::Write
()
226
{
227
228
_hYZ_local
->Write(0,
kOverwrite
);
229
_hX_local
->Write(0,
kOverwrite
);
230
_hY_local
->Write(0,
kOverwrite
);
231
_hZ_local
->Write(0,
kOverwrite
);
232
_hXY_local
->Write(0,
kOverwrite
);
233
_hXZ_local
->Write(0,
kOverwrite
);
234
_hADCX
->Write(0,
kOverwrite
);
235
_hADCY
->Write(0,
kOverwrite
);
236
_hDigiX
->Write(0,
kOverwrite
);
237
_hDigiY
->Write(0,
kOverwrite
);
238
_hDigiAdcX
->Write(0,
kOverwrite
);
239
_hDigiAdcY
->Write(0,
kOverwrite
);
240
241
for
(
Int_t
i
= 0;
i
<
geo
->GetNumOfStations();
i
++) {
242
X
[
i
]->Write(0,
kOverwrite
);
243
Y
[
i
]->Write(0,
kOverwrite
);
244
XY
[
i
]->Write(0,
kOverwrite
);
245
ADCX
[
i
]->Write(0,
kOverwrite
);
246
ADCY
[
i
]->Write(0,
kOverwrite
);
247
DIGIX
[
i
]->Write(0,
kOverwrite
);
248
DIGIY
[
i
]->Write(0,
kOverwrite
);
249
DIGIADCX
[
i
]->Write(0,
kOverwrite
);
250
DIGIADCY
[
i
]->Write(0,
kOverwrite
);
251
}
252
}
CreateHistogram2
TH2F * CreateHistogram2(const char *name, const char *xtitle, const char *ytitle, int nbinx, Float_t firstBinX, Float_t lastBinX, int nbiny, Float_t firstBinY, Float_t lastBinY)
Definition
BmnManageQA.cxx:16
CreateHistogram1
TH1F * CreateHistogram1(const char *name, const char *xtitle, int nbin, Float_t firstBin, Float_t lastBin)
Definition
BmnManageQA.cxx:9
i
int i
Definition
P4_F32vec4.h:22
Int_t
int Int_t
Char_t
char Char_t
Float_t
float Float_t
BmnGemDigitizerQAHistograms::BmnGemDigitizerQAHistograms
BmnGemDigitizerQAHistograms()
Definition
BmnGemDigitizerQAHistograms.cxx:5
BmnGemDigitizerQAHistograms::DIGIY
TH1F * DIGIY[8]
Definition
BmnGemDigitizerQAHistograms.h:95
BmnGemDigitizerQAHistograms::_hYZ_local
TH2F * _hYZ_local
Definition
BmnGemDigitizerQAHistograms.h:67
BmnGemDigitizerQAHistograms::_hDigiX
TH1F * _hDigiX
Definition
BmnGemDigitizerQAHistograms.h:86
BmnGemDigitizerQAHistograms::DIGIADCY
TH1F * DIGIADCY[8]
Definition
BmnGemDigitizerQAHistograms.h:107
BmnGemDigitizerQAHistograms::_hADCY
TH1F * _hADCY
Definition
BmnGemDigitizerQAHistograms.h:77
BmnGemDigitizerQAHistograms::_hY_local
TH1F * _hY_local
Definition
BmnGemDigitizerQAHistograms.h:56
BmnGemDigitizerQAHistograms::DIGIADCX
TH1F * DIGIADCX[8]
Definition
BmnGemDigitizerQAHistograms.h:104
BmnGemDigitizerQAHistograms::Write
void Write()
Definition
BmnGemDigitizerQAHistograms.cxx:225
BmnGemDigitizerQAHistograms::_hX_local
TH1F * _hX_local
Definition
BmnGemDigitizerQAHistograms.h:55
BmnGemDigitizerQAHistograms::X
TH1F * X[8]
Definition
BmnGemDigitizerQAHistograms.h:60
BmnGemDigitizerQAHistograms::_hDigiY
TH1F * _hDigiY
Definition
BmnGemDigitizerQAHistograms.h:89
BmnGemDigitizerQAHistograms::DIGIX
TH1F * DIGIX[8]
Definition
BmnGemDigitizerQAHistograms.h:92
BmnGemDigitizerQAHistograms::_hXY_local
TH2F * _hXY_local
Definition
BmnGemDigitizerQAHistograms.h:66
BmnGemDigitizerQAHistograms::_hXZ_local
TH2F * _hXZ_local
Definition
BmnGemDigitizerQAHistograms.h:68
BmnGemDigitizerQAHistograms::ADCX
TH1F * ADCX[8]
Definition
BmnGemDigitizerQAHistograms.h:80
BmnGemDigitizerQAHistograms::~BmnGemDigitizerQAHistograms
~BmnGemDigitizerQAHistograms()
Definition
BmnGemDigitizerQAHistograms.cxx:71
BmnGemDigitizerQAHistograms::_hADCX
TH1F * _hADCX
Definition
BmnGemDigitizerQAHistograms.h:74
BmnGemDigitizerQAHistograms::_suffix
std::string _suffix
Definition
BmnGemDigitizerQAHistograms.h:14
BmnGemDigitizerQAHistograms::ADCY
TH1F * ADCY[8]
Definition
BmnGemDigitizerQAHistograms.h:83
BmnGemDigitizerQAHistograms::_hZ_local
TH1F * _hZ_local
Definition
BmnGemDigitizerQAHistograms.h:57
BmnGemDigitizerQAHistograms::Initialize
void Initialize()
Definition
BmnGemDigitizerQAHistograms.cxx:100
BmnGemDigitizerQAHistograms::_hDigiAdcX
TH1F * _hDigiAdcX
Definition
BmnGemDigitizerQAHistograms.h:98
BmnGemDigitizerQAHistograms::_hDigiAdcY
TH1F * _hDigiAdcY
Definition
BmnGemDigitizerQAHistograms.h:101
BmnGemDigitizerQAHistograms::geo
BmnGemGeo * geo
Definition
BmnGemDigitizerQAHistograms.h:15
BmnGemDigitizerQAHistograms::XY
TH2F * XY[8]
Definition
BmnGemDigitizerQAHistograms.h:71
BmnGemDigitizerQAHistograms::Y
TH1F * Y[8]
Definition
BmnGemDigitizerQAHistograms.h:63
BmnGemGeo
Definition
BmnGemGeo.h:12
TObject::kOverwrite
kOverwrite
BmnGemDigitizerQAHistograms.h
BmnManageQA.h
dim
const UInt_t dim
Definition
MpdVHLLEGenerator.h:22
detectors
gem
BmnGemDigitizerQAHistograms.cxx
Generated on
for BmnRoot by
1.17.0