17#include <TFitResultPtr.h>
18#include <TPaveStats.h>
20#include <TVirtualPad.h>
29#include <TProfile2D.h>
36template<
class HistTypeT>
48 this->SetLineWidth(2);
56 template<
typename... Types>
62 this->SetLineWidth(2);
71 template<
typename... Types>
72 TFitResultPtr
Fit(Types... args)
74 TVirtualPad* padsav = gPad;
77 auto ret = HistTypeT::Fit(args...);
82 if (padsav) padsav->cd();
83 auto* f = this->GetFunction(
"gaus");
85 f->SetParNames(
"Peak",
"#mu",
"#sigma");
86 f->SetLineColor(kRed);
88 TPaveStats* st = (TPaveStats*) this->FindObject(
"stats");
90 LOG(fatal) <<
"CbmQaHist: can not access statistics of histogram with name \"" << this->GetName() <<
'\"';
97 st->SetOptStat(111110);
121 TVirtualPad* savePad = gPad;
122 int saveStat = gStyle->GetOptStat();
123 int saveFit = gStyle->GetOptFit();
136 gStyle->SetOptStat(saveStat);
137 gStyle->SetOptFit(saveFit);
138 if (savePad) savePad->cd();
Definition of the CbmQaCanvas class.
static CbmQaCanvas & GetDummyCanvas()
a static canvas for temporary drawing
void SetOptStatFit(int stat, int fit)
Set stat & fit drawing options and autoresize the stat window.
CbmQaHist()
Default constructor only for the streamer.
TFitResultPtr Fit(Types... args)
void SetOptStat(Int_t stat=1)
Set stat drawing options and autoresize the stat window.
void SetOptFit(Int_t fit=1)
Set fit drawing options and autoresize the stat window.
CbmQaHist(const CbmQaHist &h)
Copy constructor.
Data class with information on a STS local track.