ROOT logo
// 0       1       2       3       4  5  6 	        7     8             9                            10         11
// nsyield,asyield,nswidth,aswidth,v2,v3,nsasyieldratio,v3/v2,remainingpeak,remainingjetyield/ridgeyield,chi2(v2v3),baseline
const char* graphTitles[] = { "NS Ridge Yield", "AS Ridge Yield", "NS Width", "AS Width", "v2", "v3", "NS Yield / AS Yield", "v3 / v2", "remaining peak in %", "remaining jet / NS yield in %", "chi2/ndf", "baseline" };
const Int_t NGraphs = 28; // pt index
const Int_t NHists = 12; 
TGraphErrors*** graphs = 0;

const char* kCorrFuncTitle = "#frac{1}{#it{N}_{trig}} #frac{d^{2}#it{N}_{assoc}}{d#Delta#etad#Delta#varphi} (rad^{-1})";
// const char* kCorrFuncTitle = "1/N_{trig} dN_{assoc}/d#Delta#etad#Delta#varphi (1/rad)";
const char* kProjYieldTitlePhi = "1/#it{N}_{trig} d#it{N}_{assoc}/d#Delta#varphi per #Delta#eta (rad^{-1})";
const char* kProjYieldTitleEta = "1/#it{N}_{trig} d#it{N}_{assoc}/d#Delta#eta per #Delta#varphi (rad^{-1})";
// const char* kProjYieldTitlePhiOrEta = "1/N_{trig} dN_{assoc}/d#Delta#varphi (1/rad) , dN_{assoc}/d#Delta#eta";
const char* kProjYieldTitlePhiOrEta = "#frac{1}{#it{N}_{trig}} #frac{d#it{N}_{assoc}}{d#Delta#varphi} (rad^{-1}) , d#it{N}_{assoc}/d#Delta#eta";

Float_t etaMax = 1.6;

void CreateGraphStructure()
{
  graphs = new TGraphErrors**[NGraphs];
  for (Int_t i=0; i<NGraphs; i++)
  {
    graphs[i] = new TGraphErrors*[NHists];
    for (Int_t j=0; j<NHists; j++)
    {
      graphs[i][j] = new TGraphErrors;
      graphs[i][j]->GetYaxis()->SetTitle(graphTitles[j]);
    }
  }
}

void WriteGraphs(const char* outputFileName = "graphs.root")
{
  TFile::Open(outputFileName, "RECREATE");
  for (Int_t i=0; i<NGraphs; i++)
  {
    if (!graphs[i])
      continue;
    for (Int_t j=0; j<NHists; j++)
    {
      if (!graphs[i][j])
	continue;
      graphs[i][j]->GetYaxis()->SetTitle(graphTitles[j]);
      graphs[i][j]->Write(Form("graph_%d_%d", i, j));
    }
  }

  gFile->Close();
}

void ReadGraphs(const char* fileName = "graphs.root")
{
  CreateGraphStructure();
  TFile* file = TFile::Open(fileName);
  for (Int_t i=0; i<NGraphs; i++)
    for (Int_t j=0; j<NHists; j++)
      graphs[i][j] = (TGraphErrors*) file->Get(Form("graph_%d_%d", i, j));
}

void AddPoint(TGraphErrors* graph, Float_t x, Float_t y, Float_t xe, Float_t ye)
{
	graph->SetPoint(graph->GetN(), x, y);
	graph->SetPointError(graph->GetN() - 1, xe, ye);
}

void RemovePointsBelowX(TGraphErrors* graph, Float_t minX)
{
  Int_t i=0;
  while (i<graph->GetN())
  {
    if (graph->GetX()[i] < minX)
      graph->RemovePoint(i);
    else
      i++;
  }
}

void RemovePointsAboveX(TGraphErrors* graph, Float_t maxX)
{
  Int_t i=0;
  while (i<graph->GetN())
  {
    if (graph->GetX()[i] > maxX)
      graph->RemovePoint(i);
    else
      i++;
  }
}

void DrawLatex(Float_t x, Float_t y, Int_t color, const char* text, Float_t textSize = 0.06)
{
  TLatex* latex = new TLatex(x, y, text);
  latex->SetNDC();
  latex->SetTextSize(textSize);
  latex->SetTextColor(color);
  latex->Draw();
}

void PadFor2DCorr()
{
  gPad->SetPad(0, 0, 1, 1);
  gPad->SetLeftMargin(0.2);
  gPad->SetTopMargin(0.05);
  gPad->SetRightMargin(0.05);
  gPad->SetBottomMargin(0.05);
  gPad->SetTheta(61.62587);
  gPad->SetPhi(45);
}

void DivideGraphs(TGraphErrors* graph1, TGraphErrors* graph2)
{
//   graph1->Print();
//   graph2->Print();

  graph1->Sort();
  graph2->Sort();

  for (Int_t bin1 = 0; bin1 < graph1->GetN(); bin1++)
  {
    Float_t x = graph1->GetX()[bin1];

    Int_t bin2 = 0;
    for (bin2 = 0; bin2<graph2->GetN(); bin2++)
      if (graph2->GetX()[bin2] >= x)
        break;

    if (bin2 == graph2->GetN())
            bin2--;

    if (bin2 > 0)
      if (TMath::Abs(graph2->GetX()[bin2-1] - x) < TMath::Abs(graph2->GetX()[bin2] - x))
        bin2--;

    if (graph1->GetY()[bin1] == 0 || graph2->GetY()[bin2] == 0 || bin2 == graph2->GetN())
    {
      Printf("%d %d removed", bin1, bin2);
      graph1->RemovePoint(bin1--);
      continue;
    }

    Float_t graph2Extrapolated = graph2->GetY()[bin2];
    if (TMath::Abs(x - graph2->GetX()[bin2]) > 0.0001)
    {
      Printf("%f %f %d %d not found", x, graph2->GetX()[bin2], bin1, bin2);
      graph1->RemovePoint(bin1--);
      continue;
    }

    Float_t value = graph1->GetY()[bin1] / graph2Extrapolated;
//     Float_t error = value * TMath::Sqrt(TMath::Power(graph1->GetEY()[bin1] / graph1->GetY()[bin1], 2) + TMath::Power(graph2->GetEY()[bin2] / graph2->GetY()[bin2], 2));
    Float_t error = value * TMath::Sqrt(TMath::Abs(TMath::Power(graph1->GetEY()[bin1] / graph1->GetY()[bin1], 2) - TMath::Power(graph2->GetEY()[bin2] / graph2->GetY()[bin2], 2)));

    graph1->GetY()[bin1] = value;
    graph1->GetEY()[bin1] = error;

//     Printf("%d %d %f %f %f %f", bin1, bin2, x, graph2Extrapolated, value, error);
  }
}

void GraphShiftX(TGraphErrors* graph, Float_t offset)
{
  for (Int_t i=0; i<graph->GetN(); i++)
    graph->GetX()[i] += offset;
}

TGraphErrors* ReadHepdata(const char* fileName, Bool_t errorsAreAdded = kFALSE, Int_t skipYErrors = 0, Int_t skipXerrors = 1)
{
  // expected format: x [x2] y [ye] [ye2] [xe]
  //
  // skipYErrors:   0 --> ye present
  //                1 --> no errors ye
  //                2 --> y and ye are lower and upper error, i.e. y' = (y + ye) / 2 and ye = (ye - y) / 2
  //                3 --> ye and ye2 are stat and syst error, will be added in quadrature
  // 
  // skipXerrors:   0 --> xe present
  //                1 --> no errors xe
  //                2 --> x2 present, xe not present and is calculated from x2 - x
  
  ifstream fin(fileName);

  graph = new TGraphErrors(0);

  Double_t sum = 0;

  while (fin.good())
  {
    char buffer[2000];
    if (fin.peek() == '#')
    {
      fin.getline(buffer, 2000);
      continue;
    }
  
    Double_t x = -1;
    Double_t x2 = -1;
    Double_t y = -1;
    Double_t ye = 0;
    Double_t xe = 0;

    fin >> x;
    
    if (skipXerrors == 2)
    {
      fin >> x2;
      xe = (x2 - x + 1) / 2;
      x = x + (x2 - x) / 2;
    }
    
    fin >> y;

    if (y == -1)
      continue;

    if (skipYErrors == 0)
    {
      ye = -1;
      fin >> ye;
      if (ye == -1)
        continue;
    }
    else if (skipYErrors == 2)
    {
      ye = -1;
      fin >> ye;
      if (ye == -1)
        continue;
      
      Double_t newy = (y + ye) / 2;
      ye = (ye - y) / 2;
      y = newy;
    }
    else if (skipYErrors == 3)
    {
      ye = -1;
      fin >> ye;
      if (ye == -1)
        continue;
      
      Double_t ye2 = -1;
      fin >> ye2;
      if (ye2 == -1)
        continue;

      ye = TMath::Sqrt(ye*ye + ye2*ye2);
    }

    if (skipXerrors == 0)
    {
      xe = -1;
      fin >> xe;
      if (xe == -1)
        continue;
    }

    //Printf("%f %f %f %f", x, y, xe, ye);

    if (errorsAreAdded)
      ye -= y;

    graph->SetPoint(graph->GetN(), x, y);
    graph->SetPointError(graph->GetN()-1, xe, ye);

    sum += y;
    
    // read rest until end of line...
    fin.getline(buffer, 2000);
  }
  fin.close();

  Printf("%s: %f", fileName, sum);

  return graph;
}

TH2* SubtractEtaGapNS(TH2* hist, Float_t etaLimit, Float_t outerLimit, Bool_t drawEtaGapDist = kFALSE)
{
  TString histName(hist->GetName());
  Int_t etaBins = 0;

  TH1D* etaGap = hist->ProjectionX(histName + "_1", TMath::Max(1, hist->GetYaxis()->FindBin(-outerLimit + 0.01)), hist->GetYaxis()->FindBin(-etaLimit - 0.01));
//   Printf("%f", etaGap->GetEntries());
  if (etaGap->GetEntries() > 0)
    etaBins += hist->GetYaxis()->FindBin(-etaLimit - 0.01) - TMath::Max(1, hist->GetYaxis()->FindBin(-outerLimit + 0.01)) + 1;

  TH1D* tracksTmp = hist->ProjectionX(histName + "_2", hist->GetYaxis()->FindBin(etaLimit + 0.01), TMath::Min(hist->GetYaxis()->GetNbins(), hist->GetYaxis()->FindBin(outerLimit - 0.01)));
//   Printf("%f", tracksTmp->GetEntries());
  if (tracksTmp->GetEntries() > 0)
    etaBins += TMath::Min(hist->GetYaxis()->GetNbins(), hist->GetYaxis()->FindBin(outerLimit - 0.01)) - hist->GetYaxis()->FindBin(etaLimit + 0.01) + 1;
  
  etaGap->Add(tracksTmp);

  // get per bin result
  if (etaBins > 0)
    etaGap->Scale(1.0 / etaBins);
 
  for (Int_t i=1; i<=etaGap->GetNbinsX()/2; i++)
  {
//     Printf("%d -> %d", i, etaGap->GetNbinsX()+1-i);
    etaGap->SetBinContent(etaGap->GetNbinsX()+1-i, etaGap->GetBinContent(i));
    etaGap->SetBinError(etaGap->GetNbinsX()+1-i, etaGap->GetBinError(i));
  }
  
  if (drawEtaGapDist)
  {
    TH1D* centralRegion = hist->ProjectionX(histName + "_3", hist->GetYaxis()->FindBin(-etaLimit + 0.01), hist->GetYaxis()->FindBin(etaLimit - 0.01));
    
//    centralRegion->Scale(1.0 / (hist->GetYaxis()->FindBin(etaLimit - 0.01) - hist->GetYaxis()->FindBin(-etaLimit + 0.01) + 1));
    centralRegion->Scale(hist->GetXaxis()->GetBinWidth(1));

    TCanvas* c = new TCanvas("SubtractEtaGap", "SubtractEtaGap", 800, 800);
    gPad->SetLeftMargin(0.13);
    centralRegion->SetStats(0);
    TString label(centralRegion->GetTitle());
    label.ReplaceAll(".00", " GeV/#it{c}");
    label.ReplaceAll(".0", " GeV/#it{c}");
    centralRegion->SetTitle(label);
    centralRegion->SetLineColor(3);
    centralRegion->Draw();
//     centralRegion->GetYaxis()->SetTitle(kProjYieldTitlePhi);
    centralRegion->GetYaxis()->SetTitleOffset(1.6);
    TH1* copy = etaGap->DrawCopy("SAME");
    copy->Scale(hist->GetXaxis()->GetBinWidth(1));
    copy->Scale((hist->GetYaxis()->FindBin(etaLimit - 0.01) - hist->GetYaxis()->FindBin(-etaLimit + 0.01) + 1));
    copy->SetLineColor(2);
    TLegend* legend = new TLegend(0.41, 0.73, 0.69, 0.85);
    legend->SetFillColor(0);
    legend->AddEntry(centralRegion, Form("|#Delta#eta| < %.1f", etaLimit), "L");
    legend->AddEntry(copy, Form("%.1f < |#Delta#eta| < %.1f (scaled)", etaLimit, outerLimit), "L");
    legend->Draw();
    
//     DrawLatex(0.705, 0.62, 1, "Pb-Pb 2.76 TeV", 0.025);
//     DrawLatex(0.705, 0.58, 1, "Stat. unc. only", 0.025);
  }
  
//   new TCanvas; etaGap->DrawCopy();
  
  TH2* histTmp2D = (TH2*) hist->Clone("histTmp2D");
  histTmp2D->Reset();
  
  for (Int_t xbin=1; xbin<=histTmp2D->GetNbinsX(); xbin++)
    for (Int_t y=1; y<=histTmp2D->GetNbinsY(); y++)
      histTmp2D->SetBinContent(xbin, y, etaGap->GetBinContent(xbin));
    
  hist->Add(histTmp2D, -1);  
  return histTmp2D;
}

TH1* GetProjections(Int_t i, Int_t j, Int_t centr, char** label, Float_t etaBegin = 1.0, TH1** etaProj = 0)
{
  TH2* hist1 = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, centr));
  if (!hist1)
    return 0;
  hist1 = (TH2*) hist1->Clone(Form("%s_%.1f", hist1->GetName(), etaBegin));

  // NOTE fix normalization. these 2d correlations come out of AliUEHist normalized by dphi bin width, but not deta
  hist1->Scale(1.0 / hist1->GetYaxis()->GetBinWidth(1));
  
  hist1->Rebin2D(2, 1); hist1->Scale(0.5);
  
//   new TCanvas; hist1->Draw("surf1");
  
  if (etaBegin > 0)
    SubtractEtaGapNS(hist1, etaBegin, etaMax, kTRUE);
  
  tokens = TString(hist1->GetTitle()).Tokenize("-");
  centralityStr = new TString;
  if (tokens->GetEntries() > 2)
    *centralityStr = tokens->At(2)->GetName();
  if (tokens->GetEntries() > 3)
    *centralityStr = *centralityStr + "-" + tokens->At(3)->GetName();
  *label = centralityStr->Data();
//   Printf("%s", label);
  
  proj1x = ((TH2*) hist1)->ProjectionX(Form("proj1x_%d_%d_%d_%.1f", i, j, centr, etaBegin), hist1->GetYaxis()->FindBin(-etaMax+0.01), hist1->GetYaxis()->FindBin(etaMax-0.01));
  proj1x->GetXaxis()->SetTitleOffset(1);
  proj1x->Scale(hist1->GetYaxis()->GetBinWidth(1));

  proj1y = ((TH2*) hist1)->ProjectionY(Form("proj1y_%d_%d_%d_%.1f", i, j, centr, etaBegin), hist1->GetXaxis()->FindBin(-0.5), hist1->GetXaxis()->FindBin(0.5));
  proj1y->Scale(hist1->GetXaxis()->GetBinWidth(1));
  proj1y->GetXaxis()->SetTitleOffset(1);
  proj1y->GetXaxis()->SetRangeUser(-1.99, 1.99);
  Float_t etaPhiScale = 1.0 * (hist1->GetXaxis()->FindBin(0.5) - hist1->GetXaxis()->FindBin(-0.5) + 1) / (hist1->GetYaxis()->FindBin(etaMax-0.01) - hist1->GetYaxis()->FindBin(-etaMax+0.01) + 1);
  
  if (gStudySystematic == 20)
  {
    Printf(">>>>>>>>>>>> Applying non-closure systematics <<<<<<<<<<<<");
    file2 = TFile::Open("non_closure.root");
    non_closure = (TH1*) file2->Get(Form("non_closure_all_%d_%d_%d", i, j, 0));
    for (Int_t bin=1; bin<=non_closure->GetNbinsX(); bin++)
      non_closure->SetBinError(bin, 0);
    
    proj1x->Multiply(non_closure);  
  }
  
  Float_t zyam = 0;
  if (0)
  {  
    clone = (TH1*) proj1x->Clone();
    clone->Fit("pol0", "0", "", TMath::Pi()/2 - 0.2, TMath::Pi()/2);
    zyam = clone->GetFunction("pol0")->GetParameter(0);
  }
  else
  {
//     zyam = (proj1x->GetBinContent(proj1x->FindBin(TMath::Pi()/2)) + proj1x->GetBinContent(proj1x->FindBin(-TMath::Pi()/2))) / 2;
//     zyam = proj1x->GetBinContent(proj1x->FindBin(TMath::Pi()/2));
    zyam = proj1x->GetBinContent(proj1x->FindBin(1.3));
//     zyam = proj1x->GetMinimum();
  }
    
  proj1x->Add(new TF1("func", "-1", -100, 100), zyam);
  proj1y->Add(new TF1("func", "-1", -100, 100), zyam * etaPhiScale);
  
  proj1x->Scale(1.0 / (2.0 * etaMax));
  
  if (etaProj != 0)
    *etaProj = proj1y;
  return proj1x;
}

TH1* GetProjectionsNew(Int_t i, Int_t j, Int_t centr, char** label, Float_t etaBegin = 1.0, TH1** etaProj = 0)
{
  TH2* hist1 = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, centr));
  if (!hist1)
    return 0;
  hist1 = (TH2*) hist1->Clone(Form("%s_%.1f", hist1->GetName(), etaBegin));

  // NOTE fix normalization. these 2d correlations come out of AliUEHist normalized by dphi bin width, but not deta
  hist1->Scale(1.0 / hist1->GetYaxis()->GetBinWidth(1));
  
  hist1->Rebin2D(2, 1); hist1->Scale(0.5);
  
//   new TCanvas; hist1->Draw("surf1");
  
  tokens = TString(hist1->GetTitle()).Tokenize("-");
  centralityStr = new TString;
  if (tokens->GetEntries() > 2)
    *centralityStr = tokens->At(2)->GetName();
  if (tokens->GetEntries() > 3)
    *centralityStr = *centralityStr + "-" + tokens->At(3)->GetName();
  *label = centralityStr->Data();
//   Printf("%s", label);
  
  if (etaBegin > 0)
  {
    proj1x = ((TH2*) hist1)->ProjectionX(Form("proj1x_%d_%d_%d_%.1f", i, j, centr, etaBegin), hist1->GetYaxis()->FindBin(-etaMax+0.01), hist1->GetYaxis()->FindBin(etaMax-0.01));
    proj1x->GetXaxis()->SetTitleOffset(1);
    proj1x->Scale(hist1->GetYaxis()->GetBinWidth(1));

    proj1xR1 = ((TH2*) hist1)->ProjectionX(Form("proj2x_%d_%d_%d_%.1f", i, j, centr, etaBegin), hist1->GetYaxis()->FindBin(-etaMax+0.01), hist1->GetYaxis()->FindBin(-etaBegin-0.01));
    proj1xR2 = ((TH2*) hist1)->ProjectionX(Form("proj3x_%d_%d_%d_%.1f", i, j, centr, etaBegin), hist1->GetYaxis()->FindBin(etaBegin+0.01), hist1->GetYaxis()->FindBin(etaMax-0.01));
    proj1xR1->Add(proj1xR2);
    
    proj1xR1->GetXaxis()->SetTitleOffset(1);
    proj1xR1->Scale(hist1->GetYaxis()->GetBinWidth(1));
    
    proj1xR1->Scale((1.0 * hist1->GetYaxis()->FindBin(etaMax-0.01) - hist1->GetYaxis()->FindBin(-etaMax+0.01) + 1) / (hist1->GetYaxis()->FindBin(-etaBegin-0.01) - hist1->GetYaxis()->FindBin(-etaMax+0.01) + 1 + hist1->GetYaxis()->FindBin(etaMax-0.01) - hist1->GetYaxis()->FindBin(etaBegin+0.01) + 1));
    
    // mirror
    for (Int_t i=1; i<=proj1xR1->GetNbinsX()/2; i++)
    {
  //     Printf("%d -> %d", i, etaGap->GetNbinsX()+1-i);
      proj1xR1->SetBinContent(proj1xR1->GetNbinsX()+1-i, proj1xR1->GetBinContent(i));
      proj1xR1->SetBinError(proj1xR1->GetNbinsX()+1-i, proj1xR1->GetBinError(i));
    }
    
    proj1x->Add(proj1xR1, -1);
    
    proj1x->Scale(1.0 / (2.0 * etaMax));
  
//     new TCanvas; proj1xR1->DrawCopy();
  }
  else
  {
    proj1x = ((TH2*) hist1)->ProjectionX(Form("proj1x_%d_%d_%d_%.1f", i, j, centr, etaBegin), hist1->GetYaxis()->FindBin(-etaMax+0.01), hist1->GetYaxis()->FindBin(etaMax-0.01));
    proj1x->GetXaxis()->SetTitleOffset(1);
    proj1x->Scale(hist1->GetYaxis()->GetBinWidth(1));

    proj1x->Scale(1.0 / (2.0 * etaMax));
  }

  if (gStudySystematic == 20)
  {
    Printf(">>>>>>>>>>>> Applying non-closure systematics <<<<<<<<<<<<");
    file2 = TFile::Open("non_closure.root");
    non_closure = (TH1*) file2->Get(Form("non_closure_all_%d_%d_%d", i, j, 0));
    for (Int_t bin=1; bin<=non_closure->GetNbinsX(); bin++)
      non_closure->SetBinError(bin, 0);
    
    proj1x->Multiply(non_closure);  
  }
  
  Float_t zyam = 0;
  if (0)
  {  
    clone = (TH1*) proj1x->Clone();
    clone->Fit("pol0", "0", "", TMath::Pi()/2 - 0.2, TMath::Pi()/2);
    zyam = clone->GetFunction("pol0")->GetParameter(0);
  }
  else
  {
//     zyam = (proj1x->GetBinContent(proj1x->FindBin(TMath::Pi()/2)) + proj1x->GetBinContent(proj1x->FindBin(-TMath::Pi()/2))) / 2;
//     zyam = proj1x->GetBinContent(proj1x->FindBin(TMath::Pi()/2));
    zyam = proj1x->GetBinContent(proj1x->FindBin(1.3));
//     zyam = proj1x->GetMinimum();
  }
    
  proj1x->Add(new TF1("func", "-1", -100, 100), zyam);
  
  return proj1x;
}

void DrawEtaDep(const char* fileName, Int_t i, Int_t j, Int_t centr)
{
  c = new TCanvas;
  gPad->SetGridx();
  gPad->SetGridy();
  
  TFile::Open(fileName);

  legend = new TLegend(0.8, 0.6, 0.99, 0.99);
  legend->SetFillColor(0);

  for (Int_t n=0; n<4; n++)
  {
    Float_t eta = 0.8 + n * 0.2;
    const char* label = 0;
    TH1* hist = GetProjections(i, j, centr, &label, eta);
    hist->SetStats(0);	
    hist->SetLineColor(n+1);
    hist->Draw((n == 0) ? "" : "SAME");
    legend->AddEntry(hist, Form("|#Delta#eta| > %.1f", eta));
  }
  legend->Draw();
}

