Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
l1_ancilary.C
Go to the documentation of this file.
1 // hnamepath: /L1/fcal_en7
2 // hnamepath: /L1/st_hit7
3 // hnamepath: /L1/bcal_en3
4 // hnamepath: /L1/fcal_en2
5 // hnamepath: /L1/tagh_occup2
6 // hnamepath: /L1/st_hit2
7 
8 {
9 
10  // gROOT->Reset();
11  // gROOT->SetStyle("Plain");
12  // gROOT->ForceStyle();
13 
14 
15  gStyle->SetLineWidth(1);
16  gStyle->SetTextSize(1.5);
17 
18  gStyle->SetTitleFont(132,"xy");
19  gStyle->SetLabelFont(62,"xy");
20 
21 
22  gStyle->SetOptStat( 0);
23  gStyle->SetOptStat(110);
24  gStyle->SetStatX(0.99);
25  gStyle->SetStatY(0.99);
26  gStyle->SetStatW(0.25);
27 
28  gStyle->SetTitleSize(0.08,"h");
29 
30  TDirectory *dir = (TDirectory*)gDirectory->FindObjectAny("L1");
31  if(dir) dir->cd();
32 
33  TH1I *fcal_en7 = (TH1I*)gDirectory->FindObjectAny("fcal_en7");
34  TH1I *st_hit7 = (TH1I*)gDirectory->FindObjectAny("st_hit7");
35 
36  TH1I *bcal_en3 = (TH1I*)gDirectory->FindObjectAny("bcal_en3");
37  TH1I *fcal_en2 = (TH1I*)gDirectory->FindObjectAny("fcal_en2");
38 
39  TH1I *tagh_occup2 = (TH1I*)gDirectory->FindObjectAny("tagh_occup2");
40  TH1I *st_hit2 = (TH1I*)gDirectory->FindObjectAny("st_hit2");
41 
42 
43  // Just for testing
44  if(gPad == NULL){
45  TCanvas *c1 = new TCanvas("c1");
46  c1->cd(0);
47  c1->Draw();
48  c1->Update();
49  }
50 
51 
52  if(!gPad) return;
53 
54 
55  TCanvas *c1 = gPad->GetCanvas();
56 
57  c1->Divide(2, 3);
58 
59  c1->cd(1);
60 
61  gPad->SetBottomMargin(0.14);
62 
63  gPad->SetTicks();
64  gPad->SetGrid();
65  gPad->SetLogy();
66 
67 
68  if(fcal_en7){
69  fcal_en7->SetTitle("TRIG BIT 7");
70 
71  fcal_en7->GetXaxis()->SetRangeUser(0,5000.);
72  fcal_en7->GetXaxis()->SetTitle("E (FCAL) (count)");
73 
74  fcal_en7->SetLabelSize(0.06,"xy");
75  fcal_en7->SetTitleSize(0.07,"xy");
76  fcal_en7->SetTitleOffset(1.0,"x");
77 
78  fcal_en7->Draw();
79 
80  }
81 
82 
83  c1->cd(2);
84 
85  gPad->SetBottomMargin(0.14);
86 
87  gPad->SetTicks();
88  gPad->SetGrid();
89  // gPad->SetLogy();
90 
91 
92  if(st_hit7){
93  st_hit7->SetTitle("TRIG BIT 7");
94  st_hit7->GetXaxis()->SetRangeUser(0,15);
95  st_hit7->GetXaxis()->SetTitle("ST hits ");
96 
97  st_hit7->SetLabelSize(0.06,"xy");
98  st_hit7->SetTitleSize(0.07,"xy");
99  st_hit7->SetTitleOffset(1.0,"x");
100 
101  st_hit7->Draw();
102 
103  }
104 
105 
106  c1->cd(3);
107 
108  gPad->SetBottomMargin(0.14);
109 
110  gPad->SetTicks();
111  gPad->SetGrid();
112  gPad->SetLogy();
113 
114 
115  if(bcal_en3){
116 
117  bcal_en3->SetTitle("TRIG BIT 3");
118  bcal_en3->GetXaxis()->SetRangeUser(0,45000.);
119  bcal_en3->GetXaxis()->SetTitle("E (BCAL) (count)");
120 
121  bcal_en3->SetLabelSize(0.06,"xy");
122  bcal_en3->SetTitleSize(0.07,"xy");
123  bcal_en3->SetTitleOffset(1.0,"x");
124 
125  bcal_en3->Draw();
126 
127  }
128 
129 
130  c1->cd(4);
131 
132  gPad->SetBottomMargin(0.14);
133 
134  gPad->SetTicks();
135  gPad->SetGrid();
136  // gPad->SetLogy();
137 
138 
139  if(fcal_en2){
140 
141  fcal_en2->SetTitle("TRIG BIT 2 (FCAL)");
142  fcal_en2->GetXaxis()->SetRangeUser(0,5000.);
143  fcal_en2->GetXaxis()->SetTitle("E (FCAL) (count)");
144 
145  fcal_en2->SetLabelSize(0.06,"xy");
146  fcal_en2->SetTitleSize(0.07,"xy");
147  fcal_en2->SetTitleOffset(1.0,"x");
148 
149  fcal_en2->Draw();
150 
151  }
152 
153 
154  c1->cd(5);
155 
156  gPad->SetBottomMargin(0.14);
157 
158  gPad->SetTicks();
159  gPad->SetGrid();
160  // gPad->SetLogy();
161 
162 
163  if(tagh_occup2){
164 
165  tagh_occup2->SetTitle("TRIG BIT 2 (TAGH & ST)");
166  tagh_occup2->GetXaxis()->SetRangeUser(0,200.);
167  tagh_occup2->GetXaxis()->SetTitle("TAGH counter");
168 
169  tagh_occup2->SetLabelSize(0.06,"xy");
170  tagh_occup2->SetTitleSize(0.07,"xy");
171  tagh_occup2->SetTitleOffset(1.0,"x");
172 
173  tagh_occup2->Draw();
174 
175  }
176 
177 
178  c1->cd(6);
179 
180  gPad->SetBottomMargin(0.14);
181 
182  gPad->SetTicks();
183  gPad->SetGrid();
184  // gPad->SetLogy();
185 
186 
187  if(st_hit2){
188 
189  st_hit2->SetTitle("TRIG BIT 2 (TAGH & ST)");
190  st_hit2->GetXaxis()->SetRangeUser(0,15.);
191  st_hit2->GetXaxis()->SetTitle("ST hits");
192 
193  st_hit2->SetLabelSize(0.06,"xy");
194  st_hit2->SetTitleSize(0.07,"xy");
195  st_hit2->SetTitleOffset(1.0,"x");
196 
197  st_hit2->Draw();
198 
199  }
200 
201 }
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
TDirectory * dir
Definition: bcal_hist_eff.C:31