1 |
#include "TFile.h"
|
2 |
#include "TTree.h"
|
3 |
#include "TCanvas.h"
|
4 |
#include "TH1F.h"
|
5 |
|
6 |
void loadHist( const char* filename, const char* directory = 0, const char* pfx = 0, const char* pat = "*", Bool_t doAdd = kFALSE );
|
7 |
|
8 |
void makePlots ( ) {
|
9 |
|
10 |
TFile* outfile = new TFile("plots.root");
|
11 |
|
12 |
TCanvas* c1 = new TCanvas();
|
13 |
TCanvas* c2 = new TCanvas();
|
14 |
TCanvas* c3 = new TCanvas();
|
15 |
TCanvas* c4 = new TCanvas();
|
16 |
TCanvas* c5 = new TCanvas();
|
17 |
|
18 |
for( unsigned int i = 0; i < 11; i++ ) {
|
19 |
|
20 |
float etaCut = 2.0 + 0.1 * i;
|
21 |
|
22 |
loadHist( Form("histos%.1f.root", etaCut), 0, 0, "*", kTRUE );
|
23 |
|
24 |
if( etaCut < 2.05 ) {
|
25 |
|
26 |
TH1F* DYmm_htcmet = (TH1F*)gDirectory->Get("DYmm_htcmet");
|
27 |
|
28 |
if( DYmm_htcmet == 0 ) return;
|
29 |
|
30 |
TH1F* TTbar_hdmet = (TH1F*)gDirectory->Get("TTbar_hdcmet");
|
31 |
|
32 |
if( TTbar_htcmet == 0 ) return;
|
33 |
|
34 |
TH1F* TTbar_hdmetPhi = (TH1F*)gDirectory->Get("TTbar_hdcmetPhi");
|
35 |
|
36 |
if( TTbar_htcmetPhi == 0 ) return;
|
37 |
|
38 |
TH1F* TTbar_hmetResponse = (TH1F*)gDirectory->Get("TTbar_hmetResponse");
|
39 |
|
40 |
if( TTbar_hmetResponse == 0 ) return;
|
41 |
|
42 |
TH1F* QCDpt30_htcmet = (TH1F*)gDirectory->Get("QCDpt30_htcmet");
|
43 |
|
44 |
if( QCDpt30_htcmet == 0 ) return;
|
45 |
|
46 |
c1->cd();
|
47 |
|
48 |
DYmm_htcmet->SetLineColor(
|
49 |
|
50 |
}
|
51 |
|
52 |
TH1F* DYmm_htcmetNew = (TH1F*)gDirectory->Get("DYmm_htcmetNew");
|
53 |
|
54 |
if( DYmm_htcmetNew == 0 ) return;
|
55 |
|
56 |
TH1F* TTbar_hdmetNew = (TH1F*)gDirectory->Get("TTbar_hdcmetNew");
|
57 |
|
58 |
if( TTbar_htcmetNew == 0 ) return;
|
59 |
|
60 |
TH1F* TTbar_hdmetPhiNew = (TH1F*)gDirectory->Get("TTbar_hdcmetPhiNew");
|
61 |
|
62 |
if( TTbar_htcmetPhiNew == 0 ) return;
|
63 |
|
64 |
TH1F* TTbar_hmetResponseNew = (TH1F*)gDirectory->Get("TTbar_hmetResponseNew");
|
65 |
|
66 |
if( TTbar_hmetResponseNew == 0 ) return;
|
67 |
|
68 |
TH1F* QCDpt30_htcmetNew = (TH1F*)gDirectory->Get("QCDpt30_htcmetNew");
|
69 |
|
70 |
if( QCDpt30_htcmetNew == 0 ) return;
|
71 |
|
72 |
|
73 |
|
74 |
}
|
75 |
}
|