void sobWeightedCombineAll(){

  TString All[NMAXINPUT];
  All[0]="emu_boost_low_rescaled_7TeV_";
  All[1]="eleTau_boost_low_rescaled_7TeV_";
  All[2]="muTau_boost_low_rescaled_7TeV_";
  All[3]="emu_boost_low_rescaled_8TeV_";
  All[4]="eleTau_boost_low_rescaled_8TeV_";
  All[5]="muTau_boost_low_rescaled_8TeV_";
  All[6]="emu_boost_high_rescaled_7TeV_";
  All[7]="eleTau_boost_high_rescaled_7TeV_";
  All[8]="muTau_boost_high_rescaled_7TeV_";
  All[9]="emu_boost_high_rescaled_8TeV_";
  All[10]="eleTau_boost_high_rescaled_8TeV_";
  All[11]="muTau_boost_high_rescaled_8TeV_";
  All[12]="tauTau_boost_rescaled_8TeV_";
  All[13]="emu_vbf_rescaled_7TeV_";
  All[14]="eleTau_vbf_rescaled_7TeV_";
  All[15]="muTau_vbf_rescaled_7TeV_";
  All[16]="emu_vbf_rescaled_8TeV_";
  All[17]="eleTau_vbf_rescaled_8TeV_";
  All[18]="muTau_vbf_rescaled_8TeV_";
  All[19]="tauTau_vbf_rescaled_8TeV_";


  TString EMu[NMAXINPUT];
  EMu[0]="emu_boost_low_rescaled_7TeV_";
  EMu[1]="emu_boost_low_rescaled_8TeV_";
  EMu[2]="emu_boost_high_rescaled_7TeV_";
  EMu[3]="emu_boost_high_rescaled_8TeV_";
  EMu[4]="emu_vbf_rescaled_7TeV_";
  EMu[5]="emu_vbf_rescaled_8TeV_";



  TString ETau[NMAXINPUT];
  ETau[0]="eleTau_boost_low_rescaled_7TeV_";
  ETau[1]="eleTau_boost_low_rescaled_8TeV_";
  ETau[2]="eleTau_boost_high_rescaled_7TeV_";
  ETau[3]="eleTau_boost_high_rescaled_8TeV_";
  ETau[4]="eleTau_vbf_rescaled_7TeV_";
  ETau[5]="eleTau_vbf_rescaled_8TeV_";
  

  TString MuTau[NMAXINPUT];
  MuTau[0]="muTau_boost_low_rescaled_7TeV_";
  MuTau[1]="muTau_boost_low_rescaled_8TeV_";
  MuTau[2]="muTau_boost_high_rescaled_7TeV_";
  MuTau[3]="muTau_boost_high_rescaled_8TeV_";
  MuTau[4]="muTau_vbf_rescaled_7TeV_";
  MuTau[5]="muTau_vbf_rescaled_8TeV_";



  TString TauTau[NMAXINPUT];
  TauTau[0]="tauTau_boost_rescaled_8TeV_";
  TauTau[1]="tauTau_vbf_rescaled_8TeV_";



  TString BoostLow[NMAXINPUT];
  BoostLow[0]="emu_boost_low_rescaled_7TeV_";
  BoostLow[1]="eleTau_boost_low_rescaled_7TeV_";
  BoostLow[2]="muTau_boost_low_rescaled_7TeV_";
  BoostLow[3]="emu_boost_low_rescaled_8TeV_";
  BoostLow[4]="eleTau_boost_low_rescaled_8TeV_";
  BoostLow[5]="muTau_boost_low_rescaled_8TeV_";




  TString BoostHigh[NMAXINPUT];
  BoostHigh[0]="emu_boost_high_rescaled_7TeV_";
  BoostHigh[1]="eleTau_boost_high_rescaled_7TeV_";
  BoostHigh[2]="muTau_boost_high_rescaled_7TeV_";
  BoostHigh[3]="emu_boost_high_rescaled_8TeV_";
  BoostHigh[4]="eleTau_boost_high_rescaled_8TeV_";
  BoostHigh[5]="muTau_boost_high_rescaled_8TeV_";
  BoostHigh[6]="tauTau_boost_rescaled_8TeV_";
 
  TString Boost[NMAXINPUT];
  Boost[0]="emu_boost_low_rescaled_7TeV_";
  Boost[1]="eleTau_boost_low_rescaled_7TeV_";
  Boost[2]="muTau_boost_low_rescaled_7TeV_";
  Boost[3]="emu_boost_low_rescaled_8TeV_";
  Boost[4]="eleTau_boost_low_rescaled_8TeV_";
  Boost[5]="muTau_boost_low_rescaled_8TeV_";
  Boost[6]="emu_boost_high_rescaled_7TeV_";
  Boost[7]="eleTau_boost_high_rescaled_7TeV_";
  Boost[8]="muTau_boost_high_rescaled_7TeV_";
  Boost[9]="emu_boost_high_rescaled_8TeV_";
  Boost[10]="eleTau_boost_high_rescaled_8TeV_";
  Boost[11]="muTau_boost_high_rescaled_8TeV_";
  Boost[12]="tauTau_boost_rescaled_8TeV_";
 



  TString VBF[NMAXINPUT];
  VBF[0]="emu_vbf_rescaled_7TeV_";
  VBF[1]="eleTau_vbf_rescaled_7TeV_";
  VBF[2]="muTau_vbf_rescaled_7TeV_";
  VBF[3]="emu_vbf_rescaled_8TeV_";
  VBF[4]="eleTau_vbf_rescaled_8TeV_";
  VBF[5]="muTau_vbf_rescaled_8TeV_";
  VBF[6]="tauTau_vbf_rescaled_8TeV_";



  TString E7TeV[NMAXINPUT];
  E7TeV[0]="eleTau_boost_low_rescaled_7TeV_";
  E7TeV[1]="muTau_boost_low_rescaled_7TeV_";
  E7TeV[2]="emu_boost_high_rescaled_7TeV_";
  E7TeV[3]="eleTau_boost_high_rescaled_7TeV_";
  E7TeV[4]="muTau_boost_high_rescaled_7TeV_";
  E7TeV[5]="emu_vbf_rescaled_7TeV_";
  E7TeV[6]="eleTau_vbf_rescaled_7TeV_";
  E7TeV[7]="muTau_vbf_rescaled_7TeV_";
  


  TString E8TeV[NMAXINPUT];
  E8TeV[0]="emu_boost_low_rescaled_8TeV_";
  E8TeV[1]="eleTau_boost_low_rescaled_8TeV_";
  E8TeV[2]="muTau_boost_low_rescaled_8TeV_";
  E8TeV[3]="emu_boost_high_rescaled_8TeV_";
  E8TeV[4]="eleTau_boost_high_rescaled_8TeV_";
  E8TeV[5]="muTau_boost_high_rescaled_8TeV_";
  E8TeV[6]="tauTau_boost_rescaled_8TeV_";
  E8TeV[7]="emu_vbf_rescaled_8TeV_";
  E8TeV[8]="eleTau_vbf_rescaled_8TeV_";
  E8TeV[9]="muTau_vbf_rescaled_8TeV_";
  E8TeV[10]="tauTau_vbf_rescaled_8TeV_";



  TString MuTau8TeV[NMAXINPUT];
  MuTau8TeV[0]="muTau_boost_low_rescaled_8TeV_";
  MuTau8TeV[1]="muTau_boost_high_rescaled_8TeV_";
  MuTau8TeV[2]="muTau_vbf_rescaled_8TeV_";

  TString MuTau0Jet8TeV[NMAXINPUT];
  MuTau0Jet8TeV[0]="muTau_0jet_low_rescaled_8TeV_";
  MuTau0Jet8TeV[1]="muTau_0jet_high_rescaled_8TeV_";

  TString MuTauBoost8TeV[NMAXINPUT];
  MuTauBoost8TeV[0]="muTau_boost_low_rescaled_8TeV_";
  MuTauBoost8TeV[1]="muTau_boost_high_rescaled_8TeV_";




  TString AllNoTauTau[NMAXINPUT];
  AllNoTauTau[0]="emu_boost_low_rescaled_7TeV_";
  AllNoTauTau[1]="eleTau_boost_low_rescaled_7TeV_";
  AllNoTauTau[2]="muTau_boost_low_rescaled_7TeV_";
  AllNoTauTau[3]="emu_boost_low_rescaled_8TeV_";
  AllNoTauTau[4]="eleTau_boost_low_rescaled_8TeV_";
  AllNoTauTau[5]="muTau_boost_low_rescaled_8TeV_";
  AllNoTauTau[6]="emu_boost_high_rescaled_7TeV_";
  AllNoTauTau[7]="eleTau_boost_high_rescaled_7TeV_";
  AllNoTauTau[8]="muTau_boost_high_rescaled_7TeV_";
  AllNoTauTau[9]="emu_boost_high_rescaled_8TeV_";
  AllNoTauTau[10]="eleTau_boost_high_rescaled_8TeV_";
  AllNoTauTau[11]="muTau_boost_high_rescaled_8TeV_";
  AllNoTauTau[12]="emu_vbf_rescaled_7TeV_";
  AllNoTauTau[13]="eleTau_vbf_rescaled_7TeV_";
  AllNoTauTau[14]="muTau_vbf_rescaled_7TeV_";
  AllNoTauTau[15]="emu_vbf_rescaled_8TeV_";
  AllNoTauTau[16]="eleTau_vbf_rescaled_8TeV_";
  AllNoTauTau[17]="muTau_vbf_rescaled_8TeV_";


  TString BoostHighNoTauTau[NMAXINPUT];
  BoostHighNoTauTau[0]="emu_boost_high_rescaled_7TeV_";
  BoostHighNoTauTau[1]="eleTau_boost_high_rescaled_7TeV_";
  BoostHighNoTauTau[2]="muTau_boost_high_rescaled_7TeV_";
  BoostHighNoTauTau[3]="emu_boost_high_rescaled_8TeV_";
  BoostHighNoTauTau[4]="eleTau_boost_high_rescaled_8TeV_";
  BoostHighNoTauTau[5]="muTau_boost_high_rescaled_8TeV_";


  TString VBFNoTauTau[NMAXINPUT];
  VBFNoTauTau[0]="emu_vbf_rescaled_7TeV_";
  VBFNoTauTau[1]="eleTau_vbf_rescaled_7TeV_";
  VBFNoTauTau[2]="muTau_vbf_rescaled_7TeV_";
  VBFNoTauTau[3]="emu_vbf_rescaled_8TeV_";
  VBFNoTauTau[4]="eleTau_vbf_rescaled_8TeV_";
  VBFNoTauTau[5]="muTau_vbf_rescaled_8TeV_";

  TString E8TeVNoTauTau[NMAXINPUT];
  E8TeVNoTauTau[0]="emu_boost_low_rescaled_8TeV_";
  E8TeVNoTauTau[1]="eleTau_boost_low_rescaled_8TeV_";
  E8TeVNoTauTau[2]="muTau_boost_low_rescaled_8TeV_";
  E8TeVNoTauTau[3]="emu_boost_high_rescaled_8TeV_";
  E8TeVNoTauTau[4]="eleTau_boost_high_rescaled_8TeV_";
  E8TeVNoTauTau[5]="muTau_boost_high_rescaled_8TeV_";
  E8TeVNoTauTau[6]="emu_vbf_rescaled_8TeV_";
  E8TeVNoTauTau[7]="eleTau_vbf_rescaled_8TeV_";
  E8TeVNoTauTau[8]="muTau_vbf_rescaled_8TeV_";


  float muvalue=1.10;
  //TString dataset=" CMS Preliminary, #sqrt{s} = 7-8 TeV, L = 24.3 fb^{-1}";
  //TString dataset="CMS Preliminary,  #sqrt{s}=7 TeV, L=4.9 fb^{-1}; #sqrt{s}=8 TeV, L=19.3 fb^{-1}; H#rightarrow#tau#tau";
  TString dataset="CMS Preliminary,  H#rightarrow#tau#tau,  4.9 fb^{-1} at 7 TeV, 19.3 fb^{-1} at 8 TeV";

  sobCombine("All",All,dataset,"e#mu, #scale[1]{e}#tau_{h}, #scale[1]{#mu}#tau_{h}, #tau_{h}#tau_{h}","",1,muvalue);
  sobCombine("Boost",Boost,dataset,"e#mu, #scale[1]{e}#tau_{h}, #scale[1]{#mu}#tau_{h}, #tau_{h}#tau_{h}","1 jet",1,muvalue);
  sobCombine("VBF",VBF,dataset,"e#mu, #scale[1]{e}#tau_{h}, #scale[1]{#mu}#tau_{h}, #tau_{h}#tau_{h}","2 jet (VBF)",1,muvalue);
  
//   sobCombine("EMu",EMu,"#sqrt{s} = 7 - 8 TeV ,   L = 24.3 fb^{-1}","e#mu",1,muvalue);
//   sobCombine("ETau",ETau,"#sqrt{s} = 7 - 8 TeV ,   L = 24.3 fb^{-1}","e#tau_{h}",1,muvalue);
//   sobCombine("MuTau",MuTau,"#sqrt{s} = 7 - 8 TeV ,   L = 24.3 fb^{-1}","#mu-#tau_{h}",1,muvalue);
//   sobCombine("TauTau",TauTau,"#sqrt{s} = 8 TeV ,   L = 19.4 fb^{-1}","#tau_{h}-#tau_{h}",1,muvalue);
//   sobCombine("BoostLow",BoostLow,"#sqrt{s} = 7 - 8 TeV ,   L = 24.3 fb^{-1}","1jet_low",1,muvalue);
//   sobCombine("BoostHigh",BoostHigh,"#sqrt{s} = 7 - 8 TeV ,   L = 24.3 fb^{-1}","1jet_high",1,muvalue);
//   sobCombine("E7TeV",E7TeV,"#sqrt{s} = 7 TeV ,   L = 4.9 fb^{-1}","e#mu,e#tau_{h},#mu-#tau_{h}",1,muvalue);
//   sobCombine("E8TeV",E8TeV,"#sqrt{s} = 8 TeV ,   L = 19.4 fb^{-1}","e#mu,e#tau_{h},#mu-#tau_{h},#tau_{h}-#tau_{h}",1,muvalue);
  
//   sobCombine("AllNoTauTau",AllNoTauTau,"#sqrt{s} = 7 - 8 TeV ,   L = 24.3 fb^{-1}","e#mu,e#tau_{h},#mu-#tau_{h}",1,muvalue);
//   sobCombine("BoostHighNoTauTau",BoostHighNoTauTau,"#sqrt{s} = 7 - 8 TeV ,   L = 24.3 fb^{-1}","Boost_High No TauTau",1,muvalue);
//   sobCombine("VBFNoTauTau",VBFNoTauTau,"#sqrt{s} = 7 - 8 TeV ,   L = 24.3 fb^{-1}","VBF No TauTau",1,muvalue);
//   sobCombine("E8TeVNoTauTau",E8TeVNoTauTau,"#sqrt{s} = 8 TeV ,   L = 19.4 fb^{-1}","e#mu,e#tau_{h},#mu-#tau_{h}",1,muvalue);

//   sobCombine("MuTauBoost8TeV",MuTauBoost8TeV,"#sqrt{s} = 8 TeV ,   L = 19.4 fb^{-1}","#mu-#tau_{h} Boost",1,muvalue);
//   sobCombine("MuTau8TeV",MuTau8TeV,"#sqrt{s} = 8 TeV ,   L = 19.4 fb^{-1}","#mu-#tau_{h}",1,muvalue);
//  sobCombine("MuTau0Jet8TeV",MuTau0Jet8TeV,2,0,"#sqrt{s} = 8 TeV ,   L = 19.4 fb^{-1}","#mu-#tau_{h} 0-Jet",1,muvalue);


   gROOT->ProcessLine(".q");
}
void sobWeightedCombineAll(float muValue=1.10, bool log=false, int mass=125, int tanb=0)
{
  SetStyle();

  TString All_SM[NMAXINPUT]; 
  //vbf
  All_SM[ 0]="ee_vbf_postfit_7TeV_LIN";
  All_SM[ 1]="ee_vbf_postfit_8TeV_LIN";
  All_SM[ 2]="emu_vbf_loose_postfit_7TeV_LIN";
  All_SM[ 3]="emu_vbf_loose_postfit_8TeV_LIN";
  All_SM[ 4]="emu_vbf_tight_postfit_8TeV_LIN";
  All_SM[ 5]="eleTau_vbf_postfit_7TeV_LIN";
  All_SM[ 6]="eleTau_vbf_loose_postfit_8TeV_LIN";
  All_SM[ 7]="eleTau_vbf_tight_postfit_8TeV_LIN"; 
  All_SM[ 8]="mumu_vbf_postfit_7TeV_LIN";
  All_SM[ 9]="mumu_vbf_postfit_8TeV_LIN";
  All_SM[10]="muTau_vbf_postfit_7TeV_LIN";
  All_SM[11]="muTau_vbf_loose_postfit_8TeV_LIN";
  All_SM[12]="muTau_vbf_tight_postfit_8TeV_LIN"; 
  All_SM[13]="tauTau_vbf_postfit_8TeV_LIN";
  All_SM[14]="tauTau_vbf_postfit_8TeV_LIN";
  //1jet
  All_SM[15]="ee_1jet_low_postfit_7TeV_LIN";
  All_SM[16]="ee_1jet_low_postfit_8TeV_LIN";
  All_SM[17]="ee_1jet_high_postfit_7TeV_LIN";
  All_SM[18]="ee_1jet_high_postfit_8TeV_LIN";
  All_SM[19]="emu_1jet_low_postfit_7TeV_LIN";
  All_SM[20]="emu_1jet_low_postfit_8TeV_LIN";
  All_SM[21]="emu_1jet_high_postfit_7TeV_LIN";
  All_SM[22]="emu_1jet_high_postfit_8TeV_LIN";
  All_SM[23]="eleTau_1jet_medium_postfit_7TeV_LIN";
  All_SM[24]="eleTau_1jet_medium_postfit_8TeV_LIN";
  All_SM[25]="eleTau_1jet_high_lowhiggs_postfit_7TeV_LIN";
  All_SM[26]="eleTau_1jet_high_lowhiggs_postfit_8TeV_LIN"; 
  All_SM[27]="eleTau_1jet_high_mediumhiggs_postfit_7TeV_LIN";
  All_SM[28]="eleTau_1jet_high_mediumhiggs_postfit_8TeV_LIN"; 
  All_SM[29]="mumu_1jet_low_postfit_7TeV_LIN";
  All_SM[30]="mumu_1jet_low_postfit_8TeV_LIN";
  All_SM[31]="mumu_1jet_high_postfit_7TeV_LIN";
  All_SM[32]="mumu_1jet_high_postfit_8TeV_LIN";
  All_SM[33]="muTau_1jet_medium_postfit_7TeV_LIN";
  All_SM[34]="muTau_1jet_medium_postfit_8TeV_LIN";
  All_SM[35]="muTau_1jet_high_lowhiggs_postfit_7TeV_LIN";
  All_SM[36]="muTau_1jet_high_lowhiggs_postfit_8TeV_LIN"; 
  All_SM[37]="muTau_1jet_high_mediumhiggs_postfit_7TeV_LIN";
  All_SM[38]="muTau_1jet_high_mediumhiggs_postfit_8TeV_LIN"; 
  All_SM[39]="tauTau_1jet_high_mediumhiggs_postfit_8TeV_LIN";
  All_SM[40]="tauTau_1jet_high_highhiggs_postfit_8TeV_LIN";
  //0jet
  All_SM[41]="ee_0jet_low_postfit_7TeV_LIN";
  All_SM[42]="ee_0jet_low_postfit_8TeV_LIN";
  All_SM[43]="ee_0jet_high_postfit_7TeV_LIN";
  All_SM[44]="ee_0jet_high_postfit_8TeV_LIN";
  All_SM[45]="emu_0jet_low_postfit_7TeV_LIN";
  All_SM[46]="emu_0jet_low_postfit_8TeV_LIN";
  All_SM[47]="emu_0jet_high_postfit_7TeV_LIN";
  All_SM[48]="emu_0jet_high_postfit_8TeV_LIN";
  All_SM[49]="eleTau_0jet_low_postfit_7TeV_LIN";
  All_SM[50]="eleTau_0jet_low_postfit_8TeV_LIN";
  All_SM[51]="eleTau_0jet_medium_postfit_7TeV_LIN";
  All_SM[52]="eleTau_0jet_medium_postfit_8TeV_LIN"; 
  All_SM[53]="eleTau_0jet_high_postfit_7TeV_LIN";
  All_SM[54]="eleTau_0jet_high_postfit_8TeV_LIN"; 
  All_SM[55]="mumu_0jet_low_postfit_7TeV_LIN";
  All_SM[56]="mumu_0jet_low_postfit_8TeV_LIN";
  All_SM[57]="mumu_0jet_high_postfit_7TeV_LIN";
  All_SM[58]="mumu_0jet_high_postfit_8TeV_LIN"; 
  All_SM[59]="muTau_0jet_low_postfit_7TeV_LIN";
  All_SM[60]="muTau_0jet_low_postfit_8TeV_LIN";
  All_SM[61]="muTau_0jet_medium_postfit_7TeV_LIN";
  All_SM[62]="muTau_0jet_medium_postfit_8TeV_LIN"; 
  All_SM[63]="muTau_0jet_high_postfit_7TeV_LIN";
  All_SM[64]="muTau_0jet_high_postfit_8TeV_LIN";  
  
  TString EMETMTTT_1JET_VBF_SM[NMAXINPUT]; 
  //vbf
  EMETMTTT_1JET_VBF_SM[ 0]="emu_vbf_loose_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[ 1]="emu_vbf_loose_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[ 2]="emu_vbf_tight_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[ 3]="eleTau_vbf_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[ 4]="eleTau_vbf_loose_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[ 5]="eleTau_vbf_tight_postfit_8TeV_LIN"; 
  EMETMTTT_1JET_VBF_SM[ 6]="muTau_vbf_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[ 7]="muTau_vbf_loose_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[ 8]="muTau_vbf_tight_postfit_8TeV_LIN"; 
  EMETMTTT_1JET_VBF_SM[ 9]="tauTau_vbf_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[10]="tauTau_vbf_postfit_8TeV_LIN";
  //1jet
  EMETMTTT_1JET_VBF_SM[11]="emu_1jet_low_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[12]="emu_1jet_low_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[13]="emu_1jet_high_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[14]="emu_1jet_high_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[15]="eleTau_1jet_medium_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[16]="eleTau_1jet_medium_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[17]="eleTau_1jet_high_lowhiggs_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[18]="eleTau_1jet_high_lowhiggs_postfit_8TeV_LIN"; 
  EMETMTTT_1JET_VBF_SM[19]="eleTau_1jet_high_mediumhiggs_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[20]="eleTau_1jet_high_mediumhiggs_postfit_8TeV_LIN"; 
  EMETMTTT_1JET_VBF_SM[21]="muTau_1jet_medium_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[22]="muTau_1jet_medium_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[23]="muTau_1jet_high_lowhiggs_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[24]="muTau_1jet_high_lowhiggs_postfit_8TeV_LIN"; 
  EMETMTTT_1JET_VBF_SM[25]="muTau_1jet_high_mediumhiggs_postfit_7TeV_LIN";
  EMETMTTT_1JET_VBF_SM[26]="muTau_1jet_high_mediumhiggs_postfit_8TeV_LIN"; 
  EMETMTTT_1JET_VBF_SM[27]="tauTau_1jet_high_mediumhiggs_postfit_8TeV_LIN";
  EMETMTTT_1JET_VBF_SM[28]="tauTau_1jet_high_highhiggs_postfit_8TeV_LIN";

  TString EE_SM[NMAXINPUT];
  EE_SM[ 0]="ee_vbf_postfit_7TeV_LIN";
  EE_SM[ 1]="ee_vbf_postfit_8TeV_LIN";
  EE_SM[ 2]="ee_1jet_low_postfit_7TeV_LIN";
  EE_SM[ 3]="ee_1jet_low_postfit_8TeV_LIN";
  EE_SM[ 4]="ee_1jet_high_postfit_7TeV_LIN";
  EE_SM[ 5]="ee_1jet_high_postfit_8TeV_LIN";
  EE_SM[ 6]="ee_0jet_low_postfit_7TeV_LIN";
  EE_SM[ 7]="ee_0jet_low_postfit_8TeV_LIN";
  EE_SM[ 8]="ee_0jet_high_postfit_7TeV_LIN";
  EE_SM[ 9]="ee_0jet_high_postfit_8TeV_LIN";

  TString EMu_SM[NMAXINPUT];
  EMu_SM[ 0]="emu_vbf_loose_postfit_7TeV_LIN";
  EMu_SM[ 1]="emu_vbf_loose_postfit_8TeV_LIN";
  EMu_SM[ 2]="emu_vbf_tight_postfit_8TeV_LIN";
  EMu_SM[ 3]="emu_0jet_low_postfit_7TeV_LIN";
  EMu_SM[ 4]="emu_0jet_low_postfit_8TeV_LIN";
  EMu_SM[ 5]="emu_0jet_high_postfit_7TeV_LIN";
  EMu_SM[ 6]="emu_0jet_high_postfit_8TeV_LIN";
  EMu_SM[ 7]="emu_0jet_low_postfit_7TeV_LIN";
  EMu_SM[ 8]="emu_0jet_low_postfit_8TeV_LIN";
  EMu_SM[ 9]="emu_0jet_high_postfit_7TeV_LIN";
  EMu_SM[10]="emu_0jet_high_postfit_8TeV_LIN";

  TString ETau_SM[NMAXINPUT];
  ETau_SM[ 0]="eleTau_vbf_postfit_7TeV_LIN";
  ETau_SM[ 1]="eleTau_vbf_loose_postfit_8TeV_LIN";
  ETau_SM[ 2]="eleTau_vbf_tight_postfit_8TeV_LIN"; 
  ETau_SM[ 3]="eleTau_1jet_medium_postfit_7TeV_LIN";
  ETau_SM[ 4]="eleTau_1jet_medium_postfit_8TeV_LIN";
  ETau_SM[ 5]="eleTau_1jet_high_lowhiggs_postfit_7TeV_LIN";
  ETau_SM[ 6]="eleTau_1jet_high_lowhiggs_postfit_8TeV_LIN"; 
  ETau_SM[ 7]="eleTau_1jet_high_mediumhiggs_postfit_7TeV_LIN";
  ETau_SM[ 8]="eleTau_1jet_high_mediumhiggs_postfit_8TeV_LIN"; 
  ETau_SM[ 9]="eleTau_0jet_low_postfit_7TeV_LIN";
  ETau_SM[10]="eleTau_0jet_low_postfit_8TeV_LIN";
  ETau_SM[11]="eleTau_0jet_medium_postfit_7TeV_LIN";
  ETau_SM[12]="eleTau_0jet_medium_postfit_8TeV_LIN"; 
  ETau_SM[13]="eleTau_0jet_high_postfit_7TeV_LIN";
  ETau_SM[14]="eleTau_0jet_high_postfit_8TeV_LIN"; 

  TString MuMu_SM[NMAXINPUT];
  MuMu_SM[ 0]="mumu_vbf_postfit_7TeV_LIN";
  MuMu_SM[ 1]="mumu_vbf_postfit_8TeV_LIN";
  MuMu_SM[ 2]="mumu_1jet_low_postfit_7TeV_LIN";
  MuMu_SM[ 3]="mumu_1jet_low_postfit_8TeV_LIN";
  MuMu_SM[ 4]="mumu_1jet_high_postfit_7TeV_LIN";
  MuMu_SM[ 5]="mumu_1jet_high_postfit_8TeV_LIN";
  MuMu_SM[ 6]="mumu_0jet_low_postfit_7TeV_LIN";
  MuMu_SM[ 7]="mumu_0jet_low_postfit_8TeV_LIN";
  MuMu_SM[ 8]="mumu_0jet_high_postfit_7TeV_LIN";
  MuMu_SM[ 9]="mumu_0jet_high_postfit_8TeV_LIN"; 
  
  TString MuTau_SM[NMAXINPUT];
  MuTau_SM[ 0]="muTau_vbf_postfit_7TeV_LIN";
  MuTau_SM[ 1]="muTau_vbf_loose_postfit_8TeV_LIN";
  MuTau_SM[ 2]="muTau_vbf_tight_postfit_8TeV_LIN"; 
  MuTau_SM[ 3]="muTau_1jet_medium_postfit_7TeV_LIN";
  MuTau_SM[ 4]="muTau_1jet_medium_postfit_8TeV_LIN";
  MuTau_SM[ 5]="muTau_1jet_high_lowhiggs_postfit_7TeV_LIN";
  MuTau_SM[ 6]="muTau_1jet_high_lowhiggs_postfit_8TeV_LIN"; 
  MuTau_SM[ 7]="muTau_1jet_high_mediumhiggs_postfit_7TeV_LIN";
  MuTau_SM[ 8]="muTau_1jet_high_mediumhiggs_postfit_8TeV_LIN"; 
  MuTau_SM[ 9]="muTau_0jet_low_postfit_7TeV_LIN";
  MuTau_SM[10]="muTau_0jet_low_postfit_8TeV_LIN";
  MuTau_SM[11]="muTau_0jet_medium_postfit_7TeV_LIN";
  MuTau_SM[12]="muTau_0jet_medium_postfit_8TeV_LIN"; 
  MuTau_SM[13]="muTau_0jet_high_postfit_7TeV_LIN";
  MuTau_SM[14]="muTau_0jet_high_postfit_8TeV_LIN";

  TString TauTau_SM[NMAXINPUT];
  TauTau_SM[ 0]="tauTau_vbf_postfit_8TeV_LIN";
  TauTau_SM[ 1]="tauTau_vbf_postfit_8TeV_LIN";
  TauTau_SM[ 2]="tauTau_1jet_high_mediumhiggs_postfit_8TeV_LIN";
  TauTau_SM[ 3]="tauTau_1jet_high_highhiggs_postfit_8TeV_LIN";
  




  TString All_MSSM[NMAXINPUT];
  All_MSSM[0]="emu_nobtag_postfit_7TeV_LIN";
  All_MSSM[1]="emu_nobtag_postfit_8TeV_LIN";
  All_MSSM[2]="emu_btag_postfit_7TeV_LIN";
  All_MSSM[3]="emu_btag_postfit_8TeV_LIN"; 
  All_MSSM[4]="eleTau_nobtag_postfit_7TeV_LIN";
  All_MSSM[5]="eleTau_nobtag_postfit_8TeV_LIN";
  All_MSSM[6]="eleTau_btag_postfit_7TeV_LIN";
  All_MSSM[7]="eleTau_btag_postfit_8TeV_LIN";
  All_MSSM[8]="muTau_nobtag_postfit_7TeV_LIN";
  All_MSSM[9]="muTau_nobtag_postfit_8TeV_LIN";
  All_MSSM[10]="muTau_btag_postfit_7TeV_LIN";
  All_MSSM[11]="muTau_btag_postfit_8TeV_LIN";
  All_MSSM[12]="tauTau_nobtag_postfit_8TeV_LIN";
  All_MSSM[13]="tauTau_btag_postfit_8TeV_LIN";
  //All_MSSM[14]="mumu_nobtag_postfit_7TeV_LIN";
  //All_MSSM[15]="mumu_nobtag_postfit_8TeV_LIN";
  //All_MSSM[16]="mumu_btag_postfit_7TeV_LIN";
  //All_MSSM[17]="mumu_btag_postfit_8TeV_LIN";

  TString EMu_MSSM[NMAXINPUT];
  EMu_MSSM[0]="emu_nobtag_postfit_7TeV_LIN";
  EMu_MSSM[1]="emu_nobtag_postfit_8TeV_LIN";
  EMu_MSSM[2]="emu_btag_postfit_7TeV_LIN";
  EMu_MSSM[3]="emu_btag_postfit_8TeV_LIN";

  TString ETau_MSSM[NMAXINPUT];
  ETau_MSSM[0]="eleTau_nobtag_postfit_7TeV_LIN";
  ETau_MSSM[1]="eleTau_nobtag_postfit_8TeV_LIN";
  ETau_MSSM[2]="eleTau_btag_postfit_7TeV_LIN";
  ETau_MSSM[3]="eleTau_btag_postfit_8TeV_LIN";

  TString MuMu_MSSM[NMAXINPUT];
  MuMu_MSSM[0]="mumu_nobtag_postfit_7TeV_LIN";
  MuMu_MSSM[1]="mumu_nobtag_postfit_8TeV_LIN";
  MuMu_MSSM[2]="mumu_btag_postfit_7TeV_LIN";
  MuMu_MSSM[3]="mumu_btag_postfit_8TeV_LIN";

  TString MuTau_MSSM[NMAXINPUT];
  MuTau_MSSM[0]="muTau_nobtag_postfit_7TeV_LIN";
  MuTau_MSSM[1]="muTau_nobtag_postfit_8TeV_LIN";
  MuTau_MSSM[2]="muTau_btag_postfit_7TeV_LIN";
  MuTau_MSSM[3]="muTau_btag_postfit_8TeV_LIN";

  TString TauTau_MSSM[NMAXINPUT];
  TauTau_MSSM[0]="tauTau_nobtag_postfit_7TeV_LIN";
  TauTau_MSSM[1]="tauTau_nobtag_postfit_8TeV_LIN";
  TauTau_MSSM[2]="tauTau_btag_postfit_7TeV_LIN";
  TauTau_MSSM[3]="tauTau_btag_postfit_8TeV_LIN";
  

  TString dataset="CMS Preliminary,  H#rightarrow#tau#tau,  4.9 fb^{-1} at 7 TeV, 19.8 fb^{-1} at 8 TeV";

  //  sobCombine("All_SM", All_SM, dataset, "ee, e#mu, e#tau_{h}, #mu#mu, #mu#tau_{h}, #tau_{h}#tau_{h}" , "", 1, muValue);
  //sobCombine("EMETMTTT_1JET_VBF_SM", All_SM, dataset, "e#mu, e#tau_{h}, #mu#tau_{h}, #tau_{h}#tau_{h}" , "", 1, muValue); //no ee, mm, 0jet here - some fixes needed
  //  sobCombine("EE_SM", All_SM, dataset, "ee" , "", 1, muValue);
  //  sobCombine("EMu_SM", All_SM, dataset, "e#mu" , "", 1, muValue);
  //  sobCombine("ETau_SM", All_SM, dataset, "e#tau_{h}" , "", 1, muValue);
  //  sobCombine("MuMu_SM", All_SM, dataset, " #mu#mu" , "", 1, muValue);
  //  sobCombine("MuTau_SM", All_SM, dataset, "#mu#tau_{h}" , "", 1, muValue);
  //  sobCombine("TauTau_SM", All_SM, dataset, "#tau_{h}#tau_{h}" , "", 1, muValue);

  //sobCombine("All_MSSM", All_MSSM, dataset, "#scale[1]e#mu_{h}, #scale[1]e#tau_{h}, #scale[1]{#mu}#mu_{h}, #scale[1]{#mu}#tau_{h}, #tau_{h}#tau_{h}" , "", 1, muValue, log, mass, tanb);
  sobCombine("All_MSSM", All_MSSM, dataset, "e#mu_{h}, e#tau_{h}, #mu#tau_{h}, #tau_{h}#tau_{h}" , "", 1, muValue, log, mass, tanb); 
  // sobCombine("EMu_MSSM", EMu_MSSM, dataset, "e#mu_{h}" , "", 1, muValue, log, mass, tanb);
  // sobCombine("ETau_MSSM", ETau_MSSM, dataset, "e#tau_{h}" , "", 1, muValue, log, mass, tanb);
  // sobCombine("MuMu_MSSM", MuMu_MSSM, dataset, "#mu#mu" , "", 1, muValue, log, mass, tanb);
  // sobCombine("MuTau_MSSM", MuTau_MSSM, dataset, "#mu#tau_{h}" , "", 1, muValue, log, mass, tanb);
  // sobCombine("TauTau_MSSM", TauTau_MSSM, dataset, "#tau_{h}#tau_{h}" , "", 1, muValue, log, mass, tanb);

  gROOT->ProcessLine(".q");
}