void DrawProjectionsTim(const char* fileName, Int_t i, Int_t j, Float_t eta = 1.0, Bool_t etaPhi = kFALSE)
{
    gStyle->SetErrorX(0.0);
    c = new TCanvas;
//    gPad->SetGridx();
//    gPad->SetGridy();
    gPad->SetTopMargin(0.025);
    gPad->SetRightMargin(0.01);
    gPad->SetBottomMargin(0.15);
    gPad->SetLeftMargin(0.15);

    TFile::Open(fileName);
    
//    TLegend *legend = new TLegend(0.45, 0.60, 0.65, 0.90);
    TLegend *legend = new TLegend(0.45, 0.45, 0.65, 0.90);
    legend->SetFillColor(0);
    legend->SetBorderSize(0);
    legend->SetTextFont(62);
    legend->SetTextSize(0.04);
    legend->SetFillStyle(0);
    
//    TLegend *legend2 = new TLegend(0.65, 0.75, 0.85, 0.90);
//    legend2->SetFillColor(0);
//    legend2->SetBorderSize(0);
//    legend2->SetTextFont(62);
//    legend2->SetTextSize(0.04);
//    legend2->SetFillStyle(0);
    
//     Int_t colors[] = { 1, 2, 1, 4, 6, 2 };
    Int_t colors[] = { kRed+1, kOrange+7, kBlack, kGreen+2, kAzure+2, kBlack };
    Int_t markers[] = { 20, 21, 1, 22, 23, 1 };
    
    TH1* first = 0;
    
    Float_t min = 100;
    Float_t max = -100;
    
    Int_t centSeq[] = { 0, 1, 3, 4, 2, 5 };
    
    for (Int_t otcentr=0; otcentr<6; otcentr++)
    {
        Int_t centr = centSeq[otcentr];
        /*    if (centr >= 5)
         continue;*/
        const char* label = 0;
        TH1* etaHist = 0;
        TH1* hist = GetProjectionsNew(i, j, centr, &label, (centr == 2 || centr == 5 || centr == 4) ? -1 : eta, &etaHist);
        if (!hist)
            continue;
        if (etaPhi)
            hist = etaHist;
        hist->SetStats(0);
        hist->GetXaxis()->CenterTitle();
        hist->GetXaxis()->SetLabelSize(0.05);
        hist->GetXaxis()->SetTitleSize(0.05);
        hist->GetXaxis()->SetTitleOffset(1.1);
        hist->GetXaxis()->SetTitle("#Delta#varphi (rad)");
        hist->GetYaxis()->SetNdivisions(506);
        hist->GetYaxis()->CenterTitle();
        hist->GetYaxis()->SetLabelSize(0.05);
        hist->GetYaxis()->SetTitleSize(0.05);
        hist->GetYaxis()->SetTitleOffset(1.35);
	
	if (centr == 2 || centr == 5)
	{
	  hist->SetLineWidth(2);
	  if (centr == 2)
	    hist->SetLineStyle(2);
	}
	  
//         hist->GetYaxis()->SetTitle("#frac{1}{#it{N}_{trig}}#frac{d#it{N}_{assoc}}{d#Delta#varphi} (rad^{-1})");
	hist->GetYaxis()->SetTitle("1/#it{N}_{trig} d#it{N}_{assoc}/d#Delta#varphi per #Delta#eta - const (rad^{-1})");

        hist->SetLineColor(colors[centr]);
        hist->SetMarkerColor(colors[centr]);
        hist->SetMarkerStyle(markers[centr]);
        if (etaPhi)
            hist->GetXaxis()->SetRangeUser(-1.79, 1.79);
        c->cd();
        
        // -----
        tokens = TString(hist->GetTitle()).Tokenize("-");
        sPtTRange = new TString;
        *sPtTRange = tokens->At(0)->GetName();
        *sPtTRange = *sPtTRange + "GeV/#it{c}";
        sPtTRange->ReplaceAll(".0", "");
        sPtARange = new TString;
        *sPtARange = tokens->At(1)->GetName();
        *sPtARange = *sPtARange + "GeV/#it{c}";
        sPtARange->ReplaceAll(".00", "");
        sPtARange->ReplaceAll(".0", "");
        sPtARange->ReplaceAll(" 1", "1");
        sPtTRange->ReplaceAll("p_", "#it{p}_");
        sPtARange->ReplaceAll("p_", "#it{p}_");
        cout << sPtTRange->Data() << endl;
        cout << sPtARange->Data() << endl;
        hist->SetTitle("");
        // -----
        
        if (centr == 0)
	  hist->Draw("");
	else if (centr == 2 || centr == 5)
	  hist->Draw("HISTE SAME");
	else
	  hist->Draw("SAME");
	
        min = TMath::Min(min, hist->GetMinimum());
        max = TMath::Max(max, hist->GetMaximum());
        if (!first)
            first = hist;
        if (centr==2) legend->AddEntry(hist,"pp 2.76 TeV","l");
        else if (centr==5) legend->AddEntry(hist,"pp 7 TeV","l");
        else legend->AddEntry(hist, label, "p");
        //     break;
    }
//    first->GetYaxis()->SetRangeUser(min * 1.1, max * 1.1);
//     first->GetYaxis()->SetRangeUser(min * 1.1, 0.67/3.6);
    first->GetYaxis()->SetRangeUser(-0.009, 0.2);
    cout << max*1.1 << endl;
    cout << 0.925*first->GetMaximum() << endl;
    legend->Draw();
//    legend2->Draw();
    TLine * li = new TLine(first->GetXaxis()->GetXmin(),0.0,first->GetXaxis()->GetXmax(),0.0);
    li->SetLineStyle(kDashed);
    li->SetLineColor(kBlack);
    li->Draw("same");

    TLatex * tex_Pbp = new TLatex(0.65,0.945*first->GetMaximum(),"p-Pb #sqrt{#it{s}_{_{NN}}} = 5.02 TeV");
    tex_Pbp->SetTextFont(62);
    tex_Pbp->SetTextSize(0.05);
    tex_Pbp->Draw();
    
    TLatex * tex_statu = new TLatex(2.3,0.65*first->GetMaximum(),"stat. uncertainties only");
    tex_statu->SetTextFont(62);
    tex_statu->SetTextSize(0.04);
    tex_statu->Draw();
    
    if (eta > 0)
    {
      TLatex * tex_statu = new TLatex(2.3,0.56*first->GetMaximum(),"ridge subtracted");
      tex_statu->SetTextFont(62);
      tex_statu->SetTextSize(0.04);
      tex_statu->Draw();
    }

    TLatex * tex_PtT = new TLatex(2.3,0.85*first->GetMaximum(),sPtTRange->Data());
    tex_PtT->SetTextFont(62);
    tex_PtT->SetTextSize(0.04);
    tex_PtT->Draw();
    
    TLatex * tex_PtA = new TLatex(2.3,0.75*first->GetMaximum(),sPtARange->Data());
    tex_PtA->SetTextFont(62);
    tex_PtA->SetTextSize(0.04);
    tex_PtA->Draw();
    
//     box = new TBox(-1.4, 0.185, -1.3, 0.195);
//     box->SetFillColor(kGray);
//     box->Draw();

    if (i == 2 && j == 2 && eta < 0)
    {
      c->SaveAs("fig2.eps");
      c->SaveAs("fig2.png");
    }
    else if (i == 2 && j == 2 && eta > 0)
    {
      c->SaveAs("fig5.eps");
      c->SaveAs("fig5.png");
    }
    
//     c->SaveAs(Form("%s_%d_%d.png", (etaPhi) ? "eta" : "phi", i, j));
//     c->SaveAs(Form("%s_%d_%d.eps", (etaPhi) ? "eta" : "phi", i, j));
    
    return;
    
    c = new TCanvas;
//    gPad->SetGridx();
//    gPad->SetGridy();
    
    ppHist = GetProjections(i, j, 2, &label);
    
    for (Int_t centr=0; centr<6; centr++)
    {
        if (centr >= 4 || centr == 2)
            continue;
        const char* label = 0;
        TH1* hist = GetProjections(i, j, centr, &label);
        hist->SetStats(0);
        hist->SetLineColor(centr+1);
        hist->Divide(ppHist);
        hist->GetYaxis()->SetRangeUser(1, 3);
        hist->Draw((centr == 0) ? "" : "SAME");
    }
    legend->Draw();
    
    c->SaveAs(Form("phi_%d_%d_ratio.png", i, j));
    c->SaveAs(Form("phi_%d_%d_ratio.eps", i, j));
}


void DrawProjections(const char* fileName, Int_t i, Int_t j, Float_t eta = 1.0, Bool_t etaPhi = kFALSE)
{
  c = new TCanvas;
  gPad->SetGridx();
  gPad->SetGridy();
  
  TFile::Open(fileName);

  legend = new TLegend(0.8, 0.6, 0.99, 0.99);
  legend->SetFillColor(0);
  
  Int_t colors[] = { 1, 2, 1, 4, 6, 2 };
  Int_t markers[] = { 1, 1, 5, 1, 1, 5 };
  
  TH1* first = 0;
  
  Float_t min = 100;
  Float_t max = -100;
  
  for (Int_t centr=0; centr<6; centr++)
  {
/*    if (centr >= 5)
      continue;*/
    const char* label = 0;
    TH1* etaHist = 0;
    TH1* hist = GetProjectionsNew(i, j, centr, &label, eta, &etaHist);
    if (!hist)
      continue;
    if (etaPhi)
      hist = etaHist;
    hist->SetStats(0);
    hist->SetLineColor(colors[centr]);
    hist->SetMarkerColor(colors[centr]);
    hist->SetMarkerStyle(markers[centr]);
    if (etaPhi)
      hist->GetXaxis()->SetRangeUser(-1.79, 1.79);
    c->cd();
    hist->Draw((centr == 0) ? "" : "SAME");
    min = TMath::Min(min, hist->GetMinimum());
    max = TMath::Max(max, hist->GetMaximum());
    if (!first)
      first = hist;
    legend->AddEntry(hist, label);
//     break;
  }
  first->GetYaxis()->SetRangeUser(min * 1.1, max * 1.1);
  legend->Draw();
  
  c->SaveAs(Form("%s_%d_%d.png", (etaPhi) ? "eta" : "phi", i, j));
  
  return;
  
  c = new TCanvas;
  gPad->SetGridx();
  gPad->SetGridy();
  
  ppHist = GetProjections(i, j, 2, &label);
  
  for (Int_t centr=0; centr<6; centr++)
  {
    if (centr >= 4 || centr == 2)
      continue;
    const char* label = 0;
    TH1* hist = GetProjections(i, j, centr, &label);
    hist->SetStats(0);
    hist->SetLineColor(centr+1);
    hist->Divide(ppHist);
    hist->GetYaxis()->SetRangeUser(1, 3);
    hist->Draw((centr == 0) ? "" : "SAME");
  }
  legend->Draw();
  
  c->SaveAs(Form("phi_%d_%d_ratio.png", i, j));
}

void CompareProjections(const char* fileName, Int_t i, Int_t j, Int_t centr)
{
  TFile::Open(fileName);

  const char* label = 0;
  TH1* etaHist = 0;
  TH1* hist = GetProjections(i, j, centr, &label, -1, &etaHist);
  if (!hist)
    continue;
  TH1* hist2 = GetProjections(i, j, centr, &label, 1.2, &etaHist);

  c = new TCanvas;
  gPad->SetGridx();
  gPad->SetGridy();
  
  hist->SetStats(0);
  hist->SetMarkerStyle(20);
  hist->Draw("");

  hist2->SetMarkerStyle(21);
  hist2->SetMarkerColor(2);
  hist2->SetLineColor(2);
  hist2->Draw("SAME");
}

void DrawProjectionsAll(const char* fileName, Float_t eta = 1, Bool_t etaPhi = kFALSE)
{
  DrawProjections(fileName, 0, 1, eta, etaPhi);
  DrawProjections(fileName, 0, 2, eta, etaPhi);
  DrawProjections(fileName, 1, 1, eta, etaPhi);
  DrawProjections(fileName, 1, 2, eta, etaPhi);
  DrawProjections(fileName, 1, 3, eta, etaPhi);
  DrawProjections(fileName, 2, 3, eta, etaPhi);
}

void DrawProjectionsRidge(const char* fileName, Int_t i, Int_t j, Int_t centr1, Int_t centr2)
{
  Float_t etaLimit = 1.0;
  Float_t outerLimit = 1.6;
  
  TFile::Open(fileName);
  
  TH2* hist1 = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, centr1));
  TH2* hist2 = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, centr2));
  
  // NOTE fix normalization. these 2d correlations come out of AliUEHist normalized by dphi bin width, but not deta
  hist1->Scale(1.0 / hist1->GetYaxis()->GetBinWidth(1));
  hist2->Scale(1.0 / hist2->GetYaxis()->GetBinWidth(1));

  SubtractEtaGapNS(hist1, etaLimit, outerLimit, kFALSE);
  
  proj1y = ((TH2*) hist1)->ProjectionY("proj1y", hist1->GetXaxis()->FindBin(-0.5), hist1->GetXaxis()->FindBin(0.5));
  proj1x = ((TH2*) hist1)->ProjectionX("proj1x", hist1->GetYaxis()->FindBin(-1.79), hist1->GetYaxis()->FindBin(1.79));
  
  Float_t etaPhiScale = 1.0 * (hist1->GetXaxis()->FindBin(0.5) - hist1->GetXaxis()->FindBin(-0.5) + 1) / (hist1->GetYaxis()->FindBin(1.79) - hist1->GetYaxis()->FindBin(-1.79) + 1);
  Printf("%f", etaPhiScale);
  
  proj1y->GetXaxis()->SetTitleOffset(1);
  proj1x->GetXaxis()->SetTitleOffset(1);
  
  clone = (TH1*) proj1x->Clone();
  clone->Fit("pol0", "0", "", 1.2, 1.8);
  Float_t zyam = clone->GetFunction("pol0")->GetParameter(0);

  proj1x->Add(new TF1("func", "-1", -100, 100), zyam);
  proj1y->Add(new TF1("func", "-1", -100, 100), zyam * etaPhiScale);
  
  new TCanvas("c", "c", 800, 800);
  gPad->SetLeftMargin(0.15);
//   hist1->SetTitle("");

  hist1->GetYaxis()->SetRangeUser(-1.79, 1.79);
  hist1->GetXaxis()->SetTitleOffset(1.5);
  hist1->GetYaxis()->SetTitleOffset(2);
  hist1->SetStats(kFALSE);
  hist1->DrawCopy("SURF1");
  
  proj2y = ((TH2*) hist2)->ProjectionY("proj2y", hist1->GetXaxis()->FindBin(-0.5), hist1->GetXaxis()->FindBin(0.5));
  proj2x = ((TH2*) hist2)->ProjectionX("proj2x", hist1->GetYaxis()->FindBin(-1.79), hist1->GetYaxis()->FindBin(1.79));

//   proj2y->Scale(1.0 / (hist1->GetXaxis()->FindBin(0.5) - hist1->GetXaxis()->FindBin(-0.5) + 1));
//   proj2x->Scale(1.0 / (hist1->GetYaxis()->FindBin(1.79) - hist1->GetYaxis()->FindBin(-1.79) + 1));
 
  clone = (TH1*) proj2x->Clone();
  clone->Fit("pol0", "0", "", 1.2, 1.8);
  zyam = clone->GetFunction("pol0")->GetParameter(0);

  proj2x->Add(new TF1("func", "-1", -100, 100), zyam);
  proj2y->Add(new TF1("func", "-1", -100, 100), zyam * etaPhiScale);

  proj2y->SetLineColor(2); proj2x->SetLineColor(2);
  
  new TCanvas; proj1y->Draw(); proj2y->Draw("SAME"); gPad->SetGridx(); gPad->SetGridy();
  new TCanvas; proj1x->Draw(); proj2x->Draw("SAME"); gPad->SetGridx(); gPad->SetGridy();
  
  new TCanvas("c2", "c2", 800, 800);
  gPad->SetLeftMargin(0.15);
//   hist2->SetTitle("");
  hist2->GetYaxis()->SetRangeUser(-1.79, 1.79);
  hist2->GetXaxis()->SetTitleOffset(1.5);
  hist2->GetYaxis()->SetTitleOffset(2);
  hist2->SetStats(kFALSE);
  hist2->DrawCopy("SURF1");
}

void CalculateIAA(Int_t i, Int_t j, Int_t centr, Float_t etaBegin, Double_t& nsPeak, Double_t& nsPeakE, Double_t& asPeak, Double_t& asPeakE, Double_t& nsRidge, Double_t& nsRidgeE, char** label, Bool_t subtractRidge)
{
  TH2* hist = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, centr));
  if (!hist)
  {
    nsPeak = 0;
    nsPeakE = 0;
    asPeak = 0;
    asPeakE = 0;
    nsRidge = 0;
    nsRidgeE = 0;
    return;
  }
  
//   new TCanvas; hist->Draw("COLZ");
  
  TH2* hist1 = (TH2*) hist->Clone();
  hist1->Reset();
  
  // copy to one quadrant
  for (Int_t x=1; x<=hist->GetNbinsX(); x++)
    for (Int_t y=1; y<=hist->GetNbinsY(); y++)
    {
      Int_t xTarget = x;
      if (hist->GetXaxis()->GetBinCenter(x) < 0)
	xTarget = hist->GetXaxis()->FindBin(-1.0 * hist->GetXaxis()->GetBinCenter(x));
      else if (hist->GetXaxis()->GetBinCenter(x) > TMath::Pi())
	xTarget = hist->GetXaxis()->FindBin(TMath::TwoPi() - hist->GetXaxis()->GetBinCenter(x));
      
      Int_t yTarget = y;
      if (hist->GetYaxis()->GetBinCenter(y) < 0)
	yTarget = hist->GetYaxis()->FindBin(-1.0 * hist->GetYaxis()->GetBinCenter(y));
      
//       Printf("%d %d --> %d %d", x, y, xTarget, yTarget);
      
      Float_t value = 0;
      Float_t error = 0;
      value += hist->GetBinContent(x, y);
      error += hist->GetBinError(x, y) * hist->GetBinError(x, y);

      value += hist1->GetBinContent(xTarget, yTarget);
      error += hist1->GetBinError(xTarget, yTarget) * hist1->GetBinError(xTarget, yTarget);

      error = TMath::Sqrt(error);
      
      hist1->SetBinContent(xTarget, yTarget, value);
      hist1->SetBinError(xTarget, yTarget, error);
    }
  
  // NOTE fix normalization. these 2d correlations come out of AliUEHist normalized by dphi bin width, but not deta
  hist1->Scale(1.0 / hist1->GetYaxis()->GetBinWidth(1));
  new TCanvas; hist1->Draw("COLZ");
//   new TCanvas; hist1->Draw("SURF1");
  
  tokens = TString(hist1->GetTitle()).Tokenize("-");
  centralityStr = new TString;
  if (tokens->GetEntries() > 1)
  {
    *centralityStr = tokens->At(0)->GetName();
    *centralityStr = *centralityStr + "-" + tokens->At(1)->GetName();
  }
  *label = centralityStr->Data();

  Int_t phi1 = hist1->GetXaxis()->FindBin(0.0001);
  Int_t phi3 = hist1->GetXaxis()->FindBin(TMath::Pi()/2 - 0.3);
  Int_t phi2 = phi3 - 1;
  Int_t phi4 = hist1->GetXaxis()->FindBin(TMath::Pi()/2 - 0.1);
  Int_t phi5 = phi4 + 1;
  Int_t phi6 = hist1->GetXaxis()->FindBin(TMath::Pi() - 0.0001);
//   Printf("phi = %d %d %d %d %d %d", phi1, phi2, phi3, phi4, phi5, phi6);
  
  Int_t eta1 = hist1->GetYaxis()->FindBin(0.0001);
  Int_t eta2 = hist1->GetYaxis()->FindBin(etaBegin - 0.0001);
  Int_t eta3 = eta2 + 1;
  Int_t eta4 = hist1->GetYaxis()->FindBin(etaMax - 0.0001);
//   Printf("eta = %d %d %d %d", eta1, eta2, eta3, eta4);
  
  Double_t zyamYieldE, zyamYieldE1, zyamYieldE2;
  nsPeak              = hist1->IntegralAndError(phi1, phi2, eta1, eta2, nsPeakE, "width");
  nsRidge             = hist1->IntegralAndError(phi1, phi2, eta3, eta4, nsRidgeE, "width");
  asPeak              = hist1->IntegralAndError(phi5, phi6, eta1, eta4, asPeakE, "width");
  Double_t zyamYield  = hist1->IntegralAndError(phi3, phi4, eta1, eta4, zyamYieldE, "width");
  Double_t zyamYield1 = hist1->IntegralAndError(phi3, phi4, eta1, eta2, zyamYieldE1, "width");
  Double_t zyamYield2 = hist1->IntegralAndError(phi3, phi4, eta3, eta4, zyamYieldE2, "width");
  
  // factor 4 from folding to one quadrant above
  Double_t zyamYield2Density = zyamYield2 / (hist1->GetXaxis()->GetBinUpEdge(phi4) - hist1->GetXaxis()->GetBinLowEdge(phi3)) / (hist1->GetYaxis()->GetBinUpEdge(eta4) - hist1->GetYaxis()->GetBinLowEdge(eta3)) / 4;
  Double_t zyamYieldE2Density = zyamYieldE2 / (hist1->GetXaxis()->GetBinUpEdge(phi4) - hist1->GetXaxis()->GetBinLowEdge(phi3)) / (hist1->GetYaxis()->GetBinUpEdge(eta4) - hist1->GetYaxis()->GetBinLowEdge(eta3)) / 4;
  
  Double_t nsZyamScaling = 1.0 * (phi2 - phi1 + 1) / (phi4 - phi3 + 1);
  Double_t asZyamScaling = 1.0 * (phi6 - phi5 + 1) / (phi4 - phi3 + 1);
//   Printf("%f %f", nsZyamScaling, asZyamScaling);
  
  nsPeak -= zyamYield1 * nsZyamScaling;
  nsPeakE = TMath::Sqrt(zyamYieldE1 * zyamYieldE1 * nsZyamScaling * nsZyamScaling + nsPeakE * nsPeakE);
  
  nsRidge -= zyamYield2 * nsZyamScaling;
  nsRidgeE = TMath::Sqrt(zyamYieldE2 * zyamYieldE2 * nsZyamScaling * nsZyamScaling + nsRidgeE * nsRidgeE);

  asPeak -= zyamYield * asZyamScaling;
  asPeakE = TMath::Sqrt(zyamYieldE * zyamYieldE * asZyamScaling * asZyamScaling + asPeakE * asPeakE);
  
  if (subtractRidge)
  {
    Double_t nsRidgeScaling = 1.0 * (eta2 - eta1 + 1) / (eta4 - eta3 + 1);
    Double_t asRidgeScaling = 1.0 * (eta4 - eta1 + 1) / (eta4 - eta3 + 1);
    
    nsPeak -= nsRidge * nsRidgeScaling;
    asPeak -= nsRidge * asRidgeScaling;
    nsPeakE = TMath::Sqrt(nsRidgeE * nsRidgeE * nsRidgeScaling * nsRidgeScaling + nsPeakE * nsPeakE);
    asPeakE = TMath::Sqrt(nsRidgeE * nsRidgeE * asRidgeScaling * asRidgeScaling + asPeakE * asPeakE);
  }

  nsRidge /= (etaMax - etaBegin) * 2;
  nsRidgeE /= (etaMax - etaBegin) * 2;
  
  Printf("Peak yields (%d %d %d): %f +- %f; %f +- %f; %f +- %f; %f +- %f", i, j, centr, nsPeak, nsPeakE, asPeak, asPeakE, nsRidge, nsRidgeE, zyamYield2Density, zyamYieldE2Density);

//   Printf("");
}

void PlotIAA(const char* fileName)
{
  Int_t colors[] = { 1, 2, 3, 4, 6, 7 };
  Int_t markers[] = { 20, 21, 22, 23, 24, 25 };
  
  if (0)
  {
    Int_t n = 6;
    Int_t is[] = { 0, 0, 1, 1, 1, 2 };
    Int_t js[] = { 1, 2, 1, 2, 3, 3 };
  
    Int_t centralityBins = 6;
    Float_t centralityX[] = { 10, 30, 110, 50, 80, 120 };
    Float_t centralityEX[] = { 10, 10, 0, 10, 20, 0 };
  }
  else if (0)
  {
    Int_t n = 3;
    Int_t is[] = { 0, 1, 2, 3 };
    Int_t js[] = { 1, 2, 3, 4 };

    Int_t centralityBins = 4;
    Float_t centralityX[] = { 1.5, 6.5, 30, 75 };
    Float_t centralityEX[] = { 1.5, 2.5, 20, 25 };
  }
  else
  {
    Int_t n = 1;
    Int_t is[] = { 0 };
    Int_t js[] = { 1 };
  
    Int_t centralityBins = 6;
    Float_t centralityX[] = { 10, 30, 110, 50, 80, 120 };
    Float_t centralityEX[] = { 10, 10, 0, 10, 20, 0 };
  }
  
  const char* graphTitles[] = { "NS Yield", "AS Yield", "NS Ridge" };

  TCanvas* canvas[3];
  for (Int_t ci=0; ci<3; ci++)
  {
    canvas[ci] = new TCanvas;
    gPad->SetGridx();
    gPad->SetGridy();
  }
  
  TFile::Open(fileName);

  legend = new TLegend(0.4, 0.6, 0.99, 0.99);
  legend->SetFillColor(0);

  for (Int_t i=0; i<n; i++)
  {
    TGraphErrors* graph[5];
    for (Int_t ci=0; ci<5; ci++)
      graph[ci] = new TGraphErrors;

    char* label = 0;
    for (Int_t c=0; c<centralityBins; c++)
    {
      Double_t nsYield, nsError, asYield, asError, nsRidge, nsRidgeE;
      CalculateIAA(is[i], js[i], c, 1.2, nsYield, nsError, asYield, asError, nsRidge, nsRidgeE, &label, kTRUE);

      AddPoint(graph[0], centralityX[c], nsYield, centralityEX[c], nsError);
      AddPoint(graph[1], centralityX[c], asYield, centralityEX[c], asError);
      AddPoint(graph[2], centralityX[c], nsRidge, centralityEX[c], nsRidgeE);

//       if (c != 2 && c != 5)
      {
	CalculateIAA(is[i], js[i], c, 1.2, nsYield, nsError, asYield, asError, nsRidge, nsRidgeE, &label, kFALSE);
	AddPoint(graph[3], centralityX[c], nsYield, 0, nsError);
	AddPoint(graph[4], centralityX[c], asYield, 0, asError);
      }
    }

    for (Int_t ci=0; ci<3; ci++)
    {
      canvas[ci]->cd();
      graph[ci]->SetMarkerStyle(markers[i]);
      graph[ci]->SetMarkerColor(colors[i]);
      graph[ci]->SetLineColor(colors[i]);
      graph[ci]->Draw((i == 0) ? "AP" : "PSAME");
      graph[ci]->GetYaxis()->SetTitle(graphTitles[ci]);
      graph[ci]->GetYaxis()->SetRangeUser(0, 1);
    }
    for (Int_t ci=3; ci<5; ci++)
    {
      canvas[ci-3]->cd();
      graph[ci]->SetLineColor(colors[i]);
      graph[ci]->Sort();
      graph[ci]->Draw("LSAME");
    }
    
    legend->AddEntry(graph[0], label, "P");
  }
  
  canvas[0]->cd();
  legend->Draw();
  canvas[0]->SaveAs("ns_yield.png");

  canvas[1]->cd();
  legend->Draw();
  canvas[1]->SaveAs("as_yield.png");

  canvas[2]->cd();
  legend->Draw();
  canvas[2]->SaveAs("ns_ridge.png");
}

void Draw2D(const char* fileName, Int_t i, Int_t j, Int_t centr)
{
  TFile::Open(fileName);
  
  TH2* hist1 = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, centr));
  if (!hist1)
    return 0;
  // NOTE fix normalization. these 2d correlations come out of AliUEHist normalized by dphi bin width, but not deta
  hist1->Scale(1.0 / hist1->GetYaxis()->GetBinWidth(1));
  
//   hist1->Rebin2D(2, 2); hist1->Scale(0.25);
  
  hist1->GetYaxis()->SetRangeUser(-1.79, 1.79);
  new TCanvas; 
  hist1->DrawCopy("SURF1");
}

void CorrelationSubtraction(const char* fileName, Int_t i, Int_t j, Int_t centr)
{
  CreateGraphStructure();

  CorrelationSubtraction(fileName, i, j, centr, graphs[0], 0);
}

void CorrelationSubtractionAll(const char* fileName, Int_t centr = 0)
{
  Int_t n = 6;
  Int_t is[] = { 0, 1, 1, 2, 2, 2, 3 };
  Int_t js[] = { 1, 1, 2, 1, 2, 3, 3 };

  CreateGraphStructure();

  for (Int_t i=0; i<n; i++)
    CorrelationSubtraction(fileName, is[i], js[i], centr, graphs[0], 0);
}

Int_t gStudySystematic = 0; // 10 = exclusion zone to 0.5; 11 = exclusion off; 12 = exclusion 0.8 and mirror to AS; 13 = scale peripheral; 14 = exclusion 1.2; 20 = non closure; 30 = baseline; 40 = track cuts; 50/51 = cms comparison; 60 = other peripheral bin

