ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/joshmt/PlotUtil.cxx
(Generate patch)

Comparing UserCode/joshmt/PlotUtil.cxx (file contents):
Revision 1.2 by joshmt, Fri Apr 23 16:41:12 2010 UTC vs.
Revision 1.3 by joshmt, Wed Aug 25 10:15:27 2010 UTC

# Line 17 | Line 17 | PlotUtil::PlotUtil(HistHolder* hh) :
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  
# Line 67 | Line 67 | void PlotUtil::addQCD(TString varname) {
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;
# Line 77 | Line 77 | void PlotUtil::addQCD(TString varname) {
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    }
# Line 106 | Line 106 | void PlotUtil::drawPlots(TString varname
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);
# Line 126 | Line 126 | void PlotUtil::drawPlots(TString varname
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    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines