6 # include <TLegendEntry.h>
7 # include <TObjString.h>
63 ULong_t pixel = TColor::Number2Pixel(n);
64 ULong_t r = TMath::Min((((pixel >> 16) & max) + off), max);
65 ULong_t g = TMath::Min((((pixel >> 8) & max) + off), max);
66 ULong_t b = TMath::Min((((pixel >> 0) & max) + off), max);
67 ULong_t next = (r << 16) | (g << 8) | (b << 0);
69 return TColor::GetColor(next);
91 Color_t
c = gse->GetMarkerColor();
114 TLegendEntry* e = l->AddEntry(Form(
"sys%02d",
id), title,
"f");
115 e->SetFillStyle(fill);
116 e->SetFillColor(kBlack);
117 e->SetLineColor(kBlack);
133 if (low == 0 && high == 0)
return -1;
220 Double_t ret = (eta >= 3.6 ? 0.02 : 0);
245 if (verb) Info(
"",
"Making graph from %s %p eff=%f", h->GetName(), l, eff);
248 reac.Insert(reac.Index(
"P", 1, 1, TString::kIgnoreCase),
" ");
249 reac.Append(
" --> CHARGED X");
257 gse->SetLineColor(h->GetLineColor());
258 gse->SetMarkerColor(h->GetMarkerColor());
259 gse->SetFillColor(h->GetFillColor());
260 gse->SetMarkerStyle(h->GetMarkerStyle());
261 gse->SetFillStyle(h->GetFillStyle());
263 gse->
SetYTitle(
"\\mathrm{d}N_{ch}/\\mathrm{d}\\eta");
264 gse->
SetKey(
"laboratory",
"CERN");
265 gse->
SetKey(
"accelerator",
"LHC");
266 gse->
SetKey(
"detector",
"FORWARD");
267 gse->
SetKey(
"reackey", reac);
268 gse->
SetKey(
"obskey",
"DN/DETARAP");
269 gse->
SetKey(
"title",
"Systematic study of dNch/deta over widest "
270 "possible eta region at the LHC");
271 gse->
SetKey(
"author",
"CHRISTENSEN");
272 gse->
SetKey(
"abstract",
"We present dNch/deta over widest "
273 "possible eta region at the LHC");
274 gse->
SetKey(
"dscomment",
"The pseudo-rapidity density of charged particle");
276 fSys.EqualTo(
"pp",TString::kIgnoreCase) ?
277 "" :
"/NUCLEON"), Form(
"%d",
fSNN));
287 Info(
"",
"Looping over histogram w/%d bins", h->GetNbinsX());
288 for (
Int_t i = 1; i <= h->GetNbinsX(); i++) {
290 if (y < 1e-6)
continue;
292 Double_t ex = h->GetXaxis()->GetBinWidth(i)/2;
293 Double_t x = h->GetXaxis()->GetBinCenter(i);
400 if (low > 0 && high > 0)
return;
401 if (
fSys.EqualTo(
"pp", TString::kIgnoreCase)) {
403 case 900:
fLow = 0.001;
fHigh = 0.003;
break;
404 case 2760:
fLow = 0.0035;
fHigh = 0.006;
break;
407 case 8000:
fLow = 0.003;
fHigh = 0.006;
break;
506 if (value > 0)
return;
507 if (
fSys.EqualTo(
"pp", TString::kIgnoreCase)) {
509 case 900:
fValue = 0.02;
break;
510 case 2760:
fValue = 0.03;
break;
511 case 5023:
fValue = 0.044;
break;
514 case 13000:
fValue = 0.02;
break;
536 if (
TString(gse->GetName()).EqualTo(
"V0AND")) {
585 if (
fSys.EqualTo(
"pPb", TString::kIgnoreCase) ||
586 fSys.EqualTo(
"Pbp", TString::kIgnoreCase)) {
588 if (!method.BeginsWith(
"CENT")) m =
"CENT";
590 Double_t cent[] = { 0, 5, 10, 20, 40, 60, 80, 100+off };
591 Double_t zna[] = { 1.5, 1.5, 1.5, 1.5, 2., 2., 3. };
592 Double_t v0a[] = { 1.5, 1.5, 1.5, 1.5, 2., 2., 2. };
593 Double_t v0m[] = { 1.5, 1.5, 1.5, 1.5, 2., 2., 4. };
594 Double_t cl1[] = { 2.5, 2.5, 2.5, 4.0, 6., 10., 11. };
596 if (m.Contains(
"CENTZNA") || m.Contains(
"CENTZNC")) est = zna;
597 else if (m.Contains(
"CENTV0A") || m.Contains(
"CENTV0C")) est = v0a;
598 else if (m.Contains(
"CENTV0M")) est = v0m;
599 else if (m.Contains(
"CENTCL1")) est = cl1;
601 Warning(
"",
"Couldn't find estimator from %s", method.Data());
605 fLookup =
new TH1D(
"lookup",
"Centrality error lookup", 7, cent);
606 for (
Int_t i = 1; i <= 7; i++)
fLookup->SetBinContent(i,est[i-1]/100);
610 fLookup =
new TH1D(
"lookup",
"Centrality error lookup", 100, 0, 100);
611 Double_t min = 0.004, max = 0.062, top = 100;
619 for (
Int_t i = 1; i <= 100; i++) {
621 Double_t e = max * TMath::Power(c/top,2)+min;
638 return Form(
"%s_%03dd%02d_%03dd%02d",
651 if (!
fLookup) { low = high = 0;
return; }
653 low = high =
fLookup->GetBinContent(bin);
680 Info(
"",
"Extracting centrality from %s", name.Data());
681 Int_t idx = name.Index(
"_cent");
683 Warning(
"GetCentrality",
"Don't know how to parse %s",
687 name.Remove(0,idx+5);
688 name.ReplaceAll(
"d",
".");
689 name.ReplaceAll(
"_",
" ");
691 TObjString* first =
static_cast<TObjString*
>(tokens->At(0));
692 TObjString* second =
static_cast<TObjString*
>(tokens->At(1));
693 fCMin = first->String().Atof();
694 fCMax = second->String().Atof();
732 if (
fCent < 0)
return 0;
749 else if (tt.EqualTo(
"UNKNOWN")) a=
new OfflineAdder(s,e);
750 else if (tt.EqualTo(
"INEL")) a=
new INELAdder(s,e);
752 else if (tt.EqualTo(
"INELGT0")) a=
new INELGt0Adder(s,e);
753 else if (tt.EqualTo(
"NSD")) a=
new NSDAdder(s,e);
754 else if (tt.EqualTo(
"MBOR")) a=
new BareAdder(s,e,tt);
755 else if (tt.EqualTo(
"V0AND")) a=
new BareAdder(s,e,tt);
756 else if (tt.EqualTo(
"VISX")) a=
new BareAdder(s,e,tt);
758 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)
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 void GetTrigger(Double_t &low, Double_t &high) const
UInt_t DeclarePoint2Point(const char *title, Bool_t relative, EDrawOption_t option=kBar)
const char * MakeName(Double_t) const
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
const char * MakeName(Double_t e) 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
Int_t MakeTrigger(GraphSysErr *gse, TLegend *l) const
virtual Int_t MakeHadron(GraphSysErr *gse, TLegend *l) const
virtual const char * MakeName(Double_t eff) const
Int_t MakeTrigger(GraphSysErr *gse, TLegend *l) const
virtual const char * GetTriggerString() const
BareAdder(const TString &sys, UShort_t sNN, TString &trig)
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)