void CorrelationSubtractionHistogram(const char* fileName, Bool_t centralityAxis = kTRUE, const char* outputFileName = "graphs.root")
{
//   Int_t n = 10; //15;
//   // sorted by pT,T
//   Int_t is[] =    { 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4 };
//   Int_t js[] =    { 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5 };
//   Bool_t symm[] = { 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1 };

  // for extraction when trigger pT is from whole range
  Int_t n = 5;
  Int_t is[] =    { 0, 0, 0, 0, 0 };
  Int_t js[] =    { 1, 2, 3, 4, 6 };
  Bool_t symm[] = { 1, 1, 1, 1, 1 };

  // sorted by pT,a
//   Int_t n = 10; // 15
/*  Int_t is[] =    { 0, 1, 2, 3, 1, 2, 3, 2, 3, 3 };
  Int_t js[] =    { 1, 1, 1, 1, 2, 2, 2, 3, 3, 4 };
  Bool_t symm[] = { 1, 0, 0, 0, 1, 0, 0, 1, 0, 1 };*/
/*  Int_t is[] =    { 0, 1, 2, 3, 4, 1, 2, 3, 4, 2, 3, 4, 3, 4, 4 };
  Int_t js[] =    { 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5 };
  Bool_t symm[] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1 };*/

  //   Int_t n = 6;
//   Int_t is[] = { 0, 0, 1, 1, 1, 2 };
//   Int_t js[] = { 1, 2, 1, 2, 3, 3 };

  Int_t centralityBins = 4;

  Int_t colors[] = { 1, 2, 3, 4, 6, 7 };
  Int_t markers[] = { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 };

  CreateGraphStructure();
  
  Float_t yMax[] = { 0.1, 2, 0.4, 4, 1.5, 50, 50, 4 };

  TCanvas* canvas[8];
  for (Int_t ci=0; ci<8; ci++)
  {
    canvas[ci] = new TCanvas;
    gPad->SetGridx();
    gPad->SetGridy();
    dummy = new TH2F("dummy", Form(";%s;%s", (centralityAxis) ? "Event class" : "<mult>", graphTitles[(ci < 3) ? ci*2 : ci+3]), 100, 0, 60, 100, 0, yMax[ci]);
    if (ci == 0)
      dummy->GetYaxis()->SetTitle("Yield");
    if (ci == 1)
      dummy->GetYaxis()->SetTitle("Width");
    if (ci == 2)
      dummy->GetYaxis()->SetTitle("v2 , v3");
    dummy->SetStats(0);
    dummy->Draw();
  }
  
  legend = new TLegend(0.4, 0.6, 0.99, 0.99);
  legend->SetFillColor(0);

  legend2 = new TLegend(0.4, 0.6, 0.99, 0.99);
  legend2->SetFillColor(0);

  for (Int_t i=0; i<n; i++)
  {
    for (Int_t c=0; c<centralityBins; c++)
    {
      if (c == 2)
	continue;
      
      Double_t nsYield, nsYieldE, asYield, asYieldE, nsWidth, nsWidthE, asWidth, asWidthE, v2, v2E, v3, v3E, centrality;
      CorrelationSubtraction(fileName, is[i], js[i], c, graphs[i], 1.5 * (-n/2 + i), kTRUE, symm[i], centralityAxis);
    }

    for (Int_t ci=0; ci<6; ci++)
    {
      canvas[ci/2]->cd();

      graphs[i][ci]->SetMarkerStyle(markers[i]);
      graphs[i][ci]->SetMarkerColor((ci % 2 == 0) ? 1 : 2);
      graphs[i][ci]->SetLineColor((ci % 2 == 0) ? 1 : 2);
      graphs[i][ci]->GetXaxis()->SetTitle(dummy->GetXaxis()->GetTitle());
      graphs[i][ci]->Draw("PSAME");
    }
    
    for (Int_t ci=6; ci<11; ci++)
    {
      canvas[ci-3]->cd();

      graphs[i][ci]->SetMarkerStyle(markers[i]);
      graphs[i][ci]->SetMarkerColor(1);
      graphs[i][ci]->SetLineColor(1);
      graphs[i][ci]->GetXaxis()->SetTitle(dummy->GetXaxis()->GetTitle());
      graphs[i][ci]->Draw("PSAME");
    }

    legend->AddEntry(graphs[i][0], graphs[i][0]->GetTitle(), "P");
    if (symm[i])
      legend2->AddEntry(graphs[i][0], graphs[i][0]->GetTitle(), "P");
  }
  
  const char* fileNames[] = { "ridge_yield.png", "ridge_width.png", "v2_v3.png", "ridge_yield_ratio.png", "v3_over_v2.png", "remaining_peak.png", "remaining_jet.png", "chi2ndf.png" };
  
  for (Int_t ci=0; ci<8; ci++)
  {
    canvas[ci]->cd();
    if (ci == 2 || ci == 4)
      legend2->Draw();
    else
      legend->Draw();
    canvas[ci]->SaveAs(fileNames[ci]);
  }
  
  if (gStudySystematic != 0)
    Printf(">>>>>>>>>>>> WARNING: gStudySystematic set to %d", gStudySystematic);

  WriteGraphs(outputFileName);
}

void CorrelationSubtraction(const char* fileName, Int_t i, Int_t j, Int_t centr, TGraphErrors** graph, Float_t axisOffset, Bool_t silent = kFALSE, Bool_t symmetricpT = kFALSE, Bool_t centralityAxis = kTRUE)
{
  TFile::Open(fileName);
  
  TH2* hist1 = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, centr));
  TH2* hist2 = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, ((gStudySystematic == 60) ? 6 : 4)));
  TH1* refMult = (TH1*) gFile->Get("refMult");

  hist1 = (TH2*) hist1->Clone();
  hist2 = (TH2*) hist2->Clone();
  
  if (!hist1 || !hist2)
    return 0;
  // NOTE fix normalization. these 2d correlations come out of AliUEHist normalized by dphi bin width, but not deta
  hist1->Scale(1.0 / hist1->GetYaxis()->GetBinWidth(1));
  hist2->Scale(1.0 / hist2->GetYaxis()->GetBinWidth(1));
  
//   hist1->Scale(1.0 / 283550); hist2->Scale(1.0 / 190000); // for 1, 2, 0
//   hist1->Scale(1.0 / 283550); hist2->Scale(1.0 / 75000); // for 2, 3, 0
//   hist1->Scale(1.0 / 283550); hist2->Scale(1.0 / 100000); // for 2, 2, 0
  
  tokens = TString(hist1->GetTitle()).Tokenize("-");
  if (tokens->GetEntries() > 1)
  {
    TString centralityStr;
    centralityStr = tokens->At(0)->GetName();
    centralityStr = centralityStr + "-" + tokens->At(1)->GetName();
//     Printf("%s", centralityStr.Data());
    for (Int_t gID=0; gID<NHists; gID++)
    {
      TString xTitle = graph[gID]->GetXaxis()->GetTitle();
      TString yTitle = graph[gID]->GetYaxis()->GetTitle();
//       Printf("%s", centralityStr.Data());
      graph[gID]->SetTitle(centralityStr);
      graph[gID]->GetXaxis()->SetTitle(xTitle);
      graph[gID]->GetYaxis()->SetTitle(yTitle);
//       Printf("%s %s", yTitle.Data(), graph[gID]->GetYaxis()->GetTitle());
    }
    Double_t centrality = -1;
    if (tokens->GetEntries() == 4)
      centrality = 0.5 * (TString(tokens->At(3)->GetName()).Atoi() + TString(tokens->At(2)->GetName()).Atoi());
  }
  
  hist1->GetYaxis()->SetRangeUser(-1.99, 1.99); hist2->GetYaxis()->SetRangeUser(-1.99, 1.99);
  if (!silent)
  {
    new TCanvas; 
    copy = (TH2*) hist1->DrawCopy("SURF1");
    copy->Rebin2D(2, 2);
    copy->Scale(0.25);
    copy->GetYaxis()->SetRangeUser(-1.99, 1.99);
    
    new TCanvas; 
    copy = (TH2*) hist2->DrawCopy("SURF1");
    copy->Rebin2D(2, 2);
    copy->Scale(0.25);
    copy->GetYaxis()->SetRangeUser(-1.99, 1.99);
  }
  
  if (gStudySystematic == 13)
  {
    Float_t factor[10][10][10];
    
    if (1)
    {
      // VZERO, from dphi_corr_pA_121108_hybrid_corrected.root
      factor[0][1][0] = 0.259;
      factor[0][1][1] = 0.212;
      factor[0][1][3] = 0.150;
      factor[1][1][0] = 0.105;
      factor[1][1][1] = 0.105;
      factor[1][1][3] = 0.081;
      factor[1][2][0] = 0.209;
      factor[1][2][1] = 0.176;
      factor[1][2][3] = 0.121;
      factor[2][1][0] = 0.050;
      factor[2][1][1] = -0.005;
      factor[2][1][3] = 0.031;
      factor[2][2][0] = 0.042;
      factor[2][2][1] = 0.061;
      factor[2][2][3] = 0.022;
      factor[2][3][0] = 0.081;
      factor[2][3][1] = 0.073;
      factor[2][3][3] = 0.058;
    }
    else if (0)
    {
      // ZNA, from dphi_corr_pA_121029_zna.root
      factor[0][1][0] = 0.125;
      factor[0][1][1] = 0.114;
      factor[0][1][3] = 0.052;
      factor[1][1][0] = 0.052;
      factor[1][1][1] = 0.065;
      factor[1][1][3] = 0.024;
      factor[1][2][0] = 0.113;
      factor[1][2][1] = 0.102;
      factor[1][2][3] = 0.060;
      factor[2][1][0] = 0.014;
      factor[2][1][1] = 0.023;
      factor[2][1][3] = -0.017;
      factor[2][2][0] = 0.018;
      factor[2][2][1] = 0.037;
      factor[2][2][3] = -0.005;
      factor[2][3][0] = 0.068;
      factor[2][3][1] = 0.066;
      factor[2][3][3] = 0.035;
    }
    else if (0) //V0, cmsmethod
    {
      factor[0][1][0] = 0.470 +  0.221 + 0.103;
      factor[0][1][1] = 0.432 +  0.186 + 0.080;
      factor[0][1][3] = 0.339 +  0.115 + 0.039;
      factor[1][1][0] = 0.164 +  0.027 + 0.005;
      factor[1][1][1] = 0.160 +  0.025 + 0.004;
      factor[1][1][3] = 0.111 +  0.013 + 0.001;
      factor[1][2][0] = 0.458 +  0.210 + 0.097;
      factor[1][2][1] = 0.385 +  0.148 + 0.057;
      factor[1][2][3] = 0.280 +  0.078 + 0.022;
      factor[2][1][0] = 0.026 +  0.000 + 0.000;
      factor[2][1][1] = -0.018 + 0.001 + -0.000;
      factor[2][1][3] = -0.005 + 0.000 + -0.000;
      factor[2][2][0] = 0.047 +  0.003 + -0.000;
      factor[2][2][1] = 0.044 +  0.002 + 0.000;
      factor[2][2][3] = 0.013 +  0.000 + 0.000;
      factor[2][3][0] = 0.258 +  0.067 + 0.017;
      factor[2][3][1] = 0.176 +  0.031 + 0.005;
      factor[2][3][3] = 0.118 +  0.014 + 0.002;
    }
    else
    {
      factor[1][2][0] = 0.3;
    }
    
    hist2->Scale(1.0 + factor[i][j][centr]);
  }
  
  const Float_t etaFlat = 1.2;
  const Float_t centralEta = 0.5;

  projCentral = hist1->ProjectionY(Form("%s_proj3y", hist1->GetName()), hist1->GetXaxis()->FindBin(-0.7), hist1->GetXaxis()->FindBin(0.7));
  projCentral->Scale(hist1->GetXaxis()->GetBinWidth(1));
  projCentral2 = hist2->ProjectionY(Form("%s_proj4y", hist2->GetName()), hist2->GetXaxis()->FindBin(-0.7), hist2->GetXaxis()->FindBin(0.7));
  projCentral2->Scale(hist2->GetXaxis()->GetBinWidth(1));

  Float_t yEta1 = projCentral->FindBin(-etaMax+0.01);
  Float_t yEta2 = projCentral->FindBin(-etaFlat-0.01);
  Float_t yEta3 = projCentral->FindBin(-centralEta+0.01);
  Float_t yEta4 = projCentral->FindBin(centralEta-0.01);
  Float_t yEta5 = projCentral->FindBin(etaFlat+0.01);
  Float_t yEta6 = projCentral->FindBin(etaMax-0.01);
  Float_t yBaseline = (projCentral->Integral(yEta1, yEta2) + projCentral->Integral(yEta5, yEta6)) / (yEta2 - yEta1 + 1 + yEta6 - yEta5 + 1);
  Float_t yPeak = projCentral->Integral(yEta3, yEta4, "width") - yBaseline * (yEta4 - yEta3 + 1) * projCentral->GetBinWidth(1);
  Printf("Peak (unsubtracted): %f %f", yBaseline, yPeak);

  if (!silent)
  {
    Float_t yBaseline = (projCentral->Integral(yEta1, yEta2) + projCentral->Integral(yEta5, yEta6)) / (yEta2 - yEta1 + 1 + yEta6 - yEta5 + 1);
    Float_t yBaseline2 = (projCentral2->Integral(yEta1, yEta2) + projCentral2->Integral(yEta5, yEta6)) / (yEta2 - yEta1 + 1 + yEta6 - yEta5 + 1);
    Printf("baselines: %f %f", yBaseline, yBaseline2);
    
    projCentral2->Add(new TF1("flat", "1", -5, 5), yBaseline - yBaseline2);
    
    new TCanvas; 
    projCentral->DrawCopy();
    projCentral2->SetLineColor(2);
    projCentral2->DrawCopy("SAME");
  }
  
  Float_t xValue1 = -1;
  Float_t xValue2 = -1;
  Float_t xValue1vn = -1;
  Float_t xValue2vn = -1;
  if (centralityAxis)
  {
    xValue1 = centrality + axisOffset;
    xValue2 = xValue1 + 0.5;
    xValue1vn = centrality + (Int_t) axisOffset;
    xValue2vn = xValue1vn + 0.5;
  }
  else
  {
    if (centrality > 0)
    {
      xValue1 = refMult->GetBinContent(refMult->GetXaxis()->FindBin(centrality));
      xValue2 = xValue1;
      xValue1vn = xValue1;
      xValue2vn = xValue1;
//       Printf("%f %f %f", centrality, xValue1, xValue2);
    }
  }
  
  Float_t exclusion = 0.8;
  if (gStudySystematic == 10)
    exclusion = 0.5;
  else if (gStudySystematic == 11)
    exclusion = 0.0;
  else if (gStudySystematic == 14 || gStudySystematic == 51)
    exclusion = 1.2;
  
  Int_t eta1 = hist1->GetYaxis()->FindBin(-etaMax + 0.001);
  Int_t eta2 = hist1->GetYaxis()->FindBin(-exclusion - 0.001);
  Int_t eta3 = hist1->GetYaxis()->FindBin(exclusion + 0.001);
  Int_t eta6 = hist1->GetYaxis()->FindBin(etaMax - 0.001);
  Int_t phi1Z = hist1->GetXaxis()->FindBin(TMath::Pi()/2 - 0.2);
  Int_t phi2Z = hist1->GetXaxis()->FindBin(TMath::Pi()/2 + 0.2);
  
//   new TCanvas; tmpProj = hist1->ProjectionX("tmp", eta1, eta6); tmpProj->Scale(hist1->GetYaxis()->GetBinWidth(1)); tmpProj->Scale(1.0 / (etaMax * 2)); tmpProj->Draw();
  
  Double_t baseLineE;
  Float_t baseLine = hist1->IntegralAndError(phi1Z, phi2Z, eta1, eta6, baseLineE);
  baseLine /= (phi2Z - phi1Z + 1) * (eta6 - eta1 + 1);
  baseLineE /= (phi2Z - phi1Z + 1) * (eta6 - eta1 + 1);
  
  hist1->Add(hist2, -1);
  
  // phi projection
  // NS
  proj = hist1->ProjectionX(Form("%s_proj1x", hist1->GetName()), eta1, eta2);
  proj2 = hist1->ProjectionX(Form("%s_proj2x", hist1->GetName()), eta3, eta6);
  proj->Add(proj2, 1);
  
  // AS
  projAS = hist1->ProjectionX(Form("%s_proj3x", hist1->GetName()), eta1, eta6);

  // match NS and AS yield
  proj->Scale(1.0 * (eta6 - eta1 + 1) / (eta6 - eta3 + 1 + eta2 - eta1 + 1));
  
  // copy AS
  for (Int_t bin=proj->FindBin(TMath::Pi()/2+0.001); bin<=proj->GetNbinsX(); bin++)
  {
//     Printf("%d %f", bin, projAS->GetBinContent(bin));
    proj->SetBinContent(bin, projAS->GetBinContent(bin));
    proj->SetBinError(bin, projAS->GetBinError(bin));
  }
  
  if (gStudySystematic == 12)
  {
    // get difference between exclusion 0.8 and 0.0, shift to AS, remove from AS
    
    projAll = hist1->ProjectionX(Form("%s_proj4x", hist1->GetName()), eta1, eta6);
    projAll->Add(proj, -1);
    if (!silent)
    {
      new TCanvas; projAll->DrawCopy();
    }

    // From Tim, 13.11.12
    Float_t ratioNSAS[10][10][10];
    ratioNSAS[0][1][4] = 2.060797;
    ratioNSAS[1][1][4] = 1.433904;
    ratioNSAS[1][2][4] = 1.390280;
    ratioNSAS[2][1][4] = 1.013925;
    ratioNSAS[2][2][4] = 1.070422;
    ratioNSAS[2][3][4] = 1.087238;
    ratioNSAS[3][3][4] = 1.023756;
    
    Printf("Using NS/AS ratio %f", ratioNSAS[i][j][4]);

    for (Int_t k=0; k<=projAll->GetNbinsX()/2; k++)
    {
  //     Printf("%d -> %d", i, projAll->GetNbinsX()+1-i);
      projAll->SetBinContent(projAll->GetNbinsX()+1-k, projAll->GetBinContent(k) / ratioNSAS[i][j][4]);
      projAll->SetBinError(projAll->GetNbinsX()+1-k, projAll->GetBinError(k) / ratioNSAS[i][j][4]);
      
      projAll->SetBinContent(k, 0);
      projAll->SetBinError(k, 0);
    }
    if (!silent)
    {
      new TCanvas; projAll->DrawCopy();
    }
    
//     new TCanvas; proj->DrawCopy();
    proj->Add(projAll, -1);
//     new TCanvas; proj->DrawCopy();
  }
  
  proj->Scale(hist1->GetYaxis()->GetBinWidth(1));
  proj->Scale(1.0 / (etaMax * 2));
  proj->Rebin(2); proj->Scale(0.5);

  if (gStudySystematic == 20)
  {
    Printf(">>>>>>>>>>>> Applying non-closure systematics <<<<<<<<<<<<");
    file2 = TFile::Open("non_closure.root");
    non_closure = (TH1*) file2->Get(Form("non_closure_%d_%d_%d", i, j, 0));
    for (Int_t bin=1; bin<=non_closure->GetNbinsX(); bin++)
      non_closure->SetBinError(bin, 0);
    
    proj->Multiply(non_closure);
  }
  
//   proj = hist1->ProjectionX("proj1x", hist1->GetYaxis()->FindBin(0.5), eta6);

  // eta projection
  Int_t binEtaProj1 = 1;
  Int_t binEtaProj2 = hist1->GetXaxis()->FindBin(-TMath::Pi()/3-0.001);
  Int_t binEtaProj3 = binEtaProj2 + 1;
  Int_t binEtaProj4 = hist1->GetXaxis()->FindBin(TMath::Pi()/3-0.001);
  Int_t binEtaProj5 = binEtaProj4+1;
  Int_t binEtaProj6 = hist1->GetXaxis()->FindBin(TMath::Pi()-TMath::Pi()/3-0.001);
  Int_t binEtaProj7 = binEtaProj6+1;
  Int_t binEtaProj8 = hist1->GetXaxis()->FindBin(TMath::Pi()+TMath::Pi()/3-0.001);
  Int_t binEtaProj9 = binEtaProj8+1;
  Int_t binEtaProj10 = hist1->GetNbinsX();
  Printf("%d %d %d %d %d %d %d %d %d %d", binEtaProj1, binEtaProj2, binEtaProj3, binEtaProj4, binEtaProj5, binEtaProj6, binEtaProj7, binEtaProj8, binEtaProj9, binEtaProj10);
  
  etaProj = hist1->ProjectionY(Form("%s_proj1y", hist1->GetName()), binEtaProj3, binEtaProj4);
  etaProj->Scale(1.0 / (binEtaProj4 - binEtaProj3 + 1));
  etaProj2 = hist1->ProjectionY(Form("%s_proj2y", hist1->GetName()), binEtaProj7, binEtaProj8);
  etaProj2->Scale(1.0 / (binEtaProj8 - binEtaProj7 + 1));
  etaProj3 = hist1->ProjectionY(Form("%s_proj5y", hist1->GetName()), binEtaProj1, binEtaProj2);
  etaProj3b = hist1->ProjectionY(Form("%s_proj5by", hist1->GetName()), binEtaProj5, binEtaProj6);
  etaProj3c = hist1->ProjectionY(Form("%s_proj5cy", hist1->GetName()), binEtaProj9, binEtaProj10);
  etaProj3->Add(etaProj3b);
  etaProj3->Add(etaProj3c);
  etaProj3->Scale(1.0 / (binEtaProj2 - binEtaProj1 + 1 + binEtaProj6 - binEtaProj5 + 1 + binEtaProj10 - binEtaProj9 + 1));

  Float_t ySubBaseline = (etaProj->Integral(yEta1, yEta2) + etaProj->Integral(yEta5, yEta6)) / (yEta2 - yEta1 + 1 + yEta6 - yEta5 + 1);
  Float_t ySubPeak = etaProj->Integral(yEta3, yEta4, "width") - ySubBaseline * (yEta4 - yEta3 + 1) * etaProj->GetBinWidth(1);
  Printf("Peak (subtracted): %f %f (%.2f%% of unsubtracted peak)", ySubBaseline, ySubPeak, ySubPeak / yPeak * 100);
  Printf("    factor[%d][%d][%d] = %.3f;", i, j, centr, ySubPeak / yPeak);
  AddPoint(graph[8], xValue1, 100.0 * ySubPeak / yPeak, 0, 0);
  
  hist1->Rebin2D(4, 4); hist1->Scale(1.0 / 16);
  hist1->GetYaxis()->SetRangeUser(-1.99, 1.99);
  
  TString fitOption = "0I";
  if (!silent)
  {
    c = new TCanvas("c", "c", 600, 600);

    PadFor2DCorr();
    
    hist1->GetYaxis()->SetRangeUser(-1.99, 1.99);
    hist1->GetXaxis()->SetTitleOffset(1.7);
    hist1->GetYaxis()->SetTitleOffset(2);
    hist1->GetZaxis()->SetTitle(kCorrFuncTitle);
    hist1->GetZaxis()->SetTitleOffset(2);
    hist1->GetZaxis()->SetNdivisions(504);
    hist1->SetStats(kFALSE);
    hist1->GetZaxis()->CenterTitle(kTRUE);
    hist1->GetYaxis()->CenterTitle(kTRUE);
    hist1->GetXaxis()->CenterTitle(kTRUE);
    hist1->GetXaxis()->SetTitle("#Delta#varphi (rad)");
    hist1->GetYaxis()->SetNdivisions(505);
    
    TString label(hist1->GetTitle());
    hist1->SetTitle("");
    label.ReplaceAll(".00", "");
    label.ReplaceAll(".0", "");
    TObjArray* objArray = label.Tokenize("-");
    TPaveText* paveText = new TPaveText(0.03, 0.86, 0.44, 0.97, "BRNDC");
    paveText->SetTextSize(0.035);
    paveText->SetFillColor(0);
    paveText->SetShadowColor(0);
    paveText->SetBorderSize(0);
    paveText->SetFillStyle(0);
    TString tmpStr(objArray->At(0)->GetName());
    tmpStr.ReplaceAll("p_", "#it{p}_");
    paveText->AddText(tmpStr + "GeV/#it{c}");

    TString tmpStr(objArray->At(1)->GetName());
    tmpStr.ReplaceAll("p_", "#it{p}_");
    paveText->AddText(tmpStr + "GeV/#it{c}");
  
    TString label2(hist2->GetTitle());
    TObjArray* objArray2 = label2.Tokenize("-");

    TPaveText* paveText2 = new TPaveText(0.65, 0.86, 0.98, 0.97, "BRNDC");
    paveText2->SetTextSize(0.035);
    paveText2->SetBorderSize(0);
    paveText2->SetFillColor(0);
    paveText2->SetFillStyle(0);
    paveText2->SetShadowColor(0);
    paveText2->AddText("p-Pb #sqrt{s_{NN}} = 5.02 TeV");
    if (objArray->GetEntries() > 3 && objArray2->GetEntries() > 3)
    {
      TString centrBeginStr;
      centrBeginStr = objArray->At(2)->GetName();
      centrBeginStr.ReplaceAll(" ", "");
      TString centrEndStr;
      centrEndStr = objArray2->At(2)->GetName();
      centrEndStr.ReplaceAll(" ", "");
      paveText2->AddText(Form("(%s-%s) - (%s-%s)", centrBeginStr.Data(), objArray->At(3)->GetName(), centrEndStr.Data(), objArray2->At(3)->GetName()));
    }

    hist1->DrawCopy("SURF1");
    paveText->Draw();
    paveText2->Draw();
    gPad->GetCanvas()->SaveAs(Form("ridge_%d_%d.png", i, j));
    gPad->GetCanvas()->SaveAs(Form("ridge_%d_%d.eps", i, j));
    gPad->GetCanvas()->SaveAs("fig3a.eps");
    
    Float_t fontSize = 0.05;

    c3 = new TCanvas("c3", "c3", 600, 400);
    gPad->SetLeftMargin(0.12);
    gPad->SetRightMargin(0.01);
    gPad->SetBottomMargin(0.12);
    gPad->SetTopMargin(0.01);
    etaProj->SetTitle();
//     etaProj->GetYaxis()->SetNdivisions(505);
    etaProj->GetYaxis()->SetLabelSize(fontSize);
    etaProj->GetXaxis()->SetLabelSize(fontSize);
    etaProj->GetXaxis()->SetTitleSize(fontSize);
    etaProj->GetYaxis()->SetTitleSize(fontSize);
    etaProj->GetYaxis()->SetTitle(kProjYieldTitleEta);
    etaProj->GetYaxis()->SetTitleOffset(1.1);
    etaProj->SetStats(0);
    etaProj->GetXaxis()->SetNdivisions(505);
    etaProj->Rebin(2); etaProj->Scale(0.5);
    etaProj2->Rebin(2); etaProj2->Scale(0.5);
    etaProj3->Rebin(2); etaProj3->Scale(0.5);
    etaProj->Rebin(2); etaProj->Scale(0.5);
    etaProj2->Rebin(2); etaProj2->Scale(0.5);
    etaProj3->Rebin(2); etaProj3->Scale(0.5);
    etaProj->GetXaxis()->SetRangeUser(-1.99, 1.99);
//     etaProj->GetYaxis()->SetRangeUser(TMath::Min(etaProj->GetMinimum(), etaProj3->GetMinimum()) * 0.8, TMath::Max(etaProj->GetMaximum(), etaProj3->GetMaximum()) * 1.2);
    etaProj->GetYaxis()->SetRangeUser(proj->GetMinimum() * 0.98, proj->GetMaximum() * 1.065);
    etaProj2->SetLineColor(2); etaProj2->SetMarkerColor(2);
    etaProj3->SetLineColor(4); etaProj3->SetMarkerColor(4);
    etaProj->SetMarkerStyle(24);
    etaProj2->SetMarkerStyle(25);
    etaProj3->SetMarkerStyle(26);
    etaProj->DrawCopy("E0 X0");
    etaProj2->DrawCopy("E0 X0 SAME");
    etaProj3->DrawCopy("E0 X0 SAME");
    
    legend5 = new TLegend(0.48, 0.74, 0.92, 0.97);
    legend5->SetBorderSize(0);
    legend5->SetTextSize(fontSize);
    legend5->SetFillColor(0);
    legend5->AddEntry(etaProj,  "|#Delta#varphi| < #pi/3", "P");
    legend5->AddEntry(etaProj2, "|#Delta#varphi - #pi| < #pi/3", "P");
//     legend5->AddEntry(etaProj3, "#pi/3 < |#Delta#varphi| < 2#pi/3, #Delta#varphi > 4#pi/3", "P");
    legend5->AddEntry(etaProj3, "Remaining #Delta#varphi", "P");
    legend5->Draw();
    
    c = new TCanvas("c2", "c2", 600, 400);
    gPad->SetLeftMargin(0.12);
    gPad->SetRightMargin(0.01);
    gPad->SetBottomMargin(0.12);
    gPad->SetTopMargin(0.01);
    
    proj->SetStats(0);
//     proj->GetYaxis()->SetNdivisions(505);
    proj->GetXaxis()->SetTitle("#Delta#varphi (rad)");
    proj->GetYaxis()->SetTitle(kProjYieldTitlePhi);
    proj->GetYaxis()->SetTitleOffset(1.1);
    proj->GetYaxis()->SetLabelSize(fontSize);
    proj->GetXaxis()->SetLabelSize(fontSize);
    proj->GetXaxis()->SetTitleSize(fontSize);
    proj->GetYaxis()->SetTitleSize(fontSize);
    proj->SetTitle();
    proj->SetMarkerStyle(21);
    proj->SetMarkerSize(0.7);
    proj->Draw("E0 X0");
    proj->SetMinimum(proj->GetMinimum() * 0.98); proj->SetMaximum(proj->GetMaximum() * 1.065);
//     proj->SetMinimum(proj->GetMinimum() * 1.2); proj->SetMaximum(proj->GetMaximum() * 0.6);
    fitOption = "I";
    
    if (0)
    {
      Printf("\nPer-trigger yield per unit of delta eta (y) as function of delta phi (x) in the bin %s", centralityStr.Data());
      Printf("Systematic uncertainties are mostly correlated and affect the baseline. Uncorrelated uncertainties are less than 1%% and not indicated explicitly in the table below.");

      for (Int_t k=1; k<=proj->GetNbinsX(); k++)
	Printf("x = %.2f, y = %.4f +- %.4f (stat)", proj->GetXaxis()->GetBinCenter(k), proj->GetBinContent(k), proj->GetBinError(k));
    }
  }
  
  fileProj = TFile::Open("dphi_proj.root", "UPDATE");
  proj->Write(Form("proj_%d_%d_%d_%d", i, j, centr, gStudySystematic));
  fileProj->Close();

  TF1* v2 = new TF1("func", "[0]+2*[1]*cos(2*x)", -5, 5);
  v2->SetLineStyle(2);
