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.16 by fronga, Thu Aug 23 15:53:06 2012 UTC vs.
Revision 1.31 by buchmann, Mon Jan 21 11:39:02 2013 UTC

# Line 40 | Line 40
40   #include <TRandom.h>
41   #include <TGraphErrors.h>
42   #include <TROOT.h>
43 + #include <TPolyLine.h>
44 +
45   #ifndef Verbosity
46   #define Verbosity 0
47   #endif
# Line 62 | Line 64 | namespace PlottingSetup {
64      int PaperMode=0; // PaperMode=true will suppress "Preliminary" in DrawPrelim()
65      int Approved=0; // Approved=true will only plot approved plots
66      bool is2012=true;
67 <    bool is53reco=false;
67 >    bool is53reco=true;
68 >    bool openBox = true;
69 >    vector<TH1F*> FakeHistoHeap;
70 >
71   }
72  
73   bool dopng=false;
# Line 256 | Line 261 | void ensure_directory_exists(string this
261    }
262   }
263  
264 + void DeleteStack(THStack mcstack) {
265 +  TH1F* h;
266 +  TIter nextHist(mcstack.GetHists());
267 +  while ( h = (TH1F*)nextHist() ) {
268 +    h->Delete();
269 +  }
270 +  delete h;
271 + }
272 +
273 +
274   void DeadEnd(string message) {
275    dout << endl;
276    dout << "\033[1;31m     _                _                  _  " << endl;
# Line 424 | Line 439 | void CompleteSave(TVirtualPad *can, stri
439  
440  
441   void setlumi(float l) {
442 < generaltoolboxlumi=l;
442 >  generaltoolboxlumi=l;
443   }
444  
445   int write_first_line(vector<vector<string> > &entries) {
# Line 582 | Line 597 | void DrawPrelim(float writelumi=generalt
597    string prel=" Preliminary";
598    if(PlottingSetup::PaperMode) prel="";
599    //prelimtext << "CMS Preliminary 2011 , #sqrt{s}= 7 TeV, L= O(1) fb^{-1}"; //temporary replacement
600 +  if(PlottingSetup::is53reco) prel += " 53X";
601    string energy="7 TeV";
602    if(PlottingSetup::is2012) energy="8 TeV";
603    if(writelumi == 0) {
# Line 944 | Line 960 | string interpret_cut(string incut, bool
960    
961      if(incut=="id1==0") return "ee";
962      if(incut=="id1==1") return "#mu#mu";
963 <    if(incut=="abs(mll-91.2)<20") return "|m_{l^{+}l^{-}}-m_{Z}|<20";
963 >    if(incut=="abs(mll-91)<10") return "|m_{l^{+}l^{-}}-m_{Z}|<10";
964      if(incut=="pfJetGoodID[0]") return "";
965      if(incut=="pfJetGoodID[1]") return "";
966      if((int)incut.find("pfJetGoodNum")>-1) {
# Line 1313 | Line 1329 | Double_t MarcosChi2TestX(const TH1* h1,
1329     return prob;
1330   }
1331  
1316 /*void save_with_difference(TH1F *obs, vector<TH1F*> predictions, vector<float> prediction_weights, vector<float> prediction_uncerts, TVirtualPad *canvas, string savemeas) {
1317  if(predictions.size()<1) {
1318    write_warning(__FUNCTION__,"Cannot make a pred-obs prediction plot because the prediction vector is empty. aborting!");
1319    return;
1320  }
1321  TH1F *comppred = predictions[0]->Clone("comppred");
1322  comppred->Scale(prediction_weights[0]);
1323  for(int i=1;i<predictions.size();i++) comppred->Add(predictions[i],prediction_weights[i]);
1324  
1325  TH1F *statpred = (TH1F*)comppred->Clone("statpred");
1326  for(int i=1;i<=statpred->GetNbinsX();i++) statpred->SetBinContent(0);
1327  
1328  TH1F *syspred = predictions[0];
1329  for(int i=1;i<=syspred->GetNbinsX();i++) syspred->SetBinContent(i,prediction_weights[0]*prediction_weights[0]*prediction_uncerts[0]*prediction_uncerts[0]*syspred->GetBinContent(i)*syspred->GetBinContent(i));
1330  for(int i=1;i<predictions.size();i++) {
1331    for(int ibin=1;ibin<=predictions[i]->GetNbinsX();ibin++) {
1332      float newentry=syspred->GetBinContent(ibin);
1333      newentry+=(predictions[i]->GetBinContent(ibin))*(predictions[i]->GetBinContent(ibin))*prediction_weights[i]*prediction_weights[i]*prediction_uncerts[i]*prediction_uncerts[i];
1334      syspred->SetBinContent(ibin,newentry);
1335    }
1336  }
1337  for(int ibin=1;ibin<=syspred->GetNbinsX();ibin++) {
1338    syspred->SetBinError(ibin,syspred->GetBinContent(i)+statpred->GetBinError());
1339    syspred->SetBinContent(ibin,0);
1340  }
1341  
1342  
1343 }
1344 */
1332   void save_with_ratio(TH1F *nominator, TH1F *denominator, TVirtualPad *canvas, string savemeas, bool do_bpred_ratio=false, bool extendrange=false, string yaxistitle="ratio",TH1F *syshisto=NULL) {
1333    //this function saves the pad being passed as well as a new one including the ratio.
1334    CompleteSave(canvas,savemeas);
1335 <
1335 >  
1336    float bottommargin=gStyle->GetPadBottomMargin();
1337    float canvas_height=gStyle->GetCanvasDefH();
1338    float canvas_width=gStyle->GetCanvasDefW();
# Line 1392 | Line 1379 | void save_with_ratio(TH1F *nominator, TH
1379    TH1F *ratio = (TH1F*)nominator->Clone(GetNumericHistoName().c_str());
1380    ratio->Divide(denominator);
1381  
1395
1382    TGraphAsymmErrors *eratio;
1383    TH1F *SystDown;
1384    TH1F *SystUp;
# Line 1418 | Line 1404 | void save_with_ratio(TH1F *nominator, TH
1404       }
1405      
1406    }
1421  eratio->SetFillColor(TColor::GetColor("#00ADE1"));
1407    
1408 +  if(syshisto && !do_bpred_ratio) {
1409 +       SystDown = (TH1F*)syshisto->Clone("SystDown");
1410 +       SystUp = (TH1F*)syshisto->Clone("SystUp");
1411 +       for(int i=1;i<=syshisto->GetNbinsX();i++) {
1412 +         SystDown->SetBinContent(i,1-syshisto->GetBinContent(i));
1413 +         SystUp->SetBinContent(i,1+syshisto->GetBinContent(i));
1414 +       }
1415 +       SystDown->SetLineColor(TColor::GetColor("#006DE1"));
1416 +       SystUp->SetLineColor(TColor::GetColor("#006DE1"));
1417 +  }
1418 +  eratio->SetFillColor(TColor::GetColor("#00ADE1"));
1419  
1420    ratio->SetTitle("");
1421 <  ratio->GetYaxis()->SetRangeUser(0.5,1.5);
1421 >  ratio->GetYaxis()->SetRangeUser(0.0,2.0);
1422    if(do_bpred_ratio) ratio->GetYaxis()->SetRangeUser(0.0,2.0);
1423    if(extendrange) ratio->GetYaxis()->SetRangeUser(0.0,4.0);
1424    ratio->GetXaxis()->SetTitle(nominator->GetXaxis()->GetTitle());
# Line 1439 | Line 1435 | void save_with_ratio(TH1F *nominator, TH
1435    ratio->SetFillColor(TColor::GetColor("#58D3F7"));
1436    ratio->SetMarkerSize(0);
1437    ratio->Draw("e2");
1438 +  
1439 +  TGraphAsymmErrors *ratio_center = (TGraphAsymmErrors*)eratio->Clone("ratio_center");
1440 +  for(int i=0;i<ratio_center->GetN();i++) {
1441 +    ratio_center->SetPointError(i,ratio_center->GetErrorXlow(i),ratio_center->GetErrorXhigh(i),0.005,0.005);
1442 +  }
1443 +  
1444 +  ratio_center->SetFillColor(TColor::GetColor("#006381"));
1445 +  
1446    if(syshisto!=0) {
1447   //    sysratio->Draw("2");
1448   //    eratio->Draw("2,same");
# Line 1448 | Line 1452 | void save_with_ratio(TH1F *nominator, TH
1452    } else {
1453      eratio->Draw("2");
1454    }
1455 +  ratio_center->Draw("2");
1456    ratio->Draw("same,axis");
1457    TLine *oneline = new TLine(ratio->GetXaxis()->GetBinLowEdge(1),1,ratio->GetXaxis()->GetBinLowEdge(ratio->GetNbinsX())+ratio->GetXaxis()->GetBinWidth(ratio->GetNbinsX()),1);
1458    oneline->SetLineStyle(2);
# Line 1494 | Line 1499 | void save_with_ratio(TH1F *nominator, TH
1499   //  Chi2text << "KS = " << KS << endl;
1500   //cout << "Found : " << KStext.str() << endl;
1501  
1502 <
1502 >  delete eratio;
1503 >  delete ratio_center;
1504 >  delete ratio;
1505    delete main_canvas;
1506   }
1507  
1508 + void save_with_ratio_and_sys_band(TH1F *nominator, TH1F *denominator, TVirtualPad *canvas, string savemeas, bool do_bpred_ratio=false, bool extendrange=false, string yaxistitle="ratio",TH1F *syshisto=NULL) {
1509 +  //this function saves the pad being passed as well as a new one including the SysRatio.
1510 +  CompleteSave(canvas,savemeas);
1511 +
1512 +  float bottommargin=gStyle->GetPadBottomMargin();
1513 +  float canvas_height=gStyle->GetCanvasDefH();
1514 +  float canvas_width=gStyle->GetCanvasDefW();
1515 +  float ratiospace=0.25;// space the ratio should take up (relative to original pad)
1516 +  
1517 +  float ratiobottommargin=0.3;
1518 +  float ratiotopmargin=0.1;
1519 +  
1520 +  float xstretchfactor=((1-ratiospace)*(1-gStyle->GetPadTopMargin()))/((1)*ratiospace);
1521 +  
1522 +  TCanvas *main_canvas = new TCanvas("main_canvas","main_canvas",(Int_t)canvas_width,(Int_t)(canvas_height*(1+ratiospace)));
1523 +  TPad *mainpad = new TPad("mainpad","mainpad",0,1-(1.0/(1+ratiospace)),1,1);//top (main) pad
1524 +  TPad *coverpad = new TPad("coverpad","coverpad",gStyle->GetPadLeftMargin()-0.008,1-(1.0/(1+ratiospace))-0.04,1,1-(1.0/(1+ratiospace))+0.103);//pad covering up the x scale
1525 +  TPad *bottompad = new TPad("bottompad", "Ratio Pad",0,0,1,(1-(1-bottommargin)/(1+ratiospace))-0.015); //bottom pad
1526 +  
1527 +  main_canvas->Range(0,0,1,1);
1528 +  main_canvas->SetBorderSize(0);
1529 +  main_canvas->SetFrameFillColor(0);
1530 +  
1531 +  mainpad->Draw();
1532 +  mainpad->cd();
1533 +  mainpad->Range(0,0,1,1);
1534 +  mainpad->SetFillColor(kWhite);
1535 +  mainpad->SetBorderSize(0);
1536 +  mainpad->SetFrameFillColor(0);
1537 +  canvas->Range(0,0,1,1);
1538 +  canvas->Draw("same");
1539 +  mainpad->Modified();
1540 +  main_canvas->cd();
1541 +  coverpad->Draw();
1542 +  coverpad->cd();
1543 +  coverpad->Range(0,0,1,1);
1544 +  coverpad->SetFillColor(kWhite);
1545 +  coverpad->SetBorderSize(0);
1546 +  coverpad->SetFrameFillColor(0);
1547 +  coverpad->Modified();
1548 +  main_canvas->cd();
1549 +  bottompad->SetTopMargin(ratiotopmargin);
1550 +  bottompad->SetBottomMargin(ratiobottommargin);
1551 +  bottompad->Draw();
1552 +  bottompad->cd();
1553 +  bottompad->Range(0,0,1,1);
1554 +  bottompad->SetFillColor(kWhite);
1555 +  TH1F *ratio = (TH1F*)nominator->Clone(GetNumericHistoName().c_str());
1556 +  ratio->Divide(denominator);
1557 +
1558 +
1559 +  TGraphAsymmErrors *eratio;
1560 +  TGraphAsymmErrors *SysEnvelope = new TGraphAsymmErrors();
1561 +  
1562 +  if(syshisto && !do_bpred_ratio) {
1563 +       for(int i=1;i<=syshisto->GetNbinsX();i++) {
1564 +         float dx=syshisto->GetBinWidth(i)/2.0;
1565 +         float dy=syshisto->GetBinContent(i);
1566 +         if(dy<0.01) dy=0.07;
1567 +         SysEnvelope->SetPoint(i-1,syshisto->GetBinCenter(i),1.0);
1568 +         SysEnvelope->SetPointError(i-1,dx,dx,dy,dy);
1569 +       }
1570 +       SysEnvelope->SetFillColor(TColor::GetColor("#006DE1"));
1571 +  }
1572  
1573 < TH1F* CollapseStack(THStack stack) {
1573 >  ratio->SetTitle("");
1574 >  ratio->GetYaxis()->SetRangeUser(0.0,2.0);
1575 >  if(do_bpred_ratio) ratio->GetYaxis()->SetRangeUser(0.0,2.0);
1576 >  if(extendrange) ratio->GetYaxis()->SetRangeUser(0.0,4.0);
1577 >  ratio->GetXaxis()->SetTitle(nominator->GetXaxis()->GetTitle());
1578 >  ratio->GetXaxis()->CenterTitle();
1579 >  ratio->GetYaxis()->SetTitle(yaxistitle.c_str());
1580 >  ratio->GetYaxis()->SetTitleOffset(0.4);
1581 >  ratio->GetYaxis()->CenterTitle();
1582 >  ratio->SetStats(0);
1583 >  ratio->GetXaxis()->SetLabelSize(xstretchfactor*ratio->GetXaxis()->GetLabelSize());
1584 >  ratio->GetYaxis()->SetLabelSize(xstretchfactor*ratio->GetYaxis()->GetLabelSize());
1585 >  ratio->GetXaxis()->SetTitleSize(xstretchfactor*gStyle->GetTitleSize());
1586 >  ratio->GetYaxis()->SetTitleSize(xstretchfactor*gStyle->GetTitleSize());
1587 >  ratio->GetYaxis()->SetNdivisions(502,false);
1588 >  ratio->SetFillColor(TColor::GetColor("#58D3F7"));
1589 >  ratio->Draw("e1");
1590 >  
1591 >  if(syshisto!=0) {
1592 >    SysEnvelope->SetFillColor(TColor::GetColor("#FE9A2E"));
1593 >    SysEnvelope->Draw("2,same");
1594 >    ratio->Draw("e1,same");
1595 >  } else {
1596 >    eratio->Draw("1");
1597 >  }
1598 >  ratio->Draw("same,axis");
1599 >  TLine *oneline = new TLine(ratio->GetXaxis()->GetBinLowEdge(1),1,ratio->GetXaxis()->GetBinLowEdge(ratio->GetNbinsX())+ratio->GetXaxis()->GetBinWidth(ratio->GetNbinsX()),1);
1600 >  oneline->SetLineStyle(2);
1601 >  oneline->SetLineColor(kBlue);
1602 >  oneline->Draw("same");
1603 >
1604 >  main_canvas->cd();
1605 >  main_canvas->Modified();
1606 >  main_canvas->cd();
1607 >  main_canvas->SetSelected(main_canvas);
1608 >  
1609 >  CompleteSave(main_canvas,savemeas+"_withSysRatio");
1610 >  bottompad->cd();
1611 >  
1612 >  Double_t chi2;
1613 >  Int_t ndf,igood;
1614 >  Double_t chi2prob = MarcosChi2TestX(nominator,denominator,chi2,ndf,igood,"UW");
1615 >
1616 >  stringstream Chi2text;
1617 >  Chi2text << "#chi^{2} / ndf: " << chi2 << " / " << ndf;
1618 >  stringstream Chi2probtext;
1619 >  Chi2probtext << "#chi^{2} prob: " << chi2prob;
1620 >  TText* chi2box = write_text(0.02,0.11,Chi2text.str());
1621 >  chi2box->SetTextSize(0.08);
1622 >  chi2box->SetTextAlign(11);
1623 >  chi2box->Draw();
1624 >  TText* chi2probbox = write_text(0.02,0.04,Chi2probtext.str());
1625 >  chi2probbox->SetTextSize(0.08);
1626 >  chi2probbox->SetTextAlign(11);
1627 >  chi2probbox->Draw();
1628 >  
1629 >  stringstream CompRatio;
1630 >  CompRatio << "Ratio: " << nominator->Integral() << " / " << denominator->Integral() << " \n " << nominator->Integral()/denominator->Integral();
1631 >  TText *CompleteRatio = write_text(0.98,0.04,CompRatio.str());
1632 >  CompleteRatio->SetTextSize(0.08);
1633 >  CompleteRatio->SetTextAlign(31);
1634 >  CompleteRatio->Draw();
1635 >  
1636 >  CompleteSave(main_canvas,savemeas+"_withSysRatio_and_Chi2");
1637 >  delete main_canvas;
1638 >  delete ratio;
1639 > }
1640 >
1641 > TH1F* CollapseStack(THStack stack,TString hname="CollapsedStack") {
1642     TH1F *bhist = ((TH1F*)((stack.GetHists())->At(0)));
1643 <   TH1F *basehisto = (TH1F*)bhist->Clone("base");
1643 >   TH1F *basehisto = (TH1F*)bhist->Clone(hname);
1644     TIter next(stack.GetHists());
1645     TH1F *h;
1646     int counter=0;
# Line 1514 | Line 1653 | TH1F* CollapseStack(THStack stack) {
1653   }
1654  
1655   void save_with_ratio(TH1F *nominator, THStack denominator, TVirtualPad *canvas, string savemeas, bool do_bpred_ratio=false) {
1656 <  save_with_ratio(nominator, CollapseStack(denominator), canvas, savemeas, do_bpred_ratio);
1656 >  TH1F *denominator_histo = CollapseStack(denominator);
1657 >  save_with_ratio(nominator, denominator_histo, canvas, savemeas, do_bpred_ratio);
1658 >  delete denominator_histo;
1659   }
1660  
1661   void flag_this_change(string function, int line, int checked=0) {
# Line 1699 | Line 1840 | string removefunnystring(string name) {
1840    name=ReplaceCharacter(name,"]","_");
1841    name=ReplaceCharacter(name,"{","_");
1842    name=ReplaceCharacter(name,"}","_");
1843 +  name=ReplaceCharacter(name,"(","_");
1844 +  name=ReplaceCharacter(name,")","_");
1845 +  name=ReplaceCharacter(name," ","_");
1846    name=ReplaceCharacter(name,".","_");
1847    name=ReplaceCharacter(name,",","_");
1848    name=ReplaceCharacter(name,";","_");
# Line 1713 | Line 1857 | string removefunnystring(string name) {
1857    return name;
1858   }
1859  
1860 + TPolyLine* GetFitUncertaintyShape(TF1 *fit, float low, float high,float x0,float x1) {
1861 +  int nPoints=1000;
1862 +  double x[nPoints+1];
1863 +  double y[nPoints];
1864 +  
1865 +  float par1=fit->GetParameter(0);
1866 +  float dpar1=fit->GetParError(0);
1867 +  float par2=fit->GetParameter(1);
1868 +  float dpar2=fit->GetParError(1);
1869 +    
1870 +  float step=(x1-x0)/(nPoints/2.0 -1);
1871 +  for(int i=0;i<nPoints/2.0;i++) {
1872 +    x[i]=x0+i*step;
1873 +    y[i]=(par1+x[i]*par2)    -    sqrt(dpar1*dpar1+dpar2*dpar2*x[i]*x[i]);
1874 +    x[nPoints-1-i]=x[i];
1875 +    y[nPoints-1-i]=(par1+x[i]*par2)    +    sqrt(dpar1*dpar1+dpar2*dpar2*x[i]*x[i]);
1876 +    if(y[i]<low) y[i]=low;
1877 +    if(y[i]>high) y[i]=high;
1878 +    if(y[nPoints-1-i]<low) y[nPoints-1-i]=low;
1879 +    if(y[nPoints-1-i]>high) y[nPoints-1-i]=high;
1880 +  }
1881 +  
1882 +  x[nPoints]=x[0];
1883 +  y[nPoints]=y[0];
1884 +  
1885 +  TPolyLine *l = new TPolyLine(nPoints+1,x,y);
1886 +  l->SetFillColor(TColor::GetColor("#5858FA"));
1887 +  l->SetLineColor(TColor::GetColor("#5858FA"));
1888 +  l->SetLineWidth(1);
1889 +  return l;
1890 + }  
1891 +
1892 + //code for ReplaceAll copied from
1893 + //http://stackoverflow.com/questions/5343190/c-how-do-i-replace-all-instances-of-of-a-string-with-another-string
1894 + string ReplaceAll(string str, string from, string to) {
1895 +    size_t start_pos = 0;
1896 +    while((start_pos = str.find(from, start_pos)) != std::string::npos) {
1897 +         str.replace(start_pos, from.length(), to);
1898 +         start_pos += to.length(); // ...
1899 +    }
1900 +    return str;
1901 + }
1902 +
1903 + TPolyLine* GetFitUncertaintyShape(TH1 *histo, string fitname, float low, float high) {
1904 +  TF1 *fit = (TF1*)histo->GetFunction(fitname.c_str());
1905 +  if(!fit) {
1906 +    cout << "CANNOT PRODUCE FIT UNCERTAINTY AS THERE IS NO FIT CALLED " << fitname << " IN " << histo->GetName() << endl;
1907 +    return NULL;
1908 +  }
1909 +  float x0=histo->GetBinLowEdge(1);
1910 +  float x1=histo->GetBinLowEdge(histo->GetNbinsX())+histo->GetBinWidth(histo->GetNbinsX());
1911 +  return GetFitUncertaintyShape(fit, low, high,x0,x1);
1912 + }
1913 +
1914 + TPolyLine* GetFitUncertaintyShape(TGraphErrors *gr, string fitname, float low, float high, float minx=-999, float maxx=-999) {
1915 +  TF1 *fit = (TF1*)gr->GetFunction(fitname.c_str());
1916 +  if(!fit) {
1917 +    cout << "CANNOT PRODUCE FIT UNCERTAINTY AS THERE IS NO FIT CALLED " << fitname << " IN " << gr->GetName() << endl;
1918 +    return NULL;
1919 +  }
1920 +  double x,y;
1921 +  gr->GetPoint(0,x,y);
1922 +  float min=x;
1923 +  gr->GetPoint(gr->GetN()-1,x,y);
1924 +  float max=x;
1925 +  if(minx>-999 && maxx>-999 && minx<maxx) {
1926 +    max=maxx;
1927 +    min=minx;
1928 +  }
1929 +  return GetFitUncertaintyShape(fit, low, high,min,max);
1930 + }
1931 +
1932   stringstream all_bugs;
1933  
1934   void bug_tracker(string function, int line, string description) {
# Line 1750 | Line 1966 | void bug_tracker(string function, int li
1966   //TODO: Write a bug summary at the end.
1967  
1968   float pSTAR(float mglu, float mlsp, float mchi2) {
1969 <        float mz=91.2;
1969 >        float mz=91.0;
1970          float res=((mchi2*mchi2)-(mlsp+mz)*(mlsp+mz));
1971          res*=((mchi2*mchi2)-(mlsp-mz)*(mlsp-mz));
1972          res=TMath::Sqrt(res)/(2*mchi2);
# Line 1763 | Line 1979 | float generalizedpSTAR(float massmother,
1979          res=TMath::Sqrt(res)/(2*massmother);
1980          return res;
1981   }
1982 +
1983 + void FindMinMax(TGraphErrors *gr, float &min, float &max) {
1984 +  double x,y;
1985 +  gr->GetPoint(0,x,y);
1986 +  min=500*y;
1987 +  max=0.0002*y;
1988 +  for(int i=0;i<gr->GetN();i++) {
1989 +    gr->GetPoint(i,x,y);
1990 +    cout << "Point at " << x << "/" << y << " with error " << gr->GetErrorY(i) << endl;
1991 +    float potmin=y-1.5*gr->GetErrorY(i); // taking 1.5 times the error to allow for enough space to present the plot
1992 +    float potmax=y+1.5*gr->GetErrorY(i); // taking 1.5 times the error to allow for enough space to present the plot
1993 +    if(potmin<min) min=potmin;
1994 +    if(potmax>max) max=potmax;
1995 +  }
1996 + }
1997 +
1998 +
1999 + void CleanLegends() {
2000 +  for(int ihist=(int)PlottingSetup::FakeHistoHeap.size()-1;ihist>=0;ihist--) {
2001 +    PlottingSetup::FakeHistoHeap[ihist]->Delete();
2002 +    PlottingSetup::FakeHistoHeap.pop_back();
2003 +  }
2004 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines