ROOT logo
#include "TList.h"
#include "TColor.h"
#include "TArrow.h"
#include "TROOT.h"
#include "TLatex.h"
#include "TSystem.h"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "TFile.h"
#include "TLegend.h"
#include "TStyle.h"
#include "TCanvas.h"
#include "THnSparse.h"
#include "TDirectoryFile.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TH3F.h"
#include "TMath.h"
#include "TF1.h"
#include "TASImage.h"
#include "TPaveText.h"
#include "TParameter.h"
#include "TPaveStats.h"


#include "AliAnalysisHelperJetTasks.h"
#include "AliAnalysisTaskJetServices.h"
#include "AliAnalysisTaskJetSpectrum2.h"
#include <fstream>
#include <iostream>

#include "Normalize2d.C"
#include "ALICEWorkInProgress.C"
#include "utils.C"

using namespace std;

Int_t PlotSpectraPbPb();
Int_t PlotSpectraPbPb2(UInt_t iPlotFlag = 0xFF,UInt_t iCenFlag = 0xFF,UInt_t iSpecFlag = 0xFF,Int_t iALICEType  =100);
Int_t PlotJetBFluctuations();
Int_t PlotJetBFluctuations2(UInt_t iPlotFlag = 0xFFFFF,UInt_t iPlotType = 0xFFFFF,Float_t inPtLo = 50,Float_t inPtUp = 100,Int_t iALICEType = 100);
Int_t PlotSubtract(Int_t iALICEtype = 100);
Int_t PlotJetQA();
TH1* CorrectForEff(TH1 *hTrack);
// helpers

Int_t fDebug = 0;

enum {kMaxJets = 4};
void HistsFromSingleJets(char* cMask,TList *list,Int_t nJets,TH1F** h,Int_t iRebin = 1,int iFirst = 0);
void HistsFromSingleJets(char* cMask,TList *list,Int_t nJets,TH2F** h,Int_t iRebin = 1,int iFirst = 0);
void ScaleNevent(TH1 *h,TFile *fIn,Int_t iCond = 5,Int_t iMC = 0,Int_t iCen = 0);
void ScaleH1(TH1* h,char* cX = "",char* cY = "",Float_t fScale = 1,Bool_t bWidth = true);
void SetStyleH1(TH1 *h,Int_t color = 0,Int_t fillStyle = 0,Int_t markerStyle = 0);
void ScaleH2(TH2* h,char* cX = "",char* cY = "",char* cZ = "",Float_t fScale = 1,Bool_t bWidth = true);
TH1F* GetPythia8Spectrum(const char *cHist,const char *cPythia,Float_t deta,Int_t iRebin = 1,Int_t iMask = 0);
Double_t GetPoissonFluctuation(TH1 *h1,Double_t areaIn,Double_t areaJet);
TObject* GetObjectFromFile(const char *cName,const char *cFile,const char* cDir,const char* cRep2 = "pwg4",const char* cRep1 = "PWG4_");
TF1* FitLHSgaus(TH1D *hDeltaPt, double minPt = -60., double maxPt = 5., int minIterations = 3, int maxIterations = 20, double maxDeltaMean = 0.01, int mode=1, double minBoundSigma = 3., double maxBoundSigma = 0.5 );
Double_t Gamma(Double_t *x,Double_t *par);
Double_t Gamma0(Double_t *x,Double_t *par);
TH2F* GetTH2PlotB(const char *cPath,Int_t embType=0, Int_t classType=0, Int_t cl=-1, Int_t rp=-1);
void SetHistoAttributes(TH1* h1,Int_t iMarker = kFullCircle,Int_t iColor = kBlack,Float_t fMarkerSize = 1.7);
void SetHistAxisStyle(TH1* h1,Float_t titleOffsetX = 0,Float_t titleSizeX= 0,Float_t labelSizeX= 0,
		      Float_t titleOffsetY = 0,Float_t titleSizeY = 0,Float_t labelSizeY = 0);
void SetGraphAttributes(TGraph* gr,Int_t iMarker = kFullCircle,Int_t iColor = kBlack);

void CloseFiles();
void DrawDate();
void DrawALICE(TCanvas *c,Int_t iType = 11,Float_t xCenter = 0.90,Float_t yCenter = 0.9,TString cExtra2 = "",bool bExtraBox = kTRUE);
const char *cPrintMask = "110116_%s.eps";
void set_plot_style();
TCanvas *cTmp = 0;

TString picPrefix = "notePlot_";
TString picSuffix = "eps";
TString picName = "";




TH1F* GetPythia8Spectrum(const char *cHist,const char *cPythia,Float_t deta,Int_t iRebin,Int_t iMask){
  TDirectory *opwd = gDirectory;
  TFile *fPythia = (TFile*)gROOT->GetListOfFiles()->FindObject(cPythia);
  
  if(!fPythia) fPythia  = TFile::Open(cPythia);
  opwd->cd();

  static int iCount  = 0;
  TH1F* hist = 0;
  if(iMask<=0){
    hist = (TH1F*)fPythia->Get(cHist);      
    if(hist)hist = (TH1F*)hist->Clone(Form("%s_%d",hist->GetName(),iCount));
  }
  else{
    for(int i = 0;i < iMask;i++){
      TH1F *hTmp = (TH1F*)fPythia->Get(Form(cHist,i));
      if(!hTmp){
	Printf("%s not found",Form(cHist,i));
	return 0;
      }   
      if(!hist)hist = (TH1F*)hTmp->Clone(Form("%s_%d_%d",hTmp->GetName(),iMask,iCount));
      else hist->Add(hTmp);
    }
  }

  if(!hist){
    Printf("%s not found",cHist);
    return 0;
  }  
  // fetch the cross section
  TH1F *hxsec = (TH1F*)fPythia->Get("h1Xsec");

  Float_t xsec =  hxsec->GetBinContent(1);
  Printf("%d xsec = %1.3E",__LINE__,xsec);
  //  if(xsec==0)xsec = 40.79; // tmp hack
  hist->Rebin(iRebin);
  hist->Scale(1./hist->GetBinWidth(1)); 
  //  hist->Scale(1./xsec);
  hist->Scale(1./deta);

  //  Double_t xtotal = 71.39; // xtotal for 7 TeV!!
  Double_t xtotal = 62.01; // xtotal for 7 TeV!!

  // scale with fraction of total NSD cross section
  hist->Scale(1/xtotal);
  Printf("%d fraction = %1.3E of total cross section %1.3E",__LINE__,xsec/xtotal,xtotal);
  hist->SetXTitle("p_{T} (GeV/c)");
  hist->SetYTitle("1/N  dN/dp_{T}dy");
  hist->SetDirectory(opwd);
  iCount++;
  return hist;

}




void PlotNote(){
  set_plot_style();
  // QM Plots

  // BD
  PlotSubtract(12); // do not call before others changes style
  
  // BF 01a-d Random cones
  // PlotJetBFluctuations2((1<<0)|(1<<1)|(1<<2),1<<0,50,100,13);  
  
  // BF 02 a-d jet, take out unquenched
  //  PlotJetBFluctuations2((1<<4)|(1<<6),1<<0);  

  // BF 03 a-d
  // PlotJetBFluctuations2((1<<3),1<<0);  

  // BF 04 a-d 05 06
  // PlotJetBFluctuations2((1<<0)|(1<<3)|(1<<4)|(1<<7)|(1<<8),1<<0,50,100,13);  

  // BF 07 08 (vs. Mult)
  //  PlotJetBFluctuations2((1<<0)|(1<<1)|(1<<3)|(1<<4)|(1<<7)|(1<<8),1<<1,50,100,13);

  // BF08
  //  PlotJetBFluctuations2((1<<8)|(1<<11),1<<1);  
 
  // BF 11a-d
  //  PlotJetBFluctuations2((1<<3),1<<0|1<<2);  

  // BF 12a-d Random cones vs RP 
  //  PlotJetBFluctuations2((1<<0),1<<0|1<<2);  

  // BF 13 + 14 may add random cones here 
  //  PlotJetBFluctuations2((1<<3)|(1<<8),1<<1|1<<2);  


  // BF 13 + 15 alternative
  //  PlotJetBFluctuations2((1<<0)|(1<<1)|(1<<8),1<<1|1<<2);  

  // BF 19
  // PlotJetBFluctuations2((1<<9),(1<<1)|(1<<2));  



  // JS 01 + 02 
  //  PlotSpectraPbPb2(1<<0|1<<1,1<<0|1<<1|1<<2|1<<3,0,12);

  // not for external usage with tracks...
  //  PlotSpectraPbPb2(1<<1,1<<0|1<<1|1<<2|1<<3,1);

}

TList *GetList(const char *cFile,const char *cName){
  TDirectory *opwd = gDirectory;
  TFile *fIn = (TFile*)gROOT->GetListOfFiles()->FindObject(cFile);
  TList *list = 0;
  if(!fIn) fIn  = TFile::Open(cFile);
  if(!fIn)return list;
  opwd->cd();

  TDirectory *dir = (TDirectory*)fIn->Get(Form("PWG4_%s",cName));
  if(!dir){
    Printf("GetList: Directory PWG4_%s not found",cName);
    return list;
  }				  
  list = (TList*)dir->Get(Form("pwg4%s",cName));
  if(!list){
    Printf("GetList: list pwg4%s not found",cName);
    return list;
  }				  
  return list;

}

Int_t PlotJetQA(){

  set_plot_style();
  gStyle->SetTitleYSize(0.7*gStyle->GetTitleYSize());
  gStyle->SetTitleXSize(0.7*gStyle->GetTitleXSize());
  gStyle->SetTitleXOffset(1.2*gStyle->GetTitleXOffset());
  gStyle->SetTitleYOffset(1.5*gStyle->GetTitleYOffset());
  gStyle->SetPadRightMargin(1.1*gStyle->GetPadRightMargin());
  gStyle->SetPadBottomMargin(0.7*gStyle->GetPadBottomMargin());
  

  Bool_t isPP = false;

  TString printType = "eps"; 
  const Int_t nCen = 5;
  TString sCen[nCen] = {" 0-80"," 0-10%%","10-30","30-50","50-80"};
  const Int_t nJets = 3;


  TString cAdd = "Rec"; // decide whcih type to take Rec RecFull Gen GenFull
  TString cAddFull = "RecFull"; // decide whcih type to take Rec RecFull Gen GenFull

  TCanvas *c1 = new TCanvas();

  TString sFile =  "~/alice/data/analysis/train_maf/output_110216.root";
  TString sinputName  = "spec2_clustersAOD_ANTIKT04_B2_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000";
  TString sinputJet = "%% Pb-Pb Anti-k_{T} R = 0.4 (B2)";
  TString sinputPrint = "PbPb_antikt04_B2";
  sinputName  = "spec2_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B0_Filter00256_Cut00150_Skip00_0000000000";cAdd = "Gen";cAddFull = "GenFull";sinputJet = "%% Pb-Pb Anti-k_{T} R = 0.4 (B0)";sinputPrint = "PbPb_antikt04_B0";

  if(isPP){
    sinputName  = "spec2_clustersAOD_ANTIKT04_B0_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B0_Filter00256_Cut00150_Skip00_0000000000";sinputJet = "p+p #sqrt{s} = 7 TeV Anti-k_{T} R = 0.4 (B0)";sinputPrint = "pp_antikt04_B0";
    sCen[0] = "";
    sFile = "~/alice/jets/macros/batch/output.root";
  }


  TFile *fIn = TFile::Open(sFile.Data());


  TDirectory *dir = (TDirectory*)fIn->Get("PWG4_services");
  TList *list1 = (TList*)dir->Get("pwg4serv");

  TH2F* hTriggerCount =(TH2F*)list1->FindObject("fh2TriggerCount");

  for(int ic = 0;ic < (isPP?1:nCen);ic++){

    TString cName = Form("PWG4_%s_Class%02d",sinputName.Data(),ic);
    TDirectory *inputDir = (TDirectory*)fIn->Get(cName.Data());

    Float_t fNevents = hTriggerCount->GetBinContent(hTriggerCount->FindBin(ic,AliAnalysisTaskJetServices::kSelected));

    Printf(" %s: %10d events",sCen[ic].Data(),(Int_t)fNevents); 

    if(!inputDir){
      Printf("Dir %s not found",cName.Data());
      continue;
    }
    cName = Form("pwg4%s_Class%02d",sinputName.Data(),ic);
    TList *inputList = (TList*)inputDir->Get(cName.Data());
    if(!inputList){
      Printf("List %s not found",cName.Data());
      continue;
    }

    TH2F *h2EtaPtLead[nJets+2] = {0,};
    TH2F *h2EtaPtLeadFull[nJets+2] = {0,};
    TH2F *h2EtaPtAll[nJets+2] = {0,};
    HistsFromSingleJets(Form("fh2EtaPt%s_j%%d",cAdd.Data()),inputList,1,h2EtaPtLead);
    HistsFromSingleJets(Form("fh2EtaPt%s_j%%d",cAddFull.Data()),inputList,1,h2EtaPtLeadFull);
    HistsFromSingleJets(Form("fh2EtaPt%s_j%%d",cAddFull.Data()),inputList,nJets+1,h2EtaPtAll,1,nJets);

    c1->SetLogz();   
    for(int i = 0; i< nJets+2;i++)Printf("Lead     > %d %p",i,h2EtaPtLead[i]);
    for(int i = 0; i< nJets+2;i++)Printf("LeadFull > %d %p",i,h2EtaPtLeadFull[i]);
    for(int i = 0; i< nJets+2;i++)Printf("All      > %d %p",i,h2EtaPtAll[i]);
    h2EtaPtLead[0]->Draw("colz");    
    c1->Modified();
    c1->Update();
    c1->SaveAs(Form("%s_%s_Cen%02d_EtaPtLead2D.%s",sinputPrint.Data(),cAdd.Data(),ic,printType.Data()));
    if(!gROOT->IsBatch())
      if(getchar()=='q')return 1;

    Float_t fStep = 20;
    Float_t fStepLo = 0;
    Float_t fStepUp = fStepLo+fStep;
    Float_t fMax = 160;
    
    while(fStepUp<fMax){
      Int_t iBinLo = h2EtaPtLead[0]->GetYaxis()->FindBin(fStepLo);
      Int_t iBinUp = h2EtaPtLead[0]->GetYaxis()->FindBin(fStepUp)-1;
      TH1D *hProjLead = h2EtaPtLead[0]->ProjectionX(Form("hEtaPtLead_%d_%d_%d",iBinLo,iBinUp,ic),iBinLo,iBinUp,"e");
      TH1D *hProjLeadFull = h2EtaPtLeadFull[0]->ProjectionX(Form("hEtaPtLeadFull_%d_%d_%d",iBinLo,iBinUp,ic),iBinLo,iBinUp,"e");
      TH1D *hProjAll = h2EtaPtAll[nJets+1]->ProjectionX(Form("hEtaPtAll_%d_%d_%d",iBinLo,iBinUp,ic),iBinLo,iBinUp,"e");

      ScaleH1(hProjLead,"#eta","1/N_{evt} dN_{jet}/d#eta",1./fNevents,true);
      SetStyleH1(hProjLead,kBlue,0,kFullCircle);
      ScaleH1(hProjLeadFull,"#eta","1/N_{evt} dN_{jet}/d#eta",1./fNevents,true);
      SetStyleH1(hProjLeadFull,kRed,0,kFullCircle);
      ScaleH1(hProjAll,"#eta","1/N_{evt} dN_{jet}/d#eta",1./fNevents,true);
      SetStyleH1(hProjAll,kGray,1001,kFullCircle);


      hProjAll->DrawCopy("hist");
      hProjLead->DrawCopy("histsame");
      hProjLeadFull->DrawCopy("histsame");

      Float_t ptUp = fStepUp-h2EtaPtLead[0]->GetYaxis()->GetBinWidth(iBinUp);

      Printf("%3.0f-%3.0f",fStepLo,ptUp);
      TLatex *txt = 0;
      txt = new TLatex(-1.1,1.1*hProjAll->GetMaximum(),Form("%s %s p_{T} = %3.0f-%3.0f GeV",sCen[ic].Data(),sinputJet.Data(),fStepLo,ptUp));
      txt->SetTextSize(gStyle->GetTextSize());
      txt->Draw();
      c1->SaveAs(Form("%s_%s_Cen%02d_%03d-%03d_eta.%s",sinputPrint.Data(),cAdd.Data(),ic,(Int_t)fStepLo,(Int_t)ptUp,printType.Data()));
      c1->Modified();
      c1->Update();
      if(!gROOT->IsBatch())
	if(getchar()=='q')return 1;
      fStepLo += fStep;
      fStepUp += fStep;
      delete hProjAll;
      delete hProjLead;
      delete hProjLeadFull;
    }
    
    // Phi vs. p_T

 
    TH2F *h2PhiPtLead[nJets+2] = {0,};
    TH2F *h2PhiPtLeadFull[nJets+2] = {0,};
    TH2F *h2PhiPtAll[nJets+2] = {0,};
    HistsFromSingleJets(Form("fh2PhiPt%s_j%%d",cAdd.Data()),inputList,1,h2PhiPtLead);
    HistsFromSingleJets(Form("fh2PhiPt%s_j%%d",cAddFull.Data()),inputList,1,h2PhiPtLeadFull);
    HistsFromSingleJets(Form("fh2PhiPt%s_j%%d",cAddFull.Data()),inputList,nJets+1,h2PhiPtAll,1,nJets);

    c1->SetLogz();    
    h2PhiPtLead[0]->Draw("colz");    
    c1->SaveAs(Form("%s_%s_Cen%02d_phiPtLead2D.%s",sinputPrint.Data(),cAdd.Data(),ic,printType.Data()));
    c1->Modified();
    c1->Update();

    if(!gROOT->IsBatch())
      if(getchar()=='q')return 1;

    fStepLo = 0;
    fStepUp = fStepLo+fStep;

    while(fStepUp<fMax){
      Int_t iBinLo = h2PhiPtLead[0]->GetYaxis()->FindBin(fStepLo);
      Int_t iBinUp = h2PhiPtLead[0]->GetYaxis()->FindBin(fStepUp)-1;
      TH1D *hProjLead = h2PhiPtLead[0]->ProjectionX(Form("hPhiPtLead_%d_%d_%d",iBinLo,iBinUp,ic),iBinLo,iBinUp,"e");
      TH1D *hProjLeadFull = h2PhiPtLeadFull[0]->ProjectionX(Form("hPhiPtLeadFull_%d_%d_%d",iBinLo,iBinUp,ic),iBinLo,iBinUp,"e");
      TH1D *hProjAll = h2PhiPtAll[nJets+1]->ProjectionX(Form("hPhiPtAll_%d_%d_%d",iBinLo,iBinUp,ic),iBinLo,iBinUp,"e");

      ScaleH1(hProjLead,"#phi","1/N_{evt} dN_{jet}/d#phi",1./fNevents,true);
      SetStyleH1(hProjLead,kBlue,0,kFullCircle);
      ScaleH1(hProjLeadFull,"#phi","1/N_{evt} dN_{jet}/d#phi",1./fNevents,true);
      SetStyleH1(hProjLeadFull,kRed,0,kFullCircle);
      ScaleH1(hProjAll,"#phi","1/N_{evt} dN_{jet}/d#phi",1./fNevents,true);
      SetStyleH1(hProjAll,kGray,1001,kFullCircle);

      hProjAll->SetMinimum(0);

      hProjAll->DrawCopy("hist");
      hProjLead->DrawCopy("histsame");
      hProjLeadFull->DrawCopy("histsame");

      Float_t ptUp = fStepUp-h2PhiPtLead[0]->GetYaxis()->GetBinWidth(iBinUp);

      Printf("%3.0f-%3.0f",fStepLo,ptUp);
      TLatex *txt = 0;
      txt = new TLatex(0.0,1.1*hProjAll->GetMaximum(),Form("%s %s p_{T} = %3.0f-%3.0f GeV",sCen[ic].Data(),sinputJet.Data(),fStepLo,ptUp));
      txt->SetTextSize(gStyle->GetTextSize());
      txt->Draw();
      c1->SaveAs(Form("%s_%s_Cen%02d_%03d-%03d_phi.%s",sinputPrint.Data(),cAdd.Data(),ic,(Int_t)fStepLo,(Int_t)ptUp,printType.Data()));
      c1->Modified();
      c1->Update();
      if(!gROOT->IsBatch())
	if(getchar()=='q')return 1;
      fStepLo += fStep;
      fStepUp += fStep;
      delete hProjAll;
      delete hProjLead;
      delete hProjLeadFull;
    }
    
    // area vs. p_T


    TH2F *h2AreaPtLead[nJets+2] = {0,};
    TH2F *h2AreaPtLeadFull[nJets+2] = {0,};
    TH2F *h2AreaPtAll[nJets+2] = {0,};
    HistsFromSingleJets(Form("fh2AreaPt%s_j%%d",cAdd.Data()),inputList,1,h2AreaPtLead);
    HistsFromSingleJets(Form("fh2AreaPt%s_j%%d",cAddFull.Data()),inputList,1,h2AreaPtLeadFull);
    HistsFromSingleJets(Form("fh2AreaPt%s_j%%d",cAddFull.Data()),inputList,nJets+1,h2AreaPtAll,1,nJets);

    c1->SetLogz();    
    h2AreaPtLead[0]->Draw("colz");    
    c1->Modified();
    c1->Update();
    c1->SaveAs(Form("%s_%s_Cen%02d_areaPtLead2D.%s",sinputPrint.Data(),cAdd.Data(),ic,printType.Data()));
    if(!gROOT->IsBatch())
      if(getchar()=='q')return 1;

    fStepLo = 0;
    fStepUp = fStepLo+fStep;

    while(fStepUp<fMax){
      Int_t iBinLo = h2AreaPtLead[0]->GetYaxis()->FindBin(fStepLo);
      Int_t iBinUp = h2AreaPtLead[0]->GetYaxis()->FindBin(fStepUp)-1;
      TH1D *hProjLead = h2AreaPtLead[0]->ProjectionX(Form("hAreaPtLead_%d_%d_%d",iBinLo,iBinUp,ic),iBinLo,iBinUp,"e");
      TH1D *hProjLeadFull = h2AreaPtLeadFull[0]->ProjectionX(Form("hAreaPtLeadFull_%d_%d_%d",iBinLo,iBinUp,ic),iBinLo,iBinUp,"e");
      TH1D *hProjAll = h2AreaPtAll[nJets+1]->ProjectionX(Form("hAreaPtAll_%d_%d_%d",iBinLo,iBinUp,ic),iBinLo,iBinUp,"e");

      ScaleH1(hProjLead,"Area A","1/N_{evt} dN_{jet}/dA",1./fNevents,true);
      SetStyleH1(hProjLead,kBlue,0,kFullCircle);
      ScaleH1(hProjLeadFull,"Area A","1/N_{evt} dN_{jet}/dA",1./fNevents,true);
      SetStyleH1(hProjLeadFull,kRed,0,kFullCircle);
      ScaleH1(hProjAll,"Area A","1/N_{evt} dN_{jet}/dA",1./fNevents,true);
      SetStyleH1(hProjAll,kGray,1001,kFullCircle);

      hProjAll->SetMinimum(0);
      hProjAll->DrawCopy("hist");
      hProjLead->DrawCopy("histsame");
      hProjLeadFull->DrawCopy("histsame");

      Float_t ptUp = fStepUp-h2AreaPtLead[0]->GetYaxis()->GetBinWidth(iBinUp);

      Printf("%3.0f-%3.0f",fStepLo,ptUp);
      TLatex *txt = 0;
      txt = new TLatex(0.,1.1*hProjAll->GetMaximum(),Form("%s %s p_{T} = %3.0f-%3.0f GeV",sCen[ic].Data(),sinputJet.Data(),fStepLo,ptUp));
      txt->SetTextSize(gStyle->GetTextSize());
      txt->Draw();
      c1->SaveAs(Form("%s_%s_Cen%02d_%03d-%03d_area.%s",sinputPrint.Data(),cAdd.Data(),ic,(Int_t)fStepLo,(Int_t)ptUp,printType.Data()));
      c1->Modified();
      c1->Update();
      if(!gROOT->IsBatch())
	if(getchar()=='q')return 1;
      fStepLo += fStep;
      fStepUp += fStep;
      delete hProjAll;
      delete hProjLead;
      delete hProjLeadFull;
    }
    
    // Area vs eta:
    TH2F *h2AreaEta[nJets+1] = {0,};
    HistsFromSingleJets(Form("fh2EtaArea%s_j%%d",cAdd.Data()),inputList,nJets,h2AreaEta);
    ScaleH2(h2AreaEta[nJets],"area A","#eta","1/N_{evt} dN_{jets}/dAd#eta",1./fNevents,true);
    c1->SetLogz();     
    h2AreaEta[nJets]->Draw("colz");
    c1->Modified();
    c1->Update();
    c1->SaveAs(Form("%s_%s_Cen%02d_areaEta2D.%s",sinputPrint.Data(),cAdd.Data(),ic,printType.Data()));
    if(!gROOT->IsBatch())
      if(getchar()=='q')return 1;
  }

  return 0;
}

