ROOT logo
#include <math.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <Riostream.h>

#include "TVector2.h"
#include "TFile.h"
#include "TString.h"
#include "TF1.h"
#include "TH1.h"
#include "TH2.h"
#include "TH3.h"
#include "TProfile.h"
#include "TProfile2D.h"
#include "TMath.h"
#include "TText.h"
#include "TRandom3.h"
#include "TArray.h"
#include "TLegend.h"
#include "TStyle.h"
#include "TMinuit.h"
#include "TCanvas.h"
#include "TPad.h"

#define BohrR 1963.6885
#define FmToGeV 0.19733 // conversion to fm
#define PI 3.1415926
#define masspiC 0.1395702 // pi+ mass (GeV/c^2)

using namespace std;

const int ChProdBOI=0;// 0=SameCharge, 1=MixedCharge1, 2=MixedCharge2
const int KTBin=0;// Kt3 bin. 0=low Kt3 bin.  1=high Kt3 bin
const int MBOI=0;// Centrality bin: 0-9
const int GbinPlot=int( (34) /2. ) + 55;// +5 (Rcoh=0), +25 (Rcoh=Rch) or +55 for extended G range
const int Q3binChi2= 4;// 2-5
const int Q4binChi2= 7;// 3-7

//
//
//
int TextFont=42;// 63, or 42
float SizeLabel=0.06;// 20(63 font), 0.08(42 font)
float SizeLegend=0.04;// .08
float SizeTitle=0.06;// 
float SizeSpecif=0.045;// 
float SF1=2/3.*0.95;
float SF2=1/2.*0.95;

double RightMargin=0.004;// 0.002
//