//   v2->SetLineWidth(1);
  
  TF1* v2v3 = new TF1("func", "[0]+2*[1]*cos(2*x)+2*[2]*cos(3*x)", -5, 5);
  v2v3->SetLineColor(2);
//   v2v3->FixParameter(2, 0);
  proj->Fit(v2, fitOption);
//   return;
    
  fitOption += "+";
  proj->Fit(v2v3, fitOption, "E0 X0");

  Float_t min = v2v3->GetMinimum();
  Float_t diffMinParam0 = v2v3->GetParameter(0) - min;
  Printf("Chi2: %f ndf: %d chi2/ndf %f:Min: %f %f", v2v3->GetChisquare(), v2v3->GetNDF(), v2v3->GetChisquare() / v2v3->GetNDF(), min, diffMinParam0);
  AddPoint(graph[10], xValue1, v2v3->GetChisquare() / v2v3->GetNDF(), 0, 0);

  AddPoint(graph[11], xValue1, baseLine + diffMinParam0, 0, baseLineE);
//   AddPoint(graph[11], xValue1, baseLine, 0, baseLineE);
  
  Float_t v2value = 0, v2E = 0, v3 = 0, v3E = 0;
  if (v2v3->GetParameter(1) > 0)
  {
    v2value = TMath::Sqrt(v2v3->GetParameter(1) / (baseLine + diffMinParam0));
    v2E = 0.5 * v2value * TMath::Sqrt(v2v3->GetParError(1) * v2v3->GetParError(1) / v2v3->GetParameter(1) / v2v3->GetParameter(1) + baseLineE * baseLineE / baseLine / baseLine);
    if (symmetricpT)
      AddPoint(graph[4], xValue1vn, v2value, 0, v2E);
  }
  if (v2v3->GetParameter(2) > 0)
  {
    v3 = TMath::Sqrt(v2v3->GetParameter(2) / (baseLine + diffMinParam0));
    v3E = 0.5 * v3 * TMath::Sqrt(v2v3->GetParError(2) * v2v3->GetParError(2) / v2v3->GetParameter(2) / v2v3->GetParameter(2) + baseLineE * baseLineE / baseLine / baseLine);
    if (symmetricpT)
      AddPoint(graph[5], xValue2vn, v3, 0, v3E);
  }
  if (v2v3->GetParameter(1) > 0 && v2v3->GetParameter(2) > 0 && symmetricpT)
  {
    Float_t v3v2Ratio = TMath::Sqrt(v2v3->GetParameter(2) / v2v3->GetParameter(1));
    Float_t v3v2RatioE = 0.5 * v3v2Ratio * TMath::Sqrt(v2v3->GetParError(1) * v2v3->GetParError(1) / v2v3->GetParameter(1) / v2v3->GetParameter(1) + v2v3->GetParError(2) * v2v3->GetParError(2) / v2v3->GetParameter(2) / v2v3->GetParameter(2));
    AddPoint(graph[7], xValue1vn, v3v2Ratio, 0, v3v2RatioE);
  }
  
  Printf("Baseline: %f +- %f; v2 = %f +- %f; v3 = %f +- %f", baseLine, baseLineE, v2value, v2E, v3, v3E);
  
  if (gStudySystematic == 30)
  {
    // alternative way for baseline
    
    parabola = new TF1("parabola", "[0] + [1]*(x - [2])**2",  0, TMath::Pi());
    parabola->SetLineColor(3);
    parabola->SetParameters(min, -0.1, TMath::Pi() / 2);
//     parabola->SetParLimits(1, 0, 1);
    proj->Fit(parabola, fitOption, "", TMath::Pi() / 2 - 1, TMath::Pi() / 2 + 1);
//     proj->Fit(parabola, fitOption, "", 0.1, 2);
    
    min = parabola->GetParameter(0);
    Printf("New baseline: %f", min);
  }

  fitOption += "R";
  
  if (0)
  {
    // single gauss fit
    
    TF1* gaus1 = new TF1("gaus1", "[0]+gaus(1)", -0.5 * TMath::Pi(), 0.5 * TMath::Pi());
    gaus1->SetParameters(min, 1, 0, 1);
  //   gaus1->FixParameter(0, min);
    gaus1->FixParameter(2, 0);
    gaus1->SetParLimits(1, 0.001, 10);
    gaus1->SetParLimits(3, 0.1, 2);
    gaus1->SetLineColor(3);
    proj->Fit(gaus1, fitOption);
    
    TF1* gaus2 = new TF1("gaus2", "[0]+gaus(1)", 0.5 * TMath::Pi(), 1.5 * TMath::Pi());
    gaus2->SetParameters(min, 1, TMath::Pi(), 1);
    gaus2->FixParameter(2, TMath::Pi());
    gaus2->SetParLimits(1, 0.001, 10);
    gaus2->SetParLimits(3, 0.1, 2);
    gaus2->SetLineColor(3);
    proj->Fit(gaus2, fitOption);
  
    AddPoint(graph[2], xValue1, gaus1->GetParameter(3), 0, gaus1->GetParError(3));
    AddPoint(graph[3], xValue2, gaus2->GetParameter(3), 0, gaus2->GetParError(3));
  }
  else if (0)
  {
    // combined gauss fit
    
    TF1* gausBoth = new TF1("gaus2", "[0]+[1]*(exp(-0.5*(x/[2])**2)+exp(-0.5*((x-TMath::TwoPi())/[2])**2))+[3]*(exp(-0.5*((x-TMath::Pi())/[4])**2)+exp(-0.5*((x+TMath::Pi())/[4])**2))", -0.5 * TMath::Pi(), 1.5 * TMath::Pi());
    gausBoth->SetParameters(min, 1, 1, 1, 1);
  //   gausBoth->FixParameter(0, min);
    gausBoth->SetParLimits(1, 0.0001, 10);
    gausBoth->SetParLimits(3, 0.0001, 10);
    gausBoth->SetParLimits(2, 0.1, 4);
    gausBoth->SetParLimits(4, 0.1, 4);
    gausBoth->SetLineColor(6);
    
    proj->Fit(gausBoth, fitOption);
  
    AddPoint(graph[2], xValue1, gausBoth->GetParameter(2), 0, gausBoth->GetParError(3));
    AddPoint(graph[3], xValue2, gausBoth->GetParameter(4), 0, gausBoth->GetParError(4));
  }
  else
  {
    // RMS without baseline
    projRMS = (TH1*) proj->Clone();
    projRMS->Add(new TF1("f", "1", -10, 10), -min);
    projRMS->GetXaxis()->SetRangeUser(-TMath::Pi()/2 + 0.01, TMath::Pi()/2 - 0.01);
    AddPoint(graph[2], xValue1, projRMS->GetRMS(), 0, projRMS->GetRMSError());
    projRMS->GetXaxis()->SetRangeUser(TMath::Pi()/2 + 0.01, 3 * TMath::Pi()/2 - 0.01);
    AddPoint(graph[3], xValue2, projRMS->GetRMS(), 0, projRMS->GetRMSError());
//     new TCanvas; projRMS->Draw(); return;
  }
  
//   new TCanvas; gausBoth->Draw(); return;

  if (!silent)
  {
    TF1* v2v3_v2 = new TF1("func", "[0]+2*[1]*cos(2*x)", -5, 5);
    v2v3_v2->SetParameters(v2v3->GetParameter(0), v2v3->GetParameter(1));
    v2v3_v2->SetLineStyle(3);
    v2v3_v2->SetLineColor(2);
//     v2v3_v2->Draw("SAME");
    TF1* v2v3_v3 = new TF1("func", "[0]+2*[1]*cos(3*x)", -5, 5);
    v2v3_v3->SetParameters(v2v3->GetParameter(0), v2v3->GetParameter(2));
    v2v3_v3->SetLineStyle(4);
    v2v3_v3->SetLineColor(2);
//     v2v3_v3->Draw("SAME");
    
    line = new TLine(-0.5 * TMath::Pi(), min, 1.5 * TMath::Pi(), min);
    line->SetLineWidth(2);
    line->SetLineColor(4);
    line->Draw();

    legend = new TLegend(0.47, 0.65, 0.88, 0.95);
    legend->SetFillColor(0);
    legend->SetBorderSize(0);

    legend->AddEntry(proj, "Data", "P");
    legend->AddEntry(v2v3, "a_{0} + a_{2} cos(2#Delta#varphi) + a_{3} cos(3#Delta#varphi)", "L");
    legend->AddEntry(v2, "a_{0} + a_{2} cos(2#Delta#varphi)", "L");
    legend->AddEntry(line, "Baseline for yield extraction", "L");

    if (1)
    {
      hijingFile = TFile::Open("dphi_proj_hijing.root");
      if (hijingFile)
      {
	hijing = (TH1*) hijingFile->Get(Form("proj_%d_%d_%d_0", i, j, centr));
	if (hijing)
	{
	  hijing->Add(new TF1("flat", "1", -5, 5), min - ((i == 1) ? 0.192078 : 0.373710));
	  hijing->SetMarkerColor(2);
	  hijing->SetLineColor(2);
	  hijing->SetMarkerStyle(25);
	  hijing->Draw("SAME E0X0");
	  legend->AddEntry(hijing, "HIJING shifted", "P");
	}
      }
    }
    
    legend->SetTextSize(fontSize);
    legend->Draw();
    
//     paveText3 = (TPaveText*) paveText2->Clone();
//     paveText3->SetX1NDC(0.16);
//     paveText3->SetY1NDC(0.77);
//     paveText3->SetX2NDC(0.42);
//     paveText3->SetY2NDC(0.94);
//     paveText3->Draw();
    paveText4 = (TPaveText*) paveText2->Clone();
    paveText4->SetTextSize(fontSize);
    paveText4->SetX1NDC(0.16);
    paveText4->SetY1NDC(0.68);
    paveText4->SetX2NDC(0.42);
    paveText4->SetY2NDC(0.96);

    TString tmpStr(objArray->At(0)->GetName());
    tmpStr.ReplaceAll("p_", "#it{p}_");
    paveText4->AddText(tmpStr + "GeV/#it{c}");

    TString tmpStr(objArray->At(1)->GetName());
    tmpStr.ReplaceAll("p_", "#it{p}_");
    paveText4->AddText(tmpStr + "GeV/#it{c}");
    
    paveText4->Draw();
    
//     DrawLatex(0.27, 0.19, 1, Form("%sGeV/#it{c}       %sGeV/#it{c}", objArray->At(0)->GetName(), objArray->At(1)->GetName()), fontSize);
    
    gPad->GetCanvas()->SaveAs(Form("ridge_fit_%d_%d.png", i, j));
    gPad->GetCanvas()->SaveAs(Form("ridge_fit_%d_%d.eps", i, j));
    gPad->GetCanvas()->SaveAs("fig3b.eps");
    
    c3->cd();
    paveText3 = (TPaveText*) paveText4->Clone();
    paveText3->Draw();
    gPad->GetCanvas()->SaveAs(Form("ridge_eta_%d_%d.png", i, j));
    gPad->GetCanvas()->SaveAs(Form("ridge_eta_%d_%d.eps", i, j));
    gPad->GetCanvas()->SaveAs("fig3c.eps");
  }
  
  if (gStudySystematic != 50 && gStudySystematic != 51)
  {
    Int_t phi1 = 1;
    Int_t phi2 = proj->FindBin(TMath::Pi()/2-0.001);
    Int_t phi3 = phi2 + 1;
    Int_t phi4 = proj->GetNbinsX();
  }
  else
  {
    Printf(">>>> Using |dphi| < 1.2 <<<<");
    Int_t phi1 = proj->FindBin(-1.2);;
    Int_t phi2 = proj->FindBin(1.2);
    Int_t phi3 = proj->FindBin(TMath::Pi() - 1.2);
    Int_t phi4 = proj->FindBin(TMath::Pi() + 1.2);
    Printf("%d %d %d %d", phi1, phi2, phi3, phi4);
  }
  
  Double_t nsYield, asYield, nsYieldE, asYieldE;
  
  nsYield = proj->IntegralAndError(phi1, phi2, nsYieldE, "width");
  nsYield -= min * proj->GetBinWidth(1) * (phi2 - phi1 + 1);
  
  asYield = proj->IntegralAndError(phi3, phi4, asYieldE, "width");
  asYield -= min * proj->GetBinWidth(1) * (phi4 - phi3 + 1);
  
  AddPoint(graph[0], xValue1, nsYield, 0, nsYieldE);
  AddPoint(graph[1], xValue2, asYield, 0, asYieldE);
  
  if (nsYieldE > 0 && asYieldE > 0)
    AddPoint(graph[6], xValue1, nsYield / asYield, 0, nsYield / asYield * TMath::Sqrt(nsYieldE * nsYieldE / nsYield / nsYield + asYieldE * asYieldE / asYield / asYield));
  
  AddPoint(graph[9], xValue1, 100.0 * ySubPeak / (etaMax * 2) / nsYield, 0, 0);
  
  Printf("Yields: %f +- %f ; %f +- %f", nsYield, nsYieldE, asYield, asYieldE);
}

Int_t colors[] = { 1, 2, 3, 4, kGray+1, 6, 7, 8 };

void DrawSeveral(Int_t n, const char** graphFiles, Int_t id)
{
  ReadGraphs(graphFiles[0]);
  TGraphErrors*** base = graphs;

  Float_t yMax[] = { 0.1, 0.1, 2, 2, 0.25, 0.25, 4, 1.5, 50, 50, 4, 4 };
  Int_t markers[] = { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 };

  TString baseName(graphFiles[0]);
  baseName.ReplaceAll(".", "_");
  TCanvas* canvas = new TCanvas(Form("%s_%d", baseName.Data(), id), Form("%s_%d", baseName.Data(), id), 800, 600);
//   Printf("%p", canvas);
  gPad->SetGridx();
  gPad->SetGridy();
  dummy = new TH2F(Form("hist_%s_%d", graphFiles[0], id), Form(";%s;%s", graphs[0][id]->GetXaxis()->GetTitle(), graphs[0][id]->GetYaxis()->GetTitle()), 100, 0, 100, 100, 0, yMax[id]);
  dummy->SetStats(0);
  dummy->DrawCopy();
  
  TCanvas* canvas2 = new TCanvas(Form("%s_%d_ratio", baseName.Data(), id), Form("%s_%d", baseName.Data(), id), 800, 600);
  gPad->SetGridx();
  gPad->SetGridy();
  dummy = new TH2F(Form("hist_%s_%d_ratio", graphFiles[0], id), Form(";%s;%s ratio", graphs[0][id]->GetXaxis()->GetTitle(), graphs[0][id]->GetYaxis()->GetTitle()), 100, 0, 100, 100, 0, 2);
  dummy->SetStats(0);
  dummy->DrawCopy();

  legend = new TLegend(0.4, 0.6, 0.99, 0.99);
  legend->SetFillColor(0);
  
  for (Int_t fc = 0; fc<n; fc++)
  {
    ReadGraphs(graphFiles[fc]);
    
    for (Int_t i=0; i<NGraphs; i++)
    {
      if (TString(graphFiles[0]).Contains("cms") && i != 2 && i != 5) continue;
    
      if (!graphs[i][id])
	continue;
      
      graphs[i][id]->Print();
    
      canvas->cd();
//       Printf("%p", canvas);
      graphs[i][id]->SetMarkerStyle(markers[i%16]);
      graphs[i][id]->SetMarkerColor(colors[fc]);
      graphs[i][id]->SetLineColor(colors[fc]);
      GraphShiftX((TGraphErrors*) graphs[i][id]->DrawClone("PSAME"), 0.5 / n * fc);

      if (fc == 0 && graphs[i][id]->GetN() > 0)
	legend->AddEntry(graphs[i][id], graphs[i][id]->GetTitle(), "P");
      
      if (fc > 0)
      {
	canvas2->cd();
	DivideGraphs(graphs[i][id], base[i][id]);
	GraphShiftX((TGraphErrors*) graphs[i][id]->DrawClone("PSAME"), 0.5 / n * fc);
      }
    }
  }

  canvas->cd();
  legend->Draw();
  canvas->SaveAs(Form("%s.eps", canvas->GetName()));
  canvas->SaveAs(Form("%s.png", canvas->GetName()));

  canvas2->cd();
  legend->Draw();
  canvas2->SaveAs(Form("%s.eps", canvas2->GetName()));
  canvas2->SaveAs(Form("%s.png", canvas2->GetName()));
}

void CMSRidge()
{
  CreateGraphStructure();
  
  // scaling done for zyam level difference (note that the values in fig2 have to be multiplied by 2 due to the |dphi| instead of dphi
  
  // Fig3a
  // 0.334516912727  0.0104728088208
  // 0.721360493366  0.0263651653896
  // 1.1900579331  0.0301999626238
  // 1.68965302436  0.024186548724
  // 2.19286114745  0.0123441101352
  // 2.69021366723  0.00994871155963
  // 3.38790257273  0.00434394401877

//   AddPoint(graphs[0][0], 55.3, 0.0263651653896, 0, 0);
  AddPoint(graphs[2][0], 55.383968, 0.0301999626238 * 0.72 * 2 / 1.336, 0, 0);
  AddPoint(graphs[5][0], 55.383968, 0.0123441101352 * 0.154 * 2 / 0.229, 0, 0);
  
  // Fig3b
  // 128.344370861  0.0254622516556
  // 98.1456953642  0.0154940397351
  // 56.6225165563  0.00493774834437
  // 17.6158940397  0.00037880794702
  // Ref multiplicity for centrality 0.000000 to 3.000000: 55.284322
  // Ref multiplicity for centrality 3.000000 to 10.000000: 41.124550
  // Ref multiplicity for centrality 10.000000 to 50.000000: 24.334303
  // Ref multiplicity for centrality 50.000000 to 100.000000: 8.008294

//   AddPoint(graphs[2][0], 55.3, 0.0254622516556, 0, 0);
  AddPoint(graphs[2][0], 40.649288, 0.0154940397351 * 0.5 * 2 / 0.985, 0, 0);
  AddPoint(graphs[2][0], 23.783224, 0.00493774834437 * 0.29 * 2 / 0.506, 0, 0);

  WriteGraphs("graphs_cms.root");
}

void ALICECMSMethod()
{
  CreateGraphStructure();
  
  AddPoint(graphs[2][0], 10, 0.027, 0, 0);
  AddPoint(graphs[4][0], 10, 0.115 / 1.34 * 1, 0, 0);
  AddPoint(graphs[5][0], 10, 0.019 / 0.152 * 0.126, 0, 0);
  
  AddPoint(graphs[2][4], 10, 0.09, 0, 0);
//   AddPoint(graphs[4][4], 10, 0.115, 0, 0);
  AddPoint(graphs[5][4], 10, 0.137, 0, 0);

  AddPoint(graphs[2][5], 10, 0.04, 0, 0);
//   AddPoint(graphs[4][5], 10, 0.046, 0, 0);
  AddPoint(graphs[5][5], 10, 0.06, 0, 0);

  WriteGraphs("graphs_alice_cmsmethod.root");
}

void GetSystematic()
{
  fileProj = TFile::Open("dphi_proj.root", "RECREATE");
  fileProj->Close();

  gROOT->SetBatch(kTRUE);
  
  if (1)
  {
    const char* baseFile = "dphi_corr_pA_121119_3.root";
//     const char* baseFile = "dphi_corr_pA_121108_hybrid_corrected.root";
    TString fileTag = "graphs_121119";
  }
  else if (0)
  {
    const char* baseFile = "dphi_corr_pA_121029_zna.root";
    TString fileTag = "graphs_121113_zna_uncorrected";
  }
  else if (0)
  {
    // needs dphi setting...
    const char* baseFile = "dphi_corr_pA_121119_cms_2.root";
    TString fileTag = "graphs_cms_121119";
  }
  else if (1)
  {
    const char* baseFile = "dphi_corr_pA_121121_cmsmethod.root";
    TString fileTag = "graphs_cmmethod_121121";
  }
  
  CorrelationSubtractionHistogram(baseFile, kTRUE, fileTag + ".root");
  
  gStudySystematic = 10;
  CorrelationSubtractionHistogram(baseFile, kTRUE, fileTag + "_exclusion05.root");
  
  gStudySystematic = 11;
  CorrelationSubtractionHistogram(baseFile, kTRUE, fileTag + "_exclusion00.root");

  gStudySystematic = 12;
  CorrelationSubtractionHistogram(baseFile, kTRUE, fileTag + "_exclusionAS.root");

  gStudySystematic = 13;
  CorrelationSubtractionHistogram(baseFile, kTRUE, fileTag + "_exclusionScale.root");

  gStudySystematic = 14;
  CorrelationSubtractionHistogram(baseFile, kTRUE, fileTag + "_exclusion12.root");
  
//   return;
  
  gStudySystematic = 20;
  CorrelationSubtractionHistogram(baseFile, kTRUE, fileTag + "_nonclosure.root");

  gStudySystematic = 30;
  CorrelationSubtractionHistogram(baseFile, kTRUE, fileTag + "_baseline.root");
  
  gStudySystematic = 40;
  CorrelationSubtractionHistogram("dphi_corr_pA_121116_global.root", kTRUE, fileTag + "_trackcuts.root");

  gStudySystematic = 60;
  CorrelationSubtractionHistogram(baseFile, kTRUE, fileTag + "_otherperipheral.root");
}

void DrawSystematics(TString fileTag = "graphs_121119", const char* suffix = "")
{
  if (0)
  {
    const Int_t n = 6;
    const char* filesBase[] = { "", "_exclusion05", "_exclusion12", "_exclusion00", "_exclusionAS", "_exclusionScale" };
  }
  else if (0)
  {
    const Int_t n = 5;
    const char* filesBase[] = { "", "_trackcuts", "_nonclosure", "_baseline", "_otherperipheral" };
  }
  else
  {
    const Int_t n = 3;
    const char* filesBase[] = { "", "_analytical", "_asgap" };
  }
  
  const char* files[n];
  for (Int_t i=0; i<n; i++)
  {
    str = new TString;
    str->Form("%s%s%s.root", fileTag.Data(), filesBase[i], suffix);
    files[i] = str->Data();
  }
  
//   const Int_t plots = 6;
//   Int_t ids[7] = { 0, 1, 2, 3, 4, 5, 7 };
  
  const Int_t plots = 1;
  Int_t ids[] = { 4 };

  for (Int_t i=0; i<plots; i++)
  {
    DrawSeveral(n, files, ids[i]);
//     break;
  }
  
  new TCanvas;
  for (Int_t i=0; i<n; i++)
    DrawLatex(0.2, 0.9 - 0.1 * i, colors[i], files[i]);
}

void DrawSeveral(const char* graphFile1, const char* graphFile2, const char* graphFile3, Int_t id)
{
  const char* files[3] = { graphFile1, graphFile2, graphFile3 };
  Int_t n = 1;
  if (graphFile2)
    n++;
  if (graphFile3)
    n++;
  
  DrawSeveral(n, files, id);
}
  
void DrawYield(const char* graphFile)
{
  DrawGraph(graphFile, 0, 1, "Ridge yield per #Delta#eta", "fig4b.eps", kTRUE);
}

void DrawRMS(const char* graphFile)
{
  DrawGraph(graphFile, 2, 3, "#sigma", 0);
}

void Drawv2v3(const char* graphFile)
{
  DrawGraph(graphFile, 4, 5, "#it{v}_{2} , #it{v}_{3}", "fig4a.eps");
}

void AddSystUnc(TGraphErrors* graph, Float_t syst020, Float_t syst2060)
{
  for (Int_t j=0; j<graph->GetN(); j++)
  {
    Float_t syst = syst2060;
    if (graph->GetX()[j] < 20)
      syst = syst020;
  
//     Printf("%d %f", j, syst);
    graph->GetEY()[j] = TMath::Sqrt(graph->GetEY()[j] * graph->GetEY()[j] + syst * syst * graph->GetY()[j] * graph->GetY()[j]);
  }
}

void SetSystUnc(TGraphErrors* graph, Float_t syst020, Float_t syst2060)
{
  for (Int_t j=0; j<graph->GetN(); j++)
  {
    Float_t syst = syst2060;
    if (graph->GetX()[j] < 20)
      syst = syst020;
  
//     Printf("%d %f", j, syst);
    graph->GetEY()[j] = syst * graph->GetY()[j];
  }
}

void SetXError(TGraphErrors* graph, Float_t value)
{
  for (Int_t j=0; j<graph->GetN(); j++)
    graph->GetEX()[j] = value;
}

void SetYError(TGraphErrors* graph, Float_t value)
{
  for (Int_t j=0; j<graph->GetN(); j++)
    graph->GetEY()[j] = value;
}