Int_t PlotSpectraPbPb2(UInt_t iPlotFlag,UInt_t iCenFlag,UInt_t iSpecFlag,Int_t iALICEType){

  // Using now the THNSparse histos
  // 
  const int kMaxFiles = 2;
  TString sinputFile[kMaxFiles];
  TString sinputDir[kMaxFiles];
  TString sinputJet[kMaxFiles];

  TCanvas *c1 = new TCanvas("c1","",800,600);
  c1->SetLogy();
  THnSparseF *fhnJetPtRec[kMaxFiles] = {0,};
  THnSparseF *fhnTrackPtRec[kMaxFiles] = {0,};
  THnSparseF *fhnEvent[kMaxFiles] = {0,};
  TH1F *fh1Centrality[kMaxFiles] = {0,};

  const int nCen = 4;
  const Float_t nColl[nCen] = {1502,742.5,250,46.6};
  const Float_t fCentLo[nCen] = {0,10,30,50};
  const Float_t fCentUp[nCen] = {10,30,50,80};
  const Int_t iColCen[nCen] = {kRed,kOrange+1,kBlue,kGray+1};

  const Int_t iMarkerF[kMaxFiles] = {kFullCircle,kOpenCircle};// for putting different jet cents onto one plot
  
  TH1D* hSpectrumTracks[kMaxFiles][nCen] = {0,};
  TH1D* hSpectrumJets[kMaxFiles][nCen] = {0,};

  bool scaleNevent = true; 

  Int_t iF = 0;
  sinputFile[iF] = "~/Dropbox/SharedJets/Christian/Files/PWG4_JetTasksOutput_Merge_LHC10h_AOD_110429a.root";
  //  sinputDir[iF] = "PWG4_spec2_clustersAOD_ANTIKT04_B2_Filter00128_Cut02000_Skip02_clustersAOD_ANTIKT04_B0_Filter00128_Cut02000_Skip02_0000000000_Class00";
  sinputDir[iF] = "PWG4_spec2_clustersAOD_ANTIKT04_B2_Filter00128_Cut00150_Skip02__0000000000_Class00";
  sinputJet[iF] = "anti-k_{T}, R = 0.4 (150 MeV cut)";
  fhnJetPtRec[iF] =  (THnSparseF*)GetObjectFromFile("fhnJetPtRec",sinputFile[iF].Data(),sinputDir[iF].Data());
  fhnTrackPtRec[iF] =  (THnSparseF*)GetObjectFromFile("fhnTrackPtRec",sinputFile[iF].Data(),sinputDir[iF].Data());
  fhnEvent[iF] = (THnSparseF*) GetObjectFromFile("fhnEvent",sinputFile[iF].Data(),sinputDir[iF].Data());
  fh1Centrality[iF] = (TH1F*)GetObjectFromFile("fh1Centrality",sinputFile[iF].Data(),sinputDir[iF].Data());

  Int_t iF = 1;
  sinputFile[iF] = "~/Dropbox/SharedJets/Christian/Files/PWG4_JetTasksOutput_Merge_LHC10h_AOD_110429a.root";
  sinputDir[iF] = "PWG4_spec2_clustersAOD_ANTIKT04_B2_Filter00128_Cut02000_Skip02_clustersAOD_ANTIKT04_B0_Filter00128_Cut02000_Skip02_0000000000_Class00";
  sinputJet[iF] = "anti-k_{T}, R = 0.4 (2 GeV cut)";
  fhnJetPtRec[iF] =  (THnSparseF*)GetObjectFromFile("fhnJetPtRec",sinputFile[iF].Data(),sinputDir[iF].Data());
  fhnTrackPtRec[iF] =  (THnSparseF*)GetObjectFromFile("fhnTrackPtRec",sinputFile[iF].Data(),sinputDir[iF].Data());
  fh1Centrality[iF] = (TH1F*)GetObjectFromFile("fh1Centrality",sinputFile[iF].Data(),sinputDir[iF].Data());

  fhnEvent[iF] = (THnSparseF*) GetObjectFromFile("fhnEvent",sinputFile[iF].Data(),sinputDir[iF].Data());

  TLatex *txtHead = new TLatex();
  txtHead->SetNDC();
  txtHead->SetTextAlign(23);
  
  
  Float_t yMin = 1;

  for(int iF = 0;iF<kMaxFiles;iF++){
    Bool_t bFirst1 = true;
    for(int ic = 0;ic <nCen;ic++){
      // project out the jets
      Int_t ibLo =      fhnJetPtRec[iF]->GetAxis(2)->FindBin(fCentLo[ic]+0.001);
      Int_t ibUp =      fhnJetPtRec[iF]->GetAxis(2)->FindBin(fCentUp[ic]-0.001);

      Float_t nEvents =   fh1Centrality[iF]->Integral(fh1Centrality[iF]->FindBin(fCentLo[ic]+0.001),
						       fh1Centrality[iF]->FindBin(fCentUp[ic]-0.001));

      fhnJetPtRec[iF]->GetAxis(2)->SetRange(ibLo,ibUp);
      fhnJetPtRec[iF]->GetAxis(0)->SetRange(3,3); // take all jets

      hSpectrumJets[iF][ic] = fhnJetPtRec[iF]->Projection(1,"E");
      hSpectrumJets[iF][ic]->SetName(Form("hSpectrumJets_%d_C%d",iF,ic));

      SetHistoAttributes(hSpectrumJets[iF][ic],kFullCircle,iColCen[ic]);
      hSpectrumJets[iF][ic]->Rebin(2);
      hSpectrumJets[iF][ic]->SetAxisRange(0,100);
      hSpectrumJets[iF][ic]->SetMinimum(0.1);
      hSpectrumJets[iF][ic]->SetXTitle("p_{T} (GeV/c)");      


      for(int ib = 1;ib <=hSpectrumJets[iF][ic]->GetNbinsX();ib++){
	Float_t width =  hSpectrumJets[iF][ic]->GetBinWidth(ib);
	hSpectrumJets[iF][ic]->SetBinContent(ib,hSpectrumJets[iF][ic]->GetBinContent(ib)/width);
	hSpectrumJets[iF][ic]->SetBinError(ib,hSpectrumJets[iF][ic]->GetBinError(ib)/width);
      }
      if(scaleNevent&&nEvents>0){
	Printf("%d %E events",ic,nEvents);
	hSpectrumJets[iF][ic]->Scale(1./nEvents);
	hSpectrumJets[iF][ic]->SetYTitle("1/N_{evt} dN/dp_{T}d#eta");      
	if(yMin>1./nEvents&&(iCenFlag&1<<ic))yMin=1./nEvents;
      }
      else{
	hSpectrumJets[iF][ic]->SetYTitle("dN/dp_{T}d#eta");      
      }

      // project out the tracks
      fhnTrackPtRec[iF]->GetAxis(2)->SetRange(ic+1,ic+1);
      fhnTrackPtRec[iF]->GetAxis(0)->SetRange(2,2); // take all tracks

      hSpectrumTracks[iF][ic] = fhnTrackPtRec[iF]->Projection(1,"E");
      hSpectrumTracks[iF][ic]->SetName(Form("hSpectrumTracks_%d_C%d",iF,ic));

      SetHistoAttributes(hSpectrumTracks[iF][ic],kFullCircle,iColCen[ic]);
      hSpectrumTracks[iF][ic]->SetAxisRange(0,300);
      hSpectrumTracks[iF][ic]->SetMinimum(0.1);
      hSpectrumTracks[iF][ic]->SetXTitle("p_{T} (GeV/c)");

      
      for(int ib = 1;ib <=hSpectrumTracks[iF][ic]->GetNbinsX();ib++){
	Float_t width =  hSpectrumTracks[iF][ic]->GetBinWidth(ib);
	hSpectrumTracks[iF][ic]->SetBinContent(ib,hSpectrumTracks[iF][ic]->GetBinContent(ib)/width/1.8);
	hSpectrumTracks[iF][ic]->SetBinError(ib,hSpectrumTracks[iF][ic]->GetBinError(ib)/width);
      }
      if(scaleNevent&&nEvents>0){
	Printf("%d %E events",ic,nEvents);
	hSpectrumTracks[iF][ic]->Scale(1./nEvents);
	hSpectrumTracks[iF][ic]->SetYTitle("1/N_{evt} dN/dp_{T}d#eta");      
      }
      else{
	hSpectrumTracks[iF][ic]->SetYTitle("dN/dp_{T}d#eta");      
      }
    }   
  }   

  // the drawin part

  // draw the spectra for all cents
  if(iPlotFlag&1<<0){
    
    for(int iF = 0;iF<kMaxFiles;iF++){
      Bool_t bFirst1 = true;

      TLegend *leg1 = new TLegend(0.58,0.55,0.85,0.85);
      leg1->SetFillColor(0);
      leg1->SetTextFont(gStyle->GetTextFont());
      leg1->SetBorderSize(0);
      leg1->SetTextAlign(12);
      leg1->SetTextSize(0.028);

      if(!iSpecFlag&1){
	leg1->SetHeader(sinputJet[iF].Data());
      }
      for(int ic = 0;ic <nCen;ic++){
	if(!(iCenFlag&(1<<ic)))continue;
	c1->cd();
	if(bFirst1){
	  hSpectrumJets[iF][ic]->SetMinimum(yMin/10.);
	  hSpectrumJets[iF][ic]->DrawCopy("p");
	  bFirst1 = false;
	}
	else {
	  hSpectrumJets[iF][ic]->DrawCopy("psame");
	}
	/*
	leg1->AddEntry((TObject*)0,Form("%2.0f - %2.0f%%",fCentLo[ic],fCentUp[ic]),"");  
	leg1->AddEntry(hSpectrumJets[iF][ic],Form("jets: %s",sinputJet[iF].Data()), "P");
	*/
	if(iSpecFlag&1){
	  hSpectrumTracks[iF][ic]->DrawCopy("histsame");
	  leg1->AddEntry((TObject*)0,Form("%2.0f - %2.0f%%",fCentLo[ic],fCentUp[ic]),"");  
	  leg1->AddEntry(hSpectrumJets[iF][ic],Form("jets: %s",sinputJet[iF].Data()), "P");
	  leg1->AddEntry(hSpectrumTracks[iF][ic],Form("tracks"), "L");
	}
	else{
	  leg1->AddEntry(hSpectrumJets[iF][ic],Form("%2.0f - %2.0f%%",fCentLo[ic],fCentUp[ic]), "P");
	}
      }



  
      txtHead->DrawLatex(0.5,0.99,"LHC2010 Pb-Pb #sqrt{s_{NN}} = 2.76 TeV");
      leg1->Draw();
      

      DrawALICE(c1,iALICEType,0.3,0.35);
      
      c1->Update();
      picName = Form("%sCentSpectraPbPb_Jets%s_%d_%d.%s",picPrefix.Data(),(iSpecFlag&1?"Tracks":""),iCenFlag,iF,picSuffix.Data());
      c1->SaveAs(picName.Data());
      if(!gROOT->IsBatch()){
	if(getchar()=='q')return 1;
      }
    }
  }

  // draw the spectra for each cent togeter
  if(iPlotFlag&1<<1){


      for(int ic = 0;ic <nCen;ic++){

	if(!(iCenFlag&(1<<ic)))continue;
    

	Bool_t bFirst1 = true;
	
	TLegend *leg1 = new TLegend(0.45,0.55,0.8,0.85);
	leg1->SetFillColor(0);
	leg1->SetTextFont(gStyle->GetTextFont());
	leg1->SetBorderSize(0);
	leg1->SetTextAlign(12);
	
	for(int iF = 0;iF<kMaxFiles;iF++){
	  c1->cd();
	  hSpectrumJets[iF][ic]->SetMarkerStyle(iMarkerF[iF]);
	  if(bFirst1){
	    leg1->AddEntry((TObject*)0,Form("%2.0f - %2.0f%%",fCentLo[ic],fCentUp[ic]),"");  
	  }
	  if(bFirst1){
	    hSpectrumJets[iF][ic]->SetMinimum(yMin/10.);
	    hSpectrumJets[iF][ic]->DrawCopy("p");
	    if(iSpecFlag&1){
	      hSpectrumTracks[iF][ic]->DrawCopy("histsame");
	      leg1->AddEntry(hSpectrumTracks[iF][ic],Form("tracks"), "L");
	    }
	    bFirst1 = false;
	  }
	  else {
	    hSpectrumJets[iF][ic]->DrawCopy("psame");
	  }
	  leg1->AddEntry(hSpectrumJets[iF][ic],Form("jets: %s",sinputJet[iF].Data()), "P");
	}
	txtHead->DrawLatex(0.5,0.99,"LHC2010 Pb-Pb #sqrt{s_{NN}} = 2.76 TeV");
	leg1->Draw();

	DrawALICE(c1,iALICEType,0.26,0.35);
	c1->Update();
	picName = Form("%sCmpSpectraPbPb_Jets%s_%d.%s",picPrefix.Data(),(iSpecFlag&1?"Tracks":""),ic,picSuffix.Data());
	c1->SaveAs(picName.Data());
	if(!gROOT->IsBatch()){
	  if(getchar()=='q')return 1;
	}
      }
  }


  return 0;
}

