ROOT logo
#include "TTree.h"
#include "TH2D.h"
#include "TList.h"
#include "TString.h"
#include "TFile.h"
#include "TGraph.h"
#include "TMath.h"
#include "TDatime.h"
#include "TSpline.h"
#include "TF1.h"

#include "AliPID.h"

#include <iostream>

#include "ProgressBar.h"

Double_t getEtaCorrection(TH2D* hMap, Double_t tanTheta, Double_t dEdx)
{
  if (!hMap) 
    return 1.;
    
  if (dEdx < 1.)
    return 1.;
  
  
  //TODO WARNING: Here we can use tanTheta directly but in data we have to extract tanTheta from thetaGlobal!!!
    
  /*
  // For ESD tracks, the local tanTheta could be used (esdTrack->GetInnerParam()->GetTgl()).
  // However, this value is not available for AODs and, thus, not for AliVTrack.
  // Fortunately, the following formula allows to approximate the local tanTheta with the 
  // global theta angle -> This is for by far most of the tracks the same, but gives at
  // maybe the percent level differences within +- 0.2 in tanTheta -> Which is still ok.
  Double_t tanThetaLocal = TMath::Tan(-thetaGlobal + TMath::Pi() / 2.0);
  */
  Int_t binX = hMap->GetXaxis()->FindBin(tanTheta);
  Int_t binY = hMap->GetYaxis()->FindBin(1. / dEdx);
  
  if (binX == 0) 
    binX = 1;
  if (binX > hMap->GetXaxis()->GetNbins())
    binX = hMap->GetXaxis()->GetNbins();
  
  if (binY == 0)
    binY = 1;
  if (binY > hMap->GetYaxis()->GetNbins())
    binY = hMap->GetYaxis()->GetNbins();
  
  return hMap->GetBinContent(binX, binY);
}

