1 #ifndef UNFOLDMULTDISTS_H
2 #define UNFOLDMULTDISTS_H
10 * Structure to do unfolding of multiplcity distributions
12 * It takes as input 2 files: the output file (forward_multdists.root)
13 * of the analysis train MakeMultDistsTrain.C run on real and MC data.
15 * It generates the output file forward_unfolded.root with histograms
16 * and stacks of the input data and the unfolding results.
21 kMeasuredColor = kBlue+1,
22 kUnfoldedColor = kRed+1,
23 kTruthColor = kGreen+2,
24 kCMSColor = kYellow+1,
25 kALICEColor = kMagenta+1,
35 * @param realFile Output file of MakeMultDistsTrain on real data
36 * @param mcFile Output file of MakeMultDistsTrain on MC data
38 void Run(const Char_t* realFile="forward_multdists.root",
39 const Char_t* mcFile="forward_mcmultdists.root")
41 gSystem->Load("RooUnfold/libRooUnfold.so");
43 // --- Open files ------------------------------------------------
44 TFile* realF = TFile::Open(realFile,"READ");
46 Error("Run", "Couldn't open %s", realFile);
49 TFile* mcF = TFile::Open(mcFile,"READ");
51 Error("Run", "Couldn't open %s", mcFile);
54 TFile* outF = TFile::Open("forward_unfolded.root", "RECREATE");
56 // --- Get top-level containers ----------------------------------
57 TCollection* realTop = GetCollection(realF, "ForwardMultResults");
59 Error("Run", "Failed to get real collection");
62 TCollection* mcTop = GetCollection(mcF, "ForwardMultResults");
64 Error("Run", "Failed to get MC collection");
68 // --- Loop over the kinds of bins we have -----------------------
69 const char* types[] = { "symmetric", "negative", "positive", "other", 0 };
70 const char** ptype = types;
72 TCollection* realType = GetCollection(realTop, *ptype);
73 TCollection* mcType = GetCollection(mcTop, *ptype);
74 TDirectory* outType = outF->mkdir(*ptype);
75 if(realType && mcType) ScanType(realType, mcType, outType);
80 // --- Close all files -------------------------------------------
88 * Get an object from a collection
91 * @param name Name of object
92 * @param cl Possible class to check against
94 * @return Pointer to object or null
96 TObject* GetObject(TCollection* c, const TString& name, TClass* cl)
98 TObject* o = c->FindObject(name);
100 Warning("GetObject", "%s not found in %s", name.Data(), c->GetName());
103 if (cl && !o->IsA()->InheritsFrom(cl)) {
104 Warning("GetCollection", "%s is not a %s but a %s",
105 name.Data(), cl->GetName(), o->ClassName());
118 TCollection* GetCollection(TDirectory* d, const TString& name) const
120 TObject* o = d->Get(name);
122 Warning("GetCollection", "%s not found in %s", name.Data(), d->GetName());
125 if (!o->IsA()->InheritsFrom(TCollection::Class())) {
126 Warning("GetCollection", "%s is not a collection", name.Data());
129 return static_cast<TCollection*>(o);
139 TCollection* GetCollection(TCollection* c, const TString& name) const
141 return static_cast<TCollection*>(GetObject(c, name, TCollection::Class()));
144 * Get a 1D histogram from a collection
146 * @param c Collection
147 * @param name Nanme of histogram
149 * @return Pointer to object or null
151 TH1* GetH1(TCollection* c, const TString& name)
153 return static_cast<TH1*>(GetObject(c, name, TH1::Class()));
156 * Get a 2D histogram from a collection
158 * @param c Collection
159 * @param name Nanme of histogram
161 * @return Pointer to object or null
163 TH2* GetH2(TCollection* c, const TString& name)
165 return static_cast<TH2*>(GetObject(c, name, TH2::Class()));
167 TH1* Ratio(const TH1* num, const TGraph* denom,
168 Double_t etaMin, Double_t etaMax)
170 TH1* ret = static_cast<TH1*>(num->Clone(Form("%s_%s",
173 ret->SetTitle(Form("%+5.1f<#eta<%+5.1f to %s", etaMin, etaMax,
175 ret->SetDirectory(0);
176 ret->SetMarkerColor(denom->GetMarkerColor());
177 for (Int_t i = 1; i <= ret->GetNbinsX(); i++) {
178 Double_t x = ret->GetXaxis()->GetBinCenter(i);
179 Double_t numY = ret->GetBinContent(i);
180 Double_t numE = ret->GetBinError(i);
181 Double_t denY = denom->Eval(x);
184 ret->SetBinContent(i,0);
185 ret->SetBinError(i,0);
189 ret->SetBinContent(i,(numY-denY)/denY);
190 ret->SetBinError(i,numE/denY);
197 * Scan type (symmetric, negative, ...) list for bins
199 * @param real Real list
201 * @param dir Output directory
203 void ScanType(TCollection* real, TCollection* mc, TDirectory* dir)
205 // --- Create container stack ------------------------------------
206 TString tit(real->GetName());
207 tit[0] = toupper(tit[0]);
210 THStack* stack = new THStack("all", tit);
217 // --- Create list of entries for legend -------------------------
218 TList* l = new TList;
219 l->SetName("legend");
221 // --- Get the bins container ------------------------------------
222 TList* le = static_cast<TList*>(real->FindObject("lowEdges"));
223 TList* he = static_cast<TList*>(real->FindObject("highEdges"));
225 Warning("ScanType", "didn't get the bin low/high edge containers");
229 le->Clone()->Write("lowEdges", TObject::kSingleKey);
230 he->Clone()->Write("highEdges", TObject::kSingleKey);
233 // --- Setup for markers -----------------------------------------
234 const Int_t nMarkers = 7;
235 const Int_t cMarkers[] = { 20, 21, 22, 23, 29, 33, 34 };
236 const Int_t oMarkers[] = { 24, 25, 26, 32, 30, 27, 28 };
237 const Float_t sMarkers[] = { 1.1, 1.0, 1.2, 1.2, 1.2, 1.2, 1.0 };
240 // --- Loop over the contained objects ---------------------------
241 static TRegexp regex("[pm][0-9]d[0-9]*_[pm][0-9]d[0-9]*");
245 while ((o = next())) {
246 // if not a collection, don't bother
247 if (!o->IsA()->InheritsFrom(TCollection::Class())) continue;
249 // If it doesn't match our regular expression, don't bother
250 TString n(o->GetName());
251 if (n.Index(regex) == kNPOS) {
252 Warning("ScanType", "%s in %s doesn't match eta range regexp",
253 n.Data(), real->GetName());
256 // Cast object and find corresponding MC object
257 TCollection* realBin = static_cast<TCollection*>(o);
258 TCollection* mcBin = GetCollection(mc, n.Data());
260 Warning("ScanType", "No corresponding MC bin for %s found in %s",
261 n.Data(), mc->GetName());
264 TDirectory* outBin = dir->mkdir(realBin->GetName());
266 // Now do the unfolding
267 THStack* bin = UnfoldEtaBin(realBin, mcBin, outBin);
268 if (!bin) { dir->cd(); continue; }
270 // Loop over histograms and set properties
271 TIter nextH(bin->GetHists());
273 Int_t cMarker = cMarkers[iMarker % nMarkers];
274 Int_t oMarker = oMarkers[iMarker % nMarkers];
275 Float_t sMarker = sMarkers[iMarker % nMarkers];
277 while ((hist = static_cast<TH1*>(nextH()))) {
278 TH1* out = static_cast<TH1*>(hist->Clone());
279 if (out->GetMarkerColor() == kUnfoldedColor &&
280 out->GetMarkerStyle() != 24) realH = out;
281 out->SetDirectory(0);
283 out->SetMarkerStyle(out->GetMarkerStyle() == 24 ? oMarker : cMarker);
284 out->SetMarkerSize(out->GetMarkerSize() * sMarker);
285 stack->Add(out, nextH.GetOption());
287 TString n(bin->GetTitle());
288 n.Append(Form(" (#times%d)", f));
289 TObjString* lee = new TObjString(n);
290 lee->SetUniqueID(cMarker);
293 // Now try to get external data and make a multigraph
295 n.ReplaceAll("p", "+");
296 n.ReplaceAll("m", "-");
297 n.ReplaceAll("d", ".");
298 n.ReplaceAll("_", " ");
299 TObjArray* tokens = n.Tokenize(" ");
300 TObjString* sMin = static_cast<TObjString*>(tokens->At(0));
301 TObjString* sMax = static_cast<TObjString*>(tokens->At(1));
302 Double_t etaMin = sMin->String().Atof();
303 Double_t etaMax = sMax->String().Atof();
304 if (TMath::Abs(etaMax + etaMin) < 1e-6) {
306 Double_t aEta = TMath::Abs(etaMin);
307 TGraphAsymmErrors* g1 = GetOther(0, aEta, 900, f, cMarker);
308 TGraphAsymmErrors* g2 = GetOther(1, aEta, 900, f, cMarker);
310 if (!mg) mg = new TMultiGraph("other", "Other results");
311 if (!ratios) ratios = new THStack("ratios",tit);
316 if (realH) ratios->Add(Ratio(realH, g1, etaMin, etaMax));
319 g2->SetTitle("ALICE");
321 if (realH) ratios->Add(Ratio(realH, g2, etaMin, etaMax));
325 // Increment scaling and marker
333 if (ratios) dir->Add(ratios);
334 l->Write(l->GetName(), TObject::kSingleKey);
337 * Do unfolding in an @f$\eta@f$ bin
339 * @param real Real list
341 * @param dir Output directory
343 * @return Stack of histograms on success
345 THStack* UnfoldEtaBin(TCollection* real, TCollection* mc, TDirectory* dir)
347 TH1* realRaw = GetH1(real, "rawDist");
348 TH1* mcRaw = GetH1(mc, "rawDist");
349 TH1* mcTruth = GetH1(mc, "truth");
350 TH2* response = GetH2(mc, "response");
353 Warning("UnfoldEtaBin", "Real raw distribution not found in %s",
358 Warning("UnfoldEtaBin", "MC raw distribution not found in %s",
363 Warning("UnfoldEtaBin", "MC true distribution not found in %s",
368 Warning("UnfoldEtaBin", "Response matrix not found in %s",
373 Int_t mN = realRaw->GetNbinsX();
374 Double_t mL = realRaw->GetXaxis()->GetXmin();
375 Double_t mH = realRaw->GetXaxis()->GetXmax();
376 Int_t tN = mcRaw->GetNbinsX();
377 Double_t tL = mcRaw->GetXaxis()->GetXmin();
378 Double_t tH = mcRaw->GetXaxis()->GetXmax();
380 RooUnfoldResponse matrix(mN, mL, mH, tN, tL, tH);
381 for (Int_t i = 1; i <= mN; i++) {
382 Double_t mX = response->GetYaxis()->GetBinCenter(i);
383 for (Int_t j = 1; j <= tN; j++) {
384 Double_t tX = response->GetXaxis()->GetBinCenter(j);
385 matrix.Fill(mX, tX, response->GetBinContent(j, i));
389 RooUnfoldBayes realUnfold(&matrix, realRaw, 4);
390 realUnfold.SetVerbose(0);
391 TH1* resReal = realUnfold.Hreco();
392 TH1* outReal = static_cast<TH1*>(resReal->Clone("realUnfolded"));
393 resReal->SetDirectory(0);
396 RooUnfoldBayes mcUnfold(&matrix, mcRaw, 4);
397 mcUnfold.SetVerbose(0);
398 TH1* resMC = mcUnfold.Hreco();
399 TH1* outMC = static_cast<TH1*>(resMC->Clone("mcUnfolded"));
400 resMC->SetDirectory(0);
403 TH1* outRealRaw = static_cast<TH1*>(realRaw->Clone("realRaw"));
404 TH1* outMcRaw = static_cast<TH1*>(mcRaw->Clone("mcRaw"));
405 TH1* outMcTruth = static_cast<TH1*>(mcTruth->Clone("mcTruth"));
406 TH2* outResponse = static_cast<TH2*>(matrix.Hresponse()->Clone("response"));
408 outRealRaw ->SetTitle("Measured");
409 outMcRaw ->SetTitle("Measured (MC)");
410 outMcTruth ->SetTitle("Truth (MC)");
411 outResponse->SetTitle("Response matrix");
412 outReal ->SetTitle("Unfolded");
413 outMC ->SetTitle("Unfolded (MC)");
415 outRealRaw ->SetDirectory(dir);
416 outMcRaw ->SetDirectory(dir);
417 outMcTruth ->SetDirectory(dir);
418 outResponse->SetDirectory(dir);
419 outReal ->SetDirectory(dir);
420 outMC ->SetDirectory(dir);
422 outMcRaw ->SetMarkerStyle(24); // Open circle
423 outRealRaw->SetMarkerStyle(20); // Circle
424 outMcTruth->SetMarkerStyle(24); // Open Circle
425 outMC ->SetMarkerStyle(24); // Open Circle
426 outReal ->SetMarkerStyle(20); // Circle
428 outMcRaw ->SetMarkerSize(1.2); // Open circle
429 outMC ->SetMarkerSize(1.2); // Open circle
430 outMcTruth->SetMarkerSize(1.6); // Open square
432 outMcRaw ->SetMarkerColor(kMeasuredColor);
433 outRealRaw->SetMarkerColor(kMeasuredColor);
434 outMcTruth->SetMarkerColor(kTruthColor);
435 outMC ->SetMarkerColor(kUnfoldedColor);
436 outReal ->SetMarkerColor(kUnfoldedColor);
438 outMcRaw ->SetFillColor(kSysColor);
439 outRealRaw->SetFillColor(kSysColor);
440 outMcTruth->SetFillColor(kSysColor);
441 outMC ->SetFillColor(kSysColor);
442 outReal ->SetFillColor(kSysColor);
444 outMcRaw ->SetFillStyle(1001);
445 outRealRaw->SetFillStyle(0);
446 outMcTruth->SetFillStyle(1001);
447 outMC ->SetFillStyle(0);
448 outReal ->SetFillStyle(0);
450 outMcRaw ->SetLineColor(kBlack);
451 outRealRaw->SetLineColor(kBlack);
452 outMcTruth->SetLineColor(kBlack);
453 outMC ->SetLineColor(kBlack);
454 outReal ->SetLineColor(kBlack);
456 TString tit(real->GetName());
457 tit.ReplaceAll("m", "-");
458 tit.ReplaceAll("p", "+");
459 tit.ReplaceAll("d", ".");
460 tit.ReplaceAll("_", "<#it{#eta}<");
462 THStack* stack = new THStack("all", tit);
463 stack->Add(outMcRaw, "E2");
464 stack->Add(outRealRaw, "E1");
465 stack->Add(outMcTruth, "E2");
466 stack->Add(outMC, "E1");
467 stack->Add(outReal, "E1");
478 void DrawType(const char* which="symmetric")
480 const char* fname = "forward_unfolded.root";
482 TObject* outO = gROOT->GetListOfFiles()->FindObject(fname);
483 if (outO) outF = static_cast<TFile*>(outO);
484 else outF = TFile::Open(fname, "READ");
487 Warning("DrawType", "Failed to open file %s", fname);
492 outF->GetObject(Form("/%s/all", which), stack);
494 Warning("DrawType", "Failed to get /%s/all from file %s", which, fname);
499 outF->GetObject(Form("/%s/legend", which), leg);
501 Warning("DrawType", "Failed to get /%s/legend from file %s",
506 TMultiGraph* other = 0;
507 outF->GetObject(Form("/%s/other", which), other);
509 Warning("DrawType", "No other data found for %s", which);
512 outF->GetObject(Form("/%s/ratios", which), ratios);
514 Warning("DrawType", "No ratios data found for %s", which);
516 TCanvas* c = new TCanvas(which, Form("%s P(#it{N}_{ch})", which));
518 c->SetTopMargin(0.01);
519 c->SetRightMargin(0.02);
522 THStack* drawn = static_cast<THStack*>(stack->Clone(which));
523 drawn->Draw("nostack");
524 drawn->GetXaxis()->SetTitle("#it{#eta}");
525 drawn->GetYaxis()->SetTitle("P(#it{N}_{ch})");
526 drawn->GetHistogram()->SetDirectory(0);
527 TIter nextH(drawn->GetHists());
529 while ((h = static_cast<TH1*>(nextH()))) h->SetDirectory(0);
531 Bool_t hasCMS = false;
532 Bool_t hasALICE = false;
534 TIter nextG(other->GetListOfGraphs());
536 while ((g = static_cast<TGraph*>(nextG()))) {
538 if (g->GetMarkerColor() == kALICEColor) hasALICE = true;
539 if (g->GetMarkerColor() == kCMSColor) hasCMS = true;
542 TLegend* l = new TLegend(.65, .75, .975, .975);
552 e = l->AddEntry(Form("dummy%02d", d++), o->GetName(), "p");
553 e->SetMarkerStyle(o->GetUniqueID());
554 e->SetLineColor(kBlack);
555 e->SetMarkerSize(1.3);
559 Double_t x1 = other ? .12 : .7;
561 Double_t w1 = other ? .20 : .15;
562 Double_t h1 = other ? .3 : .25;
563 TLegend* l2 = new TLegend(x1, y1, x1+w1, y1+h1);
564 l2->SetBorderSize(0);
568 const char* oth[] = { "Measured",
573 Int_t col[] = { kMeasuredColor,
578 for (Int_t i = 0; i < 5; i++) {
579 if (i == 3 && !hasCMS) continue;
580 if (i == 4 && !hasALICE) continue;
581 e = l2->AddEntry(Form("dummy%02d", d++), oth[i], "f");
582 e->SetFillColor(col[i]);
583 e->SetFillStyle(1001);
585 e = l2->AddEntry(Form("dummy%02d", d++), "Real", "p");
586 e->SetMarkerStyle(20);
587 e->SetMarkerSize(1.3);
588 e->SetMarkerColor(kBlack);
589 e = l2->AddEntry(Form("dummy%02d", d++), "MC", "p");
590 e->SetMarkerStyle(24);
591 e->SetMarkerSize(1.3);
592 e->SetMarkerColor(kBlack);
597 c = new TCanvas(Form("r%s", which),
598 Form("%s P(#it{N}_{ch})", which));
599 c->SetTopMargin(0.01);
600 c->SetRightMargin(0.02);
602 ratios->Draw("nostack");
610 DrawType("symmetric");
611 DrawType("negative");
612 DrawType("positive");
615 TGraphAsymmErrors* GetOther(UShort_t type, Double_t eta, UShort_t sNN,
616 Int_t factor, Int_t marker)
618 TGraphAsymmErrors* g = 0;
619 Int_t color = kBlack;
621 case 0: g = GetCMS(eta, sNN); color = kCMSColor; break;
622 case 1: g = GetALICE(eta, sNN); color = kALICEColor; break;
625 Warning("GetOther", "No other data found for type=%d, eta=%f, sNN=%d",
630 g->SetMarkerStyle(marker);
631 g->SetMarkerColor(color);
632 for (Int_t j = 0; j < g->GetN(); j++) {
633 g->SetPoint(j, g->GetX()[j], g->GetY()[j]*factor);
634 g->SetPointError(j, g->GetEXlow()[j], g->GetEXhigh()[j],
635 g->GetEYlow()[j]*factor, g->GetEYhigh()[j]*factor);
640 TGraphAsymmErrors* GetCMS(Double_t eta, UShort_t sNN)
642 Double_t aEta = TMath::Abs(eta);
643 TGraphAsymmErrors* g = 0;
646 if (aEta <= 0.51) g = CMSsqrts900eta05();
647 else if (aEta <= 1.01) g = CMSsqrts900eta10();
648 else if (aEta <= 1.51) g = CMSsqrts900eta15();
649 else if (aEta <= 2.01) g = CMSsqrts900eta20();
650 else if (aEta <= 2.41) g = CMSsqrts900eta24();
656 g->SetMarkerColor(kCMSColor);
657 g->SetLineColor(kBlack);
662 * CMS pp, @f$\sqrt{s} = 900GeV@f$, NSD, @f$|\eta|\lt0.5@f$
666 TGraphAsymmErrors* CMSsqrts900eta05()
668 // Plot: p8068_d2x1y1
669 double x[] = { 0.0, 1.0,
681 double xem[] = { 0.5, 0.5,
693 double xep[] = { 0.5, 0.5,
705 double y[] = { 0.193, 0.1504,
717 double yem[] = { 0.02189155088156159, 0.012180722474467595,
718 0.007909551188278638, 0.006072832946821442,
719 0.004838605170914444, 0.003828276374558138,
720 0.003016836091006603, 0.002365797962633327,
721 0.0018847015678881366, 0.0015610893632332517,
722 0.001308166656049603, 0.0011140017953306899,
723 9.219544457292888E-4, 7.203471385380802E-4,
724 5.508175741568165E-4, 4.3011626335213136E-4,
725 3.3837848631377264E-4, 2.746961958236772E-4,
726 2.2377220560203628E-4, 1.9070920271449933E-4,
727 1.6011246047700347E-4, 8.134494452638099E-5,
728 2.5059928172283337E-5 };
729 double yep[] = { 0.031663227883461285, 0.015861904047118684,
730 0.010948538715280683, 0.008490583018850945,
731 0.007046453008429135, 0.005675746646917919,
732 0.004395201929377079, 0.003365070578754627,
733 0.0026049952015310893, 0.0020535335400231475,
734 0.0016522106403240478, 0.0013497407158413798,
735 0.001118033988749895, 9.060905032059435E-4,
736 7.061161377563892E-4, 5.457105459856901E-4,
737 4.148493702538308E-4, 3.257759966602819E-4,
738 2.6689698387205504E-4, 2.292705825002414E-4,
739 1.904205871222962E-4, 9.646242791885347E-5,
740 3.417601498127012E-5 };
741 double ysm[] = { 0.002, 0.0014,
753 double ysp[] = { 0.002, 0.0014,
766 TGraphAsymmErrors* g = new TGraphAsymmErrors(np,
772 g->SetName("/HepData/8068/d2x1y1");
773 g->SetTitle("/HepData/8068/d2x1y1");
777 TGraphAsymmErrors* CMSsqrts900eta10()
780 // Plot: p8068_d3x1y1
781 double x[] = { 0.0, 1.0,
801 double xem[] = { 0.5, 0.5,
821 double xep[] = { 0.5, 0.5,
841 double y[] = { 0.1076, 0.0655,
861 double yem[] = { 0.015802847844613326, 0.009464142856064674,
862 0.008214195030555337, 0.00676426640516176,
863 0.0058916636020736966, 0.005200240379059414,
864 0.004441733895676326, 0.003671511950137164,
865 0.0029149442533262966, 0.0024150569351466646,
866 0.0020554318281081475, 0.001767059704707229,
867 0.0015500322577288513, 0.0013800362314084368,
868 0.0012684636376341263, 0.0011763077828527702,
869 0.001084158659975559, 9.82344135219425E-4,
870 8.805679985100526E-4, 7.692203845452875E-4,
871 6.705221845696084E-4, 5.913543776789007E-4,
872 5.375872022286245E-4, 5.154609587543949E-4,
873 5.124451190127582E-4, 4.904079934095691E-4,
874 4.4922154890432404E-4, 3.7E-4,
875 3.0083217912982643E-4, 2.4166091947189146E-4,
876 2.1108529081866412E-4, 1.8252944967867517E-4,
877 1.662077013859466E-4, 1.4663219291819924E-4,
878 1.2229881438509532E-4, 7.826237921249263E-5,
879 4.74236228055175E-5, 2.1095023109728988E-5,
880 6.161980201201558E-6, 1.3601470508735443E-6 };
881 double yep[] = { 0.02725949375905576, 0.011154371340420759,
882 0.009740395269186974, 0.008248078564126314,
883 0.007285581651453781, 0.006454339625399333,
884 0.005595158621522718, 0.004804039966528172,
885 0.00405504623894722, 0.0034544174617437305,
886 0.0029644561052577585, 0.002545584412271571,
887 0.0021980445855350615, 0.0019087430418995638,
888 0.0016690416411821486, 0.001468911161370898,
889 0.0013179529581893276, 0.0011866338946785568,
890 0.001065129100156408, 9.339164844888434E-4,
891 8.052328855678958E-4, 6.868041933477111E-4,
892 5.94810894318522E-4, 5.440588203494177E-4,
893 5.220153254455275E-4, 5.192301994298867E-4,
894 4.972926703662542E-4, 4.368065933568311E-4,
895 3.5735136770411276E-4, 2.8792360097775935E-4,
896 2.4200206610688264E-4, 2.0310588371585893E-4,
897 1.670748335327616E-4, 1.364587849865299E-4,
898 1.1970797801316335E-4, 9.470480452437458E-5,
899 5.758472019555187E-5, 2.195449840010015E-5,
900 7.481310045707236E-6, 1.7029386365926402E-6 };
901 double ysm[] = { 0.0018, 0.0011,
921 double ysp[] = { 0.0018, 0.0011,
942 TGraphAsymmErrors* g = new TGraphAsymmErrors(np,
949 g->SetName("/HepData/8068/d3x1y1");
950 g->SetTitle("/HepData/8068/d3x1y1");
953 TGraphAsymmErrors* CMSsqrts900eta15()
955 // Plot: p8068_d4x1y1
956 double x[] = { 0.0, 1.0,
982 double xem[] = { 0.5, 0.5,
1008 double xep[] = { 0.5, 0.5,
1034 double y[] = { 0.0753, 0.03557,
1060 double yem[] = { 0.014524806367039803, 0.0061507154055443014,
1061 0.006900384047283165, 0.0068944397886992964,
1062 0.00601252858621063, 0.004686747272896204,
1063 0.0042880881520789655, 0.0039679339712248235,
1064 0.0035288099977187778, 0.0031197756329582422,
1065 0.0027127108213003464, 0.0023229722340140013,
1066 0.002033937068839643, 0.0017866449003649271,
1067 0.001591257364476281, 0.0014504137340772805,
1068 0.0013412307780542466, 0.0012490796611905903,
1069 0.0011594826432508594, 0.0010893117092916976,
1070 0.0010384603988597735, 9.972462083156796E-4,
1071 9.588013350011566E-4, 8.984430978086481E-4,
1072 8.160882305241266E-4, 7.178439941937245E-4,
1073 6.390618123468182E-4, 5.88727441181401E-4,
1074 5.571355310873647E-4, 5.255473337388365E-4,
1075 4.846648326421054E-4, 4.6615448083226656E-4,
1076 4.4384682042344296E-4, 4.3081318457076036E-4,
1077 4.0853396431630995E-4, 3.992492955535426E-4,
1078 3.676955262170047E-4, 3.2695565448543625E-4,
1079 2.9068883707497264E-4, 2.505992817228334E-4,
1080 2.1954498400100151E-4, 1.8601075237738274E-4,
1081 1.8601075237738274E-4, 1.7042300314218148E-4,
1082 1.7998055450520203E-4, 1.6058953888718904E-4,
1083 1.4985659811966905E-4, 8.561541917201597E-5,
1084 6.324555320336759E-5, 4.657252408878007E-5,
1085 2.4166091947189146E-5, 5.590169943749474E-6 };
1086 double yep[] = { 0.03405304685340212, 0.00724989655098609,
1087 0.007817985674072318, 0.007751728839426725,
1088 0.006919566460407762, 0.00571192611997039,
1089 0.005232991496266739, 0.004813003220443552,
1090 0.00435332057170156, 0.0038838769290491172,
1091 0.003445692963686695, 0.0030549959083442323,
1092 0.0027252339349127445, 0.0024367396249907374,
1093 0.002189794510907359, 0.001969568480657629,
1094 0.0017906702655709678, 0.0016395731151735808,
1095 0.0015002999700059986, 0.0013710215169719256,
1096 0.0012712198865656563, 0.0011812705024675763,
1097 0.0011035397591387453, 0.0010139033484509261,
1098 9.121403400793104E-4, 8.132035415564789E-4,
1099 7.242237223399962E-4, 6.545991139621257E-4,
1100 6.135144660071188E-4, 5.724508712544685E-4,
1101 5.692099788303082E-4, 5.126402247190518E-4,
1102 4.531004303683677E-4, 4.4011362169330773E-4,
1103 4.1785164831552356E-4, 4.0853396431630995E-4,
1104 3.8626415831655934E-4, 3.54682957019364E-4,
1105 3.1780497164141406E-4, 2.7730849247724094E-4,
1106 2.459674775249769E-4, 2.3706539182259396E-4,
1107 2.1954498400100151E-4, 2.0068881383873889E-4,
1108 1.5864425612041553E-4, 1.6058953888718904E-4,
1109 1.4338758663147937E-4, 1.0245974819410792E-4,
1110 6.609841147864296E-5, 4.657252408878007E-5,
1111 2.5079872407968906E-5, 5.941380311005179E-6 };
1112 double ysm[] = { 0.0019, 9.3E-4,
1138 double ysp[] = { 0.0019, 9.3E-4,
1165 TGraphAsymmErrors* g = new TGraphAsymmErrors(np,
1172 g->SetName("/HepData/8068/d4x1y1");
1173 g->SetTitle("/HepData/8068/d4x1y1");
1176 TGraphAsymmErrors* CMSsqrts900eta24()
1178 // Plot: p8068_d5x1y1
1179 double x[] = { 0.0, 1.0,
1210 double xem[] = { 0.5, 0.5,
1241 double xep[] = { 0.5, 0.5,
1272 double y[] = { 0.0561, 0.02321,
1303 double yem[] = { 0.01767766952966369, 0.003660737630587584,
1304 0.005079094407470687, 0.006069810540700591,
1305 0.006147235150862541, 0.005458580401532985,
1306 0.004473712105176193, 0.0035970126494078384,
1307 0.003456848275524976, 0.003228761372415125,
1308 0.0029797483115189447, 0.002739361239413305,
1309 0.0025401181074902798, 0.002313114783144148,
1310 0.0020573040611440983, 0.001820109886792553,
1311 0.0016324827717314506, 0.001484318025222358,
1312 0.0013727709204379296, 0.001287866452703851,
1313 0.001217538500417954, 0.0011279184367674819,
1314 0.0010412012293500234, 9.741663102366044E-4,
1315 9.360555539069249E-4, 9.139474820797965E-4,
1316 9.013878188659973E-4, 8.697700845625814E-4,
1317 8.190848551890091E-4, 7.433034373659253E-4,
1318 6.741661516273269E-4, 6.239390995922599E-4,
1319 5.961543424315552E-4, 5.8309518948453E-4,
1320 5.738466694161429E-4, 5.515432893255072E-4,
1321 5.292447448959697E-4, 4.976946855251721E-4,
1322 4.609772228646444E-4, 4.295346318982906E-4,
1323 4.0249223594996216E-4, 4.386342439892262E-4,
1324 3.712142238654117E-4, 3.6674241641784496E-4,
1325 3.6249137920783716E-4, 3.5341194094144583E-4,
1326 3.3105890714493693E-4, 3.130495168499705E-4,
1327 2.8178005607210744E-4, 2.5553864678361276E-4,
1328 2.3323807579381201E-4, 2.1633307652783938E-4,
1329 1.8601075237738274E-4, 1.6401219466856724E-4,
1330 1.562049935181331E-4, 1.562049935181331E-4,
1331 1.5480633061990717E-4, 1.395886814895821E-4,
1332 1.0756393447619885E-4, 6.676076692189808E-5,
1333 2.9966648127543395E-5, 6.551335741663679E-6 };
1334 double yep[] = { 0.09323352401362935, 0.004710169848317574,
1335 0.005736898116578331, 0.006618164398078972,
1336 0.006715772479767314, 0.006096630216767292,
1337 0.00519042387479096, 0.004362247127341595,
1338 0.004172217635742412, 0.003913693907295255,
1339 0.003644283194264683, 0.0033638668225719043,
1340 0.0031145144083789367, 0.0028765604460883488,
1341 0.002629087294100369, 0.0023903974564912843,
1342 0.002181604913819182, 0.0020026232796010335,
1343 0.0018514858897652987, 0.0017280335644888382,
1344 0.00160822883943797, 0.0014787156589419076,
1345 0.0013612494260788505, 0.0012539936203984452,
1346 0.0011763077828527702, 0.0011157060544785082,
1347 0.001084158659975559, 0.001033247308247159,
1348 9.630160954002794E-4, 9.244457799135652E-4,
1349 8.35224520712844E-4, 6.989277502002622E-4,
1350 6.519202405202648E-4, 6.203224967708329E-4,
1351 6.10982814815605E-4, 5.88727441181401E-4,
1352 5.664803615307418E-4, 5.348831648126533E-4,
1353 4.976946855251721E-4, 4.477722635447622E-4,
1354 4.204759208325728E-4, 3.9357337308308855E-4,
1355 3.981205847478877E-4, 3.8483762809787716E-4,
1356 3.807886552931954E-4, 3.716180835212409E-4,
1357 3.584689665786984E-4, 3.4928498393145964E-4,
1358 3.1780497164141406E-4, 2.9068883707497264E-4,
1359 2.505992817228334E-4, 2.2472205054244234E-4,
1360 2.0248456731316588E-4, 1.8027756377319944E-4,
1361 1.6401219466856724E-4, 1.6401219466856724E-4,
1362 1.5640012787718557E-4, 1.4223923509355636E-4,
1363 1.0288342918079667E-4, 6.86804193347711E-5,
1364 3.361547262794322E-5, 7.071067811865475E-6 };
1365 double ysm[] = { 0.0025, 8.1E-4,
1396 double ysp[] = { 0.0025, 8.1E-4,
1428 TGraphAsymmErrors* g = new TGraphAsymmErrors(np,
1435 g->SetName("/HepData/8068/d5x1y1");
1436 g->SetTitle("/HepData/8068/d5x1y1");
1439 TGraphAsymmErrors* CMSsqrts900eta20()
1441 // Plot: p8068_d6x1y1
1442 double x[] = { 0.0, 1.0,
1476 double xem[] = { 0.5, 0.5,
1510 double xep[] = { 0.5, 0.5,
1544 double y[] = { 0.0494, 0.01789,
1578 double yem[] = { 0.031045933711196384, 0.0025678006153126453,
1579 0.003808017857100988, 0.004928792955683978,
1580 0.005475372133471842, 0.005444713031923721,
1581 0.004928792955683978, 0.0041622710147226115,
1582 0.003405994715204356, 0.0030985964564621835,
1583 0.0029811742652854096, 0.002811547616527239,
1584 0.0026404734423962684, 0.002492308167141455,
1585 0.0023525518060183073, 0.0021654098919142305,
1586 0.001967053634245899, 0.0017886866690396059,
1587 0.0016107451691686056, 0.0014552319402761885,
1588 0.001326989073052224, 0.001225275479229059,
1589 0.001164817582284883, 0.0011168258592994702,
1590 0.0010756393447619887, 0.001027861858422619,
1591 9.7082439194738E-4, 9.202716990106781E-4,
1592 8.825531145489205E-4, 8.509406559801923E-4,
1593 8.228000972289684E-4, 8.099382692526635E-4,
1594 7.912016177940992E-4, 7.725283166331187E-4,
1595 7.316419889536139E-4, 6.815423684555495E-4,
1596 6.407807737440318E-4, 5.950630218724736E-4,
1597 5.636488268416782E-4, 5.636488268416782E-4,
1598 5.322593352868506E-4, 4.919349550499538E-4,
1599 4.7853944456021594E-4, 4.7423622805517506E-4,
1600 4.651881339845203E-4, 4.428317965096906E-4,
1601 4.248529157249601E-4, 3.9824615503479755E-4,
1602 3.671511950137164E-4, 3.3615472627943223E-4,
1603 3.138470965295043E-4, 3.138470965295043E-4,
1604 3.176476034853718E-4, 3.3541019662496844E-4,
1605 3.3105890714493693E-4, 2.996664812754339E-4,
1606 2.641968962724581E-4, 2.3853720883753126E-4,
1607 2.1633307652783938E-4, 1.9416487838947602E-4,
1608 1.6401219466856724E-4, 1.5181897114655994E-4,
1609 1.5966527487215246E-4, 1.3961733416735901E-4,
1610 9.740636529508736E-5, 6.800735254367721E-5,
1611 3.733630940518893E-5, 9.437160589923222E-6 };
1612 double yep[] = { 0.027627884464793896, 0.0038148263394288343,
1613 0.004395600072800072, 0.005347317084295637,
1614 0.005874325493194942, 0.0058935897380119695,
1615 0.005446999173857106, 0.004729587719875803,
1616 0.004031935019317648, 0.0037237615390892046,
1617 0.0035759474269066098, 0.00339607125955861,
1618 0.0032050585018061684, 0.003026549190084311,
1619 0.0028468403537957655, 0.00266865134478073,
1620 0.002469412885687608, 0.0022703523955544874,
1621 0.0020813697413001857, 0.0019043371550227129,
1622 0.00175524927004685, 0.001643471934655411,
1623 0.0015533190271158081, 0.001475127113166862,
1624 0.0014046351839534703, 0.0013267252918370102,
1625 0.0012490796611905903, 0.0011691449867317568,
1626 0.0011208925015361642, 0.0011472575996697516,
1627 9.932774033471214E-4, 9.52102935611481E-4,
1628 9.139474820797965E-4, 8.75956619930462E-4,
1629 8.34865258589672E-4, 7.749193506423748E-4,
1630 7.244998274671983E-4, 6.685057965343307E-4,
1631 6.092618484691126E-4, 5.727128425310541E-4,
1632 5.412947441089743E-4, 5.280151512977634E-4,
1633 5.147815070493501E-4, 5.015974481593781E-4,
1634 4.924428900898052E-4, 4.792702786528704E-4,
1635 4.7010637094172637E-4, 4.428317965096906E-4,
1636 4.204759208325728E-4, 3.8910152916687437E-4,
1637 3.6674241641784496E-4, 3.488552708502481E-4,
1638 3.2649655434629013E-4, 3.0886890422961E-4,
1639 3.04138126514911E-4, 2.996664812754339E-4,
1640 2.9068883707497264E-4, 2.641968962724581E-4,
1641 2.418677324489565E-4, 2.1095023109728988E-4,
1642 1.972308292331602E-4, 1.739482681718907E-4,
1643 1.4475496537252186E-4, 1.2083045973594572E-4,
1644 1.097679370308106E-4, 6.992138442565336E-5,
1645 3.54682957019364E-5, 9.078546139112804E-6 };
1646 double ysm[] = { 0.0063, 8.0E-4,
1680 double ysp[] = { 0.0063, 8.0E-4,
1715 TGraphAsymmErrors* g = new TGraphAsymmErrors(np,
1722 g->SetName("/HepData/8068/d6x1y1");
1723 g->SetTitle("/HepData/8068/d6x1y1");
1726 TGraphAsymmErrors* GetALICE(Double_t eta, UShort_t sNN)
1728 Double_t aEta = TMath::Abs(eta);
1729 TGraphAsymmErrors* g = 0;
1732 if (aEta <= 0.51) g = ALICEsqrts900eta05();
1733 else if (aEta <= 1.01) g = ALICEsqrts900eta10();
1734 else if (aEta <= 1.31) g = ALICEsqrts900eta13();
1738 g->SetMarkerColor(kALICEColor);
1742 TGraphAsymmErrors* ALICEsqrts900eta05()
1744 // Plot: p7742_d8x1y1
1745 double x[] = { 0.0, 1.0,
1757 double xem[] = { 0.5, 0.5,
1769 double xep[] = { 0.5, 0.5,
1781 double y[] = { 0.179767, 0.155985,
1793 double yem[] = { 0.028627623478032542, 0.006826681770816624,
1794 0.004736912179891031, 0.005286866936097409,
1795 0.004605827830043151, 0.003753897441326814,
1796 0.003172958871463669, 0.0023132784095305087,
1797 0.0017387768689512751, 0.0012885437516824954,
1798 9.891637882575362E-4, 7.64476945368531E-4,
1799 5.769662035162892E-4, 4.500277769204919E-4,
1800 3.7107950630558943E-4, 3.1458703088334716E-4,
1801 2.7004073766748605E-4, 2.210701246211256E-4,
1802 1.7819090885900997E-4, 1.3576450198781714E-4,
1803 1.2447088012864694E-4, 9.762171889492625E-5,
1804 6.095900261651268E-5, 3.4828149534536E-5 };
1805 double yep[] = { 0.028627623478032542, 0.006826681770816624,
1806 0.004736912179891031, 0.005286866936097409,
1807 0.004605827830043151, 0.003753897441326814,
1808 0.003172958871463669, 0.0023132784095305087,
1809 0.0017387768689512751, 0.0012885437516824954,
1810 9.891637882575362E-4, 7.64476945368531E-4,
1811 5.769662035162892E-4, 4.500277769204919E-4,
1812 3.7107950630558943E-4, 3.1458703088334716E-4,
1813 2.7004073766748605E-4, 2.210701246211256E-4,
1814 1.7819090885900997E-4, 1.3576450198781714E-4,
1815 1.2447088012864694E-4, 9.762171889492625E-5,
1816 6.095900261651268E-5, 3.4828149534536E-5 };
1817 double ysm[] = { 0.003595, 0.00312,
1829 double ysp[] = { 0.003595, 0.00312,
1842 TGraphAsymmErrors* g = new TGraphAsymmErrors(np,
1849 g->SetName("/HepData/7742/d8x1y1");
1850 g->SetTitle("/HepData/7742/d8x1y1");
1853 TGraphAsymmErrors* ALICEsqrts900eta10()
1855 // Plot: p7742_d9x1y1
1856 double x[] = { 0.0, 1.0,
1877 double xem[] = { 0.5, 0.5,
1898 double xep[] = { 0.5, 0.5,
1919 double y[] = { 0.092396, 0.076087,
1940 double yem[] = { 0.021888152137629163, 0.0066076761421849355,
1941 0.004451948000594796, 0.0034909631908686747,
1942 0.002952765483407038, 0.0028889466938661224,
1943 0.0029957812002881653, 0.0032637882897026274,
1944 0.002922475833946279, 0.0026227742945209753,
1945 0.0023487871338203465, 0.002091141554271255,
1946 0.0017347841364273539, 0.0014762689456870655,
1947 0.0012594490859101847, 0.0010506721658062519,
1948 9.019456746389995E-4, 7.836938177630343E-4,
1949 6.432239112470866E-4, 5.679656679765071E-4,
1950 4.967293025381128E-4, 4.475187146924696E-4,
1951 4.040519768544636E-4, 3.3646693745448454E-4,
1952 2.9206163733020465E-4, 2.820017730440715E-4,
1953 2.6982401672201087E-4, 2.5470178640912594E-4,
1954 2.3519353732617736E-4, 2.1914607000811127E-4,
1955 1.9727392123643713E-4, 1.7402586014727813E-4,
1956 1.5060212481900778E-4, 1.3009611831257687E-4,
1957 1.1269871339105873E-4, 9.693812459502196E-5,
1958 8.48528137423857E-5, 7.427651041883969E-5,
1959 6.726812023536856E-5, 6.030754513325841E-5,
1960 5.544366510251645E-5, 4.601086828130936E-5 };
1961 double yep[] = { 0.021888152137629163, 0.0066076761421849355,
1962 0.004451948000594796, 0.0034909631908686747,
1963 0.002952765483407038, 0.0028889466938661224,
1964 0.0029957812002881653, 0.0032637882897026274,
1965 0.002922475833946279, 0.0026227742945209753,
1966 0.0023487871338203465, 0.002091141554271255,
1967 0.0017347841364273539, 0.0014762689456870655,
1968 0.0012594490859101847, 0.0010506721658062519,
1969 9.019456746389995E-4, 7.836938177630343E-4,
1970 6.432239112470866E-4, 5.679656679765071E-4,
1971 4.967293025381128E-4, 4.475187146924696E-4,
1972 4.040519768544636E-4, 3.3646693745448454E-4,
1973 2.9206163733020465E-4, 2.820017730440715E-4,
1974 2.6982401672201087E-4, 2.5470178640912594E-4,
1975 2.3519353732617736E-4, 2.1914607000811127E-4,
1976 1.9727392123643713E-4, 1.7402586014727813E-4,
1977 1.5060212481900778E-4, 1.3009611831257687E-4,
1978 1.1269871339105873E-4, 9.693812459502196E-5,
1979 8.48528137423857E-5, 7.427651041883969E-5,
1980 6.726812023536856E-5, 6.030754513325841E-5,
1981 5.544366510251645E-5, 4.601086828130936E-5 };
1982 double ysm[] = { 0.001848, 0.001522,
2003 double ysp[] = { 0.001848, 0.001522,
2025 TGraphAsymmErrors* g = new TGraphAsymmErrors(np,
2032 g->SetName("/HepData/7742/d9x1y1");
2033 g->SetTitle("/HepData/7742/d9x1y1");
2036 TGraphAsymmErrors* ALICEsqrts900eta13()
2038 // Plot: p7742_d10x1y1
2039 double x[] = { 0.0, 1.0,
2063 double xem[] = { 0.5, 0.5,
2087 double xep[] = { 0.5, 0.5,
2111 double y[] = { 0.068695, 0.056382,
2135 double yem[] = { 0.021322725646595934, 0.007630831737104416,
2136 0.004038016592338372, 0.0036354708085748677,
2137 0.0035003511252444373, 0.0030936373413831173,
2138 0.0026374775828431228, 0.002920906195001818,
2139 0.00276560481631053, 0.002864668392676542,
2140 0.0026843833556330957, 0.0022856071403458645,
2141 0.002325611317481922, 0.002006865217198205,
2142 0.0017203360136903488, 0.0014989629748596194,
2143 0.0012394615766533467, 0.0011637718848640398,
2144 9.151568171630477E-4, 9.078199160626517E-4,
2145 7.98723982361867E-4, 6.967302203866285E-4,
2146 6.308502199413107E-4, 5.846990678973245E-4,
2147 5.4516236113657E-4, 5.460009157501477E-4,
2148 4.930608481719068E-4, 4.3796118549478783E-4,
2149 3.4394330928221294E-4, 3.2323366161339073E-4,
2150 3.0869078379504626E-4, 2.9443165590676553E-4,
2151 2.756320010448714E-4, 2.630304164920856E-4,
2152 2.5628889948649746E-4, 2.4142286552851616E-4,
2153 2.245551157288562E-4, 2.0678491240900531E-4,
2154 1.8828170383762728E-4, 1.7255723688098393E-4,
2155 1.5911316727411343E-4, 1.3023056476879765E-4,
2156 1.0761505470890214E-4, 8.62670273047588E-5,
2157 6.129437168288782E-5, 6.037383539249432E-5,
2158 3.535533905932738E-5, 3.8078865529319545E-5 };
2159 double yep[] = { 0.021322725646595934, 0.007630831737104416,
2160 0.004038016592338372, 0.0036354708085748677,
2161 0.0035003511252444373, 0.0030936373413831173,
2162 0.0026374775828431228, 0.002920906195001818,
2163 0.00276560481631053, 0.002864668392676542,
2164 0.0026843833556330957, 0.0022856071403458645,
2165 0.002325611317481922, 0.002006865217198205,
2166 0.0017203360136903488, 0.0014989629748596194,
2167 0.0012394615766533467, 0.0011637718848640398,
2168 9.151568171630477E-4, 9.078199160626517E-4,
2169 7.98723982361867E-4, 6.967302203866285E-4,
2170 6.308502199413107E-4, 5.846990678973245E-4,
2171 5.4516236113657E-4, 5.460009157501477E-4,
2172 4.930608481719068E-4, 4.3796118549478783E-4,
2173 3.4394330928221294E-4, 3.2323366161339073E-4,
2174 3.0869078379504626E-4, 2.9443165590676553E-4,
2175 2.756320010448714E-4, 2.630304164920856E-4,
2176 2.5628889948649746E-4, 2.4142286552851616E-4,
2177 2.245551157288562E-4, 2.0678491240900531E-4,
2178 1.8828170383762728E-4, 1.7255723688098393E-4,
2179 1.5911316727411343E-4, 1.3023056476879765E-4,
2180 1.0761505470890214E-4, 8.62670273047588E-5,
2181 6.129437168288782E-5, 6.037383539249432E-5,
2182 3.535533905932738E-5, 3.8078865529319545E-5 };
2183 double ysm[] = { 0.012402, 0.001128,
2207 double ysp[] = { 0.012402, 0.001128,
2232 TGraphAsymmErrors* g = new TGraphAsymmErrors(np,
2239 g->SetName("/HepData/7742/d10x1y1");
2240 g->SetTitle("/HepData/7742/d10x1y1");
2243 ClassDef(Unfolder,1);
2245 void UnfoldMultDists(const char* realFile="forward_multdists.root",
2246 const char* mcFile="forward_mcmultdists.root")
2248 Unfolder* u = new Unfolder;