Int_t PlotSubtract(Int_t iALICEType){



  gStyle->SetTitleYSize(0.7*gStyle->GetTitleYSize());
  gStyle->SetTitleXSize(0.7*gStyle->GetTitleXSize());
  gStyle->SetPadRightMargin(1.1*gStyle->GetPadRightMargin());
  gStyle->SetPadLeftMargin(0.9*gStyle->GetPadLeftMargin());
  gStyle->SetPadBottomMargin(0.7*gStyle->GetPadBottomMargin());
  gROOT->ForceStyle();


  // Using now the THNSparse histos
  // 

  TCanvas *c1 = new TCanvas("c11","",700,600); // create with good aspect ratios...
  c1->SetLogz();


  const int kMaxFiles = 2;
  TString sinputFile[kMaxFiles];
  TString sinputDir[kMaxFiles];
  TString sLegend[kMaxFiles];




  // Parameter
  Float_t fMaxMult[kMaxFiles] = {0,};
  Float_t fMaxRho[kMaxFiles] = {0,};
  Float_t fMaxSigma[kMaxFiles] = {0,};


  TH2F* fh2CentvsRho[kMaxFiles]= {0,};
  TH2F* fh2MultvsRho[kMaxFiles]= {0,};
  TH2F* fh2CentvsSigma[kMaxFiles]= {0,};
  TH2F* fh2MultvsSigma[kMaxFiles]= {0,};
  


  const Int_t nSub = 3;
  THnSparseF* hnDPtAreaCentMult[kMaxFiles][nSub] = {0,};

  Int_t iF = 0;
  sinputFile[iF] = "~/Dropbox/SharedJets/Bastian/Files/PWG4_JetTasksOutput.root";
  sinputDir[iF] = "pwg4JetSubtract_B2";
  sLegend[iF] = "FastJet k_{T} R = 0.4 (cut 150 MeV)";
  fMaxMult[iF] = 3500;
  fMaxRho[iF] = 250;
  fMaxSigma[iF] = 40;
  iF++;
  
  sinputFile[iF] = "~/Dropbox/SharedJets/Bastian/Files/PWG4_JetTasksOutput.root";
  sinputDir[iF] = "pwg4JetSubtract_B2_Cut2000";
  sLegend[iF] = "B2 (2000 MeV)";
  fMaxMult[iF] = 300;
  fMaxRho[iF] = 50;
  fMaxSigma[iF] = 10;
  
  

  for(iF = 0;iF<kMaxFiles;iF++){
    if(sinputFile[iF].Length()==0)continue;
    // fetch all the histos
    fh2CentvsRho[iF]= (TH2F*) GetObjectFromFile("fh2CentvsRho",sinputFile[iF].Data(),sinputDir[iF].Data(),"PWG4_","pwg4");
    fh2MultvsRho[iF]= (TH2F*) GetObjectFromFile("fh2MultvsRho",sinputFile[iF].Data(),sinputDir[iF].Data(),"PWG4_","pwg4");
    fh2CentvsSigma[iF]= (TH2F*) GetObjectFromFile("fh2CentvsSigma",sinputFile[iF].Data(),sinputDir[iF].Data(),"PWG4_","pwg4");
    fh2MultvsSigma[iF]= (TH2F*) GetObjectFromFile("fh2MultvsSigma",sinputFile[iF].Data(),sinputDir[iF].Data(),"PWG4_","pwg4");


    if(!fh2CentvsRho[iF])continue;

    for(int iSub = 0;iSub<nSub;iSub++){
      hnDPtAreaCentMult[iF][iSub] = (THnSparseF*) GetObjectFromFile(Form("hnDPtAreaCentMult_%d",iSub),sinputFile[iF].Data(),sinputDir[iF].Data(),"pwg");
    }

    SetHistAxisStyle(fh2CentvsRho[iF],1.5,1.2,1.1,
		     0,1.1,1.1);
    SetHistAxisStyle(fh2MultvsRho[iF],1.5,1.2,1.1,
		     0,1.1,1.1);

    SetHistAxisStyle(fh2CentvsSigma[iF],1.5,1.2,1.1,
		     0,1.1,1.1);
    SetHistAxisStyle(fh2MultvsSigma[iF],1.5,1.2,1.1,
		     0,1.1,1.1);



    TLatex *txt = new TLatex();
    txt->SetNDC();
    txt->SetTextSize(gStyle->GetTextSize()*0.8);
    txt->SetTextAlign(22);

    TLatex *txtHead = new TLatex();
    txtHead->SetNDC();
    txtHead->SetTextAlign(23);

    TProfile *hProf = fh2CentvsRho[iF]->ProfileY(Form("%s_profile_%d",fh2CentvsRho[iF]->GetName(),iF,1,-1,"s"));
    
    fh2CentvsRho[iF]->SetAxisRange(0,400,"Y");
    TGraphErrors *grRho = new TGraphErrors(fh2CentvsRho[iF]->GetNbinsX());
    grRho->SetLineColor(kBlack);
    for(int ib=1;ib<=fh2CentvsRho[iF]->GetNbinsX();ib++){
      TH1D *hProj = fh2CentvsRho[iF]->ProjectionY("hProj",ib,ib);
      hProj->SetBinContent(1,0);
      hProj->SetBinError(1,0);
      Float_t mean = hProj->GetMean();
      Float_t cent = fh2CentvsRho[iF]->GetXaxis()->GetBinCenter(ib);
      Float_t rms = hProj->GetRMS();
      Float_t nEntries = hProj->Integral();
      grRho->SetPoint(ib-1,cent,mean);
      //  if(nEntries)grRho->SetPointError(ib-1,0,rms/TMath::Sqrt(nEntries));
      hProj->Delete();
    }



    fh2CentvsRho[iF]->SetAxisRange(0.,fMaxRho[iF],"Y");
    fh2CentvsRho[iF]->SetYTitle("#rho (GeV/c)");
    fh2CentvsRho[iF]->SetXTitle("V0 centrality (%)");
    fh2CentvsRho[iF]->GetXaxis()->SetRangeUser(0,80);
    fh2CentvsRho[iF]->Draw("colz");

    grRho->Draw("sameC");
    
    txt->DrawLatex(0.5,0.8,sLegend[iF].Data());
    txtHead->DrawLatex(0.5,0.99,"LHC2010 PbPb #sqrt{s_{NN}} = 2.76 TeV");

    DrawALICE(c1,iALICEType,0.6,0.6); 
    c1->Update();
    picName = Form("%sCentVsRho_%d.%s",picPrefix.Data(),iF,picSuffix.Data());
    c1->SaveAs(picName.Data());
    if(!gROOT->IsBatch()){
      if(getchar()=='q')return 1;
    }

    fh2MultvsRho[iF]->SetAxisRange(0.,fMaxRho[iF],"Y");
    fh2MultvsRho[iF]->SetAxisRange(0.,fMaxMult[iF]);
    fh2MultvsRho[iF]->SetXTitle("N^{raw}_{input}");
    fh2MultvsRho[iF]->SetYTitle("#rho (GeV/c)");

    fh2CentvsRho[iF]->SetAxisRange(0,400,"Y");
    Int_t ibMaxM = fh2MultvsRho[iF]->GetXaxis()->FindBin(2600);
    TGraphErrors *grRhoM = new TGraphErrors(ibMaxM-6);
    grRhoM->SetLineColor(kBlack);
    for(int ib=1;ib<ibMaxM;ib++){
      if(ib<4)continue;
      TH1D *hProj = fh2MultvsRho[iF]->ProjectionY("hProj",ib,ib);
      hProj->SetBinContent(1,0);
      hProj->SetBinError(1,0);
      Float_t mean = hProj->GetMean();
      Float_t cent = fh2MultvsRho[iF]->GetXaxis()->GetBinCenter(ib);
      Float_t rms = hProj->GetRMS();
      Float_t nEntries = hProj->Integral();
      if(nEntries>0){
	grRhoM->SetPoint(ib-6,cent,mean);
	//	grRhoM->SetPointError(ib-6,0,rms/TMath::Sqrt(nEntries));
      }
      hProj->Delete();
    }
    grRhoM->Print();

    fh2MultvsRho[iF]->Draw("colz");
    grRhoM->Draw("Csame");
    txt->DrawLatex(0.5,0.8,sLegend[iF].Data());
    txtHead->DrawLatex(0.5,0.99,"LHC2010 PbPb #sqrt{s_{NN}} = 2.76 TeV");
    DrawALICE(c1,iALICEType,0.4,0.7); 
    c1->Update();
    picName = Form("%sMultVsRho_%d.%s",picPrefix.Data(),iF,picSuffix.Data());
    c1->SaveAs(picName.Data());
    if(!gROOT->IsBatch()){
      if(getchar()=='q')return 1;
    }

    fh2MultvsSigma[iF]->SetAxisRange(0.,fMaxMult[iF]);
    fh2MultvsSigma[iF]->SetAxisRange(0.,fMaxSigma[iF],"Y");
    fh2MultvsSigma[iF]->SetXTitle("N^{raw}_{input}");
    fh2MultvsSigma[iF]->SetYTitle("#sigma (GeV/c)");

    fh2MultvsSigma[iF]->Draw("colz");
    txt->DrawLatex(0.3,0.7,sLegend[iF].Data());
    txtHead->DrawLatex(0.5,0.99,"LHC2010 PbPb #sqrt{s_{NN}} = 2.76 TeV");
    DrawALICE(c1,iALICEType); 
    c1->Update();
    picName = Form("%sMultVsSigma_%d.%s",picPrefix.Data(),iF,picSuffix.Data());
    c1->SaveAs(picName.Data());
    if(!gROOT->IsBatch()){
      if(getchar()=='q')return 1;
    }

    fh2CentvsSigma[iF]->SetAxisRange(0.,fMaxSigma[iF],"Y");
    fh2CentvsSigma[iF]->SetYTitle("#sigma (GeV/c)");
    fh2CentvsSigma[iF]->SetXTitle("V0 centrality (%)");
    fh2CentvsSigma[iF]->GetXaxis()->SetRangeUser(0,80);
    fh2CentvsSigma[iF]->Draw("colz");


    fh2CentvsSigma[iF]->Draw("colz");
    txt->DrawLatex(0.3,0.7,sLegend[iF].Data());
    txtHead->DrawLatex(0.5,0.99,"LHC2010 PbPb #sqrt{s_{NN}} = 2.76 TeV");
    DrawALICE(c1,iALICEType); 
    c1->Update();
    picName = Form("%sCentVsSigma_%d.%s",picPrefix.Data(),iF,picSuffix.Data());
    c1->SaveAs(picName.Data());
    if(!gROOT->IsBatch()){
      if(getchar()=='q')return 1;
    }


  }

  return 0;
  Bool_t bFirst1 = true;
  iF = 0;
  for(int ic = 0;ic <10;ic++){  
    Int_t iSub = 2;
    hnDPtAreaCentMult[iF][iSub]->GetAxis(2)->SetRange(ic+1,ic+1);
    TH2D *hDptArea = hnDPtAreaCentMult[iF][iSub]->Projection(0,1,"E");
    hDptArea->SetName(Form("hDptArea_C%d_%d",ic,iSub));
    hDptArea->Draw("colz");
    c1->Update();
    if(getchar()=='q')return 1;
  }

  
  return 0;

}


Int_t PlotSpectraPbPb(){

  // PLot the simple 1D histos from the spectrum task
  //
  const Int_t iRebin = 4;
  const int kMaxFiles = 5;

  Double_t yMin = 0.01;
  Double_t yMax = 1E+07;

  TString sinputFile[kMaxFiles];
  TFile*  inputFile[kMaxFiles] = {kMaxFiles*0};
  TString sinputDir[kMaxFiles];
  TDirectory *inputDir[kMaxFiles] = {kMaxFiles*0};
  TString sinputList[kMaxFiles];  
  TString sCen[kMaxFiles];  
  TList*  inputList[kMaxFiles] = {kMaxFiles*0};
  //  TString sinputLegend[kMaxFiles];
  TString sinputJet[kMaxFiles];
  Int_t kColor[kMaxFiles];
  Float_t nColl[kMaxFiles];

  bool bLogLog = false;
  //  const Int_t kRef = 1; // anti -kT

  // 
  TH1F* hJets[kMaxFiles];

  const int nJets = 2;

  Int_t iJF = 0;
  sinputFile[iJF]  = "~/alice/data/analysis/train/LHC10h_110116/PWG4_JetTasksOutput.root";
  //  sinputFile[iJF]  = "~/alice/data/analysis/train_maf/output_110210.root";
  sinputDir[iJF]  = "PWG4_spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class00";
  sinputList[iJF]  = "pwg4spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class00";
  sinputJet[iJF] = "anti-k_{T} R = 0.4";
  sCen[iJF] = " 0-80%";
  kColor[iJF] = kBlack;
  nColl[iJF] = 453.3; 
  iJF++;

  //  sinputFile[iJF]  = "../output/PWG4_JetTasksOutput_Merge_051205b_Subtract3_UA1.root"; 
  sinputFile[iJF]  = "~/alice/data/analysis/train/LHC10h_110116/PWG4_JetTasksOutput.root";
  //  sinputFile[iJF]  = "~/alice/data/analysis/train_maf/output_110210.root";
  sinputDir[iJF]  = "PWG4_spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class01";
  sinputList[iJF]  = "pwg4spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class01"; 
 sinputJet[iJF] = " 0-10% Anti-k_{T} R = 0.4";
  sCen[iJF] = " 0-10%";
  kColor[iJF] = kRed;
  nColl[iJF] = 1502; 
  iJF++;

  //  sinputFile[iJF]  = "../output/PWG4_JetTasksOutput_Merge_051205b_Subtract3_UA1.root"; 
  sinputFile[iJF]  = "~/alice/data/analysis/train/LHC10h_110116/PWG4_JetTasksOutput.root";
  //  sinputFile[iJF]  = "~/alice/data/analysis/train_maf/output_110210.root";
  sinputDir[iJF]  = "PWG4_spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class02";
  sinputList[iJF]  = "pwg4spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class02"; 
  sinputJet[iJF] = "10-30% Anti-k_{T} R = 0.4";
  sCen[iJF] = "10-30%";
  kColor[iJF] = kRed-4;
  nColl[iJF] = 742.5; 
  iJF++;

  //  sinputFile[iJF]  = "../output/PWG4_JetTasksOutput_Merge_051205b_Subtract3_UA1.root"; 
  sinputFile[iJF]  = "~/alice/data/analysis/train/LHC10h_110116/PWG4_JetTasksOutput.root";
  //  sinputFile[iJF]  = "~/alice/data/analysis/train_maf/output_110210.root";
  sinputDir[iJF]  = "PWG4_spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class03";
  sinputList[iJF]  = "pwg4spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class03"; 
  sinputJet[iJF] = "30-50% Anti-k_{T} R = 0.4";
  sCen[iJF] = "30-50%";
  kColor[iJF] = kRed-7;
  nColl[iJF] = 250; 
  iJF++;

  //  sinputFile[iJF]  = "../output/PWG4_JetTasksOutput_Merge_051205b_Subtract3_UA1.root"; 
  sinputFile[iJF]  = "~/alice/data/analysis/train/LHC10h_110116/PWG4_JetTasksOutput.root";
  //  sinputFile[iJF]  = "~/alice/data/analysis/train_maf/output_110210.root";
  sinputDir[iJF]  = "PWG4_spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class04";
  sinputList[iJF]  = "pwg4spec2_clustersAOD_ANTIKT04_B3_Filter00256_Cut00150_Skip00_clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip00_0000000000_Class04"; 
  sinputJet[iJF] = "Anti-k_{T} R = 0.4";
  sCen[iJF] = "50-80%";
  kColor[iJF] = kRed-9;
  nColl[iJF] = 46.6; 
  iJF++;


  for(int iF = 0; iF < kMaxFiles;iF++){
    if(sinputFile[iF].Length()==0)continue;
    if(gROOT->GetListOfFiles()->FindObject(sinputFile[iF].Data())){
      inputFile[iF] = (TFile*)gROOT->GetListOfFiles()->FindObject(sinputFile[iF].Data());
    }
    else {
      inputFile[iF] = TFile::Open(sinputFile[iF].Data());
    }
    inputDir[iF] = (TDirectory*)inputFile[iF]->Get(sinputDir[iF].Data());
    if(!inputDir[iF]){
      Printf("Dir not found %s",sinputDir[iF].Data());
      continue;
    }
    inputList[iF] = (TList*)inputDir[iF]->Get(sinputList[iF].Data());
    if(!inputList[iF]){
      Printf("List not found %s",sinputList[iF].Data());
      continue;
    }
  }


 

  TCanvas *c1 = new TCanvas("c1","spectra",20,20,800,600);
  TCanvas *c2 = new TCanvas("c2","ratio",820,20,800,600);

  TLegend *leg1 = new TLegend(0.45,0.65,0.7,0.85);
  leg1->SetHeader(Form("%s |#eta| < 0.4",sinputJet[0].Data()));
  leg1->SetFillColor(0);
  leg1->SetTextFont(gStyle->GetTextFont());
  leg1->SetBorderSize(0);

  char *cMaskRec = "fh1PtRecIn_j%d";
  
  c1->SetLogy();
  if(bLogLog)c1->SetLogx();
    
  for(int iF = 0; iF < kMaxFiles;iF++){
    if(sinputFile[iF].Length()==0)continue;
    // Draw the jet spectra
    if(!inputList[iF])continue;
    TH1F *hRec[nJets+1];
    HistsFromSingleJets(cMaskRec,inputList[iF],nJets,hRec,iRebin);
    /// TH1F *hRec[nJets] = (TH1F*)inputList[iF]->FindObject("fh1PtJetsRecIn");    hRec[nJets]->Rebin(iRebin);

    hRec[nJets]->SetMarkerStyle(kFullCircle);
    hRec[nJets]->SetXTitle("p_{T} (GeV/c)");
    hRec[nJets]->SetMarkerColor(kColor[iF]);
    hRec[nJets]->Scale(1./1.6); // deta
    hRec[nJets]->Scale(1./hRec[nJets]->GetBinWidth(1));

    hRec[nJets]->SetYTitle("dN/dp_{T}dy");

    if(true){

      ScaleNevent(hRec[nJets], inputFile[iF],AliAnalysisTaskJetServices::kSelected,0,iF); // <----- careful assumes  iCen == iF      
      hRec[nJets]->SetYTitle("1/N_{evt} dN/dp_{T}");
      //      Printf("%d Ncall %f",iF,nColl[iF]); 
      //      hRec[nJets]->Scale(1./nColl[iF]);
      //      hRec[nJets]->SetYTitle("1/(N_{coll}*(N_{evt}) dN/dp_{T}dy");
      yMin = 1E-8;
      yMax = 1;
    }
    if(sCen[iF].Length()){
      leg1->AddEntry(hRec[nJets],Form("%s",sCen[iF].Data()),"P");
    }

    hJets[iF] = hRec[nJets];
    c1->cd();

  
    if(bLogLog)hRec[nJets]->SetAxisRange(5,100);
    else hRec[nJets]->SetAxisRange(1,100);

    if(iF==0){
      if(yMax>0) hRec[nJets]->SetMaximum(yMax);
      if(yMin>0) hRec[nJets]->SetMinimum(yMin);
      hRec[nJets]->DrawCopy("P");
    }
    else{
     if(sinputJet[iF].Length())hRec[nJets]->DrawCopy("Psame");
    }
    c1->Update();
    if(getchar()=='q')return 1;
  }


  c1->Update();
  picName = "jetspectrumPbPb";
  if(bLogLog)picName += "LogLog";
  leg1->Draw("same");
  TLatex *txt = 0;
  txt = new TLatex(5,0.1,"LHC2010 Pb-Pb #sqrt{s_{NN}} = 2.76 TeV");
  txt->SetTextSize(gStyle->GetTextSize()*0.8);
  txt->Draw();
  ALICEWorkInProgress(c1,"02/15/2011");
  c1->SaveAs(Form(cPrintMask,picName.Data()));
  if(getchar()=='q')return 1;


  c2->cd();
  leg1->Draw("same");




  picName = "jetspectrumLabels";
  c2->SaveAs(Form(cPrintMask,picName.Data()));
  if(getchar()=='q')return 1;

  // scale with nColl
  for(int iF = 0; iF < kMaxFiles;iF++){
    if(sinputFile[iF].Length()==0)continue;
    if(!hJets[iF])continue;
    Printf("%d Ncoll %f",iF,nColl[iF]); 
    hJets[iF]->Scale(1./nColl[iF]);
    hJets[iF]->SetYTitle("1/(N_{coll}*(N_{evt}) dN/dp_{T}dy");
  }

  const Int_t nPSmear = 9;
  TH1F *hPythia[nPSmear];
  // Fetch the smeared pythia spectra

  TString pName;
  c2->SetLogy();
  TH1F* hRatio[kMaxFiles];

  for(int i = 0;i < nPSmear;i++){
    if(i==nPSmear-1){
      pName = "h1JetPtCh";
      hPythia[i] = GetPythia8Spectrum(pName.Data(),"~/alice/sim/pythia8/examples/output/LHCJets_2.75TeV_allpt_R04.root",1.0,iRebin);
    }
    else {
      pName = Form("h1JetPtCh_C%02d_j%%d",i);
      hPythia[i] = GetPythia8Spectrum(pName.Data(),"~/alice/sim/pythia8/examples/output/LHCJets_2.75TeV_allpt_R04.root",1.0,iRebin,nJets);
    } 
    hPythia[i]->SetMarkerStyle(kOpenCircle);
    hPythia[i]->SetMarkerColor(kBlack);
    hPythia[i]->SetYTitle("1/(N_{coll}*N_{evt}) dN/dp_{T}dy");
    hPythia[i]->SetAxisRange(0,100);
    c1->cd();
    hPythia[i]->Draw("CP");
    hPythia[i]->SetMaximum(1E-02);
    hPythia[i]->SetMinimum(1E-09);
    for(int iF = 0; iF < kMaxFiles;iF++){
      if(sinputFile[iF].Length()==0)continue;
      if(!hJets[iF])continue;
      
      c1->cd();
      hJets[iF]->Draw("psame");

      c2->cd();
      hRatio[iF] = (TH1F*)hJets[iF]->Clone(Form("hRatio%d",iF));
      hRatio[iF]->SetMaximum(100);
      hRatio[iF]->SetMinimum(0.01);
      hRatio[iF]->Divide(hPythia[i]);
      hRatio[iF]->SetYTitle("Ratio");
      if(iF==0) hRatio[iF]->DrawCopy("p");
      else hRatio[iF]->DrawCopy("psame");
      c1->Update();
      c2->Update();
    }

    if(getchar()=='q')return 1;
    picName = Form("jetspectrumRatioPbPb_Smear%d",i);
    c2->SaveAs(Form(cPrintMask,picName.Data()));
    picName = Form("jetspectrumPbPb_Smear%d",i);
    c1->SaveAs(Form(cPrintMask,picName.Data()));
    if(getchar()=='q')return 1;

  }
  c1->cd();
  hPythia[nPSmear-1]->DrawCopy("P");
  for(int i = 0;i < nPSmear-1;i++){
    c1->cd();
    hPythia[i]->SetMarkerStyle(kFullCircle);
    hPythia[i]->SetMarkerColor(kRed-9+i);
    hPythia[i]->DrawCopy("psame");

    TH1F *hRatioS = (TH1F*)hPythia[i]->Clone(Form("hPythia_%d",i));
    hRatioS->Divide(hPythia[nPSmear-1]);
    hRatioS->SetMaximum(1E5);
    hRatioS->SetMinimum(0.1);
    hRatioS->SetYTitle("Ratio");
    c2->cd();
    if(i==0)hRatioS->DrawCopy("p");
    else hRatioS->DrawCopy("psame");
    c1->Update();
    c2->Update();
    if(getchar()=='q')return 1;
  }

  if(getchar()=='q')return 1;
  picName = Form("jetSmearRatio");
  c2->SaveAs(Form(cPrintMask,picName.Data()));
  picName = Form("jetSmear");
  c1->SaveAs(Form(cPrintMask,picName.Data()));
  if(getchar()=='q')return 1;

  // fetch the jet spectrum first


  c1->cd();
  TH1F *hPythiaRef = GetPythia8Spectrum(pName.Data(),"~/alice/sim/pythia8/examples/output/LHCJets_2.75TeV_allpt_R04.root",1.0,1);
  hPythiaRef->Draw();
  c1->Update();
  Float_t fMinPt[kMaxFiles];
  for(int iF = 0; iF < kMaxFiles;iF++){
    if(nColl[iF]<=0)continue;
      for(int i = hPythiaRef->GetNbinsX();i >0;i--){
	if(hPythiaRef->GetBinContent(i)>1./nColl[iF]){
	   fMinPt[iF] = hPythiaRef->GetBinCenter(i);
	   break;
	}
      }
      Printf("Ncoll %4.1f Min Pt %3.1f",nColl[iF],fMinPt[iF]);
  }

  char *cFile = "~/alice/sim/pythia8/examples/output/LHCJets_2.75TeV_allpt_R04.root";
  TFile *fIn = (TFile*)gROOT->GetListOfFiles()->FindObject(cFile);
  if(!fIn) fIn  = TFile::Open(cFile);
  if(!fIn)return 0;

  TH1D* hPythia2[nPSmear];
  for(int i = 0;i < nPSmear-1;i++){

    TH2F *hCorrelation = 0;
    for(int ij = 0;ij<2;ij++){
      TH2F* hTmp = (TH2F*)fIn->Get(Form("h2SmearCorrelationCh_C%02d_j%d",i,ij));
      if(hTmp&&!hCorrelation)hCorrelation = (TH2F*)hTmp->Clone(Form("%s_%d",hTmp->GetName(),i));
      else if (hTmp) hCorrelation->Add(hTmp);
    }
    c1->cd();
    
    hPythia2[i] = hCorrelation->ProjectionY(Form("hPythia2_%d",i),10,300);
    hPythia2[i]->SetMarkerStyle(kFullCircle);
    hPythia2[i]->SetMarkerColor(kRed-9+i);
    hPythia2[i]->Rebin(iRebin);
    hPythia2[i]->SetAxisRange(0,100);
    hPythia2[i]->Scale(1./hPythia2[i]->GetBinWidth(1)); 
    //  hist->Scale(1./xsec);
    hPythia2[i]->Scale(1./1.); // deta
    
    //  Double_t xtotal = 71.39; // xtotal for 7 TeV!!
    Double_t xtotal = 62.01; // xtotal for 2.76 TeV!!
    // scale with fraction of total NSD cross section
    hPythia2[i]->Scale(1/xtotal);



    c1->cd();
    if(i==0)hPythia2[i]->DrawCopy("p");
    else hPythia2[i]->DrawCopy("psame");

    TH1F *hRatioS = (TH1F*)hPythia2[i]->Clone(Form("hPythia2_%d",i));
    hRatioS->Divide(hPythia[nPSmear-1]);
    hRatioS->SetMaximum(1E5);
    hRatioS->SetMinimum(0.1);
    hRatioS->SetYTitle("Ratio");
    c2->cd();
    if(i==0)hRatioS->DrawCopy("p");
    else hRatioS->DrawCopy("psame");
    c1->Update();
    c2->Update();
    if(getchar()=='q')return 1;
  }
  return 0;
}

 

