#include "TFile.h"
#include "TTree.h"
#include "TH1.h"
#include <iostream>

using std::cout;

double effex2(TFile& file0){
        
  TH1F* heffbgch = dynamic_cast<TH1F*>(file0.Get("heffbgch"));	
  double efficiency;
  efficiency = 1 - heffbgch->GetBinContent(1) / heffbgch->GetEntries();
  return efficiency;
	
}
