19 c->SetRightMargin(.05);
20 c->SetBottomMargin(.1);
47 gROOT->Macro(
"$ALICE_PHYSICS/PWGLF/FORWARD/analysis2/scripts/LoadLibs.C");
49 TFile*
file = TFile::Open(fname,
"READ");
51 Error(
"DrawCorrAcc",
"Failed to open %s", fname);
55 pname.ReplaceAll(
".root",
".pdf");
63 Error(
"DrawCorrAcc",
"Object '%s' not found in %s", objName, fname);
70 TCanvas*
c =
new TCanvas(
"c",
"c", 800, 800 / TMath::Sqrt(2));
75 gStyle->SetOptStat(0);
76 gStyle->SetTitleColor(0);
77 gStyle->SetTitleStyle(0);
78 gStyle->SetTitleBorderSize(0);
79 gStyle->SetTitleX(.5);
81 gStyle->SetTitleW(.8);
82 gStyle->SetTitleH(.09);
83 gStyle->SetFrameFillColor(kWhite);
84 gStyle->SetFrameBorderSize(1);
85 gStyle->SetFrameBorderMode(1);
86 gStyle->SetPalette(1);
90 Int_t nVtx = vtxAxis.GetNbins();
91 c->Divide((nVtx+2)/3, 3, 0, 0);
96 for (
UShort_t v = 1; v <= nVtx; v++) {
98 if (ipad == 1 || ipad == 12) ipad++;
100 TVirtualPad* p = c->cd(ipad);
101 p->SetFillColor(kWhite);
103 THStack*
stack =
new THStack(Form(
"vtx%02d", v),
104 Form(
"%+5.1f<v_{z}<%+5.1f",
105 vtxAxis.GetBinLowEdge(v),
106 vtxAxis.GetBinUpEdge(v)));
110 Char_t r = (q == 0 ?
'I' :
'O');
114 Warning(
"DrawCorrAcc",
"No correction for r=%c, v=%d", r, v);
117 Int_t nY = h1->GetNbinsY();
118 TH1* hh = h1->ProjectionX(Form(
"FMD%d%c", d, r), 1, nY);
124 hh->SetFillStyle(3004);
129 stack->SetMaximum(1.2);
130 stack->Draw(
"nostack");
134 c->SaveAs(
"acceptance.png");
TH2D * GetCorrection(UShort_t d, Char_t r, Double_t v) const
static Color_t RingColor(UShort_t d, Char_t r)
void DrawCorrAcc2(const char *fname, const char *option="colz")
const char * GetObjectName(Int_t what) const
const TAxis & GetVertexAxis() const
void ClearCanvas(TCanvas *c)
TFile * file
TList with histograms for a given trigger.
static AliForwardCorrectionManager & Instance()