ROOT logo
#include "THnSparse.h"
#include "TH3D.h"
#include "TH2D.h"
#include "TH1D.h"
#include "TProfile.h"
#include "TF1.h"
#include "TFitResultPtr.h"
#include "TFitResult.h"
#include "TCanvas.h"
#include "TStyle.h"
#include "TVirtualFitter.h"
#include "TList.h"
#include "TString.h"
#include "TLegend.h"
#include "TLegendEntry.h"
#include "TFile.h"
#include "TGraphErrors.h"
#include "TGraph.h"
#include "TMath.h"
#include "TDatime.h"

#include <iostream>
#include <iomanip>

#include "THnSparseDefinitions.h"
#include "ProgressBar.h"

Bool_t correctedData = kFALSE;

//--------------------------------------------------
Double_t getMedianOfNonZeros(Double_t* input, const Int_t dim)
{
  Double_t values[dim];
  for (Int_t i = 0; i < dim; i++)
    values[i] = 0.0;
    
  Int_t numNonZero = 0;
  
  for (Int_t i = 0; i < dim; i++) {
    if (input[i] > 0) {
      values[numNonZero] = input[i];
      numNonZero++;
    }
  }
  
  return ((numNonZero > 0) ? TMath::Median(numNonZero, values) : 0);
}


//--------------------------------------------------
void prepareHisto(TH2* h)
{
  for (Int_t binX = 1; binX <= h->GetXaxis()->GetNbins(); binX++) {
    
    // Find maximum for fixed x
    Double_t maxBinContent = -1;
    Int_t maxBin = -1;
    for (Int_t binY = 1; binY <= h->GetYaxis()->GetNbins(); binY++) {
      Double_t cont = h->GetBinContent(binX, binY);
      if (cont > maxBinContent) {
        maxBinContent = cont;
        maxBin = binY;
      }
    }
    
    Double_t prevBinContent = -1;
    Double_t currBinContent = -1;
    
    // Start at the maximum, go to the left and remove all bins that fall too steeply (due to TPC cut) by setting large errors
    for (Int_t binY = maxBin; binY >= 1; binY--) {
      currBinContent = h->GetBinContent(binX, binY);
      
      if (currBinContent > 0)   {
        Double_t ratio = prevBinContent / currBinContent;
        
        if (ratio > 5)    {
          for (Int_t binY2 = binY; binY2 >= 1; binY2--) {
            if (h->GetBinContent(binX, binY2) > 0) {
              h->SetBinContent(binX, binY2, 0);
              h->SetBinError(binX, binY2, maxBinContent);
            }
          }
          break;
        }
      }
      
      prevBinContent = currBinContent;
    }
    
    prevBinContent = -1;
    currBinContent = -1;
    
    // Start at the maximum, go to the right and remove all bins that fall too steeply (due to TPC cut) by setting large errors
    for (Int_t binY = maxBin; binY <= h->GetYaxis()->GetNbins(); binY++) {
      currBinContent = h->GetBinContent(binX, binY);
      
      if (currBinContent > 0)   {
        Double_t ratio = prevBinContent / currBinContent;
        
        if (ratio > 5)    {
          for (Int_t binY2 = binY; binY2 <= h->GetYaxis()->GetNbins(); binY2++) {
            if (h->GetBinContent(binX, binY2) > 0) {
              h->SetBinContent(binX, binY2, 0);
              h->SetBinError(binX, binY2, maxBinContent);
            }
          }
          break;
        }
      }
      
      prevBinContent = currBinContent;
    }    
  }
}


//--------------------------------------------------
Bool_t FitHist(TH1 *h, Double_t heightFractionForRange, TString fitOption, Double_t *results, Double_t *resultErrors)
{
  if (!h) return kFALSE;
  if (!results || !resultErrors) return kFALSE;
  
  // Average around maximum bin -> Might catch some outliers
  Int_t maxBin = h->GetMaximumBin();
  Double_t maxVal = h->GetBinContent(maxBin);
  
  if (maxVal < 2) { // It could happen that all entries are in overflow/underflow; don't fit in this case
    return kFALSE;
  }
  
  UChar_t usedBins = 1;
  if (maxBin > 1) {
    maxVal += h->GetBinContent(maxBin - 1);
    usedBins++;
  }
  if (maxBin < h->GetNbinsX()) {
    maxVal += h->GetBinContent(maxBin + 1);
    usedBins++;
  }
  maxVal /= usedBins;
  
  Double_t thresholdFraction = heightFractionForRange * maxVal; 
  Int_t lowThrBin = TMath::Max(1, h->FindFirstBinAbove(thresholdFraction));
  Int_t highThrBin = TMath::Min(h->GetNbinsX(), h->FindLastBinAbove(thresholdFraction));
  
  Double_t lowThreshold = h->GetBinCenter(lowThrBin);
  Double_t highThreshold = h->GetBinCenter(highThrBin);
  
  TFitResultPtr res = h->Fit("gaus", Form("%sS", fitOption.Data()), "", lowThreshold, highThreshold);
  
  if ((Int_t)res == 0) {
    for (Int_t i = 0; i < 3; i++) {
      results[i] = res->GetParams()[i];
      resultErrors[i] = res->GetErrors()[i];
    }
    results[3] = res->Ndf()>0 ? res->Chi2()/res->Ndf() : 0;
    resultErrors[3] = 0;
    
    return kTRUE;
  }
  
  return kFALSE;
}


//--------------------------------------------------
void FitSlicesY(TH2 *hist, Double_t heightFractionForRange, Int_t cutThreshold, TString fitOption, TObjArray *arr)
{
  if (!hist) return;
  if (!arr) return;

  // If old style is to be used
  /*
  hist->FitSlicesY(0, 0, -1, cutThreshold, fitOption.Data(), &array);
  return;
  */
  
  
  arr->Clear();
  arr->SetOwner();
  arr->Expand(4);
  
  TAxis *axis=hist->GetXaxis();
  const TArrayD *bins = axis->GetXbins();
  TH1D** hList = new TH1D*[4];
  
  for (Int_t i = 0; i < 4; i++) {
    delete gDirectory->FindObject(Form("%s_%d", hist->GetName(), i));
    
    if (bins->fN == 0) {
      hList[i] = new TH1D(Form("%s_%d", hist->GetName(), i), i < 3 ? Form("Fitted value of par[%d]", i) : "Chi2/NDF",
                          hist->GetNbinsX(), axis->GetXmin(), axis->GetXmax());
    } else {
      hList[i] = new TH1D(Form("%s_%d", hist->GetName(), i), i < 3 ? Form("Fitted value of par[%d]", i) : "Chi2/NDF", hist->GetNbinsX(), bins->fArray);
    }
    
    (*arr)[i] = hList[i];
  }
  
  Double_t results[4] = {0.0, 0.0, 0.0, 0.0 };
  Double_t resultErrors[4] = {0.0, 0.0, 0.0, 0.0 };
  
  for (Int_t ibin=0, ibin2=axis->GetFirst(); ibin2<=axis->GetLast(); ++ibin2, ++ibin) {
    TH1 *h=hist->ProjectionY("_temp",ibin2,ibin2);
    if (!h)
      continue;
    
    if (h->GetEntries() < cutThreshold) {
      delete h;
      continue;
    }
    
    Bool_t fitSuccessful = FitHist(h, heightFractionForRange, fitOption, results, resultErrors);
    
    if (fitSuccessful) {
      Int_t resBin = ibin2;
      hList[0]->SetBinContent(resBin,results[0]);
      hList[0]->SetBinError(resBin,resultErrors[0]);
      hList[1]->SetBinContent(resBin,results[1]);
      hList[1]->SetBinError(resBin,resultErrors[1]);
      hList[2]->SetBinContent(resBin,results[2]);
      hList[2]->SetBinError(resBin,resultErrors[2]);
      hList[3]->SetBinContent(resBin,results[3]);
    }
    
    delete h;
  }
}


