ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/Development/Plotting/Modules/GeneralToolBox.C
(Generate patch)

Comparing UserCode/cbrown/Development/Plotting/Modules/GeneralToolBox.C (file contents):
Revision 1.44 by buchmann, Tue May 21 11:50:31 2013 UTC vs.
Revision 1.45 by buchmann, Thu Jun 13 16:04:18 2013 UTC

# Line 344 | Line 344 | void extract_cbaf_dir(string curpath) {
344    if(position<0) position=curpath.find("/DistributedModelCalculations");
345    if(position<0) position=curpath.find("/various_assignments");
346    if(position<0) position=curpath.find("/exchange");
347 +  if(position<0) position=curpath.find("/iJZB");
348    PlottingSetup::cbafbasedir=curpath.substr(0,position);
349   }
350  
# Line 1608 | Line 1609 | void save_with_ratio_and_sys_band(float
1609    bottompad->cd();
1610    bottompad->Range(0,0,1,1);
1611    bottompad->SetFillColor(kWhite);
1612 +  
1613    TH1F *ratio = (TH1F*)nominator->Clone(GetNumericHistoName().c_str());
1614    ratio->Divide(denominator);
1615 +  for(int i=1;i<=ratio->GetNbinsX();i++) {
1616 +    if(denominator->GetBinContent(i)==0) {
1617 +      ratio->SetBinContent(i,-1);
1618 +    }
1619 +  }
1620  
1621  
1615  TGraphAsymmErrors *eratio;
1622    TGraphAsymmErrors *SysEnvelope = new TGraphAsymmErrors();
1623    
1624    if(syshisto && !do_bpred_ratio) {
# Line 1644 | Line 1650 | void save_with_ratio_and_sys_band(float
1650    ratio->SetFillColor(TColor::GetColor("#58D3F7"));
1651    ratio->Draw("e0");
1652    
1653 <  if(syshisto!=0) {
1654 <    SysEnvelope->SetFillColor(TColor::GetColor("#FE9A2E"));
1655 <    SysEnvelope->Draw("2,0,same");
1656 <    ratio->Draw("e0,same");
1651 <  } else {
1652 <    eratio->Draw("0");
1653 <  }
1653 >  SysEnvelope->SetFillColor(TColor::GetColor("#FE9A2E"));
1654 >  SysEnvelope->Draw("2,0,same");
1655 >  ratio->Draw("e0,same");
1656 >  
1657    ratio->Draw("same,axis");
1658    TLine *oneline = new TLine(ratio->GetXaxis()->GetBinLowEdge(1),1,ratio->GetXaxis()->GetBinLowEdge(ratio->GetNbinsX())+ratio->GetXaxis()->GetBinWidth(ratio->GetNbinsX()),1);
1659    oneline->SetLineStyle(2);
# Line 1866 | Line 1869 | void process_directory(TString directory
1869   void ClearHisto(TH1* histo) {
1870      for(int ix=0;ix<=histo->GetNbinsX()+1;ix++) {//also reset over- and underflow
1871          histo->SetBinContent(ix,0);
1872 <        histo->SetBinContent(ix,0);
1872 >        histo->SetBinError(ix,0);
1873      }
1874   }
1875  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines