10#include "FemtoDPhiDEta.h"
26 AddLabel(Femto::KinematicsToLabel(Femto::EKinematics::kPHIETA));
27 SetAxisName(Femto::KinematicsToAxisLabel(Femto::EKinematics::kPHIETA, 3, 2));
34 TVirtualPad* c1 = gPad;
42 TString path = Form(
"%s/divided_%i", dir.Data(), counter);
43 gSystem->MakeDirectory(path);
44 Bool_t batch = gROOT->IsBatch();
45 gROOT->SetBatch(kTRUE);
46 TCanvas* c1 =
new TCanvas(
"canvas",
"canvas", 0, 0, 1000, 1500);
47 TPad* pad1 =
new TPad(
"pad1",
"pad1", 0, 0.5, 1, 1);
48 TPad* pad2 =
new TPad(
"pad2",
"pad2", 0, 0., 0.5, 0.5);
49 TPad* pad3 =
new TPad(
"pad3",
"pad3", 0.5, 0., 1.0, 0.5);
54 TH2* cf = (TH2*)
GetHist(kTRUE);
57 TH2* num = (TH2*)
GetNum()->Clone(
"temp_n");
60 TH2* den = (TH2*)
GetDen()->Clone(
"temp_d");
62 c1->SaveAs(Form(
"%s/divided_%i/divided.root", dir.Data(), counter));
63 gROOT->SetBatch(batch);
82 DividedHisto2D(name, phibins, -TMath::Pi() * 0.5, TMath::Pi() * 1.5, eta_bins, min, max,
'D') {
83 AddLabel(Femto::KinematicsToLabel(Femto::EKinematics::kPHIETA));
84 SetAxisName(Femto::KinematicsToAxisLabel(Femto::EKinematics::kPHIETA, 3, 2));
89 FemtoDPhiDEta::~FemtoDPhiDEta() {}
93 if (Hal::Std::FindParam(option,
"num", kTRUE)) {
95 }
else if (Hal::Std::FindParam(option,
"den", kTRUE)) {
97 }
else if (Hal::Std::FindParam(option,
"all", kTRUE)) {
98 TVirtualPad* c1 = gPad;
101 Bool_t rebin = kTRUE;
102 if (Hal::Std::FindParam(option,
"hd", kTRUE)) { rebin = kFALSE; }
103 TH2* h = (TH2*)
GetHist(kTRUE);
107 if (h->GetNbinsX() > 20) { rebinX = h->GetNbinsX() / 20; }
108 if (h->GetNbinsY() > 20) { rebinY = h->GetNbinsY() / 20; }
109 h->Rebin2D(rebinX, rebinY);
110 h->Scale(1.0 / ((Double_t) rebinX * rebinY));
114 TH2* num = (TH2*)
GetNum()->Clone(
"temp2dN");
115 if (rebin) num->Rebin2D(rebinX, rebinY);
118 TH2* den = (TH2*)
GetDen()->Clone(
"temp2dD");
119 if (rebin) den->Rebin2D(rebinX, rebinY);
123 GetHist(kFALSE)->Draw(
"SURF1");
127 void FemtoDPhiDEta::SetAxisNames(TH1* h) {
128 if (h == NULL)
return;
130 h2->GetXaxis()->SetTitle(Femto::KinematicsToAxisLabel(Femto::EKinematics::kPHIETA, 0, 2));
131 h2->GetYaxis()->SetTitle(Femto::KinematicsToAxisLabel(Femto::EKinematics::kPHIETA, 1, 2));
132 h2->GetZaxis()->SetTitle(Femto::KinematicsToAxisLabel(Femto::EKinematics::kPHIETA, 2, 2));
void SetAxisName(TString name)
virtual TString CommonExtract(Int_t counter, TString dir) const
void AddLabel(TString label)
TH1 * GetHist(Bool_t normalized=kTRUE) const
void FillNumObj(TObject *obj)
virtual TString HTMLExtract(Int_t counter=0, TString dir=" ") const
void FillDenObj(TObject *obj)
virtual void Browse(TBrowser *b)
virtual void Draw(Option_t *opt)
Double_t GetWeight() const