void DrawGraph(const char* graphFile, Int_t id1, Int_t id2, const char* yLabel = 0, const char* outputFileName, Bool_t corrGraph = kFALSE)
{
  ReadGraphs(graphFile);
  TGraphErrors*** graphsSyst = graphs;
  ReadGraphs(graphFile);
  TGraphErrors*** graphsCombinedError = graphs;
  ReadGraphs(graphFile);
  
  if (yLabel == 0)
    yLabel = graphs[0][id1]->GetYaxis()->GetTitle();
  
  Float_t yMax[] = { 0.12, 0.12, 2, 2, 0.2, 0.25, 4, 1.5, 50, 50, 4 };
  Int_t markers[] = { 20, 21, 22, 23, 29, 33, 34, 2, 3, 5, 2, 3, 5, 2, 3, 5 };
  Int_t markers2[] = { 24, 25, 26, 32, 30, 27, 28, 2, 3, 5, 2, 3, 5, 2, 3, 5 };
  Float_t markerSize[] = { 1.7, 1.7, 1.7, 1.7, 2.0, 2.0, 1.7, 1.7, 1.7, 1.7, 1.7, 1.7, 1.7, 1.7, 1.7 };

  if (1)
  {
    // default systs (for all pT, centr)
    Float_t syst020Array[] = { 0.16, 0.18, 0.15, 0.15, 0.14, 0.23 };
    Float_t syst2060Array[] = { 0.23, 0.25, 0.23, 0.23, 0.18, 0.42 };
    
    // 0.5<1 0.5<1
    Float_t syst020ArrayGr0[] = { 0.23, 0.25, 0.15, 0.15, 0.14, 0.23 };
    Float_t syst2060ArrayGr0[] = { 0.42, 0.43, 0.23, 0.23, 0.18, 0.42 };

    for (Int_t i=0; i<NGraphs; i++)
    {
      Float_t syst020 = syst020Array[id1];
      Float_t syst2060 = syst2060Array[id1];
      
      if (i == 0)
      {
	syst020 = syst020ArrayGr0[id1];
	syst2060 = syst2060ArrayGr0[id1];
      }
      
//       Printf("%d %d %f %f", i, id1, syst020, syst2060);
      SetSystUnc(graphsSyst[i][id1], syst020, syst2060);
      AddSystUnc(graphsCombinedError[i][id1], syst020, syst2060);
      SetXError(graphsSyst[i][id1], 0.3);

      Float_t syst020 = syst020Array[id2];
      Float_t syst2060 = syst2060Array[id2];
      
      if (i == 0)
      {
	syst020 = syst020ArrayGr0[id2];
	syst2060 = syst2060ArrayGr0[id2];
      }

      SetSystUnc(graphsSyst[i][id2], syst020, syst2060);
      AddSystUnc(graphsCombinedError[i][id2], syst020, syst2060);
      SetXError(graphsSyst[i][id2], 0.3);
    }
    
//     graphs[0][id1]->Print();
  }
  
  const char* eventClass[] = { "0-20%", "20-40%", "40-60%" };
  Printf("\n%s:", graphTitles[id1]);
  for (Int_t i=0; i<3; i++)
  {
    Printf("Event class: %s minus 60-100%%", eventClass[i]);
    
    for (Int_t j=0; j<NGraphs; j++)
      if (graphs[j][id1]->GetN() > i)
	Printf("%s: %.4f +- %.4f (stat) +- %.4f (syst)", graphs[j][id1]->GetTitle(), graphs[j][id1]->GetY()[i], graphs[j][id1]->GetEY()[i], graphsSyst[j][id1]->GetEY()[i]);
  }
    
  Printf("\n%s:", graphTitles[id2]);
  for (Int_t i=0; i<3; i++)
  {
    Printf("Event class: %s minus 60-100%%", eventClass[i]);
    
    for (Int_t j=0; j<NGraphs; j++)
      if (graphs[j][id2]->GetN() > i)
	Printf("%s: %.4f +- %.4f (stat) +- %.4f (syst)", graphs[j][id2]->GetTitle(), graphs[j][id2]->GetY()[i], graphs[j][id2]->GetEY()[i], graphsSyst[j][id2]->GetEY()[i]);
  }

  TCanvas* canvas = new TCanvas;
  gPad->SetTopMargin(0.03);
  gPad->SetRightMargin(0.01);
  gPad->SetLeftMargin(0.14);
  gPad->SetBottomMargin(0.13);
//   gPad->SetGridx();
//   gPad->SetGridy();
  TH2F* dummy = new TH2F("dummy", Form(";%s;%s", graphs[0][id1]->GetXaxis()->GetTitle(), yLabel), 3, 0, 60, 100, 0, yMax[id1]);
  dummy->GetYaxis()->SetTitleOffset(1.1);
  dummy->SetStats(0);
  dummy->GetYaxis()->SetNdivisions(505);
  dummy->GetXaxis()->SetLabelSize(0.06);
  dummy->GetYaxis()->SetLabelSize(0.06);
  dummy->GetXaxis()->SetTitleSize(0.06);
  dummy->GetYaxis()->SetTitleSize(0.06);
  dummy->Draw();
  
  if (strcmp(graphs[0][id1]->GetXaxis()->GetTitle(), "Event class") == 0)
  {
    dummy->GetXaxis()->SetBinLabel(1, "0-20%");
    dummy->GetXaxis()->SetBinLabel(2, "20-40%");
    dummy->GetXaxis()->SetBinLabel(3, "40-60%");
    dummy->GetXaxis()->SetLabelSize(0.09);
    dummy->GetXaxis()->SetTitleOffset(1);
  }
  
  legend = new TLegend((id1 == 4) ? 0.47 : 0.33, (id1 == 4) ? 0.70 : 0.55, 0.95, 0.92);
  legend->SetNColumns(2);
  if (id1 == 0 || id1 == 2)
    legend->SetHeader("Near side   Away side");
  else if (id1 == 4)
    legend->SetHeader("  #it{v}_{2}       #it{v}_{3}");
    
  legend->SetFillColor(0);
  legend->SetBorderSize(0);

  if (0)
  {
    Int_t fillStyle[11] = { 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011 };
    
    for (Int_t i=0; i<NGraphs; i++)
    {
      graphsSyst[i][id1]->SetMarkerStyle(1);
      graphsSyst[i][id1]->SetMarkerColor(1);
      graphsSyst[i][id1]->SetLineColor(1);
      graphsSyst[i][id1]->SetFillColor(1);
      graphsSyst[i][id1]->SetFillStyle(3001);
      graphsSyst[i][id1]->Draw("2SAME");

      graphsSyst[i][id2]->SetMarkerStyle(1);
      graphsSyst[i][id2]->SetMarkerColor(2);
      graphsSyst[i][id2]->SetLineColor(2);
      graphsSyst[i][id2]->SetFillColor(2);
      graphsSyst[i][id2]->SetFillStyle(3001);
      graphsSyst[i][id2]->Draw("2SAME");
    }
  }
  else
    Printf(">>>>>>>>>>>> SKIPPING SYST");

  
  for (Int_t i=0; i<NGraphs; i++)
  {
    if (graphs[i][id1]->GetN() == 0)
      continue;
    
    graphs[i][id1]->SetMarkerStyle(markers[i]);
    graphs[i][id1]->SetMarkerSize(markerSize[i]);
    graphs[i][id1]->SetMarkerColor(1);
    graphs[i][id1]->SetLineColor(1);
    graphs[i][id1]->Draw("PSAME");

    graphs[i][id2]->SetMarkerStyle(markers2[i]);
    graphs[i][id2]->SetMarkerSize(markerSize[i]);
    graphs[i][id2]->SetMarkerColor(2);
    graphs[i][id2]->SetLineColor(2);
    graphs[i][id2]->Draw("PSAME");

    TString label(graphs[i][id1]->GetTitle());
    label.ReplaceAll(".00", ".0");
    label.ReplaceAll(".50", ".5");
    
    
/*    label.ReplaceAll(".0", " GeV/#it{c}");
    label.ReplaceAll(".5", ".5 GeV/#it{c}");*/
    TObjArray* objArray = label.Tokenize("-");
    label.Form("%s-%s", objArray->At(0)->GetName(), objArray->At(1)->GetName());
    label.ReplaceAll("-", ";");
    
    if (id1 == 4)
    {
      // reduce label
      label.ReplaceAll(" ", "");
      label.ReplaceAll(";", "<");
      tokens = label.Tokenize("<");
      label.Form("%s < %s < %s < %s ", tokens->At(0)->GetName(), tokens->At(1)->GetName(), tokens->At(4)->GetName(), tokens->At(5)->GetName());
    }
    
    label.ReplaceAll("p_", "#it{p}_");
    label += "GeV/#it{c}";

    if (graphs[i][id1]->GetN() > 0)
    {
      legend->AddEntry(graphs[i][id1], (id1 == 4) ? " " : "    ", "P");
      legend->AddEntry(graphs[i][id2], label, "P");
    }
  }
  
  legend->Draw();
  DrawLatex(0.7, 0.92, 1, "p-Pb #sqrt{s_{NN}} = 5.02 TeV", 0.04);
  
  canvas->SaveAs(outputFileName);
  
  if (!corrGraph)
    return;
  
  corr = new TGraphErrors;
  for (Int_t i=0; i<NGraphs; i++)
  {
    for (Int_t j=0; j<graphs[i][id1]->GetN(); j++)
      AddPoint(corr, graphsCombinedError[i][id1]->GetY()[j], graphsCombinedError[i][id2]->GetY()[j], graphsCombinedError[i][id1]->GetEY()[j], graphsCombinedError[i][id2]->GetEY()[j]);
  }

  new TCanvas;
  gPad->SetTopMargin(0.03);
  gPad->SetRightMargin(0.02);
  gPad->SetLeftMargin(0.14);
  gPad->SetBottomMargin(0.13);
  TString titleString;
  titleString.Form(";%s;%s", graphs[0][id1]->GetYaxis()->GetTitle(), graphs[0][id2]->GetYaxis()->GetTitle());
  titleString.ReplaceAll("NS", "Near-side");
  titleString.ReplaceAll("AS", "Away-side");
  titleString.ReplaceAll("Ridge Yield", "ridge yield per #Delta#eta");
  dummy = new TH2F("dummy2", titleString, 100, 0, 0.095, 100, 1e-5, 0.095);
  dummy->GetYaxis()->SetTitleOffset(1.1);
  dummy->SetStats(0);
  dummy->GetXaxis()->SetNdivisions(505);
  dummy->GetYaxis()->SetNdivisions(505);
  dummy->GetXaxis()->SetLabelSize(0.06);
  dummy->GetYaxis()->SetLabelSize(0.06);
  dummy->GetXaxis()->SetTitleSize(0.06);
  dummy->GetYaxis()->SetTitleSize(0.06);
  dummy->Draw();

  corr->Draw("PSAME");
  
  line = new TLine(0, 0, 0.095, 0.095);
  line->SetLineWidth(2);
  line->SetLineStyle(2);
  line->Draw();

  DrawLatex(0.18, 0.92, 1, "p-Pb #sqrt{s_{NN}} = 5.02 TeV", 0.04);
}

void PaperCorrFuncAll(const char* fileName)
{
  Int_t n = 6;
  Int_t is[] = { 0, 1, 1, 2, 2, 2, 3 };
  Int_t js[] = { 1, 1, 2, 1, 2, 3, 3 };
  Int_t centr[] = { 0, 1, 3, 4 };

  for (Int_t i=0; i<n; i++)
    for (Int_t j=0; j<4; j++)
      PaperCorrFunc(fileName, is[i], js[i], centr[j]);
}

void PaperCorrFunc(const char* fileName, Int_t i = 2, Int_t j = 2, Int_t centr = 0)
{
  TFile::Open(fileName);
  
  TH2* hist1 = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, centr));

  if (!hist1)
    return 0;
  // NOTE fix normalization. these 2d correlations come out of AliUEHist normalized by dphi bin width, but not deta
  hist1->Scale(1.0 / hist1->GetYaxis()->GetBinWidth(1));

  hist1 = (TH2*) hist1->Clone();
  hist1->Rebin2D(2, 2); hist1->Scale(0.25);
//   hist1->Rebin2D(2, 1); hist1->Scale(0.5);
  
  hist1->GetYaxis()->SetRangeUser(-1.99, 1.99);
  hist1->GetXaxis()->SetTitleOffset(1.5);
  hist1->GetYaxis()->SetTitleOffset(2);
  hist1->GetZaxis()->SetTitle(kCorrFuncTitle);
  hist1->SetStats(kFALSE);
  hist1->GetZaxis()->SetTitleOffset(2);
  hist1->GetZaxis()->SetNdivisions(504);
  hist1->SetStats(kFALSE);
  hist1->GetZaxis()->CenterTitle(kTRUE);
  hist1->GetYaxis()->CenterTitle(kTRUE);
  hist1->GetXaxis()->CenterTitle(kTRUE);
  hist1->GetYaxis()->SetNdivisions(505);
  hist1->GetXaxis()->SetTitle("#Delta#varphi (rad)");

  c = new TCanvas("c", "c", 600, 600);
  gPad->SetPad(0, 0, 1, 1);
  gPad->SetLeftMargin(0.2);

  TString label(hist1->GetTitle());
  hist1->SetTitle("");
  label.ReplaceAll(".00", "");
  label.ReplaceAll(".0", "");
//   label.ReplaceAll(".00", " GeV/#it{c}");
//   label.ReplaceAll(".0", " GeV/#it{c}");
  TObjArray* objArray = label.Tokenize("-");
  TPaveText* paveText = new TPaveText(0.03, 0.86, 0.44, 0.97, "BRNDC");
  paveText->SetTextSize(0.035);
  paveText->SetFillColor(0);
  paveText->SetShadowColor(0);
  paveText->SetBorderSize(0);
  paveText->SetFillStyle(0);
  
  TString tmpStr(objArray->At(0)->GetName());
  tmpStr.ReplaceAll("p_", "#it{p}_");
  paveText->AddText(tmpStr + "GeV/#it{c}");

  TString tmpStr(objArray->At(1)->GetName());
  tmpStr.ReplaceAll("p_", "#it{p}_");
  paveText->AddText(tmpStr + "GeV/#it{c}");
//   paveText->AddText(objArray->At(1)->GetName());

  TPaveText* paveText2 = new TPaveText(0.63, 0.86, 0.97, 0.97, "BRNDC");
  paveText2->SetTextSize(0.035);
  paveText2->SetBorderSize(0);
  paveText2->SetFillColor(0);
  paveText2->SetFillStyle(0);
  paveText2->SetShadowColor(0);
  if (objArray->GetEntries() == 4)
  {
    paveText2->AddText(Form("p-Pb #sqrt{s_{NN}} = 5.02 TeV"));
    paveText2->AddText(Form("%s-%s", objArray->At(2)->GetName(), objArray->At(3)->GetName()));
  }
  else
    paveText2->AddText(Form("%s #sqrt{s} = 2.76 TeV", objArray->At(2)->GetName()));

  hist1->Draw("SURF1");
  paveText->Draw();
  paveText2->Draw();
  
  if (i == 2 && j == 2 && centr == 0)
    c->SaveAs("fig1b.eps");
  else if (i == 2 && j == 2 && centr == 4)
    c->SaveAs("fig1a.eps");
  
  c->SaveAs(Form("corr_%d_%d_%d.eps", i, j, centr));
}

void ExtractSystematics(const char* fileName = "dphi_proj.root")
{
  Int_t i = 2; Int_t j = 2;
//   Int_t i = 0; Int_t j = 1;
  Int_t centr = 0;
  
  Int_t nSyst = 8;
  Int_t syst[] = { 0, 10, 11, 12, 13, 20, 30, 40 };
  
  TFile::Open(fileName);
  base = (TH1*) gFile->Get(Form("proj_%d_%d_%d_%d", i, j, centr, syst[0]));
  
  c = new TCanvas;
//   base->Rebin(2); base->Scale(0.5);
  base->Draw();
  
  Float_t baseValue = base->Integral() / base->GetNbinsX();
//   (base->GetBinContent(1) + base->GetBinContent(base->GetNbinsX()/2+1)) / 2;
  
  c2 = new TCanvas;
  c3 = new TCanvas;
  
  Int_t color = 2;

  for (Int_t n = 1; n<nSyst; n++)
  {
    hist = (TH1*) gFile->Get(Form("proj_%d_%d_%d_%d", i, j, centr, syst[n]));
    if (!hist)
      continue;
    
//     hist->Rebin(2); hist->Scale(0.5);
    c->cd();
    hist->SetLineColor(color++);
    Float_t baseValue2 = hist->Integral() / hist->GetNbinsX();
    Printf("%f %f", baseValue, baseValue2);
//     hist->Add(new TF1("func", "1", -5, 5), baseValue - baseValue2);
    hist->Scale(baseValue / baseValue2);
    hist->DrawCopy("SAME");
    
    c2->cd();
    hist->DrawCopy((n == 1) ? "HIST" : "HIST SAME")->Divide(base);

    c3->cd();
    hist->Add(base, -1);
    hist->DrawCopy((n == 1) ? "HIST" : "HIST SAME")->GetYaxis()->SetRangeUser(-0.1, 0.1);
  }
}

void GetProjectionSystematics(Float_t eta)
{
  fileProj = TFile::Open("dphi_proj2.root", "RECREATE");
  fileProj->Close();

  Int_t i = 2; Int_t j = 2;
//   Int_t i = 0; Int_t j = 1;

  Int_t n = 5;
  const char* files[] = { "dphi_corr_pA_121119_3.root", "dphi_corr_pA_121116_global.root", "dphi_corr_pA_121119_3.root", "dphi_corr_pA_121116_hybrid.root" /*pair cuts*/, "dphi_corr_pA_121119_hijing.root" };
  
  for (Int_t centr=0; centr<6; centr++)
  {
    for (Int_t k=0; k<n; k++)
    {
      gStudySystematic = 0;
      if (k == 2)
	gStudySystematic = 20;
      
      TFile::Open(files[k]);
      const char* label = 0;
      TH1* hist = GetProjections(i, j, centr, &label, eta);
      if (!hist)
	continue;
      
      fileProj = TFile::Open("dphi_proj2.root", "UPDATE");
      hist->Write(Form("proj_%d_%d_%d_%d", i, j, centr, k*10));
      fileProj->Close();
    }
  }
}

void CMSPlot()
{
  Int_t centrArr[] = { 0, 1, 3, 4 };
  Int_t nCentr = 4;
  
//   Int_t i = 1; Int_t j = 2;
  Int_t i = 2; Int_t j = 2;

  if (1)
  {
    const char* labels[] = { "Data", "HIJING", "DPMJET" };
  //   const char* files[] = { "dphi_corr_pA_121119_3.root", "dphi_corr_121121_hijing_uncorrected.root", "dphi_corr_121121_dpmjet_uncorrected.root" };
//     const char* files[] = { "dphi_corr_pA_121119_3.root", "dphi_corr_121121_hijing_step0.root", "dphi_corr_121121_dpmjet_step0.root" };
    const char* files[] = { "dphi_corr_pA_121121_cmsmethod.root", "dphi_corr_121122_cmsmethod_hijing_step0.root", "dphi_corr_121122_cmsmethod_dpmjet_step0.root" };
//     const char* files[] = { "dphi_corr_pA_121122_cnd_cmsmethod.root", "dphi_corr_121122_cmsmethod_hijing_cnd_step0.root", 0 };
    Int_t nFiles = 3;
  }
  else
  {
    const char* labels[] = { "ALICE method", "CMS method" };
//     const char* files[] = { "dphi_corr_pA_121119_3.root", "dphi_corr_pA_121121_cmsmethod.root" };
    const char* files[] = { "dphi_corr_121121_hijing_step0.root", "dphi_corr_121122_cmsmethod_hijing_step0.root" };
    Int_t nFiles = 2;
  }
  
  Int_t colors[] = { 1, 2, 4 };
  
  c = new TCanvas("c", "c", 800, 800);
  c->Divide(2, 2);
  
  Float_t maxValue = -1;
  for (Int_t centr = 0; centr < nCentr; centr++)
  {
    c->cd(centr+1);
    
    legend = new TLegend(0.15, 0.55, 0.46, 0.85);
    legend->SetFillColor(0);
    
    for (Int_t fileId = 0; fileId < nFiles; fileId++)
    {
      if (files[fileId] == 0)
	continue;
      
      TFile::Open(files[fileId]);
  
      TH2* hist1 = (TH2*) gFile->Get(Form("dphi_%d_%d_%d", i, j, centrArr[centr]));
      if (!hist1)
	return 0;
      hist1 = (TH2*) hist1->Clone(Form("%s_%.1f", hist1->GetName(), 0.0));

      // NOTE fix normalization. these 2d correlations come out of AliUEHist normalized by dphi bin width, but not deta
      hist1->Scale(1.0 / hist1->GetYaxis()->GetBinWidth(1));
      
      tokens = TString(hist1->GetTitle()).Tokenize("-");
      centralityStr = new TString;
      if (tokens->GetEntries() > 2)
	*centralityStr = tokens->At(2)->GetName();
      if (tokens->GetEntries() > 3)
	*centralityStr = *centralityStr + "-" + tokens->At(3)->GetName();
      
      Float_t etaMin = 1.0;
      
      proj1x = hist1->ProjectionX(Form("proj1x_%d_%d_%d_%d", i, j, centr, fileId), hist1->GetYaxis()->FindBin(-etaMax+0.01), hist1->GetYaxis()->FindBin(-etaMin-0.01));
      proj2x = hist1->ProjectionX(Form("proj2x_%d_%d_%d_%d", i, j, centr, fileId), hist1->GetYaxis()->FindBin(etaMin+0.01), hist1->GetYaxis()->FindBin(etaMax-0.01));
      proj1x->Add(proj2x);
      
      proj1x->Scale(hist1->GetYaxis()->GetBinWidth(1));
      proj1x->Scale(1.0 / (etaMax - etaMin) / 2);

      proj1x->Rebin(2); proj1x->Scale(0.5);
      proj1x->Rebin(2); proj1x->Scale(0.5);
      
      // zyam
      Float_t zyam = proj1x->Integral(proj1x->FindBin(TMath::Pi()/2 - 0.5), proj1x->FindBin(TMath::Pi()/2 + 0.5)) / (proj1x->FindBin(TMath::Pi()/2 + 0.5) - proj1x->FindBin(TMath::Pi()/2 - 0.5) + 1);
      proj1x->Add(new TF1("f", "1", -5, 5), -zyam);

      proj1x->SetStats(kFALSE);
      proj1x->GetXaxis()->SetTitleOffset(1);
      
      proj1x->SetLineColor(colors[fileId]);
      if (maxValue < 0)
	maxValue = proj1x->GetMaximum() * 2;
      proj1x->SetMaximum(maxValue);
//       proj1x->SetMinimum(-0.01);
      proj1x->Draw((fileId == 0) ? "" : "SAME");
      
      legend->AddEntry(proj1x, labels[fileId]);
    }
    legend->Draw();
  }
}

void FourierFactorization(const char* fileName)
{
  ReadGraphs(fileName);
  
  Int_t n = 6;
  Int_t is[] =    { 0, 1, 1, 2, 2, 2, 3 };
  Int_t js[] =    { 1, 1, 2, 1, 2, 3, 3 };
  Bool_t symm[] = { 1, 0, 1, 0, 0, 1, 0 };

  Int_t graphID = 5;
  
  TGraphErrors** symmGraphs[] = { graphs[0], graphs[2], graphs[5] };
  
  for (Int_t i=0; i<symmGraphs[0][graphID]->GetN(); i++)
  {
    Printf("%d", i);
    graphs[1][graphID]->GetY()[i] = TMath::Sqrt(symmGraphs[0][graphID]->GetY()[i] * symmGraphs[1][graphID]->GetY()[i]);
    graphs[3][graphID]->GetY()[i] = TMath::Sqrt(symmGraphs[2][graphID]->GetY()[i] * symmGraphs[1][graphID]->GetY()[i]);
    graphs[4][graphID]->GetY()[i] = TMath::Sqrt(symmGraphs[2][graphID]->GetY()[i] * symmGraphs[2][graphID]->GetY()[i]);
  }
  
//   graphs[1][graphID]->Draw("A*");
  
  WriteGraphs();
}

void CompareATLAS()
{
  atlas = ReadHepdata("/home/jgrosseo/Dropbox/alice-paper-paridge/comparison_atlas/atlas_figaux10.txt", kFALSE, 1, 1);
  atlas->SetMarkerStyle(20);
  atlas->Draw("PA");
  atlas->SetTitle("");
  atlas->GetXaxis()->SetTitle("p_{T} (GeV/c)");
  atlas->GetYaxis()->SetTitle("s_{2} / v_{2}");
  atlas->GetYaxis()->SetRangeUser(0.02, 0.18);

  alice = new TGraphErrors;
  AddPoint(alice, 0.75, 0.0583503, 0.25, 0.00831755);
  AddPoint(alice, 1.5, 0.0953562, 0.5, 0.0134597);
  AddPoint(alice, 3, 0.128309, 1, 0.0189634);
  
  alice->SetMarkerStyle(21);
  alice->SetLineColor(2);
  alice->SetMarkerColor(2);
  alice->Draw("PSAME");
}

TGraphErrors* GetGraphAsFunctionOfPt(const char* graphFile, Int_t graphID, Int_t centrID, Int_t maxpTIndex)
{
  ReadGraphs(graphFile);
  
  result = new TGraphErrors;
  result->GetXaxis()->SetTitle("p_{T} (GeV/c)");
  
//   Printf("%s", graphFile);
  
  for (Int_t i=0; i<maxpTIndex; i++)
  {
    if (!graphs[i][graphID])
      continue;
    if (graphs[i][graphID]->GetN() == 0)
      continue;
    
    TObjArray* tokens = TString(graphs[i][graphID]->GetTitle()).Tokenize("-");
//     tokens->Print();
    tokens = TString(tokens->At(1)->GetName()).Tokenize("<");
    Float_t pt = (TString(tokens->At(0)->GetName()).Atof() + TString(tokens->At(2)->GetName()).Atof()) / 2;
    Float_t width = (TString(tokens->At(2)->GetName()).Atof() - TString(tokens->At(0)->GetName()).Atof()) / 2;
    
    AddPoint(result, pt, graphs[i][graphID]->GetY()[centrID], width, graphs[i][graphID]->GetEY()[centrID]);
    
    result->GetYaxis()->SetTitle(graphs[i][graphID]->GetYaxis()->GetTitle());
  }
  
  return result;
}

void DrawAsFunctionOfPt(const char* graphFile1, Int_t graphID, Int_t centrID, Int_t maxpTIndex)
{
  graph = GetGraphAsFunctionOfPt(graphFile1, graphID, centrID, maxpTIndex);
  graph->Draw("AP");
}

TGraphErrors* DrawAsFunctionOfPt(const char* baseFile, Int_t n, const char** graphFiles, Int_t graphID, Int_t centrID, Int_t* maxpTIndex, const char** titles = 0, Int_t* centrIndex = 0)
{
  c = new TCanvas;
  if (n > 4)
    c2 = new TCanvas;
  legend = new TLegend(0.125, 0.71, 0.62, 0.98);
  legend->SetFillColor(0);
  
  TGraphErrors* allGraphs[20];
  
  for (Int_t i=0; i<n; i++)
  {
    graph = GetGraphAsFunctionOfPt(TString(baseFile) + graphFiles[i], graphID, (centrIndex) ? centrIndex[i] : centrID, maxpTIndex[i]);
    graph->SetLineColor((i%4)+1);
    graph->SetMarkerColor((i%4)+1);
    graph->SetMarkerStyle(20+i);
    RemovePointsBelowX(graph, 0.3);
    if (TString(graphFiles[i]).Contains("Kaons"))
    {
      RemovePointsAboveX(graph, 3.0);
      RemovePointsBelowX(graph, 0.3);
    }
    if (TString(graphFiles[i]).Contains("Protons"))
    {
      RemovePointsBelowX(graph, 0.5);
    }
//     graph->Print();
    
    c->cd();
    
    if (1 || i < 4)
      graph->Draw((i == 0) ? "AP" : "PSAME");
    else
    {
      graph2 = (TGraphErrors*) graph->Clone();
      SetXError(graph2, 0);
      GraphShiftX(graph2, 0.05);
      graph2->Draw("LSAME");
    }
      
    legend->AddEntry(graph, (titles) ? titles[i] : graphFiles[i], "P");
    
    allGraphs[i] = graph;
    
    if (i >= 4)
    {
      graphclone = (TGraphErrors*) graph->Clone();
//       SetYError(graphclone, 0);
      DivideGraphs(graphclone, allGraphs[i%4]);
      c2->cd();
      graphclone->Draw((i == 4) ? "AP" : "PSAME");
      graphclone->GetYaxis()->SetRangeUser(0.5, 1.5);
      
      GraphShiftX(graph, 0.02);
    }
  }
  
  c->cd();
  legend->Draw();
  
  return allGraphs[0];
}

