Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TAGM_clusters_occ.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 *h_occ_b;
15 TH1I *h_occ_a;
16 
17 void TAGM_clusters_occ(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  h_occ_b = (TH1I*)f->Get("Before/occupancy_b")->Clone();
26  h_occ_a = (TH1I*)f->Get("After/occupancy_a")->Clone();
27 
28  h_occ_b->SetTitle("Occupancy before - after");
29  h_occ_b->GetXaxis()->SetTitle("Column number");
30 
31  h_occ_b->Add(h_occ_a,-1);
32  h_occ_b->Draw();
33 
34 }
void TAGM_clusters_occ(char const *inputFile)
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
TF1 * f
Definition: FitGains.C:21
TH1I * h_occ_a
TH1I * h_occ_b