void set_plot_style() {
    const Int_t NRGBs = 5;
    const Int_t NCont = 255;

    Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
    Double_t red[NRGBs]   = { 0.00, 0.00, 0.87, 1.00, 0.51 };
    Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
    Double_t blue[NRGBs]  = { 0.51, 1.00, 0.12, 0.00, 0.00 };
    TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
    gStyle->SetNumberContours(NCont);

    //  TGaxis::SetMaxDigits(3) // set the maximum number of axis digits (exp otherwise)                                             
    //    gStyle->SetPalette(1);
    gStyle->SetCanvasColor(10);
    gStyle->SetHistFillColor(10);
    gStyle->SetHistFillStyle(0);
    gStyle->SetOptTitle(0);
    gStyle->SetOptStat(0);
    gStyle->SetPadLeftMargin(0.17);
    gStyle->SetPadRightMargin(0.14);
    gStyle->SetPadBottomMargin(0.15);
    gStyle->SetPadTickX(1);
  gStyle->SetPadTickY(1);
  gStyle->SetAxisColor(1, "X");
  gStyle->SetAxisColor(1, "Y");
  gStyle->SetAxisColor(1, "Z");
  gStyle->SetLabelColor(1, "X");
  gStyle->SetLabelColor(1, "Y");
  gStyle->SetLabelColor(1, "Z");
  gStyle->SetTickLength(0.03, "X");
  gStyle->SetTickLength(0.03, "Y");
  gStyle->SetTickLength(0.03, "Z");
  gStyle->SetTitleXSize(0.07);
  gStyle->SetTitleYSize(0.07);
  gStyle->SetNdivisions(505, "X");
  gStyle->SetNdivisions(505, "Y");
  gStyle->SetNdivisions(505, "Z");
  gStyle->SetTitleXOffset(1.0);
  gStyle->SetTitleYOffset(1.0);
  gStyle->SetLabelOffset(0.02, "X");
  gStyle->SetLabelOffset(0.02, "Y");
  gStyle->SetLabelOffset(0.02, "Z");
  gStyle->SetLabelSize(0.05, "X");
  gStyle->SetLabelSize(0.05, "Y");
  gStyle->SetLabelSize(0.05, "Z");
  gROOT->ForceStyle();


}


Int_t PlotJetBFluctuations(){
  // plot the diffent background estimates

  const int nCen = 4;
  const Float_t nColl[nCen] = {1502,742.5,250,46.6};
   const Float_t fCentLo[nCen] = {0,10,30,50};
  const Float_t fCentUp[nCen] = {10,30,50,80};
  TH2F *hFrame = new TH2F("hFrame",";#deltap_{T} (GeV/c);Probability/GeV",200,-70,70,100,1E-5,50); 
  hFrame->SetTitleOffset(1.5,"Y");
  hFrame->SetTitleOffset(1.5,"X");
  hFrame->SetLabelSize(hFrame->GetLabelSize("Y")*0.9,"Y");
  hFrame->SetLabelSize(hFrame->GetLabelSize("X")*0.9,"X");
  hFrame->SetTitleSize(hFrame->GetTitleSize("Y")*0.7,"Y");
  hFrame->SetTitleSize(hFrame->GetTitleSize("X")*0.7,"X");


  TString printType = "png"; 
  TString tmpName; 

  TCanvas *c1 = new TCanvas("c11","c1",600,600);
  c1->SetLogy();

  //  TFile::SetCacheFileDir("/tmp/");

  // Martha, single particle jets
  TFile *fM = TFile::Open("~/alice/jets/macros/corrections/tmp/MV_PWG4_JetTasksOutput_AOD_EmbeddingSingleTrack.root");
  TH1D *hDeltaPtM[nCen] = {0};
  TString sDeltaPtM = "";

  // select 
  Float_t fMinPtM = 20;
  Float_t fMaxPtM = 40;
  int iB = 2;

  /*
    0: 0-10%
    1: 10-30%
    2: 30-50%
    3: 50-80%
  */

  for(int ic = 0;ic < nCen;ic++){
    tmpName = Form("PWG4_BkgFluctCent%dB%d",ic,iB);
    sDeltaPtM = Form("tracks %2.0f-%2.0f GeV (MV)",fMinPtM,fMaxPtM);
    TDirectory *dir = (TDirectory*)fM->Get(tmpName.Data());
    if(!dir)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
    tmpName = Form("taskBkgFluctCent%dB%d",ic,iB);
    TList *list = (TList*)dir->Get(tmpName.Data());    
    if(!list)Printf("Line:%d %s not found",__LINE__,tmpName.Data());

    TH3F *h3Tmp = (TH3F*)list->FindObject("fh3PtDeltaPtArea");
    hDeltaPtM[ic] = h3Tmp->ProjectionY(Form("hDeltaM%d",ic),h3Tmp->GetXaxis()->FindBin(fMinPtM),h3Tmp->GetXaxis()->FindBin(fMaxPtM),
				0,-1,"E");
    hDeltaPtM[ic]->Rebin(10);
    Float_t fScale = hDeltaPtM[ic]->Integral("width");
    if(fScale)hDeltaPtM[ic]->Scale(1./fScale);
    hDeltaPtM[ic]->SetMarkerStyle(33);
    hDeltaPtM[ic]->SetMarkerColor(kGreen+2);
    hDeltaPtM[ic]->SetLineColor( hDeltaPtM[ic]->GetMarkerColor());
  }    
  
  // fetch the BiAs
  
  TH1D *hBiaL[nCen];

  TFile *fL = TFile::Open("~/alice/jets/macros/corrections/tmp/2011-03-20_lcm_pw4plots.root");

  for(int ic = 0;ic < nCen;ic++){
    if(iB==1)tmpName = "BiA sa antikt centrality";
    else if (iB==2)tmpName = "BiA va antikt centrality";
    TH2F *h2Tmp = (TH2F*)fL->Get(tmpName.Data());
    if(!h2Tmp)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
    Int_t ibLo = h2Tmp->GetXaxis()->FindBin(fCentLo[ic]);
    Int_t ibUp = h2Tmp->GetXaxis()->FindBin(fCentUp[ic])-1;
    Printf("Line:%d bin %d - %d",__LINE__,ibLo,ibUp);
    hBiaL[ic] = h2Tmp->ProjectionY(Form("hBiaL%d",ic),ibLo,ibUp,"E");
    Float_t fScale =  hBiaL[ic]->Integral("width");
    if(fScale)  hBiaL[ic]->Scale(1./fScale);
    hBiaL[ic]->SetMarkerStyle(kFullCircle);
    hBiaL[ic]->SetMarkerColor(kBlue);
    hBiaL[ic]->SetLineColor( hBiaL[ic]->GetMarkerColor());
  }
  
  TH1D *hBiaRC[nCen];
  TString sBiaRC = "";

  for(int ic = 0;ic < nCen;ic++){
    if(iB==1)tmpName = "BiA sa RC skip0 centrality";
    else if (iB==2)tmpName = "BiA va RC skip0 centrality";
    sBiaRC = "BiA RC";
    TH2F *h2Tmp = (TH2F*)fL->Get(tmpName.Data());
    if(!h2Tmp)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
    Int_t ibLo = h2Tmp->GetXaxis()->FindBin(fCentLo[ic]);
    Int_t ibUp = h2Tmp->GetXaxis()->FindBin(fCentUp[ic])-1;
    Printf("Line:%d bin %d - %d",__LINE__,ibLo,ibUp);
    hBiaRC[ic] = h2Tmp->ProjectionY(Form("hBiaRC%d",ic),ibLo,ibUp,"E");
    Float_t fScale =  hBiaRC[ic]->Integral("width");
    if(fScale)  hBiaRC[ic]->Scale(1./fScale);
    hBiaRC[ic]->SetMarkerStyle(kFullCircle);
    hBiaRC[ic]->SetMarkerColor(kRed);
    hBiaRC[ic]->SetLineColor( hBiaRC[ic]->GetMarkerColor());
  }


  TH1D *hBiaRC2[nCen];
  TString sBiaRC2;
  for(int ic = 0;ic < nCen;ic++){
    if(iB==1)tmpName = "BiA sa RC skip2 centrality";
    else if (iB==2)tmpName = "BiA va RC skip2 centrality";
    sBiaRC2 = "BiA RC (excl. 2 leading jets)";
    TH2F *h2Tmp = (TH2F*)fL->Get(tmpName.Data());
    if(!h2Tmp)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
    Int_t ibLo = h2Tmp->GetXaxis()->FindBin(fCentLo[ic]);
    Int_t ibUp = h2Tmp->GetXaxis()->FindBin(fCentUp[ic])-1;
    Printf("Line:%d bin %d - %d",__LINE__,ibLo,ibUp);
    hBiaRC2[ic] = h2Tmp->ProjectionY(Form("hBiaRC2%d",ic),ibLo,ibUp,"E");
    Float_t fScale =  hBiaRC2[ic]->Integral("width");
    if(fScale)  hBiaRC2[ic]->Scale(1./fScale);
    hBiaRC2[ic]->SetMarkerStyle(kOpenCircle);
    hBiaRC2[ic]->SetMarkerColor(kRed);
    hBiaRC2[ic]->SetLineColor( hBiaRC2[ic]->GetMarkerColor());
  }



  c1->SetLogy(0);
  c1->SetLogz();  
  TLatex *txt = new TLatex();
  txt->SetTextFont(gStyle->GetTextFont());
  txt->SetTextSize(gStyle->GetTextSize()*0.6);

  TLatex *txt2 = new TLatex();
  txt2->SetTextFont(gStyle->GetTextFont());
  txt2->SetTextSize(gStyle->GetTextSize()*0.7);
  txt2->SetTextAlign(22);
  txt2->SetTextColor(kRed);


  if(iB==1)tmpName = "background sa vs multiplicity";
  else if(iB==2)tmpName = "background va vs multiplicity";
  TH2F *h2RhoVsMult = (TH2F*)fL->Get(tmpName.Data());
  if(!h2RhoVsMult)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
  c1->SetMargin(0.15,0.18,0.2,0.10);

  h2RhoVsMult->SetTitleOffset(1.5,"Y");
  h2RhoVsMult->SetTitleOffset(1.5,"X");
  h2RhoVsMult->SetLabelSize(h2RhoVsMult->GetLabelSize("Y")*0.9,"Y");
  h2RhoVsMult->SetLabelSize(h2RhoVsMult->GetLabelSize("X")*0.9,"X");
  h2RhoVsMult->SetTitleSize(h2RhoVsMult->GetTitleSize("Y")*0.7,"Y");
  h2RhoVsMult->SetTitleSize(h2RhoVsMult->GetTitleSize("X")*0.7,"X");
  h2RhoVsMult->SetXTitle("input tracks");
  h2RhoVsMult->SetYTitle("#rho (GeV/unit area)");
  h2RhoVsMult->SetAxisRange(0,3000.);
  h2RhoVsMult->Draw("colz");
  txt->Draw();
  txt->DrawLatex(100,180,"LHC 2010 Pb-Pb Run #sqrt{s_{NN}} = 2.76 TeV");
  //  txt2->DrawLatex(800,150,"ALICE Performance");
  //  txt2->DrawLatex(800,140,"01/03/2011");
  c1->Update();
  c1->SaveAs(Form("rhovsmult_B%d.%s",iB,printType.Data()));
  if(getchar()=='q')return 1;

  if(iB==1)tmpName = "background sa vs centrality";
  else if(iB==2)tmpName = "background va vs centrality";
  TH2F *h2RhoVsCent = (TH2F*)fL->Get(tmpName.Data());
  if(!h2RhoVsCent)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
  h2RhoVsCent->SetXTitle("centrality (%)");
  h2RhoVsCent->SetYTitle("#rho (GeV/unit area)");
  
  h2RhoVsCent->SetTitleOffset(1.5,"Y");
  h2RhoVsCent->SetTitleOffset(1.5,"X");
  h2RhoVsCent->SetLabelSize(h2RhoVsCent->GetLabelSize("Y")*0.9,"Y");
  h2RhoVsCent->SetLabelSize(h2RhoVsCent->GetLabelSize("X")*0.9,"X");
  h2RhoVsCent->SetTitleSize(h2RhoVsCent->GetTitleSize("Y")*0.7,"Y");
  h2RhoVsCent->SetTitleSize(h2RhoVsCent->GetTitleSize("X")*0.7,"X");
  h2RhoVsCent->SetAxisRange(3,200,"Y");
  h2RhoVsCent->Draw("colz");
  //  txt->DrawLatex(20,180,"LHC 2010 Pb-Pb Run #sqrt{s_{NN}} = 2.76 TeV");
  //  txt2->DrawLatex(50,150,"ALICE Performance");
  //  txt2->DrawLatex(50,140,"01/03/2011");
  c1->Update();
  c1->SaveAs(Form("rhovscent_B%d.%s",iB,printType.Data()));
  if(getchar()=='q')return 1;

  // fetch the data from bastian...
  Float_t fMinPtB = fMinPtM;
  Float_t fMaxPtB = fMaxPtM;


  TH1D *hDeltaPtB1[nCen] = {0};
  TString sDeltaPtB1 = "";
  for(int ic = 0;ic < nCen;ic++){
    sDeltaPtB1 = Form("anti-k_{T} embedded jet %2.0f-%2.0f GeV",fMinPtB,fMaxPtB);
    TH2F *hTmp = GetTH2PlotB("~/Dropbox/SharedJets/Bastian/Files/110428/",1,0,ic); // emb jets
    if(!hTmp)Printf("%d %s not found",__LINE__,tmpName.Data());
    int ibLo = hTmp->GetYaxis()->FindBin(fMinPtB);
    int ibUp = hTmp->GetYaxis()->FindBin(fMaxPtB)-1;
    hDeltaPtB1[ic] = hTmp->ProjectionX(Form("fHistDeltaPtB1_c%d",ic),ibLo,ibUp,"E");
    hDeltaPtB1[ic]->SetMarkerStyle(kFullSquare);
    hDeltaPtB1[ic]->SetMarkerColor(kBlue);
    hDeltaPtB1[ic]->SetLineColor(hDeltaPtB1[ic]->GetMarkerColor());
    hDeltaPtB1[ic]->Rebin(2);
    Float_t fScale =  hDeltaPtB1[ic]->Integral("width");
    if(fScale)  hDeltaPtB1[ic]->Scale(1./fScale);
  }


  TH1D *hDeltaPtB2[nCen] = {0};
  TString sDeltaPtB2 = "";
  for(int ic = 0;ic < nCen;ic++){
    sDeltaPtB2 = Form("anti-k_{T} embedded track %2.0f-%2.0f GeV",fMinPtB,fMaxPtB);
    TH2F *hTmp = GetTH2PlotB("~/Dropbox/SharedJets/Bastian/Files/110430/",0,0,ic); // emb jets
    if(!hTmp)Printf("%d %s not found",__LINE__,tmpName.Data());
    int ibLo = hTmp->GetYaxis()->FindBin(fMinPtB);
    int ibUp = hTmp->GetYaxis()->FindBin(fMaxPtB)-1;
    hDeltaPtB2[ic] = hTmp->ProjectionX(Form("fHistDeltaPtB2_c%d",ic),ibLo,ibUp,"E");
    hDeltaPtB2[ic]->SetMarkerStyle(33);
    hDeltaPtB2[ic]->SetMarkerColor(kBlue+4);
    hDeltaPtB2[ic]->SetLineColor(hDeltaPtB2[ic]->GetMarkerColor());
    hDeltaPtB2[ic]->Rebin(2);
    Float_t fScale =  hDeltaPtB2[ic]->Integral("width");
    if(fScale)  hDeltaPtB2[ic]->Scale(1./fScale);
  }



  c1->SetLogy();
  c1->SetMargin(0.15,0.05,0.2,0.05);

  TF1 *gaus = new TF1("gaus","gaus",-60,2);
  TF1 *gaus2 = new TF1("gaus2","gaus",-60,2);
  Double_t mean = 0;
  Double_t sigma = 0;
  Double_t sigma_err = 0;
  TF1* tmpGaus = 0;
  TF1 *gamma0 = new TF1("gamma0",Gamma0,-40,40,4);
  gamma0->SetParameters(1,1,1,1);



  for(int ic = 0;ic < nCen;ic++){
    TLegend *leg1 = new TLegend(0.2,0.65,0.3,0.93);

    leg1->SetHeader(Form("Pb-Pb %2.0f-%2.0f%% R = 0.4 (B%d)",fCentLo[ic],fCentUp[ic],iB));
    leg1->SetFillColor(0);
    leg1->SetTextFont(gStyle->GetTextFont());
    leg1->SetTextSize(gStyle->GetTextSize()*0.6);
    leg1->SetBorderSize(0);
    hFrame->DrawCopy();

    /*
    hBiaL[ic]->DrawCopy("psame");
    leg1->AddEntry(hBiaL[ic],Form("BiA anti-k_{T}"),"P");
    */

    /*
    hBiaRC2[ic]->DrawCopy("psame");
    tmpGaus = FitLHSgaus(hBiaRC2[ic],sigma,sigma_err,mean);
    tmpGaus->SetRange(-40,40);
    tmpGaus->SetLineColor( hBiaRC2[ic]->GetLineColor());
    tmpGaus->SetLineStyle(kDashed);
    tmpGaus->Draw("same");
    leg1->AddEntry(hBiaRC2[ic],sBiaRC2.Data(),"P");
    leg1->AddEntry(tmpGaus,Form("LHS Gaus fit: #mu = %2.2f, #sigma = %2.2f",mean,sigma),"L");
    */    

    hBiaRC[ic]->DrawCopy("psame");
    hBiaRC[ic]->Fit(gamma0);
    c1->Update();
    if(getchar()=='q')return 1;
    continue;


    tmpGaus = FitLHSgaus(hBiaRC[ic],sigma,sigma_err,mean);
    tmpGaus->SetRange(-40,40);
    tmpGaus->SetLineColor( hBiaRC[ic]->GetLineColor());
    tmpGaus->Draw("same");
    leg1->AddEntry(hBiaRC[ic],sBiaRC.Data(),"P");
    leg1->AddEntry(tmpGaus,Form("LHS Gauss fit: #mu = %2.2f, #sigma = %2.2f",mean,sigma),"L");
    
    hDeltaPtB1[ic]->Draw("psame");
    tmpGaus = FitLHSgaus(hDeltaPtB1[ic],sigma,sigma_err,mean);
    tmpGaus->SetRange(-40,40);
    tmpGaus->SetLineColor( hDeltaPtB1[ic]->GetLineColor());
    tmpGaus->Draw("same");
    leg1->AddEntry(hDeltaPtB1[ic],sDeltaPtB1.Data(),"P");
    leg1->AddEntry(tmpGaus,Form("LHS Gauss fit: #mu = %2.2f, #sigma = %2.2f",mean,sigma),"L");


    hDeltaPtB2[ic]->Draw("psame");
    tmpGaus = FitLHSgaus(hDeltaPtB2[ic],sigma,sigma_err,mean);
    tmpGaus->SetRange(-40,40);
    tmpGaus->SetLineColor( hDeltaPtB2[ic]->GetLineColor());
    tmpGaus->Draw("same");
    leg1->AddEntry(hDeltaPtB2[ic],sDeltaPtB2.Data(),"P");
    leg1->AddEntry(tmpGaus,Form("LHS Gauss fit: #mu = %2.2f, #sigma = %2.2f",mean,sigma),"L");
    
    hDeltaPtM[ic]->DrawCopy("psame");
    tmpGaus = FitLHSgaus(hDeltaPtM[ic],sigma,sigma_err,mean);
    tmpGaus->SetRange(-40,40);
    tmpGaus->SetLineColor( hDeltaPtM[ic]->GetLineColor());
    tmpGaus->Draw("same");
    leg1->AddEntry(hDeltaPtM[ic],sDeltaPtM.Data(),"P");
    leg1->AddEntry(tmpGaus,Form("LHS Gauss fit: #mu = %2.2f, #sigma = %2.2f",mean,sigma),"L");

    leg1->Draw();


    txt2->SetNDC();
    //    txt2->DrawLatex(0.5,0.97,"ALICE Performance 01/03/2011");
    c1->Update();
    c1->SaveAs(Form("deltaPt_pT_%d_%d_B%d_cen%02d.%s",(Int_t)fMinPtM,(Int_t)fMaxPtM,iB,ic,printType.Data()));
    if(getchar()=='q')return 1;


  }



  // now plot different centralities on one plot
  bool bFirst = true;
  hFrame->DrawCopy();
  TLegend *leg2 = new TLegend(0.2,0.65,0.3,0.93);
  leg2->SetHeader(Form("%s R = 0.4 (B%d)",sBiaRC2.Data(),iB));
  TH1D **hTmp1 = hBiaRC2;
  tmpName = "BiARC2";
  leg2->SetFillColor(0);
  leg2->SetTextFont(gStyle->GetTextFont());
  leg2->SetTextSize(gStyle->GetTextSize()*0.6);
  leg2->SetBorderSize(0);
  hFrame->DrawCopy();


  for(int ic = 0;ic<nCen;ic++){
    int iColor = hTmp1[ic]->GetMarkerColor()-4+2*ic;
    hTmp1[ic]->SetLineColor(iColor);
    hTmp1[ic]->SetMarkerColor(iColor);
    if(bFirst){
      hTmp1[ic]->Draw("psame");
      bFirst = false;
    }
    else{
      hTmp1[ic]->Draw("psame");
    }
    leg2->AddEntry(hTmp1[ic],Form("%2.0f-%2.0f%%",fCentLo[ic],fCentUp[ic]),"P");
    
  }
  leg2->Draw("same");
  c1->Update();
  c1->SaveAs(Form("deltaPt_cent_%s_B%d.%s",tmpName.Data(),iB,printType.Data()));
  if(getchar()=='q')return 1;

  bFirst = true;
  for(int ic = nCen-1;ic>=0;ic--){
    hTmp1[ic]->Scale(1./nColl[ic]);
    hTmp1[ic]->SetMinimum(1E-8);
    if(bFirst){
      hTmp1[ic]->Draw("p");
      bFirst = false;
    }
    else{
      hTmp1[ic]->Draw("psame");
    }
    
  }
  leg2->Draw("same");
  c1->Update();
  c1->SaveAs(Form("deltaPt_cent_ncoll_%s_B%d.%s",tmpName.Data(),iB,printType.Data()));



  return 0;


}