void Plot_plotsFourPion(){

  gStyle->SetOptStat(0);
  gStyle->SetOptDate(0);
  
  int Q3_meanpT[2][5]={{0,213,228,233,237},{0,316,336,354,366}};// low then high KT3
  int Q4_meanpT[2][7]={{0,0,221,229,234,238,241},{0,0,325,335,344,351,355}};// low then high KT4

  TFile *files[3][2][2][10];// SC/MC1/MC2, +/-, KT, MBINS
  //
 

  TH1D *C3QS[2][2][2][10];// SC/MC, +/-, KT, Mbin
  TH1D *c3QS[2][2][2][10];// SC/MC, +/-, KT, Mbin
  TH1D *C3QSBuilt[2][2][10];// +/-, KT, Mbin
  TH2D *C3QSBuilt2D[2][2][10];// +/-, KT, Mbin
  TH2D *C3QSNegBuilt2D[2][2][10];// +/-, KT, Mbin
  //
  TH1D *C4QS[3][2][2][10];// SC/MC, +/-, KT, Mbin
  TH1D *c4QS[3][2][2][10];// SC/MC, +/-, KT, Mbin
  TH1D *c4QSstage1[3][2][2][10];// SC/MC, +/-, KT, Mbin
  TH1D *c4QSstage2[2][2][10];// +/-, KT, Mbin
  TH1D *C4QSBuilt[2][2][10];// +/-, KT, Mbin
  TH2D *C4QSBuilt2D[2][2][10];// +/-, KT, Mbin
  TH2D *C4QSNegBuilt2D[2][2][10];// +/-, KT, Mbin
  //
  TH1D *r3[2][2][10];// +/-, KT, Mbin
  TH1D *r42[2][2][10];// +/-, KT, Mbin
  
  //
  //////////////////////////////

  // Start File access
  for(int mb=0; mb<10; mb++){
    for(int ChComb=0; ChComb<3; ChComb++) {// SC or MC1 or MC2
      for(int ch=0; ch<2; ch++) {// - or +
	for(int KT=0; KT<2; KT++) {// KT bin
	  if(ChComb==2 && ch!=0) continue;

	  TString *name = new TString("OutFiles/OutFile");
	  if(ChComb==0) name->Append("SC");
	  else if(ChComb==1) name->Append("MC1");
	  else name->Append("MC2");
	  //
	  if(ch==0) name->Append("_Neg_");
	  else name->Append("_Pos_");
	  name->Append("KT_");
	  *name += KT+1;
	  name->Append("_M");
	  if(mb<10) {*name += mb;}
	  else {*name += 0;}
	  name->Append(".root");
	  files[ChComb][ch][KT][mb] = new TFile(name->Data(),"READ");
	  ///////////////////////////////
	  if(ChComb!=2){
	    C3QS[ChComb][ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("C3QS");
	    c3QS[ChComb][ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("c3QS");
	    C3QS[ChComb][ch][KT][mb]->SetDirectory(0); c3QS[ChComb][ch][KT][mb]->SetDirectory(0); 
	    C3QS[ChComb][ch][KT][mb]->GetXaxis()->SetLabelFont(TextFont);  C3QS[ChComb][ch][KT][mb]->GetYaxis()->SetLabelFont(TextFont);
	    c3QS[ChComb][ch][KT][mb]->GetXaxis()->SetLabelFont(TextFont);  c3QS[ChComb][ch][KT][mb]->GetYaxis()->SetLabelFont(TextFont);
	    C3QS[ChComb][ch][KT][mb]->GetXaxis()->SetTitleFont(TextFont);  C3QS[ChComb][ch][KT][mb]->GetYaxis()->SetTitleFont(TextFont);
	    c3QS[ChComb][ch][KT][mb]->GetXaxis()->SetTitleFont(TextFont);  c3QS[ChComb][ch][KT][mb]->GetYaxis()->SetTitleFont(TextFont);
	    C3QS[ChComb][ch][KT][mb]->GetXaxis()->SetTitle("#font[12]{Q}_{3} (GeV/#font[12]{c})");
	    c3QS[ChComb][ch][KT][mb]->GetXaxis()->SetTitle("#font[12]{Q}_{3} (GeV/#font[12]{c})");
	    C3QS[ChComb][ch][KT][mb]->GetYaxis()->SetTitle("#font[12]{C}_{3} or #font[12]{#bf{c}}_{3}");
	    c3QS[ChComb][ch][KT][mb]->GetYaxis()->SetTitle("#font[12]{#bf{c}}_{3}");
	  }
	  C4QS[ChComb][ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("C4QS");
	  c4QS[ChComb][ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("c4QS");
	  c4QSstage1[ChComb][ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("c4QS_RemovalStage1");
	  C4QS[ChComb][ch][KT][mb]->SetDirectory(0); c4QS[ChComb][ch][KT][mb]->SetDirectory(0); 
	  c4QSstage1[ChComb][ch][KT][mb]->SetDirectory(0);
	  C4QS[ChComb][ch][KT][mb]->GetXaxis()->SetTitle("#font[12]{Q}_{4} (GeV/#font[12]{c})");
	  c4QS[ChComb][ch][KT][mb]->GetXaxis()->SetTitle("#font[12]{Q}_{4} (GeV/#font[12]{c})");
	  C4QS[ChComb][ch][KT][mb]->GetYaxis()->SetTitle("#font[12]{C}_{4} or #font[12]{#bf{c}}_{4}");
	  c4QS[ChComb][ch][KT][mb]->GetYaxis()->SetTitle("#font[12]{#bf{c}}_{4}");
	  
	  if(ChComb==0){
	    c4QSstage2[ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("c4QS_RemovalStage2");
	    C3QSBuilt[ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("C3QS_built");
	    C4QSBuilt[ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("C4QS_built");
	    C3QSBuilt2D[ch][KT][mb]=(TH2D*)files[ChComb][ch][KT][mb]->Get("C3QS_built2D");
	    C4QSBuilt2D[ch][KT][mb]=(TH2D*)files[ChComb][ch][KT][mb]->Get("C4QS_built2D");
	    C3QSNegBuilt2D[ch][KT][mb]=(TH2D*)files[ChComb][ch][KT][mb]->Get("C3QS_Negbuilt2D");
	    C4QSNegBuilt2D[ch][KT][mb]=(TH2D*)files[ChComb][ch][KT][mb]->Get("C4QS_Negbuilt2D");
	    //
	    c4QSstage2[ch][KT][mb]->SetDirectory(0);  C3QSBuilt[ch][KT][mb]->SetDirectory(0);  C4QSBuilt[ch][KT][mb]->SetDirectory(0); 
	    C3QSBuilt2D[ch][KT][mb]->SetDirectory(0);  C4QSBuilt2D[ch][KT][mb]->SetDirectory(0); 
	    C3QSNegBuilt2D[ch][KT][mb]->SetDirectory(0);  C4QSNegBuilt2D[ch][KT][mb]->SetDirectory(0);
	    //
	    r3[ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("r3");
	    r3[ch][KT][mb]->SetDirectory(0);
	    //
	    r42[ch][KT][mb]=(TH1D*)files[ChComb][ch][KT][mb]->Get("r42");
	    r42[ch][KT][mb]->SetDirectory(0);
	    //
	    C4QS[ChComb][ch][KT][mb]->SetBinContent(2,100); C4QS[ChComb][ch][KT][mb]->SetBinError(2,100);
	    c4QS[ChComb][ch][KT][mb]->SetBinContent(2,100); c4QS[ChComb][ch][KT][mb]->SetBinError(2,100);
	    c4QSstage1[ChComb][ch][KT][mb]->SetBinContent(2,100); c4QSstage1[ChComb][ch][KT][mb]->SetBinError(2,100);
	    c4QSstage2[ch][KT][mb]->SetBinContent(2,100); c4QSstage2[ch][KT][mb]->SetBinError(2,100);
	  }
	  files[ChComb][ch][KT][mb]->Close();
	}// KT
      }// ch
    }// ChComb
  }// mb
  
 
 
  TF1 *Unity = new TF1("Unity","1",0,100);
  Unity->SetLineStyle(2);
  Unity->SetLineColor(1);

  
  
  TH1D *C3QSmerged[2][2][10];// SC/MC, KT, Mbin
  TH1D *c3QSmerged[2][2][10];// SC/MC, KT, Mbin
  TH1D *C3QSBuiltmerged[2][10];// KT, Mbin
  TH2D *C3QSBuiltmerged2D[2][10];// KT, Mbin
  TH2D *C3QSNegBuiltmerged2D[2][10];// KT, Mbin
  //
  TH1D *C4QSmerged[3][2][10];// SC/MC, KT, Mbin
  TH1D *c4QSmerged[3][2][10];// SC/MC, KT, Mbin
  TH1D *c4QSstage1merged[3][2][10];// SC/MC, KT, Mbin
  TH1D *c4QSstage2merged[2][10];// KT, Mbin
  TH1D *C4QSBuiltmerged[2][10];// KT, Mbin
  TH2D *C4QSBuiltmerged2D[2][10];// KT, Mbin
  TH2D *C4QSNegBuiltmerged2D[2][10];// KT, Mbin
  
 for(int mb=0; mb<10; mb++){
   for(int ChComb=0; ChComb<3; ChComb++) {
     for(int KT=0; KT<2; KT++) {
       if(ChComb!=2){
	 C3QSmerged[ChComb][KT][mb] = (TH1D*)C3QS[ChComb][0][KT][mb]->Clone();
	 c3QSmerged[ChComb][KT][mb] = (TH1D*)c3QS[ChComb][0][KT][mb]->Clone();
       }
       //
       C4QSmerged[ChComb][KT][mb] = (TH1D*)C4QS[ChComb][0][KT][mb]->Clone();
       c4QSmerged[ChComb][KT][mb] = (TH1D*)c4QS[ChComb][0][KT][mb]->Clone();
       c4QSstage1merged[ChComb][KT][mb] = (TH1D*)c4QSstage1[ChComb][0][KT][mb]->Clone();
       //
       if(ChComb==0) {
	 c4QSstage2merged[KT][mb] = (TH1D*)c4QSstage2[0][KT][mb]->Clone();
	 C3QSBuiltmerged[KT][mb] = (TH1D*)C3QSBuilt[0][KT][mb]->Clone();
	 C4QSBuiltmerged[KT][mb] = (TH1D*)C4QSBuilt[0][KT][mb]->Clone();
	 C3QSBuiltmerged2D[KT][mb] = (TH2D*)C3QSBuilt2D[0][KT][mb]->Clone();
	 C4QSBuiltmerged2D[KT][mb] = (TH2D*)C4QSBuilt2D[0][KT][mb]->Clone();
	 C3QSNegBuiltmerged2D[KT][mb] = (TH2D*)C3QSNegBuilt2D[0][KT][mb]->Clone();
	 C4QSNegBuiltmerged2D[KT][mb] = (TH2D*)C4QSNegBuilt2D[0][KT][mb]->Clone();
       }
       
       if(ChComb!=2){
	 for(int bin=1; bin<=C3QSmerged[ChComb][KT][mb]->GetNbinsX(); bin++){
	   double value=0, value_e=0;
	   value = (C3QS[ChComb][0][KT][mb]->GetBinContent(bin) + C3QS[ChComb][1][KT][mb]->GetBinContent(bin)) / 2.;
	   value_e = sqrt(pow(C3QS[ChComb][0][KT][mb]->GetBinError(bin),2) + pow(C3QS[ChComb][1][KT][mb]->GetBinError(bin),2)) / sqrt(2.);
	   C3QSmerged[ChComb][KT][mb]->SetBinContent(bin, value);  C3QSmerged[ChComb][KT][mb]->SetBinError(bin, value_e);
	   //
	   value = (c3QS[ChComb][0][KT][mb]->GetBinContent(bin) + c3QS[ChComb][1][KT][mb]->GetBinContent(bin)) / 2.;
	   value_e = sqrt(pow(c3QS[ChComb][0][KT][mb]->GetBinError(bin),2) + pow(c3QS[ChComb][1][KT][mb]->GetBinError(bin),2)) / sqrt(2.);
	   c3QSmerged[ChComb][KT][mb]->SetBinContent(bin, value);  c3QSmerged[ChComb][KT][mb]->SetBinError(bin, value_e);
	   //
	   if(ChComb==0){
	     value = (C3QSBuilt[0][KT][mb]->GetBinContent(bin) + C3QSBuilt[1][KT][mb]->GetBinContent(bin)) / 2.;
	     value_e = 0;
	     C3QSBuiltmerged[KT][mb]->SetBinContent(bin, value);  C3QSBuiltmerged[KT][mb]->SetBinError(bin, value_e);
	     //
	     for(int binG=1; binG<=C3QSBuiltmerged2D[KT][mb]->GetNbinsX(); binG++){
	       value = (C3QSBuilt2D[0][KT][mb]->GetBinContent(binG, bin) + C3QSBuilt2D[1][KT][mb]->GetBinContent(binG, bin)) / 2.;
	       value_e = 0;
	       C3QSBuiltmerged2D[KT][mb]->SetBinContent(binG, bin, value);  C3QSBuiltmerged2D[KT][mb]->SetBinError(binG, bin, value_e);
	       //
	       value = (C3QSNegBuilt2D[0][KT][mb]->GetBinContent(binG, bin) + C3QSNegBuilt2D[1][KT][mb]->GetBinContent(binG, bin)) / 2.;
	       value_e = 0;
	       C3QSNegBuiltmerged2D[KT][mb]->SetBinContent(binG, bin, value);  C3QSNegBuiltmerged2D[KT][mb]->SetBinError(binG, bin, value_e);
	     }
	   }
	 }
       }
       //cout<<ChComb<<"  "<<KT<<"  "<<mb<<endl;
       //cout<<C4QS[ChComb][1][KT][mb]->GetBinContent(4)<<endl;
       //
       if(ChComb==2) continue;
       for(int bin=1; bin<=C4QSmerged[ChComb][KT][mb]->GetNbinsX(); bin++){
	 double value = (C4QS[ChComb][0][KT][mb]->GetBinContent(bin) + C4QS[ChComb][1][KT][mb]->GetBinContent(bin)) / 2.;
	 double value_e = sqrt(pow(C4QS[ChComb][0][KT][mb]->GetBinError(bin),2) + pow(C4QS[ChComb][1][KT][mb]->GetBinError(bin),2)) / sqrt(2.);
	 C4QSmerged[ChComb][KT][mb]->SetBinContent(bin, value);  C4QSmerged[ChComb][KT][mb]->SetBinError(bin, value_e);
	 //
	 value = (c4QS[ChComb][0][KT][mb]->GetBinContent(bin) + c4QS[ChComb][1][KT][mb]->GetBinContent(bin)) / 2.;
	 value_e = sqrt(pow(c4QS[ChComb][0][KT][mb]->GetBinError(bin),2) + pow(c4QS[ChComb][1][KT][mb]->GetBinError(bin),2)) / sqrt(2.);
	 c4QSmerged[ChComb][KT][mb]->SetBinContent(bin, value);  c4QSmerged[ChComb][KT][mb]->SetBinError(bin, value_e);
	 //
	 value = (c4QSstage1[ChComb][0][KT][mb]->GetBinContent(bin) + c4QSstage1[ChComb][1][KT][mb]->GetBinContent(bin)) / 2.;
	 value_e = sqrt(pow(c4QSstage1[ChComb][0][KT][mb]->GetBinError(bin),2) + pow(c4QSstage1[ChComb][1][KT][mb]->GetBinError(bin),2)) / sqrt(2.);
	 c4QSstage1merged[ChComb][KT][mb]->SetBinContent(bin, value);  c4QSstage1merged[ChComb][KT][mb]->SetBinError(bin, value_e);
	 //
	 if(ChComb==0){
	   value = (c4QSstage2[0][KT][mb]->GetBinContent(bin) + c4QSstage2[1][KT][mb]->GetBinContent(bin)) / 2.;
	   value_e = sqrt(pow(c4QSstage2[0][KT][mb]->GetBinError(bin),2) + pow(c4QSstage2[1][KT][mb]->GetBinError(bin),2)) / sqrt(2.);
	   c4QSstage2merged[KT][mb]->SetBinContent(bin, value);  c4QSstage2merged[KT][mb]->SetBinError(bin, value_e);
	   //
	   value = (C4QSBuilt[0][KT][mb]->GetBinContent(bin) + C4QSBuilt[1][KT][mb]->GetBinContent(bin)) / 2.;
	   value_e = 0;
	   C4QSBuiltmerged[KT][mb]->SetBinContent(bin, value);  C4QSBuiltmerged[KT][mb]->SetBinError(bin, value_e);
	   //
	   for(int binG=1; binG<=C4QSBuiltmerged2D[KT][mb]->GetNbinsX(); binG++){
	     value = (C4QSBuilt2D[0][KT][mb]->GetBinContent(binG, bin) + C4QSBuilt2D[1][KT][mb]->GetBinContent(binG, bin)) / 2.;
	     value_e = 0;
	     C4QSBuiltmerged2D[KT][mb]->SetBinContent(binG, bin, value);  C4QSBuiltmerged2D[KT][mb]->SetBinError(binG, bin, value_e);
	     //
	     value = (C4QSNegBuilt2D[0][KT][mb]->GetBinContent(binG, bin) + C4QSNegBuilt2D[1][KT][mb]->GetBinContent(binG, bin)) / 2.;
	     value_e = 0;
	     C4QSNegBuiltmerged2D[KT][mb]->SetBinContent(binG, bin, value);  C4QSNegBuiltmerged2D[KT][mb]->SetBinError(binG, bin, value_e);
	   }
	 }
       }
       
     }// KT
   }// ChComb
 }// mb
  
  // merge r3 histogram centralities
 TH1D *r3merged[2];// KT
 TH1D *r4merged[2];// KT
  for(int KT=0; KT<2; KT++) {
    r3merged[KT]=(TH1D*)r3[0][KT][0]->Clone();
    r4merged[KT]=(TH1D*)r42[0][KT][0]->Clone();
  }

  double mergedValue_r3[2][20]={{0}};// KT
  double mergedError_r3[2][20]={{0}};// KT
  double ErrorWeightSum_r3[2][20]={{0}};// KT
  double EnSum_r3[2][20]={{0}};// KT
  //
  double mergedValue_r4[2][20]={{0}};// KT
  double mergedError_r4[2][20]={{0}};// KT
  double ErrorWeightSum_r4[2][20]={{0}};// KT
  double EnSum_r4[2][20]={{0}};// KT
  for(int mb=0; mb<10; mb++){
    for(int ch=0; ch<2; ch++) {
      for(int KT=0; KT<2; KT++) {
	for(int bin=1; bin<=20; bin++){
	  if(r3[ch][KT][mb]->GetBinError(bin) == 0) continue;
	  mergedValue_r3[KT][bin] += r3[ch][KT][mb]->GetBinContent(bin) / pow(r3[ch][KT][mb]->GetBinError(bin),2);
	  mergedError_r3[KT][bin] += pow(r3[ch][KT][mb]->GetBinError(bin),2) / pow(r3[ch][KT][mb]->GetBinError(bin),2);
	  ErrorWeightSum_r3[KT][bin] += 1.0 / pow(r3[ch][KT][mb]->GetBinError(bin),2);
	  EnSum_r3[KT][bin]++;
	}// bin
      }// KT
    }// ch
  }// mb
  
  for(int mb=0; mb<10; mb++){
    for(int ch=0; ch<2; ch++) {
      for(int KT=0; KT<2; KT++) {
	for(int bin=1; bin<=20; bin++){
	  if(r42[ch][KT][mb]->GetBinError(bin) == 0) continue;
	  mergedValue_r4[KT][bin] += r42[ch][KT][mb]->GetBinContent(bin) / pow(r42[ch][KT][mb]->GetBinError(bin),2);
	  mergedError_r4[KT][bin] += pow(r42[ch][KT][mb]->GetBinError(bin),2) / pow(r42[ch][KT][mb]->GetBinError(bin),2);
	  ErrorWeightSum_r4[KT][bin] += 1.0 / pow(r42[ch][KT][mb]->GetBinError(bin),2);
	  EnSum_r4[KT][bin]++;
	}// bin
      }// KT
    }// ch
  }// mb


  for(int bin=1; bin<=20; bin++){
    for(int KT=0; KT<2; KT++) {
      if(ErrorWeightSum_r3[KT][bin] ==0) continue;
      if(EnSum_r3[KT][bin] == 0) continue;
      r3merged[KT]->SetBinContent(bin, mergedValue_r3[KT][bin] / ErrorWeightSum_r3[KT][bin]);
      r3merged[KT]->SetBinError(bin, sqrt(mergedError_r3[KT][bin] / ErrorWeightSum_r3[KT][bin]));
    }
  }
  
  for(int bin=1; bin<=20; bin++){
    for(int KT=0; KT<2; KT++) {
      if(ErrorWeightSum_r4[KT][bin] ==0) continue;
      if(EnSum_r4[KT][bin] == 0) continue;
      r4merged[KT]->SetBinContent(bin, mergedValue_r4[KT][bin] / ErrorWeightSum_r4[KT][bin]);
      r4merged[KT]->SetBinError(bin, sqrt(mergedError_r4[KT][bin] / ErrorWeightSum_r4[KT][bin]) / sqrt(EnSum_r4[KT][bin]));
    }
  }
  

  //////////////////////////////////////////////////////////////////////////
  // 3-pion
  if(ChProdBOI!=2){
    
    TCanvas *can1 = new TCanvas("can1", "can1",10,0,700,600);// 11,53,700,500
    can1->SetHighLightColor(2);
    gStyle->SetOptFit(0111);
    can1->SetFillColor(0);//10
    can1->SetBorderMode(0);
    can1->SetBorderSize(2);
    can1->SetFrameFillColor(0);
    can1->SetFrameBorderMode(0);
    can1->SetFrameBorderMode(0);
  
  TPad *pad1 = new TPad("pad1","pad1",0.0,0.0,1.,1.);
  //gPad->SetGridx(1);
  //gPad->SetGridy(1);
  gPad->SetTickx();
  gPad->SetTicky();
  pad1->SetTopMargin(0.0);//0.05
  pad1->SetRightMargin(0.0);//1e-2
  pad1->SetBottomMargin(0.0);//0.12
  pad1->Draw();
  pad1->cd(1);
  gPad->SetLeftMargin(0.14); gPad->SetRightMargin(0.04);
  gPad->SetTopMargin(0.03); gPad->SetBottomMargin(0.14);
  TLegend *legend1 = new TLegend(.42,.5, .92,.8,NULL,"brNDC");//.45 or .4 for x1
  legend1->SetBorderSize(0);
  legend1->SetFillColor(0);
  legend1->SetTextFont(TextFont);
  legend1->SetTextSize(SizeLegend);

  C3QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->SetTitleSize(SizeTitle);
  C3QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->SetLabelSize(SizeLabel);
  C3QSmerged[ChProdBOI][KTBin][MBOI]->GetYaxis()->SetTitleSize(SizeTitle);
  C3QSmerged[ChProdBOI][KTBin][MBOI]->GetYaxis()->SetLabelSize(SizeLabel);
  C3QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->SetTitleOffset(1.05);
  C3QSmerged[ChProdBOI][KTBin][MBOI]->GetYaxis()->SetTitleOffset(1.1);
  C3QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->SetNdivisions(606);
  C3QSmerged[ChProdBOI][KTBin][MBOI]->GetYaxis()->SetNdivisions(505);
  //
  //TH1D *C3QS_Syst = new TH1D("C3QS_Syst","",200,0.,0.2);
  //TH1D *C3QSBuilt_Syst = new TH1D("C3QSBuilt_Syst","",200,0.,0.2);
  TH1D *C3QS_Syst = (TH1D*)C3QSmerged[ChProdBOI][KTBin][MBOI]->Clone();
  TH1D *C3QSBuilt_Syst = (TH1D*)C3QSBuiltmerged[KTBin][MBOI]->Clone();

  for(int bin=1; bin<=C3QS_Syst->GetNbinsX(); bin++){
    double q3 = C3QS_Syst->GetXaxis()->GetBinCenter(bin);
    C3QS_Syst->SetBinContent(bin, 4.7);
    double syst1 = pow(0.001,2);// cc
    syst1 += pow(0.002 - 0.002*q3/0.1,2);// 11h to 10h
    syst1 += pow(0.9913 - 0.2231*q3 - 1,2);// f coefficients, r*<70
    syst1 += pow(0.9847 + 0.358*q3 - 2.133*q3*q3 - 1,2);// MRC
    syst1 += pow(0.975 + 0.4189*q3 - 2.055*q3*q3 - 1,2);// Muon, 92%
    syst1 += pow(0.936 + 1.194*q3 - 5.912*q3*q3 - 1,2);// fc2 scale
    syst1 += pow(0.125*exp(-61.38*q3),2);// K factorization
    syst1 = sqrt(syst1);
    syst1 *= C3QSmerged[ChProdBOI][KTBin][MBOI]->GetBinContent(bin);
    C3QS_Syst->SetBinError(bin, syst1);
    // Built
    C3QSBuilt_Syst->SetBinContent(bin, 4.7);
    double syst2 = pow(0.002 - 0.002*q3/0.1,2);// 11h to 10h
    syst2 += pow(0.9856 + 0.3285*q3 - 1.897*q3*q3 - 1,2);// MRC
    syst2 += pow(0.9786 + 0.421*q3 - 2.108*q3*q3 - 1,2);// Muon, 92%
    syst2 += pow(0.946 + 0.849*q3 - 3.316*q3*q3 - 1,2);// fc2 scale
    syst2 += pow(0.0103*exp(-41.68*q3),2);// Interpolator
    syst2 = sqrt(syst2);
    syst2 *= C3QSBuiltmerged[KTBin][MBOI]->GetBinContent(bin);
    C3QSBuilt_Syst->SetBinError(bin, syst2);
  }
  double Syst_forChi2_3[15]={0};
  for(int bin=1; bin<=15; bin++){
    double q3 = C3QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->GetBinCenter(bin);
    int SystBin = C3QSBuilt_Syst->GetXaxis()->FindBin(q3);
    //Syst_forChi2_3[bin-1] = fabs(C3QS_Syst->GetBinError(SystBin) - C3QSBuilt_Syst->GetBinError(SystBin));
    double SystPercent_Diff = sqrt(pow(0.125*exp(-61.38*q3*sqrt(2.)),2) + pow(0.9913 - 0.2231*q3 - 1,2) + pow(0.0103*exp(-41.68*q3),2));// K, f coefficients, Interpolator
    Syst_forChi2_3[bin-1] = SystPercent_Diff * C3QSmerged[ChProdBOI][KTBin][MBOI]->GetBinContent(bin);
    //cout<<Syst_forChi2_3[bin-1]<<endl;
  }
  C3QS_Syst->SetBinContent(1,100); C3QSBuilt_Syst->SetBinContent(1,100); 
  C3QS_Syst->SetMarkerSize(0); C3QS_Syst->SetFillColor(kBlue-10);
  C3QS_Syst->SetMarkerColor(kBlue-10);
  C3QSBuilt_Syst->SetMarkerSize(0); C3QSBuilt_Syst->SetFillColor(1); //C3QSBuilt_Syst->SetFillStyle(3004);
  C3QSBuilt_Syst->SetMarkerColor(1);
  C3QS_Syst->GetXaxis()->SetRangeUser(0.01,0.2); C3QSBuilt_Syst->GetXaxis()->SetRangeUser(0.01,0.2);
  //
  C3QSBuiltmerged[KTBin][MBOI]->GetXaxis()->SetRange(2,15);
  C3QSmerged[ChProdBOI][KTBin][MBOI]->SetMaximum(5.1);
  C3QSmerged[ChProdBOI][KTBin][MBOI]->Draw();
  C3QS_Syst->Draw("E2 same");
  C3QSBuilt_Syst->Draw("E1 same");

  C3QSmerged[ChProdBOI][KTBin][MBOI]->Draw("same");
  c3QSmerged[ChProdBOI][KTBin][MBOI]->Draw("same");
  C3QSBuiltmerged[KTBin][MBOI]->SetLineWidth(1.2);
  if(ChProdBOI==0) C3QSBuiltmerged[KTBin][MBOI]->Draw("same");
  //
  TString *proName=new TString("C3QSbuilt_G"); TString *proNameNeg=new TString("C3QSNegbuilt_G");
  TH1D *C3QSbuilt_G = (TH1D*)C3QSBuiltmerged2D[KTBin][MBOI]->ProjectionY(proName->Data(), GbinPlot, GbinPlot);
  TH1D *C3QSNegbuilt_G = (TH1D*)C3QSNegBuiltmerged2D[KTBin][MBOI]->ProjectionY(proNameNeg->Data(), GbinPlot, GbinPlot);
  proName->Append("_FullWeightDen"); proNameNeg->Append("_FullWeightDen");
  TH1D *tempDen = (TH1D*)C3QSBuiltmerged2D[KTBin][MBOI]->ProjectionY(proName->Data(), 4, 4);
  TH1D *tempDenNeg = (TH1D*)C3QSNegBuiltmerged2D[KTBin][MBOI]->ProjectionY(proNameNeg->Data(), 4, 4);
  // Add Pos with Neg weights
  tempDen->Add(tempDenNeg);
  C3QSbuilt_G->Add(C3QSNegbuilt_G);
  //  
  C3QSbuilt_G->Add(tempDen);
  C3QSbuilt_G->Divide(tempDen);
  C3QSbuilt_G->SetLineColor(2);
  C3QSbuilt_G->GetXaxis()->SetRange(2,15);
  if(ChProdBOI==0) C3QSbuilt_G->Draw("same");

  legend1->AddEntry(C3QSmerged[ChProdBOI][KTBin][MBOI],"#font[12]{C}_{3}^{QS}","p");
  legend1->AddEntry(c3QSmerged[ChProdBOI][KTBin][MBOI],"#font[12]{#bf{c}}_{3}^{QS}","p");
  if(ChProdBOI==0) legend1->AddEntry(C3QSBuiltmerged[KTBin][MBOI],"Built #font[12]{C}_{3}^{QS} (G=0%)","l");
  if(ChProdBOI==0) legend1->AddEntry(C3QSbuilt_G,"Built #font[12]{C}_{3}^{QS} (G=34%, R_{coh}=R_{ch})","l");
  legend1->Draw("same");

  Unity->Draw("same");



  

  if(ChProdBOI==0){
    TCanvas *can2 = new TCanvas("can2", "can2",800,0,700,600);// 11,53,700,500
    can2->SetHighLightColor(2);
    gStyle->SetOptFit(0111);
    can2->SetFillColor(0);//10
    can2->SetBorderMode(0);
    can2->SetBorderSize(2);
    can2->SetFrameFillColor(0);
    can2->SetFrameBorderMode(0);
    can2->SetFrameBorderMode(0);
    
    TPad *pad2 = new TPad("pad2","pad2",0.0,0.0,1.,1.);
    gPad->SetTickx();
    gPad->SetTicky();
    pad2->SetTopMargin(0.0);//0.05
    pad2->SetRightMargin(0.0);//1e-2
    pad2->SetBottomMargin(0.0);//0.12
    pad2->Draw();
    pad2->cd(1);
    gPad->SetLeftMargin(0.14); gPad->SetRightMargin(0.04);
    gPad->SetTopMargin(0.03); gPad->SetBottomMargin(0.14);
    TLegend *legend2 = new TLegend(.55,.75, .95,.95,NULL,"brNDC");//.45 or .4 for x1
    legend2->SetBorderSize(0);
    legend2->SetFillColor(0);
    legend2->SetTextFont(TextFont);
    legend2->SetTextSize(SizeLegend);
 

    //TH1D *chi2_PointSize_3 = new TH1D("chi2_PointSize_3","",40,-0.5,39.5);
    //TH1D *chi2_FullSize_3 = new TH1D("chi2_FullSize_3","",40,-0.5,39.5);
    TH1D *chi2_PointSize_3 = new TH1D("chi2_PointSize_3","",100,-0.5,99.5);
    TH1D *chi2_FullSize_3 = new TH1D("chi2_FullSize_3","",100,-0.5,99.5);
    chi2_PointSize_3->SetLineColor(4); chi2_FullSize_3->SetLineColor(2);
    chi2_PointSize_3->SetMarkerColor(4); chi2_FullSize_3->SetMarkerColor(2);
    chi2_PointSize_3->GetXaxis()->SetTitle("Coherent fraction (%)"); chi2_PointSize_3->GetYaxis()->SetTitle("#sqrt{#chi^{2}}");
    chi2_PointSize_3->GetXaxis()->SetTitleSize(SizeTitle);  chi2_PointSize_3->GetYaxis()->SetTitleSize(SizeTitle);
    chi2_PointSize_3->GetXaxis()->SetLabelSize(SizeLabel);  chi2_PointSize_3->GetYaxis()->SetLabelSize(SizeLabel);
    TH2D *chi2_2D_3 = new TH2D("chi2_2D_3","",5,0.5,5.5, 100,-0.5,99.5);
       
    TH1D *tempDen = (TH1D*)C3QSBuiltmerged2D[KTBin][MBOI]->ProjectionY("TPFullWeight3_Den", 4, 4);
    TH1D *tempDenNeg = (TH1D*)C3QSNegBuiltmerged2D[KTBin][MBOI]->ProjectionY("TPNegFullWeight3_Den", 4, 4);
    tempDen->Add(tempDenNeg);// Add Pos and Neg Den

    for(int binG=5; binG<=104; binG++){// 44
      TString *proName=new TString("TPFullWeight3_");
      *proName += binG;
      TH1D *tempNum = (TH1D*)C3QSBuiltmerged2D[KTBin][MBOI]->ProjectionY(proName->Data(), binG, binG);
      proName->Append("_Neg");
      TH1D *tempNumNeg = (TH1D*)C3QSNegBuiltmerged2D[KTBin][MBOI]->ProjectionY(proName->Data(), binG, binG);
      //
      // Add Pos and Neg Num
      tempNum->Add(tempNumNeg);
      //
      tempNum->Add(tempDen);
      tempNum->Divide(tempDen);
      //lowBin = C3QS->GetXaxis()->FindBin(Cutoff_FullWeight_Q3[Mbin]);
      //highBin = C3QS->GetXaxis()->FindBin(Cutoff_FullWeight_Q3[Mbin]);
      //SF=C3QS->Integral(lowBin, highBin);
      //SF /= tempNum->Integral(lowBin, highBin);
      //tempNum->Scale(SF);
      
      double value = C3QSmerged[ChProdBOI][KTBin][MBOI]->GetBinContent(Q3binChi2) - tempNum->GetBinContent(Q3binChi2);
      double err = pow(C3QSmerged[ChProdBOI][KTBin][MBOI]->GetBinError(Q3binChi2),2);// stat
      err += pow(Syst_forChi2_3[Q3binChi2-1],2);// syst
      err = sqrt(err);
      if(err <=0) continue;
      double Chi2 = pow(value / err,2);
      //
      
      //if(binG<25) {chi2_PointSize_3->SetBinContent(1 + 2*(binG-5), sqrt(Chi2)); chi2_PointSize_3->SetBinError(1 + 2*(binG-5), 0.001);}
      //else {chi2_FullSize_3->SetBinContent(1 + 2*(binG-25), sqrt(Chi2)); chi2_FullSize_3->SetBinError(1 + 2*(binG-25), 0.001);}
      if(binG<55) {chi2_PointSize_3->SetBinContent(1 + 2*(binG-5), sqrt(Chi2)); chi2_PointSize_3->SetBinError(1 + 2*(binG-5), 0.001);}
      else {chi2_FullSize_3->SetBinContent(1 + 2*(binG-55), sqrt(Chi2)); chi2_FullSize_3->SetBinError(1 + 2*(binG-55), 0.001);}
      //
      Chi2=0;
      double NDF=0;
      for(int binQ3=2; binQ3<=5; binQ3++){
	if(tempNum->GetBinContent(binQ3) <=0) continue;
	double value = C3QSmerged[ChProdBOI][KTBin][MBOI]->GetBinContent(binQ3) - tempNum->GetBinContent(binQ3);
	double err = pow(C3QSmerged[ChProdBOI][KTBin][MBOI]->GetBinError(binQ3),2);// stat
	err += pow(Syst_forChi2_3[binQ3-1],2);// syst
	err = sqrt(err);
	if(err <=0) continue;
	Chi2 = pow(value / err,2);
	//
	chi2_2D_3->SetBinContent(binQ3, binG-4, sqrt(Chi2));
      }


    }
    chi2_PointSize_3->SetMarkerStyle(20); chi2_FullSize_3->SetMarkerStyle(20);
    chi2_PointSize_3->SetMinimum(0); chi2_PointSize_3->SetMaximum(13); 
    chi2_PointSize_3->Draw();
    chi2_FullSize_3->Draw("same");
    TString *Q3binName = new TString("0.0");
    *Q3binName += Q3binChi2-1;
    Q3binName->Append(" < #font[12]{Q_{3}} < 0.0");
    *Q3binName += Q3binChi2;
    Q3binName->Append(" GeV/#font[12]{c}");
    legend2->SetHeader(Q3binName->Data());
    legend2->AddEntry(chi2_PointSize_3,"R_{coh}=0","p");
    legend2->AddEntry(chi2_FullSize_3,"R_{coh}=R_{ch}","p");
    legend2->Draw("same");

    TString *meanpTName3 = new TString("#LT #font[12]{p}_{T} #GT = 0.");
    *meanpTName3 += Q3_meanpT[KTBin][Q3binChi2-1];
    meanpTName3->Append(" GeV/#font[12]{c}");
    TLatex *Specif_pT3 = new TLatex(0.15,0.9,meanpTName3->Data());
    Specif_pT3->SetNDC();
    Specif_pT3->SetTextFont(TextFont);
    Specif_pT3->SetTextSize(SizeSpecif);
    Specif_pT3->Draw("same");

    TString *SaveNameChi2_3 = new TString("ChiSq_C3_bin");
    *SaveNameChi2_3 += Q3binChi2;
    SaveNameChi2_3->Append("_K");
    *SaveNameChi2_3 += KTBin;
    SaveNameChi2_3->Append("_M");
    *SaveNameChi2_3 += MBOI;
    SaveNameChi2_3->Append(".eps");
    //can2->SaveAs(SaveNameChi2_3->Data());




    ///////////////////////////////////////////////////////////////////////////
    // G versus Q3

    TCanvas *can2_2 = new TCanvas("can2_2", "can2_2",1300,0,700,600);// 11,53,700,500
    can2_2->SetHighLightColor(2);
    gStyle->SetOptFit(0111);
    can2_2->SetFillColor(0);//10
    can2_2->SetBorderMode(0);
    can2_2->SetBorderSize(2);
    can2_2->SetFrameFillColor(0);
    can2_2->SetFrameBorderMode(0);
    can2_2->SetFrameBorderMode(0);
    
    TPad *pad2_2 = new TPad("pad2_2","pad2_2",0.0,0.0,1.,1.);
    gPad->SetTickx();
    gPad->SetTicky();
    pad2_2->SetTopMargin(0.0);//0.05
    pad2_2->SetRightMargin(0.0);//1e-2
    pad2_2->SetBottomMargin(0.0);//0.12
    pad2_2->Draw();
    pad2_2->cd(1);
    gPad->SetLeftMargin(0.14); gPad->SetRightMargin(0.04);
    gPad->SetTopMargin(0.03); gPad->SetBottomMargin(0.14);
    TLegend *legend2_2 = new TLegend(.15,.15, .35,.35,NULL,"brNDC");//.45 or .4 for x1
    legend2_2->SetBorderSize(0);
    legend2_2->SetFillColor(0);
    legend2_2->SetTextFont(TextFont);
    legend2_2->SetTextSize(SizeLegend);

    TH1D *GversusQ3_Point = new TH1D("GversusQ3_Point","",5,0,0.05);
    TH1D *GversusQ3_Full = new TH1D("GversusQ3_Full","",5,0,0.05);
    for(int binQ3=2; binQ3<=5; binQ3++){
      double minG = 0;
      double minG_e1=0, minG_e2=0;
      double minChi=100;
      // Point Source
      for(int binG=1; binG<=50; binG++){// min
	if(minChi > chi2_2D_3->GetBinContent(binQ3, binG)) {
	  minChi = chi2_2D_3->GetBinContent(binQ3, binG);
	  minG = 2*(binG-1);
	}
      }
      //cout<<binQ3<<"  "<<minChi<<"  "<<minG<<endl;
      for(int binG=1; binG<=50; binG++){// error
	if(minG > 0) {
	  if(fabs(minChi - chi2_2D_3->GetBinContent(binQ3, binG)) < 1.) {
	    if(minG>2*(binG-1)) minG_e1 = fabs(minG - 2*(binG-1)); 
	    else minG_e2 = fabs(minG - 2*(binG-1));
	  }
	}else{
	  if(fabs(minChi - chi2_2D_3->GetBinContent(binQ3, binG)) < 1.) {
	    minG_e1 = fabs(minG - 2*(binG-1)); 
	  }
	}
      }
      GversusQ3_Point->SetBinContent(binQ3, minG);
      if(minG_e1 > minG_e2) GversusQ3_Point->SetBinError(binQ3, minG_e1);
      else GversusQ3_Point->SetBinError(binQ3, minG_e2);
      //
      // Full Source
      minG = 0;
      minG_e1 = 0, minG_e2=0;
      minChi=100;
      for(int binG=51; binG<=100; binG++){// min
	if(minChi > chi2_2D_3->GetBinContent(binQ3, binG)) {
	  minChi = chi2_2D_3->GetBinContent(binQ3, binG);
	  minG = 2*(binG-51);
	}
      }
      for(int binG=51; binG<=100; binG++){// error
	if(minG > 0) {
	  if(fabs(minChi - chi2_2D_3->GetBinContent(binQ3, binG)) < 1.) {
	    if(minG>2*(binG-51)) minG_e1 = fabs(minG - 2*(binG-51)); 
	    else minG_e2 = fabs(minG - 2*(binG-51));
	  }
	}else{
	  if(fabs(minChi - chi2_2D_3->GetBinContent(binQ3, binG)) < 1.) {
	    minG_e1 = fabs(minG - 2*(binG-51)); 
	  }
	}
      }
      //cout<<binQ3<<"  "<<minG<<"  "<<minG_e<<endl;
      GversusQ3_Full->SetBinContent(binQ3, minG);
      if(minG_e1 > minG_e2) GversusQ3_Full->SetBinError(binQ3, minG_e1);
      else GversusQ3_Full->SetBinError(binQ3, minG_e2);
    }
    //
    GversusQ3_Point->SetMarkerStyle(20); GversusQ3_Point->SetMarkerColor(4); GversusQ3_Point->SetLineColor(4);
    GversusQ3_Full->SetMarkerStyle(20); GversusQ3_Full->SetMarkerColor(2); GversusQ3_Full->SetLineColor(2);
    GversusQ3_Point->SetMinimum(0); GversusQ3_Point->SetMaximum(80); 
    GversusQ3_Point->GetXaxis()->SetTitle("#font[12]{Q_{3}} (GeV/#font[12]{c})"); GversusQ3_Point->GetYaxis()->SetTitle("Coherent fraction (%)");
    GversusQ3_Point->GetXaxis()->SetTitleSize(SizeTitle);  GversusQ3_Point->GetYaxis()->SetTitleSize(SizeTitle);
    GversusQ3_Point->GetXaxis()->SetLabelSize(SizeLabel);  GversusQ3_Point->GetYaxis()->SetLabelSize(SizeLabel);
    GversusQ3_Point->GetXaxis()->SetNdivisions(404); GversusQ3_Point->GetYaxis()->SetNdivisions(505);
    GversusQ3_Point->Draw();
    GversusQ3_Full->Draw("same");
    //
    legend2_2->AddEntry(GversusQ3_Point,"R_{coh}=0","p");
    legend2_2->AddEntry(GversusQ3_Full,"R_{coh}=R_{ch}","p");
    legend2_2->Draw("same");


  }
  }// ChProdBOI!=2  




  //////////////////////////////////////////////////////////////////////////
  // 4-pion
  TCanvas *can3 = new TCanvas("can3", "can3",10,700,700,600);// 11,53,700,500
  can3->SetHighLightColor(2);
  gStyle->SetOptFit(0111);
  can3->SetFillColor(0);//10
  can3->SetBorderMode(0);
  can3->SetBorderSize(2);
  can3->SetFrameFillColor(0);
  can3->SetFrameBorderMode(0);
  can3->SetFrameBorderMode(0);
  
  TPad *pad3 = new TPad("pad3","pad3",0.0,0.0,1.,1.);
  //gPad->SetGridx(1);
  //gPad->SetGridy(1);
  gPad->SetTickx();
  gPad->SetTicky();
  pad3->SetTopMargin(0.0);//0.05
  pad3->SetRightMargin(0.0);//1e-2
  pad3->SetBottomMargin(0.0);//0.12
  pad3->Draw();
  pad3->cd(1);
  gPad->SetLeftMargin(0.14); gPad->SetRightMargin(0.04);
  gPad->SetTopMargin(0.03); gPad->SetBottomMargin(0.14);
  
  TLegend *legend3 = new TLegend(.45,.4, .85,.8,NULL,"brNDC");//.45 or .4 for x1
  legend3->SetBorderSize(0);
  legend3->SetFillColor(0);
  legend3->SetTextFont(TextFont);
  legend3->SetTextSize(SizeLegend);

  
  C4QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->SetTitleSize(SizeTitle);
  C4QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->SetLabelSize(SizeLabel);
  C4QSmerged[ChProdBOI][KTBin][MBOI]->GetYaxis()->SetTitleSize(SizeTitle);
  C4QSmerged[ChProdBOI][KTBin][MBOI]->GetYaxis()->SetLabelSize(SizeLabel);
  C4QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->SetTitleOffset(1.05);
  C4QSmerged[ChProdBOI][KTBin][MBOI]->GetYaxis()->SetTitleOffset(1.1);
  C4QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->SetNdivisions(606);
  C4QSmerged[ChProdBOI][KTBin][MBOI]->GetYaxis()->SetNdivisions(505);
  //
  TString *proName4=new TString("C4QSbuilt_G"); TString *proNameNeg4=new TString("C4QSNegbuilt_G");
  TH1D *C4QSbuilt_G = (TH1D*)C4QSBuiltmerged2D[KTBin][MBOI]->ProjectionY(proName4->Data(), GbinPlot, GbinPlot);
  TH1D *C4QSNegbuilt_G = (TH1D*)C4QSNegBuiltmerged2D[KTBin][MBOI]->ProjectionY(proNameNeg4->Data(), GbinPlot, GbinPlot);
  proName4->Append("_FullWeightDen"); proNameNeg4->Append("_FullWeightDen");
  TH1D *tempDen4 = (TH1D*)C4QSBuiltmerged2D[KTBin][MBOI]->ProjectionY(proName4->Data(), 4, 4);
  TH1D *tempDenNeg4 = (TH1D*)C4QSNegBuiltmerged2D[KTBin][MBOI]->ProjectionY(proNameNeg4->Data(), 4, 4);
  // Add Pos with Neg weights
  tempDen4->Add(tempDenNeg4);
  C4QSbuilt_G->Add(C4QSNegbuilt_G);
  //  
  C4QSbuilt_G->Add(tempDen4);
  C4QSbuilt_G->Divide(tempDen4);
  C4QSbuilt_G->SetLineColor(2);
  //
 
  C4QSmerged[ChProdBOI][KTBin][MBOI]->SetMaximum(8.8);
  C4QSBuiltmerged[KTBin][MBOI]->GetXaxis()->SetRange(3,15);
  C4QSbuilt_G->GetXaxis()->SetRange(3,15);
  //
  //TH1D *C4QS_Syst = new TH1D("C4QS_Syst","",200,0.,0.2);
  //TH1D *C4QSBuilt_Syst = new TH1D("C4QSBuilt_Syst","",200,0.,0.2);
  TH1D *C4QS_Syst = (TH1D*)C4QSmerged[ChProdBOI][KTBin][MBOI]->Clone();
  TH1D *C4QSBuilt_Syst = (TH1D*)C4QSBuiltmerged[KTBin][MBOI]->Clone();

  for(int bin=1; bin<=C4QS_Syst->GetNbinsX(); bin++){
    double q4 = C4QS_Syst->GetXaxis()->GetBinCenter(bin);
    C4QS_Syst->SetBinContent(bin, 8.);
    double syst1 = pow(0.001,2);// cc
    syst1 += pow(0.004 - 0.004*q4/0.18,2);// 11h to 10h
    syst1 += pow(0.9975 - 0.09*q4 - 1,2);// f coefficients, r*<70
    syst1 += pow(0.9814 + 0.2471*q4 - 0.8312*q4*q4 - 1,2);// MRC
    syst1 += pow(0.9635 + 0.3475*q4 - 0.9729*q4*q4 - 1,2);// Muon, 92%
    syst1 += pow(0.900 + 1.126*q4 - 3.354*q4*q4 - 1,2);// fc2 scale
    syst1 += pow(0.125*exp(-61.38*q4),2);// K factorization
    syst1 = sqrt(syst1);
    syst1 *= C4QSmerged[ChProdBOI][KTBin][MBOI]->GetBinContent(bin);
    C4QS_Syst->SetBinError(bin, syst1);
    // Built
    C4QSBuilt_Syst->SetBinContent(bin, 8.);
    double syst2 = pow(0.004 - 0.004*q4/0.18,2);// 11h to 10h
    syst2 += pow(0.9793 + 0.2857*q4 - 0.9888*q4*q4 - 1,2);// MRC
    syst2 += pow(0.9725 + 0.2991*q4 - 0.8058*q4*q4 - 1,2);// Muon, 92%
    syst2 += pow(0.905 + 1.03*q4 - 2.977*q4*q4 - 1,2);// fc2 scale
    syst2 += pow(0.0379*exp(-42.82*q4),2);// Interpolator
    syst2 = sqrt(syst2);
    syst2 *= C4QSBuiltmerged[KTBin][MBOI]->GetBinContent(bin);
    C4QSBuilt_Syst->SetBinError(bin, syst2);
  }
  C4QS_Syst->SetBinContent(2,100); C4QSBuilt_Syst->SetBinContent(2,100); 
  C4QS_Syst->SetMarkerSize(0); C4QS_Syst->SetFillColor(kBlue-10);
  C4QS_Syst->SetMarkerColor(kBlue-10);
  C4QSBuilt_Syst->SetMarkerSize(0); C4QSBuilt_Syst->SetFillColor(1); //C4QSBuilt_Syst->SetFillStyle(3004);
  C4QSBuilt_Syst->SetMarkerColor(1);
  C4QS_Syst->GetXaxis()->SetRangeUser(0.03,0.2); C4QSBuilt_Syst->GetXaxis()->SetRangeUser(0.03,0.2);
  double Syst_forChi2_4[15]={0};
  for(int bin=1; bin<=15; bin++){
    double q4 = C4QSmerged[ChProdBOI][KTBin][MBOI]->GetXaxis()->GetBinCenter(bin);
    int SystBin = C4QSBuilt_Syst->GetXaxis()->FindBin(q4);
    //Syst_forChi2_4[bin-1] = fabs(C4QS_Syst->GetBinError(SystBin) - C4QSBuilt_Syst->GetBinError(SystBin));
    double SystPercent_Diff = sqrt(pow(0.125*exp(-61.38*q4),2) + pow(0.9975 - 0.09*q4 - 1,2) + pow(0.0379*exp(-42.82*q4),2));// K, f coefficients, Interpolator
    Syst_forChi2_4[bin-1] = SystPercent_Diff * C4QSmerged[ChProdBOI][KTBin][MBOI]->GetBinContent(bin);
  }
  //
  /*for(int bin=1; bin<=C4QSmerged[ChProdBOI][KTBin][MBOI]->GetNbinsX(); bin++){
    C4QSmerged[ChProdBOI][KTBin][MBOI]->SetBinContent(bin, fabs(C4QSmerged[ChProdBOI][KTBin][MBOI]->GetBinContent(bin) - 1));
    C4QSBuiltmerged[KTBin][MBOI]->SetBinContent(bin, fabs(C4QSBuiltmerged[KTBin][MBOI]->GetBinContent(bin) - 1));
    }*/
  C4QSmerged[ChProdBOI][KTBin][MBOI]->SetBinContent(1,100); C4QSmerged[ChProdBOI][KTBin][MBOI]->SetBinError(1,100);
  C4QSmerged[ChProdBOI][KTBin][MBOI]->Draw();
  C4QS_Syst->Draw("E2 same");
  C4QSBuilt_Syst->Draw("E1 same");
  C4QSmerged[ChProdBOI][KTBin][MBOI]->Draw("same");
  
  c4QSstage1merged[ChProdBOI][KTBin][MBOI]->Draw("same");
  if(ChProdBOI==0) c4QSstage2merged[KTBin][MBOI]->Draw("same");
  c4QSmerged[ChProdBOI][KTBin][MBOI]->Draw("same");
  C4QSBuiltmerged[KTBin][MBOI]->SetLineWidth(1.2);
  if(ChProdBOI==0) C4QSBuiltmerged[KTBin][MBOI]->Draw("same");
  
  if(ChProdBOI==0) C4QSbuilt_G->Draw("same");

  legend3->AddEntry(C4QSmerged[ChProdBOI][KTBin][MBOI],"#font[12]{C}_{4}^{QS}","p");
  legend3->AddEntry(c4QSstage1merged[ChProdBOI][KTBin][MBOI],"#font[12]{#bf{c}}_{4}^{QS} 2-pion removal","p");
  if(ChProdBOI==0) legend3->AddEntry(c4QSstage2merged[KTBin][MBOI],"#font[12]{#bf{c}}_{4}^{QS} 2-pion + 2-pair removal","p");
  legend3->AddEntry(c4QSmerged[ChProdBOI][KTBin][MBOI],"#font[12]{#bf{c}}_{4}^{QS}","p");
  if(ChProdBOI==0) legend3->AddEntry(C4QSBuiltmerged[KTBin][MBOI],"Built #font[12]{C}_{4}^{QS} (G=0%)","l");
  if(ChProdBOI==0) legend3->AddEntry(C4QSbuilt_G,"Built #font[12]{C}_{4}^{QS} (G=34%, R_{coh}=R_{ch})","l");
  legend3->Draw("same");
  
  /*TF1 *Gauss_c4Fit=new TF1("Gauss_c4Fit","[0]*(1+[1]*exp(-pow(x*[2]/0.19733,2)/3.))",0,1);
  Gauss_c4Fit->SetParameter(0,1); Gauss_c4Fit->SetParameter(1,3); Gauss_c4Fit->SetParameter(2,8); 
  Gauss_c4Fit->SetParName(0,"N");  Gauss_c4Fit->SetParName(1,"#lambda_{4}"); Gauss_c4Fit->SetParName(2,"R");
  c4QSmerged[ChProdBOI][KTBin][MBOI]->Fit(Gauss_c4Fit,"IME","",0.03,0.14);
  Gauss_c4Fit->Draw("same");*/

  // hight KT4 reference
  double y_ref[12]={0, 0, 1.00133, 0.980848, 0.988251, 0.994434, 0.999677, 1.00269, 1.00642, 1.00881, 1.01082, 1.01554};
  double y_ref_e[12]={0, 0, 0.054465, 0.00678447, 0.00194947, 0.000799564, 0.00039767, 0.000222628, 0.000135335, 8.75305e-05, 6.31392e-05, 5.53329e-05};

  TH1D *Ratio=(TH1D*)C4QSmerged[ChProdBOI][KTBin][MBOI]->Clone();
  Ratio->Divide(C4QSBuiltmerged[KTBin][MBOI]);
  Ratio->GetYaxis()->SetTitle("#font[12]{C_{4}^{QS}} / #font[12]{C_{4}^{QS}}(built)");
  Ratio->SetMinimum(0.85); Ratio->SetMaximum(1.05);
  TH1D *DoubleRatio =(TH1D*)Ratio->Clone();
  DoubleRatio->GetYaxis()->SetTitle("Low K_{T,4} ratio / High K_{T,4} ratio");

  for(int bin=1; bin<=12; bin++){
    if(y_ref[bin-1]==0) continue;
    double value = Ratio->GetBinContent(bin) / y_ref[bin-1];
    double value_e = sqrt(pow(Ratio->GetBinError(bin) / y_ref[bin-1],2) + pow(y_ref_e[bin-1]*Ratio->GetBinContent(bin) /y_ref[bin-1]/y_ref[bin-1],2));
    DoubleRatio->SetBinContent(bin, value);
    DoubleRatio->SetBinError(bin, value_e);
  }
  //Ratio->Draw();
  //DoubleRatio->Draw();

  //for(int bin=1; bin<=12; bin++) cout<<Ratio->GetBinContent(bin)<<", ";
  //cout<<endl;
  //for(int bin=1; bin<=12; bin++) cout<<Ratio->GetBinError(bin)<<", ";
  //cout<<endl;
  
  Unity->Draw("same");

  
  if(ChProdBOI==0){// chi2
    TCanvas *can4 = new TCanvas("can4", "can4",800,700,700,600);// 11,53,700,500
    can4->SetHighLightColor(2);
    gStyle->SetOptFit(0111);
    can4->SetFillColor(0);//10
    can4->SetBorderMode(0);
    can4->SetBorderSize(2);
    can4->SetFrameFillColor(0);
    can4->SetFrameBorderMode(0);
    can4->SetFrameBorderMode(0);
    
    TPad *pad4 = new TPad("pad4","pad4",0.0,0.0,1.,1.);
    gPad->SetTickx();
    gPad->SetTicky();
    pad4->SetTopMargin(0.0);//0.05
    pad4->SetRightMargin(0.0);//1e-2
    pad4->SetBottomMargin(0.0);//0.12
    pad4->Draw();
    pad4->cd(1);
    gPad->SetLeftMargin(0.14); gPad->SetRightMargin(0.04);
    gPad->SetTopMargin(0.03); gPad->SetBottomMargin(0.14);

    TLegend *legend4 = new TLegend(.15,.65, .4,.85,NULL,"brNDC");//.45 or .4 for x1
    legend4->SetBorderSize(0);
    legend4->SetFillColor(0);
    legend4->SetTextFont(TextFont);
    legend4->SetTextSize(SizeLegend);

    //TH1D *chi2_PointSize_4 = new TH1D("chi2_PointSize_4","",40,-0.5,39.5);
    //TH1D *chi2_FullSize_4 = new TH1D("chi2_FullSize_4","",40,-0.5,39.5);
    TH1D *chi2_PointSize_4 = new TH1D("chi2_PointSize_4","",100,-0.5,99.5);
    TH1D *chi2_FullSize_4 = new TH1D("chi2_FullSize_4","",100,-0.5,99.5);
    chi2_PointSize_4->SetLineColor(4); chi2_FullSize_4->SetLineColor(2);
    chi2_PointSize_4->SetMarkerColor(4); chi2_FullSize_4->SetMarkerColor(2);
    chi2_PointSize_4->GetXaxis()->SetTitle("Coherent fraction (%)"); chi2_PointSize_4->GetYaxis()->SetTitle("#sqrt{#chi^{2}}");
    chi2_PointSize_4->GetXaxis()->SetTitleSize(SizeTitle);  chi2_PointSize_4->GetYaxis()->SetTitleSize(SizeTitle);
    chi2_PointSize_4->GetXaxis()->SetLabelSize(SizeLabel);  chi2_PointSize_4->GetYaxis()->SetLabelSize(SizeLabel);
    chi2_PointSize_4->GetYaxis()->SetNdivisions(505);
    TH2D *chi2_2D_4 = new TH2D("chi2_2D_4","",7,0.5,7.5, 100,-0.5,99.5);
       

    TH1D *tempDen = (TH1D*)C4QSBuiltmerged2D[KTBin][MBOI]->ProjectionY("TPFullWeight4_Den", 4, 4);
    TH1D *tempDenNeg = (TH1D*)C4QSNegBuiltmerged2D[KTBin][MBOI]->ProjectionY("TPNegFullWeight4_Den", 4, 4);
    tempDen->Add(tempDenNeg);// Add Pos and Neg Weight

    for(int binG=5; binG<=104; binG++){// 44
      TString *proName=new TString("TPFullWeight4_");
      *proName += binG;
      TH1D *tempNum = (TH1D*)C4QSBuiltmerged2D[KTBin][MBOI]->ProjectionY(proName->Data(), binG, binG);
      proName->Append("_Neg");
      TH1D *tempNumNeg = (TH1D*)C4QSNegBuiltmerged2D[KTBin][MBOI]->ProjectionY(proName->Data(), binG, binG);
      //
      // Add Pos and Neg Weights
      tempNum->Add(tempNumNeg);
      //
      tempNum->Add(tempDen);
      tempNum->Divide(tempDen);
      //lowBin = C4QS->GetXaxis()->FindBin(Cutoff_FullWeight_Q4[Mbin]);
      //highBin = C4QS->GetXaxis()->FindBin(Cutoff_FullWeight_Q4[Mbin]);
      //SF=C4QS->Integral(lowBin, highBin);
      //SF /= tempNum->Integral(lowBin, highBin);
      //tempNum->Scale(SF);
      

      if(tempNum->GetBinContent(Q4binChi2) <=0) continue;
      double value = C4QSmerged[ChProdBOI][KTBin][MBOI]->GetBinContent(Q4binChi2) - tempNum->GetBinContent(Q4binChi2);
      double err = pow(C4QSmerged[ChProdBOI][KTBin][MBOI]->GetBinError(Q4binChi2),2);
      err += pow(Syst_forChi2_4[Q4binChi2-1],2);
      err = sqrt(err);
      if(err<=0) continue;
      double Chi2 = pow(value / err,2);
      //
      
      //if(binG<25) {chi2_PointSize_4->SetBinContent(1 + 2*(binG-5), sqrt(fabs(Chi2))); chi2_PointSize_4->SetBinError(1 + 2*(binG-5), 0.001);}
      //else {chi2_FullSize_4->SetBinContent(1 + 2*(binG-25), sqrt(fabs(Chi2))); chi2_FullSize_4->SetBinError(1 + 2*(binG-25), 0.001);}
      if(binG<55) {chi2_PointSize_4->SetBinContent(1 + 2*(binG-5), sqrt(fabs(Chi2))); chi2_PointSize_4->SetBinError(1 + 2*(binG-5), 0.001);}
      else {chi2_FullSize_4->SetBinContent(1 + 2*(binG-55), sqrt(fabs(Chi2))); chi2_FullSize_4->SetBinError(1 + 2*(binG-55), 0.001);}
      //
      
      for(int binQ4=3; binQ4<=7; binQ4++){
	if(tempNum->GetBinContent(binQ4) <=0) continue;
	double value = C4QSmerged[ChProdBOI][KTBin][MBOI]->GetBinContent(binQ4) - tempNum->GetBinContent(binQ4);
	double err = pow(C4QSmerged[ChProdBOI][KTBin][MBOI]->GetBinError(binQ4),2);
	err += pow(Syst_forChi2_4[binQ4-1],2);
	err = sqrt(err);
	if(err<=0) continue;
	Chi2 = pow(value / err,2);
	//
	chi2_2D_4->SetBinContent(binQ4, binG-4, sqrt(fabs(Chi2)));
      }
      
    }
    chi2_PointSize_4->SetMarkerStyle(20); chi2_FullSize_4->SetMarkerStyle(20);
    chi2_PointSize_4->SetMinimum(0); chi2_PointSize_4->SetMaximum(13);
    
    TString *Q4binName = new TString("0.0");
    
    if(int((Q4binChi2-1)*1.5*10)%10 == 0) *Q4binName += int((Q4binChi2-1)*1.5);
    else {*Q4binName += int((Q4binChi2-1)*1.5); *Q4binName += 5;}
    Q4binName->Append(" < #font[12]{Q_{4}} < 0.0");
    if(int((Q4binChi2)*1.5*10)%10 == 0) *Q4binName += int((Q4binChi2)*1.5);
    else {*Q4binName += int((Q4binChi2)*1.5); *Q4binName += 5;}
    Q4binName->Append(" GeV/#font[12]{c}");
    legend4->SetHeader(Q4binName->Data());
    chi2_PointSize_4->Draw();
    chi2_FullSize_4->Draw("same");
    legend4->AddEntry(chi2_PointSize_4,"R_{coh}=0","p");
    legend4->AddEntry(chi2_FullSize_4,"R_{coh}=R_{ch}","p");
    legend4->Draw("same");

    TString *meanpTName = new TString("#LT #font[12]{p}_{T} #GT = 0.");
    *meanpTName += Q4_meanpT[KTBin][Q4binChi2-1];
    meanpTName->Append(" GeV/#font[12]{c}");
    TLatex *Specif_pT = new TLatex(0.15,0.9,meanpTName->Data());
    Specif_pT->SetNDC();
    Specif_pT->SetTextFont(TextFont);
    Specif_pT->SetTextSize(SizeSpecif);
    Specif_pT->Draw("same");
   

    TString *SaveNameChi2_4 = new TString("ChiSq_C4_bin");
    *SaveNameChi2_4 += Q4binChi2;
    SaveNameChi2_4->Append("_K");
    *SaveNameChi2_4 += KTBin;
    SaveNameChi2_4->Append("_M");
    *SaveNameChi2_4 += MBOI;
    SaveNameChi2_4->Append(".eps");
    //can4->SaveAs(SaveNameChi2_4->Data());
    



    ///////////////////////////////////////////////////////////////////////////
    // G versus Q4

    TCanvas *can5 = new TCanvas("can5", "can5",1300,700,700,600);// 11,53,700,500
    can5->SetHighLightColor(2);
    gStyle->SetOptFit(0111);
    can5->SetFillColor(0);//10
    can5->SetBorderMode(0);
    can5->SetBorderSize(2);
    can5->SetFrameFillColor(0);
    can5->SetFrameBorderMode(0);
    can5->SetFrameBorderMode(0);
    
    TPad *pad5 = new TPad("pad5","pad5",0.0,0.0,1.,1.);
    gPad->SetTickx();
    gPad->SetTicky();
    pad5->SetTopMargin(0.0);//0.05
    pad5->SetRightMargin(0.0);//1e-2
    pad5->SetBottomMargin(0.0);//0.12
    pad5->Draw();
    pad5->cd(1);
    gPad->SetLeftMargin(0.14); gPad->SetRightMargin(0.04);
    gPad->SetTopMargin(0.03); gPad->SetBottomMargin(0.14);

    TLegend *legend5 = new TLegend(.15,.75, .3,.95,NULL,"brNDC");//.45 or .4 for x1
    legend5->SetBorderSize(0);
    legend5->SetFillColor(0);
    legend5->SetTextFont(TextFont);
    legend5->SetTextSize(SizeLegend);

    TH1D *GversusQ4_Point = new TH1D("GversusQ4_Point","",7,0,0.105);
    TH1D *GversusQ4_Full = new TH1D("GversusQ4_Full","",7,0,0.105);
    for(int binQ4=3; binQ4<=7; binQ4++){
      double minG = 0;
      double minG_e1 = 0, minG_e2=0;
      double minChi=100;
      // Point Source
      for(int binG=1; binG<=50; binG++){// min
	if(minChi > chi2_2D_4->GetBinContent(binQ4, binG)) {
	  minChi = chi2_2D_4->GetBinContent(binQ4, binG);
	  minG = 2*(binG-1);
	}
      }
      //cout<<binQ4<<"  "<<minChi<<endl;
      for(int binG=1; binG<=50; binG++){// error
	if(minG > 0) {
	  if(fabs(minChi - chi2_2D_4->GetBinContent(binQ4, binG)) < 1.) {
	    if(minG>2*(binG-1)) minG_e1 = fabs(minG - 2*(binG-1)); 
	    else minG_e2 = fabs(minG - 2*(binG-1));
	  }
	}else{
	  if(fabs(minChi - chi2_2D_4->GetBinContent(binQ4, binG)) < 1.) {
	    minG_e1 = fabs(minG - 2*(binG-1)); 
	  }
	}
      }
      GversusQ4_Point->SetBinContent(binQ4, minG);
      if(minG_e1>minG_e2) GversusQ4_Point->SetBinError(binQ4, minG_e1);
      else GversusQ4_Point->SetBinError(binQ4, minG_e2);
      //
      // Full Source
      minG = 0;
      minG_e1 = 0, minG_e2=0;
      minChi=100;
      for(int binG=51; binG<=100; binG++){// min
	if(minChi > chi2_2D_4->GetBinContent(binQ4, binG)) {
	  minChi = chi2_2D_4->GetBinContent(binQ4, binG);
	  minG = 2*(binG-51);
	}
      }
      for(int binG=51; binG<=100; binG++){// error
	if(minG > 0) {
	  if(fabs(minChi - chi2_2D_4->GetBinContent(binQ4, binG)) < 1.) {
	    if(minG>2*(binG-51)) minG_e1 = fabs(minG - 2*(binG-51)); 
	    else minG_e2 = fabs(minG - 2*(binG-51));
	  }
	}else{
	  if(fabs(minChi - chi2_2D_4->GetBinContent(binQ4, binG)) < 1.) {
	    minG_e1 = fabs(minG - 2*(binG-51)); 
	  }
	}
      }
      //cout<<binQ4<<"  "<<minG<<"  "<<minG_e<<endl;
      GversusQ4_Full->SetBinContent(binQ4, minG);
      if(minG_e1>minG_e2) GversusQ4_Full->SetBinError(binQ4, minG_e1);
      else GversusQ4_Full->SetBinError(binQ4, minG_e2);
    }
    //
    GversusQ4_Point->SetMarkerStyle(20); GversusQ4_Point->SetMarkerColor(4); GversusQ4_Point->SetLineColor(4);
    GversusQ4_Full->SetMarkerStyle(20); GversusQ4_Full->SetMarkerColor(2); GversusQ4_Full->SetLineColor(2);
    GversusQ4_Point->SetMinimum(0); GversusQ4_Point->SetMaximum(40); 
    GversusQ4_Point->GetXaxis()->SetTitle("#font[12]{Q_{4}} (GeV/#font[12]{c})"); GversusQ4_Point->GetYaxis()->SetTitle("Coherent fraction (%)");
    GversusQ4_Point->GetXaxis()->SetTitleSize(SizeTitle);  GversusQ4_Point->GetYaxis()->SetTitleSize(SizeTitle);
    GversusQ4_Point->GetXaxis()->SetLabelSize(SizeLabel);  GversusQ4_Point->GetYaxis()->SetLabelSize(SizeLabel);
    GversusQ4_Point->GetYaxis()->SetNdivisions(505);
    GversusQ4_Point->Draw();
    GversusQ4_Full->Draw("same");
    //
    legend5->AddEntry(GversusQ4_Point,"R_{coh}=0","p");
    legend5->AddEntry(GversusQ4_Full,"R_{coh}=R_{ch}","p");
    legend5->Draw("same");

  }

  


  //////////////////////////////////////////////////////////////////////////
  // r3
  /* TCanvas *can1 = new TCanvas("can1", "can1",10,0,600,600);// 11,53,700,500
  can1->SetHighLightColor(2);
  gStyle->SetOptFit(0111);
  can1->SetFillColor(0);//10
  can1->SetBorderMode(0);
  can1->SetBorderSize(2);
  can1->SetFrameFillColor(0);
  can1->SetFrameBorderMode(0);
  can1->SetFrameBorderMode(0);
  
  TPad *pad1 = new TPad("pad1","pad1",0.0,0.0,1.,1.);
  gPad->SetGridx(1);
  gPad->SetGridy(1);
  gPad->SetTickx();
  gPad->SetTicky();
  pad1->SetTopMargin(0.02);//0.05
  pad1->SetRightMargin(0.01);//1e-2
  pad1->SetBottomMargin(0.07);//0.12
  pad1->Draw();
  pad1->cd(1);
  gPad->SetLeftMargin(0.14);
  gPad->SetRightMargin(0.03);
  
  r3merged[0]->SetMinimum(1.45); r3merged[0]->SetMaximum(2.45); 
  r3merged[1]->SetMarkerColor(2); r3merged[1]->SetLineColor(2); 
  //r3merged[0]->Draw();
  //r3merged[1]->Draw("same");
  //
  r4merged[0]->SetMinimum(1.45); r4merged[0]->SetMaximum(10.45); 
  r4merged[1]->SetMarkerColor(2); r4merged[1]->SetLineColor(2);
  r4merged[0]->Draw();
  r4merged[1]->Draw("same");
  */

}

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