Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TAGM_clusters_E.C
Go to the documentation of this file.
1 // This macro will plot the difference between before and after merging
2 // for the occupancy and energy plots
3 
4 #include <TH1.h>
5 #include <TCanvas.h>
6 #include <TFile.h>
7 #include <TPaveText.h>
8 #include <TPaveLabel.h>
9 
10 #include <sstream>
11 #include <iostream>
12 
13 TFile *f;
14 TH1I *hEb;
15 TH1I *hEa;
16 
17 void TAGM_clusters_E(char const *inputFile) {
18 
19  TCanvas *c1;
20  c1 = new TCanvas("c1","c1",600,500);
21  gStyle->SetOptStat(0);
22 
23  f = new TFile(inputFile);
24 
25  hEb = (TH1I*)f->Get("Before/E_b")->Clone();
26  hEa = (TH1I*)f->Get("After/E_a")->Clone();
27 
28  hEb->SetTitle("Energy occupancy before - after");
29  hEb->GetXaxis()->SetTitle("Energy (GeV)");
30 
31  hEb->Add(hEa,-1);
32  hEb->Draw();
33 
34 }
TH1I * hEb
void TAGM_clusters_E(char const *inputFile)
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
TF1 * f
Definition: FitGains.C:21
TH1I * hEa