Int_t PlotJetBFluctuations2(UInt_t iPlotFlag,UInt_t iPlotType,Float_t inPtLo,Float_t inPtUp,int iALICEType){
  // plot the diffent background estimates

  const int nCen = 4;
  const Float_t nColl[nCen] = {1502,742.5,250,46.6};
  const Float_t fCentLo[nCen] = {0,10,30,50};
  const Float_t fCentUp[nCen] = {10,30,50,80};

  Int_t iB = 2;



  // multiplicity (nb. of tracklets) bins
  const Int_t nMult = 17;
  const Int_t multBinWidth = 200;
  Int_t multMin[nMult] = {0,};
  Int_t multMax[nMult] = {0,};
  for(Int_t i=0; i<nMult; ++i){
    multMin[i] = i*multBinWidth;
    multMax[i] = multMin[i]+multBinWidth-1;
  }

  // bins wrt. reactions
  const Int_t nRP = 4; // 0 --> all 1,2,3

  TH2F *hFrame = new TH2F("hFrame",";#deltap_{T} (GeV/c);probability density (c/GeV)",200,-70,100,1000,1E-7,50); 
  hFrame->SetTitleOffset(1.5,"Y");
  hFrame->SetTitleOffset(1.5,"X");
  hFrame->SetLabelSize(hFrame->GetLabelSize("Y")*0.9,"Y");
  hFrame->SetLabelSize(hFrame->GetLabelSize("X")*0.9,"X");
  hFrame->SetTitleSize(hFrame->GetTitleSize("Y")*0.7,"Y");
  hFrame->SetTitleSize(hFrame->GetTitleSize("X")*0.7,"X");

  TCanvas *c1 = new TCanvas("c11","c1",800,800);
  c1->SetLogy();


  // Produce Delta Pt Plots for each centrality and for each type
  const int kDeltaTypes = 12;
  TString sDelta[kDeltaTypes][nRP];
  TH1D  *hDeltaPt[kDeltaTypes][nCen][nRP] = {0,};    
  TGraphErrors *grMeanDeltaPtCent[kDeltaTypes][nRP] = {0,};
  TGraphErrors *grSigmaDeltaPtCent[kDeltaTypes][nRP] = {0,};

  // 
  TH1D  *hDeltaPtMult[kDeltaTypes][nMult][nRP] = {0,};    
  TGraphErrors *grMeanDeltaPtMult[kDeltaTypes][nRP] = {0,};
  TGraphErrors *grSigmaDeltaPtMult[kDeltaTypes][nRP] = {0,};

  // 
  const Int_t kMarkerDelta[kDeltaTypes] = {kFullCircle,kFullCircle,kOpenCircle,         33,kFullSquare,kFullSquare,kFullSquare, kFullSquare,     31,kFullCircle,kOpenCircle,31};
  const Int_t kColorDelta[kDeltaTypes] =         {kRed,      kBlue,       kRed,      kBlue,     kBlue+2,    kGray+1,     kRed+2,     kOrange+2,kOrange+2,kRed,kRed,kBlue};
  const Int_t kFitDelta[kDeltaTypes] =    {          1,          1,          1,          1,          1,          1,          1,           0,       1,1,1,0};
  const Int_t kNormDelta[kDeltaTypes] =   {          2,          0,          0,          2,          2,          0,          0,           0,      1,2,0,0};
  const Int_t kLineDelta[kDeltaTypes] = {            1,          1,          2,          1,          1,          1,          1,           1,      1,1,1,1};
  const Int_t kMarkerRP[nRP] = {kFullSquare,22,29,23}; // first no used
  const Int_t kColorRP[nRP] = {kBlack,kBlue+2,kCyan+2,kGreen+2};

  // 


  const Int_t kNormType = 7; // normaize this spectrum at fixed p_T
  const Float_t kNormPt = 20.; // normaize this spectrum at fixed p_T
  Float_t kNormValue[nMult][nCen] = {0,}; // normaize the spectrum with this value, if negative take from the first delta p_T histo
  Float_t kNormValueMult[nMult][nRP] = {0,}; // normaize the spectrum with this value, if negative take from the first delta p_T histo
  

  // 
  // the cuts for the single centrality
  Float_t fMinPt[kDeltaTypes] = {0};
  Float_t fMaxPt[kDeltaTypes] = {0};

  for(int iD = 0;iD<kDeltaTypes;iD++){
    fMinPt[iD] = inPtLo;
    fMaxPt[iD] = inPtUp;
  }
  
  TString tmpName;



  // 0 Leticias BiA anti-kT
  
  TFile *fL = TFile::Open("~/Dropbox/SharedJets/Leticia/randomcones/pwg4plots.root");
  TFile *fRP = TFile::Open("~/Dropbox/SharedJets/Leticia/randomcones/reactionplane.root");
  TFile *fMRP = TFile::Open("~/Dropbox/SharedJets/Leticia/randomconesvsmult.root");
  if(fDebug)Printf("Line: %d",__LINE__);
  Int_t iDelta = 0;
  Int_t iRP = 0;
  Float_t fScale = 1;

  if(fL){
    iDelta = 0;
    // leticia BiA Randome cones
    sDelta[iDelta][0] = "rand. cones";
    if(iB==1)tmpName = "BiA sa RC skip0 centrality";
    else if (iB==2)tmpName = "BiA RC skip0 va centrality";
    TH2F *h2Tmp = (TH2F*)fL->Get(tmpName.Data());
    if(!h2Tmp)Printf("Line:%d %s not found",__LINE__,tmpName.Data());


    for(int ic = 0;ic < nCen;ic++){
      iRP = 0;
      if(!h2Tmp)continue;
      Int_t ibLo = h2Tmp->GetXaxis()->FindBin(fCentLo[ic]);
      Int_t ibUp = h2Tmp->GetXaxis()->FindBin(fCentUp[ic])-1;
      hDeltaPt[iDelta][ic][iRP] = h2Tmp->ProjectionY(Form("hBiaRC%d",ic),ibLo,ibUp,"E");


      fScale =  hDeltaPt[iDelta][ic][iRP]->Integral("width");
      if(fScale)  hDeltaPt[iDelta][ic][iRP]->Scale(1./fScale);
      if(fRP){
	if(ic==0){tmpName = "bia RC vs RP central";}
	else if(ic == 3){ tmpName = "bia RC vs RP perif";}
	else {continue;}
	TH2F *h2TmpRP = (TH2F*)fRP->Get(tmpName.Data());
	if(!h2TmpRP)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
	for(iRP = 1;iRP<nRP;iRP++){
	  hDeltaPt[iDelta][ic][iRP] = h2TmpRP->ProjectionY(Form("hDeltaPt%d_%d_%d",iDelta,ic,iRP),iRP,iRP);
	  if(kNormDelta[iDelta]==2){
	    
	  }
	  else{
	    fScale =  hDeltaPt[iDelta][ic][iRP]->Integral("width");
	  }
	  if(fScale)  hDeltaPt[iDelta][ic][iRP]->Scale(1./fScale);
	}
      }
    }
  
    iRP = 0;


    if(fDebug)Printf("Line: %d",__LINE__);
    

    for(int im = 0;im < nMult;im++){
      for(iRP=1;iRP<nRP;iRP++){
	tmpName = Form("hBiaRP%d_M%d_cut0.15",iRP-1,im);
	hDeltaPtMult[iDelta][im][iRP] = (TH1D*)fMRP->Get(tmpName.Data());
	if(!hDeltaPtMult[iDelta][im][iRP] )continue;
	if(iRP==1)hDeltaPtMult[iDelta][im][0] = (TH1D*)hDeltaPtMult[iDelta][im][iRP]->Clone( Form("hBiaRP%d_M%d_cut0.15",-1,im));
	else hDeltaPtMult[iDelta][im][0]->Add(hDeltaPtMult[iDelta][im][iRP]);
      }
      // norm
      for(iRP=0;iRP<nRP;iRP++){
	if(kNormDelta[iDelta]==2){
	  if(iRP==0)fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
	}
	else{
	  fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
	}
	if(fScale)  hDeltaPtMult[iDelta][im][iRP]->Scale(1./fScale);
      }
    }

    iRP = 0;
    if(fDebug)Printf("Line: %d",__LINE__);
    //------------

    iDelta = 1;
    sDelta[iDelta][0] = "RC (randomized #eta#phi)";
    if(iB==1)tmpName = "BiA RC random input sa centrality";
    else if (iB==2)tmpName = "BiA RC random input va centrality";
    h2Tmp = (TH2F*)fL->Get(tmpName.Data());
    if(!h2Tmp)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
    if(fDebug)Printf("Line: %d",__LINE__);
    for(int ic = 0;ic < nCen;ic++){
      if(!h2Tmp)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
      if(!h2Tmp)continue;
      iRP = 0;
      Int_t ibLo = h2Tmp->GetXaxis()->FindBin(fCentLo[ic]);
      Int_t ibUp = h2Tmp->GetXaxis()->FindBin(fCentUp[ic])-1;
      Printf("Line:%d bin %d - %d",__LINE__,ibLo,ibUp);
      hDeltaPt[iDelta][ic][iRP] = h2Tmp->ProjectionY(Form("hBia1L%d",ic),ibLo,ibUp,"E");
      Float_t fScale =  hDeltaPt[iDelta][ic][iRP]->Integral("width");
      if(fScale)  hDeltaPt[iDelta][ic][iRP]->Scale(1./fScale);
      if(fRP){
	if(ic==0){tmpName = "bia RC randomized input vs RP central";}
	else if(ic == 3){ tmpName = "bia RC randomized input vs RP perif";}
	else {continue;}
	TH2F *h2TmpRP = (TH2F*)fRP->Get(tmpName.Data());
	if(!h2TmpRP)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
	for(iRP = 1;iRP<nRP;iRP++){
	  hDeltaPt[iDelta][ic][iRP] = h2TmpRP->ProjectionY(Form("hDeltaPt%d_%d_%d",iDelta,ic,iRP),iRP,iRP);
	  Float_t fScale =  hDeltaPt[iDelta][ic][iRP]->Integral("width");
	  if(fScale)  hDeltaPt[iDelta][ic][iRP]->Scale(1./fScale);
	}
      }
      Printf(hDeltaPt[iDelta][ic][iRP])
    }

    iRP = 0;
    for(int im = 0;im < nMult;im++){
      for(iRP=1;iRP<nRP;iRP++){
	tmpName = Form("hBia_random_RP%d_M%d_cut0.15",iRP-1,im);
	hDeltaPtMult[iDelta][im][iRP] = (TH1D*)fMRP->Get(tmpName.Data());
	if(!hDeltaPtMult[iDelta][im][iRP] )continue;
	if(iRP==1)hDeltaPtMult[iDelta][im][0] = (TH1D*)hDeltaPtMult[iDelta][im][iRP]->Clone( Form("hBiaRP%d_M%d_cut0.15",-1,im));
	else hDeltaPtMult[iDelta][im][0]->Add(hDeltaPtMult[iDelta][im][iRP]);
      }
      // norm
      for(iRP=0;iRP<nRP;iRP++){
	if(kNormDelta[iDelta]==2){
	  if(iRP==0)fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
	}
	else{
	  fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
	}
	if(fScale)  hDeltaPtMult[iDelta][im][iRP]->Scale(1./fScale);
      }
    }

    /*
    if(fDebug)Printf("Line: %d",__LINE__);
    if(iB==1)tmpName = "BiA RC random input sa multiplicity";
    else if (iB==2)tmpName = "BiA RC random input va multiplicity";
    h2Tmp = (TH2F*)fL->Get(tmpName.Data());
    if(!h2Tmp)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
    for(int im = 0;im < nMult;im++){
      if(!h2Tmp)continue;
      Int_t ibLo = h2Tmp->GetXaxis()->FindBin(multMin[im]);
      Int_t ibUp = h2Tmp->GetXaxis()->FindBin(multMax[im])-1;
      Printf("Line:%d bin %d - %d",__LINE__,ibLo,ibUp);
      hDeltaPtMult[iDelta][im][iRP] = h2Tmp->ProjectionY(Form("hBia%d_M%d",iDelta,im),ibLo,ibUp,"E");
      Float_t fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
      if(fScale)  hDeltaPtMult[iDelta][im][iRP]->Scale(1./fScale);
    }
    */


    // ------------------------------------------
    // leticia random cones skip leading jets
    iDelta = 2;iRP = 0;
    sDelta[iDelta][0] = "RC (w/o 2 lead. jets)";
    if(fDebug)Printf("Line: %d",__LINE__);
    if(iB==1)tmpName = "BiA sa RC skip2 centrality";
    else if (iB==2)tmpName = "BiA RC skip2 va centrality";
    h2Tmp = (TH2F*)fL->Get(tmpName.Data());
    if(!h2Tmp)Printf("Line:%d %s not found",__LINE__,tmpName.Data());      
    for(int ic = 0;ic < nCen;ic++){
      if(!h2Tmp)continue;
      Int_t ibLo = h2Tmp->GetXaxis()->FindBin(fCentLo[ic]);
      Int_t ibUp = h2Tmp->GetXaxis()->FindBin(fCentUp[ic])-1;
      Printf("Line:%d bin %d - %d",__LINE__,ibLo,ibUp);
      hDeltaPt[iDelta][ic][iRP] = h2Tmp->ProjectionY(Form("hBiaRC2%d",ic),ibLo,ibUp,"E");
      Float_t fScale =  hDeltaPt[iDelta][ic][iRP]->Integral("width");
      if(fScale) hDeltaPt[iDelta][ic][iRP]->Scale(1./fScale);
    }

    if(fDebug)Printf("Line: %d",__LINE__);
    if(iB==1)tmpName = "BiA RC skip2 sa multiplicity";
    else if (iB==2)tmpName = "BiA RC skip2 va multiplicity";
    h2Tmp = (TH2F*)fL->Get(tmpName.Data());
    if(!h2Tmp)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
    for(int im = 0;im < nMult;im++){
      if(!h2Tmp)continue;
      Int_t ibLo = h2Tmp->GetXaxis()->FindBin(multMin[im]);
      Int_t ibUp = h2Tmp->GetXaxis()->FindBin(multMax[im])-1;
      Printf("Line:%d bin %d - %d",__LINE__,ibLo,ibUp);
      hDeltaPtMult[iDelta][im][iRP] = h2Tmp->ProjectionY(Form("hBia%d_M%d",iDelta,im),ibLo,ibUp,"E");
      Float_t fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
      if(fScale)  hDeltaPtMult[iDelta][im][iRP]->Scale(1./fScale);
    }  


    // 
    iDelta = 9;
    sDelta[iDelta][0] = "RC (cut 2 GeV)";
    for(int im = 0;im < nMult;im++){
      for(iRP=1;iRP<nRP;iRP++){
	tmpName = Form("hBiaRP%d_M%d_cut2",iRP-1,im);
	hDeltaPtMult[iDelta][im][iRP] = (TH1D*)fMRP->Get(tmpName.Data());
	if(!hDeltaPtMult[iDelta][im][iRP] )continue;
	if(iRP==1)hDeltaPtMult[iDelta][im][0] = (TH1D*)hDeltaPtMult[iDelta][im][iRP]->Clone( Form("hBiaRP%d_M%d_cut0.15",-1,im));
	else hDeltaPtMult[iDelta][im][0]->Add(hDeltaPtMult[iDelta][im][iRP]);
      }
      // norm
      for(iRP=0;iRP<nRP;iRP++){
	if(kNormDelta[iDelta]==2){
	  if(iRP==0)fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
	}
	else{
	  fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
	}
	if(fScale)  hDeltaPtMult[iDelta][im][iRP]->Scale(1./fScale);
      }
    }

    iDelta = 10;
    sDelta[iDelta][0] = "RC randomized event (cut 2 GeV)";
    for(int im = 0;im < nMult;im++){
      for(iRP=1;iRP<nRP;iRP++){
	tmpName = Form("hBia_random_RP%d_M%d_cut2",iRP-1,im);
	hDeltaPtMult[iDelta][im][iRP] = (TH1D*)fMRP->Get(tmpName.Data());
	if(!hDeltaPtMult[iDelta][im][iRP] )continue;
	if(iRP==1)hDeltaPtMult[iDelta][im][0] = (TH1D*)hDeltaPtMult[iDelta][im][iRP]->Clone( Form("hBiaRP%d_M%d_cut0.15",-1,im));
	else hDeltaPtMult[iDelta][im][0]->Add(hDeltaPtMult[iDelta][im][iRP]);
      }
      // norm
      for(iRP=0;iRP<nRP;iRP++){
	if(kNormDelta[iDelta]==2){
	  if(iRP==0)fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
	}
	else{
	  fScale =  hDeltaPtMult[iDelta][im][iRP]->Integral("width");
	}
	if(fScale)  hDeltaPtMult[iDelta][im][iRP]->Scale(1./fScale);
      }
    }


  }
    // fetch the data from bastian...
    
    
    // jet embedded
    TString cBB = "/Users/kleinb/Dropbox/SharedJets/Bastian/Files/"; 
    iDelta = 3;
    sDelta[iDelta][0] = Form("track: %2.0f-%2.0f GeV",fMinPt[iDelta],fMaxPt[iDelta]);
    normRP = 1;  
    for(iRP = 0;iRP<nRP;iRP++){
      for(int ic = 0;ic < nCen;ic++){
	TH2F *hTmp = GetTH2PlotB(cBB.Data(),0,0,ic,iRP-1); // emb jets
	if(!hTmp)Printf("%d %s not found",__LINE__,tmpName.Data());
	int ibLo = hTmp->GetYaxis()->FindBin(fMinPt[iDelta]);
	int ibUp = hTmp->GetYaxis()->FindBin(fMaxPt[iDelta])-1;
	hDeltaPt[iDelta][ic][iRP] = hTmp->ProjectionX(Form("fHistDeltaPtB2_c%d_rp%d",ic,iRP),ibLo,ibUp,"E");
	hDeltaPt[iDelta][ic][iRP]->Rebin(2);
	if(kNormDelta[iDelta]==2){
	  if(iRP==0)normRP =   hDeltaPt[iDelta][ic][iRP]->Integral("width");
	}
	else{
	  normRP =   hDeltaPt[iDelta][ic][iRP]->Integral("width");
	}
	if(normRP)   hDeltaPt[iDelta][ic][iRP]->Scale(1./normRP);
      }
    }
    iRP = 0;
    for(iRP = 0;iRP<nRP;iRP++){
      for(int im = 0;im <nMult;im++){
      TH2F *hTmp = GetTH2PlotB(cBB.Data(),0,1,im,iRP-1); // emb jets
      if(!hTmp)Printf("%d %s not found",__LINE__,tmpName.Data());
      int ibLo = hTmp->GetYaxis()->FindBin(fMinPt[iDelta]);
      int ibUp = hTmp->GetYaxis()->FindBin(fMaxPt[iDelta])-1;
      Printf("Line:%d bin %d - %d",__LINE__,ibLo,ibUp);
      hDeltaPtMult[iDelta][im][iRP] = hTmp->ProjectionX(Form("fHistDeltaPtB2_%d_mult%d_rp%d",iDelta,im,iRP),ibLo,ibUp,"E");
      hDeltaPtMult[iDelta][im][iRP]->Rebin(2);
      Float_t fScale =   hDeltaPtMult[iDelta][im][iRP]->Integral("width");
      if(fScale)   hDeltaPtMult[iDelta][im][iRP]->Scale(1./fScale);
    }
  }
  iRP = 0;

  iDelta = 4;
  sDelta[iDelta][0] = Form("jet: %2.0f-%2.0f GeV",fMinPt[iDelta],fMaxPt[iDelta]);


  for(iRP = 0;iRP<nRP;iRP++){
    for(int ic = 0;ic < nCen;ic++){
      TH2F *hTmp = GetTH2PlotB(cBB.Data(),1,0,ic,iRP-1); // emb jets
      if(!hTmp)Printf("%d %s not found",__LINE__,tmpName.Data());
      int ibLo = hTmp->GetYaxis()->FindBin(fMinPt[iDelta]);
      int ibUp = hTmp->GetYaxis()->FindBin(fMaxPt[iDelta])-1;
      hDeltaPt[iDelta][ic][iRP] = hTmp->ProjectionX(Form("fHistDeltaPtB1_c%d_rp%d",ic,iRP),ibLo,ibUp,"E");
      hDeltaPt[iDelta][ic][iRP]->Rebin(2);
      Float_t fScale = hDeltaPt[iDelta][ic][iRP]->Integral("width");
      if(fScale)  hDeltaPt[iDelta][ic][iRP]->Scale(1./fScale);
    }
  }
  iRP = 0;

  for(iRP = 0;iRP<nRP;iRP++){
    for(int im = 0;im <nMult;im++){
      TH2F *hTmp = GetTH2PlotB(cBB.Data(),1,1,im,iRP-1); // emb jets
      if(!hTmp)Printf("%d %s not found",__LINE__,tmpName.Data());
      int ibLo = hTmp->GetYaxis()->FindBin(fMinPt[iDelta]);
      int ibUp = hTmp->GetYaxis()->FindBin(fMaxPt[iDelta])-1;
      Printf("Line:%d bin %d - %d",__LINE__,ibLo,ibUp);
      hDeltaPtMult[iDelta][im][iRP] = hTmp->ProjectionX(Form("fHistDeltaPtB2_%d_mult%d_rp%d",iDelta,im,iRP),ibLo,ibUp,"E");
      hDeltaPtMult[iDelta][im][iRP]->Rebin(2);
      Float_t fScale = hDeltaPtMult[iDelta][im][iRP]->Integral("width");
      if(fScale)   hDeltaPtMult[iDelta][im][iRP]->Scale(1./fScale);
    }
  }

  iRP = 0;
    // Data from marta
    iDelta = 5;
    TString fOTFQoff = "~/Dropbox/SharedJets/OnTheFlyOutput/PWG4_JetTasksOutput_110422_p2_OTFQOff_000139107_Total.root";
    TFile *fQoff = TFile::Open(fOTFQoff.Data());
    sDelta[iDelta][0] = Form("unquenched jet: %2.0f-%2.0f GeV",fMinPt[iDelta],fMaxPt[iDelta]);
    if(fQoff){
      for(int ic = 0;ic < nCen;ic++){
      tmpName = Form("PWG4_BkgFluct%sCent%dB%d","ANTIKT",ic,iB);
      TDirectory *dir = (TDirectory*)fQoff->Get(tmpName.Data());
      if(!dir)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
      tmpName = Form("taskBkgFluct%sCent%dB%d","ANTIKT",ic,iB);
      TList *list = (TList*)dir->Get(tmpName.Data());
      if(!list)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
      TH3F *h3Tmp = (TH3F*)list->FindObject("fh3PtDeltaPtArea");
      if(!h3Tmp)Printf("Line:%d %s not found",__LINE__,"fh3PtDeltaPtArea");
      hDeltaPt[iDelta][ic][iRP] = h3Tmp->ProjectionY(Form("hDeltaM%d_%d",ic,iDelta),h3Tmp->GetXaxis()->FindBin(fMinPt[iDelta]),h3Tmp->GetXaxis()->FindBin(fMaxPt[iDelta]),
						0,-1,"E");
      if(ic<2)  hDeltaPt[iDelta][ic][iRP]->Rebin(4);
      else if(ic==2)  hDeltaPt[iDelta][ic][iRP]->Rebin(2);
      Float_t fScale =  hDeltaPt[iDelta][ic][iRP]->Integral("width");
      if(fScale) hDeltaPt[iDelta][ic][iRP]->Scale(1./fScale);
      Printf("Line:%d %p",__LINE__,hDeltaPt[iDelta][ic][iRP]);
      }
    }
    else{
      Printf("Could not open %s",fOTFQoff.Data());
    }

    // marta quenched...
    iDelta = 6;
    TString fOTFQon = "/Users/kleinb/Dropbox/SharedJets/OnTheFlyOutput/LeadingJet/PWG4_JetTasksOutput_110505_p2_OTFQOnL_Merged_v2.root";
    TFile *fQon = TFile::Open(fOTFQon.Data());
    sDelta[iDelta][0] = Form("quen. lead. jet: %2.0f-%2.0f GeV",fMinPt[iDelta],fMaxPt[iDelta]);
    if(fQon){
      for(int ic = 0;ic < nCen;ic++){
	tmpName = Form("PWG4_BkgFluct%sCent%dB%d","ANTIKT",ic,iB);
	TDirectory *dir = (TDirectory*)fQon->Get(tmpName.Data());
	if(!dir)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
	tmpName = Form("taskBkgFluct%sCent%dB%d","ANTIKT",ic,iB);
	TList *list = (TList*)dir->Get(tmpName.Data());
	if(!list)Printf("Line:%d %s not found",__LINE__,tmpName.Data());
	
	TH3F *h3Tmp = (TH3F*)list->FindObject("fh3PtDeltaPtArea");
	hDeltaPt[iDelta][ic][iRP] = h3Tmp->ProjectionY(Form("hDeltaM%d_%d",ic,iDelta),h3Tmp->GetXaxis()->FindBin(fMinPt[iDelta]),h3Tmp->GetXaxis()->FindBin(fMaxPt[iDelta]),
					     0,-1,"E");
	if(ic<2)  hDeltaPt[iDelta][ic][iRP]->Rebin(4);
	else if(ic==2)  hDeltaPt[iDelta][ic][iRP]->Rebin(2);
	Float_t fScale = hDeltaPt[iDelta][ic][iRP]->Integral("width");
	if(fScale)hDeltaPt[iDelta][ic][iRP]->Scale(1./fScale);
      }
    }
    else{
      Printf("Could not open %s",fOTFQon.Data());
    }

    TString sinputFile = "~/Dropbox/SharedJets/Christian/Files/PWG4_JetTasksOutput_Merge_LHC10h_AOD_110429a.root";
    TString sinputDir = "PWG4_spec2_clustersAOD_ANTIKT04_B2_Filter00128_Cut00150_Skip02__0000000000_Class00";
    // Plot the real jet spectrum, to be normalized later...
    iDelta = 7;
    sDelta[iDelta][0] = "scaled jet spectrum"; 
    
    if(true){
      THnSparseF* fhnJetPtRec =  (THnSparseF*)GetObjectFromFile("fhnJetPtRec",sinputFile.Data(),sinputDir.Data());
      fhnJetPtRec->GetAxis(0)->SetRange(3,3); // take all jets

      // in centrality bins....
      for(iRP = 0;iRP<nRP;iRP++){
	for(int ic = 0;ic < nCen;ic++){
	  Int_t icLo = fhnJetPtRec->GetAxis(2)->FindBin(fCentLo[ic]+0.1);
	  Int_t icUp = fhnJetPtRec->GetAxis(2)->FindBin(fCentUp[ic]-0.1);
	  fhnJetPtRec->GetAxis(2)->SetRange(icLo,icUp);

	  // iRP range 0 does rese , this is what we want for all :)
	  fhnJetPtRec->GetAxis(4)->SetRange(iRP,iRP);

	  hDeltaPt[iDelta][ic][iRP] = fhnJetPtRec->Projection(1,"E");
	  hDeltaPt[iDelta][ic][iRP]->SetName(Form("hSpectrumJet_%d_C%d_rp%d",iDelta,ic,iRP));
	}
	fhnJetPtRec->GetAxis(2)->SetRange(0,0);// reset centrality
	for(int im = 0;im < nMult;im++){
	  Int_t ibTLo =   fhnJetPtRec->GetAxis(3)->FindBin(multMin[im]);
	  Int_t ibTUp =   fhnJetPtRec->GetAxis(3)->FindBin(multMax[im]);

	  fhnJetPtRec->GetAxis(3)->SetRange(ibTLo,ibTUp);	  
	   // iRP range 0 does rese , this is what we want for all :)
	  fhnJetPtRec->GetAxis(4)->SetRange(iRP,iRP);

	  hDeltaPtMult[iDelta][im][iRP] = fhnJetPtRec->Projection(1,"E");
	  hDeltaPtMult[iDelta][im][iRP]->SetName(Form("hSpectrumJets_%d_M%d_rp%d",iDelta,im,iRP));
	}
      }
    }
    iRP = 0;


    TString sinputFileP = "~/Dropbox/SharedJets/Christian/Files/PWG4_JetTasksOutput_Merge_000139107_AOD_110505a.root";
    TString sinputDirP = "PWG4_spec2_clustersAOD_ANTIKT02_B2_Filter00128_Cut00150_Skip00_clustersAOD_ANTIKT02_B0_Filter00128_Cut00150_Skip00_0000000000_Class00";
      // fetch the poissonian fluctuations! CKB
      iDelta = 8;
      sDelta[iDelta][0] = "Poissonian limit";
      if(true){
	THnSparseF* fhnTrackPtRec =  (THnSparseF*)GetObjectFromFile("fhnTrackPtRec",sinputFileP.Data(),sinputDirP.Data());
	fhnTrackPtRec->GetAxis(0)->SetRange(2,2); // take all tracks
	// iRP range 0 does rese , this is what we wantfor all :)
	fhnTrackPtRec->GetAxis(4)->SetRange(iRP,iRP);
	THnSparseF* fhnEvent =  (THnSparseF*)GetObjectFromFile("fhnEvent",sinputFileP.Data(),sinputDirP.Data());
	TH1F *fh1Centrality = (TH1F*)GetObjectFromFile("fh1Centrality",sinputFileP.Data(),sinputDirP.Data());
	// Multiplicity
	TH2F *fh2MultRec = (TH2F*)GetObjectFromFile("fh2MultRec",sinputFileP.Data(),sinputDirP.Data());
	TH1D *h1Mult = (TH1D*)fh2MultRec->ProjectionX("h1Mult");
      

      // in centrality bins....

      for(int ic = 0;ic < nCen;ic++){
	Int_t icLo = fhnTrackPtRec->GetAxis(2)->FindBin(fCentLo[ic]+0.1);
	Int_t icUp = fhnTrackPtRec->GetAxis(2)->FindBin(fCentUp[ic]-0.1);
	fhnTrackPtRec->GetAxis(2)->SetRange(icLo,icUp);

	TH1D *hMult = fhnEvent->Projection(1,"E");
	if(!grSigmaDeltaPtCent[iDelta][iRP]){
	  grSigmaDeltaPtCent[iDelta][iRP] = new TGraphErrors(nCen);
	  SetGraphAttributes(grSigmaDeltaPtCent[iDelta][iRP],kMarkerDelta[iDelta],kColorDelta[iDelta]);
	}

	TH1D *hSpectrumTracks = fhnTrackPtRec->Projection(1,"E");
	hSpectrumTracks->SetName(Form("hSpectrumTracks_C%d",ic));
	
	// scale with bin width?
	
	for(int ib = 1;ib<hSpectrumTracks->GetNbinsX();ib++){
	  Float_t val = hSpectrumTracks->GetBinContent(ib);
	  hSpectrumTracks->SetBinContent(ib,val/hSpectrumTracks->GetBinWidth(ib));
	}
	
	int ibLo = fh1Centrality->FindBin(fCentLo[ic]+0.1);
	int ibUp = fh1Centrality->FindBin(fCentUp[ic]-0.1);
	Float_t fScale = fh1Centrality->Integral(ibLo,ibUp);
	if(fScale>0)hSpectrumTracks->Scale(1./fScale);	

	Double_t sigma = 0;
	Double_t sigma_error = 0;
	Double_t mult = 0;
	
	Double_t mult2 = h1Mult->GetMean(1);
	Double_t mult2_e = h1Mult->GetMean(11); // should be the error on the mult :)
	
	if(iRP==0){// all
	  sigma = GetPoissonFluctuation(hSpectrumTracks,TMath::Pi()*2.*1.8,
					TMath::Pi()*0.4*0.4);
	  sigma_error = sigma/1000.;
	  mult = hSpectrumTracks->Integral("width");
	}
	else{
	  // uses only 1/3 of acceptance
	  sigma = GetPoissonFluctuation(hSpectrumTracks,TMath::Pi()*2.*1.8/Float_t(nRP-1),
					TMath::Pi()*0.4*0.4);
	  sigma_error = sigma/1000.;
	  mult = hSpectrumTracks->Integral("width");
	}

	Double_t mean = hSpectrumTracks->GetMean();
	Double_t rms = hSpectrumTracks->GetRMS();
	Double_t cent = (fCentUp[ic]+fCentLo[ic])/2;
	Double_t cent_e = (fCentUp[ic]-fCentLo[ic])/2;
	grSigmaDeltaPtCent[iDelta][iRP]->SetPoint(ic,cent,sigma);
	grSigmaDeltaPtCent[iDelta][iRP]->SetPointError(ic,cent_e,sigma_error);


	delete hSpectrumTracks;
	delete hMult;
      }
      fhnTrackPtRec->GetAxis(2)->SetRange(0,0);// reset
      
      // in multiplicity bins...
      for(iRP = 0;iRP<nRP;iRP++){
	for(int im = 0;im < nMult;im++){
	  Int_t ibELo = fhnEvent->GetAxis(1)->FindBin(multMin[im]);
	  Int_t ibEUp = fhnEvent->GetAxis(1)->FindBin(multMax[im]);
	  fhnEvent->GetAxis(1)->SetRange(ibELo,ibEUp);
	  
	  TH1D *hMult = fhnEvent->Projection(1,"E");
	  
	  if(!grSigmaDeltaPtMult[iDelta][iRP]){
	    grSigmaDeltaPtMult[iDelta][iRP] = new TGraphErrors(nCen);
	    SetGraphAttributes(grSigmaDeltaPtMult[iDelta][iRP],kMarkerDelta[iDelta],kColorDelta[iDelta]);
	    if(iRP>0)SetGraphAttributes(grSigmaDeltaPtMult[iDelta][iRP],kMarkerRP[iRP],kColorDelta[iDelta]); // change only the marke here
	  }

	  // mult range
	  Int_t ibTLo =   fhnTrackPtRec->GetAxis(3)->FindBin(multMin[im]);
	  Int_t ibTUp =   fhnTrackPtRec->GetAxis(3)->FindBin(multMax[im]);
	  fhnTrackPtRec->GetAxis(3)->SetRange(ibTLo,ibTUp);

	  // iRP range 0 does rese , this is what we wantfor all :)
	  fhnTrackPtRec->GetAxis(4)->SetRange(iRP,iRP);
	  // control
	  /*
	  TH2D *h2Tmp = fhnTrackPtRec->Projection(1,4,"E");
	  h2Tmp->Draw("colz");
	  c1->Update();
	  if(getchar()=='q')return 1;
	  */
	  TH1D *hSpectrumTracks = fhnTrackPtRec->Projection(1,"E");
	  hSpectrumTracks->SetName(Form("hSpectrumTracks_M%d_rp%d",im,iRP));
	  
	  // scale with bin width?
	  for(int ib = 1;ib<hSpectrumTracks->GetNbinsX();ib++){
	    Float_t val = hSpectrumTracks->GetBinContent(ib);
	    hSpectrumTracks->SetBinContent(ib,val/hSpectrumTracks->GetBinWidth(ib));
	  }
	  
	  int ibLo = h1Mult->FindBin(multMin[im]);
	  int ibUp = h1Mult->FindBin(multMax[im]);
	  h1Mult->GetXaxis()->SetRange(ibLo,ibUp);
	  Float_t fScale = h1Mult->Integral(ibLo,ibUp);
	  if(fScale>0)hSpectrumTracks->Scale(1./fScale);	

	  Double_t sigma = 0;
	  Double_t sigma_error = 0;
	  Double_t mult = 0;
	  
	  Double_t mult2 = h1Mult->GetMean(1);
	  Double_t mult2_e = h1Mult->GetMean(11); // should be the error on the mult :)

	  if(iRP==0){// all
	   sigma = GetPoissonFluctuation(hSpectrumTracks,TMath::Pi()*2.*1.8,
				  TMath::Pi()*0.4*0.4);
	   sigma_error = sigma/1000.;
	   mult = hSpectrumTracks->Integral("width");
	  }
	  else{
	    // uses only 1/3 of acceptance
	    sigma = GetPoissonFluctuation(hSpectrumTracks,TMath::Pi()*2.*1.8/Float_t(nRP-1),
				  TMath::Pi()*0.4*0.4);
	    sigma_error = sigma/1000.;
	    mult = hSpectrumTracks->Integral("width");
	  }
	  Printf("mult %4.3f mult2 %4.3f",mult,mult2);
	  
	  grSigmaDeltaPtMult[iDelta][iRP]->SetPoint(im,mult2,sigma);
	  grSigmaDeltaPtMult[iDelta][iRP]->SetPointError(im,mult2_e,sigma_error);

	  
	  // correct for eff
	  Int_t oldDelta = iDelta;
	  iDelta = 11;

	  sDelta[iDelta][0] = sDelta[oldDelta][0] + " eff. corrected";

	  if(!grSigmaDeltaPtMult[iDelta][iRP]){
	    grSigmaDeltaPtMult[iDelta][iRP] = new TGraphErrors(nCen);
	    SetGraphAttributes(grSigmaDeltaPtMult[iDelta][iRP],kMarkerDelta[iDelta],kColorDelta[iDelta]);
	    if(iRP>0)SetGraphAttributes(grSigmaDeltaPtMult[iDelta][iRP],kMarkerRP[iRP],kColorDelta[iDelta]); // change only the marke here
	  }

	  TH1* hCorr = CorrectForEff(hSpectrumTracks);

	  if(iRP==0){// all
	   sigma = GetPoissonFluctuation(hCorr,TMath::Pi()*2.*1.8,
				  TMath::Pi()*0.4*0.4);
	   sigma_error = sigma/1000.;
	   mult = hCorr->Integral("width");
	  }
	  else{
	    // uses only 1/3 of acceptance
	    sigma = GetPoissonFluctuation(hCorr,TMath::Pi()*2.*1.8/Float_t(nRP-1),
				  TMath::Pi()*0.4*0.4);
	    sigma_error = sigma/1000.;
	    mult = hCorr->Integral("width");
	  }
	  Printf("mult %4.3f mult2 %4.3f",mult,mult2);
	  
	  grSigmaDeltaPtMult[iDelta][iRP]->SetPoint(im,mult2,sigma);
	  grSigmaDeltaPtMult[iDelta][iRP]->SetPointError(im,mult2_e,sigma_error);


	  iDelta = oldDelta;
	  delete hSpectrumTracks;
	  delete hMult;
	}
      }
      // in multiplicity bins...
	

    }

    for(iDelta = 0;iDelta < kDeltaTypes;iDelta++){
      sDelta[iDelta][0] += (iPlotType&(1<<2))?" (all)":"";
      sDelta[iDelta][1] = "in plane";
      sDelta[iDelta][2] =  "in between";
      sDelta[iDelta][3] =  "out of plane";
    }

    // THIS IS FOR THE ALICE LABELS AND THE WORK IN PROGRESS PRELIMINARY ETC.
    TLatex *txt2 = new TLatex();
    txt2->SetTextFont(gStyle->GetTextFont());
    txt2->SetTextSize(gStyle->GetTextSize()*0.7);
    txt2->SetTextAlign(22);
    txt2->SetTextColor(kRed);
    TLatex* txtHead = new TLatex();
    txtHead->SetTextSize(0.04);
    txtHead->SetNDC();
    txtHead->SetTextAlign(23);
    
    if(iPlotType&(1<<0)){
      for(int ic = 0;ic < nCen;ic++){
	TLegend *leg1 = new TLegend(0.2,0.7,0.3,0.98);
	leg1->SetFillColor(0);
	leg1->SetTextFont(gStyle->GetTextFont());
	leg1->SetTextSize(gStyle->GetTextSize()*0.6);
	leg1->SetBorderSize(0);
	hFrame->DrawCopy();

	Int_t iLegCount = -1;
	for(iRP = 0;iRP<((iPlotType&(1<<2))?nRP:1);iRP++){
	  Double_t mean = 0;
	  Double_t sigma = 0;
	  Double_t sigma_error = 0;
	  Double_t mean_error = 0;
	  TF1* tmpGaus = 0;
	  for(iDelta = 0;iDelta<kDeltaTypes;iDelta++){
 
	    if(!grMeanDeltaPtCent[iDelta][iRP]&&kFitDelta[iDelta]){
	      grMeanDeltaPtCent[iDelta][iRP] = new TGraphErrors(nCen);
	      SetGraphAttributes(grMeanDeltaPtCent[iDelta][iRP],kMarkerDelta[iDelta],kColorDelta[iDelta]);
	      if(iRP>0)SetGraphAttributes(grMeanDeltaPtCent[iDelta][iRP],kMarkerRP[iRP],kColorDelta[iRP]);
	    }
	    if(!grSigmaDeltaPtCent[iDelta][iRP]&&kFitDelta[iDelta]){
	      grSigmaDeltaPtCent[iDelta][iRP] = new TGraphErrors(nCen);
	      SetGraphAttributes(grSigmaDeltaPtCent[iDelta][iRP],kMarkerDelta[iDelta],kColorDelta[iDelta]);
	      if(iRP>0)SetGraphAttributes(grSigmaDeltaPtCent[iDelta][iRP],kMarkerRP[iRP],kColorDelta[iRP]);
	    }

	    if(!hDeltaPt[iDelta][ic][iRP]){
	      Printf("%d:%d:%d not found",iDelta,ic,iRP);
	      continue;
	    }
	    SetHistoAttributes(hDeltaPt[iDelta][ic][iRP],kMarkerDelta[iDelta],kColorDelta[iDelta]);
	    if(iRP!=0)SetHistoAttributes(hDeltaPt[iDelta][ic][iRP],kMarkerRP[iRP],kColorRP[iRP]);
	    if(!(iPlotFlag&(1<<iDelta)))continue;


	    // take the first iDelta Pt as anchor for norm, worst case does nothin (scale with 1
	    if(kNormValue[ic][iRP]<=0){
	      Int_t ib = hDeltaPt[iDelta][ic][iRP]->FindBin(kNormPt);
	      kNormValue[ic][iRP] = hDeltaPt[iDelta][ic][iRP]->GetBinContent(ib);
	    }
	    if(iDelta==kNormType){
	      Int_t ib = hDeltaPt[iDelta][ic][iRP]->FindBin(kNormPt);
	      Float_t val1 = hDeltaPt[iDelta][ic][iRP]->GetBinContent(ib);
	      if(val1){
		hDeltaPt[iDelta][ic][iRP]->Scale(kNormValue[ic][iRP]/val1);
	      }
	    }
	    iLegCount++;
	    hDeltaPt[iDelta][ic][iRP]->DrawCopy("psame");
	    //	    leg1->AddEntry(hDeltaPt[iDelta][ic][iRP],sDelta[iDelta][iRP].Data(),"P");
	    c1->Update();
	    draw_legend_m(0.01,0.95,(TAttMarker*)hDeltaPt[iDelta][ic][iRP],sDelta[iDelta][iRP].Data(),iLegCount,1,0.026); 


	    if(kFitDelta[iDelta]){
	      tmpGaus = FitLHSgaus(hDeltaPt[iDelta][ic][iRP]);
	      mean = tmpGaus->GetParameter(1);
	      sigma = tmpGaus->GetParameter(2);
	      mean_error = tmpGaus->GetParError(1);
	      sigma_error = tmpGaus->GetParError(2);	
	      
	      tmpGaus->SetRange(-40,40);
	      tmpGaus->SetLineColor(hDeltaPt[iDelta][ic][iRP]->GetLineColor());
	      tmpGaus->SetLineStyle(kLineDelta[iDelta]);
	      tmpGaus->Draw("same");
	      //	      leg1->AddEntry(tmpGaus,Form("LHS Gauss fit: #mu = %2.2f, #sigma = %2.2f",mean,sigma),"L");
	      draw_legend_l(0.45,0.95,tmpGaus,Form("LHS fit: #mu = %2.2f, #sigma = %2.2f",mean,sigma),iLegCount,1,0.026); 
	      Double_t cent = (fCentUp[ic]+fCentLo[ic])/2;
	      Double_t cent_e = (fCentUp[ic]-fCentLo[ic])/2;
	      Printf("cent %3.3f +- %3.3f",cent,cent_e);
	      grMeanDeltaPtCent[iDelta][iRP]->SetPoint(ic,cent,mean);
	      grMeanDeltaPtCent[iDelta][iRP]->SetPointError(ic,cent_e,mean_error);
	      
	      grSigmaDeltaPtCent[iDelta][iRP]->SetPoint(ic,cent,sigma);
	      grSigmaDeltaPtCent[iDelta][iRP]->SetPointError(ic,cent_e,sigma_error);
	    }
	  } //deltatypes
	}// RP
	//	leg1->Draw();
	txtHead->DrawLatex(0.5,0.99,Form("LHC2010 Pb-Pb %2.0f-%2.0f%% R = 0.4 (B%d)",fCentLo[ic],fCentUp[ic],iB));
	DrawALICE(c1,iALICEType,0.7,0.72);
	c1->Update();
	c1->SaveAs(Form("%sdeltaPt_pT%s%s_B%d_cen%02d_%03d.%s",
			picPrefix.Data(),
			Form("%03.0f_%03.0f",inPtLo,inPtUp),
			(iPlotType&(1<<2))?"_rp":"",
			iB,ic,iPlotFlag,
			picSuffix.Data()));
	if(!gROOT->IsBatch()){
	  if(getchar()=='q')return 1;
	}
      }

      // Draw the trending plots vs cent...
      c1->SetLogy(0);    
      TH2F* hFrameMeanCent = new TH2F("hMeanCent",";centrality (%);#mu of LHS Gauss (GeV/c)",1,0.,100.,1,-10.,15.);
      hFrameMeanCent->SetLabelSize(hFrame->GetLabelSize("Y")*0.9,"Y");
      hFrameMeanCent->SetLabelSize(hFrame->GetLabelSize("X")*0.9,"X");
      hFrameMeanCent->SetTitleSize(hFrame->GetTitleSize("Y")*0.9,"Y");
      hFrameMeanCent->SetTitleSize(hFrame->GetTitleSize("X")*0.9,"X");
      hFrameMeanCent->SetTitleOffset(1.1,"Y");
      hFrameMeanCent->SetTitleOffset(1.1,"X");
      hFrameMeanCent->SetStats(kFALSE);
      hFrameMeanCent->DrawCopy();
      
      TLegend *legSM = new TLegend(0.2,0.7,0.3,0.98);
      //      legSM->SetHeader(Form("Pb-Pb R = 0.4 (B%d)",iB));
      legSM->SetFillColor(0);
      legSM->SetTextFont(gStyle->GetTextFont());
      legSM->SetTextSize(gStyle->GetTextSize()*0.6);
      legSM->SetBorderSize(0);
      
      Int_t iLegCount = 0;      
      for(iRP = 0;iRP<((iPlotType&(1<<2))?nRP:1);iRP++){
	for(iDelta = 0;iDelta <kDeltaTypes;iDelta++){
	  if(!(iPlotFlag&(1<<iDelta)))continue;
	  if(!grMeanDeltaPtCent[iDelta][iRP])continue;
	  c1->Update();
	  if(iDelta==8||iDelta==8){
	  }
	  else{
	    grMeanDeltaPtCent[iDelta][iRP]->Draw("psame");
	    draw_legend_m(0.01,0.95,grMeanDeltaPtCent[iDelta][iRP],sDelta[iDelta][iRP].Data(),iLegCount,1,0.026); 
	    //	  legSM->AddEntry(grMeanDeltaPtCent[iDelta][iRP],sDelta[iDelta][iRP].Data(),"P");
	    iLegCount++;
	  }
	}
      }
      //      legSM->Draw();
      txtHead->DrawLatex(0.5,0.99,Form("LHC2010 Pb-Pb #sqrt{s} = 2.76 TeV"));
      DrawALICE(c1,iALICEType,0.7,0.8);
      c1->Update();
      c1->SaveAs(Form("%sMeanVsCent_pT%s%s_B%d_%03d.%s",
		      picPrefix.Data(),
		      Form("%03.0f_%03.0f",inPtLo,inPtUp),
		      (iPlotType&(1<<2))?"_rp":"",
		      iB,iPlotFlag,picSuffix.Data()));
	if(!gROOT->IsBatch()){
      if(getchar()=='q')return 1;
	}
      TH2F* hFrameSigmaCent = new TH2F("hSigmaCent",";centrality (%);#sigma of LHS Gauss (GeV/c)",1,0.,100.,10,0.,18.);
      hFrameSigmaCent->SetLabelSize(hFrame->GetLabelSize("Y")*0.9,"Y");
      hFrameSigmaCent->SetLabelSize(hFrame->GetLabelSize("X")*0.9,"X");
      hFrameSigmaCent->SetTitleSize(hFrame->GetTitleSize("Y")*0.9,"Y");
      hFrameSigmaCent->SetTitleSize(hFrame->GetTitleSize("X")*0.9,"X");
      hFrameSigmaCent->SetTitleOffset(1.1,"Y");
      hFrameSigmaCent->SetTitleOffset(1.1,"X");
      hFrameSigmaCent->SetStats(kFALSE);
      hFrameSigmaCent->DrawCopy();
      
      /*
      TLegend *legSC = new TLegend(0.2,0.7,0.3,0.98);
      legSC->SetHeader(Form("Pb-Pb R = 0.4 (B%d)",iB));
      legSC->SetFillColor(0);
      legSC->SetTextFont(gStyle->GetTextFont());
      legSC->SetTextSize(gStyle->GetTextSize()*0.6);
      legSC->SetBorderSize(0);
      */

      iLegCount = 0;

      for(iRP = 0;iRP<((iPlotType&(1<<2))?nRP:1);iRP++){
	for(iDelta = 0;iDelta <kDeltaTypes;iDelta++){
	  if(!(iPlotFlag&(1<<iDelta)))continue;
	  if(!grSigmaDeltaPtCent[iDelta][iRP])continue;
	  grSigmaDeltaPtCent[iDelta][iRP]->Draw("psame");
	  //	  legSC->AddEntry(grSigmaDeltaPtCent[iDelta][iRP],sDelta[iDelta][iRP].Data(),"P");
	  c1->Update();
	  draw_legend_m(0.01,0.95,grSigmaDeltaPtCent[iDelta][iRP],sDelta[iDelta][iRP].Data(),iLegCount,1,0.026); 
	  iLegCount++;
	}
      }
      //      legSC->Draw();
      txtHead->DrawLatex(0.5,0.99,Form("LHC2010 Pb-Pb #sqrt{s} = 2.76 TeV"));
      DrawALICE(c1,iALICEType,0.7,0.8);
      c1->Update();
      c1->SaveAs(Form("%sSigmaVsCent_pT%s%s_B%d_%03d.%s",
		      picPrefix.Data(),
		      Form("%03.0f_%03.0f",inPtLo,inPtUp),
		      (iPlotType&(1<<2))?"_rp":"",
		      iB,iPlotFlag,picSuffix.Data()));

      if(!gROOT->IsBatch()){
	if(getchar()=='q')return 1;
      }
    }

    // plot the trends vs mult
    if(iPlotType&(1<<1)){
      for(int im = 0;im < nMult;im++){
	TLegend *leg1 = new TLegend(0.2,0.7,0.3,0.98);

	leg1->SetFillColor(0);
	leg1->SetTextFont(gStyle->GetTextFont());
	leg1->SetTextSize(gStyle->GetTextSize()*0.6);
	leg1->SetBorderSize(0);
	c1->SetLogy();
	hFrame->DrawCopy();
	
	Int_t iLegCount = -1;
	for(iRP = 0;iRP<((iPlotType&(1<<2))?nRP:1);iRP++){
	  Double_t mean = 0;
	  Double_t sigma = 0;
	  Double_t sigma_error = 0;
	  Double_t mean_error = 0;
	  TF1* tmpGaus = 0;
	  for(iDelta = 0;iDelta<kDeltaTypes;iDelta++){
	    
	    if(!grMeanDeltaPtMult[iDelta][iRP]&&kFitDelta[iDelta]){
	      grMeanDeltaPtMult[iDelta][iRP] = new TGraphErrors(nMult);
	    }
	    if(!grSigmaDeltaPtMult[iDelta][iRP]&&kFitDelta[iDelta]){
	      grSigmaDeltaPtMult[iDelta][iRP] = new TGraphErrors(nMult);

	    }

	    SetGraphAttributes(grMeanDeltaPtMult[iDelta][iRP],kMarkerDelta[iDelta],kColorDelta[iDelta]);
	    if(iRP>0)SetGraphAttributes(grMeanDeltaPtMult[iDelta][iRP],kMarkerRP[iRP],kColorRP[iRP]);
	    
	    SetGraphAttributes(grSigmaDeltaPtMult[iDelta][iRP],kMarkerDelta[iDelta],kColorDelta[iDelta]);
	    if(iRP>0)SetGraphAttributes(grSigmaDeltaPtMult[iDelta][iRP],kMarkerRP[iRP],kColorRP[iRP]);
	      
	    if(!hDeltaPtMult[iDelta][im][iRP]){
	      Printf("%d:%d:%d not found",iDelta,im,iRP);
	      continue;
	    }
	    SetHistoAttributes(hDeltaPtMult[iDelta][im][iRP],kMarkerDelta[iDelta],kColorDelta[iDelta]);
	    if(iRP>0)SetHistoAttributes(hDeltaPtMult[iDelta][im][iRP],kMarkerRP[iRP],kColorRP[iRP]);
	    if(!(iPlotFlag&(1<<iDelta)))continue;


	    // take the first iDelta Pt as anchor for norm, worst case does nothin (scale with 1
	    if(kNormValueMult[im][iRP]<=0){
	      Int_t ib = hDeltaPtMult[iDelta][im][iRP]->FindBin(kNormPt);
	      kNormValueMult[im][iRP] = hDeltaPtMult[iDelta][im][iRP]->GetBinContent(ib);
	    }


	    if(iDelta==kNormType){
	      Int_t ib = hDeltaPtMult[iDelta][im][iRP]->FindBin(kNormPt);
	      Float_t val1 = hDeltaPtMult[iDelta][im][iRP]->GetBinContent(ib);
	      if(val1!=0){
		hDeltaPtMult[iDelta][im][iRP]->Scale(kNormValueMult[im][iRP]/val1);
	      }
	    }

	    hDeltaPtMult[iDelta][im][iRP]->DrawCopy("psame");
	    leg1->AddEntry(hDeltaPtMult[iDelta][im][iRP],sDelta[iDelta][iRP].Data(),"P");
	    c1->Update();
	    iLegCount++;
	    draw_legend_m(0.01,0.95,hDeltaPtMult[iDelta][im][iRP],sDelta[iDelta][iRP].Data(),iLegCount,1,0.026); 
	    if(kFitDelta[iDelta]){
	      tmpGaus = FitLHSgaus(hDeltaPtMult[iDelta][im][iRP]);
	      mean = tmpGaus->GetParameter(1);
	      sigma = tmpGaus->GetParameter(2);
	      mean_error = tmpGaus->GetParError(1);
	      sigma_error = tmpGaus->GetParError(2);	
	      
	      /*
	      if(iDelta==8){
		mean= hDeltaPtMult[iDelta][im][iRP]->GetMean();
		sigma= hDeltaPtMult[iDelta][im][iRP]->GetRMS();
	      }
	      */ 
	      tmpGaus->SetRange(-40,40);
	      tmpGaus->SetLineColor(hDeltaPtMult[iDelta][im][iRP]->GetLineColor());
	      tmpGaus->Draw("same");
	      leg1->AddEntry(tmpGaus,Form("LHS Gauss fit: #mu = %2.2f, #sigma = %2.2f",mean,sigma),"L");
	      draw_legend_l(0.45,0.95,tmpGaus,sDelta[iDelta][iRP].Data(),iLegCount,1,0.026); 
	      // to be replaced by actual mean of the mutliplicity
	      Double_t mult = (multMin[im]+multMax[im])/2;
	      Double_t mult_e = (multMax[im]-multMin[im])/2;
	      Printf("mult %3.3f +- %3.3f",mult,mult_e);
	      grMeanDeltaPtMult[iDelta][iRP]->SetPoint(im,mult,mean);
	      grMeanDeltaPtMult[iDelta][iRP]->SetPointError(im,mult_e,mean_error);
	      

		grSigmaDeltaPtMult[iDelta][iRP]->SetPoint(im,mult,sigma);
		grSigmaDeltaPtMult[iDelta][iRP]->SetPointError(im,mult_e,sigma_error);

	    }
	  }
	}
	//	leg1->Draw();
	txtHead->DrawLatex(0.5,0.99,Form("Pb-Pb mult. %03d-%03d R = 0.4 (B%d)",multMin[im],multMax[im],iB));
	txt2->SetNDC();

	//    txt2->DrawLatex(0.5,0.97,"ALICE Performance 01/03/2011");
	DrawALICE(c1,iALICEType,0.7,0.72);
	c1->Update();
	c1->SaveAs(Form("%sdeltaPt_pT%s%s_B%d_mult%02d_%03d.%s",
			picPrefix.Data(),
			Form("%03.0f_%03.0f",inPtLo,inPtUp),
			(iPlotType&(1<<2))?"_rp":"",
			iB,im,iPlotFlag,
			picSuffix.Data()));
	if(!gROOT->IsBatch()){
	  if(getchar()=='q')return 1;	
	}
      }
	// Draw the trending plots vs cent...
	c1->SetLogy(0);    
	TH2F* hFrameMeanMult = new TH2F("hMeanMult",";raw #tracks;#mu of LHS Gauss (GeV/c)",500,0.,3200.,12,-10.,15.);
	hFrameMeanMult->SetLabelSize(hFrame->GetLabelSize("Y")*0.9,"Y");
	hFrameMeanMult->SetLabelSize(hFrame->GetLabelSize("X")*0.9,"X");
	hFrameMeanMult->SetTitleSize(hFrame->GetTitleSize("Y")*0.9,"Y");
	hFrameMeanMult->SetTitleSize(hFrame->GetTitleSize("X")*0.9,"X");
	hFrameMeanMult->SetTitleOffset(1.1,"Y");
	hFrameMeanMult->SetTitleOffset(1.1,"X");
	hFrameMeanMult->SetStats(kFALSE);
	hFrameMeanMult->DrawCopy();
	
	TLegend *legMM = new TLegend(0.2,0.7,0.3,0.98);
	legMM->SetHeader(Form("Pb-Pb R = 0.4 (B%d)",iB));
	legMM->SetFillColor(0);
	legMM->SetTextFont(gStyle->GetTextFont());
	legMM->SetTextSize(gStyle->GetTextSize()*0.6);
	legMM->SetBorderSize(0);
	
	iLegCount = -1;
	c1->Update();
	for(iRP = 0;iRP<((iPlotType&(1<<2))?nRP:1);iRP++){
	  for(iDelta = 0;iDelta <kDeltaTypes;iDelta++){
	    if(!(iPlotFlag&(1<<iDelta)))continue;
	    if(!grMeanDeltaPtMult[iDelta][iRP])continue;

	    if(iDelta==8||iDelta==11){
	      //	      iLegCount++;
	      //	      grMeanDeltaPtMult[iDelta][iRP]->Draw("Csame");
	      //	      legMM->AddEntry(grSigmaDeltaPtMult[iDelta][iRP],sDelta[iDelta][iRP].Data(),"L");
	      //	      draw_legend_l(0.01,0.95,grMeanMultPtCent[iDelta][iRP],sDelta[iDelta][iRP].Data(),iLegCount,1,0.026); 
	    }
	    else{
	      iLegCount++;
	      grMeanDeltaPtMult[iDelta][iRP]->Draw("psame");
	      //	      legMM->AddEntry(grSigmaDeltaPtMult[iDelta][iRP],sDelta[iDelta][iRP].Data(),"P");
	      draw_legend_m(0.01,0.95,grMeanDeltaPtMult[iDelta][iRP],sDelta[iDelta][iRP].Data(),iLegCount,1,0.026); 
	    }

	  }
	}
	//	legMM->Draw();
	txtHead->DrawLatex(0.5,0.99,Form("LHC2010 Pb-Pb #sqrt{s} = 2.76 TeV"));
	DrawALICE(c1,iALICEType,0.7,0.8);
      
	c1->Update();
	c1->SaveAs(Form("%sMeanVsMult_pT%s%s_B%d_%03d.%s",
			picPrefix.Data(),
			Form("%03.0f_%03.0f",inPtLo,inPtUp),
			(iPlotType&(1<<2))?"_rp":"",
			iB,iPlotFlag,picSuffix.Data()));
	if(!gROOT->IsBatch()){
	if(getchar()=='q')return 1;
	}
	TH2F* hFrameSigmaMult = new TH2F("hSigmaMult",";raw #tracks;#sigma of LHS Gauss (GeV/c)",500,0.,3200.,10,0.,18.);
	hFrameSigmaMult->SetLabelSize(hFrame->GetLabelSize("Y")*0.9,"Y");
	hFrameSigmaMult->SetLabelSize(hFrame->GetLabelSize("X")*0.9,"X");
	hFrameSigmaMult->SetTitleSize(hFrame->GetTitleSize("Y")*0.9,"Y");
	hFrameSigmaMult->SetTitleSize(hFrame->GetTitleSize("X")*0.9,"X");
	hFrameSigmaMult->SetTitleOffset(1.1,"Y");
	hFrameSigmaMult->SetTitleOffset(1.1,"X");
	hFrameSigmaMult->SetStats(kFALSE);
	hFrameSigmaMult->DrawCopy();
	
	TLegend *legSM = new TLegend(0.2,0.7,0.3,0.98);
	legSM->SetHeader(Form("Pb-Pb R = 0.4 (B%d)",iB));
	legSM->SetFillColor(0);
	legSM->SetTextFont(gStyle->GetTextFont());
	legSM->SetTextSize(gStyle->GetTextSize()*0.6);
	legSM->SetBorderSize(0);

	iLegCount=-1;
	c1->Update();
	for(iRP = ((iPlotType&(1<<2))?1:0);iRP<((iPlotType&(1<<2))?nRP:1);iRP++){
	  for(iDelta = 0;iDelta <kDeltaTypes;iDelta++){
	    if(!(iPlotFlag&(1<<iDelta)))continue;
	    if(!grSigmaDeltaPtMult[iDelta][iRP])continue;
	    Printf("%d leg coutn",iLegCount);
	    if(iDelta==8||iDelta==11){
	      iLegCount++;
	      grSigmaDeltaPtMult[iDelta][iRP]->Draw("Csame");
	      TString cTmp1 = sDelta[iDelta][0];
	      cTmp1.ReplaceAll(" (all)"," ");
	      sDelta[iDelta][iRP] = cTmp1 + sDelta[iDelta][iRP];
	      draw_legend_l(0.01,0.95,grSigmaDeltaPtMult[iDelta][iRP],sDelta[iDelta][iRP].Data(),iLegCount,1,0.026); 
	    }
	    else{
	      iLegCount++;
	      TString cTmp1 = sDelta[iDelta][0];
	      cTmp1.ReplaceAll(" (all)"," ");
	      sDelta[iDelta][iRP] = cTmp1 + sDelta[iDelta][iRP];
	      grSigmaDeltaPtMult[iDelta][iRP]->Draw("psame");
	      draw_legend_m(0.01,0.95,grSigmaDeltaPtMult[iDelta][iRP],sDelta[iDelta][iRP].Data(),iLegCount,1,0.026); 
	    }

	  }
	}
	//	legSM->Draw();
	txtHead->DrawLatex(0.5,0.99,Form("LHC2010 Pb-Pb #sqrt{s} = 2.76 TeV"));

	DrawALICE(c1,iALICEType,0.7,0.8);
	c1->Update();
	c1->SaveAs(Form("%sSigmaVsMult_pT%s%s_B%d_%03d.%s",
			picPrefix.Data(),
			Form("%03.0f_%03.0f",inPtLo,inPtUp),
			(iPlotType&(1<<2))?"_rp":"",
			iB,iPlotFlag,picSuffix.Data()));
	if(!gROOT->IsBatch()){
	if(getchar()=='q')return 1;
	}
	
    }// trends vs. mult

    // plot the trend with RP and vs. mult
    CloseFiles();
    return 0;


}


