14 else if (c < 10)
return 1;
15 else if (c < 20)
return 2;
16 else if (c < 30)
return 3;
17 else if (c < 40)
return 4;
18 else if (c < 50)
return 5;
19 else if (c < 60)
return 6;
20 else if (c < 70)
return 7;
21 else if (c < 80)
return 8;
22 else if (c < 90)
return 9;
37 const Color_t
cc[] = { kMagenta+2,
65 return sMin + TMath::Power(x/xMax, 2)*(sMax-sMin);
78 return SysEval(x, sMin, sMax, 80);
91 return SysEval(x, sMin, sMax, 2);
117 <<
"*dscomment: The pseudo-rapidity density of charged particle\n" 118 <<
"*reackey: PB PB --> CHARGED X\n" 119 <<
"*obskey: DN/DETARAP\n" 120 <<
"*qual: CENTRALITY IN PCT : " << c1 <<
" TO " << c2 <<
"\n" 121 <<
"*qual: SQRT(S)/NUCLEON IN GEV : 5023\n";
123 o <<
"*dserror: " << strMid <<
" PCT : Weak decays\n" 124 <<
"*dserror: " << pidMid <<
" PCT : Particle composition\n" 125 <<
"*dserror: " << bgMid <<
" PCT : Background subtraction\n";
127 o <<
"*dserror: 1 PCT : pT extrapolation\n" 128 <<
"*dserror: " << cSys <<
" PCT : Centrality\n" 129 <<
"*xheader: ETARAP\n" 130 <<
"*yheader: DN/DETARAP\n" 131 <<
"*data: x : y" << std::endl;
133 TAxis* xa = h->GetXaxis();
134 for (
Int_t i = 0; i < h->GetNbinsX(); i++) {
137 Double_t x = h->GetXaxis()->GetBinCenter(j);
138 Double_t ex = h->GetXaxis()->GetBinWidth(j)/2;
140 if (cc < 1e-8)
continue;
141 o <<
" " << xa->GetBinLowEdge(j) <<
" TO " << xa->GetBinUpEdge(j)
142 <<
"; " << cc <<
" +-" << h->GetBinError(j)
143 <<
" (DSYS=" << 0.01+0.01*TMath::Power(xo/2,2) <<
" PCT:Acceptance";
148 o <<
",DSYS=" << bg <<
" PCT:Background subtraction" 149 <<
",DSYS=" << pid <<
" PCT:Particle composition" 150 <<
",DSYS=" << str <<
" PCT:Weak decay";
156 o <<
"*dataend:\n" << std::endl;
173 Double_t ey = TMath::Max(eyl,eyh)/y;
174 eMin = TMath::Min(ey, eMin);
175 eMax = TMath::Max(ey, eMax);
177 Printf(
"%4.1f - %4.1f%%: Least: %6.2f%%, Largest %6.2f%%",
178 c1, c2, eMin*100, eMax*100);
190 const char* outname=
"TRACKLETS_5023_PbPb.input",
200 while ((obj = next())) {
201 if (
TString(obj->GetName()).Contains(
"DataCorrSignal"))
204 Info(
"ExtractdNdeta",
"Defining %d centrality bins", nBins);
207 c[0] = 0; c[1] = 10; c[2] = 20; c[3] = 40; c[4] = 60; c[5] = 80;
209 else if (nBins >= 9) {
210 c[0] = 0; c[1] = 5; c[2] = 10; c[3] = 20; c[4] = 30; c[5] = 40;
211 c[6] = 50; c[7] = 60; c[8] = 70; c[9] = 80;
212 if (nBins >= 10) c[10] = 90;
213 if (nBins >= 11) c[11] = 100;
216 THStack* all =
new THStack(
"all",
"all");
217 std::ofstream out(outname);
218 std::ostream& o = out;
221 o <<
"*author: SHAHOYAN : 2015\n" 222 <<
"*title: Full centrality dependence of the charged " 223 <<
"particle pseudo-rapidity density over the widest " 224 <<
"possible pseudo-rapidity range in Pb-Pb collisions " 226 <<
"*detector: TRACKLETS\n" 227 <<
"*experiment: CERN-LHC-TRACKLETS\n" 228 <<
"*comment: CERN-LHC: We present the charged particle pseudo-rapidity " 229 <<
"density of charged particles in Pb-Pb collisions at sqrt(s)/nucleon " 230 "= 5.02 over the widest possible pseudo-rapidity and centrality range " 231 <<
"possible.\n" << std::endl;
233 for (
Int_t i = 0; i < nBins; i++) {
234 TString hName = Form(
"bin%d_DataCorrSignal_PbPb",i);
235 TH1* h =
static_cast<TH1*
>(arr->FindObject(hName));
237 hName.ReplaceAll(
"PbPb",
"PBPB");
238 h =
static_cast<TH1*
>(arr->FindObject(hName));
240 Warning(
"",
"Histogram (%s) missing for bin %d", hName.Data(), i);
247 h->SetLineColor(col);
248 h->SetMarkerColor(col);
249 h->SetFillColor(col);
251 Info(
"",
"Making GSE for %0d%% to %3d%% (%d)",
254 MakeGSE(o, h, c[i], c[i+1], reweigh);
257 o <<
"*E" << std::endl;
260 TCanvas* can =
new TCanvas(
"c",
"C", 1600, 800);
261 can->SetRightMargin(0.2);
262 can->SetTopMargin(0.01);
264 TLegend* cl =
new TLegend(1-can->GetRightMargin(),
265 can->GetBottomMargin(),.99,
266 1-can->GetTopMargin());
268 cl->SetBorderSize(0);
270 gROOT->LoadMacro(
"$HOME/GraphSysErr/GraphSysErr.C+");
280 while ((obj = next())) {
281 if (c[i+1] > 80)
break;
284 TLegendEntry* e = cl->AddEntry(
"", Form(
"%4.1f-%4.1f%%", c[i], c[i+1]),
286 e->SetFillColor(col);
287 e->SetFillStyle(1001);
288 g->SetLineColor(col);
289 g->SetMarkerColor(col);
290 g->SetFillColor(col);
299 g->SetName(Form(
"tracklets%03dd%02d_%03dd%02d",
302 g->
SetTitle(Form(
"%4.1f - %4.1f%%", c[i], c[i+1]));
303 if (first) g->
Draw(
"combine stat quad axis xbase=2.5");
304 else g->
Draw(
"combine stat quad xbase=2.5");
306 frame = g->
GetMulti()->GetHistogram();
309 g->
GetMinMax(
"combine stat quad", mn, mx);
311 min = TMath::Min(min, mn);
312 max = TMath::Max(max, mx);
315 frame->SetMinimum(min*.9);
316 frame->SetMaximum(max*1.1);
319 TFile* outFile = TFile::Open(Form(
"PbPb5023midRapidity%s.root",
320 reweigh ?
"Reweighed" :
"Normal"),
322 ll->Write(
"container",TObject::kSingleKey);
325 can->SaveAs(Form(
"PbPb5023midRapidity%s.png",
326 reweigh ?
"Reweighed" :
"Normal"));
void Draw(Option_t *option="")
Double_t GetYandError(Int_t i, Bool_t cmn, Bool_t stat, Bool_t quad, Bool_t nosqrt, Double_t &eyl, Double_t &eyh) const
void SetCommonSumLineColor(Color_t color)
void SetCommonSumOption(EDrawOption_t opt)
static TSeqCollection * Import(const TString &fileName)
void SetTitle(const char *name)
void GetMinMax(Option_t *option, Double_t &ymin, Double_t &ymax) const
void SetDataOption(EDrawOption_t opt)
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 SetCommonSumFillColor(Color_t color)