//--------------------------------------------------
/*Obsolete: dEdx is NOT corrected!
TH1D* getSeparation(THnSparse* hist, Bool_t fromV0s, TFile* fSave)
{
  TObjArray arr;
  
  Int_t binIDel = 1;
  if (fromV0s)
    binIDel = 7;
  
  Int_t binIDpi = 4;
  if (fromV0s)
    binIDpi = 8;
  
  //hist->GetAxis(kEta)->SetRangeUser(-0.199, 0.199);
  
  // Select and fit electrons
  hist->GetAxis(kMCpid)->SetRange(binIDel,binIDel); // (V0) electrons
  hist->GetAxis(kSelectSpecies)->SetRange(1,1); // Delta_electron
  
  Int_t referenceAxis = kDeDx;
  
  TH2D* histEl = (TH2D*)hist->Projection(referenceAxis, kPtpcInner);
  histEl->SetName(fromV0s ? "histV0El" : "histEl");
  histEl->GetXaxis()->SetTitle(hist->GetAxis(kPtpcInner)->GetTitle());
  histEl->GetYaxis()->SetTitle(hist->GetAxis(referenceAxis)->GetTitle());
  
  if (!fromV0s)
    prepareHisto(histEl);
  histEl->FitSlicesY(0,0,-1,0,"QNR",&arr); 
  TH1D* hMeanEl = (TH1D*)arr.At(1)->Clone(fromV0s ? "hMeanV0El" : "hMeanEl");
  TH1D* hSigmaEl = (TH1D*)arr.At(2)->Clone(fromV0s ? "hSigmaV0El" : "hSigmaEl");
  TH1D* hChi2El = (TH1D*)arr.At(3)->Clone(fromV0s ? "hChi2V0El" : "hChi2El");

  hMeanEl->GetXaxis()->SetTitle(hist->GetAxis(kPtpcInner)->GetTitle());
  hMeanEl->GetYaxis()->SetTitle("Mean (Gauss)");
  hSigmaEl->GetXaxis()->SetTitle(hist->GetAxis(kPtpcInner)->GetTitle());
  hSigmaEl->GetYaxis()->SetTitle("#sigma (Gauss)");
  hChi2El->GetXaxis()->SetTitle(hist->GetAxis(kPtpcInner)->GetTitle());
  hChi2El->GetYaxis()->SetTitle("#chi^{2}/NDF (Gauss)");
  
  hMeanEl->SetMarkerStyle(20);
  hSigmaEl->SetMarkerStyle(20);
  
  if (fSave)    {
    fSave->cd();
    
    histEl->Write();
  }
  
  delete histEl;

  // Select and fit pions
  hist->GetAxis(kMCpid)->SetRange(binIDpi,binIDpi); // (V0) pions
  hist->GetAxis(kSelectSpecies)->SetRange(3,3); // Delta_pion
  
  TH2D* histPi = (TH2D*)hist->Projection(referenceAxis, kPtpcInner);
  histPi->SetName(fromV0s ? "histV0Pi" : "histPi");
  histPi->GetXaxis()->SetTitle(hist->GetAxis(kPtpcInner)->GetTitle());
  histPi->GetYaxis()->SetTitle(hist->GetAxis(referenceAxis)->GetTitle());
  
  if (!fromV0s)
    prepareHisto(histPi);
  histPi->FitSlicesY(0,0,-1,0,"QNR",&arr);
  TH1D* hMeanPi = (TH1D*)arr.At(1)->Clone(fromV0s ? "hMeanV0Pi" : "hMeanPi");
  TH1D* hSigmaPi = (TH1D*)arr.At(2)->Clone(fromV0s ? "hSigmaV0Pi" : "hSigmaPi");
  TH1D* hChi2Pi = (TH1D*)arr.At(3)->Clone(fromV0s ? "hChi2V0Pi" : "hChi2Pi");
  
  hMeanPi->GetXaxis()->SetTitle(hist->GetAxis(kPtpcInner)->GetTitle());
  hMeanPi->GetYaxis()->SetTitle("Mean (Gauss)");
  hSigmaPi->GetXaxis()->SetTitle(hist->GetAxis(kPtpcInner)->GetTitle());
  hSigmaPi->GetYaxis()->SetTitle("#sigma (Gauss)");
  hChi2Pi->GetXaxis()->SetTitle(hist->GetAxis(kPtpcInner)->GetTitle());
  hChi2Pi->GetYaxis()->SetTitle("#chi^{2}/NDF (Gauss)");
  
  hMeanPi->SetMarkerStyle(20);
  hMeanPi->SetLineColor(kRed);
  hMeanPi->SetMarkerColor(kRed);
  hSigmaPi->SetMarkerStyle(20);
  hSigmaPi->SetLineColor(kRed);
  hSigmaPi->SetMarkerColor(kRed);
  hChi2Pi->SetMarkerStyle(20);
  hChi2Pi->SetLineColor(kRed);
  hChi2Pi->SetMarkerColor(kRed);
  
  // Separation
  
  TH1D* hSeparation= (TH1D*)hMeanEl->Clone(fromV0s ? "hSeparationV0" : "hSeparation"); //to get same binning
  hSeparation->SetMarkerStyle(20);
  hSeparation->GetYaxis()->SetTitle("Separation");

  const Int_t nBins = hMeanEl->GetNbinsX();
  
  Double_t deltaMean[nBins] ;
  Double_t deltaSigma[nBins];
  
  for(Int_t i = 0 ;i < nBins; i++) {
    deltaMean[i] = TMath::Abs(hMeanEl->GetBinContent(i) - hMeanPi->GetBinContent(i));
    deltaSigma[i] = TMath::Abs((hSigmaEl->GetBinContent(i) + hSigmaPi->GetBinContent(i))) / 2.;
    
    if(TMath::Abs(deltaSigma[i]) < 0.000001)
      continue;

    hSeparation->SetBinContent(i, deltaMean[i] / deltaSigma[i]);
  }


  // Reset ranges
  hist->GetAxis(kMCpid)->SetRange(0,-1); 
  hist->GetAxis(kSelectSpecies)->SetRange(0,-1);
  hist->GetAxis(kEta)->SetRange(0, -1);

  if (fSave)    {
    fSave->cd();

    histPi->Write();
    
    hMeanEl->Write();
    hMeanPi->Write();

    hSigmaEl->Write();
    hSigmaPi->Write();
    
    hChi2El->Write();
    hChi2Pi->Write();
    
    hSeparation->Write();
  }
  
  delete histPi;

  return hSeparation;
}
*/

