18 # include <TSeqCollection.h> 19 # include <TLegendEntry.h> 43 else if (c < 10)
return 1;
44 else if (c < 20)
return 2;
45 else if (c < 30)
return 3;
46 else if (c < 40)
return 4;
47 else if (c < 50)
return 5;
48 else if (c < 60)
return 6;
49 else if (c < 70)
return 7;
50 else if (c < 80)
return 8;
51 else if (c < 90)
return 9;
66 const Color_t
cc[] = { kMagenta+2,
118 return sMin + TMath::Power(x/xMax, 2)*(sMax-sMin);
123 return SysEval(x, sMin, sMax, 80);
127 return SysEval(x, sMin, sMax, 2);
148 if (!gROOT->GetClass(
"GraphSysErr"))
return 0;
149 TString bin; bin.Form(
"%03dd%02d_%03dd%02d",
152 Bool_t isAll = (c1+1.e-9 >= c2);
153 if (isAll) bin =
"all";
155 if (!isAll) sub.Prepend(
"cent");
156 sub.Append(Form(
"/results%dd/result", dimen));
157 TString nme(bin); nme.Prepend(
"CENT_");
162 Printf(
"Trigger efficiency: %6.4f", eff);
163 if (eff < 1e-6) eff = 1;
165 g->SetBinContent(0,0);
171 Double_t aMin = sNN == 5440 ? -0.09 : 0.02;
172 Double_t pComp = sNN == 5440 ? 0.002 : 0.01;
173 Double_t wDcy = sNN == 5440 ? 0.004 : 0.01;
174 Double_t ptInt = sNN == 5440 ? 0.004 : 0.02;
176 Double_t egDep = sNN == 5440 ? 0.000 : 0.02;
177 Double_t cMin = sNN == 5440 ? 0.001 : sNN == 5023 ? 0.005 : 0.004;
178 Double_t cMax = sNN == 5440 ? 0.048 : sNN == 5023 ? 0.075 : 0.062;
179 Double_t tMax = sNN == 5440 ? 0.040 : 0;
180 Double_t tMin = sNN == 5440 ? 0.003 : 0;
181 Double_t bgMax = sNN == 5440 ? 0.011 : 0.02;
182 Double_t bgMin = sNN == 5440 ? 0.005 : 0.001;
185 Double_t em1 = sNN == 5440 ? 0.012 : sNN == 5023 ? 0.04 : 0.02;
186 Double_t em2 = sNN == 5440 ? 0.040 : 5023 ? 0.04 : 0.02;
187 Double_t em = c1 >= 80 ? em2 : c1 >= 70 ? em1 : 0;
191 gse->
SetTitle(Form(
"%5.1f - %5.1f%%", c1, c2));
193 gse->
SetKey(
"title", Form(
"dNch/deta in PbPb at %d GeV", sNN));
194 gse->
SetKey(
"obskey",
"DN/DETARAP");
195 gse->
SetKey(
"reackey",
"PB PB --> CHARGED X");
196 gse->
SetKey(
"laboratory",
"CERN");
197 gse->
SetKey(
"accelerator",
"LHC");
198 gse->
SetKey(
"detector",
"TRACKLETS");
199 gse->
SetKey(
"reference", sNN==5023 ?
"ALICE-AN-2830" :
"ALICE-AN-2180");
200 if (!isAll)gse->
AddQualifier(
"CENTRALITY IN PCT", Form(
"%.1f TO %.1f",c1,c2));
201 gse->
AddQualifier(
"SQRT(S)/NUCLEON IN GEV", Form(
"%d", sNN));
204 gse->SetMarkerStyle(g->GetMarkerStyle());
205 gse->SetMarkerSize(g->GetMarkerSize());
207 gse->SetMarkerColor(col);
208 gse->SetLineColor(col);
209 gse->SetFillColor(col);
216 MakeCommon(gse,
"Particle composition", pComp, col);
220 MakeCommon(gse,
"pT extrapolation", ptInt, col);
222 pte =
MakeP2P(gse,
"pT extrapolation", col);
223 MakeCommon(gse,
"Background subtraction", bg, col);
229 MakeCommon(gse,
"Material budget", 0.001, col);
231 MakeCommon(gse,
"Tracklet selection", tkl, col);
238 acc =
MakeP2P(gse,
"Acceptance", col);
244 for (
Int_t i = 1; i <= g->GetNbinsX(); i++) {
245 Double_t eta = g->GetXaxis()->GetBinCenter(i);
246 Double_t eEta = g->GetXaxis()->GetBinWidth(i)/2;
248 if (xo > 2)
continue;
249 Double_t ea = aMin*TMath::Power(xo/2,2);
251 gse->
SetPoint(j, eta, g->GetBinContent(i));
253 gse->
SetStatError(j, g->GetBinError(i),g->GetBinError(i));
254 if (acc > 0) gse->
SetSysError(acc, j, eEta, eEta, ea/100, ea/100);
255 if (pte > 0) gse->
SetSysError(ptr, j, eEta, eEta, ep/100, ep/100);
281 if (!gROOT->GetClass(
"GraphSysErr"))
return 0;
282 TString bin; bin.Form(
"%03dd%02d_%03dd%02d",
285 Bool_t isAll = (c1+1.e-9 >= c2);
286 if (isAll) bin =
"all";
288 if (!isAll) sub.Prepend(
"cent");
289 sub.Append(Form(
"/results%dd/simG",dimen));
290 TString nme(bin); nme.Prepend(
"CENTT_");
299 gse->
SetTitle(Form(
"%5.1f - %5.1f%%", c1, c2));
300 gse->
SetKey(
"author", (sNN == 5023 ?
"PREGHENELLA : 2015":
"SHAHOYAN : 2013"));
301 gse->
SetKey(
"title", Form(
"dNch/deta in PbPb at %d GeV", sNN));
302 gse->
SetKey(
"obskey",
"DN/DETARAP");
303 gse->
SetKey(
"reackey",
"PB PB --> CHARGED X");
304 gse->
SetKey(
"laboratory",
"CERN");
305 gse->
SetKey(
"accelerator",
"LHC");
306 gse->
SetKey(
"detector",
"TRACKLETS");
307 gse->
SetKey(
"reference", sNN==5023 ?
"ALICE-AN-2830" :
"ALICE-AN-2180");
308 if (!isAll)gse->
AddQualifier(
"CENTRALITY IN PCT", Form(
"%.1f TO %.1f",c1,c2));
309 gse->
AddQualifier(
"SQRT(S)/NUCLEON IN GEV", Form(
"%d", sNN));
312 gse->SetMarkerStyle(g->GetMarkerStyle());
313 gse->SetMarkerSize(g->GetMarkerSize());
315 gse->SetMarkerColor(col);
316 gse->SetLineColor(col);
317 gse->SetFillColor(col);
326 for (
Int_t i = 1; i <= g->GetNbinsX(); i++) {
327 Double_t eta = g->GetXaxis()->GetBinCenter(i);
328 Double_t eEta = g->GetXaxis()->GetBinWidth(i)/2;
330 if (xo > 2)
continue;
331 Double_t ea = 0.02*TMath::Power(xo/2,2);
332 gse->
SetPoint(j, eta, g->GetBinContent(i));
334 gse->
SetStatError(j, g->GetBinError(i),g->GetBinError(i));
344 GetO(TDirectory*
dir,
const char* name, TClass* cls=0)
347 Warning(
"GetO",
"No directory passed");
353 Warning(
"GetO",
"object %s not found in %s",
354 name, dir->GetPath());
358 if (!o->IsA()->InheritsFrom(cls)) {
359 Warning(
"GetO",
"Object %s in %s is not a %s, but a %s",
360 name, dir->GetPath(), cls->GetName(), o->ClassName());
366 TDirectory*
GetD(TDirectory*
dir,
const char* name)
368 return static_cast<TDirectory*
>(
GetO(dir,name,TDirectory::Class()));
374 return static_cast<TH1*
>(
GetO(dir,name,TH1::Class()));
384 if (!gROOT->GetClass(
"GraphSysErr"))
385 gROOT->LoadMacro(
"$HOME/GraphSysErr/GraphSysErr.C+g");
388 TFile*
file = TFile::Open(Form(
"%s/result.root",input),
"READ");
390 Warning(
"ExtractGSE2",
"Failed to open %s/result.root", input);
395 if (base.EndsWith(
"unit")) dimen = 0;
396 else if (base.EndsWith(
"const")) dimen = 1;
397 else if (base.EndsWith(
"eta")) dimen = 2;
398 else if (base.EndsWith(
"etaipz")) dimen = 3;
400 Error(
"ExtractGSE2",
"Don't know how to extract dimension from %s",base);
405 TH1* cent =
GetH1(file,
"realCent");
410 for (
Int_t i = 1; i <= cent->GetNbinsX(); i++) {
411 Double_t c1 = cent->GetXaxis()->GetBinLowEdge(i);
412 Double_t c2 = cent->GetXaxis()->GetBinUpEdge(i);
419 if (first) g->Draw(
"quad stat combine axis");
420 else g->Draw(
"quad stat combine");
421 if (t) t->Draw(
"quad");
426 frame = gse->
GetMulti()->GetHistogram();
429 if (frame) frame->SetMinimum(1);
433 std::ofstream out(Form(
"%s/gse.input", base.Data()));
435 out <<
"*E" << std::endl;
438 TFile* rout = TFile::Open(Form(
"%s/gse.root", base.Data()),
"RECREATE");
439 stack->AddAll(truths);
440 stack->Write(
"container", TObject::kSingleKey);
448 ExtractGSE(Form(
"MiddNdeta_0x%x.root", flags));
void Export(std::ostream &out=std::cout, Option_t *option="", Int_t nsign=2)
void SetSysLineColor(Int_t id, Color_t color)
void SetYTitle(const char *title)
void SetKey(const char *key, const char *value, Bool_t replace=false)
void SetPointError(Int_t i, Double_t ex)
void SetSysError(Int_t id, Double_t eyl, Double_t eyh)
void SetCommonSumLineColor(Color_t color)
void AddQualifier(const TString &key, const TString &value, Bool_t replace=false)
void SetCommonSumOption(EDrawOption_t opt)
void SetStatError(Int_t i, Double_t ey)
void SetPoint(Int_t i, Double_t x, Double_t y)
void SetTitle(const char *name)
UInt_t DefineCommon(const char *title, Bool_t relative, Double_t ey, EDrawOption_t option=kFill)
UInt_t DeclarePoint2Point(const char *title, Bool_t relative, EDrawOption_t option=kBar)
void SetDataOption(EDrawOption_t opt)
void SetSysFillColor(Int_t id, Color_t color)
An (X,Y) graph with configurable errors.
TMultiGraph * GetMulti(Option_t *option="")
void SetSumOption(EDrawOption_t opt)
TFile * file
TList with histograms for a given trigger.
void SetSumFillColor(Color_t color)
void SetSumLineColor(Color_t color)
void SetXTitle(const char *title)
void SetCommonSumFillColor(Color_t color)