47 for (Int_t i = 0; i < TColor::GetNumberOfColors(); i++) {
48 fColors.push_back(TColor::GetColorPalette(i));
50 fZLevel.push_back(min + TMath::Power(10,
51 TMath::Log10(max) / TColor::GetNumberOfColors() * i));
53 fZLevel.push_back(min + (max / TColor::GetNumberOfColors() * i));
69 Double_t max_range, Bool_t logScale)
72 const Int_t nCoordinates = 4;
73 Double_t
x[nCoordinates];
74 Double_t
y[nCoordinates];
95 TPolyLine* pad =
new TPolyLine(nCoordinates,
x,
y);
129 h->SetMarkerStyle(mStyle);
130 h->SetMarkerSize(mSize);
131 h->SetMarkerColor(color);
132 h->SetLineColor(color);
133 h->GetXaxis()->SetLabelSize(0.03);
134 h->GetYaxis()->SetLabelSize(0.03);
136 h->GetXaxis()->SetTitleSize(0.035);
137 h->GetXaxis()->SetTitleOffset(1.25);
138 h->GetYaxis()->SetTitleSize(0.035);
139 h->GetYaxis()->SetTitleOffset(1.25);
142 h->SetXTitle(xTitle);
143 h->SetYTitle(yTitle);
150 h->SetMarkerStyle(mStyle);
151 h->SetMarkerSize(mSize);
152 h->SetMarkerColor(color);
153 h->SetLineColor(color);
154 h->GetXaxis()->SetLabelSize(0.03);
155 h->GetYaxis()->SetLabelSize(0.03);
156 h->GetZaxis()->SetLabelSize(0.03);
157 h->GetXaxis()->SetTitleSize(0.035);
158 h->GetXaxis()->SetTitleOffset(1.5);
159 h->GetYaxis()->SetTitleSize(0.035);
160 h->GetYaxis()->SetTitleOffset(1.5);
161 h->GetZaxis()->SetTitleSize(0.035);
162 h->GetZaxis()->SetTitleOffset(1.25);
163 h->SetXTitle(xTitle);
164 h->SetYTitle(yTitle);
165 h->SetZTitle(zTitle);
172 h->SetMarkerStyle(mStyle);
173 h->SetMarkerSize(mSize);
174 h->SetMarkerColor(color);
175 h->SetLineColor(color);
176 h->GetXaxis()->SetLabelSize(0.03);
177 h->GetYaxis()->SetLabelSize(0.03);
178 h->GetZaxis()->SetLabelSize(0.03);
179 h->GetXaxis()->SetTitleSize(0.035);
180 h->GetXaxis()->SetTitleOffset(1.25);
181 h->GetYaxis()->SetTitleSize(0.035);
182 h->GetYaxis()->SetTitleOffset(1.25);
183 h->GetZaxis()->SetTitleSize(0.035);
184 h->GetZaxis()->SetTitleOffset(1.25);
185 h->SetXTitle(xTitle);
186 h->SetYTitle(yTitle);
187 h->SetZTitle(zTitle);
193 h->SetMarkerStyle(mStyle);
194 h->SetMarkerSize(mSize);
195 h->SetMarkerColor(color);
196 h->SetLineColor(color);
197 h->GetXaxis()->SetLabelSize(0.03);
198 h->GetYaxis()->SetLabelSize(0.03);
200 h->GetXaxis()->SetTitleSize(0.035);
201 h->GetXaxis()->SetTitleOffset(1.25);
202 h->GetYaxis()->SetTitleSize(0.035);
203 h->GetYaxis()->SetTitleOffset(1.25);
206 h->SetXTitle(xTitle);
207 h->SetYTitle(yTitle);
357 const TString zAxisTitle,
const Double_t fmax,
const Double_t fmin,
358 const Bool_t logScale)
360 TString title(
""), name(
"");
362 TPaveText* text =
nullptr;
363 std::map<Int_t, TH1*>::iterator MapIt;
365 TH2I* fLayerDummy =
new TH2I(
"LayerDummy",
"", 1, -600, 600, 1, -500, 500);
366 fLayerDummy->SetXTitle(
"x-coordinate [cm]");
367 fLayerDummy->SetYTitle(
"y-coordinate [cm]");
368 fLayerDummy->GetXaxis()->SetLabelSize(0.02);
369 fLayerDummy->GetYaxis()->SetLabelSize(0.02);
370 fLayerDummy->GetZaxis()->SetLabelSize(0.02);
371 fLayerDummy->GetXaxis()->SetTitleSize(0.02);
372 fLayerDummy->GetXaxis()->SetTitleOffset(1.5);
373 fLayerDummy->GetYaxis()->SetTitleSize(0.02);
374 fLayerDummy->GetYaxis()->SetTitleOffset(2);
375 fLayerDummy->GetZaxis()->SetTitleSize(0.02);
376 fLayerDummy->GetZaxis()->SetTitleOffset(-2);
377 fLayerDummy->SetStats(kFALSE);
378 fLayerDummy->SetContour(99);
379 fLayerDummy->Fill(0., 0., 0.);
380 std::map<Int_t, TCanvas*> fLayerMap;
381 std::map<Int_t, TCanvas*>::iterator fLayerMapIt;
388 for (MapIt = Map.begin(); MapIt != Map.end(); MapIt++) {
389 Double_t value = MapIt->second->GetMean(1);
390 Double_t valueE = MapIt->second->GetRMS(1);
394 Int_t combiId = 10 * Station + Layer;
395 if (fLayerMap.find(combiId) == fLayerMap.end()) {
396 title.Form(
"Station%i_Layer%i", Station, Layer);
397 fLayerMap[combiId] =
new TCanvas(title, title, 1200, 1000);
398 fLayerDummy->SetZTitle(zAxisTitle);
399 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
400 fLayerDummy->Draw(
"colz");
402 fLayerMap[combiId]->cd();
409 text =
new TPaveText(0, 0, fModuleInfo->
GetSizeX(), fModuleInfo->
GetSizeY());
410 text->SetFillStyle(1001);
411 text->SetLineColor(1);
415 if (
GetColorCode(value) < 65) text->SetTextColor(kWhite);
416 title.Form(
"%.1f#pm%.1f", value, valueE);
417 text->AddText(title);
420 for (fLayerMapIt = fLayerMap.begin(); fLayerMapIt != fLayerMap.end(); fLayerMapIt++) {
422 title.Form(
"pics/TrdQa%s_S%i_L%i_%s.pdf", pics.Data(), fLayerMapIt->first / 10,
423 fLayerMapIt->first - (fLayerMapIt->first / 10) * 10, name.Data());
424 fLayerMapIt->second->SaveAs(title);
425 title.ReplaceAll(
"pdf",
"png");
426 fLayerMapIt->second->SaveAs(title);
428 for (MapIt = Map.begin(); MapIt != Map.end(); MapIt++) {
void CreateLayerView(std::map< Int_t, TH1 * > &Map, CbmTrdParModDigi *fModuleInfo, CbmTrdParSetDigi *fDigiPar, const TString folder, const TString pics, const TString zAxisTitle, const Double_t fmax, const Double_t fmin, const Bool_t logScale)