-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotErrSummary.C
63 lines (55 loc) · 1.61 KB
/
plotErrSummary.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//File: allErrSummaries.C
//Info: Quick macro to make initial pmu sideband/signal region plots.
//Author: David Last [email protected]/[email protected]
//C++ includes
#include <iostream>
#include <iomanip>
#include <stdlib.h>
#include <string>
#include <sstream>
#include <fstream>
#include <vector>
#include <numeric>
#include <algorithm>
#include <unordered_map>
#include <bitset>
#include <time.h>
#include <sys/stat.h>
//ROOT includes
#include "TInterpreter.h"
#include "TROOT.h"
#include "TH1F.h"
#include "TH2F.h"
#include "THStack.h"
#include "TFile.h"
#include "TTree.h"
#include "TKey.h"
#include "TDirectory.h"
#include "TSystemDirectory.h"
#include "TCanvas.h"
#include "TStyle.h"
#include "TString.h"
#include "TLorentzVector.h"
#include "TVector3.h"
#include "TLegend.h"
#include "TMath.h"
#include "TColor.h"
//PlotUtils includes??? Trying anything at this point...
#include "PlotUtils/MnvH1D.h"
#include "PlotUtils/MnvPlotter.h"
using namespace std;
using namespace PlotUtils;
void plotErrSummary(MnvH1D& hist, TString name)
{
TCanvas can("c1","c1",1200,1200);
hist.GetCVHistoWithError().Clone()->Draw();
can.Print((TString)hist.GetName() + "_" + name + ".png");
//Uncertainty summary
PlotUtils::MnvPlotter plotter;
plotter.ApplyStyle(PlotUtils::kCCQEAntiNuStyle);
plotter.axis_maximum = 0.4;
plotter.DrawErrorSummary(&hist,"TR",true,true,1e-5,false,"Cross Section Models");
can.Print((TString)hist.GetName() + "_" + name + "_uncertaintySummary.png");
plotter.DrawErrorSummary(&hist, "TR", true, true, 1e-5, false, "Other");
can.Print((TString)hist.GetName() + "_" + name + "_otherUncertainties.png");
}