12 #include <FairLogger.h>
23 #include <TPaveText.h>
24 #include <TPolyLine.h>
41 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
42 fColors.push_back(TColor::GetColorPalette(
i));
47 TMath::Log10(
max) / TColor::GetNumberOfColors()
51 min + (
max / TColor::GetNumberOfColors() *
i));
60 if (j >= (Int_t)
fZLevel.size())
73 const Int_t nCoordinates = 4;
74 Double_t
x[nCoordinates];
75 Double_t
y[nCoordinates];
95 TPolyLine* pad =
new TPolyLine(nCoordinates,
x,
y);
108 const Int_t nCoordinates = 5;
109 Double_t
x[nCoordinates];
110 Double_t
y[nCoordinates];
121 TPolyLine* pad =
new TPolyLine(nCoordinates,
x,
y);
122 pad->SetLineColor(1);
136 h->SetMarkerStyle(mStyle);
137 h->SetMarkerSize(mSize);
138 h->SetMarkerColor(color);
139 h->SetLineColor(color);
140 h->GetXaxis()->SetLabelSize(0.03);
141 h->GetYaxis()->SetLabelSize(0.03);
143 h->GetXaxis()->SetTitleSize(0.035);
144 h->GetXaxis()->SetTitleOffset(1.25);
145 h->GetYaxis()->SetTitleSize(0.035);
146 h->GetYaxis()->SetTitleOffset(1.25);
149 h->SetXTitle(xTitle);
150 h->SetYTitle(yTitle);
161 h->SetMarkerStyle(mStyle);
162 h->SetMarkerSize(mSize);
163 h->SetMarkerColor(color);
164 h->SetLineColor(color);
165 h->GetXaxis()->SetLabelSize(0.03);
166 h->GetYaxis()->SetLabelSize(0.03);
167 h->GetZaxis()->SetLabelSize(0.03);
168 h->GetXaxis()->SetTitleSize(0.035);
169 h->GetXaxis()->SetTitleOffset(1.5);
170 h->GetYaxis()->SetTitleSize(0.035);
171 h->GetYaxis()->SetTitleOffset(1.5);
172 h->GetZaxis()->SetTitleSize(0.035);
173 h->GetZaxis()->SetTitleOffset(1.25);
174 h->SetXTitle(xTitle);
175 h->SetYTitle(yTitle);
176 h->SetZTitle(zTitle);
187 h->SetMarkerStyle(mStyle);
188 h->SetMarkerSize(mSize);
189 h->SetMarkerColor(color);
190 h->SetLineColor(color);
191 h->GetXaxis()->SetLabelSize(0.03);
192 h->GetYaxis()->SetLabelSize(0.03);
193 h->GetZaxis()->SetLabelSize(0.03);
194 h->GetXaxis()->SetTitleSize(0.035);
195 h->GetXaxis()->SetTitleOffset(1.25);
196 h->GetYaxis()->SetTitleSize(0.035);
197 h->GetYaxis()->SetTitleOffset(1.25);
198 h->GetZaxis()->SetTitleSize(0.035);
199 h->GetZaxis()->SetTitleOffset(1.25);
200 h->SetXTitle(xTitle);
201 h->SetYTitle(yTitle);
202 h->SetZTitle(zTitle);
212 h->SetMarkerStyle(mStyle);
213 h->SetMarkerSize(mSize);
214 h->SetMarkerColor(color);
215 h->SetLineColor(color);
216 h->GetXaxis()->SetLabelSize(0.03);
217 h->GetYaxis()->SetLabelSize(0.03);
219 h->GetXaxis()->SetTitleSize(0.035);
220 h->GetXaxis()->SetTitleOffset(1.25);
221 h->GetYaxis()->SetTitleSize(0.035);
222 h->GetYaxis()->SetTitleOffset(1.25);
225 h->SetXTitle(xTitle);
226 h->SetYTitle(yTitle);
233 l->SetTextSize(0.03);
237 if (PdgCode == 22)
return 1;
238 if (PdgCode == -11)
return 2;
239 if (PdgCode == 11)
return 3;
240 if (PdgCode == 12 || PdgCode == 14 || PdgCode == 16)
return 4;
241 if (PdgCode == -13)
return 5;
242 if (PdgCode == 13)
return 6;
243 if (PdgCode == 111)
return 7;
244 if (PdgCode == 211)
return 8;
245 if (PdgCode == -211)
return 9;
246 if (PdgCode == 130)
return 10;
247 if (PdgCode == 321)
return 11;
248 if (PdgCode == -321)
return 12;
249 if (PdgCode == 2112)
return 13;
250 if (PdgCode == 2212)
return 14;
251 if (PdgCode == -2212)
return 15;
252 if (PdgCode == 310)
return 16;
253 if (PdgCode == 221)
return 17;
254 if (PdgCode == 3122)
return 18;
255 if (PdgCode == 3222)
return 19;
256 if (PdgCode == 3212)
return 20;
257 if (PdgCode == 3112)
return 21;
258 if (PdgCode == 3322)
return 22;
259 if (PdgCode == 3312)
return 23;
260 if (PdgCode == 3332)
return 24;
261 if (PdgCode == -2112)
return 25;
262 if (PdgCode == -3122)
return 26;
263 if (PdgCode == -3112)
return 27;
264 if (PdgCode == -3212)
return 28;
265 if (PdgCode == -3322)
return 30;
266 if (PdgCode == -3312)
return 31;
267 if (PdgCode == -3332)
return 32;
268 if (PdgCode == -15)
return 33;
269 if (PdgCode == 15)
return 34;
270 if (PdgCode == 411)
return 35;
271 if (PdgCode == -411)
return 36;
272 if (PdgCode == 421)
return 37;
273 if (PdgCode == -412)
return 38;
274 if (PdgCode == 431)
return 39;
275 if (PdgCode == -431)
return 40;
276 if (PdgCode == 4122)
return 41;
277 if (PdgCode == 24)
return 42;
278 if (PdgCode == -24)
return 43;
279 if (PdgCode == 23)
return 44;
280 if (PdgCode == 50000050)
return 45;
281 if (PdgCode == 1000010020)
return 46;
282 if (PdgCode == 1000010030)
return 47;
283 if (PdgCode == 1000020040)
return 48;
286 LOG(info) << PdgCode;
292 if (
int(
i * 100 /
float(n)) -
int((
i - 1) * 100 /
float(n)) >= 1) {
293 if (
int(
i * 100 /
float(n)) == 1 ||
i == 1 ||
i == 0) cout <<
"[" << flush;
294 cout <<
"-" << flush;
295 if (
int(
i * 10 /
float(n)) -
int((
i - 1) * 10 /
float(n)) >= 1) cout <<
"|";
296 if (
int(
i * 100 /
float(n)) >= 99) cout <<
"]" << endl;
311 else if (nRows == 24)
313 else if (nRows == 12)
316 else if (nRows == 32)
318 else if (nRows == 16)
324 }
else if (nCols == 112)
328 else if (nRows == 18)
330 else if (nRows == 12)
334 }
else if (nCols == 128)
338 else if (nRows == 16)
340 else if (nRows == 12)
346 }
else if (nCols == 144)
350 else if (nRows == 16)
356 }
else if (nCols == 160)
360 else if (nRows == 24)
362 else if (nRows == 12)
370 "ERROR::CbmTrdUtils:GetModuleType: nRows:%2i nCols:%3i\n", nRows, nCols);
380 const TString zAxisTitle,
383 const Bool_t logScale) {
384 TString title(
""), name(
"");
386 TPaveText* text =
nullptr;
387 std::map<Int_t, TH1*>::iterator MapIt;
389 TH2I* fLayerDummy =
new TH2I(
"LayerDummy",
"", 1, -600, 600, 1, -500, 500);
390 fLayerDummy->SetXTitle(
"x-coordinate [cm]");
391 fLayerDummy->SetYTitle(
"y-coordinate [cm]");
392 fLayerDummy->GetXaxis()->SetLabelSize(0.02);
393 fLayerDummy->GetYaxis()->SetLabelSize(0.02);
394 fLayerDummy->GetZaxis()->SetLabelSize(0.02);
395 fLayerDummy->GetXaxis()->SetTitleSize(0.02);
396 fLayerDummy->GetXaxis()->SetTitleOffset(1.5);
397 fLayerDummy->GetYaxis()->SetTitleSize(0.02);
398 fLayerDummy->GetYaxis()->SetTitleOffset(2);
399 fLayerDummy->GetZaxis()->SetTitleSize(0.02);
400 fLayerDummy->GetZaxis()->SetTitleOffset(-2);
401 fLayerDummy->SetStats(kFALSE);
402 fLayerDummy->SetContour(99);
403 fLayerDummy->Fill(0., 0., 0.);
404 std::map<Int_t, TCanvas*> fLayerMap;
405 std::map<Int_t, TCanvas*>::iterator fLayerMapIt;
412 for (MapIt = Map.begin(); MapIt != Map.end(); MapIt++) {
413 Double_t value = MapIt->second->GetMean(1);
414 Double_t valueE = MapIt->second->GetRMS(1);
420 Int_t combiId = 10 * Station + Layer;
421 if (fLayerMap.find(combiId) == fLayerMap.end()) {
422 title.Form(
"Station%i_Layer%i", Station, Layer);
423 fLayerMap[combiId] =
new TCanvas(title, title, 1200, 1000);
424 fLayerDummy->SetZTitle(zAxisTitle);
425 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
426 fLayerDummy->Draw(
"colz");
428 fLayerMap[combiId]->cd();
437 text->SetFillStyle(1001);
438 text->SetLineColor(1);
442 if (
GetColorCode(value) < 65) text->SetTextColor(kWhite);
443 title.Form(
"%.1f#pm%.1f", value, valueE);
444 text->AddText(title);
447 for (fLayerMapIt = fLayerMap.begin(); fLayerMapIt != fLayerMap.end();
450 title.Form(
"pics/TrdQa%s_S%i_L%i_%s.pdf",
452 fLayerMapIt->first / 10,
453 fLayerMapIt->first - (fLayerMapIt->first / 10) * 10,
455 fLayerMapIt->second->SaveAs(title);
456 title.ReplaceAll(
"pdf",
"png");
457 fLayerMapIt->second->SaveAs(title);
459 for (MapIt = Map.begin(); MapIt != Map.end(); MapIt++) {