CbmRoot
Loading...
Searching...
No Matches
LmvmHist.cxx
Go to the documentation of this file.
1/* Copyright (C) 2012-2021 UGiessen, JINR-LIT
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Elena Lebedeva, Semen Lebedev [committer] */
4
5#include "LmvmHist.h"
6
7#include "CbmDrawHist.h"
8#include "CbmHistManager.h"
9#include "utils/CbmUtils.h"
10
11#include "Logger.h"
12
13#include "TLegend.h"
14#include "TStyle.h"
15#include "TText.h"
16
17#include "LmvmUtils.h"
18
19
20using std::string;
21using std::vector;
22
25const vector<std::string> LmvmHist::fSrcNames = {"signal", "bg", "pi0", "gamma", "eta"};
26const vector<std::string> LmvmHist::fSrcLatex = {"S", "BG_{oth}", "#pi^{0}", "#gamma", "#eta"};
27const vector<int> LmvmHist::fSrcColors = {kRed, kBlue, kGreen, kOrange, kMagenta};
28
33const vector<std::string> LmvmHist::fAnaStepNames = {"mc", "acc", "reco", "chi2prim", "elid", "gammacut",
34 "mvd1cut", "mvd2cut", "stcut", "rtcut", "ttcut", "ptcut"};
35const vector<std::string> LmvmHist::fAnaStepLatex = {
36 "MC", "ACC", "REC", "#chi^{2}_{prim}", "ID", "m_{#gamma}", "mvd1", "mvd2", "ST", "RT", "TT", "P_{t}"};
37const vector<int> LmvmHist::fAnaStepColors = {kGreen + 3, kOrange + 3, kBlack, kOrange + 7,
38 kRed, kPink - 6, kGreen, kOrange - 3,
39 kViolet + 10, kGreen - 3, kMagenta, kYellow + 1};
40
41const vector<std::string> LmvmHist::fSignalNames = {"inmed", "qgp", "omega", "phi", "omegaD"};
44
45const vector<std::string> LmvmHist::fBgPairSrcNames = {"GG", "PP", "OO", "GP", "GO", "PO"};
46const vector<std::string> LmvmHist::fBgPairSrcLatex = {"#gamma-#gamma", "#pi^{0}-#pi^{0}", "o.-o.",
47 "#gamma-#pi^{0}", "#gamma-o.", "#pi^{0}-o."};
48
49// the following candidates and global track vectors are mainly set up to investigate misidentifications
50const vector<std::string> LmvmHist::fGTrackNames = {
51 "el+", "el+_prim", "el-", "el-_prim", "pion+", "pion+_prim", "pion-", "pion-_prim",
52 "proton", "proton_prim", "kaon+", "kaon+_prim", "kaon-", "kaon-_prim", "other"};
53const vector<std::string> LmvmHist::fGTrackLatex = {
54 "e^{+}", "e^{+}_{prim}", "e^{-}", "e^{-}_{prim}", "#pi^{+}", "#pi^{+}_{prim}", "#pi^{-}", "#pi^{-}_{prim}",
55 "p", "p_{prim}", "K^{+}", "K^{+}_{prim}", "K^{-}", "K^{-}_{prim}", "other"};
56
57const vector<std::string> LmvmHist::fCandNames = {"plutoEl+", "plutoEl-", "urqmdEl+", "urqmdEl-", "pion+",
58 "pion-", "proton", "kaon+", "kaon-", "other"};
59const vector<std::string> LmvmHist::fCandLatex = {"e^{+}_{PLUTO}",
60 "e^{-}_{PLUTO}",
61 "e^{+}_{UrQMD}",
62 "e^{-}_{UrQMD}",
63 "#pi^{+}",
64 "#pi^{-}",
65 "p",
66 "K^{+}",
67 "K^{-}",
68 "o."};
69
70
72
73vector<string> LmvmHist::CombineNames(const string& name, const vector<string>& subNames)
74{
75 vector<string> result;
76 for (const auto& subName : subNames) {
77 result.push_back(name + "_" + subName);
78 }
79 return result;
80}
81
82vector<string> LmvmHist::CombineNames(const string& name, const vector<string>& subNames1,
83 const vector<string>& subNames2)
84{
85 vector<string> result;
86 for (const auto& subName1 : subNames1) {
87 for (const auto& subName2 : subNames2) {
88 result.push_back(name + "_" + subName1 + "_" + subName2);
89 }
90 }
91 return result;
92}
93
94void LmvmHist::CreateH1(const string& name, const string& axisX, const string& axisY, double nBins, double min,
95 double max)
96{
97 string title = name + ";" + axisX + ";" + axisY;
98 fHM.Create1<TH1D>(name, title, nBins, min, max);
99}
100
101void LmvmHist::CreateH2(const string& name, const string& axisX, const string& axisY, const string& axisZ,
102 double nBinsX, double minX, double maxX, double nBinsY, double minY, double maxY)
103{
104 string title = name + ";" + axisX + ";" + axisY + ";" + axisZ;
105 fHM.Create2<TH2D>(name, title, nBinsX, minX, maxX, nBinsY, minY, maxY);
106}
107
108
109void LmvmHist::CreateH1(const string& name, const vector<string>& subNames, const string& axisX, const string& axisY,
110 double nBins, double min, double max)
111{
112 vector<string> names = CombineNames(name, subNames);
113 for (const auto& curName : names) {
114 string title = curName + ";" + axisX + ";" + axisY;
115 fHM.Create1<TH1D>(curName, title, nBins, min, max);
116 }
117}
118
119void LmvmHist::CreateH2(const string& name, const vector<string>& subNames, const string& axisX, const string& axisY,
120 const string& axisZ, double nBinsX, double minX, double maxX, double nBinsY, double minY,
121 double maxY)
122{
123 vector<string> names = CombineNames(name, subNames);
124 for (const auto& curName : names) {
125 string title = curName + ";" + axisX + ";" + axisY + ";" + axisZ;
126 fHM.Create2<TH2D>(curName, title, nBinsX, minX, maxX, nBinsY, minY, maxY);
127 }
128}
129
130void LmvmHist::CreateH1(const string& name, const vector<string>& subNames1, const vector<string>& subNames2,
131 const string& axisX, const string& axisY, double nBins, double min, double max)
132{
133 vector<string> names = CombineNames(name, subNames1, subNames2);
134 for (const auto& curName : names) {
135 string title = curName + ";" + axisX + ";" + axisY;
136 fHM.Create1<TH1D>(curName, title, nBins, min, max);
137 }
138}
139
140void LmvmHist::CreateH2(const string& name, const vector<string>& subNames1, const vector<string>& subNames2,
141 const string& axisX, const string& axisY, const string& axisZ, double nBinsX, double minX,
142 double maxX, double nBinsY, double minY, double maxY)
143{
144 vector<string> names = CombineNames(name, subNames1, subNames2);
145 for (const auto& curName : names) {
146 string title = curName + ";" + axisX + ";" + axisY + ";" + axisZ;
147 fHM.Create2<TH2D>(curName, title, nBinsX, minX, maxX, nBinsY, minY, maxY);
148 }
149}
150
151void LmvmHist::FillH1(const string& name, double x, double w) { H1(name)->Fill(x, w); }
152
153void LmvmHist::FillH2(const string& name, double x, double y, double w) { H2(name)->Fill(x, y, w); }
154
155void LmvmHist::FillH1(const string& name, ELmvmSrc src, double x, double wSignal)
156{
157 if (src == ELmvmSrc::Undefined) return;
158 //double myWeight = (src == ELmvmSrc::Signal) ? wSignal : 1.; // TODO: delete commented lines
159 //H1(name, src)->Fill(x, myWeight);
160 H1(name, src)->Fill(x, wSignal);
161}
162
163void LmvmHist::FillH2(const string& name, ELmvmSrc src, double x, double y, double wSignal)
164{
165 if (src == ELmvmSrc::Undefined) return;
166 //double myWeight = (src == ELmvmSrc::Signal) ? wSignal : 1.; // TODO: delete commented lines
167 //H2(name, src)->Fill(x, y, myWeight);
168 H2(name, src)->Fill(x, y, wSignal);
169}
170
171void LmvmHist::FillH1(const string& name, ELmvmAnaStep step, double x, double w) { H1(name, step)->Fill(x, w); }
172
173void LmvmHist::FillH2(const string& name, ELmvmAnaStep step, double x, double y, double w)
174{
175 H2(name, step)->Fill(x, y, w);
176}
177
178void LmvmHist::FillH1(const string& name, ELmvmSrc src, ELmvmAnaStep step, double x, double wSignal)
179{
180 if (src == ELmvmSrc::Undefined || step == ELmvmAnaStep::Undefined) return;
181 //double myWeight = (src == ELmvmSrc::Signal) ? wSignal : 1.; // TODO: delete commented lines
182 //FillH1(GetName(name, src, step), x, myWeight);
183 FillH1(GetName(name, src, step), x, wSignal);
184}
185
186void LmvmHist::FillH2(const string& name, ELmvmSrc src, ELmvmAnaStep step, double x, double y, double wSignal)
187{
188 if (src == ELmvmSrc::Undefined || step == ELmvmAnaStep::Undefined) return;
189 //double myWeight = (src == ELmvmSrc::Signal) ? wSignal : 1.; // TODO: delete commented lines
190 //FillH2(GetName(name, src, step), x, y, myWeight);
191 FillH2(GetName(name, src, step), x, y, wSignal);
192}
193
194
195string LmvmHist::GetName(const string& name, ELmvmAnaStep step)
196{
197 if (step == ELmvmAnaStep::Undefined) {
198 LOG(error) << "LmvmHist::GetName step == ELmvmAnaStep::Undefined";
199 return name;
200 }
201 return name + "_" + fAnaStepNames[static_cast<int>(step)];
202}
203
204string LmvmHist::GetName(const string& name, ELmvmSrc src)
205{
206 if (src == ELmvmSrc::Undefined) {
207 LOG(error) << "LmvmHist::GetName src == ELmvmSrc::Undefined";
208 return name;
209 }
210 return name + "_" + fSrcNames[static_cast<int>(src)];
211}
212
213string LmvmHist::GetName(const string& name, ELmvmSrc src, ELmvmAnaStep step)
214{
215 return GetName(GetName(name, src), step);
216}
217
218void LmvmHist::SetOptH1(TH1D* hist, TString xAxisTitle = " ", TString yAxisTitle = " ", Int_t Ndevision = 510,
219 Int_t style = 1, Float_t size = 2, Int_t color = 1, string opt)
220{
221 hist->GetXaxis()->SetTitle(xAxisTitle);
222 hist->GetYaxis()->SetTitle(yAxisTitle);
223 hist->GetXaxis()->SetTitleSize(0.05);
224 hist->GetYaxis()->SetTitleSize(0.05);
225 hist->GetXaxis()->SetTitleFont(42);
226 hist->GetYaxis()->SetTitleFont(42);
227 hist->GetXaxis()->SetNdivisions(Ndevision);
228 hist->GetYaxis()->SetTitleOffset(1.4);
229 hist->GetXaxis()->SetTitleOffset(1.);
230 //hist->GetXaxis()->CenterTitle();
231 //hist->GetYaxis()->CenterTitle();
232 hist->GetXaxis()->SetLabelFont(42);
233 hist->GetYaxis()->SetLabelFont(42);
234 hist->GetXaxis()->SetLabelSize(0.04);
235 hist->GetYaxis()->SetLabelSize(0.04);
236 if (opt == "marker") {
237 hist->SetMarkerStyle(style);
238 hist->SetMarkerSize(size);
239 hist->SetMarkerColor(color);
240 hist->SetLineColor(color);
241 hist->SetLineWidth(2);
242 hist->SetTitle("");
243 //hist->SetLineWidth(2);
244 //hist->SetMinimum(0.1);
245 //hist->SetMaximum(1e5);
246 hist->GetXaxis()->SetLabelColor(1);
247 hist->GetYaxis()->SetLabelColor(1);
248 hist->GetXaxis()->SetTitleColor(1);
249 hist->GetYaxis()->SetTitleColor(1);
250 hist->SetFillColor(1);
251 }
252 else if (opt == "line") {
253 hist->SetLineStyle(style);
254 hist->SetLineColor(color);
255 hist->SetTitle(""); // TODO: with ""?
256 hist->SetLineWidth(size);
257 }
258 else
259 LOG(error) << "Option '" << opt << "' undefined. Choose 'marker' or 'line'." << std::endl;
260}
261
262void LmvmHist::SetOptCanvas(TCanvas* canvas)
263{
264 gStyle->SetOptStat(0);
265 gStyle->SetEndErrorSize(5);
266 //gStyle->SetErrorX(0); // X errors of the data points set to be 0
267 gStyle->SetLineStyleString(22, "80 18 12 18 12 12"); // special style for the line
268 gStyle->SetEndErrorSize(5); // define end width of error bars
269 gStyle->SetCanvasColor(10);
270 gStyle->SetPadColor(10);
271 canvas->SetLeftMargin(0.15);
272 canvas->SetRightMargin(0.04);
273 canvas->SetTopMargin(0.05);
274 canvas->SetBottomMargin(0.12);
275 canvas->ToggleEventStatus();
276 canvas->Range(-200, -10, 1000, -2);
277 canvas->SetFillColor(0);
278 canvas->SetBorderMode(0);
279 canvas->SetBorderSize(0);
280 canvas->SetTickx();
281 canvas->SetTicky();
282 canvas->SetLogy();
283 canvas->SetFrameLineWidth(2);
284 canvas->SetFrameBorderMode(0);
285 canvas->SetFrameBorderSize(0);
286}
287
288void LmvmHist::SetLegend(vector<LmvmLegend> legendV, double textsize, Double_t x1, Double_t y1, Double_t x2,
289 Double_t y2)
290{
291 auto leg = new TLegend(x1, y1, x2, y2);
292 leg->SetLineColor(10);
293 leg->SetLineStyle(1);
294 leg->SetLineWidth(1);
295 leg->SetFillColor(10);
296 leg->SetTextSize(textsize);
297 leg->SetTextFont(42);
298 leg->SetMargin(0.4);
299 leg->SetBorderSize(0);
300 for (size_t i = 0; i < legendV.size(); i++) {
301 const auto& l = legendV[i];
302 leg->AddEntry(l.fH, l.fName, l.fOpt);
303 }
304 leg->Draw("same");
305}
306
307void LmvmHist::Rebin(const string& name, int nGroup) { fHM.Rebin(name, nGroup); }
308
309void LmvmHist::Rebin(const string& name, const vector<string>& subNames, int nGroup)
310{
311 vector<string> names = CombineNames(name, subNames);
312 for (const auto& curName : names) {
313 fHM.Rebin(curName, nGroup);
314 }
315}
316
317void LmvmHist::Rebin(const string& name, const vector<string>& subNames1, const vector<string>& subNames2, int nGroup)
318{
319 vector<string> names = CombineNames(name, subNames1, subNames2);
320 for (const auto& curName : names) {
321 fHM.Rebin(curName, nGroup);
322 }
323}
324
325TH1D* LmvmHist::CreateSignificanceH1(TH1D* s, TH1D* bg, const string& name, const string& option)
326{
327 int nBins = s->GetNbinsX();
328 TH1D* hsig = new TH1D(name.c_str(), name.c_str(), nBins, s->GetXaxis()->GetXmin(), s->GetXaxis()->GetXmax());
329 hsig->GetXaxis()->SetTitle(s->GetXaxis()->GetTitle());
330
331 // "right" - reject right part of the histogram. value > cut -> reject
332 if (option == "right") {
333 for (int i = 1; i <= nBins; i++) {
334 double sumSignal = s->Integral(1, i, "width");
335 double sumBg = bg->Integral(1, i, "width");
336 double sign = (sumSignal + sumBg != 0.) ? sumSignal / std::sqrt(sumSignal + sumBg) : 0.;
337 hsig->SetBinContent(i, sign);
338 hsig->GetYaxis()->SetTitle("Significance");
339 }
340 }
341 // "left" - reject left part of the histogram. value < cut -> reject
342 else if (option == "left") {
343 for (int i = nBins; i >= 1; i--) {
344 double sumSignal = s->Integral(i, nBins, "width");
345 double sumBg = bg->Integral(i, nBins, "width");
346 double sign = (sumSignal + sumBg != 0.) ? sumSignal / std::sqrt(sumSignal + sumBg) : 0.;
347 hsig->SetBinContent(i, sign);
348 hsig->GetYaxis()->SetTitle("Significance");
349 }
350 }
351 return hsig;
352}
353
354TH2D* LmvmHist::CreateSignificanceH2(TH2D* signal, TH2D* bg, const string& name, const string& title)
355{
356 double xmin = 1.0;
357 double xmax = 5.0;
358 double ymin = 1.0;
359 double ymax = 5.0;
360 double delta = 0.1;
361 int nStepsX = (int) ((xmax - xmin) / delta);
362 int nStepsY = (int) ((ymax - ymin) / delta);
363
364 TH2D* hsig = new TH2D(name.c_str(), title.c_str(), nStepsX, xmin, xmax, nStepsY, ymin, ymax);
365
366 int binX = 1;
367 for (double xcut = xmin; xcut <= xmax; xcut += delta, binX++) {
368 int binY = 1;
369 for (double ycut = ymin; ycut <= ymax; ycut += delta, binY++) {
370 double sumSignal = 0;
371 double sumBg = 0;
372 for (int ix = 1; ix <= signal->GetNbinsX(); ix++) {
373 for (int iy = 1; iy <= signal->GetNbinsY(); iy++) {
374 double xc = signal->GetXaxis()->GetBinCenter(ix);
375 double yc = signal->GetYaxis()->GetBinCenter(iy);
376 double val = -1 * (ycut / xcut) * xc + ycut;
377
378 if (!(xc < xcut && yc < val)) {
379 sumSignal += signal->GetBinContent(ix, iy);
380 sumBg += bg->GetBinContent(ix, iy);
381 }
382 }
383 }
384 double sign = (sumSignal + sumBg != 0.) ? sumSignal / std::sqrt(sumSignal + sumBg) : 0.;
385 hsig->SetBinContent(binX, binY, sign);
386 }
387 }
388 return hsig;
389}
390
391void LmvmHist::DrawAllGTracks(int dim, const string& cName, const string& hName, vector<string> xLabel,
392 vector<string> yLabel, double min, double max)
393{
394 TCanvas* c = fHM.CreateCanvas(cName, cName, 2400, 2400);
395 c->Divide(4, 4);
396 int i = 1;
397 for (const string& ptcl : fGTrackNames) {
398 c->cd(i++);
399 string hFullname = hName + "_" + ptcl;
400 DrawAll(dim, hFullname, fGTrackLatex[i - 2], xLabel, yLabel, min, max);
401 }
402}
403
404void LmvmHist::DrawAllCands(int dim, const string& cName, const string& hName, vector<string> xLabel,
405 vector<string> yLabel, double min, double max)
406{
407 TCanvas* c = fHM.CreateCanvas(cName, cName, 2400, 1800);
408 c->Divide(4, 3);
409 int i = 1;
410 for (const string& ptcl : fCandNames) {
411 c->cd(i++);
412 string hFullname = hName + "_" + ptcl;
413 DrawAll(dim, hFullname, fCandLatex[i - 2], xLabel, yLabel, min, max);
414 }
415}
416
417void LmvmHist::DrawAllCandsAndSteps(int dim, const string& cName, const string& hName, vector<string> xLabel,
418 vector<string> yLabel, double min, double max)
419{
420 for (auto step : fAnaSteps) {
421 TCanvas* c = fHM.CreateCanvas(GetName(cName + "cands_all", step), GetName(cName + "cands_all", step), 2400, 1800);
422 c->Divide(4, 3);
423 int i = 1;
424 for (const string& ptcl : fCandNames) {
425 c->cd(i++);
426 string hFullname = GetName(hName + "_" + ptcl, step);
427 DrawAll(dim, hFullname.c_str(), fCandLatex[i - 2], xLabel, yLabel, min, max);
428 }
429 }
430
431 for (const string& ptcl : fCandNames) {
432 TCanvas* c = fHM.CreateCanvas(cName + ptcl + "_steps", cName + ptcl + "_steps", 2400, 1800);
433 c->Divide(4, 3);
434 int i = 1;
435 for (auto step : fAnaSteps) {
436 c->cd(i++);
437 string hFullname = GetName(hName + "_" + ptcl, step);
438 DrawAll(dim, hFullname.c_str(), fAnaStepNames[static_cast<int>(step)], xLabel, yLabel, min, max);
439 }
440 }
441}
442
443void LmvmHist::DrawAll(int dim, const string& hFullname, const string& text, vector<string> xLabel,
444 vector<string> yLabel, double min, double max)
445{
446 if (dim == 1) {
447 TH1D* h = H1Clone(hFullname.c_str());
448 h->GetYaxis()->SetRangeUser(min, max);
449 DrawH1(h, kLinear, kLog, "hist");
450 if (xLabel.size() > 1) {
451 for (size_t iL = 0; iL < xLabel.size(); iL++) {
452 h->GetXaxis()->SetBinLabel(iL + 1, xLabel[iL].c_str());
453 }
454 }
455 }
456 else if (dim == 2) {
457 TH2D* h = H2Clone(hFullname.c_str());
458 h->GetZaxis()->SetRangeUser(min, max);
459 DrawH2(h, kLinear, kLinear, kLog, "colz");
460 if (xLabel.size() > 1) {
461 for (size_t iL = 0; iL < xLabel.size(); iL++) {
462 h->GetXaxis()->SetBinLabel(iL + 1, xLabel[iL].c_str());
463 }
464 }
465 if (yLabel.size() > 1) {
466 for (size_t iL = 0; iL < yLabel.size(); iL++) {
467 h->GetYaxis()->SetBinLabel(iL + 1, yLabel[iL].c_str());
468 }
469 }
470 }
471 else
472 LOG(error) << "LmvmHist::DrawAll: Choose dimension 1 or 2";
473
474 DrawTextOnPad(text, 0.25, 0.9, 0.75, 0.999);
475}
476
478
479void LmvmHist::DrawEfficiency(TH1* h1, TH1* h2, double xPos, double yPos)
480{
481 string effTxt =
482 (h2->GetEntries() != 0.) ? Cbm::NumberToString<double>((h1->GetEntries() / h2->GetEntries() * 100.), 1) : "";
483 TText* t = new TText(xPos, yPos, effTxt.c_str());
484 t->SetTextSize(0.1);
485 t->Draw();
486}
487
489{
490 DrawTextOnPad(LmvmHist::fAnaStepLatex[static_cast<int>(step)], 0.4, 0.9, 0.6, 0.999);
491}
492
void DrawTextOnPad(const string &text, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
void DrawH1(TH1 *hist, HistScale logx, HistScale logy, const string &drawOpt, Int_t color, Int_t lineWidth, Int_t lineStyle, Int_t markerSize, Int_t markerStyle)
void DrawH2(TH2 *hist, HistScale logx, HistScale logy, HistScale logz, const string &drawOpt)
Helper functions for drawing 1D and 2D histograms and graphs.
@ kLinear
Definition CbmDrawHist.h:69
@ kLog
Definition CbmDrawHist.h:68
Histogram manager.
friend fscal max(fscal x, fscal y)
friend fscal min(fscal x, fscal y)
static constexpr size_t size()
Definition KfSimdPseudo.h:2
ELmvmSrc
Definition LmvmDef.h:23
ELmvmAnaStep
Definition LmvmDef.h:34
ClassImp(LmvmHist)
TCanvas * CreateCanvas(const std::string &name, const std::string &title, Int_t width, Int_t height)
Create and draw TCanvas and store pointer to it.
void Rebin(const std::string &histName, Int_t ngroup)
Rebin histogram.
void Create2(const std::string &name, const std::string &title, Int_t nofBinsX, Double_t minBinX, Double_t maxBinX, Int_t nofBinsY, Double_t minBinY, Double_t maxBinY)
Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real ob...
void WriteToFile()
Write all objects to current opened file.
void Create1(const std::string &name, const std::string &title, Int_t nofBins, Double_t minBin, Double_t maxBin)
Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real ob...
Data class with information on a STS local track.
void CreateH1(const std::string &name, const std::string &axisX, const std::string &axisY, double nBins, double min, double max)
static const std::vector< int > fAnaStepColors
Definition LmvmHist.h:37
static const std::vector< ELmvmSrc > fSrcs
Definition LmvmHist.h:23
static const std::vector< std::string > fCandNames
Definition LmvmHist.h:57
static const std::vector< std::string > fAnaStepLatex
Definition LmvmHist.h:35
void DrawEfficiency(TH1 *h1, TH1 *h2, double xPos, double yPos)
Definition LmvmHist.cxx:479
TH1D * CreateSignificanceH1(TH1D *s, TH1D *bg, const std::string &name, const std::string &option)
Definition LmvmHist.cxx:325
void FillH1(const std::string &name, double x, double w=1.)
void DrawAllGTracks(int dim, const std::string &cName, const std::string &hName, std::vector< std::string > xLabel, std::vector< std::string > yLabel, double min, double max)
Definition LmvmHist.cxx:391
CbmHistManager fHM
Definition LmvmHist.h:165
void DrawAllCands(int dim, const std::string &cName, const std::string &hName, std::vector< std::string > xLabel, std::vector< std::string > yLabel, double min, double max)
Definition LmvmHist.cxx:404
TH2D * H2Clone(const std::string &name)
Definition LmvmHist.h:119
TH2D * H2(const std::string &name)
Definition LmvmHist.h:110
void SetOptH1(TH1D *hist, TString xAxisTitle, TString yAxisTitle, Int_t Ndevision, Int_t style, Float_t size, Int_t color, std::string opt="")
Definition LmvmHist.cxx:218
void DrawAll(int dim, const std::string &hFullname, const std::string &padText, std::vector< std::string > xLabel, std::vector< std::string > yLabel, double min, double max)
Definition LmvmHist.cxx:443
static const std::vector< int > fSrcColors
Definition LmvmHist.h:27
static const std::vector< std::string > fBgPairSrcNames
Definition LmvmHist.h:45
static const std::vector< ELmvmSignal > fSignals
Definition LmvmHist.h:42
std::vector< std::string > CombineNames(const std::string &name, const std::vector< std::string > &subNames)
void DrawAllCandsAndSteps(int dim, const std::string &cName, const std::string &hName, std::vector< std::string > xLabel, std::vector< std::string > yLabel, double min, double max)
Definition LmvmHist.cxx:417
void SetOptCanvas(TCanvas *canvas)
Definition LmvmHist.cxx:262
void CreateH2(const std::string &name, const std::string &axisX, const std::string &axisY, const std::string &axisZ, double nBinsX, double minX, double maxX, double nBinsY, double minY, double maxY)
static const std::vector< std::string > fSrcNames
Definition LmvmHist.h:25
static const std::vector< std::string > fCandLatex
Definition LmvmHist.h:59
std::string GetName(const std::string &name, ELmvmAnaStep step)
void FillH2(const std::string &name, double x, double y, double w=1.)
static const std::vector< std::string > fGTrackNames
Definition LmvmHist.h:50
static const std::vector< std::string > fSrcLatex
Definition LmvmHist.h:26
void Rebin(const std::string &name, int nGroup)
TH2D * CreateSignificanceH2(TH2D *signal, TH2D *bg, const std::string &name, const std::string &title)
Definition LmvmHist.cxx:354
static const std::vector< std::string > fGTrackLatex
Definition LmvmHist.h:53
static const std::vector< ELmvmAnaStep > fAnaSteps
Definition LmvmHist.h:29
static const std::vector< std::string > fSignalNames
Definition LmvmHist.h:41
TH1D * H1Clone(const std::string &name)
Definition LmvmHist.h:118
TH1D * H1(const std::string &name)
Definition LmvmHist.h:109
static const std::vector< std::string > fBgPairSrcLatex
Definition LmvmHist.h:46
static const std::vector< std::string > fAnaStepNames
Definition LmvmHist.h:33
void SetLegend(std::vector< LmvmLegend >, double textsize, double x1, double y1, double x2, double y2)
Definition LmvmHist.cxx:288
void WriteToFile()
Definition LmvmHist.cxx:477
static void DrawAnaStepOnPad(ELmvmAnaStep step)
Definition LmvmHist.cxx:488
std::string NumberToString(const T &value, int precision=1)
Definition CbmUtils.h:34