TString("in"),
jetFindingEfficiency);
resizedResponseIn->SetNameTitle("ResponseMatrixIn", "response matrix in plane");
- resizedResponseIn->SetXTitle("p_{T, jet}^{true} [GeV/c]");
- resizedResponseIn->SetYTitle("p_{T, jet}^{rec} [GeV/c]");
+ resizedResponseIn->SetXTitle("p_{T, jet}^{true} (GeV/#it{c})");
+ resizedResponseIn->SetYTitle("p_{T, jet}^{rec} (GeV/#it{c})");
resizedResponseIn = ProtectHeap(resizedResponseIn);
resizedResponseIn->Write();
kinematicEfficiencyIn->SetNameTitle("KinematicEfficiencyIn","Kinematic efficiency, in plane");
TString("out"),
jetFindingEfficiency);
resizedResponseOut->SetNameTitle("ResponseMatrixOut", "response matrix in plane");
- resizedResponseOut->SetXTitle("p_{T, jet}^{true} [GeV/c]");
- resizedResponseOut->SetYTitle("p_{T, jet}^{rec} [GeV/c]");
+ resizedResponseOut->SetXTitle("p_{T, jet}^{true} (GeV/#it{c})");
+ resizedResponseOut->SetYTitle("p_{T, jet}^{rec} (GeV/#it{c})");
resizedResponseOut = ProtectHeap(resizedResponseOut);
resizedResponseOut->Write();
kinematicEfficiencyOut->SetNameTitle("KinematicEfficiencyOut","Kinematic efficiency, Out plane");
return temp;
}
//_____________________________________________________________________________
-void AliJetFlowTools::Style()
+void AliJetFlowTools::Style(Bool_t legacy)
{
// set global style for your current aliroot session
if(!gStyle) return;
- gStyle->SetCanvasColor(-1);
- gStyle->SetPadColor(-1);
- gStyle->SetFrameFillColor(-1);
- gStyle->SetHistFillColor(-1);
- gStyle->SetTitleFillColor(-1);
- gStyle->SetFillColor(-1);
- gStyle->SetFillStyle(4000);
- gStyle->SetStatStyle(0);
- gStyle->SetTitleStyle(0);
- gStyle->SetCanvasBorderSize(0);
- gStyle->SetFrameBorderSize(0);
- gStyle->SetLegendBorderSize(0);
- gStyle->SetStatBorderSize(0);
- gStyle->SetTitleBorderSize(0);
+ // legacy style is pleasing to the eye, default is the formal ALICE style
+ if(legacy) {
+ gStyle->SetCanvasColor(-1);
+ gStyle->SetPadColor(-1);
+ gStyle->SetFrameFillColor(-1);
+ gStyle->SetHistFillColor(-1);
+ gStyle->SetTitleFillColor(-1);
+ gStyle->SetFillColor(-1);
+ gStyle->SetFillStyle(4000);
+ gStyle->SetStatStyle(0);
+ gStyle->SetTitleStyle(0);
+ gStyle->SetCanvasBorderSize(0);
+ gStyle->SetFrameBorderSize(0);
+ gStyle->SetLegendBorderSize(0);
+ gStyle->SetStatBorderSize(0);
+ gStyle->SetTitleBorderSize(0);
+ } else {
+ gStyle->Reset("Plain");
+ gStyle->SetOptTitle(0);
+ gStyle->SetOptStat(0);
+ gStyle->SetPalette(1);
+ gStyle->SetCanvasColor(10);
+ gStyle->SetCanvasBorderMode(0);
+ gStyle->SetFrameLineWidth(1);
+ gStyle->SetFrameFillColor(kWhite);
+ gStyle->SetPadColor(10);
+ gStyle->SetPadTickX(1);
+ gStyle->SetPadTickY(1);
+ gStyle->SetPadBottomMargin(0.15);
+ gStyle->SetPadLeftMargin(0.15);
+ gStyle->SetHistLineWidth(1);
+ gStyle->SetHistLineColor(kRed);
+ gStyle->SetFuncWidth(2);
+ gStyle->SetFuncColor(kGreen);
+ gStyle->SetLineWidth(2);
+ gStyle->SetLabelSize(0.045,"xyz");
+ gStyle->SetLabelOffset(0.01,"y");
+ gStyle->SetLabelOffset(0.01,"x");
+ gStyle->SetLabelColor(kBlack,"xyz");
+ gStyle->SetTitleSize(0.05,"xyz");
+ gStyle->SetTitleOffset(1.25,"y");
+ gStyle->SetTitleOffset(1.2,"x");
+ gStyle->SetTitleFillColor(kWhite);
+ gStyle->SetTextSizePixels(26);
+ gStyle->SetTextFont(42);
+ gStyle->SetLegendBorderSize(0);
+ gStyle->SetLegendFillColor(kWhite);
+ gStyle->SetLegendFont(42);
+ }
}
//_____________________________________________________________________________
void AliJetFlowTools::Style(TCanvas* c, TString style)
} else printf(" > Style called with unknown option %s \n returning < \n", style.Data());
}
//_____________________________________________________________________________
-void AliJetFlowTools::Style(TVirtualPad* c, TString style)
+void AliJetFlowTools::Style(TVirtualPad* c, TString style, Bool_t legacy)
{
- // set a default style for a canvas
- c->SetLeftMargin(.25);
- c->SetBottomMargin(.25);
+ // set a default style for a canva
+
+ if(legacy) {
+ c->SetLeftMargin(.25);
+ c->SetBottomMargin(.25);
+ }
+ else Style();
if(!strcmp(style.Data(), "PEARSON")) {
printf(" > style PEARSON pad < \n");
gStyle->SetOptStat(0);
void AliJetFlowTools::Style(TLegend* l)
{
// set a default style for a legend
-// l->SetTextSize(.06);
l->SetFillColor(0);
-// l->SetFillStyle(4050);
l->SetBorderSize(0);
+ if(gStyle) l->SetTextSize(gStyle->GetTextSize()*.08);
}
//_____________________________________________________________________________
-void AliJetFlowTools::Style(TH1* h, EColor col, histoType type)
+void AliJetFlowTools::Style(TH1* h, EColor col, histoType type, Bool_t legacy)
{
// style a histo
h->SetLineColor(col);
h->SetMarkerColor(col);
- h->SetLineWidth(2.);
- h->SetMarkerSize(1.);
- h->SetTitle("");
- h->GetYaxis()->SetLabelSize(0.05);
- h->GetXaxis()->SetLabelSize(0.05);
- h->GetYaxis()->SetTitleOffset(1.5);
- h->GetXaxis()->SetTitleOffset(1.5);
- h->GetYaxis()->SetTitleSize(.05);
- h->GetXaxis()->SetTitleSize(.05);
+ h->SetLineWidth(2);
+ h->SetMarkerSize(1);
+ if(legacy) {
+ h->SetTitle("");
+ h->GetYaxis()->SetLabelSize(0.05);
+ h->GetXaxis()->SetLabelSize(0.05);
+ h->GetYaxis()->SetTitleOffset(1.5);
+ h->GetXaxis()->SetTitleOffset(1.5);
+ h->GetYaxis()->SetTitleSize(.05);
+ h->GetXaxis()->SetTitleSize(.05);
+ } else Style();
switch (type) {
case kInPlaneSpectrum : {
h->SetTitle("IN PLANE");
- h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} [GeV/#it{c}]");
+ h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} (GeV/#it{c})");
h->GetYaxis()->SetTitle("#frac{d#it{N}}{d#it{p}_{T}}");
} break;
case kOutPlaneSpectrum : {
h->SetTitle("OUT OF PLANE");
h->GetYaxis()->SetTitle("#frac{d#it{N}}{d#it{p}_{T}}");
- h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} [GeV/#it{c}]");
+ h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} (GeV/#it{c})");
} break;
case kUnfoldedSpectrum : {
h->SetTitle("UNFOLDED");
h->GetYaxis()->SetTitle("#frac{d#it{N}}{d#it{p}_{T}}");
- h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} [GeV/#it{c}]");
+ h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} (GeV/#it{c})");
} break;
case kFoldedSpectrum : {
h->SetTitle("FOLDED");
h->GetYaxis()->SetTitle("#frac{d#it{N}}{d#it{p}_{T}}");
- h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} [GeV/#it{c}]");
+ h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} (GeV/#it{c})");
} break;
case kMeasuredSpectrum : {
h->SetTitle("MEASURED");
h->GetYaxis()->SetTitle("#frac{d#it{N}}{d#it{p}_{T}}");
- h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} [GeV/#it{c}]");
+ h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} (GeV/#it{c})");
} break;
case kBar : {
h->SetFillColor(col);
h->SetBarWidth(.6);
- h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} [GeV/#it{c}]");
+ h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} (GeV/#it{c})");
h->SetBarOffset(0.2);
}
default : break;
}
}
//_____________________________________________________________________________
-void AliJetFlowTools::Style(TGraph* h, EColor col, histoType type)
+void AliJetFlowTools::Style(TGraph* h, EColor col, histoType type, Bool_t legacy)
{
- // style a histo
+ // style a tgraph
h->SetLineColor(col);
h->SetMarkerColor(col);
- h->SetLineWidth(2.);
- h->SetMarkerSize(1.);
+ h->SetLineWidth(2);
+ h->SetMarkerSize(1);
h->SetTitle("");
h->SetFillColor(kCyan);
- h->GetYaxis()->SetLabelSize(0.05);
- h->GetXaxis()->SetLabelSize(0.05);
- h->GetYaxis()->SetTitleOffset(1.6);
- h->GetXaxis()->SetTitleOffset(1.6);
- h->GetYaxis()->SetTitleSize(.05);
- h->GetXaxis()->SetTitleSize(.05);
- h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} [GeV/#it{c}]");
+ if(legacy) {
+ h->GetYaxis()->SetLabelSize(0.05);
+ h->GetXaxis()->SetLabelSize(0.05);
+ h->GetYaxis()->SetTitleOffset(1.6);
+ h->GetXaxis()->SetTitleOffset(1.6);
+ h->GetYaxis()->SetTitleSize(.05);
+ h->GetXaxis()->SetTitleSize(.05);
+ } else Style();
+ h->GetXaxis()->SetTitle("#it{p}_{T}^{ch, jet} (GeV/#it{c})");
switch (type) {
case kInPlaneSpectrum : {
h->SetTitle("IN PLANE");
h->GetYaxis()->SetTitle("#frac{d#it{N}}{d#it{p}_{T}}");
} break;
case kRatio : {
- h->GetYaxis()->SetTitle("#frac{d#it{N_{in plane}^{jet}}}{d#it{p}_{T}} / #frac{d#it{N_{out of plane}^{jet}}}{d#it{p}_{T}}");
+// h->GetYaxis()->SetTitle("#frac{d#it{N_{in plane}^{jet}}}{d#it{p}_{T}} / #frac{d#it{N_{out of plane}^{jet}}}{d#it{p}_{T}}");
+ h->GetYaxis()->SetTitle("(d#it{N}^{ch, jet}_{in plane}/(d#it{p}_{T}d#eta))/(d#it{N}^{ch,jet}_{out of plane}/(d#it{p}_{T}d#eta))");
} break;
case kV2 : {
- h->GetYaxis()->SetTitle("#it{v}_{2} = #frac{1}{#it{R}} #frac{#pi}{4} #frac{#it{N_{in plane}} - #it{N_{out of plane}}}{#it{N_{in plane}} + #it{N_{out of plane}}}");
+// h->GetYaxis()->SetTitle("#it{v}_{2} = #frac{1}{#it{R}} #frac{#pi}{4} #frac{#it{N_{in plane}} - #it{N_{out of plane}}}{#it{N_{in plane}} + #it{N_{out of plane}}}");
+ h->GetYaxis()->SetTitle("#it{v}_{2}^{ch, jet}");
h->GetYaxis()->SetRangeUser(-.5, 1.);
} break;
default : break;
if(relativeErrorMethodInLow) dInLow = relativeErrorMethodInLow->GetBinContent(b+1);
if(relativeErrorMethodOutLow) dOutLow = relativeErrorMethodOutLow->GetBinContent(b+1);
if(fSymmRMS) { // take first category as symmetric
- aInLow = aInUp;
- aOutLow = aOutUp;
+ aInLow = aInUp*1.5;
+ aOutLow = aOutUp*1.5;
if(dInLow < dInUp) dInLow = dInUp;
if(dOutLow < dOutUp) dOutLow = dOutUp;
}
#include "TVirtualPad.h"
#include "TPaveText.h"
#include "TLegend.h"
+#include "TLatex.h"
//_____________________________________________________________________________
class AliJetFlowTools {
public:
static TH1D* SmoothenPrior(TH1D* spectrum, TF1* function, Double_t min, Double_t max, Double_t start, Bool_t kill = kTRUE, Bool_t counts = kTRUE);
// set style
void SetTitleFontSize(Double_t s) {fTitleFontSize = s;}
- static void Style();
+ static void Style(Bool_t legacy = kFALSE);
static void Style(TCanvas* c, TString style = "PEARSON");
- static void Style(TVirtualPad* c, TString style = "SPECTRUM");
+ static void Style(TVirtualPad* c, TString style = "SPECTRUM", Bool_t legacy = kFALSE);
static void Style(TLegend* l);
- static void Style(TH1* h, EColor col = kBlue, histoType = kEmpty);
- static void Style(TGraph* h, EColor col = kBlue, histoType = kEmpty);
+ static void Style(TH1* h, EColor col = kBlue, histoType = kEmpty, Bool_t legacy = kFALSE);
+ static void Style(TGraph* h, EColor col = kBlue, histoType = kEmpty, Bool_t legacy = kFALSE);
static TLegend* AddLegend(TVirtualPad* p, Bool_t style = kFALSE) {
if(!style) return p->BuildLegend(.565, .663, .882, .883);
else {
t->SetFillColor(0);
t->SetBorderSize(0);
t->AddText(0.,0.,text.Data());
- t->AddText(0., 0., Form("#it{R} = 0.%i #it{k}_{T} charged jets", r));
+ t->AddText(0., 0., Form("#it{R} = 0.%i #it{k}_{T}^{-1} charged jets", r));
t->SetTextColor(kBlack);
t->SetTextFont(42);
t->Draw("same");
t->Draw("same");
return t;
}
+ static TLatex* AddLogo(Bool_t logo, Double_t xmin = .59, Double_t ymax = .81) {
+ return AddTLatex(xmin, ymax, logo ? "ALICE Preliminary" : "ALICE");
+ }
+ static TLatex* AddSystem() {
+ return AddTLatex(0.55, 87, "Pb-Pb #sqrt{#it{s}}}_{NN} = 2.76 TeV");
+ }
+ static TLatex* AddTLatex(Double_t xmin, Double_t ymax, TString string) {
+TLatex* tex = new TLatex(xmin, ymax, string.Data());
+ tex->SetNDC();
+ tex->SetTextFont(42);
+ tex->Draw("same");
+ return tex;
+ }
static void SavePadToPDF(TVirtualPad* pad) {pad->SaveAs(Form("%s.pdf", pad->GetName()));}
// interface to AliUnfolding, not necessary but nice to have all parameters in one place