GamR  0.0.0
GammaROOT
Loading...
Searching...
No Matches
Display.cc
Go to the documentation of this file.
1#include <iostream>
2
3#include <TROOT.h>
4#include <TColor.h>
5#include <TFile.h>
6#include <TKey.h>
7#include <TLegend.h>
8
9#include "Display.hh"
10
11#include <toolkit/Gate.hh>
12#include <utils/Utilities.hh>
13
14namespace GamR {
15 namespace Spect {
16 std::vector<TH1*> List1DSpectra(bool quiet/*=false*/) {
17 int iHist=0;
18 std::vector<TH1*> spectra;
19 for (int i=0; i<(gDirectory->GetList()->GetSize()); ++i) {
20 TObject *obj = gDirectory->GetList()->At(i);
21 if (!obj->InheritsFrom("TH1") || obj->InheritsFrom("TH2") || obj->InheritsFrom("TH3")) continue;
22 if (!quiet) {
23 std::cout << iHist << " " << obj->GetName() << std::endl;
24 }
25 spectra.push_back((TH1*)obj);
26 ++iHist;
27 }
28
29 for (int i=0; i<(gDirectory->GetListOfKeys()->GetSize()); ++i) {
30 TKey *key = static_cast<TKey*>(gDirectory->GetListOfKeys()->At(i));
31 TClass *cl = gROOT->GetClass(key->GetClassName());
32 if (!cl->InheritsFrom("TH1") || cl->InheritsFrom("TH2") || cl->InheritsFrom("TH3")) continue;
33 if (!quiet) {
34 std::cout << iHist << " " << key->GetName() << std::endl;
35 }
36 //check if already in memory
37 int ex = 0;
38 for (int j=0; j<(gDirectory->GetList()->GetSize()); ++j) {
39 if (ex == 1) { break; }
40 if ((std::string)(gDirectory->GetList()->At(j)->GetName()) == (std::string)(key->GetName())) {
41 //spectra.push_back((TH1*)gDirectory->GetList()->At(j));
42 ex = 1;
43 }
44 }
45 if (ex == 0) {
46 spectra.push_back((TH1*)key->ReadObj());
47 }
48 ++iHist;
49 }
50 return spectra;
51 }
52
53 std::vector<TH2*> List2DSpectra(bool quiet/*=false*/) {
54 int iHist=0;
55 std::vector<TH2*> spectra;
56 for (int i=0; i<(gDirectory->GetListOfKeys()->GetSize()); ++i) {
57 TKey *key = static_cast<TKey*>(gDirectory->GetListOfKeys()->At(i));
58 TClass *cl = gROOT->GetClass(key->GetClassName());
59 if (cl->InheritsFrom("TH2")) {
60 if (!quiet) {
61 std::cout << iHist << " " << key->GetName() << std::endl;
62 }
63 //check if already in memory
64 int ex = 0;
65 for (int j=0; j<(gDirectory->GetList()->GetSize()); ++j) {
66 if (ex == 1) { break; }
67 if ((std::string)(gDirectory->GetList()->At(j)->GetName()) == (std::string)(key->GetName())) {
68 spectra.push_back((TH2*)gDirectory->GetList()->At(j));
69 ex = 1;
70 }
71 }
72 if (ex == 0) {
73 spectra.push_back((TH2*)key->ReadObj());
74 }
75 ++iHist;
76 }
77 }
78 return spectra;
79 }
80
81 void Draw(int i, Option_t *option /*= "hist"*/) {
82 auto spectra = List1DSpectra(true);
83 spectra[i]->Draw(option);
84 }
85 void Draw2D(int i, Option_t *option /*= "colz2"*/) {
86 auto spectra = List2DSpectra(true);
87 spectra[i]->Draw(option);
88 }
89
90 void OverlaySpectra(std::vector<int> display_indexes, TCanvas *canvas, Option_t *option) {
91 auto spectra = List1DSpectra(true);
92 std::vector<TH1*> display_spectra;
93 for (auto &i : display_indexes) {
94 display_spectra.push_back(spectra[i]);
95 }
96 OverlaySpectra(display_spectra, canvas, option);
97 }
98
99 void OverlaySpectra(int iStart, int iStop, TCanvas *canvas, Option_t *option) {
100 auto spectra = List1DSpectra(true);
101 std::vector<TH1*> display_spectra;
102 for (int i=iStart; i<=iStop; ++i) {
103 display_spectra.push_back(spectra[i]);
104 }
105 OverlaySpectra(display_spectra, canvas, option);
106 }
107
108 void OverlaySpectra(std::vector<TH1*> hists, TCanvas *canvas, Option_t *option) {
109 if (!canvas) { if (gPad) { canvas = gPad->GetCanvas(); } else { canvas = new TCanvas(); } }
110 canvas->cd();
111 canvas->Clear();
112
113 //std::vector<int> colors = {602, 632, 419, 616, 1, 435, 417, 884};
114
115 std::vector<std::string> colors_hex = {"#000076",
116 "#ff1c00",
117 "#00b500",
118 "#008bdf",
119 "#fa4900",
120 "#9b37dc",
121 "#e9d100",
122 "#ff008c"};
123
124 std::vector<int> colors;
125 for (int i=0; i<(int)colors_hex.size(); ++i) {
126 colors.push_back(TColor::GetColor(colors_hex[i].c_str()));
127 }
128
129 TLegend *leg = new TLegend(0.1, 0.7, 0.3, 0.9);
130 for (int i=0; i<(int)hists.size(); ++i) {
131 TH1 *hist = hists[i];
132 hist->SetLineColor(colors[i%colors.size()]);
133 leg->AddEntry(hist, hist->GetName(), "l");
134 hist->GetXaxis()->UnZoom();
135 if (i==0) { hist->Draw(option); }
136 else { hist->Draw(((std::string)option+" same").c_str()); }
137 }
138 leg->Draw();
139 }
140
141 void OverlaySpectra(TH2 *hist, int iStart, int iStop, Option_t *option) {
142 std::vector<TH1*> hists;
143 for (int i=iStart; i<=iStop; ++i) {
144 std::string name = (std::string)hist->GetName()+"_px_"+std::to_string(i);
145 hists.push_back((TH1*)hist->ProjectionX(name.c_str(), i,i));
146 }
147 OverlaySpectra(hists);
148 }
149
150 void OverlaySpectra(TH2 *hist, std::vector<int> indices, Option_t *option) {
151 std::vector<TH1*> hists;
152 for (int i=0; i<indices.size(); ++i) {
153 int indx = indices[i];
154 std::string name = (std::string)hist->GetName()+"_px_"+std::to_string(indx);
155 hists.push_back((TH1*)hist->ProjectionX(name.c_str(), indx,indx));
156 }
157 OverlaySpectra(hists);
158 }
159
160 void OverlaySpectra(int i2D, int iStart, int iStop, Option_t *option) {
161 auto spectra = List2DSpectra(true);
162 OverlaySpectra(spectra[i2D], iStart, iStop, option);
163 }
164
165 void OverlaySpectra(std::vector<std::string> files, std::string name, int iX, Option_t *option) {
166 std::vector<TH1*> hists;
167 for (int iFile = 0; iFile<files.size(); ++iFile) {
168 TFile *file = new TFile(files[iFile].c_str());
169 TH2D* hist2 = (TH2D*)file->Get<TH2>(name.c_str());
170 TH1* hist = (TH1*)hist2->ProjectionX(files[iFile].substr(0, files[iFile].size()-5).c_str(), iX, iX);
171 hists.push_back(hist);
172 }
173 OverlaySpectra(hists);
174 }
175
176 void OverlaySpectra(std::vector<std::string> files, std::string name, int iXstart, int iXstop, Option_t *option) {
177 std::vector<TH1*> hists;
178 for (int iFile = 0; iFile<files.size(); ++iFile) {
179 TFile *file = new TFile(files[iFile].c_str());
180 TH2D* hist2 = (TH2D*)file->Get<TH2>(name.c_str());
181 TH1* hist = (TH1*)hist2->ProjectionX(files[iFile].substr(0, files[iFile].size()-5).c_str(), iXstart, iXstop);
182 hists.push_back(hist);
183 }
184 OverlaySpectra(hists);
185 }
186
187 void OverlaySpectra(std::vector<std::string> files, std::string name, Option_t *option) {
188 std::vector<TH1*> hists;
189 for (int iFile = 0; iFile<files.size(); ++iFile) {
190 TFile *file = new TFile(files[iFile].c_str());
191 TH1* hist = (TH1*)file->Get<TH1>(name.c_str());
192 hist->SetName(files[iFile].substr(0, files[iFile].size()-5).c_str());
193 hists.push_back(hist);
194 }
195 OverlaySpectra(hists);
196 }
197
198 void StackSpectra(std::vector<int> display_indexes, TCanvas *canvas, Option_t *option) {
199 auto spectra = List1DSpectra(true);
200 std::vector<TH1*> display_spectra;
201 for (auto &i : display_indexes) {
202 display_spectra.push_back(spectra[i]);
203 }
204 StackSpectra(display_spectra, canvas, option);
205 }
206
207 void StackSpectra(int iStart, int iStop, TCanvas *canvas, Option_t *option) {
208 auto spectra = List1DSpectra(true);
209 std::vector<TH1*> display_spectra;
210 for (int i=iStart; i<=iStop; ++i) {
211 display_spectra.push_back(spectra[i]);
212 }
213 StackSpectra(display_spectra, canvas, option);
214 }
215
216 void StackSpectra(std::vector<TH1*> hists, TCanvas *canvas, Option_t *option) {
217 if (!canvas) { if (gPad) { canvas = gPad->GetCanvas(); } else { canvas = new TCanvas(); } }
218 canvas->cd();
219 canvas->Clear();
220
221 int num_hists = hists.size();
222 int nx = 0;
223 int ny = 0;
224 if (hists.size() < 2 ) { nx = 1; ny = 1; }
225 else {
226 //work out dimensions to divide into
227 nx = (int)(std::sqrt((double)num_hists));
228 ny = (int)((double)(num_hists - 1)/(double)(nx) + 1);
229 }
230 canvas->Divide(nx, ny, 0, 0);
231
232 for (int i=0; i<num_hists; ++i) {
233 TH1 *hist = hists[i];
234 hist->GetXaxis()->UnZoom();
235 canvas->cd(i+1);
236 hist->Draw(option);
237 }
238 canvas->cd();
239 }
240
241 void StackSpectra(TH2 *hist, int iStart, int iStop, Option_t *option) {
242 std::vector<TH1*> hists;
243 for (int i=iStart; i<=iStop; ++i) {
244 std::string name = (std::string)hist->GetName()+"_px_"+std::to_string(i);
245 hists.push_back((TH1*)hist->ProjectionX(name.c_str(), i,i));
246 }
247 StackSpectra(hists);
248 }
249
250 void StackSpectra(int i2D, int iStart, int iStop, Option_t *option) {
251 auto spectra = List2DSpectra(true);
252 StackSpectra(spectra[i2D], iStart, iStop, option);
253 }
254
255 void StackSpectra(std::vector<std::string> files, std::string name, int iX, Option_t *option) {
256 std::vector<TH1*> hists;
257 for (int iFile = 0; iFile<files.size(); ++iFile) {
258 TFile *file = new TFile(files[iFile].c_str());
259 TH2D* hist2 = (TH2D*)file->Get<TH2>(name.c_str());
260 TH1* hist = (TH1*)hist2->ProjectionX(files[iFile].substr(0, files[iFile].size()-5).c_str(), iX, iX);
261 hists.push_back(hist);
262 }
263 StackSpectra(hists);
264 }
265
266 void StackSpectra(std::vector<std::string> files, std::string name, Option_t *option) {
267 std::vector<TH1*> hists;
268 for (int iFile = 0; iFile<files.size(); ++iFile) {
269 TFile *file = new TFile(files[iFile].c_str());
270 TH1* hist = (TH1*)file->Get<TH1>(name.c_str());
271 hist->SetName(files[iFile].substr(0, files[iFile].size()-5).c_str());
272 hists.push_back(hist);
273 }
274 StackSpectra(hists);
275 }
276
277 void ContourCalc(TH2* hist, int ncontours, double bias) {
278 if (ncontours==0) { //reset
279 hist->SetContour(0);
280 return;
281 }
282
283 int lowx = hist->GetXaxis()->GetFirst();
284 int highx = hist->GetXaxis()->GetLast();
285 int lowy = hist->GetYaxis()->GetFirst();
286 int highy = hist->GetYaxis()->GetLast();
287
288 double maxCont = hist->GetMaximum();
289 double minCont = hist->GetMinimum();
290
291 //TH1D *contsHist = new TH1D("contsHist", "contsHist", std::min(1024, (int)(maxCont-minCont)), minCont, maxCont);
292
293 int nbins = std::min(1024, (int)(maxCont-minCont));
294 std::vector<double> contsHist(nbins, 0);
295
296 for (int i=lowx; i<=highx; ++i) {
297 for (int j=lowy; j<=highy; ++j) {
298 double conts = hist->GetBinContent(i,j);
299 int bin = (int)((conts-minCont)/(maxCont-minCont)*(nbins-1) + 0.5);
300 if (bin < 0 || bin >= nbins) { continue; }
301 contsHist[bin] += (1+conts*bias); //bias towards high-count bins slightly
302 }
303 }
304
305 while (true) {
306 double thresh = 0;
307 for (int i=0; i<nbins; ++i) {
308 thresh += contsHist[i];
309 }
310 //double thresh = contsHist->Integral()/(double)ncontours;
311 thresh /= (double)ncontours;
312 bool exceeded = false;
313 /*
314 for (int i=1; i<=contsHist->GetNbinsX(); ++i) {
315 if (contsHist->GetBinContent(i) > thresh) { contsHist->SetBinContent(i, thresh); exceeded = true; }
316 }
317 */
318 for (int i=0; i<nbins; ++i) {
319 if (contsHist[i] > thresh) {
320 contsHist[i] = thresh;
321 exceeded=true;
322 }
323 }
324 if (!exceeded) { break; }
325 }
326
327 double levels[ncontours+1];
328 double sum = 0;
329 //double total = contsHist->Integral();
330 double total = 0;
331 for (int i=0; i<nbins; ++i) {
332 total += contsHist[i];
333 }
334 int ct = 0;
335 levels[0] = minCont-0.01*std::abs(minCont);
336 ct += 1;
337 for (int i=0; i<nbins; ++i) {
338 sum += contsHist[i];
339 if (sum/total > (double)ct/(double)ncontours) {
340 //levels[ct] = contsHist->GetBinLowEdge(i);
341 levels[ct] = minCont + (double)i/((double)nbins) * (maxCont - minCont);
342 ++ct;
343 }
344 }
345
346 levels[ncontours] = maxCont + 0.01*std::abs(maxCont);
347
348 hist->SetContour(ncontours+1, &levels[0]);
349
350 //delete contsHist;
351 }
352
353 void ContourCalc(TVirtualPad *canvas, int ncontours, double bias) {
354 if (!canvas) { if (!gPad) { return; } canvas = gPad; }
355
356 int nPads = GamR::Utils::GetNPads(canvas);
357
358 if (!nPads) {
359 TH2D* hist = GamR::Utils::GetHist2D(canvas);
360 GamR::Spect::ContourCalc(hist, ncontours, bias);
361 canvas->Modified();
362 }
363
364 for (int i=0; i<nPads; ++i) {
365 canvas->cd(i+1);
366 ContourCalc(canvas->cd(i+1), ncontours, bias);
367 }
368 canvas->Modified();
369 canvas->cd();
370 }
371
372 void LinAll(TVirtualPad *canvas) {
373 if (!canvas) { if (!gPad) { return; } canvas = gPad; }
374
375 int nPads = GamR::Utils::GetNPads(canvas);
376 if (!nPads) {
377 canvas->SetLogy(0);
378 }
379
380 for (int i=0; i<nPads; ++i) {
381 canvas->cd(i+1);
382 LinAll(canvas->cd(i+1));
383 }
384 canvas->Modified();
385 canvas->cd();
386 }
387
388 void LogAll(TVirtualPad *canvas) {
389 if (!canvas) { if (!gPad) { return; } canvas = gPad; }
390
391 int nPads = GamR::Utils::GetNPads(canvas);
392
393 if (!nPads) {
394 canvas->SetLogy(1);
395 }
396
397 for (int i=0; i<nPads; ++i) {
398 canvas->cd(i+1);
399 LogAll(canvas->cd(i+1));
400 }
401 canvas->Modified();
402 canvas->cd();
403 }
404
405 void ZoomAllX(double low, double high, TVirtualPad *canvas) {
406 if (!canvas) { if (!gPad) { return; } canvas = gPad; }
407
408 int nPads = GamR::Utils::GetNPads(canvas);
409
410 if (!nPads) {
411 TH1D *hist = GamR::Utils::GetHist1D(canvas);
412 if (hist) {
413 hist->GetXaxis()->SetRangeUser(low, high);
414 }
415 TH2D *hist2 = GamR::Utils::GetHist2D(canvas);
416 if (hist2) {
417 hist2->GetXaxis()->SetRangeUser(low, high);
418 }
419
420 canvas->Modified();
421 }
422
423 for (int i=0; i<nPads; ++i) {
424 canvas->cd(i+1);
425 ZoomAllX(low, high, canvas->cd(i+1));
426 }
427 canvas->Modified();
428 canvas->cd();
429 }
430
431 void ZoomAllY(double low, double high, TVirtualPad *canvas) {
432 if (!canvas) { if (!gPad) { return; } canvas = gPad; }
433
434 int nPads = GamR::Utils::GetNPads(canvas);
435
436 if (!nPads) {
437 TH1D *hist = GamR::Utils::GetHist1D(canvas);
438 if (hist) {
439 hist->GetYaxis()->SetRangeUser(low, high);
440 }
441 TH2D *hist2 = GamR::Utils::GetHist2D(canvas);
442 if (hist2) {
443 hist2->GetYaxis()->SetRangeUser(low, high);
444 }
445
446 canvas->Modified();
447 }
448
449 for (int i=0; i<nPads; ++i) {
450 canvas->cd(i+1);
451 ZoomAllY(low, high, canvas->cd(i+1));
452 }
453 canvas->Modified();
454 canvas->cd();
455 }
456
457 void UnZoomAllX(TVirtualPad *canvas) {
458 if (!canvas) { if (!gPad) { return; } canvas = gPad; }
459
460 int nPads = GamR::Utils::GetNPads(canvas);
461
462 if (!nPads) {
463 TH1D *hist = GamR::Utils::GetHist1D(canvas);
464 if (hist) {
465 hist->GetXaxis()->UnZoom();
466 canvas->Modified();
467 }
468 else {
469 TH2D *hist2 = GamR::Utils::GetHist2D(canvas);
470 if (hist2) {
471 hist2->GetXaxis()->UnZoom();
472 canvas->Modified();
473 }
474 }
475 }
476
477 for (int i=0; i<nPads; ++i) {
478 canvas->cd(i+1);
479 UnZoomAllX(canvas->cd(i+1));
480 }
481 canvas->Modified();
482 canvas->cd();
483 }
484
485 void UnZoomAllY(TVirtualPad *canvas) {
486 if (!canvas) { if (!gPad) { return; } canvas = gPad; }
487
488 int nPads = GamR::Utils::GetNPads(canvas);
489
490 if (!nPads) {
491 TH1D *hist = GamR::Utils::GetHist1D(canvas);
492 if (hist) {
493 hist->GetYaxis()->UnZoom();
494 canvas->Modified();
495 }
496 else {
497 TH2D *hist2 = GamR::Utils::GetHist2D(canvas);
498 if (hist2) {
499 hist2->GetYaxis()->UnZoom();
500 canvas->Modified();
501 }
502 }
503 }
504
505 for (int i=0; i<nPads; ++i) {
506 canvas->cd(i+1);
507 UnZoomAllY(canvas->cd(i+1));
508 }
509 canvas->Modified();
510 canvas->cd();
511 }
512
513 void NormSpectra(TVirtualPad *canvas, Option_t *option) {
514 if (!canvas) { if (gPad) { canvas = gPad->GetCanvas(); } else { std::cout << "No active canvas" << std::endl; return; } }
515
516 TString opts(option);
517 opts.ToLower();
518
519 std::vector<TH1D*> spectra = Utils::GetHists1D(canvas);
520 for (int i=0; i<spectra.size(); ++i) {
521 printf("%i %s\n", i, spectra[i]->GetName());
522 }
523 std::cout << "Enter normalising spectrum: ";
524 int ind;
525 std::cin >> ind;
526 TH1D* norm_hist = spectra[ind];
527 if (opts.Contains("m")) {
528 for (int i=0; i<spectra.size(); ++i) {
529 if (i != ind) {
530 double scale = (double)norm_hist->GetMaximum()/(double)spectra[i]->GetMaximum();
531 spectra[i]->Scale(scale);
532 }
533 }
534 }
535 else {
536 GamR::TK::Gate gate;
537 gate.SetGate(canvas, "x");
538 for (int i=0; i<spectra.size(); ++i) {
539 if (i != ind) {
540 gate.Norm(spectra[i], norm_hist);
541 }
542 }
543 }
544 canvas->Update();
545 }
546
547 void NormSpectraBackSub(TVirtualPad *canvas) {
548 if (!canvas) { if (gPad) { canvas = gPad->GetCanvas(); } else { std::cout << "No active canvas" << std::endl; return; } }
549 std::vector<TH1D*> spectra = Utils::GetHists1D(canvas);
550 for (int i=0; i<spectra.size(); ++i) {
551 printf("%i %s\n", i, spectra[i]->GetName());
552 }
553 std::cout << "Enter normalising spectrum: ";
554 int ind;
555 std::cin >> ind;
556 TH1D* norm_hist = spectra[ind];
557 std::cout << "Set peak region: " << std::endl;
558 GamR::TK::Gate gate;
559 gate.SetGate(canvas, "x");
560 std::cout << "Set background region: " << std::endl;
561 GamR::TK::Gate back;
562 back.SetGate(canvas, "x");
563 for (int i=0; i<spectra.size(); ++i) {
564 gate.NormBackSub(spectra[i], norm_hist, back);
565 }
566 canvas->Update();
567 }
568
569 void Rename(TVirtualPad *canvas) {
570 if (!canvas) { if (gPad) { canvas = gPad->GetCanvas(); } else { std::cout << "No active canvas" << std::endl; return; } }
571 std::vector<TH1D*> spectra = Utils::GetHists1D(canvas);
572 int ind = 0;
573 if (spectra.size() > 1) {
574 for (int i=0; i<spectra.size(); ++i) {
575 printf("%i %s\n", i, spectra[i]->GetName());
576 }
577 std::cout << "Enter spectrum to rename: ";
578 std::cin >> ind;
579 }
580 TH1D* hist = spectra[ind];
581 std::cout << "Enter new name: ";
582 std::string name;
583 std::cin >> name;
584 spectra[ind]->SetName(name.c_str());
585 return;
586 }
587
588 void Cursor(TVirtualPad *canvas) {
589 if (!canvas) { if (gPad) { canvas = gPad->GetCanvas(); } else { std::cout << "No active canvas" << std::endl; return; } }
590
591 canvas->SetCrosshair(1);
593 std::vector<std::string> messages = {"Cursor: "};
594 int retval = click.GetClicks(canvas, -1, messages, 0, 1);
595
596 if (retval > 0) { // quit prematurely
597 canvas->SetCrosshair(0);
598 std::cout << std::endl;
599 return;
600 }
601
602 }
603 }
604}
605
std::pair< double, double > ct(TCanvas *canvas)
int GetClicks(TVirtualPad *canvas, int n, std::vector< std::string > &messages, int draw=0, int print=0)
Definition Utilities.cc:127
int SetGate()
Definition Gate.cc:76
void NormBackSub(TH1 *hist, TH1 *ref, Gate background)
Definition Gate.cc:691
void Norm(TH1 *hist, TH1 *ref)
Definition Gate.cc:686
std::vector< TH2 * > List2DSpectra(bool quiet)
Definition Display.cc:53
void Draw2D(int i, Option_t *option)
Definition Display.cc:85
void Draw(int i, Option_t *option)
Definition Display.cc:81
std::vector< TH1 * > List1DSpectra(bool quiet)
Definition Display.cc:16
void Rename(TVirtualPad *canvas)
Definition Display.cc:569
void NormSpectra(TVirtualPad *canvas, Option_t *option)
Definition Display.cc:513
void ContourCalc(TH2 *hist, int ncontours, double bias)
Definition Display.cc:277
void Cursor(TVirtualPad *canvas)
Definition Display.cc:588
void LinAll(TVirtualPad *canvas)
Definition Display.cc:372
void UnZoomAllY(TVirtualPad *canvas)
Definition Display.cc:485
void OverlaySpectra(std::vector< int > display_indexes, TCanvas *canvas, Option_t *option)
Definition Display.cc:90
void LogAll(TVirtualPad *canvas)
Definition Display.cc:388
void NormSpectraBackSub(TVirtualPad *canvas)
Definition Display.cc:547
void StackSpectra(std::vector< int > display_indexes, TCanvas *canvas, Option_t *option)
Definition Display.cc:198
void ZoomAllX(double low, double high, TVirtualPad *canvas)
Definition Display.cc:405
void ZoomAllY(double low, double high, TVirtualPad *canvas)
Definition Display.cc:431
void UnZoomAllX(TVirtualPad *canvas)
Definition Display.cc:457
int GetNPads(TVirtualPad *pad)
Definition Utilities.cc:411
TH1D * GetHist1D(TVirtualPad *canvas)
Definition Utilities.cc:182
std::vector< TH1D * > GetHists1D(TVirtualPad *canvas)
Definition Utilities.cc:204
TH2D * GetHist2D(TVirtualPad *canvas)
Definition Utilities.cc:221
Definition Gain.cc:19