Int_t correctShapeEtaTree(Bool_t correctData, TString pathMap, TString fileNameMap, TString mapSuffix,
                          Bool_t recalculateExpecteddEdx, TString pathNameSplinesFile, TString prSplinesName,
                          TString pathTree,
                          Bool_t hasMultiplicity,
                          Bool_t correctMult,
                          TString fileNameTree = "bhess_PIDetaTree.root", TString treeName = "fTree") 
{ 
  const Double_t massProton = AliPID::ParticleMass(AliPID::kProton);
  
  if (!correctData && !recalculateExpecteddEdx) {
    std::cout << "Nothing to be done: Correction AND recalculation of expected dEdx are disabled!" << std::endl;
    return -1;
  }
  // Extract the splines, if desired
  TSpline3* splPr = 0x0;
  if (recalculateExpecteddEdx) {
    std::cout << "Loading splines to recalculate expected dEdx!" << std::endl << std::endl;
    
    TFile* fSpl = TFile::Open(pathNameSplinesFile.Data());
    if (!fSpl) {
      std::cout << "Failed to open spline file \"" << pathNameSplinesFile.Data() << "\"!" << std::endl;
      return 0x0;
    }
    
    TObjArray* TPCPIDResponse = (TObjArray*)fSpl->Get("TPCPIDResponse");
    if (!TPCPIDResponse) {
      splPr = (TSpline3*)fSpl->Get(prSplinesName.Data());
      
      // If splines are in file directly, without TPCPIDResponse object, try to load them
      if (!splPr) {
        std::cout << "Failed to load object array from spline file \"" << pathNameSplinesFile.Data() << "\"!" << std::endl;
        return 0x0;
      }
    }
    else {
      splPr = (TSpline3*)TPCPIDResponse->FindObject(prSplinesName.Data());
      
      if (!splPr) {
        std::cout << "Failed to load splines from file \"" << pathNameSplinesFile.Data() << "\"!" << std::endl;
        return 0x0;
      }
    }
  }
  else
    std::cout << "Taking dEdxExpected from Tree..." << std::endl << std::endl;
  
  if (correctMult)
    std::cout << "Correcting multiplicity dependence..." << std::endl << std::endl;
  else
    std::cout << "NOT correcting multiplicity dependence..." << std::endl << std::endl;
  
  // Extract the correction map, if desired
  TH2D* hMap = 0x0;
  if (correctData) {
    std::cout << "Loading map to correct dEdx (NOT dEdx_expected in this special case!)!" << std::endl << std::endl;
    
    TFile* fMap = TFile::Open(Form("%s/%s", pathMap.Data(), fileNameMap.Data()));
    if (!fMap)  {
      std::cout << "Failed to open file \"" << Form("%s/%s", pathMap.Data(), fileNameMap.Data()) << "\"!" << std::endl;
      return -1;
    }
    
    hMap = dynamic_cast<TH2D*>(fMap->Get(Form("hRefined%s", mapSuffix.Data())));
    if (!hMap) {
      std::cout << "Failed to load correction map!" << std::endl;
      return -1;
    }
  }
  else
    std::cout << "NOT correcting eta dependence..." << std::endl << std::endl;
  
  // Extract the data Tree		       
  TFile* fTree = TFile::Open(Form("%s/%s", pathTree.Data(), fileNameTree.Data()));
  if (!fTree)  {
    std::cout << "Failed to open file \"" << Form("%s/%s", pathTree.Data(), fileNameTree.Data()) << "\"!" << std::endl;
    return -1;
  }
  
  TTree* tree = dynamic_cast<TTree*>(fTree->Get(treeName.Data()));
  if (!tree) {
    std::cout << "Failed to load data tree!" << std::endl << std::endl;
    return -1;
  }

  Long64_t nTreeEntries = tree->GetEntriesFast();
  
  Double_t pTPC = 0.; // Momentum at TPC inner wall
  //Double_t pT = 0.;
  Double_t dEdx = 0.; // Measured dE/dx
  Double_t dEdxExpected = 0.; // Expected dE/dx according to parametrisation
  Double_t tanTheta = 0.; // Tangens of (local) theta at TPC inner wall
  //Double_t sinAlpha = 0.; // Sine of (local) phi at TPC inner wall
  //Double_t y = 0.; // Local Y
  Double_t phiPrime = 0; // Phi prime
  UShort_t tpcSignalN = 0; // Number of TPC clusters for PID
  Int_t multiplicity = 0;
  UChar_t  pidType = 0; // Type of identification (TPC dEdx, V0, ...)
  
  tree->SetBranchAddress("pTPC", &pTPC);
  //tree->SetBranchAddress("pT", &Pt);
  tree->SetBranchAddress("dEdx", &dEdx);
  if (!recalculateExpecteddEdx)
    tree->SetBranchAddress("dEdxExpected", &dEdxExpected);
  tree->SetBranchAddress("tanTheta", &tanTheta);
  //tree->SetBranchAddress("sinAlpha", &sinAlpha);
  //tree->SetBranchAddress("y", &y);
  //TODO not needed for the moment tree->SetBranchAddress("phiPrime", &phiPrime);
  tree->SetBranchAddress("tpcSignalN", &tpcSignalN);
  if (hasMultiplicity)
    tree->SetBranchAddress("fMultiplicity", &multiplicity);
  tree->SetBranchAddress("pidType", &pidType);
  
  // Output file
  TDatime daTime;  
  TString savefileName = "";
  if (correctData) {
    savefileName = Form("%s_%sCorrectedWithMap_%s___%04d_%02d_%02d__%02d_%02d.root", fileNameTree.ReplaceAll(".root", "").Data(),
                        correctMult ? "multiplicityCorrected_" : "",
                        fileNameMap.ReplaceAll(".root", "").Data(), daTime.GetYear(), 
                        daTime.GetMonth(), daTime.GetDay(), daTime.GetHour(), daTime.GetMinute());
  }
  else if (recalculateExpecteddEdx) {
    savefileName = Form("%s_%sNewSplines___%04d_%02d_%02d__%02d_%02d.root", fileNameTree.ReplaceAll(".root", "").Data(),
                        correctMult ? "multiplicityCorrected_" : "",
                        daTime.GetYear(), daTime.GetMonth(), daTime.GetDay(), daTime.GetHour(), daTime.GetMinute());
  }
  else
    return -1;
    
    
  TFile* fSave = TFile::Open(Form("%s/%s", pathTree.Data(), savefileName.Data()), "recreate");
  if (!fSave) {
    std::cout << "Failed to open save file \"" << Form("%s/%s", pathTree.Data(), savefileName.Data()) << "\"!" << std::endl;
    return -1;
  }
  
  
  fSave->cd();
  TTree* treeCorrected = new TTree("fTree", "Tree for analysis of #eta dependence of TPC signal; #eta corrected");
  treeCorrected->Write(0, TObject::kOverwrite);
  
  treeCorrected->Branch("pTPC", &pTPC);
  //treeCorrected->Branch("pT", &Pt);
  treeCorrected->Branch("dEdx", &dEdx);
  treeCorrected->Branch("dEdxExpected", &dEdxExpected);
  treeCorrected->Branch("tpcSignalN", &tpcSignalN);
  
  treeCorrected->Branch("tanTheta", &tanTheta);
  //treeCorrected->Branch("sinAlpha", &sinAlpha);
  //treeCorrected->Branch("y", &y);
  treeCorrected->Branch("phiPrime", &phiPrime);
  if (hasMultiplicity)
    treeCorrected->Branch("fMultiplicity", &multiplicity);
  treeCorrected->Branch("pidType", &pidType);
  
  Double_t corrFactor = 0;
  
  
  TF1 corrFuncMult("corrFuncMult", "[0] + [1]*TMath::Max([4], TMath::Min(x, [3])) + [2] * TMath::Power(TMath::Max([4], TMath::Min(x, [3])), 2)",
                   0., 0.2);
  TF1 corrFuncMultTanTheta("corrFuncMultTanTheta", "[0] * (x -[2]) + [1] * (x * x - [2] * [2])", -1.5, 1.5);
  //OLD TF1 corrFuncMult("corrFuncMult", "[0] + [1]*TMath::Min(x, [3]) + [2] * TMath::Power(TMath::Min(x, [3]), 2)", 0., 0.1);
  //OLD acceptable try, but with coarser tanTheta binning and absTanTheta TF1 corrFuncMultTanTheta("corrFuncMultTanTheta", "[0] * (TMath::Abs(x) -TMath::Abs([2])) + [1] * (x * x - [2] * [2])", -1.5, 1.5);
  
  // LHC13b.pass2
  if (correctMult)
    printf("Using corr Parameters for 13b.pass2\n!");
  
  corrFuncMult.SetParameter(0, -6.27187e-06);
  corrFuncMult.SetParameter(1, -4.60649e-04);
  corrFuncMult.SetParameter(2, -4.26450e-02);
  corrFuncMult.SetParameter(3, 2.40590e-02);
  corrFuncMult.SetParameter(4, 0);
  
  corrFuncMultTanTheta.SetParameter(0, -5.338e-06);
  corrFuncMultTanTheta.SetParameter(1,  1.220e-05);
  corrFuncMultTanTheta.SetParameter(2, -0.5);
  
  
  /*
  // LHC11a10a
  if (correctMult)
    printf("Using corr Parameters for 11a10a\n!");
  
  corrFuncMult.SetParameter(0, 6.90133e-06);
  corrFuncMult.SetParameter(1, -1.22123e-03);
  corrFuncMult.SetParameter(2, 1.80220e-02);
  corrFuncMult.SetParameter(3, 0.1);
  corrFuncMult.SetParameter(4, 6.45306e-03);
  
  corrFuncMultTanTheta.SetParameter(0, -2.85505e-07);
  corrFuncMultTanTheta.SetParameter(1, -1.31911e-06);
  corrFuncMultTanTheta.SetParameter(2, -0.5);
  
  /* OLD very good try, but with fewer pBins for the fitting
  corrFuncMult.SetParameter(0, 6.88365e-06);
  corrFuncMult.SetParameter(1, -1.22324e-03);
  corrFuncMult.SetParameter(2, 1.81625e-02);
  corrFuncMult.SetParameter(3, 0.1);
  corrFuncMult.SetParameter(4, 6.36890e-03);
  
  corrFuncMultTanTheta.SetParameter(0, -2.85505e-07);
  corrFuncMultTanTheta.SetParameter(1, -1.31911e-06);
  corrFuncMultTanTheta.SetParameter(2, -0.5);
  */
  /*OLD good try
  corrFuncMult.SetParameter(0, 7.50321e-06);
  corrFuncMult.SetParameter(1, -1.25250e-03);
  corrFuncMult.SetParameter(2, 1.85437e-02);
  corrFuncMult.SetParameter(3, 0.1);
  corrFuncMult.SetParameter(4, 6.21192e-03);
  
  corrFuncMultTanTheta.SetParameter(0, -1.43112e-07);
  corrFuncMultTanTheta.SetParameter(1, -1.53e-06);
  corrFuncMultTanTheta.SetParameter(2, 0.3);
  */
  /* OLD acceptable try, but with coarser tanTheta binning and absTanTheta
  corrFuncMult.SetParameter(0, 6.78255e-6);
  corrFuncMult.SetParameter(1, -0.00117312);
  corrFuncMult.SetParameter(2, 0.0162423);
  corrFuncMult.SetParameter(3, 0.0563968);
  corrFuncMult.SetParameter(4, 0.00663576);
  
  corrFuncMultTanTheta.SetParameter(0, -1.85779e-6);
  corrFuncMultTanTheta.SetParameter(1, 5.40642e-7);
  corrFuncMultTanTheta.SetParameter(2, 0.35);
  */
  
  /*OLD
  corrFuncMult.SetParameter(0, 6.798e-6);
  corrFuncMult.SetParameter(1, -0.001176);
  corrFuncMult.SetParameter(2, 0.01603);
  corrFuncMult.SetParameter(3, 0.1955);
  */
  
  
  /*
  // LHC10h.pass2
  if (correctMult)
    printf("Using corr Parameters for 10h.pass2\n!");
  
  corrFuncMult.SetParameter(0, 3.21636e-07);
  corrFuncMult.SetParameter(1, -6.65876e-04);
  corrFuncMult.SetParameter(2, 1.28786e-03);
  corrFuncMult.SetParameter(3, 1.47677e-02);
  corrFuncMult.SetParameter(4, 0.);
  
  corrFuncMultTanTheta.SetParameter(0, 7.23591e-08);
  corrFuncMultTanTheta.SetParameter(1, 2.7469e-06);
  corrFuncMultTanTheta.SetParameter(2, -0.5);
  */
  /*OLD bad try
  corrFuncMult.SetParameter(0, 2.71514e-07);
  corrFuncMult.SetParameter(1, -6.92031e-04);
  corrFuncMult.SetParameter(2, 3.56042e-03);
  corrFuncMult.SetParameter(3, 1.47497e-02);
  corrFuncMult.SetParameter(4, 0.);
  
  corrFuncMultTanTheta.SetParameter(0, 8.53204e-08);
  corrFuncMultTanTheta.SetParameter(1, 2.85591e-06);
  corrFuncMultTanTheta.SetParameter(2, -0.5);
  */
  
  /*OLD OLD acceptable try, but with coarser tanTheta binning and absTanTheta
  corrFuncMult.SetParameter(0, 1.167e-6);
  corrFuncMult.SetParameter(1, -0.0009747);
  corrFuncMult.SetParameter(2, 0.02117);
  corrFuncMult.SetParameter(3, 0.01778);
  corrFuncMult.SetParameter(4, 0.);
  
  corrFuncMultTanTheta.SetParameter(0, 7.036e-7);
  corrFuncMultTanTheta.SetParameter(1, 1.868e-6);
  corrFuncMultTanTheta.SetParameter(2, 0.5);
  */
  
  
  /* OLD definition of multiplicity with nContriutorsToPrimVertex
  TF1 corrFuncMult("corrFuncMult", "pol2", 0, 0.1);
  corrFuncMult.SetParameter(0, 5.5e-6);
  corrFuncMult.SetParameter(1, -0.00436);
  corrFuncMult.SetParameter(2, 0.103);
  */

  progressbar(0.);
  for (Long64_t i = 0; i < nTreeEntries; i++) {
    tree->GetEntry(i);

    if (recalculateExpecteddEdx) {
      //Double_t old = dEdxExpected;
      dEdxExpected = 50. * splPr->Eval(pTPC / massProton); //WARNING: What, if MIP is different from 50.? Seems not to be used (tested for pp, MC_pp, PbPb and MC_PbPb), but can in principle happen
      /*if (TMath::Abs(dEdxExpected - old) > 1e-4) {
       p *rintedSomething = kTRUE;
       printf("%.2f - ", dEdxExpected);
       printf("%.2f\n", old);
      }*/
    }
    
    if (correctData) {
      corrFactor = getEtaCorrection(hMap, tanTheta, dEdxExpected);
      
      if (corrFactor <= 0)  {
        printf("Error: Bad correction factor (%f)\n", corrFactor);
        printedSomething = kTRUE;
        continue;
      }
      
      // Correct the track dEdx and leave the expected dEdx as it is, when creating the sigma map!
      // NOTE: This is due to the method the maps are created. The track dEdx (not the expected one!)
      // is corrected to uniquely relate a momemtum bin with an expected dEdx, where the expected dEdx
      // equals the track dEdx for all eta (thanks to the correction and the re-fit of the splines).
      // Consequently, looking up the uncorrected expected dEdx at a given tanTheta yields the correct
      // sigma parameter!
      
      // In principle, during map creation, one could also calculate for each tanTheta-p bin pair the expected dEdx
      // and then fill the map at the corresponding dEdxExpected-tanTheta bin. Then, one would also need to correct
      // the dEdxExpected to create the sigma maps.
      
      // In summary, both correction methods are valid in this case, but one has to be consistent! For the different methods,
      // the maps will be slightly distorted, but overall give the same results.
      
      
      
      //Scale eta dependence -> Doesn't seem to work!!!
      //corrFactor = (corrFactor - 1.)*(2e-6*30*multiplicity + 1.0) + 1.0; 
      
      dEdx /= corrFactor;
    }
    
    if (correctMult) {
      // Multiplicity depends on pure dEdx. Therefore, correction factor depends indirectly on eta
      // => Use eta correction factor to scale dEdxExpected accordingly
      Double_t dEdxExpectedInv = 1. / (dEdxExpected * (correctData ? corrFactor : 1.));
      Double_t relSlope = corrFuncMult.Eval(dEdxExpectedInv);
      
      //Correct eta dependence of slope
      relSlope += corrFuncMultTanTheta(tanTheta);
      
      Double_t corrFactorMult = relSlope * multiplicity;
      dEdx /= 1. + corrFactorMult;
    }
    
    treeCorrected->Fill();
    
    if (i % 10000 == 0)
      progressbar(100. * (((Double_t)i) / nTreeEntries));
  }
  
  progressbar(100.);
  
  fSave->cd();
  treeCorrected->Write(0, TObject::kOverwrite);
  fSave->Close();
  
  return 0;
 correctShapeEtaTree.C:1
 correctShapeEtaTree.C:2
 correctShapeEtaTree.C:3
 correctShapeEtaTree.C:4
 correctShapeEtaTree.C:5
 correctShapeEtaTree.C:6
 correctShapeEtaTree.C:7
 correctShapeEtaTree.C:8
 correctShapeEtaTree.C:9
 correctShapeEtaTree.C:10
 correctShapeEtaTree.C:11
 correctShapeEtaTree.C:12
 correctShapeEtaTree.C:13
 correctShapeEtaTree.C:14
 correctShapeEtaTree.C:15
 correctShapeEtaTree.C:16
 correctShapeEtaTree.C:17
 correctShapeEtaTree.C:18
 correctShapeEtaTree.C:19
 correctShapeEtaTree.C:20
 correctShapeEtaTree.C:21
 correctShapeEtaTree.C:22
 correctShapeEtaTree.C:23
 correctShapeEtaTree.C:24
 correctShapeEtaTree.C:25
 correctShapeEtaTree.C:26
 correctShapeEtaTree.C:27
 correctShapeEtaTree.C:28
 correctShapeEtaTree.C:29
 correctShapeEtaTree.C:30
 correctShapeEtaTree.C:31
 correctShapeEtaTree.C:32
 correctShapeEtaTree.C:33
 correctShapeEtaTree.C:34
 correctShapeEtaTree.C:35
 correctShapeEtaTree.C:36
 correctShapeEtaTree.C:37
 correctShapeEtaTree.C:38
 correctShapeEtaTree.C:39
 correctShapeEtaTree.C:40
 correctShapeEtaTree.C:41
 correctShapeEtaTree.C:42
 correctShapeEtaTree.C:43
 correctShapeEtaTree.C:44
 correctShapeEtaTree.C:45
 correctShapeEtaTree.C:46
 correctShapeEtaTree.C:47
 correctShapeEtaTree.C:48
 correctShapeEtaTree.C:49
 correctShapeEtaTree.C:50
 correctShapeEtaTree.C:51
 correctShapeEtaTree.C:52
 correctShapeEtaTree.C:53
 correctShapeEtaTree.C:54
 correctShapeEtaTree.C:55
 correctShapeEtaTree.C:56
 correctShapeEtaTree.C:57
 correctShapeEtaTree.C:58
 correctShapeEtaTree.C:59
 correctShapeEtaTree.C:60
 correctShapeEtaTree.C:61
 correctShapeEtaTree.C:62
 correctShapeEtaTree.C:63
 correctShapeEtaTree.C:64
 correctShapeEtaTree.C:65
 correctShapeEtaTree.C:66
 correctShapeEtaTree.C:67
 correctShapeEtaTree.C:68
 correctShapeEtaTree.C:69
 correctShapeEtaTree.C:70
 correctShapeEtaTree.C:71
 correctShapeEtaTree.C:72
 correctShapeEtaTree.C:73
 correctShapeEtaTree.C:74
 correctShapeEtaTree.C:75
 correctShapeEtaTree.C:76
 correctShapeEtaTree.C:77
 correctShapeEtaTree.C:78
 correctShapeEtaTree.C:79
 correctShapeEtaTree.C:80
 correctShapeEtaTree.C:81
 correctShapeEtaTree.C:82
 correctShapeEtaTree.C:83
 correctShapeEtaTree.C:84
 correctShapeEtaTree.C:85
 correctShapeEtaTree.C:86
 correctShapeEtaTree.C:87
 correctShapeEtaTree.C:88
 correctShapeEtaTree.C:89
 correctShapeEtaTree.C:90
 correctShapeEtaTree.C:91
 correctShapeEtaTree.C:92
 correctShapeEtaTree.C:93
 correctShapeEtaTree.C:94
 correctShapeEtaTree.C:95
 correctShapeEtaTree.C:96
 correctShapeEtaTree.C:97
 correctShapeEtaTree.C:98
 correctShapeEtaTree.C:99
 correctShapeEtaTree.C:100
 correctShapeEtaTree.C:101
 correctShapeEtaTree.C:102
 correctShapeEtaTree.C:103
 correctShapeEtaTree.C:104
 correctShapeEtaTree.C:105
 correctShapeEtaTree.C:106
 correctShapeEtaTree.C:107
 correctShapeEtaTree.C:108
 correctShapeEtaTree.C:109
 correctShapeEtaTree.C:110
 correctShapeEtaTree.C:111
 correctShapeEtaTree.C:112
 correctShapeEtaTree.C:113
 correctShapeEtaTree.C:114
 correctShapeEtaTree.C:115
 correctShapeEtaTree.C:116
 correctShapeEtaTree.C:117
 correctShapeEtaTree.C:118
 correctShapeEtaTree.C:119
 correctShapeEtaTree.C:120
 correctShapeEtaTree.C:121
 correctShapeEtaTree.C:122
 correctShapeEtaTree.C:123
 correctShapeEtaTree.C:124
 correctShapeEtaTree.C:125
 correctShapeEtaTree.C:126
 correctShapeEtaTree.C:127
 correctShapeEtaTree.C:128
 correctShapeEtaTree.C:129
 correctShapeEtaTree.C:130
 correctShapeEtaTree.C:131
 correctShapeEtaTree.C:132
 correctShapeEtaTree.C:133
 correctShapeEtaTree.C:134
 correctShapeEtaTree.C:135
 correctShapeEtaTree.C:136
 correctShapeEtaTree.C:137
 correctShapeEtaTree.C:138
 correctShapeEtaTree.C:139
 correctShapeEtaTree.C:140
 correctShapeEtaTree.C:141
 correctShapeEtaTree.C:142
 correctShapeEtaTree.C:143
 correctShapeEtaTree.C:144
 correctShapeEtaTree.C:145
 correctShapeEtaTree.C:146
 correctShapeEtaTree.C:147
 correctShapeEtaTree.C:148
 correctShapeEtaTree.C:149
 correctShapeEtaTree.C:150
 correctShapeEtaTree.C:151
 correctShapeEtaTree.C:152
 correctShapeEtaTree.C:153
 correctShapeEtaTree.C:154
 correctShapeEtaTree.C:155
 correctShapeEtaTree.C:156
 correctShapeEtaTree.C:157
 correctShapeEtaTree.C:158
 correctShapeEtaTree.C:159
 correctShapeEtaTree.C:160
 correctShapeEtaTree.C:161
 correctShapeEtaTree.C:162
 correctShapeEtaTree.C:163
 correctShapeEtaTree.C:164
 correctShapeEtaTree.C:165
 correctShapeEtaTree.C:166
 correctShapeEtaTree.C:167
 correctShapeEtaTree.C:168
 correctShapeEtaTree.C:169
 correctShapeEtaTree.C:170
 correctShapeEtaTree.C:171
 correctShapeEtaTree.C:172
 correctShapeEtaTree.C:173
 correctShapeEtaTree.C:174
 correctShapeEtaTree.C:175
 correctShapeEtaTree.C:176
 correctShapeEtaTree.C:177
 correctShapeEtaTree.C:178
 correctShapeEtaTree.C:179
 correctShapeEtaTree.C:180
 correctShapeEtaTree.C:181
 correctShapeEtaTree.C:182
 correctShapeEtaTree.C:183
 correctShapeEtaTree.C:184
 correctShapeEtaTree.C:185
 correctShapeEtaTree.C:186
 correctShapeEtaTree.C:187
 correctShapeEtaTree.C:188
 correctShapeEtaTree.C:189
 correctShapeEtaTree.C:190
 correctShapeEtaTree.C:191
 correctShapeEtaTree.C:192
 correctShapeEtaTree.C:193
 correctShapeEtaTree.C:194
 correctShapeEtaTree.C:195
 correctShapeEtaTree.C:196
 correctShapeEtaTree.C:197
 correctShapeEtaTree.C:198
 correctShapeEtaTree.C:199
 correctShapeEtaTree.C:200
 correctShapeEtaTree.C:201
 correctShapeEtaTree.C:202
 correctShapeEtaTree.C:203
 correctShapeEtaTree.C:204
 correctShapeEtaTree.C:205
 correctShapeEtaTree.C:206
 correctShapeEtaTree.C:207
 correctShapeEtaTree.C:208
 correctShapeEtaTree.C:209
 correctShapeEtaTree.C:210
 correctShapeEtaTree.C:211
 correctShapeEtaTree.C:212
 correctShapeEtaTree.C:213
 correctShapeEtaTree.C:214
 correctShapeEtaTree.C:215
 correctShapeEtaTree.C:216
 correctShapeEtaTree.C:217
 correctShapeEtaTree.C:218
 correctShapeEtaTree.C:219
 correctShapeEtaTree.C:220
 correctShapeEtaTree.C:221
 correctShapeEtaTree.C:222
 correctShapeEtaTree.C:223
 correctShapeEtaTree.C:224
 correctShapeEtaTree.C:225
 correctShapeEtaTree.C:226
 correctShapeEtaTree.C:227
 correctShapeEtaTree.C:228
 correctShapeEtaTree.C:229
 correctShapeEtaTree.C:230
 correctShapeEtaTree.C:231
 correctShapeEtaTree.C:232
 correctShapeEtaTree.C:233
 correctShapeEtaTree.C:234
 correctShapeEtaTree.C:235
 correctShapeEtaTree.C:236
 correctShapeEtaTree.C:237
 correctShapeEtaTree.C:238
 correctShapeEtaTree.C:239
 correctShapeEtaTree.C:240
 correctShapeEtaTree.C:241
 correctShapeEtaTree.C:242
 correctShapeEtaTree.C:243
 correctShapeEtaTree.C:244
 correctShapeEtaTree.C:245
 correctShapeEtaTree.C:246
 correctShapeEtaTree.C:247
 correctShapeEtaTree.C:248
 correctShapeEtaTree.C:249
 correctShapeEtaTree.C:250
 correctShapeEtaTree.C:251
 correctShapeEtaTree.C:252
 correctShapeEtaTree.C:253
 correctShapeEtaTree.C:254
 correctShapeEtaTree.C:255
 correctShapeEtaTree.C:256
 correctShapeEtaTree.C:257
 correctShapeEtaTree.C:258
 correctShapeEtaTree.C:259
 correctShapeEtaTree.C:260
 correctShapeEtaTree.C:261
 correctShapeEtaTree.C:262
 correctShapeEtaTree.C:263
 correctShapeEtaTree.C:264
 correctShapeEtaTree.C:265
 correctShapeEtaTree.C:266
 correctShapeEtaTree.C:267
 correctShapeEtaTree.C:268
 correctShapeEtaTree.C:269
 correctShapeEtaTree.C:270
 correctShapeEtaTree.C:271
 correctShapeEtaTree.C:272
 correctShapeEtaTree.C:273
 correctShapeEtaTree.C:274
 correctShapeEtaTree.C:275
 correctShapeEtaTree.C:276
 correctShapeEtaTree.C:277
 correctShapeEtaTree.C:278
 correctShapeEtaTree.C:279
 correctShapeEtaTree.C:280
 correctShapeEtaTree.C:281
 correctShapeEtaTree.C:282
 correctShapeEtaTree.C:283
 correctShapeEtaTree.C:284
 correctShapeEtaTree.C:285
 correctShapeEtaTree.C:286
 correctShapeEtaTree.C:287
 correctShapeEtaTree.C:288
 correctShapeEtaTree.C:289
 correctShapeEtaTree.C:290
 correctShapeEtaTree.C:291
 correctShapeEtaTree.C:292
 correctShapeEtaTree.C:293
 correctShapeEtaTree.C:294
 correctShapeEtaTree.C:295
 correctShapeEtaTree.C:296
 correctShapeEtaTree.C:297
 correctShapeEtaTree.C:298
 correctShapeEtaTree.C:299
 correctShapeEtaTree.C:300
 correctShapeEtaTree.C:301
 correctShapeEtaTree.C:302
 correctShapeEtaTree.C:303
 correctShapeEtaTree.C:304
 correctShapeEtaTree.C:305
 correctShapeEtaTree.C:306
 correctShapeEtaTree.C:307
 correctShapeEtaTree.C:308
 correctShapeEtaTree.C:309
 correctShapeEtaTree.C:310
 correctShapeEtaTree.C:311
 correctShapeEtaTree.C:312
 correctShapeEtaTree.C:313
 correctShapeEtaTree.C:314
 correctShapeEtaTree.C:315
 correctShapeEtaTree.C:316
 correctShapeEtaTree.C:317
 correctShapeEtaTree.C:318
 correctShapeEtaTree.C:319
 correctShapeEtaTree.C:320
 correctShapeEtaTree.C:321
 correctShapeEtaTree.C:322
 correctShapeEtaTree.C:323
 correctShapeEtaTree.C:324
 correctShapeEtaTree.C:325
 correctShapeEtaTree.C:326
 correctShapeEtaTree.C:327
 correctShapeEtaTree.C:328
 correctShapeEtaTree.C:329
 correctShapeEtaTree.C:330
 correctShapeEtaTree.C:331
 correctShapeEtaTree.C:332
 correctShapeEtaTree.C:333
 correctShapeEtaTree.C:334
 correctShapeEtaTree.C:335
 correctShapeEtaTree.C:336
 correctShapeEtaTree.C:337
 correctShapeEtaTree.C:338
 correctShapeEtaTree.C:339
 correctShapeEtaTree.C:340
 correctShapeEtaTree.C:341
 correctShapeEtaTree.C:342
 correctShapeEtaTree.C:343
 correctShapeEtaTree.C:344
 correctShapeEtaTree.C:345
 correctShapeEtaTree.C:346
 correctShapeEtaTree.C:347
 correctShapeEtaTree.C:348
 correctShapeEtaTree.C:349
 correctShapeEtaTree.C:350
 correctShapeEtaTree.C:351
 correctShapeEtaTree.C:352
 correctShapeEtaTree.C:353
 correctShapeEtaTree.C:354
 correctShapeEtaTree.C:355
 correctShapeEtaTree.C:356
 correctShapeEtaTree.C:357
 correctShapeEtaTree.C:358
 correctShapeEtaTree.C:359
 correctShapeEtaTree.C:360
 correctShapeEtaTree.C:361
 correctShapeEtaTree.C:362
 correctShapeEtaTree.C:363
 correctShapeEtaTree.C:364
 correctShapeEtaTree.C:365
 correctShapeEtaTree.C:366
 correctShapeEtaTree.C:367
 correctShapeEtaTree.C:368
 correctShapeEtaTree.C:369
 correctShapeEtaTree.C:370
 correctShapeEtaTree.C:371
 correctShapeEtaTree.C:372
 correctShapeEtaTree.C:373
 correctShapeEtaTree.C:374
 correctShapeEtaTree.C:375
 correctShapeEtaTree.C:376
 correctShapeEtaTree.C:377
 correctShapeEtaTree.C:378
 correctShapeEtaTree.C:379
 correctShapeEtaTree.C:380
 correctShapeEtaTree.C:381
 correctShapeEtaTree.C:382
 correctShapeEtaTree.C:383
 correctShapeEtaTree.C:384
 correctShapeEtaTree.C:385
 correctShapeEtaTree.C:386
 correctShapeEtaTree.C:387
 correctShapeEtaTree.C:388
 correctShapeEtaTree.C:389
 correctShapeEtaTree.C:390
 correctShapeEtaTree.C:391
 correctShapeEtaTree.C:392
 correctShapeEtaTree.C:393
 correctShapeEtaTree.C:394
 correctShapeEtaTree.C:395
 correctShapeEtaTree.C:396
 correctShapeEtaTree.C:397
 correctShapeEtaTree.C:398
 correctShapeEtaTree.C:399
 correctShapeEtaTree.C:400
 correctShapeEtaTree.C:401
 correctShapeEtaTree.C:402
 correctShapeEtaTree.C:403
 correctShapeEtaTree.C:404
 correctShapeEtaTree.C:405
 correctShapeEtaTree.C:406
 correctShapeEtaTree.C:407