6 # include <TLegendEntry.h>
7 # include <TObjString.h>
60 ULong_t pixel = TColor::Number2Pixel(n);
61 ULong_t r = TMath::Min((((pixel >> 16) & max) + off), max);
62 ULong_t g = TMath::Min((((pixel >> 8) & max) + off), max);
63 ULong_t b = TMath::Min((((pixel >> 0) & max) + off), max);
64 ULong_t next = (r << 16) | (g << 8) | (b << 0);
66 return TColor::GetColor(next);
88 Color_t
c = gse->GetMarkerColor();
111 TLegendEntry* e = l->AddEntry(Form(
"sys%02d",
id), title,
"f");
112 e->SetFillStyle(fill);
113 e->SetFillColor(kBlack);
114 e->SetLineColor(kBlack);
130 if (low == 0 && high == 0)
return -1;
214 Double_t ret = (eta >= 3.6 ? 0.02 : 0);
239 if (verb) Info(
"",
"Making graph from %s %p eff=%f", h->GetName(), l, eff);
242 reac.Insert(reac.Index(
"P", 1, 1, TString::kIgnoreCase),
" ");
243 reac.Append(
" --> CHARGED X");
251 gse->SetLineColor(h->GetLineColor());
252 gse->SetMarkerColor(h->GetMarkerColor());
253 gse->SetFillColor(h->GetFillColor());
254 gse->SetMarkerStyle(h->GetMarkerStyle());
255 gse->SetFillStyle(h->GetFillStyle());
257 gse->
SetYTitle(
"\\mathrm{d}N_{ch}/\\mathrm{d}\\eta");
258 gse->
SetKey(
"laboratory",
"CERN");
259 gse->
SetKey(
"accelerator",
"LHC");
260 gse->
SetKey(
"detector",
"FORWARD");
261 gse->
SetKey(
"reackey", reac);
262 gse->
SetKey(
"obskey",
"DN/DETARAP");
263 gse->
SetKey(
"title",
"Systematic study of dNch/deta over widest "
264 "possible eta region at the LHC");
265 gse->
SetKey(
"author",
"CHRISTENSEN");
266 gse->
SetKey(
"comment",
"We present dNch/deta over widest "
267 "possible eta region at the LHC");
268 gse->
SetKey(
"dscomment",
"The pseudo-rapidity density of charged particle");
270 fSys.EqualTo(
"pp",TString::kIgnoreCase) ?
271 "" :
"/NUCLEON"), Form(
"%d",
fSNN));
281 Info(
"",
"Looping over histogram w/%d bins", h->GetNbinsX());
282 for (
Int_t i = 1; i <= h->GetNbinsX(); i++) {
284 if (y < 1e-6)
continue;
286 Double_t ex = h->GetXaxis()->GetBinWidth(i)/2;
287 Double_t x = h->GetXaxis()->GetBinCenter(i);
362 if (low > 0 && high > 0)
return;
363 if (
fSys.EqualTo(
"pp", TString::kIgnoreCase)) {
365 case 900:
fLow = 0.001;
fHigh = 0.003;
break;
366 case 2760:
fLow = 0.0035;
fHigh = 0.006;
break;
369 case 8000:
fLow = 0.003;
fHigh = 0.006;
break;
448 if (value > 0)
return;
449 if (
fSys.EqualTo(
"pp", TString::kIgnoreCase)) {
451 case 900:
fValue = 0.02;
break;
452 case 2760:
fValue = 0.03;
break;
453 case 5023:
fValue = 0.00;
break;
456 case 13000:
fValue = 0.02;
break;
503 if (
fSys.EqualTo(
"pPb", TString::kIgnoreCase) ||
504 fSys.EqualTo(
"Pbp", TString::kIgnoreCase)) {
506 if (!method.BeginsWith(
"CENT")) m =
"CENT";
508 Double_t cent[] = { 0, 5, 10, 20, 40, 60, 80, 100+off };
509 Double_t zna[] = { 1.5, 1.5, 1.5, 1.5, 2., 2., 3. };
510 Double_t v0a[] = { 1.5, 1.5, 1.5, 1.5, 2., 2., 2. };
511 Double_t v0m[] = { 1.5, 1.5, 1.5, 1.5, 2., 2., 4. };
512 Double_t cl1[] = { 2.5, 2.5, 2.5, 4.0, 6., 10., 11. };
514 if (m.Contains(
"CENTZNA") || m.Contains(
"CENTZNC")) est = zna;
515 else if (m.Contains(
"CENTV0A") || m.Contains(
"CENTV0C")) est = v0a;
516 else if (m.Contains(
"CENTV0M")) est = v0m;
517 else if (m.Contains(
"CENTCL1")) est = cl1;
519 Warning(
"",
"Couldn't find estimator from %s", method.Data());
523 fLookup =
new TH1D(
"lookup",
"Centrality error lookup", 7, cent);
524 for (
Int_t i = 1; i <= 7; i++)
fLookup->SetBinContent(i,est[i-1]/100);
528 fLookup =
new TH1D(
"lookup",
"Centrality error lookup", 100, 0, 100);
529 Double_t min = 0.004, max = 0.062, top = 100;
536 for (
Int_t i = 1; i <= 100; i++) {
538 Double_t e = max * TMath::Power(c/top,2)+min;
555 return Form(
"%s_%03dd%02d_%03dd%02d",
568 if (!
fLookup) { low = high = 0;
return; }
570 low = high =
fLookup->GetBinContent(bin);
590 Info(
"",
"Extracting centrality from %s", name.Data());
591 Int_t idx = name.Index(
"_cent");
593 Warning(
"GetCentrality",
"Don't know how to parse %s",
597 name.Remove(0,idx+5);
598 name.ReplaceAll(
"d",
".");
599 name.ReplaceAll(
"_",
" ");
601 TObjString* first =
static_cast<TObjString*
>(tokens->At(0));
602 TObjString* second =
static_cast<TObjString*
>(tokens->At(1));
603 fCMin = first->String().Atof();
604 fCMax = second->String().Atof();
642 if (
fCent < 0)
return 0;
658 if (tt.EqualTo(
"OFFLINE") ||tt.EqualTo(
"UNKNOWN"))a=
new OfflineAdder(s,e);
659 else if (tt.EqualTo(
"INEL") ||tt.EqualTo(
"MBOR")) a=
new INELAdder(s,e);
660 else if (tt.EqualTo(
"INEL>0")||tt.EqualTo(
"INELGT0"))a=
new INELGt0Adder(s,e);
661 else if (tt.EqualTo(
"NSD") ||tt.EqualTo(
"V0AND")) a=
new NSDAdder(s,e);
663 Info(
"Create",
"Created %s adder for %s/%s/%hu/%s: %p",
const char * GetTriggerName() const
virtual Int_t MakeTrigger(GraphSysErr *gse, TLegend *l) const
void SetSysLineColor(Int_t id, Color_t color)
void SetYTitle(const char *title)
virtual Double_t GetDensity(Short_t w) const
static SysErrorAdder * Create(const TString &t, const TString &s, UShort_t e, const TString &c)
void SetSysLineStyle(Int_t id, Style_t style)
virtual GraphSysErr * Make(TH1 *h, TLegend *l, Double_t eff=1, Bool_t verb=false)
OfflineAdder(const TString &sys, UShort_t sNN)
virtual Double_t GetMerging(Short_t) const
virtual const char * GetTriggerName() const
NSDAdder(const TString &sys, UShort_t sNN, Double_t value=-1)
virtual void GetTrigger(Double_t &low, Double_t &high) const =0
virtual Double_t GetHadron(Double_t eta) const
void SetSysOption(Int_t id, EDrawOption_t opt)
const char * MakeName() const
Int_t MakeTrigger(GraphSysErr *gse, TLegend *l) const
void SetKey(const char *key, const char *value, Bool_t replace=false)
void SetPointError(Int_t i, Double_t ex)
virtual void GetTrigger(Double_t &low, Double_t &high) const
void SetSysFillStyle(Int_t id, Style_t style)
void SetSysLineWidth(Int_t id, Width_t width)
void SetSysError(Int_t id, Double_t eyl, Double_t eyh)
virtual void GetTrigger(Double_t &low, Double_t &high) const
void AddQualifier(const TString &key, const TString &value, Bool_t replace=false)
const char * GetSysTitle(Int_t id) const
void AddLegend(TLegend *l, Int_t id, const char *title, Style_t fill) const
Int_t MakeTrigger(GraphSysErr *gse, TLegend *l) const
void SetStatError(Int_t i, Double_t ey)
virtual void GetTrigger(Double_t &low, Double_t &high) const
virtual GraphSysErr * Make(TH1 *h, TLegend *l, Double_t eff=1, Bool_t verb=false)
void SetPoint(Int_t i, Double_t x, Double_t y)
virtual void GetTrigger(Double_t &low, Double_t &high) const
UInt_t DefineCommon(const char *title, Bool_t relative, Double_t ey, EDrawOption_t option=kFill)
virtual const char * MakeName() const
UInt_t DeclarePoint2Point(const char *title, Bool_t relative, EDrawOption_t option=kBar)
Int_t MakeTrigger(GraphSysErr *gse, TLegend *l) const
void SetSysFillColor(Int_t id, Color_t color)
An (X,Y) graph with configurable errors.
Int_t ModColor(Color_t n, UShort_t off) const
virtual Int_t MakeEmpirical(GraphSysErr *gse, TLegend *l) const
virtual void GetTrigger(Double_t &low, Double_t &high) const
void SetSumOption(EDrawOption_t opt)
void SetSumLineWidth(Width_t width)
INELAdder(const TString &sys, UShort_t sNN, Double_t low=-1, Double_t high=-1)
Double_t GetCentrality(TH1 *h, Bool_t verb=false)
void ModError(GraphSysErr *gse, Int_t id, Style_t fill, TLegend *l, UShort_t off=64) const
SysErrorAdder(const TString &sys, UShort_t sNN, const TString &trig)
virtual Double_t GetEmpirical() const
Int_t MakeMerging(GraphSysErr *gse, TLegend *l) const
void SetSumTitle(const char *title)
Int_t MakeTrigger(GraphSysErr *gse, TLegend *l) const
virtual const char * GetTriggerString() const
INELGt0Adder(const TString &sys, UShort_t sNN)
virtual Int_t MakeEmpirical(GraphSysErr *gse, TLegend *l) const
virtual Int_t MakeHadron(GraphSysErr *gse, TLegend *l) const
Int_t MakeTrigger(GraphSysErr *gse, TLegend *l) const
virtual const char * GetTriggerString() const
Int_t MakeDensity(GraphSysErr *gse, TLegend *l) const
void SetSumLineColor(Color_t color)
void SetXTitle(const char *title)
CENTAdder(const TString &sys, UShort_t sNN, const TString &method)