12#include "CorrFit1DCF.h"
14#include "Femto1DCFPainter.h"
16#include "FemtoSerializationInterface1D.h"
21#include <RtypesCore.h>
30#include <TObjString.h>
45 TObjArray* clones =
new TObjArray();
46 clones->SetOwner(kTRUE);
47 clones->AddLast(
new TObjString(
"divided_0.png"));
48 clones->AddLast(
new TObjString(
"divided_1.png"));
49 clones->AddLast(
new TObjString(
"divided_2.png"));
50 clones->AddLast(
new TObjString(
"divided_3.png"));
58 h->GetXaxis()->SetTitle(Femto::KinematicsToAxisLabel(fFrame, 0, 1));
59 h->GetYaxis()->SetTitle(Femto::KinematicsToAxisLabel(fFrame, 1, 1));
60 SetAxisName(Femto::KinematicsToAxisLabel(fFrame, 3, 1));
82 Femto1DCF::Femto1DCF() :
DividedHisto1D(), fFrame(Femto::EKinematics::kLCMS) {}
86 Femto1DCF::~Femto1DCF() {
87 if (fPainter)
delete fPainter;
91 Femto1DCF::Femto1DCF(TString name, Femto::EKinematics frame) :
DividedHisto1D(name, 1), fFrame(frame) {
93 AddLabel(Femto::KinematicsToLabel(fFrame));
96 Femto1DCF::Femto1DCF(TString name, Int_t bins, Double_t min, Double_t max, Femto::EKinematics frame) :
102 AddLabel(Femto::KinematicsToLabel(fFrame));
116 TString path = Form(
"%s/divided_%i", dir.Data(), counter);
117 gSystem->MakeDirectory(path);
118 Bool_t batch = gROOT->IsBatch();
119 gROOT->SetBatch(kTRUE);
120 TCanvas* c1 =
new TCanvas(
"canvas",
"canvas", 0, 0, 1000, 1500);
126 TH1* num = (TH1*)
GetNum()->Clone();
127 TH1* den = (TH1*)
GetDen()->Clone();
128 den->SetLineColor(kRed);
129 num->SetLineColor(kGreen);
132 TLegend* leg =
new TLegend(0.4, 0.8, 0.9, 0.9);
133 leg->AddEntry(num,
"Numerator",
"LPM");
134 leg->AddEntry(den,
"Denominator",
"LPM");
136 c1->SaveAs(Form(
"%s/divided.root", path.Data()));
142 gROOT->SetBatch(batch);
149 TVirtualPad* c1 = gPad;
156 void Femto1DCF::Print(Option_t* opt)
const {
157 DividedHisto1D::Print(opt);
158 TString text = Form(
"Frame : %s", Femto::KinematicsToLabel(fFrame).Data());
168 if (opt ==
"painter")
return fPainter;
173 TString options = option;
virtual void Fit(TObject *histo)
virtual void FitDummy(TObject *histo)
static void Text(TString text, TString option="L", Color_t color=-1)
void SetAxisName(TString name)
virtual TString CommonExtract(Int_t counter, TString dir) const
virtual void AddNum(TH1 *num, Option_t *opt="")
void AddLabel(TString label)
TH1 * GetHist(Bool_t normalized=kTRUE) const
virtual void AddDen(TH1 *den, Option_t *opt="")
void FillDenObj(TObject *obj)
virtual void AddNum(TH1 *h, Option_t *opt="")
virtual void AddDen(TH1 *h, Option_t *opt="")
virtual void Browse(TBrowser *b)
virtual TString HTMLExtract(Int_t counter=0, TString dir=" ") const
virtual void DrawScaled(Double_t scale, Option_t *opt)
void Fit(CorrFit1DCF *fit)
void FillNumObj(TObject *obj)
void FitDummy(CorrFit1DCF *fit)
virtual TObject * GetSpecial(TString opt) const
virtual void SetAxisNames(TH1 *h)
virtual TString GetPic() const
virtual void Draw(Option_t *option="")
Double_t GetWeight() const
static TString ClickablePic(TString id_name, TObjArray *strings, Int_t width=796, Int_t height=572)
virtual void SetOption(TString option)