void ScaleH1(TH1* h,char* cX,char* cY,Float_t fScale,Bool_t bWidth){
  if(!h)return;
  if(!fScale)return;

  h->Scale(fScale);
  if(bWidth){
    for(int ib = 1;ib <= h->GetNbinsX();ib++){
      Float_t val = h->GetBinContent(ib);
      Float_t err = h->GetBinError(ib);
      Float_t w = h->GetBinWidth(ib);
      h->SetBinContent(ib,val/w);
      h->SetBinError(ib,err/w);
      // Printf("width %f",w);
    }
  }
  h->SetXTitle(cX);
  h->SetYTitle(cY);

}


void ScaleH2(TH2* h,char* cX,char* cY,char* cZ,Float_t fScale,Bool_t bWidth){
  if(!h)return;
  if(!fScale)return;
  
  h->Scale(fScale);
  if(bWidth){
    for(int ibx = 1;ibx <= h->GetNbinsX();ibx++){
      for(int iby = 1;iby <= h->GetNbinsY();iby++){
	Float_t val = h->GetBinContent(ibx,iby);
	Float_t err = h->GetBinError(ibx,iby);
	Float_t wx = h->GetXaxis()->GetBinWidth(ibx);
	Float_t wy = h->GetYaxis()->GetBinWidth(iby);
	h->SetBinContent(ibx,iby,val/(wx*wy));
	h->SetBinError(ibx,iby,err/(wx*wy));
	// Printf("width %f",w);
      }
    }
  }
  h->SetXTitle(cX);
  h->SetYTitle(cY);
  h->SetZTitle(cZ);

}

