8#include "CorrFit1DCFPainter.h"
10#include <RtypesCore.h>
14#include <TVirtualPad.h>
18#include "CorrFit1DCF.h"
19#include "CorrFitFunc.h"
21#include "Femto1DCFPainter.h"
26 void CorrFit1DCFPainter::MakeFunctions() {
27 std::vector<TF1*> vec;
28 vec.push_back(GetDrawableFunc(
""));
29 fFunctions.push_back(vec);
32 CorrFit1DCFPainter::CorrFit1DCFPainter(CorrFit1DCF* fit, Femto1DCF* cf) : CorrFitPainter(fit), fCF(cf) {
33 fCFPainter = (Femto1DCFPainter*) fCF->GetPainter();
34 if (fCFPainter) fCFPainter->AddPainter(
this);
37 TF1* CorrFit1DCFPainter::GetDrawableFunc(TString opt) {
38 if (!fFittedFunc)
return nullptr;
39 return ((CorrFit1DCF*) fFittedFunc)->GetFunctionForDrawing();
42 void CorrFit1DCFPainter::MakeLegend() {
43 if (CheckOpt(kLegendBit)) {
45 fLegendPad = GetPad(1);
48 CorrFitPainter::MakeLegend();
51 CorrFit1DCFPainter::~CorrFit1DCFPainter() {}
53 void CorrFit1DCFPainter::UpdateParameters() {
54 auto func = (CorrFit1DCF*) fFittedFunc;
55 for (
int i = 0; i < fFittedFunc->GetParametersNo(); i++) {
56 func->fTempParamsEval[i] = func->GetParameter(i);
59 func->ParametersChanged();
60 func->CopyParamsToTF1(fFunctions[0][0], kTRUE, kTRUE);