void DrawAsFunctionOfPt()
{
  const char* baseFile = "graphs_130606"; Float_t maxY = 0.25;
//   const char* baseFile = "graphs_130503_nosub"; Float_t maxY = 0.4;
  const char* graphFiles[] = { ".root", "_pions.root", "_kaons.root", "_protons.root", 
  "_wingremoved.root", "_wingremoved_pions.root", "_wingremoved_kaons.root", "_wingremoved_protons.root",
  "_unfolded.root", "_pions_unfolded.root", "_kaons_unfolded.root", "_protons_unfolded.root", 
  "_wingremoved_unfolded.root", "_wingremoved_pions_unfolded.root", "_wingremoved_kaons_unfolded.root", "_wingremoved_protons_unfolded.root" 
  };
   const char* titles[] = { 
      "h-h", "h-#pi", "h-K", "h-p", 
      "h-h wingremoved", "h-#pi wingremoved", "h-K wingremoved", "h-p wingremoved", 
      "h", "#pi", "K", "p", 
      "h wingremoved", "#pi wingremoved", "K wingremoved", "p wingremoved" };
  Int_t max[] = { NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs };
  
  Int_t graphID = 4;
  Int_t centrID = 0;
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, graphID, centrID, max, titles);
  first->GetYaxis()->SetRangeUser(0, maxY);
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, graphID, centrID, max, titles+4);
  first->GetYaxis()->SetRangeUser(0, maxY);

  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+8, graphID, centrID, max, titles+8);
  first->GetYaxis()->SetRangeUser(0, maxY);
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+12, graphID, centrID, max, titles+12);
  first->GetYaxis()->SetRangeUser(0, maxY);

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles, graphID, centrID, max, titles);
  first->GetYaxis()->SetRangeUser(0, maxY);

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles+8, graphID, centrID, max, titles+8);
  first->GetYaxis()->SetRangeUser(0, maxY);
}

void DrawAsFunctionOfPt2()
{
  const char* baseFile = "graphs_130423_nosub";
  const char* graphFiles[] = { ".root", "_nomixed.root", "_allpt_unfolded.root", "_nomixed_allpt_unfolded.root", "_nogap.root", "_nomixed_nogap.root",  "_allpt_nogap_unfolded.root", "_nomixed_allpt_nogap_unfolded.root" };
  Int_t max[] = { NGraphs, NGraphs, 4, 4, NGraphs, NGraphs, 4, 4 };
  
  new TCanvas;
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, 4, 0, max);
  first->GetYaxis()->SetRangeUser(0, 0.4);

  new TCanvas;
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, 4, 0, max+4);
  first->GetYaxis()->SetRangeUser(0, 0.4);
}

void DrawAsFunctionOfPt3()
{
//   const char* baseFile = "graphs_130515"; Float_t maxY = 0.25;
  const char* baseFile = "graphs_130531_mc_nosub"; Float_t maxY = 0.4;
  const char* graphFiles[] = { ".root", "_pions.root", "_kaons.root", "_protons.root", "_unfolded.root", "_pions_unfolded.root", "_kaons_unfolded.root", "_protons_unfolded.root", "_allpt_unfolded.root", "_allpt_pions_unfolded.root", "_allpt_kaons_unfolded.root", "_allpt_protons_unfolded.root" };
  const char* titles[] = { "h-h", "h-#pi", "h-K", "h-p", "h", "#pi", "K", "p", "h allpt", "#pi allpt", "K allpt", "p allpt" };
  Int_t max[] = { NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, 6, 6, 6, 6 };
  
  Int_t graphID = 4;
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, graphID, 0, max, titles);
  first->GetYaxis()->SetRangeUser(0, maxY);
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, graphID, 0, max+4, titles+4);
  first->GetYaxis()->SetRangeUser(0, maxY);

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles, graphID, 0, max, titles);
  first->GetYaxis()->SetRangeUser(0, maxY);
  
//   return;

  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+8, graphID, 0, max+8, titles+8);
  first->GetYaxis()->SetRangeUser(0, maxY);

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles+4, graphID, 0, max+4, titles+4);
  first->GetYaxis()->SetRangeUser(0, maxY);
}

void DrawAsFunctionOfPt4()
{
//   const char* baseFile = "graphs_130503";
  const char* baseFile = "graphs_130618";
  const char* graphFiles[] = { "_unfolded.root", "_pions_unfolded.root", "_kaons_unfolded.root", "_protons_unfolded.root", "_otherbaseline_unfolded.root", "_otherbaseline_pions_unfolded.root", "_otherbaseline_kaons_unfolded.root", "_otherbaseline_protons_unfolded.root" };

  Int_t max[8] = { NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs };
  
  Int_t centrID = 0;
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, 4, centrID, max);
  first->GetYaxis()->SetRangeUser(0, 0.25);
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, 4, centrID, max+4);
  first->GetYaxis()->SetRangeUser(0, 0.25);

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles, 4, centrID, max);
  first->GetYaxis()->SetRangeUser(0, 0.25);
}

void DrawAsFunctionOfPt5()
{
  const char* baseFile = "~/Dropbox/pid-ridge/pPb/graphs_LHC13bc_20130510"; Float_t maxY = 0.4;
  const char* graphFiles[] = { 
    "_HadronsNoSub.root", "_PionsNoSub.root", "_KaonsNoSub.root", "_ProtonsNoSub.root",
    "_HadronsNoSubAnalytical.root", "_PionsNoSubAnalytical.root", "_KaonsNoSubAnalytical.root", "_ProtonsNoSubAnalytical.root"
  };
  
  Int_t max[] = { NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs };
  
  Int_t graphID = 4;
  Int_t centrID = 0;
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, graphID, centrID, max, 0);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, graphID, centrID, max, 0);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles, graphID, centrID, max, 0);
  first->GetYaxis()->SetRangeUser(0, maxY); 
}

void DrawAsFunctionOfPt7()
{
  const char* baseFile = "~/Dropbox/pid-ridge/pPb/graphs_LHC13bc_20130604"; Float_t maxY = 0.4;
  const char* graphFiles[] = { 
    "_Hadrons.root", "_Pions.root", "_Kaons.root", "_Protons.root",
    "_Hadrons_NoEff.root", "_Pions_NoEff.root", "_Kaons_NoEff.root", "_Protons_NoEff.root"
  };
  
  Int_t max[] = { NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs };
  
  Int_t graphID = 4;
  Int_t centrID = 0;
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, graphID, centrID, max, 0);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, graphID, centrID, max, 0);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles, graphID, centrID, max, 0);
  first->GetYaxis()->SetRangeUser(0, maxY); 
}

void DrawAsFunctionOfPt6()
{
  const char* baseFile = "graphs_130515b_nosub"; Float_t maxY = 0.4;
  const char* graphFiles[] = { 
    ".root", "_pions.root", "_kaons.root", "_protons.root",
    "_analytical.root", "_analytical_pions.root", "_analytical_kaons.root", "_analytical_protons.root"
  };
  
  Int_t max[] = { 6, 6, 6, 6, 6, 6, 6, 6 };
  
  Int_t graphID = 4;
  Int_t centrID = 0;
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, graphID, centrID, max, 0);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, graphID, centrID, max, 0);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles, graphID, centrID, max, 0);
  first->GetYaxis()->SetRangeUser(0, maxY); 
}

void CompareCentralities()
{
  const char* baseFile = "~/Dropbox/pid-ridge/pPb/graphs_LHC13bc_20130604"; Float_t maxY = 0.4;
  const char* graphFiles[] = { 
    "_Hadrons.root", "_Pions.root", "_Kaons.root", "_Protons.root",
    "_Hadrons.root", "_Pions.root", "_Kaons.root", "_Protons.root"
  };
  
  Int_t max[] = { NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs };
  Int_t centrID[] = { 0, 0, 0, 0, 1, 1, 1, 1 };
  
  Int_t graphID = 4;
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, graphID, 0, max, 0, centrID);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, graphID, 0, max, 0, centrID+4);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles, graphID, 0, max, 0, centrID);
  first->GetYaxis()->SetRangeUser(0, maxY); 
}

void CompareCentralityEstimators()
{
  const char* baseFile = "~/Dropbox/pid-ridge/pPb/graphs_LHC13bc_"; Float_t maxY = 0.25;
  const char* graphFiles[] = { 
    "20130510_Hadrons.root", "20130510_Pions.root", "20130510_Kaons.root", "20130510_Protons.root",
    "20130517_Hadrons_ZNA.root", "20130517_Pions_ZNA.root", "20130517_Kaons_ZNA.root", "20130517_Protons_ZNA.root"
  };
  
  Int_t max[] = { NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs };
  
  const char* titles[] = { 
      "h V0A", "#pi V0A", "K V0A", "p V0A", 
      "h ZNA", "#pi ZNA", "K ZNA", "p ZNA"
   };
      
  Int_t graphID = 4;
  Int_t centrID = 0;
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, graphID, centrID, max, titles);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, graphID, centrID, max, titles+4);
  first->GetYaxis()->SetRangeUser(0, maxY); 

  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles, graphID, centrID, max, titles);
  first->GetYaxis()->SetRangeUser(0, maxY); 
}

void DrawLikeUnlikeSign()
{
  const char* baseFile = "~/Dropbox/pid-ridge/pPb/graphs_LHC13bc_20130510"; Float_t maxY = 0.35;
  const char* graphFiles[] = { 
    "_Hadrons_LikeSign.root", "_Pions_LikeSign.root", "_Kaons_LikeSign.root", "_Protons_LikeSign.root", 
    "_Hadrons_UnlikeSign.root", "_Pions_UnlikeSign.root", "_Kaons_UnlikeSign.root", "_Protons_UnlikeSign.root"
  };
  
   const char* titles[] = { 
      "h LS", "#pi LS", "K LS", "p LS", 
      "h US", "#pi US", "K US", "p US" };
  Int_t max[] = { NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs };
  
  Int_t graphID = 4;
  Int_t centrID = 0;
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles, graphID, centrID, max, titles);
  first->GetYaxis()->SetRangeUser(0, maxY);
  
  first = DrawAsFunctionOfPt(baseFile, 4, graphFiles+4, graphID, centrID, max, titles+4);
  first->GetYaxis()->SetRangeUser(0, maxY);
  
  first = DrawAsFunctionOfPt(baseFile, 8, graphFiles, graphID, centrID, max, titles);
  first->GetYaxis()->SetRangeUser(0, maxY);
}

void Drawv1()
{
  Float_t maxY = 0.35;
  const char* graphFiles[] = { 
    "graphs_fwdA_130801.root", "graphs_fwdC_130801.root", "~/Dropbox/pid-ridge/pPb/graphs_LHC13bc_20130709_Hadrons.root"
  };
  
   const char* titles[] = { 
      "A", "C", "CB" };
  Int_t max[] = { NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs, NGraphs };
  
  Int_t graphID = 12;
  Int_t centrID = 0;
  
  first = DrawAsFunctionOfPt("", 3, graphFiles, graphID, centrID, max, titles);
  first->GetYaxis()->SetRangeUser(0, maxY);
}