void SetStyleH1(TH1 *h,Int_t color,Int_t fillStyle,Int_t markerStyle){
  if(color){
    h->SetLineColor(color);
    h->SetLineWidth(3);
    h->SetMarkerColor(color);
    h->SetFillColor(color);
  }
  if(fillStyle)h->SetFillStyle(fillStyle);
  if(markerStyle)h->SetMarkerStyle(markerStyle);
}

void HistsFromSingleJets(char* cMask,TList *list,Int_t nJets,TH1F** h,Int_t iRebin,int iFirst){

  for(int ij = iFirst;ij < nJets;ij++){
    h[ij] = (TH1F*)list->FindObject(Form(cMask,ij));

    if(h[ij]){
      if(iRebin>1){
        h[ij] = (TH1F*)h[ij]->Clone();
	h[ij]->SetDirectory(gROOT);
        h[ij]->Rebin(iRebin);
      }
      if(ij==iFirst){
        h[nJets] = (TH1F*)h[ij]->Clone(Form(cMask,nJets));
      }
      else{
        h[nJets]->Add(h[ij]);
      }
    }
    else{
      Printf("%s not found",Form(cMask,ij));
    }
  }

}


void HistsFromSingleJets(char* cMask,TList *list,Int_t nJets,TH2F** h,Int_t iRebin,int iFirst){

  for(int ij = iFirst;ij < nJets;ij++){
    h[ij] = (TH2F*)list->FindObject(Form(cMask,ij));
    if(h[ij]){
      if(iRebin>1){
        h[ij] = (TH2F*)h[ij]->Clone();
        h[ij]->SetDirectory(gROOT);
        h[ij]->Rebin(iRebin);
      }
      if(ij==iFirst){
        h[nJets] = (TH2F*)h[ij]->Clone(Form(cMask,nJets));
      }
      else{
        h[nJets]->Add(h[ij]);
      }
    }
    else{
      Printf("%s not found",Form(cMask,ij));
    }
  }

}

