19 c->SetRightMargin(.05);
20 c->SetBottomMargin(.1);
32 const char*
test =
gSystem->GetLibraries(
"PWGLFforward2",
"D",
false);
33 if (test && test[0] !=
'\0')
return;
34 gROOT->Macro(
"$ALICE_PHYSICS/PWGLF/FORWARD/analysis2/scripts/LoadLibs.C");
62 TFile*
file = TFile::Open(fname,
"READ");
64 Error(
"DrawCorrSecMap",
"Failed to open %s", fname);
68 pname.ReplaceAll(
".root",
".png");
69 pname =
gSystem->BaseName(pname);
71 AliCentralMultiplicityTask::Manager* mgr =
72 new AliCentralMultiplicityTask::Manager;
73 const char* objName = mgr->GetObjectName(0);
77 Error(
"DrawCorrCentralSecMap",
"Object '%s' not found in %s",
86 TCanvas* c =
new TCanvas(
"c",
"c", w, w / TMath::Sqrt(2));
92 gStyle->SetOptStat(0);
93 gStyle->SetTitleColor(0);
94 gStyle->SetTitleStyle(0);
95 gStyle->SetTitleBorderSize(0);
96 gStyle->SetTitleX(.1);
98 gStyle->SetTitleW(.8);
99 gStyle->SetTitleH(.09);
100 gStyle->SetFrameFillColor(kWhite);
101 gStyle->SetFrameBorderSize(1);
102 gStyle->SetFrameBorderMode(1);
103 gStyle->SetPalette(1);
107 Bool_t h2d = (opt.Contains(
"lego") ||
108 opt.Contains(
"surf") ||
109 opt.Contains(
"col"));
114 Int_t nVtx = vtxAxis.GetNbins();
115 c->Divide((nVtx+2)/3, 3, 0, 0);
117 for (
UShort_t v=1; v <= nVtx+1; v++) {
121 TLatex* l =
new TLatex(.5, .5,
122 "#frac{#sum N_{ch,SPD0}}{#sum N_{ch,primary}}");
124 l->SetText(.5,.5,
"#frac{dN_{ch}/d#eta}{#sum N_{ch,primary}}");
135 TFile* f = TFile::Open(
"forward_mccorr.root",
"READ");
137 Warning(
"DrawCorrCentralSecMap2",
"File forward_mccorr.root not found");
140 TList* l3 =
static_cast<TList*
>(f->Get(
"CentralSums"));
142 Warning(
"DrawCorrCentralSecMap2",
"No CentralSums list found");
146 TH1* xyz =
static_cast<TH1*
>(l3->FindObject(
"xyz"));
148 Warning(
"DrawCorrCentralSecMap2",
"no xyz histogram found");
152 xyz =
static_cast<TH1*
>(xyz->Clone());
153 xyz->SetDirectory(0);
158 TVirtualPad* p = c->cd(ipad);
159 p->SetFillColor(kWhite);
165 p->SetRightMargin(0.13);
171 TH1D* pr = h1->ProjectionX(Form(
"vtxbin%02d", v), -1, -1,
"e");
172 TH1D* nr =
static_cast<TH1D*
>(pr->Clone(
"norm"));
175 pr->SetTitle(Form(
"%+5.1f<v_{z}<%+5.1f",
176 vtxAxis.GetBinLowEdge(v),
177 vtxAxis.GetBinUpEdge(v)));
178 pr->SetMarkerColor(kRed+1);
179 pr->SetFillColor(kRed+1);
180 pr->SetFillStyle(3001);
181 pr->SetMaximum(1.65);
182 pr->GetXaxis()->SetRangeUser(-3.1,3.1);
184 Int_t nX = h1->GetNbinsX();
185 Int_t nY = h1->GetNbinsY();
187 for (
Int_t i = 1; i <= nX; i++) {
189 for (
Int_t j = 1; j <= nY; j++)
190 if (h1->GetBinContent(i,j) > 0.001) nonZero++;
191 nr->SetBinContent(i, nonZero);
202 c->SaveAs(pname.Data());
TH2D * GetCorrection(Double_t v) const
void ClearCanvas(TCanvas *c)
TFile * file
TList with histograms for a given trigger.
const TAxis & GetVertexAxis() const
void test(int runnumber=195345)
void DrawCorrCentralSecMap2(const char *fname, const char *option="colz", bool tracklets=true)