17 |
|
|
18 |
|
PlotUtil::~PlotUtil() {} |
19 |
|
|
20 |
< |
Double_t PlotUtil::ErrorOnIntegral(const TH1F* h, const Int_t lowbin, Int_t highbin) { |
20 |
> |
Double_t PlotUtil::ErrorOnIntegral(const TH1D* h, const Int_t lowbin, Int_t highbin) { |
21 |
|
|
22 |
|
if ( highbin == 0) highbin = h->GetNbinsX(); |
23 |
|
|
67 |
|
|
68 |
|
const TString qcdhist="H"+varname+"_qcd"; |
69 |
|
|
70 |
< |
TH1F* hbase=hh_->find(qcdhist); |
70 |
> |
TH1D* hbase=hh_->find(qcdhist); |
71 |
|
if (hbase==0) { |
72 |
|
cout<<"Could not find the _qcd histogram!"<<endl; |
73 |
|
return; |
77 |
|
TString fullname=getFullName(varname,i->first); |
78 |
|
if ( fullname!= qcdhist && fullname.Contains("_qcd") ) { |
79 |
|
if (debug_) cout<<"Adding to base qcd histo: "<<fullname<<endl; |
80 |
< |
TH1F* htoadd=hh_->find(fullname); |
80 |
> |
TH1D* htoadd=hh_->find(fullname); |
81 |
|
hbase->Add(htoadd); |
82 |
|
} |
83 |
|
} |
106 |
|
const TString qcdhist="H"+varname+"_qcd"; |
107 |
|
|
108 |
|
//find the "tallest" histogram |
109 |
< |
TH1F* firsttodraw=0; |
109 |
> |
TH1D* firsttodraw=0; |
110 |
|
double max=0; |
111 |
|
for ( map<TString,TTree*>::const_iterator i=samples_.begin() ; i!=samples_.end() ; ++i) { |
112 |
|
TString fullname=getFullName(varname,i->first); |
126 |
|
for ( map<TString,TTree*>::const_iterator i=samples_.begin() ; i!=samples_.end() ; ++i) { |
127 |
|
TString fullname=getFullName(varname,i->first); |
128 |
|
if ( (!fullname.Contains("_qcd")) || (fullname ==qcdhist) ) { |
129 |
< |
TH1F* hist= hh_->find(fullname); |
129 |
> |
TH1D* hist= hh_->find(fullname); |
130 |
|
if (hist!= firsttodraw) hist->Draw("SAME"); |
131 |
|
} |
132 |
|
} |