void ScaleNevent(TH1* h,TFile *fIn,Int_t iCond,Int_t iMC,Int_t iCen){
  // fetch the trigger histos                                                                                                                                                      

  TDirectory *dir = (TDirectory*)fIn->Get("PWG4_services");
  TList *list1 = (TList*)dir->Get("pwg4serv");

  TH2F* hTriggerCount =(TH2F*)list1->FindObject("fh2TriggerCount");
  Float_t nevents = hTriggerCount->GetBinContent(hTriggerCount->FindBin(0+iCen,iCond)); // we have to scale with number of triggers?                                               

  Float_t xsection = 1;
  if(iMC==7000){
    // 7 TeV sigma ND = 48.85 sigma NEL = 71.39 (Pythia 8... confirm with 6                                                                                                        
    xsection = 71.39;
    Printf("MC Scaling setting nevents=%f to 1, xsection = %E",nevents,xsection);
    nevents = 1;
  }

  Printf("Scaling %s with number of event %f",h->GetName(),nevents);
  if(nevents){
    Float_t scalef = 1./nevents/xsection;
    Printf("scale factor %E",scalef);
    h->Scale(scalef);
  }

}

Double_t Gamma0(Double_t *x,Double_t *par){

  // Fixed multiplicity M


  Double_t p = par[0];
  Double_t b = par[1];
  Double_t A = par[2];
  Double_t xval = x[0] + p/b;
  // xval += par[3];
  if(xval<0)return 0;

  // take log to avoid zeros and NANs
  Double_t f1 = TMath::Log(A*b);
  Double_t f11 = 1;// ROOT::Math::lgamma(p); 
  Double_t f2 = TMath::Log(b * xval)*(p-1);
  Double_t f3 = -1.*b*xval;
  Double_t f = f1-f11+f2+f3;
  f = TMath::Exp(f);
  return f;
}

Double_t Gamma(Double_t *x,Double_t *par){

  // Fixed multiplicity M
  Double_t M = par[0];
  // Paramter p = <p_T>^2/sigma_p_T^2 adn b = <p_T>/sigma_p_T^2
  Double_t b = par[1]/par[2]/par[2];
  Double_t p = par[1] * b;

  Double_t f = M * b / 1; // ROOT::Math::tgamma(M*p) * TMath::Power(M * b * x[0],M*(p-1)) * TMath::Exp(M*b*x[0]); 

  return f;
}


TF1* FitLHSgaus(TH1D *hDeltaPt, double minPt, double maxPt, int minIterations, int maxIterations, double maxDeltaMean, int mode, double minBoundSigma, double maxBoundSigma)
{

  Double_t minPtBound = minPt;
  Double_t maxPtBound = maxPt;

  Int_t nIter = 0;
  Double_t deltaMean = 999.;
  Double_t oldMean   = 0.;

  TF1 *f1 = new TF1("f1","gaus",minPtBound,maxPtBound);
  Double_t sigma = 0.;
  Double_t sigma_error = 0.;
  Double_t mean = 0.;
  Double_t mean_error = 0.;

  while(nIter<minIterations || (nIter<maxIterations && deltaMean>maxDeltaMean)){

     if(nIter>0){ // for initial fit use minPt and maxPt
        if(mode==0){
           maxPtBound = mean+5.;
        }
        if(mode==1){
           minPtBound = mean-(minBoundSigma*sigma);
           maxPtBound = mean+(maxBoundSigma*sigma);
        }
     }

     f1->SetRange(minPtBound, maxPtBound);
     hDeltaPt->Fit(f1,"R0");
     Printf("fit range: %2.2f - %2.2f", minPtBound, maxPtBound);
     mean = f1->GetParameter(1);
     sigma = f1->GetParameter(2);
     mean_error = f1->GetParError(1);
     sigma_error = f1->GetParError(2);

     deltaMean = TMath::Abs(mean-oldMean);
     oldMean = mean;
     Printf("FIT %d:  #mu = %2.2f +- %2.2f (diff %2.2f), #sigma = %2.2f +- %2.2f, #chi_{2}/NDF = %2.2f/%d", nIter, mean, mean_error, deltaMean, sigma, sigma_error, f1->GetChisquare(), f1->GetNDF());
     nIter++;
  }

  f1->SetRange(f1->GetX(1E-5,-70.,0.)-0.75,f1->GetX(1E-5,0.,70.)+0.75);

  return f1;
}



TF1* FitLHSgaus(TH1D *hDeltaPt, double &sigma, double &sigma_error, double &mean)
{

  TF1 *f1 = new TF1("LHSgaus","gaus");
  f1->SetParameters(1,0,11);
  hDeltaPt->Fit(f1,"R0","",-50.,0.);
  //  f1 = hDeltaPt->GetFunction("gaus");
  sigma = f1->GetParameter(2);
  mean = f1->GetParameter(1);
  hDeltaPt->Fit(f1,"R0","",mean-3.*sigma,mean+0.3*sigma);
  mean = f1->GetParameter(1);
  sigma = f1->GetParameter(2);
  sigma_error = f1->GetParError(2);

  return f1;
}




TH2F* GetTH2PlotB(const char *cPath,Int_t embType, Int_t classType, Int_t cl, Int_t rp){
   
   // emb type 0: single tracks, 1: emb jets
   // class type 0: centrality, 1: multiplicity (nb. of input tracks)
   // cl: centrality or multplicity class, -1 all
   // rp -1: all, 0: in plane, 1: in between, 2: out of plane
   
   TString sClType;
   if(classType) sClType = "mult";
   else          sClType = "cent";
   TString sEmbType;
   if(embType==0) sEmbType = "singles";
   if(embType==1) sEmbType = "jets";
   
   TString path(cPath);
   TString file = Form("%s/jetresponse_%s_%s.root",path.Data(),sClType.Data(),sEmbType.Data());
   TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject(file.Data());
   if(!f)f = TFile::Open(file);

   if(!f){
      Printf("GetTH2PlotB:%d Could not open file %s",__LINE__,file.Data());
      return 0x0;
   }
   
   TString dfName = Form("JetsDeltaPt/rp %d/%s %d",rp,sClType.Data(),cl);
   TDirectory* df = (TDirectory*)f->Get(dfName.Data());
   if(!df){
      Printf("GetTH2PlotB:%d Could not open directory %s",__LINE__,dfName.Data());
      return 0x0;
   }
   
   TString h2Name = "delta pT vs Probe pT";
   TH2F* h2 = (TH2F*)(df->Get(h2Name.Data()))->Clone(Form("h2B_%d",cl));
   if(!h2){
      Printf("GetTH2PlotB:%d Could not get histogram %s",__LINE__,h2Name.Data());
      return 0x0;
   }
   
   return h2;
}

TObject* GetObjectFromFile(const char *cName,const char *cFile,const char* cDir,const char *cRep2,const char* cRep1){
   TDirectory *opwd = gDirectory;
   TFile *fIn = (TFile*)gROOT->GetListOfFiles()->FindObject(cFile);
   if(!fIn)fIn = TFile::Open(cFile);
   opwd->cd();

   if(!fIn){
     Printf("File %s not found",cFile);
     return 0;
   }
   TDirectory *dir = (TDirectory*)fIn->Get(cDir);
   if(!dir){
     Printf("dir %s not found",cDir);
     return 0;
   }
   TString sList(cDir);
   sList.ReplaceAll(cRep1,cRep2);
   TList *list = (TList*)dir->Get(sList.Data());
   if(!list){
     Printf("list %s not found",sList.Data());
     return 0;
   }
   
   TObject *obj = list->FindObject(cName);
   if(!obj){
     Printf("object %s not found",cName);
     return 0;
   }
   return obj;
 }

Double_t GetPoissonFluctuation(TH1 *h1,Double_t areaIn,Double_t areaJet){
  if(!h1)return 0;
  Printf(">>>> %s ",h1->GetName());
  Double_t meanPt = h1->GetMean();
  Double_t rmsPt = h1->GetRMS();
  Double_t mult = h1->Integral("width");

  Double_t multJet = mult/areaIn*areaJet;
  Double_t sigma = TMath::Sqrt(multJet) * TMath::Sqrt(meanPt*meanPt+rmsPt*rmsPt); 
  Printf("MeanPt %6.3f RMS %6.3f Tracks: %d",meanPt,rmsPt,(Int_t)mult);
  Printf("Tracks/jet: %d SigmaJet: %6.3f",(Int_t)multJet,sigma);
  return sigma;
}

void SetHistoAttributes(TH1* h1,Int_t iMarker,Int_t iColor,Float_t fMarkerSize){
  if(!h1)return;


  h1->SetLineWidth(gStyle->GetLineWidth());
  h1->SetLineColor(iColor);

  h1->SetMarkerColor(iColor);
  h1->SetMarkerStyle(iMarker);
  if(fMarkerSize>0){
    h1->SetMarkerSize(fMarkerSize);
    if(iMarker==29||iMarker==33)  h1->SetMarkerSize(fMarkerSize * 1.2); // st
  }
}

void SetGraphAttributes(TGraph* gr,Int_t iMarker,Int_t iColor){
  if(!gr)return;

  gr->SetLineColor(iColor);
  gr->SetLineWidth(gStyle->GetLineWidth());

  gr->SetMarkerColor(iColor);
  gr->SetMarkerStyle(iMarker);
  gr->SetMarkerSize(1.7);
  if(iMarker==29||iMarker==33||iMarker==31)  gr->SetMarkerSize(2.2); // st
}


void CloseFiles(){
  TSeqCollection *coll = gROOT->GetListOfFiles();
  for(int i = 0;i<coll->GetEntries();i++){
    TFile *f = (TFile*)coll->At(i);
    Printf("Closing %d %s",i,f->GetName());
    f->Close();
  }
}

    
void SetHistAxisStyle(TH1* h1,Float_t titleOffsetX,Float_t titleSizeX,Float_t labelSizeX,
		      Float_t titleOffsetY,Float_t titleSizeY,Float_t labelSizeY){

  
  if(titleOffsetX>0)h1->SetTitleOffset(titleOffsetX,"Y");
  if(titleOffsetY>0)h1->SetTitleOffset(titleOffsetY,"X");
  
  if(titleSizeX>0)h1->SetTitleSize(h1->GetTitleSize("X")*titleSizeX,"X");
  if(titleSizeY>0)h1->SetTitleSize(h1->GetTitleSize("Y")*titleSizeX,"Y");

  if(labelSizeX>0)h1->SetLabelSize(h1->GetLabelSize("X")*labelSizeX,"X");
  if(labelSizeY>0)h1->SetLabelSize(h1->GetLabelSize("Y")*labelSizeX,"Y");

}

void DrawDate(){
  static TDatime *time = new TDatime();
  static TLatex *labelDate= new TLatex();
  labelDate->SetNDC(kTRUE);
  labelDate->SetTextAlign(11);
  labelDate->SetTextSize(0.04);
  labelDate->SetTextFont(52);
  labelDate->DrawLatex(0.01,0.01,Form("%d-%d",time->GetDate(),time->GetTime()));
}


void DrawALICE(TCanvas *c,Int_t iType,Float_t xCenter,Float_t yCenter,TString cExtra2,bool bExtraBox){

  if(iType>10)DrawDate();
  Float_t aspectRatio = c->GetXsizeReal()/c->GetYsizeReal();;

  /*
  if(bExtraBox){
    const float  yHWB = 3.* 0.04;
    const float  xHWB = 3.* 0.04/aspectRatio;
    TPad *p1 = new TPad("extraPad","extra",xCenter-xHWB, yCenter-yHWB, 
			xCenter+xHWB, yCenter+yHWB);
    p1->SetFillColor(kBlue);
    p1->SetLineColor(kBlue);
    p1->Draw();
  }
  */
  static  TDatime *time = new TDatime();
  // iType = 1 Work in p
  // 
  TString cType = "";
  TString cExtra1 = "";
  if((iType%10)==1){
    cType = "ALICE work in progress";
  }
  else if((iType%10)==2){
    cType = "ALICE performance";
    cExtra1 = "Uncorrected";
    if(cExtra2.Length()==0){
      cExtra2 = Form("%04d/%02d/%02d",time->GetYear(),time->GetMonth(),time->GetDay());
    }
  }
  else if((iType%10)==3){
    cType = "ALICE preliminary";
  }
  else{
    Printf("No ALICE type %d",iType);
    return;
  }



  if(iType>10){
    cType = Form("%s requested",cType.Data());
  }
  
  if(cExtra2.Length()!=0&&cExtra1.Length()==0){
    cExtra1 = cExtra2;
    cExtra2 = "";
  }


  Float_t aspectRatio = c->GetXsizeReal()/c->GetYsizeReal();;

  const float  yHW = 1.5* 0.04;
  const float  xHW = 1.5* 0.04/aspectRatio;

  TPad *myPadLogo = new TPad("myPadLogo", "Pad for ALICE Logo",
			     xCenter-xHW,yCenter-yHW,
			     xCenter+xHW,yCenter+yHW); // check the aspect ratio 821 × 798

  myPadLogo->SetFillColor(0); 
  myPadLogo->SetBorderMode(0);
  myPadLogo->SetFrameBorderMode(0);
  myPadLogo->SetBorderSize(0);
  myPadLogo->SetLeftMargin(0.0);
  myPadLogo->SetTopMargin(0.0);
  myPadLogo->SetBottomMargin(0.0);
  myPadLogo->SetRightMargin(0.0);
  myPadLogo->Draw("");
  myPadLogo->cd();
  TASImage *myAliceLogo = new TASImage("/Users/kleinb/Pictures/Logo/alice_logo.png");
  myAliceLogo->Draw();


  c->cd();

  TLatex* t1=new TLatex();
  t1->SetNDC();
  t1->SetTextColor(kRed);
  t1->SetTextFont(42);
  t1->SetTextAlign(22);

  const Float_t textSize = 0.025;
  t1->SetTextSize(textSize);

  Float_t line = yCenter - yHW - 0.5 *textSize;
  t1->DrawLatex(xCenter,line,cType.Data());
  line = line - 1.1 *textSize;
  if(cExtra1.Length())t1->DrawLatex(xCenter,line,cExtra1.Data());
  line = line - 1.1 *textSize;
  if(cExtra2.Length())t1->DrawLatex(xCenter,line,cExtra2.Data());
  c->cd();

}

TH1* CorrectForEff(TH1 *hTrack){
  TDirectory* owd = gDirectory;
  TString cEff("eff_smallBins.root");
  TFile *fEff = (TFile*)gROOT->GetListOfFiles()->FindObject(cEff.Data());
  
  if(!fEff) fEff  = TFile::Open(cEff.Data());
  if(!fEff)return 0;
  owd->cd();

  TH1F *hEff = (TH1F*)fEff->Get("hSingleTrackEffPt");
  
  TH1* hCorr = (TH1*)hTrack->Clone(Form("%s_corr",hTrack->GetName()));
  
  if(TMath::Abs(hCorr->GetBinWidth(1)-hEff->GetBinWidth(1))>0.01){
    Printf("Warning!!! > CorrectforEff():%d Different Binning Eff dPt = %1.3f Track dpt = %1.3f",__LINE__,hEff->GetBinWidth(1),hCorr->GetBinWidth(1));
  }


  for(int i = 1;i <= hCorr->GetNbinsX();i++){
    Float_t pT = hCorr->GetBinCenter(i);
    Float_t eff = hEff->GetBinContent(hEff->FindBin(pT));
    Float_t val = hCorr->GetBinContent(i);
    Float_t err = hCorr->GetBinError(i);
    if(eff>0){
      hCorr->SetBinContent(i,val/eff);
      hCorr->SetBinError(i,err/eff);
    }
  }
  
  return hCorr;
}


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