void DrawRelativeError(Int_t id = 0)
{
  if (id == 0)
  {
    Int_t centrID = 0;
    const char* file1 = "~/Dropbox/pid-ridge/pPb/graphs_LHC13bc_20130510_Kaons.root";
    const char* file2 = "~/Dropbox/pid-ridge/syst020WithSub.root";
    const char* label = "0-20% with subtraction";
  }
  else if (id == 1)
  {
    Int_t centrID = 0;
    const char* file1 = "~/Dropbox/pid-ridge/pPb/graphs_LHC13bc_20130510_KaonsNoSub.root";
    const char* file2 = "~/Dropbox/pid-ridge/syst020WithoutSub.root";
    const char* label = "0-20% without subtraction";
  }
  else if (id == 2)
  {
    Int_t centrID = 3;
    const char* file1 = "~/Dropbox/pid-ridge/pPb/graphs_LHC13bc_20130510_KaonsNoSub.root";
    const char* file2 = "~/Dropbox/pid-ridge/syst60100WithoutSub.root";
    const char* label = "60-100% without subtraction";
  }
  
  graph = GetGraphAsFunctionOfPt(file1, 4, 0, NGraphs);
  RemovePointsAboveX(graph, 3.0);
  RemovePointsBelowX(graph, 0.3);
  
   new TCanvas;
  graph->SetMarkerStyle(20);
  graph->DrawClone("AP");
  
  for (Int_t i=0; i<graph->GetN(); i++)
  {
    if (graph->GetEY()[i] <= 0 || graph->GetY()[i] <= 0)
      continue;
    
    graph->GetY()[i] = graph->GetEY()[i] / graph->GetY()[i];
    graph->GetEY()[i] = 0;
  }
  
  legend = new TLegend(0.6, 0.7, 0.9, 0.9);
  new TCanvas;
  clone = (TGraphErrors*) graph->DrawClone("AP");
  clone->GetYaxis()->SetRangeUser(0, 0.5);
  legend->AddEntry(clone, "stat", "P");
  
  TFile::Open(file2);
  hist = (TH1*) gFile->Get("hsyst2");
  hist->SetLineColor(2);
  hist->Draw("SAME");
  legend->AddEntry(hist, "syst", "L");
  
  for (Int_t i=0; i<graph->GetN(); i++)
  {
    if (graph->GetY()[i] <= 0)
      continue;
  
    Float_t syst = hist->GetBinContent(hist->FindBin(graph->GetX()[i]));
    graph->GetY()[i] = TMath::Sqrt(graph->GetY()[i] * graph->GetY()[i] + syst * syst);
  }
  
  graph->SetLineColor(4);
  graph->SetMarkerStyle(21);
  graph->SetMarkerColor(4);
  graph->DrawClone("PSAME");
  legend->AddEntry(graph->DrawClone("PSAME"), "comb", "P");
  
  line = new TLine(0, 0.05, 4.0, 0.05);
  line->Draw();
  legend->AddEntry(line, "K0-Kch unc", "L");
  legend->SetHeader(label);  
  
  legend->Draw();
}
 pA.C:1
 pA.C:2
 pA.C:3
 pA.C:4
 pA.C:5
 pA.C:6
 pA.C:7
 pA.C:8
 pA.C:9
 pA.C:10
 pA.C:11
 pA.C:12
 pA.C:13
 pA.C:14
 pA.C:15
 pA.C:16
 pA.C:17
 pA.C:18
 pA.C:19
 pA.C:20
 pA.C:21
 pA.C:22
 pA.C:23
 pA.C:24
 pA.C:25
 pA.C:26
 pA.C:27
 pA.C:28
 pA.C:29
 pA.C:30
 pA.C:31
 pA.C:32
 pA.C:33
 pA.C:34
 pA.C:35
 pA.C:36
 pA.C:37
 pA.C:38
 pA.C:39
 pA.C:40
 pA.C:41
 pA.C:42
 pA.C:43
 pA.C:44
 pA.C:45
 pA.C:46
 pA.C:47
 pA.C:48
 pA.C:49
 pA.C:50
 pA.C:51
 pA.C:52
 pA.C:53
 pA.C:54
 pA.C:55
 pA.C:56
 pA.C:57
 pA.C:58
 pA.C:59
 pA.C:60
 pA.C:61
 pA.C:62
 pA.C:63
 pA.C:64
 pA.C:65
 pA.C:66
 pA.C:67
 pA.C:68
 pA.C:69
 pA.C:70
 pA.C:71
 pA.C:72
 pA.C:73
 pA.C:74
 pA.C:75
 pA.C:76
 pA.C:77
 pA.C:78
 pA.C:79
 pA.C:80
 pA.C:81
 pA.C:82
 pA.C:83
 pA.C:84
 pA.C:85
 pA.C:86
 pA.C:87
 pA.C:88
 pA.C:89
 pA.C:90
 pA.C:91
 pA.C:92
 pA.C:93
 pA.C:94
 pA.C:95
 pA.C:96
 pA.C:97
 pA.C:98
 pA.C:99
 pA.C:100
 pA.C:101
 pA.C:102
 pA.C:103
 pA.C:104
 pA.C:105
 pA.C:106
 pA.C:107
 pA.C:108
 pA.C:109
 pA.C:110
 pA.C:111
 pA.C:112
 pA.C:113
 pA.C:114
 pA.C:115
 pA.C:116
 pA.C:117
 pA.C:118
 pA.C:119
 pA.C:120
 pA.C:121
 pA.C:122
 pA.C:123
 pA.C:124
 pA.C:125
 pA.C:126
 pA.C:127
 pA.C:128
 pA.C:129
 pA.C:130
 pA.C:131
 pA.C:132
 pA.C:133
 pA.C:134
 pA.C:135
 pA.C:136
 pA.C:137
 pA.C:138
 pA.C:139
 pA.C:140
 pA.C:141
 pA.C:142
 pA.C:143
 pA.C:144
 pA.C:145
 pA.C:146
 pA.C:147
 pA.C:148
 pA.C:149
 pA.C:150
 pA.C:151
 pA.C:152
 pA.C:153
 pA.C:154
 pA.C:155
 pA.C:156
 pA.C:157
 pA.C:158
 pA.C:159
 pA.C:160
 pA.C:161
 pA.C:162
 pA.C:163
 pA.C:164
 pA.C:165
 pA.C:166
 pA.C:167
 pA.C:168
 pA.C:169
 pA.C:170
 pA.C:171
 pA.C:172
 pA.C:173
 pA.C:174
 pA.C:175
 pA.C:176
 pA.C:177
 pA.C:178
 pA.C:179
 pA.C:180
 pA.C:181
 pA.C:182
 pA.C:183
 pA.C:184
 pA.C:185
 pA.C:186
 pA.C:187
 pA.C:188
 pA.C:189
 pA.C:190
 pA.C:191
 pA.C:192
 pA.C:193
 pA.C:194
 pA.C:195
 pA.C:196
 pA.C:197
 pA.C:198
 pA.C:199
 pA.C:200
 pA.C:201
 pA.C:202
 pA.C:203
 pA.C:204
 pA.C:205
 pA.C:206
 pA.C:207
 pA.C:208
 pA.C:209
 pA.C:210
 pA.C:211
 pA.C:212
 pA.C:213
 pA.C:214
 pA.C:215
 pA.C:216
 pA.C:217
 pA.C:218
 pA.C:219
 pA.C:220
 pA.C:221
 pA.C:222
 pA.C:223
 pA.C:224
 pA.C:225
 pA.C:226
 pA.C:227
 pA.C:228
 pA.C:229
 pA.C:230
 pA.C:231
 pA.C:232
 pA.C:233
 pA.C:234
 pA.C:235
 pA.C:236
 pA.C:237
 pA.C:238
 pA.C:239
 pA.C:240
 pA.C:241
 pA.C:242
 pA.C:243
 pA.C:244
 pA.C:245
 pA.C:246
 pA.C:247
 pA.C:248
 pA.C:249
 pA.C:250
 pA.C:251
 pA.C:252
 pA.C:253
 pA.C:254
 pA.C:255
 pA.C:256
 pA.C:257
 pA.C:258
 pA.C:259
 pA.C:260
 pA.C:261
 pA.C:262
 pA.C:263
 pA.C:264
 pA.C:265
 pA.C:266
 pA.C:267
 pA.C:268
 pA.C:269
 pA.C:270
 pA.C:271
 pA.C:272
 pA.C:273
 pA.C:274
 pA.C:275
 pA.C:276
 pA.C:277
 pA.C:278
 pA.C:279
 pA.C:280
 pA.C:281
 pA.C:282
 pA.C:283
 pA.C:284
 pA.C:285
 pA.C:286
 pA.C:287
 pA.C:288
 pA.C:289
 pA.C:290
 pA.C:291
 pA.C:292
 pA.C:293
 pA.C:294
 pA.C:295
 pA.C:296
 pA.C:297
 pA.C:298
 pA.C:299
 pA.C:300
 pA.C:301
 pA.C:302
 pA.C:303
 pA.C:304
 pA.C:305
 pA.C:306
 pA.C:307
 pA.C:308
 pA.C:309
 pA.C:310
 pA.C:311
 pA.C:312
 pA.C:313
 pA.C:314
 pA.C:315
 pA.C:316
 pA.C:317
 pA.C:318
 pA.C:319
 pA.C:320
 pA.C:321
 pA.C:322
 pA.C:323
 pA.C:324
 pA.C:325
 pA.C:326
 pA.C:327
 pA.C:328
 pA.C:329
 pA.C:330
 pA.C:331
 pA.C:332
 pA.C:333
 pA.C:334
 pA.C:335
 pA.C:336
 pA.C:337
 pA.C:338
 pA.C:339
 pA.C:340
 pA.C:341
 pA.C:342
 pA.C:343
 pA.C:344
 pA.C:345
 pA.C:346
 pA.C:347
 pA.C:348
 pA.C:349
 pA.C:350
 pA.C:351
 pA.C:352
 pA.C:353
 pA.C:354
 pA.C:355
 pA.C:356
 pA.C:357
 pA.C:358
 pA.C:359
 pA.C:360
 pA.C:361
 pA.C:362
 pA.C:363
 pA.C:364
 pA.C:365
 pA.C:366
 pA.C:367
 pA.C:368
 pA.C:369
 pA.C:370
 pA.C:371
 pA.C:372
 pA.C:373
 pA.C:374
 pA.C:375
 pA.C:376
 pA.C:377
 pA.C:378
 pA.C:379
 pA.C:380
 pA.C:381
 pA.C:382
 pA.C:383
 pA.C:384
 pA.C:385
 pA.C:386
 pA.C:387
 pA.C:388
 pA.C:389
 pA.C:390
 pA.C:391
 pA.C:392
 pA.C:393
 pA.C:394
 pA.C:395
 pA.C:396
 pA.C:397
 pA.C:398
 pA.C:399
 pA.C:400
 pA.C:401
 pA.C:402
 pA.C:403
 pA.C:404
 pA.C:405
 pA.C:406
 pA.C:407
 pA.C:408
 pA.C:409
 pA.C:410
 pA.C:411
 pA.C:412
 pA.C:413
 pA.C:414
 pA.C:415
 pA.C:416
 pA.C:417
 pA.C:418
 pA.C:419
 pA.C:420
 pA.C:421
 pA.C:422
 pA.C:423
 pA.C:424
 pA.C:425
 pA.C:426
 pA.C:427
 pA.C:428
 pA.C:429
 pA.C:430
 pA.C:431
 pA.C:432
 pA.C:433
 pA.C:434
 pA.C:435
 pA.C:436
 pA.C:437
 pA.C:438
 pA.C:439
 pA.C:440
 pA.C:441
 pA.C:442
 pA.C:443
 pA.C:444
 pA.C:445
 pA.C:446
 pA.C:447
 pA.C:448
 pA.C:449
 pA.C:450
 pA.C:451
 pA.C:452
 pA.C:453
 pA.C:454
 pA.C:455
 pA.C:456
 pA.C:457
 pA.C:458
 pA.C:459
 pA.C:460
 pA.C:461
 pA.C:462
 pA.C:463
 pA.C:464
 pA.C:465
 pA.C:466
 pA.C:467
 pA.C:468
 pA.C:469
 pA.C:470
 pA.C:471
 pA.C:472
 pA.C:473
 pA.C:474
 pA.C:475
 pA.C:476
 pA.C:477
 pA.C:478
 pA.C:479
 pA.C:480
 pA.C:481
 pA.C:482
 pA.C:483
 pA.C:484
 pA.C:485
 pA.C:486
 pA.C:487
 pA.C:488
 pA.C:489
 pA.C:490
 pA.C:491
 pA.C:492
 pA.C:493
 pA.C:494
 pA.C:495
 pA.C:496
 pA.C:497
 pA.C:498
 pA.C:499
 pA.C:500
 pA.C:501
 pA.C:502
 pA.C:503
 pA.C:504
 pA.C:505
 pA.C:506
 pA.C:507
 pA.C:508
 pA.C:509
 pA.C:510
 pA.C:511
 pA.C:512
 pA.C:513
 pA.C:514
 pA.C:515
 pA.C:516
 pA.C:517
 pA.C:518
 pA.C:519
 pA.C:520
 pA.C:521
 pA.C:522
 pA.C:523
 pA.C:524
 pA.C:525
 pA.C:526
 pA.C:527
 pA.C:528
 pA.C:529
 pA.C:530
 pA.C:531
 pA.C:532
 pA.C:533
 pA.C:534
 pA.C:535
 pA.C:536
 pA.C:537
 pA.C:538
 pA.C:539
 pA.C:540
 pA.C:541
 pA.C:542
 pA.C:543
 pA.C:544
 pA.C:545
 pA.C:546
 pA.C:547
 pA.C:548
 pA.C:549
 pA.C:550
 pA.C:551
 pA.C:552
 pA.C:553
 pA.C:554
 pA.C:555
 pA.C:556
 pA.C:557
 pA.C:558
 pA.C:559
 pA.C:560
 pA.C:561
 pA.C:562
 pA.C:563
 pA.C:564
 pA.C:565
 pA.C:566
 pA.C:567
 pA.C:568
 pA.C:569
 pA.C:570
 pA.C:571
 pA.C:572
 pA.C:573
 pA.C:574
 pA.C:575
 pA.C:576
 pA.C:577
 pA.C:578
 pA.C:579
 pA.C:580
 pA.C:581
 pA.C:582
 pA.C:583
 pA.C:584
 pA.C:585
 pA.C:586
 pA.C:587
 pA.C:588
 pA.C:589
 pA.C:590
 pA.C:591
 pA.C:592
 pA.C:593
 pA.C:594
 pA.C:595
 pA.C:596
 pA.C:597
 pA.C:598
 pA.C:599
 pA.C:600
 pA.C:601
 pA.C:602
 pA.C:603
 pA.C:604
 pA.C:605
 pA.C:606
 pA.C:607
 pA.C:608
 pA.C:609
 pA.C:610
 pA.C:611
 pA.C:612
 pA.C:613
 pA.C:614
 pA.C:615
 pA.C:616
 pA.C:617
 pA.C:618
 pA.C:619
 pA.C:620
 pA.C:621
 pA.C:622
 pA.C:623
 pA.C:624
 pA.C:625
 pA.C:626
 pA.C:627
 pA.C:628
 pA.C:629
 pA.C:630
 pA.C:631
 pA.C:632
 pA.C:633
 pA.C:634
 pA.C:635
 pA.C:636
 pA.C:637
 pA.C:638
 pA.C:639
 pA.C:640
 pA.C:641
 pA.C:642
 pA.C:643
 pA.C:644
 pA.C:645
 pA.C:646
 pA.C:647
 pA.C:648
 pA.C:649
 pA.C:650
 pA.C:651
 pA.C:652
 pA.C:653
 pA.C:654
 pA.C:655
 pA.C:656
 pA.C:657
 pA.C:658
 pA.C:659
 pA.C:660
 pA.C:661
 pA.C:662
 pA.C:663
 pA.C:664
 pA.C:665
 pA.C:666
 pA.C:667
 pA.C:668
 pA.C:669
 pA.C:670
 pA.C:671
 pA.C:672
 pA.C:673
 pA.C:674
 pA.C:675
 pA.C:676
 pA.C:677
 pA.C:678
 pA.C:679
 pA.C:680
 pA.C:681
 pA.C:682
 pA.C:683
 pA.C:684
 pA.C:685
 pA.C:686
 pA.C:687
 pA.C:688
 pA.C:689
 pA.C:690
 pA.C:691
 pA.C:692
 pA.C:693
 pA.C:694
 pA.C:695
 pA.C:696
 pA.C:697
 pA.C:698
 pA.C:699
 pA.C:700
 pA.C:701
 pA.C:702
 pA.C:703
 pA.C:704
 pA.C:705
 pA.C:706
 pA.C:707
 pA.C:708
 pA.C:709
 pA.C:710
 pA.C:711
 pA.C:712
 pA.C:713
 pA.C:714
 pA.C:715
 pA.C:716
 pA.C:717
 pA.C:718
 pA.C:719
 pA.C:720
 pA.C:721
 pA.C:722
 pA.C:723
 pA.C:724
 pA.C:725
 pA.C:726
 pA.C:727
 pA.C:728
 pA.C:729
 pA.C:730
 pA.C:731
 pA.C:732
 pA.C:733
 pA.C:734
 pA.C:735
 pA.C:736
 pA.C:737
 pA.C:738
 pA.C:739
 pA.C:740
 pA.C:741
 pA.C:742
 pA.C:743
 pA.C:744
 pA.C:745
 pA.C:746
 pA.C:747
 pA.C:748
 pA.C:749
 pA.C:750
 pA.C:751
 pA.C:752
 pA.C:753
 pA.C:754
 pA.C:755
 pA.C:756
 pA.C:757
 pA.C:758
 pA.C:759
 pA.C:760
 pA.C:761
 pA.C:762
 pA.C:763
 pA.C:764
 pA.C:765
 pA.C:766
 pA.C:767
 pA.C:768
 pA.C:769
 pA.C:770
 pA.C:771
 pA.C:772
 pA.C:773
 pA.C:774
 pA.C:775
 pA.C:776
 pA.C:777
 pA.C:778
 pA.C:779
 pA.C:780
 pA.C:781
 pA.C:782
 pA.C:783
 pA.C:784
 pA.C:785
 pA.C:786
 pA.C:787
 pA.C:788
 pA.C:789
 pA.C:790
 pA.C:791
 pA.C:792
 pA.C:793
 pA.C:794
 pA.C:795
 pA.C:796
 pA.C:797
 pA.C:798
 pA.C:799
 pA.C:800
 pA.C:801
 pA.C:802
 pA.C:803
 pA.C:804
 pA.C:805
 pA.C:806
 pA.C:807
 pA.C:808
 pA.C:809
 pA.C:810
 pA.C:811
 pA.C:812
 pA.C:813
 pA.C:814
 pA.C:815
 pA.C:816
 pA.C:817
 pA.C:818
 pA.C:819
 pA.C:820
 pA.C:821
 pA.C:822
 pA.C:823
 pA.C:824
 pA.C:825
 pA.C:826
 pA.C:827
 pA.C:828
 pA.C:829
 pA.C:830
 pA.C:831
 pA.C:832
 pA.C:833
 pA.C:834
 pA.C:835
 pA.C:836
 pA.C:837
 pA.C:838
 pA.C:839
 pA.C:840
 pA.C:841
 pA.C:842
 pA.C:843
 pA.C:844
 pA.C:845
 pA.C:846
 pA.C:847
 pA.C:848
 pA.C:849
 pA.C:850
 pA.C:851
 pA.C:852
 pA.C:853
 pA.C:854
 pA.C:855
 pA.C:856
 pA.C:857
 pA.C:858
 pA.C:859
 pA.C:860
 pA.C:861
 pA.C:862
 pA.C:863
 pA.C:864
 pA.C:865
 pA.C:866
 pA.C:867
 pA.C:868
 pA.C:869
 pA.C:870
 pA.C:871
 pA.C:872
 pA.C:873
 pA.C:874
 pA.C:875
 pA.C:876
 pA.C:877
 pA.C:878
 pA.C:879
 pA.C:880
 pA.C:881
 pA.C:882
 pA.C:883
 pA.C:884
 pA.C:885
 pA.C:886
 pA.C:887
 pA.C:888
 pA.C:889
 pA.C:890
 pA.C:891
 pA.C:892
 pA.C:893
 pA.C:894
 pA.C:895
 pA.C:896
 pA.C:897
 pA.C:898
 pA.C:899
 pA.C:900
 pA.C:901
 pA.C:902
 pA.C:903
 pA.C:904
 pA.C:905
 pA.C:906
 pA.C:907
 pA.C:908
 pA.C:909
 pA.C:910
 pA.C:911
 pA.C:912
 pA.C:913
 pA.C:914
 pA.C:915
 pA.C:916
 pA.C:917
 pA.C:918
 pA.C:919
 pA.C:920
 pA.C:921
 pA.C:922
 pA.C:923
 pA.C:924
 pA.C:925
 pA.C:926
 pA.C:927
 pA.C:928
 pA.C:929
 pA.C:930
 pA.C:931
 pA.C:932
 pA.C:933
 pA.C:934
 pA.C:935
 pA.C:936
 pA.C:937
 pA.C:938
 pA.C:939
 pA.C:940
 pA.C:941
 pA.C:942
 pA.C:943
 pA.C:944
 pA.C:945
 pA.C:946
 pA.C:947
 pA.C:948
 pA.C:949
 pA.C:950
 pA.C:951
 pA.C:952
 pA.C:953
 pA.C:954
 pA.C:955
 pA.C:956
 pA.C:957
 pA.C:958
 pA.C:959
 pA.C:960
 pA.C:961
 pA.C:962
 pA.C:963
 pA.C:964
 pA.C:965
 pA.C:966
 pA.C:967
 pA.C:968
 pA.C:969
 pA.C:970
 pA.C:971
 pA.C:972
 pA.C:973
 pA.C:974
 pA.C:975
 pA.C:976
 pA.C:977
 pA.C:978
 pA.C:979
 pA.C:980
 pA.C:981
 pA.C:982
 pA.C:983
 pA.C:984
 pA.C:985
 pA.C:986
 pA.C:987
 pA.C:988
 pA.C:989
 pA.C:990
 pA.C:991
 pA.C:992
 pA.C:993
 pA.C:994
 pA.C:995
 pA.C:996
 pA.C:997
 pA.C:998
 pA.C:999
 pA.C:1000
 pA.C:1001
 pA.C:1002
 pA.C:1003
 pA.C:1004
 pA.C:1005
 pA.C:1006
 pA.C:1007
 pA.C:1008
 pA.C:1009
 pA.C:1010
 pA.C:1011
 pA.C:1012
 pA.C:1013
 pA.C:1014
 pA.C:1015
 pA.C:1016
 pA.C:1017
 pA.C:1018
 pA.C:1019
 pA.C:1020
 pA.C:1021
 pA.C:1022
 pA.C:1023
 pA.C:1024
 pA.C:1025
 pA.C:1026
 pA.C:1027
 pA.C:1028
 pA.C:1029
 pA.C:1030
 pA.C:1031
 pA.C:1032
 pA.C:1033
 pA.C:1034
 pA.C:1035
 pA.C:1036
 pA.C:1037
 pA.C:1038
 pA.C:1039
 pA.C:1040
 pA.C:1041
 pA.C:1042
 pA.C:1043
 pA.C:1044
 pA.C:1045
 pA.C:1046
 pA.C:1047
 pA.C:1048
 pA.C:1049
 pA.C:1050
 pA.C:1051
 pA.C:1052
 pA.C:1053
 pA.C:1054
 pA.C:1055
 pA.C:1056
 pA.C:1057
 pA.C:1058
 pA.C:1059
 pA.C:1060
 pA.C:1061
 pA.C:1062
 pA.C:1063
 pA.C:1064
 pA.C:1065
 pA.C:1066
 pA.C:1067
 pA.C:1068
 pA.C:1069
 pA.C:1070
 pA.C:1071
 pA.C:1072
 pA.C:1073
 pA.C:1074
 pA.C:1075
 pA.C:1076
 pA.C:1077
 pA.C:1078
 pA.C:1079
 pA.C:1080
 pA.C:1081
 pA.C:1082
 pA.C:1083
 pA.C:1084
 pA.C:1085
 pA.C:1086
 pA.C:1087
 pA.C:1088
 pA.C:1089
 pA.C:1090
 pA.C:1091
 pA.C:1092
 pA.C:1093
 pA.C:1094
 pA.C:1095
 pA.C:1096
 pA.C:1097
 pA.C:1098
 pA.C:1099
 pA.C:1100
 pA.C:1101
 pA.C:1102
 pA.C:1103
 pA.C:1104
 pA.C:1105
 pA.C:1106
 pA.C:1107
 pA.C:1108
 pA.C:1109
 pA.C:1110
 pA.C:1111
 pA.C:1112
 pA.C:1113
 pA.C:1114
 pA.C:1115
 pA.C:1116
 pA.C:1117
 pA.C:1118
 pA.C:1119
 pA.C:1120
 pA.C:1121
 pA.C:1122
 pA.C:1123
 pA.C:1124
 pA.C:1125
 pA.C:1126
 pA.C:1127
 pA.C:1128
 pA.C:1129
 pA.C:1130
 pA.C:1131
 pA.C:1132
 pA.C:1133
 pA.C:1134
 pA.C:1135
 pA.C:1136
 pA.C:1137
 pA.C:1138
 pA.C:1139
 pA.C:1140
 pA.C:1141
 pA.C:1142
 pA.C:1143
 pA.C:1144
 pA.C:1145
 pA.C:1146
 pA.C:1147
 pA.C:1148
 pA.C:1149
 pA.C:1150
 pA.C:1151
 pA.C:1152
 pA.C:1153
 pA.C:1154
 pA.C:1155
 pA.C:1156
 pA.C:1157
 pA.C:1158
 pA.C:1159
 pA.C:1160
 pA.C:1161
 pA.C:1162
 pA.C:1163
 pA.C:1164
 pA.C:1165
 pA.C:1166
 pA.C:1167
 pA.C:1168
 pA.C:1169
 pA.C:1170
 pA.C:1171
 pA.C:1172
 pA.C:1173
 pA.C:1174
 pA.C:1175
 pA.C:1176
 pA.C:1177
 pA.C:1178
 pA.C:1179
 pA.C:1180
 pA.C:1181
 pA.C:1182
 pA.C:1183
 pA.C:1184
 pA.C:1185
 pA.C:1186
 pA.C:1187
 pA.C:1188
 pA.C:1189
 pA.C:1190
 pA.C:1191
 pA.C:1192
 pA.C:1193
 pA.C:1194
 pA.C:1195
 pA.C:1196
 pA.C:1197
 pA.C:1198
 pA.C:1199
 pA.C:1200
 pA.C:1201
 pA.C:1202
 pA.C:1203
 pA.C:1204
 pA.C:1205
 pA.C:1206
 pA.C:1207
 pA.C:1208
 pA.C:1209
 pA.C:1210
 pA.C:1211
 pA.C:1212
 pA.C:1213
 pA.C:1214
 pA.C:1215
 pA.C:1216
 pA.C:1217
 pA.C:1218
 pA.C:1219
 pA.C:1220
 pA.C:1221
 pA.C:1222
 pA.C:1223
 pA.C:1224
 pA.C:1225
 pA.C:1226
 pA.C:1227
 pA.C:1228
 pA.C:1229
 pA.C:1230
 pA.C:1231
 pA.C:1232
 pA.C:1233
 pA.C:1234
 pA.C:1235
 pA.C:1236
 pA.C:1237
 pA.C:1238
 pA.C:1239
 pA.C:1240
 pA.C:1241
 pA.C:1242
 pA.C:1243
 pA.C:1244
 pA.C:1245
 pA.C:1246
 pA.C:1247
 pA.C:1248
 pA.C:1249
 pA.C:1250
 pA.C:1251
 pA.C:1252
 pA.C:1253
 pA.C:1254
 pA.C:1255
 pA.C:1256
 pA.C:1257
 pA.C:1258
 pA.C:1259
 pA.C:1260
 pA.C:1261
 pA.C:1262
 pA.C:1263
 pA.C:1264
 pA.C:1265
 pA.C:1266
 pA.C:1267
 pA.C:1268
 pA.C:1269
 pA.C:1270
 pA.C:1271
 pA.C:1272
 pA.C:1273
 pA.C:1274
 pA.C:1275
 pA.C:1276
 pA.C:1277
 pA.C:1278
 pA.C:1279
 pA.C:1280
 pA.C:1281
 pA.C:1282
 pA.C:1283
 pA.C:1284
 pA.C:1285
 pA.C:1286
 pA.C:1287
 pA.C:1288
 pA.C:1289
 pA.C:1290
 pA.C:1291
 pA.C:1292
 pA.C:1293
 pA.C:1294
 pA.C:1295
 pA.C:1296
 pA.C:1297
 pA.C:1298
 pA.C:1299
 pA.C:1300
 pA.C:1301
 pA.C:1302
 pA.C:1303
 pA.C:1304
 pA.C:1305
 pA.C:1306
 pA.C:1307
 pA.C:1308
 pA.C:1309
 pA.C:1310
 pA.C:1311
 pA.C:1312
 pA.C:1313
 pA.C:1314
 pA.C:1315
 pA.C:1316
 pA.C:1317
 pA.C:1318
 pA.C:1319
 pA.C:1320
 pA.C:1321
 pA.C:1322
 pA.C:1323
 pA.C:1324
 pA.C:1325
 pA.C:1326
 pA.C:1327
 pA.C:1328
 pA.C:1329
 pA.C:1330
 pA.C:1331
 pA.C:1332
 pA.C:1333
 pA.C:1334
 pA.C:1335
 pA.C:1336
 pA.C:1337
 pA.C:1338
 pA.C:1339
 pA.C:1340
 pA.C:1341
 pA.C:1342
 pA.C:1343
 pA.C:1344
 pA.C:1345
 pA.C:1346
 pA.C:1347
 pA.C:1348
 pA.C:1349
 pA.C:1350
 pA.C:1351
 pA.C:1352
 pA.C:1353
 pA.C:1354
 pA.C:1355
 pA.C:1356
 pA.C:1357
 pA.C:1358
 pA.C:1359
 pA.C:1360
 pA.C:1361
 pA.C:1362
 pA.C:1363
 pA.C:1364
 pA.C:1365
 pA.C:1366
 pA.C:1367
 pA.C:1368
 pA.C:1369
 pA.C:1370
 pA.C:1371
 pA.C:1372
 pA.C:1373
 pA.C:1374
 pA.C:1375
 pA.C:1376
 pA.C:1377
 pA.C:1378
 pA.C:1379
 pA.C:1380
 pA.C:1381
 pA.C:1382
 pA.C:1383
 pA.C:1384
 pA.C:1385
 pA.C:1386
 pA.C:1387
 pA.C:1388
 pA.C:1389
 pA.C:1390
 pA.C:1391
 pA.C:1392
 pA.C:1393
 pA.C:1394
 pA.C:1395
 pA.C:1396
 pA.C:1397
 pA.C:1398
 pA.C:1399
 pA.C:1400
 pA.C:1401
 pA.C:1402
 pA.C:1403
 pA.C:1404
 pA.C:1405
 pA.C:1406
 pA.C:1407
 pA.C:1408
 pA.C:1409
 pA.C:1410
 pA.C:1411
 pA.C:1412
 pA.C:1413
 pA.C:1414
 pA.C:1415
 pA.C:1416
 pA.C:1417
 pA.C:1418
 pA.C:1419
 pA.C:1420
 pA.C:1421
 pA.C:1422
 pA.C:1423
 pA.C:1424
 pA.C:1425
 pA.C:1426
 pA.C:1427
 pA.C:1428
 pA.C:1429
 pA.C:1430
 pA.C:1431
 pA.C:1432
 pA.C:1433
 pA.C:1434
 pA.C:1435
 pA.C:1436
 pA.C:1437
 pA.C:1438
 pA.C:1439
 pA.C:1440
 pA.C:1441
 pA.C:1442
 pA.C:1443
 pA.C:1444
 pA.C:1445
 pA.C:1446
 pA.C:1447
 pA.C:1448
 pA.C:1449
 pA.C:1450
 pA.C:1451
 pA.C:1452
 pA.C:1453
 pA.C:1454
 pA.C:1455
 pA.C:1456
 pA.C:1457
 pA.C:1458
 pA.C:1459
 pA.C:1460
 pA.C:1461
 pA.C:1462
 pA.C:1463
 pA.C:1464
 pA.C:1465
 pA.C:1466
 pA.C:1467
 pA.C:1468
 pA.C:1469
 pA.C:1470
 pA.C:1471
 pA.C:1472
 pA.C:1473
 pA.C:1474
 pA.C:1475
 pA.C:1476
 pA.C:1477
 pA.C:1478
 pA.C:1479
 pA.C:1480
 pA.C:1481
 pA.C:1482
 pA.C:1483
 pA.C:1484
 pA.C:1485
 pA.C:1486
 pA.C:1487
 pA.C:1488
 pA.C:1489
 pA.C:1490
 pA.C:1491
 pA.C:1492
 pA.C:1493
 pA.C:1494
 pA.C:1495
 pA.C:1496
 pA.C:1497
 pA.C:1498
 pA.C:1499
 pA.C:1500
 pA.C:1501
 pA.C:1502
 pA.C:1503
 pA.C:1504
 pA.C:1505
 pA.C:1506
 pA.C:1507
 pA.C:1508
 pA.C:1509
 pA.C:1510
 pA.C:1511
 pA.C:1512
 pA.C:1513
 pA.C:1514
 pA.C:1515
 pA.C:1516
 pA.C:1517
 pA.C:1518
 pA.C:1519
 pA.C:1520
 pA.C:1521
 pA.C:1522
 pA.C:1523
 pA.C:1524
 pA.C:1525
 pA.C:1526
 pA.C:1527
 pA.C:1528
 pA.C:1529
 pA.C:1530
 pA.C:1531
 pA.C:1532
 pA.C:1533
 pA.C:1534
 pA.C:1535
 pA.C:1536
 pA.C:1537
 pA.C:1538
 pA.C:1539
 pA.C:1540
 pA.C:1541
 pA.C:1542
 pA.C:1543
 pA.C:1544
 pA.C:1545
 pA.C:1546
 pA.C:1547
 pA.C:1548
 pA.C:1549
 pA.C:1550
 pA.C:1551
 pA.C:1552
 pA.C:1553
 pA.C:1554
 pA.C:1555
 pA.C:1556
 pA.C:1557
 pA.C:1558
 pA.C:1559
 pA.C:1560
 pA.C:1561
 pA.C:1562
 pA.C:1563
 pA.C:1564
 pA.C:1565
 pA.C:1566
 pA.C:1567
 pA.C:1568
 pA.C:1569
 pA.C:1570
 pA.C:1571
 pA.C:1572
 pA.C:1573
 pA.C:1574
 pA.C:1575
 pA.C:1576
 pA.C:1577
 pA.C:1578
 pA.C:1579
 pA.C:1580
 pA.C:1581
 pA.C:1582
 pA.C:1583
 pA.C:1584
 pA.C:1585
 pA.C:1586
 pA.C:1587
 pA.C:1588
 pA.C:1589
 pA.C:1590
 pA.C:1591
 pA.C:1592
 pA.C:1593
 pA.C:1594
 pA.C:1595
 pA.C:1596
 pA.C:1597
 pA.C:1598
 pA.C:1599
 pA.C:1600
 pA.C:1601
 pA.C:1602
 pA.C:1603
 pA.C:1604
 pA.C:1605
 pA.C:1606
 pA.C:1607
 pA.C:1608
 pA.C:1609
 pA.C:1610
 pA.C:1611
 pA.C:1612
 pA.C:1613
 pA.C:1614
 pA.C:1615
 pA.C:1616
 pA.C:1617
 pA.C:1618
 pA.C:1619
 pA.C:1620
 pA.C:1621
 pA.C:1622
 pA.C:1623
 pA.C:1624
 pA.C:1625
 pA.C:1626
 pA.C:1627
 pA.C:1628
 pA.C:1629
 pA.C:1630
 pA.C:1631
 pA.C:1632
 pA.C:1633
 pA.C:1634
 pA.C:1635
 pA.C:1636
 pA.C:1637
 pA.C:1638
 pA.C:1639
 pA.C:1640
 pA.C:1641
 pA.C:1642
 pA.C:1643
 pA.C:1644
 pA.C:1645
 pA.C:1646
 pA.C:1647
 pA.C:1648
 pA.C:1649
 pA.C:1650
 pA.C:1651
 pA.C:1652
 pA.C:1653
 pA.C:1654
 pA.C:1655
 pA.C:1656
 pA.C:1657
 pA.C:1658
 pA.C:1659
 pA.C:1660
 pA.C:1661
 pA.C:1662
 pA.C:1663
 pA.C:1664
 pA.C:1665
 pA.C:1666
 pA.C:1667
 pA.C:1668
 pA.C:1669
 pA.C:1670
 pA.C:1671
 pA.C:1672
 pA.C:1673
 pA.C:1674
 pA.C:1675
 pA.C:1676
 pA.C:1677
 pA.C:1678
 pA.C:1679
 pA.C:1680
 pA.C:1681
 pA.C:1682
 pA.C:1683
 pA.C:1684
 pA.C:1685
 pA.C:1686
 pA.C:1687
 pA.C:1688
 pA.C:1689
 pA.C:1690
 pA.C:1691
 pA.C:1692
 pA.C:1693
 pA.C:1694
 pA.C:1695
 pA.C:1696
 pA.C:1697
 pA.C:1698
 pA.C:1699
 pA.C:1700
 pA.C:1701
 pA.C:1702
 pA.C:1703
 pA.C:1704
 pA.C:1705
 pA.C:1706
 pA.C:1707
 pA.C:1708
 pA.C:1709
 pA.C:1710
 pA.C:1711
 pA.C:1712
 pA.C:1713
 pA.C:1714
 pA.C:1715
 pA.C:1716
 pA.C:1717
 pA.C:1718
 pA.C:1719
 pA.C:1720
 pA.C:1721
 pA.C:1722
 pA.C:1723
 pA.C:1724
 pA.C:1725
 pA.C:1726
 pA.C:1727
 pA.C:1728
 pA.C:1729
 pA.C:1730
 pA.C:1731
 pA.C:1732
 pA.C:1733
 pA.C:1734
 pA.C:1735
 pA.C:1736
 pA.C:1737
 pA.C:1738
 pA.C:1739
 pA.C:1740
 pA.C:1741
 pA.C:1742
 pA.C:1743
 pA.C:1744
 pA.C:1745
 pA.C:1746
 pA.C:1747
 pA.C:1748
 pA.C:1749
 pA.C:1750
 pA.C:1751
 pA.C:1752
 pA.C:1753
 pA.C:1754
 pA.C:1755
 pA.C:1756
 pA.C:1757
 pA.C:1758
 pA.C:1759
 pA.C:1760
 pA.C:1761
 pA.C:1762
 pA.C:1763
 pA.C:1764
 pA.C:1765
 pA.C:1766
 pA.C:1767
 pA.C:1768
 pA.C:1769
 pA.C:1770
 pA.C:1771
 pA.C:1772
 pA.C:1773
 pA.C:1774
 pA.C:1775
 pA.C:1776
 pA.C:1777
 pA.C:1778
 pA.C:1779
 pA.C:1780
 pA.C:1781
 pA.C:1782
 pA.C:1783
 pA.C:1784
 pA.C:1785
 pA.C:1786
 pA.C:1787
 pA.C:1788
 pA.C:1789
 pA.C:1790
 pA.C:1791
 pA.C:1792
 pA.C:1793
 pA.C:1794
 pA.C:1795
 pA.C:1796
 pA.C:1797
 pA.C:1798
 pA.C:1799
 pA.C:1800
 pA.C:1801
 pA.C:1802
 pA.C:1803
 pA.C:1804
 pA.C:1805
 pA.C:1806
 pA.C:1807
 pA.C:1808
 pA.C:1809
 pA.C:1810
 pA.C:1811
 pA.C:1812
 pA.C:1813
 pA.C:1814
 pA.C:1815
 pA.C:1816
 pA.C:1817
 pA.C:1818
 pA.C:1819
 pA.C:1820
 pA.C:1821
 pA.C:1822
 pA.C:1823
 pA.C:1824
 pA.C:1825
 pA.C:1826
 pA.C:1827
 pA.C:1828
 pA.C:1829
 pA.C:1830
 pA.C:1831
 pA.C:1832
 pA.C:1833
 pA.C:1834
 pA.C:1835
 pA.C:1836
 pA.C:1837
 pA.C:1838
 pA.C:1839
 pA.C:1840
 pA.C:1841
 pA.C:1842
 pA.C:1843
 pA.C:1844
 pA.C:1845
 pA.C:1846
 pA.C:1847
 pA.C:1848
 pA.C:1849
 pA.C:1850
 pA.C:1851
 pA.C:1852
 pA.C:1853
 pA.C:1854
 pA.C:1855
 pA.C:1856
 pA.C:1857
 pA.C:1858
 pA.C:1859
 pA.C:1860
 pA.C:1861
 pA.C:1862
 pA.C:1863
 pA.C:1864
 pA.C:1865
 pA.C:1866
 pA.C:1867
 pA.C:1868
 pA.C:1869
 pA.C:1870
 pA.C:1871
 pA.C:1872
 pA.C:1873
 pA.C:1874
 pA.C:1875
 pA.C:1876
 pA.C:1877
 pA.C:1878
 pA.C:1879
 pA.C:1880
 pA.C:1881
 pA.C:1882
 pA.C:1883
 pA.C:1884
 pA.C:1885
 pA.C:1886
 pA.C:1887
 pA.C:1888
 pA.C:1889
 pA.C:1890
 pA.C:1891
 pA.C:1892
 pA.C:1893
 pA.C:1894
 pA.C:1895
 pA.C:1896
 pA.C:1897
 pA.C:1898
 pA.C:1899
 pA.C:1900
 pA.C:1901
 pA.C:1902
 pA.C:1903
 pA.C:1904
 pA.C:1905
 pA.C:1906
 pA.C:1907
 pA.C:1908
 pA.C:1909
 pA.C:1910
 pA.C:1911
 pA.C:1912
 pA.C:1913
 pA.C:1914
 pA.C:1915
 pA.C:1916
 pA.C:1917
 pA.C:1918
 pA.C:1919
 pA.C:1920
 pA.C:1921
 pA.C:1922
 pA.C:1923
 pA.C:1924
 pA.C:1925
 pA.C:1926
 pA.C:1927
 pA.C:1928
 pA.C:1929
 pA.C:1930
 pA.C:1931
 pA.C:1932
 pA.C:1933
 pA.C:1934
 pA.C:1935
 pA.C:1936
 pA.C:1937
 pA.C:1938
 pA.C:1939
 pA.C:1940
 pA.C:1941
 pA.C:1942
 pA.C:1943
 pA.C:1944
 pA.C:1945
 pA.C:1946
 pA.C:1947
 pA.C:1948
 pA.C:1949
 pA.C:1950
 pA.C:1951
 pA.C:1952
 pA.C:1953
 pA.C:1954
 pA.C:1955
 pA.C:1956
 pA.C:1957
 pA.C:1958
 pA.C:1959
 pA.C:1960
 pA.C:1961
 pA.C:1962
 pA.C:1963
 pA.C:1964
 pA.C:1965
 pA.C:1966
 pA.C:1967
 pA.C:1968
 pA.C:1969
 pA.C:1970
 pA.C:1971
 pA.C:1972
 pA.C:1973
 pA.C:1974
 pA.C:1975
 pA.C:1976
 pA.C:1977
 pA.C:1978
 pA.C:1979
 pA.C:1980
 pA.C:1981
 pA.C:1982
 pA.C:1983
 pA.C:1984
 pA.C:1985
 pA.C:1986
 pA.C:1987
 pA.C:1988
 pA.C:1989
 pA.C:1990
 pA.C:1991
 pA.C:1992
 pA.C:1993
 pA.C:1994
 pA.C:1995
 pA.C:1996
 pA.C:1997
 pA.C:1998
 pA.C:1999
 pA.C:2000
 pA.C:2001
 pA.C:2002
 pA.C:2003
 pA.C:2004
 pA.C:2005
 pA.C:2006
 pA.C:2007
 pA.C:2008
 pA.C:2009
 pA.C:2010
 pA.C:2011
 pA.C:2012
 pA.C:2013
 pA.C:2014
 pA.C:2015
 pA.C:2016
 pA.C:2017
 pA.C:2018
 pA.C:2019
 pA.C:2020
 pA.C:2021
 pA.C:2022
 pA.C:2023
 pA.C:2024
 pA.C:2025
 pA.C:2026
 pA.C:2027
 pA.C:2028
 pA.C:2029
 pA.C:2030
 pA.C:2031
 pA.C:2032
 pA.C:2033
 pA.C:2034
 pA.C:2035
 pA.C:2036
 pA.C:2037
 pA.C:2038
 pA.C:2039
 pA.C:2040
 pA.C:2041
 pA.C:2042
 pA.C:2043
 pA.C:2044
 pA.C:2045
 pA.C:2046
 pA.C:2047
 pA.C:2048
 pA.C:2049
 pA.C:2050
 pA.C:2051
 pA.C:2052
 pA.C:2053
 pA.C:2054
 pA.C:2055
 pA.C:2056
 pA.C:2057
 pA.C:2058
 pA.C:2059
 pA.C:2060
 pA.C:2061
 pA.C:2062
 pA.C:2063
 pA.C:2064
 pA.C:2065
 pA.C:2066
 pA.C:2067
 pA.C:2068
 pA.C:2069
 pA.C:2070
 pA.C:2071
 pA.C:2072
 pA.C:2073
 pA.C:2074
 pA.C:2075
 pA.C:2076
 pA.C:2077
 pA.C:2078
 pA.C:2079
 pA.C:2080
 pA.C:2081
 pA.C:2082
 pA.C:2083
 pA.C:2084
 pA.C:2085
 pA.C:2086
 pA.C:2087
 pA.C:2088
 pA.C:2089
 pA.C:2090
 pA.C:2091
 pA.C:2092
 pA.C:2093
 pA.C:2094
 pA.C:2095
 pA.C:2096
 pA.C:2097
 pA.C:2098
 pA.C:2099
 pA.C:2100
 pA.C:2101
 pA.C:2102
 pA.C:2103
 pA.C:2104
 pA.C:2105
 pA.C:2106
 pA.C:2107
 pA.C:2108
 pA.C:2109
 pA.C:2110
 pA.C:2111
 pA.C:2112
 pA.C:2113
 pA.C:2114
 pA.C:2115
 pA.C:2116
 pA.C:2117
 pA.C:2118
 pA.C:2119
 pA.C:2120
 pA.C:2121
 pA.C:2122
 pA.C:2123
 pA.C:2124
 pA.C:2125
 pA.C:2126
 pA.C:2127
 pA.C:2128
 pA.C:2129
 pA.C:2130
 pA.C:2131
 pA.C:2132
 pA.C:2133
 pA.C:2134
 pA.C:2135
 pA.C:2136
 pA.C:2137
 pA.C:2138
 pA.C:2139
 pA.C:2140
 pA.C:2141
 pA.C:2142
 pA.C:2143
 pA.C:2144
 pA.C:2145
 pA.C:2146
 pA.C:2147
 pA.C:2148
 pA.C:2149
 pA.C:2150
 pA.C:2151
 pA.C:2152
 pA.C:2153
 pA.C:2154
 pA.C:2155
 pA.C:2156
 pA.C:2157
 pA.C:2158
 pA.C:2159
 pA.C:2160
 pA.C:2161
 pA.C:2162
 pA.C:2163
 pA.C:2164
 pA.C:2165
 pA.C:2166
 pA.C:2167
 pA.C:2168
 pA.C:2169
 pA.C:2170
 pA.C:2171
 pA.C:2172
 pA.C:2173
 pA.C:2174
 pA.C:2175
 pA.C:2176
 pA.C:2177
 pA.C:2178
 pA.C:2179
 pA.C:2180
 pA.C:2181
 pA.C:2182
 pA.C:2183
 pA.C:2184
 pA.C:2185
 pA.C:2186
 pA.C:2187
 pA.C:2188
 pA.C:2189
 pA.C:2190
 pA.C:2191
 pA.C:2192
 pA.C:2193
 pA.C:2194
 pA.C:2195
 pA.C:2196
 pA.C:2197
 pA.C:2198
 pA.C:2199
 pA.C:2200
 pA.C:2201
 pA.C:2202
 pA.C:2203
 pA.C:2204
 pA.C:2205
 pA.C:2206
 pA.C:2207
 pA.C:2208
 pA.C:2209
 pA.C:2210
 pA.C:2211
 pA.C:2212
 pA.C:2213
 pA.C:2214
 pA.C:2215
 pA.C:2216
 pA.C:2217
 pA.C:2218
 pA.C:2219
 pA.C:2220
 pA.C:2221
 pA.C:2222
 pA.C:2223
 pA.C:2224
 pA.C:2225
 pA.C:2226
 pA.C:2227
 pA.C:2228
 pA.C:2229
 pA.C:2230
 pA.C:2231
 pA.C:2232
 pA.C:2233
 pA.C:2234
 pA.C:2235
 pA.C:2236
 pA.C:2237
 pA.C:2238
 pA.C:2239
 pA.C:2240
 pA.C:2241
 pA.C:2242
 pA.C:2243
 pA.C:2244
 pA.C:2245
 pA.C:2246
 pA.C:2247
 pA.C:2248
 pA.C:2249
 pA.C:2250
 pA.C:2251
 pA.C:2252
 pA.C:2253
 pA.C:2254
 pA.C:2255
 pA.C:2256
 pA.C:2257
 pA.C:2258
 pA.C:2259
 pA.C:2260
 pA.C:2261
 pA.C:2262
 pA.C:2263
 pA.C:2264
 pA.C:2265
 pA.C:2266
 pA.C:2267
 pA.C:2268
 pA.C:2269
 pA.C:2270
 pA.C:2271
 pA.C:2272
 pA.C:2273
 pA.C:2274
 pA.C:2275
 pA.C:2276
 pA.C:2277
 pA.C:2278
 pA.C:2279
 pA.C:2280
 pA.C:2281
 pA.C:2282
 pA.C:2283
 pA.C:2284
 pA.C:2285
 pA.C:2286
 pA.C:2287
 pA.C:2288
 pA.C:2289
 pA.C:2290
 pA.C:2291
 pA.C:2292
 pA.C:2293
 pA.C:2294
 pA.C:2295
 pA.C:2296
 pA.C:2297
 pA.C:2298
 pA.C:2299
 pA.C:2300
 pA.C:2301
 pA.C:2302
 pA.C:2303
 pA.C:2304
 pA.C:2305
 pA.C:2306
 pA.C:2307
 pA.C:2308
 pA.C:2309
 pA.C:2310
 pA.C:2311
 pA.C:2312
 pA.C:2313
 pA.C:2314
 pA.C:2315
 pA.C:2316
 pA.C:2317
 pA.C:2318
 pA.C:2319
 pA.C:2320
 pA.C:2321
 pA.C:2322
 pA.C:2323
 pA.C:2324
 pA.C:2325
 pA.C:2326
 pA.C:2327
 pA.C:2328
 pA.C:2329
 pA.C:2330
 pA.C:2331
 pA.C:2332
 pA.C:2333
 pA.C:2334
 pA.C:2335
 pA.C:2336
 pA.C:2337
 pA.C:2338
 pA.C:2339
 pA.C:2340
 pA.C:2341
 pA.C:2342
 pA.C:2343
 pA.C:2344
 pA.C:2345
 pA.C:2346
 pA.C:2347
 pA.C:2348
 pA.C:2349
 pA.C:2350
 pA.C:2351
 pA.C:2352
 pA.C:2353
 pA.C:2354
 pA.C:2355
 pA.C:2356
 pA.C:2357
 pA.C:2358
 pA.C:2359
 pA.C:2360
 pA.C:2361
 pA.C:2362
 pA.C:2363
 pA.C:2364
 pA.C:2365
 pA.C:2366
 pA.C:2367
 pA.C:2368
 pA.C:2369
 pA.C:2370
 pA.C:2371
 pA.C:2372
 pA.C:2373
 pA.C:2374
 pA.C:2375
 pA.C:2376
 pA.C:2377
 pA.C:2378
 pA.C:2379
 pA.C:2380
 pA.C:2381
 pA.C:2382
 pA.C:2383
 pA.C:2384
 pA.C:2385
 pA.C:2386
 pA.C:2387
 pA.C:2388
 pA.C:2389
 pA.C:2390
 pA.C:2391
 pA.C:2392
 pA.C:2393
 pA.C:2394
 pA.C:2395
 pA.C:2396
 pA.C:2397
 pA.C:2398
 pA.C:2399
 pA.C:2400
 pA.C:2401
 pA.C:2402
 pA.C:2403
 pA.C:2404
 pA.C:2405
 pA.C:2406
 pA.C:2407
 pA.C:2408
 pA.C:2409
 pA.C:2410
 pA.C:2411
 pA.C:2412
 pA.C:2413
 pA.C:2414
 pA.C:2415
 pA.C:2416
 pA.C:2417
 pA.C:2418
 pA.C:2419
 pA.C:2420
 pA.C:2421
 pA.C:2422
 pA.C:2423
 pA.C:2424
 pA.C:2425
 pA.C:2426
 pA.C:2427
 pA.C:2428
 pA.C:2429
 pA.C:2430
 pA.C:2431
 pA.C:2432
 pA.C:2433
 pA.C:2434
 pA.C:2435
 pA.C:2436
 pA.C:2437
 pA.C:2438
 pA.C:2439
 pA.C:2440
 pA.C:2441
 pA.C:2442
 pA.C:2443
 pA.C:2444
 pA.C:2445
 pA.C:2446
 pA.C:2447
 pA.C:2448
 pA.C:2449
 pA.C:2450
 pA.C:2451
 pA.C:2452
 pA.C:2453
 pA.C:2454
 pA.C:2455
 pA.C:2456
 pA.C:2457
 pA.C:2458
 pA.C:2459
 pA.C:2460
 pA.C:2461
 pA.C:2462
 pA.C:2463
 pA.C:2464
 pA.C:2465
 pA.C:2466
 pA.C:2467
 pA.C:2468
 pA.C:2469
 pA.C:2470
 pA.C:2471
 pA.C:2472
 pA.C:2473
 pA.C:2474
 pA.C:2475
 pA.C:2476
 pA.C:2477
 pA.C:2478
 pA.C:2479
 pA.C:2480
 pA.C:2481
 pA.C:2482
 pA.C:2483
 pA.C:2484
 pA.C:2485
 pA.C:2486
 pA.C:2487
 pA.C:2488
 pA.C:2489
 pA.C:2490
 pA.C:2491
 pA.C:2492
 pA.C:2493
 pA.C:2494
 pA.C:2495
 pA.C:2496
 pA.C:2497
 pA.C:2498
 pA.C:2499
 pA.C:2500
 pA.C:2501
 pA.C:2502
 pA.C:2503
 pA.C:2504
 pA.C:2505
 pA.C:2506
 pA.C:2507
 pA.C:2508
 pA.C:2509
 pA.C:2510
 pA.C:2511
 pA.C:2512
 pA.C:2513
 pA.C:2514
 pA.C:2515
 pA.C:2516
 pA.C:2517
 pA.C:2518
 pA.C:2519
 pA.C:2520
 pA.C:2521
 pA.C:2522
 pA.C:2523
 pA.C:2524
 pA.C:2525
 pA.C:2526
 pA.C:2527
 pA.C:2528
 pA.C:2529
 pA.C:2530
 pA.C:2531
 pA.C:2532
 pA.C:2533
 pA.C:2534
 pA.C:2535
 pA.C:2536
 pA.C:2537
 pA.C:2538
 pA.C:2539
 pA.C:2540
 pA.C:2541
 pA.C:2542
 pA.C:2543
 pA.C:2544
 pA.C:2545
 pA.C:2546
 pA.C:2547
 pA.C:2548
 pA.C:2549
 pA.C:2550
 pA.C:2551
 pA.C:2552
 pA.C:2553
 pA.C:2554
 pA.C:2555
 pA.C:2556
 pA.C:2557
 pA.C:2558
 pA.C:2559
 pA.C:2560
 pA.C:2561
 pA.C:2562
 pA.C:2563
 pA.C:2564
 pA.C:2565
 pA.C:2566
 pA.C:2567
 pA.C:2568
 pA.C:2569
 pA.C:2570
 pA.C:2571
 pA.C:2572
 pA.C:2573
 pA.C:2574
 pA.C:2575
 pA.C:2576
 pA.C:2577
 pA.C:2578
 pA.C:2579
 pA.C:2580
 pA.C:2581
 pA.C:2582
 pA.C:2583
 pA.C:2584
 pA.C:2585
 pA.C:2586
 pA.C:2587
 pA.C:2588
 pA.C:2589
 pA.C:2590
 pA.C:2591
 pA.C:2592
 pA.C:2593
 pA.C:2594
 pA.C:2595
 pA.C:2596
 pA.C:2597
 pA.C:2598
 pA.C:2599
 pA.C:2600
 pA.C:2601
 pA.C:2602
 pA.C:2603
 pA.C:2604
 pA.C:2605
 pA.C:2606
 pA.C:2607
 pA.C:2608
 pA.C:2609
 pA.C:2610
 pA.C:2611
 pA.C:2612
 pA.C:2613
 pA.C:2614
 pA.C:2615
 pA.C:2616
 pA.C:2617
 pA.C:2618
 pA.C:2619
 pA.C:2620
 pA.C:2621
 pA.C:2622
 pA.C:2623
 pA.C:2624
 pA.C:2625
 pA.C:2626
 pA.C:2627
 pA.C:2628
 pA.C:2629
 pA.C:2630
 pA.C:2631
 pA.C:2632
 pA.C:2633
 pA.C:2634
 pA.C:2635
 pA.C:2636
 pA.C:2637
 pA.C:2638
 pA.C:2639
 pA.C:2640
 pA.C:2641
 pA.C:2642
 pA.C:2643
 pA.C:2644
 pA.C:2645
 pA.C:2646
 pA.C:2647
 pA.C:2648
 pA.C:2649
 pA.C:2650
 pA.C:2651
 pA.C:2652
 pA.C:2653
 pA.C:2654
 pA.C:2655
 pA.C:2656
 pA.C:2657
 pA.C:2658
 pA.C:2659
 pA.C:2660
 pA.C:2661
 pA.C:2662
 pA.C:2663
 pA.C:2664
 pA.C:2665
 pA.C:2666
 pA.C:2667
 pA.C:2668
 pA.C:2669
 pA.C:2670
 pA.C:2671
 pA.C:2672
 pA.C:2673
 pA.C:2674
 pA.C:2675
 pA.C:2676
 pA.C:2677
 pA.C:2678
 pA.C:2679
 pA.C:2680
 pA.C:2681
 pA.C:2682
 pA.C:2683
 pA.C:2684
 pA.C:2685
 pA.C:2686
 pA.C:2687
 pA.C:2688
 pA.C:2689
 pA.C:2690
 pA.C:2691
 pA.C:2692
 pA.C:2693
 pA.C:2694
 pA.C:2695
 pA.C:2696
 pA.C:2697
 pA.C:2698
 pA.C:2699
 pA.C:2700
 pA.C:2701
 pA.C:2702
 pA.C:2703
 pA.C:2704
 pA.C:2705
 pA.C:2706
 pA.C:2707
 pA.C:2708
 pA.C:2709
 pA.C:2710
 pA.C:2711
 pA.C:2712
 pA.C:2713
 pA.C:2714
 pA.C:2715
 pA.C:2716
 pA.C:2717
 pA.C:2718
 pA.C:2719
 pA.C:2720
 pA.C:2721
 pA.C:2722
 pA.C:2723
 pA.C:2724
 pA.C:2725
 pA.C:2726
 pA.C:2727
 pA.C:2728
 pA.C:2729
 pA.C:2730
 pA.C:2731
 pA.C:2732
 pA.C:2733
 pA.C:2734
 pA.C:2735
 pA.C:2736
 pA.C:2737
 pA.C:2738
 pA.C:2739
 pA.C:2740
 pA.C:2741
 pA.C:2742
 pA.C:2743
 pA.C:2744
 pA.C:2745
 pA.C:2746
 pA.C:2747
 pA.C:2748
 pA.C:2749
 pA.C:2750
 pA.C:2751
 pA.C:2752
 pA.C:2753
 pA.C:2754
 pA.C:2755
 pA.C:2756
 pA.C:2757
 pA.C:2758
 pA.C:2759
 pA.C:2760
 pA.C:2761
 pA.C:2762
 pA.C:2763
 pA.C:2764
 pA.C:2765
 pA.C:2766
 pA.C:2767
 pA.C:2768
 pA.C:2769
 pA.C:2770
 pA.C:2771
 pA.C:2772
 pA.C:2773
 pA.C:2774
 pA.C:2775
 pA.C:2776
 pA.C:2777
 pA.C:2778
 pA.C:2779
 pA.C:2780
 pA.C:2781
 pA.C:2782
 pA.C:2783
 pA.C:2784
 pA.C:2785
 pA.C:2786
 pA.C:2787
 pA.C:2788
 pA.C:2789
 pA.C:2790
 pA.C:2791
 pA.C:2792
 pA.C:2793
 pA.C:2794
 pA.C:2795
 pA.C:2796
 pA.C:2797
 pA.C:2798
 pA.C:2799
 pA.C:2800
 pA.C:2801
 pA.C:2802
 pA.C:2803
 pA.C:2804
 pA.C:2805
 pA.C:2806
 pA.C:2807
 pA.C:2808
 pA.C:2809
 pA.C:2810
 pA.C:2811
 pA.C:2812
 pA.C:2813
 pA.C:2814
 pA.C:2815
 pA.C:2816
 pA.C:2817
 pA.C:2818
 pA.C:2819
 pA.C:2820
 pA.C:2821
 pA.C:2822
 pA.C:2823
 pA.C:2824
 pA.C:2825
 pA.C:2826
 pA.C:2827
 pA.C:2828
 pA.C:2829
 pA.C:2830
 pA.C:2831
 pA.C:2832
 pA.C:2833
 pA.C:2834
 pA.C:2835
 pA.C:2836
 pA.C:2837
 pA.C:2838
 pA.C:2839
 pA.C:2840
 pA.C:2841
 pA.C:2842
 pA.C:2843
 pA.C:2844
 pA.C:2845
 pA.C:2846
 pA.C:2847
 pA.C:2848
 pA.C:2849
 pA.C:2850
 pA.C:2851
 pA.C:2852
 pA.C:2853
 pA.C:2854
 pA.C:2855
 pA.C:2856
 pA.C:2857
 pA.C:2858
 pA.C:2859
 pA.C:2860
 pA.C:2861
 pA.C:2862
 pA.C:2863
 pA.C:2864
 pA.C:2865
 pA.C:2866
 pA.C:2867
 pA.C:2868
 pA.C:2869
 pA.C:2870
 pA.C:2871
 pA.C:2872
 pA.C:2873
 pA.C:2874
 pA.C:2875
 pA.C:2876
 pA.C:2877
 pA.C:2878
 pA.C:2879
 pA.C:2880
 pA.C:2881
 pA.C:2882
 pA.C:2883
 pA.C:2884
 pA.C:2885
 pA.C:2886
 pA.C:2887
 pA.C:2888
 pA.C:2889
 pA.C:2890
 pA.C:2891
 pA.C:2892
 pA.C:2893
 pA.C:2894
 pA.C:2895
 pA.C:2896
 pA.C:2897
 pA.C:2898
 pA.C:2899
 pA.C:2900
 pA.C:2901
 pA.C:2902
 pA.C:2903
 pA.C:2904
 pA.C:2905
 pA.C:2906
 pA.C:2907
 pA.C:2908
 pA.C:2909
 pA.C:2910
 pA.C:2911
 pA.C:2912
 pA.C:2913
 pA.C:2914
 pA.C:2915
 pA.C:2916
 pA.C:2917
 pA.C:2918
 pA.C:2919
 pA.C:2920
 pA.C:2921
 pA.C:2922
 pA.C:2923
 pA.C:2924
 pA.C:2925
 pA.C:2926
 pA.C:2927
 pA.C:2928
 pA.C:2929
 pA.C:2930
 pA.C:2931
 pA.C:2932
 pA.C:2933
 pA.C:2934
 pA.C:2935
 pA.C:2936
 pA.C:2937
 pA.C:2938
 pA.C:2939
 pA.C:2940
 pA.C:2941
 pA.C:2942
 pA.C:2943
 pA.C:2944
 pA.C:2945
 pA.C:2946
 pA.C:2947
 pA.C:2948
 pA.C:2949
 pA.C:2950
 pA.C:2951
 pA.C:2952
 pA.C:2953
 pA.C:2954
 pA.C:2955
 pA.C:2956
 pA.C:2957
 pA.C:2958
 pA.C:2959
 pA.C:2960
 pA.C:2961
 pA.C:2962
 pA.C:2963
 pA.C:2964
 pA.C:2965
 pA.C:2966
 pA.C:2967
 pA.C:2968
 pA.C:2969
 pA.C:2970
 pA.C:2971
 pA.C:2972
 pA.C:2973
 pA.C:2974
 pA.C:2975
 pA.C:2976
 pA.C:2977
 pA.C:2978
 pA.C:2979
 pA.C:2980
 pA.C:2981
 pA.C:2982
 pA.C:2983
 pA.C:2984
 pA.C:2985
 pA.C:2986
 pA.C:2987
 pA.C:2988
 pA.C:2989
 pA.C:2990
 pA.C:2991
 pA.C:2992
 pA.C:2993
 pA.C:2994
 pA.C:2995
 pA.C:2996
 pA.C:2997
 pA.C:2998
 pA.C:2999
 pA.C:3000
 pA.C:3001
 pA.C:3002
 pA.C:3003
 pA.C:3004
 pA.C:3005
 pA.C:3006
 pA.C:3007
 pA.C:3008
 pA.C:3009
 pA.C:3010
 pA.C:3011
 pA.C:3012
 pA.C:3013
 pA.C:3014
 pA.C:3015
 pA.C:3016
 pA.C:3017
 pA.C:3018
 pA.C:3019
 pA.C:3020
 pA.C:3021
 pA.C:3022
 pA.C:3023
 pA.C:3024
 pA.C:3025
 pA.C:3026
 pA.C:3027
 pA.C:3028
 pA.C:3029
 pA.C:3030
 pA.C:3031
 pA.C:3032
 pA.C:3033
 pA.C:3034
 pA.C:3035
 pA.C:3036
 pA.C:3037
 pA.C:3038
 pA.C:3039
 pA.C:3040
 pA.C:3041
 pA.C:3042
 pA.C:3043
 pA.C:3044
 pA.C:3045
 pA.C:3046
 pA.C:3047
 pA.C:3048
 pA.C:3049
 pA.C:3050
 pA.C:3051
 pA.C:3052
 pA.C:3053
 pA.C:3054
 pA.C:3055
 pA.C:3056
 pA.C:3057
 pA.C:3058
 pA.C:3059
 pA.C:3060
 pA.C:3061
 pA.C:3062
 pA.C:3063
 pA.C:3064
 pA.C:3065
 pA.C:3066
 pA.C:3067
 pA.C:3068
 pA.C:3069
 pA.C:3070
 pA.C:3071
 pA.C:3072
 pA.C:3073
 pA.C:3074
 pA.C:3075
 pA.C:3076
 pA.C:3077
 pA.C:3078
 pA.C:3079
 pA.C:3080
 pA.C:3081
 pA.C:3082
 pA.C:3083
 pA.C:3084
 pA.C:3085
 pA.C:3086
 pA.C:3087
 pA.C:3088
 pA.C:3089
 pA.C:3090
 pA.C:3091
 pA.C:3092
 pA.C:3093
 pA.C:3094
 pA.C:3095
 pA.C:3096
 pA.C:3097
 pA.C:3098
 pA.C:3099
 pA.C:3100
 pA.C:3101
 pA.C:3102
 pA.C:3103
 pA.C:3104
 pA.C:3105
 pA.C:3106
 pA.C:3107
 pA.C:3108
 pA.C:3109
 pA.C:3110
 pA.C:3111
 pA.C:3112
 pA.C:3113
 pA.C:3114
 pA.C:3115
 pA.C:3116
 pA.C:3117
 pA.C:3118
 pA.C:3119
 pA.C:3120
 pA.C:3121
 pA.C:3122
 pA.C:3123
 pA.C:3124
 pA.C:3125
 pA.C:3126
 pA.C:3127
 pA.C:3128
 pA.C:3129
 pA.C:3130
 pA.C:3131
 pA.C:3132
 pA.C:3133
 pA.C:3134
 pA.C:3135
 pA.C:3136
 pA.C:3137
 pA.C:3138
 pA.C:3139
 pA.C:3140
 pA.C:3141
 pA.C:3142
 pA.C:3143
 pA.C:3144
 pA.C:3145
 pA.C:3146
 pA.C:3147
 pA.C:3148
 pA.C:3149
 pA.C:3150
 pA.C:3151
 pA.C:3152
 pA.C:3153
 pA.C:3154
 pA.C:3155
 pA.C:3156
 pA.C:3157
 pA.C:3158
 pA.C:3159
 pA.C:3160
 pA.C:3161
 pA.C:3162
 pA.C:3163
 pA.C:3164
 pA.C:3165
 pA.C:3166
 pA.C:3167
 pA.C:3168
 pA.C:3169
 pA.C:3170
 pA.C:3171
 pA.C:3172
 pA.C:3173
 pA.C:3174
 pA.C:3175
 pA.C:3176
 pA.C:3177
 pA.C:3178
 pA.C:3179
 pA.C:3180
 pA.C:3181
 pA.C:3182
 pA.C:3183
 pA.C:3184
 pA.C:3185
 pA.C:3186
 pA.C:3187
 pA.C:3188
 pA.C:3189
 pA.C:3190
 pA.C:3191
 pA.C:3192
 pA.C:3193
 pA.C:3194
 pA.C:3195
 pA.C:3196
 pA.C:3197
 pA.C:3198
 pA.C:3199
 pA.C:3200
 pA.C:3201
 pA.C:3202
 pA.C:3203
 pA.C:3204
 pA.C:3205
 pA.C:3206
 pA.C:3207
 pA.C:3208
 pA.C:3209
 pA.C:3210
 pA.C:3211
 pA.C:3212
 pA.C:3213
 pA.C:3214
 pA.C:3215
 pA.C:3216
 pA.C:3217
 pA.C:3218
 pA.C:3219
 pA.C:3220
 pA.C:3221
 pA.C:3222
 pA.C:3223
 pA.C:3224
 pA.C:3225
 pA.C:3226
 pA.C:3227
 pA.C:3228
 pA.C:3229
 pA.C:3230
 pA.C:3231
 pA.C:3232
 pA.C:3233
 pA.C:3234
 pA.C:3235
 pA.C:3236
 pA.C:3237
 pA.C:3238
 pA.C:3239
 pA.C:3240
 pA.C:3241
 pA.C:3242
 pA.C:3243
 pA.C:3244
 pA.C:3245
 pA.C:3246
 pA.C:3247
 pA.C:3248
 pA.C:3249
 pA.C:3250
 pA.C:3251
 pA.C:3252
 pA.C:3253
 pA.C:3254
 pA.C:3255
 pA.C:3256
 pA.C:3257
 pA.C:3258
 pA.C:3259
 pA.C:3260
 pA.C:3261
 pA.C:3262
 pA.C:3263
 pA.C:3264
 pA.C:3265
 pA.C:3266
 pA.C:3267
 pA.C:3268
 pA.C:3269
 pA.C:3270
 pA.C:3271
 pA.C:3272
 pA.C:3273
 pA.C:3274
 pA.C:3275
 pA.C:3276
 pA.C:3277
 pA.C:3278
 pA.C:3279
 pA.C:3280
 pA.C:3281
 pA.C:3282
 pA.C:3283
 pA.C:3284
 pA.C:3285
 pA.C:3286
 pA.C:3287
 pA.C:3288
 pA.C:3289
 pA.C:3290
 pA.C:3291
 pA.C:3292
 pA.C:3293
 pA.C:3294
 pA.C:3295
 pA.C:3296
 pA.C:3297