18 # include <TSeqCollection.h> 19 # include <TLegendEntry.h> 78 return sMin + TMath::Power(x/xMax, 2)*(sMax-sMin);
91 return SysEval(x, sMin, sMax, 80);
104 return SysEval(x, sMin, sMax, 2);
119 if (!gROOT->GetClass(
"GraphSysErr"))
return 0;
120 TString bin; bin.Form(
"%03dd%02d_%03dd%02d",
123 TString sub(bin); sub.Prepend(
"cent"); sub.Append(
"/dndeta");
124 TString nme(bin); nme.Prepend(
"CENT_");
128 Color_t col = g->GetMarkerColor();
135 gse->
SetTitle(Form(
"%5.1f - %5.1f%%", c1, c2));
136 gse->
SetKey(
"author",
"PREGHENELLA : 20150");
137 gse->
SetKey(
"title",
"dNch/deta in PbPb at 5023 GeV");
138 gse->
SetKey(
"obskey",
"DN/DETARAP");
139 gse->
SetKey(
"reackey",
"PB PB --> CHARGED X");
140 gse->
SetKey(
"laboratory",
"CERN");
141 gse->
SetKey(
"accelerator",
"LHC");
142 gse->
SetKey(
"detector",
"TRACKLETS");
143 gse->
SetKey(
"reference",
"ALICE-AN-2830");
144 gse->
AddQualifier(
"CENTRALITY IN PCT", Form(
"%.1f TO %.1f",c1,c2));
148 gse->SetMarkerStyle(g->GetMarkerStyle());
149 gse->SetMarkerSize(g->GetMarkerSize());
151 gse->SetMarkerColor(col);
152 gse->SetLineColor(col);
153 gse->SetFillColor(col);
160 MakeCommon(gse,
"Particle composition", 0.01, col);
162 MakeCommon(gse,
"pT extrapolation", 0.02, col);
164 MakeCommon(gse,
"Background subrtaction", bg, col);
169 for (
Int_t i = 1; i <= g->GetNbinsX(); i++) {
170 Double_t eta = g->GetXaxis()->GetBinCenter(i);
171 Double_t eEta = g->GetXaxis()->GetBinWidth(i)/2;
173 if (xo > 2)
continue;
174 Double_t ea = 0.02*TMath::Power(xo/2,2);
175 gse->
SetPoint(j, eta, g->GetBinContent(i));
177 gse->
SetStatError(j, g->GetBinError(i),g->GetBinError(i));
178 gse->
SetSysError(acc, j, eEta, eEta, ea/100, ea/100);
198 GetO(TDirectory*
dir,
const char* name, TClass* cls=0)
201 Warning(
"GetO",
"No directory passed");
207 Warning(
"GetO",
"object %s not found in %s",
208 name, dir->GetPath());
212 if (!o->IsA()->InheritsFrom(cls)) {
213 Warning(
"GetO",
"Object %s in %s is not a %s, but a %s",
214 name, dir->GetPath(), cls->GetName(), o->ClassName());
228 TDirectory*
GetD(TDirectory*
dir,
const char* name)
230 return static_cast<TDirectory*
>(
GetO(dir,name,TDirectory::Class()));
244 return static_cast<TH1*
>(
GetO(dir,name,TH1::Class()));
255 if (!gROOT->GetClass(
"GraphSysErr"))
256 gROOT->LoadMacro(
"$HOME/GraphSysErr/GraphSysErr.C+g");
258 TString base =
gSystem->BaseName(input); base.ReplaceAll(
".root",
"");
259 TFile*
file = TFile::Open(input,
"READ");
262 TH1* cent =
GetH1(file,
"realCent");
266 for (
Int_t i = 1; i <= cent->GetNbinsX(); i++) {
267 Double_t c1 = cent->GetXaxis()->GetBinLowEdge(i);
268 Double_t c2 = cent->GetXaxis()->GetBinUpEdge(i);
272 if (first) g->Draw(
"quad stat combine axis");
273 else g->Draw(
"quad stat combine");
277 TString obase(base); obase.Prepend(
"GSE_");
279 std::ofstream out(Form(
"%s.input", obase.Data()));
281 out <<
"*E" << std::endl;
284 TFile* rout = TFile::Open(Form(
"%s.root", obase.Data()),
"RECREATE");
285 stack->Write(
"container", TObject::kSingleKey);
297 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.
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)