//--------------------------------------------------
Int_t checkShapeEta(TString path = ".", Int_t multiplicityStepSize = -1/*-1 for all multiplicities*/,
                    Int_t maxMultiplicity = 20000,
                    Int_t onlyEtaShapeComparison = 0, TString fileName = "bhess_PIDetaAdv.root", 
                    TString listName = "bhess_PIDetaAdv", Int_t momentumAxis = kPtpcInner/* = kPt*/) { 
			       
  Double_t binWidthsPt[nPtBins];
  for (Int_t i = 0; i < nPtBins; i++) 
    binWidthsPt[i] = (binsPt[i + 1] - binsPt[i]) / 2.;

  Int_t cutForFitting = 10;
  Double_t heightFractionForFittingRange = 0.1;
  
  TList* histList = 0x0;
  
	TFile* f = TFile::Open(Form("%s/%s", path.Data(), fileName.Data()));
  if (!f)  {
    std::cout << "Failed to open file \"" << Form("%s/%s", path.Data(), fileName.Data()) << "\"!" << std::endl;
    return -1;
  }
  
  THnSparse* hPIDdata = 0x0;
  
  if (correctedData) {
    hPIDdata = dynamic_cast<THnSparse*>(f->Get("hPIDdataCorrected"));
    if (!hPIDdata) {
      std::cout << "Failed to load (extracted) data histo!" << std::endl;
      return -1;
    }
  }
  else  {
    histList = (TList*)(f->Get(listName.Data()));
    if (!histList) {
      std::cout << "Failed to load list \"" << listName.Data() << "\"!" << std::endl;
      return -1;
    }
    
    // Extract the data histogram
    hPIDdata = dynamic_cast<THnSparse*>(histList->FindObject("hPIDdataAll"));
    if (!hPIDdata) {
      hPIDdata = dynamic_cast<THnSparse*>(f->Get(Form("%s/hPIDdataAll", listName.Data())));
      if (!hPIDdata)  {
        std::cout << "Failed to load data histo!" << std::endl;
        return -1;
      }
    }
  }
  
  // Set proper errors
  hPIDdata->Sumw2();
  Long64_t nBinsTHnSparse = hPIDdata->GetNbins();
  Double_t binContent = 0;
  
  for (Long64_t bin = 0; bin < nBinsTHnSparse; bin++) {
    binContent = hPIDdata->GetBinContent(bin);
    hPIDdata->SetBinError(bin, TMath::Sqrt(binContent));
  }
  
  // Output file
  TDatime daTime;
  TString saveFileName = Form("outputCheckShapeEtaAdv_%04d_%02d_%02d__%02d_%02d.root", daTime.GetYear(), daTime.GetMonth(), 
                              daTime.GetDay(), daTime.GetHour(), daTime.GetMinute());
            
  TFile* fSave = TFile::Open(Form("%s/%s", path.Data(), saveFileName.Data()), "recreate");
  if (!fSave) {
    std::cout << "Failed to open save file \"" << Form("%s/%s", path.Data(), saveFileName.Data()) << "\"!" << std::endl;
    return -1;
  }
  
  // p dependece of eta dependence
  Bool_t first = kTRUE;
  
  Int_t momLow = 1;// = 1 or 7 or 21
  Int_t momHigh = hPIDdata->GetAxis(momentumAxis)->GetNbins();//;24 or 40 or hPIDdata->GetAxis(momentumAxis)->GetNbins()
  std::cout << "Momentum range: ";
  std::cout << hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momLow) << " - " << hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momHigh);
  std::cout << std::endl;
  
  //TF1* constantFunc = new TF1("constantFunc", "1", -2, +2);
  
  const Int_t nModes = 3;
  TString mode[nModes] = {"dE/dx", "Delta_{Species}", "Delta'_{Species}"};
  Int_t dataAxis[nModes] = {0/*kDeDx*/, 0/*kDelta*/, kDeltaPrime};
  
  
  
  if (onlyEtaShapeComparison > 0) {
    // Check, if there is a dependence on the species and/or p directly by choosing momentum bins with equal dE/dx for
    // different species and plotting Delta vs eta etc.  
    
    
    for (onlyEtaShapeComparison = 1; onlyEtaShapeComparison <= 3; onlyEtaShapeComparison++) { 
      TCanvas* canvSpecific = new TCanvas(Form("EtaDependenceOfDifferentSpeciesAtSamedEdx_%d", onlyEtaShapeComparison), 
                                          "#eta dependence of different species at same dE/dx",
                                          100, 10, 1380 / 2, 700);
      
      canvSpecific->SetRightMargin(0.001);
      canvSpecific->SetTopMargin(0.01);
      canvSpecific->SetLeftMargin(0.18);
      canvSpecific->SetBottomMargin(0.11);
      Int_t speciesColour[6] = { 4, 1, 3, 2, 6, 7 };
      
      Int_t momPions = -1;
      //Int_t momPions2 = hPIDdata->GetAxis(momentumAxis)->FindBin(4.0);
      //Int_t momPions3 = hPIDdata->GetAxis(momentumAxis)->FindBin(7.0);
      Int_t momElectrons = -1; 
      
      Int_t momProtons = -1;
      Int_t momKaons = -1;
      
      Int_t dEdx = -1;
      
      if (onlyEtaShapeComparison == 1)  {// For dE/dx about 50
        momProtons = hPIDdata->GetAxis(momentumAxis)->FindBin(2.7);
        momKaons = hPIDdata->GetAxis(momentumAxis)->FindBin(1.3);
        momPions = hPIDdata->GetAxis(momentumAxis)->FindBin(0.45);
        dEdx = 50;
      }
      else if (onlyEtaShapeComparison == 2)  {// For dE/dx about 75
        momProtons = hPIDdata->GetAxis(momentumAxis)->FindBin(1.0);
        momKaons = hPIDdata->GetAxis(momentumAxis)->FindBin(0.5);
        momElectrons = hPIDdata->GetAxis(momentumAxis)->FindBin(0.6);
        dEdx = 75;
      }
      else if (onlyEtaShapeComparison == 3)  {// For dE/dx about 60
        momProtons = hPIDdata->GetAxis(momentumAxis)->FindBin(1.4);
        momKaons = hPIDdata->GetAxis(momentumAxis)->FindBin(0.735);
        // Sample not clean and V0 pi don't have sufficient statistics momPions = hPIDdata->GetAxis(momentumAxis)->FindBin(3.9);
        dEdx = 60;
      }
      else if (onlyEtaShapeComparison == 4)  {// For dE/dx about 100
        momProtons = hPIDdata->GetAxis(momentumAxis)->FindBin(0.8);
        momKaons = hPIDdata->GetAxis(momentumAxis)->FindBin(0.4);
        dEdx = 100;
      }
      else  {
        std::cout << "Eta shape comparison not defined for this value!" << std::endl;
        return -1;
      }
      
      
      /*
      canvSpecific->Divide(3,1, 0.01, 0.01);
      
      Double_t x1, x2, y1, y2;
      
      for (Int_t  i = 1; i <= 3; i++) {
        x1 = 0. + (i-1) * 1./3.;
        y1 = 0.85;
        x2 = x1 + 1./3.;
        y2 = 0.; 
            
        canvSpecific->GetPad(i)->SetPad(x1, y1, x2, y2);
      }*/
      
      
      /*Definitions from ADV task (18.04.14)
      hist->GetAxis(0)->SetBinLabel(1, "e");
      hist->GetAxis(0)->SetBinLabel(2, "K");
      hist->GetAxis(0)->SetBinLabel(3, "#mu");
      hist->GetAxis(0)->SetBinLabel(4, "#pi");
      hist->GetAxis(0)->SetBinLabel(5, "p");
      hist->GetAxis(0)->SetBinLabel(6, "V0+TOF e");
      hist->GetAxis(0)->SetBinLabel(7, "V0 e");
      hist->GetAxis(0)->SetBinLabel(8, "V0 #pi");
      hist->GetAxis(0)->SetBinLabel(9, "V0 p");

      hist->GetAxis(1)->SetTitle("Select Species");
      hist->GetAxis(1)->SetBinLabel(1, "e");
      hist->GetAxis(1)->SetBinLabel(2, "K");
      hist->GetAxis(1)->SetBinLabel(3, "#pi");
      hist->GetAxis(1)->SetBinLabel(4, "p");
      */
      
      TLegend* legendSpecific = new TLegend(0.62, 0.76, 0.95, 0.95);    
      //legendSpecific->SetNColumns(2);
      legendSpecific->SetBorderSize(0);
      legendSpecific->SetFillColor(0);
        
      Bool_t isFirst = kTRUE;
      
      Int_t i = 2; //Delta'
      
      for (Int_t species = 1; species <= 4/*6*/; species++) {
        TString histTitle = "";
        // Select particle species and corresponding deltaSpecies
        if (species == 1) {// Electrons
          if (momElectrons < 0)
            continue;
          hPIDdata->GetAxis(kMCpid)->SetRange(1,1); // Only particles of species X
          hPIDdata->GetAxis(momentumAxis)->SetRange(momElectrons, momElectrons);
          hPIDdata->GetAxis(kSelectSpecies)->SetRange(1,1); 
          histTitle = Form("e, %.2f #leq p (GeV/c) #leq %.2f", 
                            hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momElectrons),
                            hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momElectrons));
        }
        else if (species == 2) {// Kaons
          hPIDdata->GetAxis(kMCpid)->SetRange(2,2); // Only particles of species X
          hPIDdata->GetAxis(momentumAxis)->SetRange(momKaons, momKaons);
          hPIDdata->GetAxis(kSelectSpecies)->SetRange(2,2); 
          histTitle = Form("K, %.2f #leq p (GeV/c) #leq %.2f", 
                            hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momKaons),
                            hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momKaons));
        }
        else if (species == 3) {// Pions
          if (momPions < 0)
            continue;
          hPIDdata->GetAxis(kMCpid)->SetRange(4,4); // Only particles of species X
          hPIDdata->GetAxis(momentumAxis)->SetRange(momPions, momPions);
          hPIDdata->GetAxis(kSelectSpecies)->SetRange(3,3);
          histTitle = Form("#pi, %.2f #leq p (GeV/c) #leq %.2f", 
                            hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momPions),
                            hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momPions));
        }
        else if (species == 4) {// Protons
          hPIDdata->GetAxis(kMCpid)->SetRange(5,5); // Only particles of species X
          hPIDdata->GetAxis(momentumAxis)->SetRange(momProtons, momProtons);
          hPIDdata->GetAxis(kSelectSpecies)->SetRange(4,4);
          histTitle = Form("p, %.2f #leq p (GeV/c) #leq %.2f", 
                            hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momProtons),
                            hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momProtons));
        }/*
        else if (species == 5) {// Pions at higher momentum
          hPIDdata->GetAxis(kMCpid)->SetRange(4,4); // Only particles of species X
          hPIDdata->GetAxis(momentumAxis)->SetRange(momPions2, momPions2);
          hPIDdata->GetAxis(kSelectSpecies)->SetRange(3,3);
        }
        else if (species == 6) {// Pions at even higher momentum
          hPIDdata->GetAxis(kMCpid)->SetRange(4,4); // Only particles of species X
          hPIDdata->GetAxis(momentumAxis)->SetRange(momPions3, momPions3);
          hPIDdata->GetAxis(kSelectSpecies)->SetRange(3,3);
        }*/
        
        
        TH2D* hEta = hPIDdata->Projection(dataAxis[i], kEta);
        hEta->Rebin2D(2, 1);
        hEta->SetName(Form("hEta_%s_%d_%d", mode[i].Data(), onlyEtaShapeComparison, species));
        hEta->SetTitle(Form("Eta dependence of %s for %s", mode[i].Data(),  hPIDdata->GetAxis(kMCpid)->GetBinLabel(species)));
      
        TObjArray aSlices;
        FitSlicesY(hEta, heightFractionForFittingRange, cutForFitting, "QNR", &aSlices);
        TH1D* hEtaProj = (TH1D*)(aSlices.At(1)->Clone(Form("hEtaProj_%s_%d_%d", mode[i].Data(), onlyEtaShapeComparison, species)));
        hEtaProj->SetMarkerStyle(20 + species - 1);
        hEtaProj->SetTitle(histTitle.Data());
        hEtaProj->SetLineColor(speciesColour[species - 1]);
        hEtaProj->SetMarkerColor(speciesColour[species - 1]);
        
        hEtaProj->GetXaxis()->SetTitle(hPIDdata->GetAxis(kEta)->GetTitle());
        
        // Scale to unity
        Double_t integral = 0;
        Double_t unityIntegral = 0;
        for (Int_t j = 1; j <= hEtaProj->GetNbinsX(); j++) {
          if (hEtaProj->GetBinContent(j) > 0) {
            // Remove bins with too large error
            if (hEtaProj->GetBinError(j) > 0.005) {
              hEtaProj->SetBinContent(j, -1);
              continue;
            }
            
            unityIntegral += 1;//hEtaProj->GetXaxis()->GetBinWidth(j);
            integral += hEtaProj->GetBinContent(j);
          }
        }
        hEtaProj->Scale(unityIntegral/integral);
        
        hEtaProj->SetStats(kFALSE);
        hEtaProj->GetYaxis()->SetRangeUser(0.97,1.059);
        hEtaProj->GetYaxis()->SetTitle("#Delta'_{#lower[-0.5]{scaled}}");
        hEtaProj->GetYaxis()->SetTitleOffset(1.4);
        
        hEtaProj->DrawCopy(Form("%s", (isFirst ? "" : "same")));
        isFirst = kFALSE;
        
        legendSpecific->AddEntry(hEtaProj, hEtaProj->GetTitle(), "flp");
        
        //hEtaProj->Fit("pol3", "+", "same", -1, 0);
        //hEtaProj->Fit("pol3", "+", "same", 0, 1);
        //((TF1*)hEtaProj->GetListOfFunctions()->At(0))->SetLineColor(species);
        //((TF1*)hEtaProj->GetListOfFunctions()->At(1))->SetLineColor(species);
      }
      
      legendSpecific->Draw();
      
      ClearTitleFromHistoInCanvas(canvSpecific);
      
      //canvSpecific->cd(0);
      /*
      TLegend* legendSpecific = new TLegend(0.1, 0.85, 0.9, 0.99);    
      legendSpecific->SetNColumns(2);
      legendSpecific->SetBorderSize(0);
      legendSpecific->SetFillColor(0);
      
      
      TLegendEntry* ent = legendSpecific->AddEntry((TObject*)0, path.Data(), "");
      ent->SetTextColor(1);
      
      ent = legendSpecific->AddEntry((TObject*)0, "", "");
      
      ent = legendSpecific->AddEntry((TObject*)0, Form("K, %.2f #leq p (GeV/c) #leq %.2f", 
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momKaons),
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momKaons)),
                                    "p");
      ent->SetLineColor(speciesColour[1]);
      ent->SetTextColor(speciesColour[1]);
      ent->SetMarkerColor(speciesColour[1]);
      ent->SetMarkerStyle(2);
      ent->SetMarkerSize(2);
      
      ent = legendSpecific->AddEntry((TObject*)0, Form("e, %.2f #leq p (GeV/c) #leq %.2f", 
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momElectrons),
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momElectrons)),
                                    "p");
      ent->SetLineColor(speciesColour[0]);
      ent->SetTextColor(speciesColour[0]);
      ent->SetMarkerColor(speciesColour[0]);
      ent->SetMarkerStyle(2);
      ent->SetMarkerSize(2);
        
      ent = legendSpecific->AddEntry((TObject*)0, Form("p, %.2f #leq p (GeV/c) #leq %.2f", 
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momProtons),
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momProtons)),
                                    "p");
      ent->SetLineColor(speciesColour[3]);
      ent->SetTextColor(speciesColour[3]);
      ent->SetMarkerColor(speciesColour[3]);
      ent->SetMarkerStyle(2);
      ent->SetMarkerSize(2);
      
      ent = legendSpecific->AddEntry((TObject*)0, Form("#pi, %.2f #leq p (GeV/c) #leq %.2f", 
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momPions),
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momPions)),
                                    "p");
      ent->SetLineColor(speciesColour[2]);
      ent->SetTextColor(speciesColour[2]);
      ent->SetMarkerColor(speciesColour[2]);
      ent->SetMarkerStyle(2);
      ent->SetMarkerSize(2);
      
      ent = legendSpecific->AddEntry((TObject*)0, Form("V0 #pi, %.2f #leq p (GeV/c) #leq %.2f", 
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momPions2),
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momPions2)),
                                    "p");
      ent->SetLineColor(speciesColour[4]);
      ent->SetTextColor(speciesColour[4]);
      ent->SetMarkerColor(speciesColour[4]);
      ent->SetMarkerStyle(2);
      ent->SetMarkerSize(2);
      
      ent = legendSpecific->AddEntry((TObject*)0, Form("V0 #pi, %.2f #leq p (GeV/c) #leq %.2f", 
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinLowEdge(momPions3),
                                                      hPIDdata->GetAxis(momentumAxis)->GetBinUpEdge(momPions3)),
                                    "p");
      ent->SetLineColor(speciesColour[5]);
      ent->SetTextColor(speciesColour[5]);
      ent->SetMarkerColor(speciesColour[5]);
      ent->SetMarkerStyle(2);
      ent->SetMarkerSize(2);
        
      legendSpecific->Draw("");
      */
      fSave->cd();
      canvSpecific->Write();
      TString pdfName = saveFileName;
      pdfName = pdfName.ReplaceAll(".root", Form("__dEdx_%d.pdf", dEdx));
      canvSpecific->SaveAs(Form("%s/%s", path.Data(), pdfName.Data()));
    }
    
    return 0;
  }
  
  // Reset ranges
  hPIDdata->GetAxis(kMCpid)->SetRange(0, -1);
  hPIDdata->GetAxis(momentumAxis)->SetRange(0, -1);
  hPIDdata->GetAxis(kSelectSpecies)->SetRange(0, -1);
  
  
  
  
  
  
  /*
  getSeparation(hPIDdata, kFALSE, fSave);
  getSeparation(hPIDdata, kTRUE, fSave);
  return 0;*/
  
  // If V0s are available in histo, add them! Also: Backward compatibility to data type with "all id. primaries" bin instead of "V0plusTOF el"
  Int_t additionalV0bins = 0;
  
  Bool_t oldStyleWithAllIDprimaries = strcmp(hPIDdata->GetAxis(kMCpid)->GetBinLabel(6), "all id. primaries") == 0;
  printf("Backward compatibility: Checking bin label of bin 6 of MCpid axis: %s -> %s\n",
         hPIDdata->GetAxis(kMCpid)->GetBinLabel(6), oldStyleWithAllIDprimaries ? "Old style" : "New style");
  
  if (hPIDdata->GetAxis(kMCpid)->GetNbins() >= 8)
    additionalV0bins = oldStyleWithAllIDprimaries ? 3 : 4;
  
  // If valid multiplicityStepSize, fill each multiplicity bin + 1 bin with all multiplicities. Otherwise: Only bin with all multiplicities
  const Int_t nMultBins = (multiplicityStepSize <= 0) ? 1 :
                          (((Int_t)((Double_t)maxMultiplicity / multiplicityStepSize)) + ((maxMultiplicity % multiplicityStepSize) != 0) + 1);
  
  const Int_t nSpeciesBins = (oldStyleWithAllIDprimaries ? 6 : 5) + additionalV0bins;
  TH2D* hPEtaDependence[nMultBins][nSpeciesBins];
  
  TH1D* hPMeandEdxDependence[nMultBins][nSpeciesBins];
  
  const Int_t numTotalBins = (momHigh - momLow + 1) * (4 + additionalV0bins) * nMultBins; // nMomBins * nSpecies * nMultBins
  
  for (Int_t i = 0; i < nMultBins; i++) {
    TString currDir = (i == nMultBins - 1) ? "AllMultiplicites" : 
                      Form("Multiplicity%d_%d", i * multiplicityStepSize, TMath::Min(maxMultiplicity, (i + 1) * multiplicityStepSize));
    
    TString multTitle = (i == nMultBins - 1) ? "all multiplicites" :
                        Form("multiplicity %d - %d", i * multiplicityStepSize, TMath::Min(maxMultiplicity, (i + 1) * multiplicityStepSize));
                        
    fSave->cd();
    fSave->mkdir(currDir.Data());
    // nSpeciesBins + 1 to take into account bin "all primaries"
    for (Int_t species = 1, deltaSpecies = 1; species < nSpeciesBins + 1; species++, deltaSpecies++) {
      if (species == 3) {
        deltaSpecies--;
        continue; // skip muons
      }
      else if (species == 6)    {
        if (oldStyleWithAllIDprimaries) {
          continue; // skip bin "all primaries"
        }
        else {
          deltaSpecies = 1; // V0+TOF el
        }
      }
      else if (species == 7)    {
        deltaSpecies = 1; // V0 el
      }
      else if (species == 8)    {
        deltaSpecies = 3; // V0 pi
      }
      else if (species == 9)    {
        deltaSpecies = 4; // V0 pr
      }
      
      first = kTRUE;
      
      hPMeandEdxDependence[i][species - 1] = new TH1D(Form("hPMeandEdxDependenceDeltaPrime_%s_%s", partShortName[species - 1].Data(), currDir.Data()), 
                                                      Form("Momentum dependence of mean dEdx (Delta'_{Species}) of %s, %s",
                                                           partShortName[species - 1].Data(), multTitle.Data()),
                                                           nPtBins, binsPt); 
      
      hPMeandEdxDependence[i][species - 1]->GetXaxis()->SetTitle(hPIDdata->GetAxis(momentumAxis)->GetTitle());
      hPMeandEdxDependence[i][species - 1]->GetYaxis()->SetTitle("#Delta'");
      
      
      
      
      hPEtaDependence[i][species - 1] = new TH2D(Form("hPEtaDependence_species_DeltaPrime_%s_%s", partShortName[species - 1].Data(), currDir.Data()), 
                                                 Form("Momentum dependence of eta dependence (#Delta'_{Species}) of %s, %s",
                                                      partShortName[species - 1].Data(), multTitle.Data()),
                                                 nPtBins, binsPt, 
                                                 hPIDdata->GetAxis(kEta)->GetNbins(), hPIDdata->GetAxis(kEta)->GetBinLowEdge(1),
                                                 hPIDdata->GetAxis(kEta)->GetBinUpEdge(hPIDdata->GetAxis(kEta)->GetNbins())); 
      
      hPEtaDependence[i][species - 1]->GetXaxis()->SetTitle(hPIDdata->GetAxis(momentumAxis)->GetTitle());
      hPEtaDependence[i][species - 1]->GetYaxis()->SetTitle(hPIDdata->GetAxis(kEta)->GetTitle());
      hPEtaDependence[i][species - 1]->GetYaxis()->SetLabelSize(0.03);
      hPEtaDependence[i][species - 1]->GetYaxis()->SetTitleOffset(0.9);
      hPEtaDependence[i][species - 1]->GetXaxis()->SetTitleOffset(1.2);
      hPEtaDependence[i][species - 1]->GetZaxis()->SetTitle("#Delta'");
      hPEtaDependence[i][species - 1]->GetZaxis()->SetTitleOffset(0.8);
      
      TH2D* hPEtaDependenceScaled = (TH2D*)hPEtaDependence[i][species - 1]->Clone(Form("%s_scaled", hPEtaDependence[i][species - 1]->GetName())); 
      hPEtaDependenceScaled->SetTitle(Form("%s (scaled)", hPEtaDependenceScaled->GetTitle()));
      
      hPIDdata->GetAxis(kMCpid)->SetRange(species,species); // Only particles of type X
      hPIDdata->GetAxis(kSelectSpecies)->SetRange(deltaSpecies,deltaSpecies); // Seclect corresponding deltaSpecies
      // Seclect corresponding multiplicity range (last bin (or the only bin) = all multiplicities)
      if (i == nMultBins - 1)
        hPIDdata->GetAxis(kMultiplicity)->SetRange(0, -1); // All multiplicities
      else
        hPIDdata->GetAxis(kMultiplicity)->SetRangeUser(i * multiplicityStepSize, TMath::Min(maxMultiplicity, (i + 1) * multiplicityStepSize)); 
      
      hPIDdata->GetAxis(momentumAxis)->SetRange(0, -1); // Full momentum range
      TH3D* h3Dproj = hPIDdata->Projection(momentumAxis, kDeltaPrime, kEta);
      
      for (Int_t momentum_Bin = momLow; momentum_Bin <= momHigh; momentum_Bin++)  {
        h3Dproj->GetXaxis()->SetRange(momentum_Bin, momentum_Bin); // Select p/pT bin
        
        TH1D* hMeandEdx = (TH1D*)h3Dproj->Project3D("y");
        hMeandEdx->SetName(Form("hMeandEdx_DeltaPrime_%s_%d_%d", partShortName[species - 1].Data(), momentum_Bin, i));
        hMeandEdx->SetTitle(Form("p dependence of mean dEdx of #Delta'_{Species} for %s (p %.3f), %s",
                            hPIDdata->GetAxis(kMCpid)->GetBinLabel(species), hPIDdata->GetAxis(momentumAxis)->GetBinCenter(momentum_Bin),
                            multTitle.Data()));
        
        Double_t results[4] = {0.0, 0.0, 0.0, 0.0 };
        Double_t resultErrors[4] = {0.0, 0.0, 0.0, 0.0 };
  
        Bool_t meandEdxFitSuccessful = FitHist(hMeandEdx, heightFractionForFittingRange, "QN", results, resultErrors);
        if (meandEdxFitSuccessful) {
          hPMeandEdxDependence[i][species - 1]->SetBinContent(momentum_Bin, results[1]);
          hPMeandEdxDependence[i][species - 1]->SetBinError(momentum_Bin, resultErrors[1]);
        }
        
        TH2D* hEta = (TH2D*)h3Dproj->Project3D("yz");
        hEta->SetName(Form("hEta_DeltaPrime_%d_%d_%d", species, momentum_Bin, i));
        
        hEta->SetTitle(Form("p dependence of eta dependence of #Delta' for %s (p %.3f), %s",
                            hPIDdata->GetAxis(kMCpid)->GetBinLabel(species), hPIDdata->GetAxis(momentumAxis)->GetBinCenter(momentum_Bin),
                            multTitle.Data()));
                    
        TObjArray aSlices;
        FitSlicesY(hEta, heightFractionForFittingRange, cutForFitting, "QN", &aSlices);
        
        TH1D* hEtaProj = (TH1D*)(aSlices.At(1)->Clone(Form("hEtaProj_DeltaPrime_%s_p_%.3f", partShortName[species - 1].Data(), 
                                                           hPIDdata->GetAxis(momentumAxis)->GetBinCenter(momentum_Bin))));
        
        if (!hEtaProj)  {
          std::cout << "Failed to load eta projection from FitSlicesY!" << std::endl;
          return -1;
        }
        
        first = kFALSE;
        
        for (Int_t etaBin = 1; etaBin <= hEtaProj->GetXaxis()->GetNbins(); etaBin++)  {
          hPEtaDependence[i][species - 1]->SetBinContent(momentum_Bin, etaBin, hEtaProj->GetBinContent(etaBin));
          hPEtaDependence[i][species - 1]->SetBinError(momentum_Bin, etaBin, hEtaProj->GetBinError(etaBin));
        }
                
        Int_t nBinsFinishedMomentum = (momentum_Bin - momLow + 1);
        Int_t numSpecies = species;
        if (species > 3)
          numSpecies--; // Muons not used
          
        if (oldStyleWithAllIDprimaries && species > 6)
          numSpecies--; // All primaries not used
        Int_t nBinsFinishedSpecies = (numSpecies - 1) * (momHigh - momLow + 1);
        Int_t nBinsFinishedMult = i * (4 + additionalV0bins) * (momHigh - momLow + 1);
        
        delete hMeandEdx;
        delete hEta;
        delete hEtaProj;
        
        progressbar(100. * ( ((Double_t) (nBinsFinishedMomentum + nBinsFinishedSpecies + nBinsFinishedMult)) / numTotalBins));
        
      }
      
      delete h3Dproj;
      
      hPEtaDependence[i][species - 1]->GetXaxis()->SetRangeUser(0.15, 5.0);
      hPEtaDependence[i][species - 1]->GetZaxis()->SetRangeUser(0.9, 1.1);
      
      fSave->cd(currDir.Data());
      if (hPEtaDependence[i][species - 1]) {
        hPEtaDependence[i][species - 1]->SetObjectStat(0);
        hPEtaDependence[i][species - 1]->Write();
      }
      
      if (hPMeandEdxDependence[i][species - 1]) {
        hPMeandEdxDependence[i][species - 1]->GetXaxis()->SetRangeUser(0.15, 5.0);
        hPMeandEdxDependence[i][species - 1]->GetYaxis()->SetRangeUser(0.9, 1.1);
        hPMeandEdxDependence[i][species - 1]->Write();
      }
      
      // Scale histograms 
      const Int_t nEtaBins = hPEtaDependence[i][species - 1]->GetYaxis()->GetNbins();
                              
      for (Int_t momentum_Bin = momLow; momentum_Bin <= momHigh; momentum_Bin++)  {
                
        // Scale such that radially emitted particles have deltaPrime equal 1!!
        // To be robust against fluctuations: Take median of a few eta bins around eta=0 for scaling
        Double_t values[nEtaBins];
        for (Int_t etaBin = 1; etaBin <= nEtaBins; etaBin++)
          values[etaBin - 1] = 0;
          
        for (Int_t etaBin = hPEtaDependence[i][species - 1]->GetYaxis()->FindBin(-0.175); 
                  etaBin <= hPEtaDependence[i][species - 1]->GetYaxis()->FindBin(+0.175); etaBin++)  {
          Double_t temp = hPEtaDependence[i][species - 1]->GetBinContent(momentum_Bin, etaBin);
          values[etaBin - 1] = (temp > 0) ? temp : 0;
        }
        
        Double_t temp = getMedianOfNonZeros(values, nEtaBins);
        
        if (temp <= 0) 
          continue;
        
        Double_t scale = 1. / temp;
        
        for (Int_t etaBin = 1; etaBin <= nEtaBins; etaBin++)  {
          hPEtaDependenceScaled->SetBinContent(momentum_Bin, etaBin, 
                                                scale * hPEtaDependence[i][species - 1]->GetBinContent(momentum_Bin, etaBin));
          hPEtaDependenceScaled->SetBinError(momentum_Bin, etaBin, 
                                              scale * hPEtaDependence[i][species - 1]->GetBinError(momentum_Bin, etaBin));
        }
      }
      
      hPEtaDependenceScaled->GetXaxis()->SetRangeUser(0.15, 5.0);
      fSave->cd(currDir.Data());
      hPEtaDependenceScaled->SetDrawOption("surf1");
      hPEtaDependenceScaled->Write();
      
      delete hPEtaDependenceScaled;
    }
  }
  
  // Reset ranges
  hPIDdata->GetAxis(kMCpid)->SetRange(0, -1);
  hPIDdata->GetAxis(momentumAxis)->SetRange(0, -1);
  hPIDdata->GetAxis(kSelectSpecies)->SetRange(0, -1);
  hPIDdata->GetAxis(kMultiplicity)->SetRange(0, -1);
  
  progressbar(100.);
  printf("\n");

  /*
  printf("Determining separation...\n");

  getSeparation(hPIDdata, kFALSE, fSave);
  getSeparation(hPIDdata, kTRUE, fSave);
  */
  return 0; 
}
 checkShapeEta.C:1
 checkShapeEta.C:2
 checkShapeEta.C:3
 checkShapeEta.C:4
 checkShapeEta.C:5
 checkShapeEta.C:6
 checkShapeEta.C:7
 checkShapeEta.C:8
 checkShapeEta.C:9
 checkShapeEta.C:10
 checkShapeEta.C:11
 checkShapeEta.C:12
 checkShapeEta.C:13
 checkShapeEta.C:14
 checkShapeEta.C:15
 checkShapeEta.C:16
 checkShapeEta.C:17
 checkShapeEta.C:18
 checkShapeEta.C:19
 checkShapeEta.C:20
 checkShapeEta.C:21
 checkShapeEta.C:22
 checkShapeEta.C:23
 checkShapeEta.C:24
 checkShapeEta.C:25
 checkShapeEta.C:26
 checkShapeEta.C:27
 checkShapeEta.C:28
 checkShapeEta.C:29
 checkShapeEta.C:30
 checkShapeEta.C:31
 checkShapeEta.C:32
 checkShapeEta.C:33
 checkShapeEta.C:34
 checkShapeEta.C:35
 checkShapeEta.C:36
 checkShapeEta.C:37
 checkShapeEta.C:38
 checkShapeEta.C:39
 checkShapeEta.C:40
 checkShapeEta.C:41
 checkShapeEta.C:42
 checkShapeEta.C:43
 checkShapeEta.C:44
 checkShapeEta.C:45
 checkShapeEta.C:46
 checkShapeEta.C:47
 checkShapeEta.C:48
 checkShapeEta.C:49
 checkShapeEta.C:50
 checkShapeEta.C:51
 checkShapeEta.C:52
 checkShapeEta.C:53
 checkShapeEta.C:54
 checkShapeEta.C:55
 checkShapeEta.C:56
 checkShapeEta.C:57
 checkShapeEta.C:58
 checkShapeEta.C:59
 checkShapeEta.C:60
 checkShapeEta.C:61
 checkShapeEta.C:62
 checkShapeEta.C:63
 checkShapeEta.C:64
 checkShapeEta.C:65
 checkShapeEta.C:66
 checkShapeEta.C:67
 checkShapeEta.C:68
 checkShapeEta.C:69
 checkShapeEta.C:70
 checkShapeEta.C:71
 checkShapeEta.C:72
 checkShapeEta.C:73
 checkShapeEta.C:74
 checkShapeEta.C:75
 checkShapeEta.C:76
 checkShapeEta.C:77
 checkShapeEta.C:78
 checkShapeEta.C:79
 checkShapeEta.C:80
 checkShapeEta.C:81
 checkShapeEta.C:82
 checkShapeEta.C:83
 checkShapeEta.C:84
 checkShapeEta.C:85
 checkShapeEta.C:86
 checkShapeEta.C:87
 checkShapeEta.C:88
 checkShapeEta.C:89
 checkShapeEta.C:90
 checkShapeEta.C:91
 checkShapeEta.C:92
 checkShapeEta.C:93
 checkShapeEta.C:94
 checkShapeEta.C:95
 checkShapeEta.C:96
 checkShapeEta.C:97
 checkShapeEta.C:98
 checkShapeEta.C:99
 checkShapeEta.C:100
 checkShapeEta.C:101
 checkShapeEta.C:102
 checkShapeEta.C:103
 checkShapeEta.C:104
 checkShapeEta.C:105
 checkShapeEta.C:106
 checkShapeEta.C:107
 checkShapeEta.C:108
 checkShapeEta.C:109
 checkShapeEta.C:110
 checkShapeEta.C:111
 checkShapeEta.C:112
 checkShapeEta.C:113
 checkShapeEta.C:114
 checkShapeEta.C:115
 checkShapeEta.C:116
 checkShapeEta.C:117
 checkShapeEta.C:118
 checkShapeEta.C:119
 checkShapeEta.C:120
 checkShapeEta.C:121
 checkShapeEta.C:122
 checkShapeEta.C:123
 checkShapeEta.C:124
 checkShapeEta.C:125
 checkShapeEta.C:126
 checkShapeEta.C:127
 checkShapeEta.C:128
 checkShapeEta.C:129
 checkShapeEta.C:130
 checkShapeEta.C:131
 checkShapeEta.C:132
 checkShapeEta.C:133
 checkShapeEta.C:134
 checkShapeEta.C:135
 checkShapeEta.C:136
 checkShapeEta.C:137
 checkShapeEta.C:138
 checkShapeEta.C:139
 checkShapeEta.C:140
 checkShapeEta.C:141
 checkShapeEta.C:142
 checkShapeEta.C:143
 checkShapeEta.C:144
 checkShapeEta.C:145
 checkShapeEta.C:146
 checkShapeEta.C:147
 checkShapeEta.C:148
 checkShapeEta.C:149
 checkShapeEta.C:150
 checkShapeEta.C:151
 checkShapeEta.C:152
 checkShapeEta.C:153
 checkShapeEta.C:154
 checkShapeEta.C:155
 checkShapeEta.C:156
 checkShapeEta.C:157
 checkShapeEta.C:158
 checkShapeEta.C:159
 checkShapeEta.C:160
 checkShapeEta.C:161
 checkShapeEta.C:162
 checkShapeEta.C:163
 checkShapeEta.C:164
 checkShapeEta.C:165
 checkShapeEta.C:166
 checkShapeEta.C:167
 checkShapeEta.C:168
 checkShapeEta.C:169
 checkShapeEta.C:170
 checkShapeEta.C:171
 checkShapeEta.C:172
 checkShapeEta.C:173
 checkShapeEta.C:174
 checkShapeEta.C:175
 checkShapeEta.C:176
 checkShapeEta.C:177
 checkShapeEta.C:178
 checkShapeEta.C:179
 checkShapeEta.C:180
 checkShapeEta.C:181
 checkShapeEta.C:182
 checkShapeEta.C:183
 checkShapeEta.C:184
 checkShapeEta.C:185
 checkShapeEta.C:186
 checkShapeEta.C:187
 checkShapeEta.C:188
 checkShapeEta.C:189
 checkShapeEta.C:190
 checkShapeEta.C:191
 checkShapeEta.C:192
 checkShapeEta.C:193
 checkShapeEta.C:194
 checkShapeEta.C:195
 checkShapeEta.C:196
 checkShapeEta.C:197
 checkShapeEta.C:198
 checkShapeEta.C:199
 checkShapeEta.C:200
 checkShapeEta.C:201
 checkShapeEta.C:202
 checkShapeEta.C:203
 checkShapeEta.C:204
 checkShapeEta.C:205
 checkShapeEta.C:206
 checkShapeEta.C:207
 checkShapeEta.C:208
 checkShapeEta.C:209
 checkShapeEta.C:210
 checkShapeEta.C:211
 checkShapeEta.C:212
 checkShapeEta.C:213
 checkShapeEta.C:214
 checkShapeEta.C:215
 checkShapeEta.C:216
 checkShapeEta.C:217
 checkShapeEta.C:218
 checkShapeEta.C:219
 checkShapeEta.C:220
 checkShapeEta.C:221
 checkShapeEta.C:222
 checkShapeEta.C:223
 checkShapeEta.C:224
 checkShapeEta.C:225
 checkShapeEta.C:226
 checkShapeEta.C:227
 checkShapeEta.C:228
 checkShapeEta.C:229
 checkShapeEta.C:230
 checkShapeEta.C:231
 checkShapeEta.C:232
 checkShapeEta.C:233
 checkShapeEta.C:234
 checkShapeEta.C:235
 checkShapeEta.C:236
 checkShapeEta.C:237
 checkShapeEta.C:238
 checkShapeEta.C:239
 checkShapeEta.C:240
 checkShapeEta.C:241
 checkShapeEta.C:242
 checkShapeEta.C:243
 checkShapeEta.C:244
 checkShapeEta.C:245
 checkShapeEta.C:246
 checkShapeEta.C:247
 checkShapeEta.C:248
 checkShapeEta.C:249
 checkShapeEta.C:250
 checkShapeEta.C:251
 checkShapeEta.C:252
 checkShapeEta.C:253
 checkShapeEta.C:254
 checkShapeEta.C:255
 checkShapeEta.C:256
 checkShapeEta.C:257
 checkShapeEta.C:258
 checkShapeEta.C:259
 checkShapeEta.C:260
 checkShapeEta.C:261
 checkShapeEta.C:262
 checkShapeEta.C:263
 checkShapeEta.C:264
 checkShapeEta.C:265
 checkShapeEta.C:266
 checkShapeEta.C:267
 checkShapeEta.C:268
 checkShapeEta.C:269
 checkShapeEta.C:270
 checkShapeEta.C:271
 checkShapeEta.C:272
 checkShapeEta.C:273
 checkShapeEta.C:274
 checkShapeEta.C:275
 checkShapeEta.C:276
 checkShapeEta.C:277
 checkShapeEta.C:278
 checkShapeEta.C:279
 checkShapeEta.C:280
 checkShapeEta.C:281
 checkShapeEta.C:282
 checkShapeEta.C:283
 checkShapeEta.C:284
 checkShapeEta.C:285
 checkShapeEta.C:286
 checkShapeEta.C:287
 checkShapeEta.C:288
 checkShapeEta.C:289
 checkShapeEta.C:290
 checkShapeEta.C:291
 checkShapeEta.C:292
 checkShapeEta.C:293
 checkShapeEta.C:294
 checkShapeEta.C:295
 checkShapeEta.C:296
 checkShapeEta.C:297
 checkShapeEta.C:298
 checkShapeEta.C:299
 checkShapeEta.C:300
 checkShapeEta.C:301
 checkShapeEta.C:302
 checkShapeEta.C:303
 checkShapeEta.C:304
 checkShapeEta.C:305
 checkShapeEta.C:306
 checkShapeEta.C:307
 checkShapeEta.C:308
 checkShapeEta.C:309
 checkShapeEta.C:310
 checkShapeEta.C:311
 checkShapeEta.C:312
 checkShapeEta.C:313
 checkShapeEta.C:314
 checkShapeEta.C:315
 checkShapeEta.C:316
 checkShapeEta.C:317
 checkShapeEta.C:318
 checkShapeEta.C:319
 checkShapeEta.C:320
 checkShapeEta.C:321
 checkShapeEta.C:322
 checkShapeEta.C:323
 checkShapeEta.C:324
 checkShapeEta.C:325
 checkShapeEta.C:326
 checkShapeEta.C:327
 checkShapeEta.C:328
 checkShapeEta.C:329
 checkShapeEta.C:330
 checkShapeEta.C:331
 checkShapeEta.C:332
 checkShapeEta.C:333
 checkShapeEta.C:334
 checkShapeEta.C:335
 checkShapeEta.C:336
 checkShapeEta.C:337
 checkShapeEta.C:338
 checkShapeEta.C:339
 checkShapeEta.C:340
 checkShapeEta.C:341
 checkShapeEta.C:342
 checkShapeEta.C:343
 checkShapeEta.C:344
 checkShapeEta.C:345
 checkShapeEta.C:346
 checkShapeEta.C:347
 checkShapeEta.C:348
 checkShapeEta.C:349
 checkShapeEta.C:350
 checkShapeEta.C:351
 checkShapeEta.C:352
 checkShapeEta.C:353
 checkShapeEta.C:354
 checkShapeEta.C:355
 checkShapeEta.C:356
 checkShapeEta.C:357
 checkShapeEta.C:358
 checkShapeEta.C:359
 checkShapeEta.C:360
 checkShapeEta.C:361
 checkShapeEta.C:362
 checkShapeEta.C:363
 checkShapeEta.C:364
 checkShapeEta.C:365
 checkShapeEta.C:366
 checkShapeEta.C:367
 checkShapeEta.C:368
 checkShapeEta.C:369
 checkShapeEta.C:370
 checkShapeEta.C:371
 checkShapeEta.C:372
 checkShapeEta.C:373
 checkShapeEta.C:374
 checkShapeEta.C:375
 checkShapeEta.C:376
 checkShapeEta.C:377
 checkShapeEta.C:378
 checkShapeEta.C:379
 checkShapeEta.C:380
 checkShapeEta.C:381
 checkShapeEta.C:382
 checkShapeEta.C:383
 checkShapeEta.C:384
 checkShapeEta.C:385
 checkShapeEta.C:386
 checkShapeEta.C:387
 checkShapeEta.C:388
 checkShapeEta.C:389
 checkShapeEta.C:390
 checkShapeEta.C:391
 checkShapeEta.C:392
 checkShapeEta.C:393
 checkShapeEta.C:394
 checkShapeEta.C:395
 checkShapeEta.C:396
 checkShapeEta.C:397
 checkShapeEta.C:398
 checkShapeEta.C:399
 checkShapeEta.C:400
 checkShapeEta.C:401
 checkShapeEta.C:402
 checkShapeEta.C:403
 checkShapeEta.C:404
 checkShapeEta.C:405
 checkShapeEta.C:406
 checkShapeEta.C:407
 checkShapeEta.C:408
 checkShapeEta.C:409
 checkShapeEta.C:410
 checkShapeEta.C:411
 checkShapeEta.C:412
 checkShapeEta.C:413
 checkShapeEta.C:414
 checkShapeEta.C:415
 checkShapeEta.C:416
 checkShapeEta.C:417
 checkShapeEta.C:418
 checkShapeEta.C:419
 checkShapeEta.C:420
 checkShapeEta.C:421
 checkShapeEta.C:422
 checkShapeEta.C:423
 checkShapeEta.C:424
 checkShapeEta.C:425
 checkShapeEta.C:426
 checkShapeEta.C:427
 checkShapeEta.C:428
 checkShapeEta.C:429
 checkShapeEta.C:430
 checkShapeEta.C:431
 checkShapeEta.C:432
 checkShapeEta.C:433
 checkShapeEta.C:434
 checkShapeEta.C:435
 checkShapeEta.C:436
 checkShapeEta.C:437
 checkShapeEta.C:438
 checkShapeEta.C:439
 checkShapeEta.C:440
 checkShapeEta.C:441
 checkShapeEta.C:442
 checkShapeEta.C:443
 checkShapeEta.C:444
 checkShapeEta.C:445
 checkShapeEta.C:446
 checkShapeEta.C:447
 checkShapeEta.C:448
 checkShapeEta.C:449
 checkShapeEta.C:450
 checkShapeEta.C:451
 checkShapeEta.C:452
 checkShapeEta.C:453
 checkShapeEta.C:454
 checkShapeEta.C:455
 checkShapeEta.C:456
 checkShapeEta.C:457
 checkShapeEta.C:458
 checkShapeEta.C:459
 checkShapeEta.C:460
 checkShapeEta.C:461
 checkShapeEta.C:462
 checkShapeEta.C:463
 checkShapeEta.C:464
 checkShapeEta.C:465
 checkShapeEta.C:466
 checkShapeEta.C:467
 checkShapeEta.C:468
 checkShapeEta.C:469
 checkShapeEta.C:470
 checkShapeEta.C:471
 checkShapeEta.C:472
 checkShapeEta.C:473
 checkShapeEta.C:474
 checkShapeEta.C:475
 checkShapeEta.C:476
 checkShapeEta.C:477
 checkShapeEta.C:478
 checkShapeEta.C:479
 checkShapeEta.C:480
 checkShapeEta.C:481
 checkShapeEta.C:482
 checkShapeEta.C:483
 checkShapeEta.C:484
 checkShapeEta.C:485
 checkShapeEta.C:486
 checkShapeEta.C:487
 checkShapeEta.C:488
 checkShapeEta.C:489
 checkShapeEta.C:490
 checkShapeEta.C:491
 checkShapeEta.C:492
 checkShapeEta.C:493
 checkShapeEta.C:494
 checkShapeEta.C:495
 checkShapeEta.C:496
 checkShapeEta.C:497
 checkShapeEta.C:498
 checkShapeEta.C:499
 checkShapeEta.C:500
 checkShapeEta.C:501
 checkShapeEta.C:502
 checkShapeEta.C:503
 checkShapeEta.C:504
 checkShapeEta.C:505
 checkShapeEta.C:506
 checkShapeEta.C:507
 checkShapeEta.C:508
 checkShapeEta.C:509
 checkShapeEta.C:510
 checkShapeEta.C:511
 checkShapeEta.C:512
 checkShapeEta.C:513
 checkShapeEta.C:514
 checkShapeEta.C:515
 checkShapeEta.C:516
 checkShapeEta.C:517
 checkShapeEta.C:518
 checkShapeEta.C:519
 checkShapeEta.C:520
 checkShapeEta.C:521
 checkShapeEta.C:522
 checkShapeEta.C:523
 checkShapeEta.C:524
 checkShapeEta.C:525
 checkShapeEta.C:526
 checkShapeEta.C:527
 checkShapeEta.C:528
 checkShapeEta.C:529
 checkShapeEta.C:530
 checkShapeEta.C:531
 checkShapeEta.C:532
 checkShapeEta.C:533
 checkShapeEta.C:534
 checkShapeEta.C:535
 checkShapeEta.C:536
 checkShapeEta.C:537
 checkShapeEta.C:538
 checkShapeEta.C:539
 checkShapeEta.C:540
 checkShapeEta.C:541
 checkShapeEta.C:542
 checkShapeEta.C:543
 checkShapeEta.C:544
 checkShapeEta.C:545
 checkShapeEta.C:546
 checkShapeEta.C:547
 checkShapeEta.C:548
 checkShapeEta.C:549
 checkShapeEta.C:550
 checkShapeEta.C:551
 checkShapeEta.C:552
 checkShapeEta.C:553
 checkShapeEta.C:554
 checkShapeEta.C:555
 checkShapeEta.C:556
 checkShapeEta.C:557
 checkShapeEta.C:558
 checkShapeEta.C:559
 checkShapeEta.C:560
 checkShapeEta.C:561
 checkShapeEta.C:562
 checkShapeEta.C:563
 checkShapeEta.C:564
 checkShapeEta.C:565
 checkShapeEta.C:566
 checkShapeEta.C:567
 checkShapeEta.C:568
 checkShapeEta.C:569
 checkShapeEta.C:570
 checkShapeEta.C:571
 checkShapeEta.C:572
 checkShapeEta.C:573
 checkShapeEta.C:574
 checkShapeEta.C:575
 checkShapeEta.C:576
 checkShapeEta.C:577
 checkShapeEta.C:578
 checkShapeEta.C:579
 checkShapeEta.C:580
 checkShapeEta.C:581
 checkShapeEta.C:582
 checkShapeEta.C:583
 checkShapeEta.C:584
 checkShapeEta.C:585
 checkShapeEta.C:586
 checkShapeEta.C:587
 checkShapeEta.C:588
 checkShapeEta.C:589
 checkShapeEta.C:590
 checkShapeEta.C:591
 checkShapeEta.C:592
 checkShapeEta.C:593
 checkShapeEta.C:594
 checkShapeEta.C:595
 checkShapeEta.C:596
 checkShapeEta.C:597
 checkShapeEta.C:598
 checkShapeEta.C:599
 checkShapeEta.C:600
 checkShapeEta.C:601
 checkShapeEta.C:602
 checkShapeEta.C:603
 checkShapeEta.C:604
 checkShapeEta.C:605
 checkShapeEta.C:606
 checkShapeEta.C:607
 checkShapeEta.C:608
 checkShapeEta.C:609
 checkShapeEta.C:610
 checkShapeEta.C:611
 checkShapeEta.C:612
 checkShapeEta.C:613
 checkShapeEta.C:614
 checkShapeEta.C:615
 checkShapeEta.C:616
 checkShapeEta.C:617
 checkShapeEta.C:618
 checkShapeEta.C:619
 checkShapeEta.C:620
 checkShapeEta.C:621
 checkShapeEta.C:622
 checkShapeEta.C:623
 checkShapeEta.C:624
 checkShapeEta.C:625
 checkShapeEta.C:626
 checkShapeEta.C:627
 checkShapeEta.C:628
 checkShapeEta.C:629
 checkShapeEta.C:630
 checkShapeEta.C:631
 checkShapeEta.C:632
 checkShapeEta.C:633
 checkShapeEta.C:634
 checkShapeEta.C:635
 checkShapeEta.C:636
 checkShapeEta.C:637
 checkShapeEta.C:638
 checkShapeEta.C:639
 checkShapeEta.C:640
 checkShapeEta.C:641
 checkShapeEta.C:642
 checkShapeEta.C:643
 checkShapeEta.C:644
 checkShapeEta.C:645
 checkShapeEta.C:646
 checkShapeEta.C:647
 checkShapeEta.C:648
 checkShapeEta.C:649
 checkShapeEta.C:650
 checkShapeEta.C:651
 checkShapeEta.C:652
 checkShapeEta.C:653
 checkShapeEta.C:654
 checkShapeEta.C:655
 checkShapeEta.C:656
 checkShapeEta.C:657
 checkShapeEta.C:658
 checkShapeEta.C:659
 checkShapeEta.C:660
 checkShapeEta.C:661
 checkShapeEta.C:662
 checkShapeEta.C:663
 checkShapeEta.C:664
 checkShapeEta.C:665
 checkShapeEta.C:666
 checkShapeEta.C:667
 checkShapeEta.C:668
 checkShapeEta.C:669
 checkShapeEta.C:670
 checkShapeEta.C:671
 checkShapeEta.C:672
 checkShapeEta.C:673
 checkShapeEta.C:674
 checkShapeEta.C:675
 checkShapeEta.C:676
 checkShapeEta.C:677
 checkShapeEta.C:678
 checkShapeEta.C:679
 checkShapeEta.C:680
 checkShapeEta.C:681
 checkShapeEta.C:682
 checkShapeEta.C:683
 checkShapeEta.C:684
 checkShapeEta.C:685
 checkShapeEta.C:686
 checkShapeEta.C:687
 checkShapeEta.C:688
 checkShapeEta.C:689
 checkShapeEta.C:690
 checkShapeEta.C:691
 checkShapeEta.C:692
 checkShapeEta.C:693
 checkShapeEta.C:694
 checkShapeEta.C:695
 checkShapeEta.C:696
 checkShapeEta.C:697
 checkShapeEta.C:698
 checkShapeEta.C:699
 checkShapeEta.C:700
 checkShapeEta.C:701
 checkShapeEta.C:702
 checkShapeEta.C:703
 checkShapeEta.C:704
 checkShapeEta.C:705
 checkShapeEta.C:706
 checkShapeEta.C:707
 checkShapeEta.C:708
 checkShapeEta.C:709
 checkShapeEta.C:710
 checkShapeEta.C:711
 checkShapeEta.C:712
 checkShapeEta.C:713
 checkShapeEta.C:714
 checkShapeEta.C:715
 checkShapeEta.C:716
 checkShapeEta.C:717
 checkShapeEta.C:718
 checkShapeEta.C:719
 checkShapeEta.C:720
 checkShapeEta.C:721
 checkShapeEta.C:722
 checkShapeEta.C:723
 checkShapeEta.C:724
 checkShapeEta.C:725
 checkShapeEta.C:726
 checkShapeEta.C:727
 checkShapeEta.C:728
 checkShapeEta.C:729
 checkShapeEta.C:730
 checkShapeEta.C:731
 checkShapeEta.C:732
 checkShapeEta.C:733
 checkShapeEta.C:734
 checkShapeEta.C:735
 checkShapeEta.C:736
 checkShapeEta.C:737
 checkShapeEta.C:738
 checkShapeEta.C:739
 checkShapeEta.C:740
 checkShapeEta.C:741
 checkShapeEta.C:742
 checkShapeEta.C:743
 checkShapeEta.C:744
 checkShapeEta.C:745
 checkShapeEta.C:746
 checkShapeEta.C:747
 checkShapeEta.C:748
 checkShapeEta.C:749
 checkShapeEta.C:750
 checkShapeEta.C:751
 checkShapeEta.C:752
 checkShapeEta.C:753
 checkShapeEta.C:754
 checkShapeEta.C:755
 checkShapeEta.C:756
 checkShapeEta.C:757
 checkShapeEta.C:758
 checkShapeEta.C:759
 checkShapeEta.C:760
 checkShapeEta.C:761
 checkShapeEta.C:762
 checkShapeEta.C:763
 checkShapeEta.C:764
 checkShapeEta.C:765
 checkShapeEta.C:766
 checkShapeEta.C:767
 checkShapeEta.C:768
 checkShapeEta.C:769
 checkShapeEta.C:770
 checkShapeEta.C:771
 checkShapeEta.C:772
 checkShapeEta.C:773
 checkShapeEta.C:774
 checkShapeEta.C:775
 checkShapeEta.C:776
 checkShapeEta.C:777
 checkShapeEta.C:778
 checkShapeEta.C:779
 checkShapeEta.C:780
 checkShapeEta.C:781
 checkShapeEta.C:782
 checkShapeEta.C:783
 checkShapeEta.C:784
 checkShapeEta.C:785
 checkShapeEta.C:786
 checkShapeEta.C:787
 checkShapeEta.C:788
 checkShapeEta.C:789
 checkShapeEta.C:790
 checkShapeEta.C:791
 checkShapeEta.C:792
 checkShapeEta.C:793
 checkShapeEta.C:794
 checkShapeEta.C:795
 checkShapeEta.C:796
 checkShapeEta.C:797
 checkShapeEta.C:798
 checkShapeEta.C:799
 checkShapeEta.C:800
 checkShapeEta.C:801
 checkShapeEta.C:802
 checkShapeEta.C:803
 checkShapeEta.C:804
 checkShapeEta.C:805
 checkShapeEta.C:806
 checkShapeEta.C:807
 checkShapeEta.C:808
 checkShapeEta.C:809
 checkShapeEta.C:810
 checkShapeEta.C:811
 checkShapeEta.C:812
 checkShapeEta.C:813
 checkShapeEta.C:814
 checkShapeEta.C:815
 checkShapeEta.C:816
 checkShapeEta.C:817
 checkShapeEta.C:818
 checkShapeEta.C:819
 checkShapeEta.C:820
 checkShapeEta.C:821
 checkShapeEta.C:822
 checkShapeEta.C:823
 checkShapeEta.C:824
 checkShapeEta.C:825
 checkShapeEta.C:826
 checkShapeEta.C:827
 checkShapeEta.C:828
 checkShapeEta.C:829
 checkShapeEta.C:830
 checkShapeEta.C:831
 checkShapeEta.C:832
 checkShapeEta.C:833
 checkShapeEta.C:834
 checkShapeEta.C:835
 checkShapeEta.C:836
 checkShapeEta.C:837
 checkShapeEta.C:838
 checkShapeEta.C:839
 checkShapeEta.C:840
 checkShapeEta.C:841
 checkShapeEta.C:842
 checkShapeEta.C:843
 checkShapeEta.C:844
 checkShapeEta.C:845
 checkShapeEta.C:846
 checkShapeEta.C:847
 checkShapeEta.C:848
 checkShapeEta.C:849
 checkShapeEta.C:850
 checkShapeEta.C:851
 checkShapeEta.C:852
 checkShapeEta.C:853
 checkShapeEta.C:854
 checkShapeEta.C:855
 checkShapeEta.C:856
 checkShapeEta.C:857
 checkShapeEta.C:858
 checkShapeEta.C:859
 checkShapeEta.C:860
 checkShapeEta.C:861
 checkShapeEta.C:862
 checkShapeEta.C:863
 checkShapeEta.C:864
 checkShapeEta.C:865
 checkShapeEta.C:866
 checkShapeEta.C:867
 checkShapeEta.C:868
 checkShapeEta.C:869
 checkShapeEta.C:870
 checkShapeEta.C:871
 checkShapeEta.C:872
 checkShapeEta.C:873
 checkShapeEta.C:874
 checkShapeEta.C:875
 checkShapeEta.C:876
 checkShapeEta.C:877
 checkShapeEta.C:878
 checkShapeEta.C:879
 checkShapeEta.C:880
 checkShapeEta.C:881
 checkShapeEta.C:882
 checkShapeEta.C:883
 checkShapeEta.C:884
 checkShapeEta.C:885
 checkShapeEta.C:886
 checkShapeEta.C:887
 checkShapeEta.C:888
 checkShapeEta.C:889
 checkShapeEta.C:890
 checkShapeEta.C:891
 checkShapeEta.C:892
 checkShapeEta.C:893
 checkShapeEta.C:894
 checkShapeEta.C:895
 checkShapeEta.C:896
 checkShapeEta.C:897
 checkShapeEta.C:898
 checkShapeEta.C:899
 checkShapeEta.C:900
 checkShapeEta.C:901
 checkShapeEta.C:902
 checkShapeEta.C:903
 checkShapeEta.C:904
 checkShapeEta.C:905
 checkShapeEta.C:906
 checkShapeEta.C:907
 checkShapeEta.C:908
 checkShapeEta.C:909
 checkShapeEta.C:910
 checkShapeEta.C:911
 checkShapeEta.C:912
 checkShapeEta.C:913
 checkShapeEta.C:914
 checkShapeEta.C:915
 checkShapeEta.C:916
 checkShapeEta.C:917
 checkShapeEta.C:918
 checkShapeEta.C:919
 checkShapeEta.C:920
 checkShapeEta.C:921
 checkShapeEta.C:922
 checkShapeEta.C:923
 checkShapeEta.C:924
 checkShapeEta.C:925
 checkShapeEta.C:926
 checkShapeEta.C:927
 checkShapeEta.C:928
 checkShapeEta.C:929
 checkShapeEta.C:930
 checkShapeEta.C:931
 checkShapeEta.C:932
 checkShapeEta.C:933
 checkShapeEta.C:934
 checkShapeEta.C:935
 checkShapeEta.C:936
 checkShapeEta.C:937
 checkShapeEta.C:938
 checkShapeEta.C:939
 checkShapeEta.C:940
 checkShapeEta.C:941
 checkShapeEta.C:942
 checkShapeEta.C:943
 checkShapeEta.C:944
 checkShapeEta.C:945
 checkShapeEta.C:946
 checkShapeEta.C:947
 checkShapeEta.C:948
 checkShapeEta.C:949
 checkShapeEta.C:950
 checkShapeEta.C:951
 checkShapeEta.C:952
 checkShapeEta.C:953
 checkShapeEta.C:954
 checkShapeEta.C:955
 checkShapeEta.C:956
 checkShapeEta.C:957
 checkShapeEta.C:958
 checkShapeEta.C:959
 checkShapeEta.C:960
 checkShapeEta.C:961
 checkShapeEta.C:962
 checkShapeEta.C:963
 checkShapeEta.C:964
 checkShapeEta.C:965
 checkShapeEta.C:966
 checkShapeEta.C:967
 checkShapeEta.C:968
 checkShapeEta.C:969
 checkShapeEta.C:970
 checkShapeEta.C:971
 checkShapeEta.C:972
 checkShapeEta.C:973
 checkShapeEta.C:974
 checkShapeEta.C:975
 checkShapeEta.C:976
 checkShapeEta.C:977
 checkShapeEta.C:978
 checkShapeEta.C:979
 checkShapeEta.C:980
 checkShapeEta.C:981
 checkShapeEta.C:982
 checkShapeEta.C:983
 checkShapeEta.C:984