10 gStyle->SetPalette(1,0);
11 gStyle->SetOptStat(kTRUE);
12 gStyle->SetOptStat(11111111);
13 gStyle->SetOptFit(kTRUE);
14 gStyle->SetPadRightMargin(0.15);
15 gStyle->SetPadLeftMargin(0.15);
16 gStyle->SetPadBottomMargin(0.15);
26 Double_t g2931[nchan];
27 Double_t g3079[nchan];
28 Double_t g3179[nchan];
29 Double_t g3180[nchan];
30 Double_t g3182[nchan];
31 Double_t g2931_r20_60[nchan];
32 Double_t g3079_r20_60[nchan];
33 Double_t g3179_r20_60[nchan];
34 Double_t g3180_r20_60[nchan];
35 Double_t g3182_r20_60[nchan];
37 Double_t g3079_3182_r20[nchan];
38 Double_t g3079_3182_r20_60[nchan];
39 Double_t g2931_3182_r20[nchan];
40 Double_t g2931_3182_r20_60[nchan];
46 sprintf(
string,
"GainFactorIter1_%4d_r20.root",runnum);
47 printf (
"Histogram input filename=%s\n",
string);
48 TFile *in =
new TFile(
string,
"read");
50 TH1D *h_unordered2931_r20 = (TH1D*)in->Get(
"h_unordered");
51 TH2D *h_yvsx2931_r20 = (TH2D*)in->Get(
"h_yvsx");
53 sprintf(
string,
"GainFactorIter1_%4d_r20-60.root",runnum);
54 printf (
"Histogram input filename=%s\n",
string);
55 TFile *in =
new TFile(
string,
"read");
57 TH1D *h_unordered2931_r20_60 = (TH1D*)in->Get(
"h_unordered");
58 TH2D *h_yvsx2931_r20_60 = (TH2D*)in->Get(
"h_yvsx");
62 sprintf(
string,
"GainFactorIter1_%4d_r20.root",runnum);
63 printf (
"Histogram input filename=%s\n",
string);
64 TFile *in =
new TFile(
string,
"read");
66 TH1D *h_unordered3079_r20 = (TH1D*)in->Get(
"h_unordered");
67 TH2D *h_yvsx3079_r20 = (TH2D*)in->Get(
"h_yvsx");
69 sprintf(
string,
"GainFactorIter1_%4d_r20-60.root",runnum);
70 printf (
"Histogram input filename=%s\n",
string);
71 TFile *in =
new TFile(
string,
"read");
73 TH1D *h_unordered3079_r20_60 = (TH1D*)in->Get(
"h_unordered");
74 TH2D *h_yvsx3079_r20_60 = (TH2D*)in->Get(
"h_yvsx");
78 sprintf(
string,
"GainFactorIter1_%4d_r20.root",runnum);
79 printf (
"Histogram input filename=%s\n",
string);
80 TFile *in =
new TFile(
string,
"read");
82 TH1D *h_unordered3179_r20 = (TH1D*)in->Get(
"h_unordered");
83 TH2D *h_yvsx3179_r20 = (TH2D*)in->Get(
"h_yvsx");
85 sprintf(
string,
"GainFactorIter1_%4d_r20-60.root",runnum);
86 printf (
"Histogram input filename=%s\n",
string);
87 TFile *in =
new TFile(
string,
"read");
89 TH1D *h_unordered3179_r20_60 = (TH1D*)in->Get(
"h_unordered");
90 TH2D *h_yvsx3179_r20_60 = (TH2D*)in->Get(
"h_yvsx");
94 sprintf(
string,
"GainFactorIter1_%4d_r20.root",runnum);
95 printf (
"Histogram input filename=%s\n",
string);
96 TFile *in =
new TFile(
string,
"read");
98 TH1D *h_unordered3180_r20 = (TH1D*)in->Get(
"h_unordered");
99 TH2D *h_yvsx3180_r20 = (TH2D*)in->Get(
"h_yvsx");
101 sprintf(
string,
"GainFactorIter1_%4d_r20-60.root",runnum);
102 printf (
"Histogram input filename=%s\n",
string);
103 TFile *in =
new TFile(
string,
"read");
105 TH1D *h_unordered3180_r20_60 = (TH1D*)in->Get(
"h_unordered");
106 TH2D *h_yvsx3180_r20_60 = (TH2D*)in->Get(
"h_yvsx");
110 sprintf(
string,
"GainFactorIter1_%4d_r20.root",runnum);
111 printf (
"Histogram input filename=%s\n",
string);
112 TFile *in =
new TFile(
string,
"read");
114 TH1D *h_unordered3182_r20 = (TH1D*)in->Get(
"h_unordered");
115 TH2D *h_yvsx3182_r20 = (TH2D*)in->Get(
"h_yvsx");
117 sprintf(
string,
"GainFactorIter1_%4d_r20-60.root",runnum);
118 printf (
"Histogram input filename=%s\n",
string);
119 TFile *in =
new TFile(
string,
"read");
121 TH1D *h_unordered3182_r20_60 = (TH1D*)in->Get(
"h_unordered");
122 TH2D *h_yvsx3182_r20_60 = (TH2D*)in->Get(
"h_yvsx");
126 sprintf(
string,
"GainFactorIter1_3079-3182_r20.root",runnum);
127 printf (
"Histogram input filename=%s\n",
string);
128 TFile *in =
new TFile(
string,
"read");
130 TH1D *h_unordered3079_3182_r20 = (TH1D*)in->Get(
"h_unordered");
131 TH2D *h_yvsx3079_3182_r20 = (TH2D*)in->Get(
"h_yvsx");
133 sprintf(
string,
"GainFactorIter1_3079-3182_r20-60.root",runnum);
134 printf (
"Histogram input filename=%s\n",
string);
135 TFile *in =
new TFile(
string,
"read");
137 TH1D *h_unordered3079_3182_r20_60 = (TH1D*)in->Get(
"h_unordered");
138 TH2D *h_yvsx3079_3182_r20_60 = (TH2D*)in->Get(
"h_yvsx");
142 sprintf(
string,
"GainFactorIter1_2931-3182_r20.root",runnum);
143 printf (
"Histogram input filename=%s\n",
string);
144 TFile *in =
new TFile(
string,
"read");
146 TH1D *h_unordered2931_3182_r20 = (TH1D*)in->Get(
"h_unordered");
147 TH2D *h_yvsx2931_3182_r20 = (TH2D*)in->Get(
"h_yvsx");
149 sprintf(
string,
"GainFactorIter1_2931-3182_r20-60.root",runnum);
150 printf (
"Histogram input filename=%s\n",
string);
151 TFile *in =
new TFile(
string,
"read");
153 TH1D *h_unordered2931_3182_r20_60 = (TH1D*)in->Get(
"h_unordered");
154 TH2D *h_yvsx2931_3182_r20_60 = (TH2D*)in->Get(
"h_yvsx");
158 TH2D *h3079_2931 =
new TH2D (
"h3079_2931",
"Gains R3079 vs R2931",nbins,0,2,nbins,0,2);
159 TH2D *h3179_2931 =
new TH2D (
"h3179_2931",
"Gains R3179 vs R2931",nbins,0,2,nbins,0,2);
160 TH2D *h3180_2931 =
new TH2D (
"h3180_2931",
"Gains R3180 vs R2931",nbins,0,2,nbins,0,2);
161 TH2D *h3182_2931 =
new TH2D (
"h3182_2931",
"Gains R3182 vs R2931",nbins,0,2,nbins,0,2);
163 TH2D *h3079_2931_r20_60 =
new TH2D (
"h3079_2931_r20_60",
"Gains R3079 vs R2931 _r20_60",nbins,0,2,nbins,0,2);
164 TH2D *h3179_2931_r20_60 =
new TH2D (
"h3179_2931_r20_60",
"Gains R3179 vs R2931 _r20_60",nbins,0,2,nbins,0,2);
165 TH2D *h3180_2931_r20_60 =
new TH2D (
"h3180_2931_r20_60",
"Gains R3180 vs R2931 _r20_60",nbins,0,2,nbins,0,2);
166 TH2D *h3182_2931_r20_60 =
new TH2D (
"h3182_2931_r20_60",
"Gains R3182 vs R2931 _r20_60",nbins,0,2,nbins,0,2);
168 TH2D *h3079_3182_2931_r20 =
new TH2D (
"3079_3182_2931_r20",
"Gains R3079-3182 vs R2931 _r20",nbins,0,2,nbins,0,2);
169 TH2D *h3079_3182_2931_r20_60 =
new TH2D (
"3079_3182_2931_r20_60",
"Gains R3079-3182 vs R2931 _r20_60",nbins,0,2,nbins,0,2);
171 TH1D *gRatio_r20 =
new TH1D (
"gRatio",
"Ratio of R3079-3182/R2931 _r20",nbins,0,2);
172 TH1D *gRatio_r20_60 =
new TH1D (
"gRatio",
"Ratio of R3079-3182/R2931 _r20_60",nbins,0,2);
176 outgain.open (
"plot_gain_factors.list");
178 TString
infile =
"GainFactorIter1_2931_r20.txt";
179 cout <<
"Opening file: " << infile.Data() << endl;
180 gainfile.open (infile.Data());
182 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
188 while (line.ReadLine(gainfile)){
190 TObjArray *tokens = line.Tokenize(
" ");
191 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
192 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
193 Int_t channel = s.Atoi();
194 g2931[channel] = gain;
195 outgain <<
" R2931, channel=" << channel <<
" gain=" << gain << endl;
199 TString infile =
"GainFactorIter1_3079_r20.txt";
200 cout <<
"Opening file: " << infile.Data() << endl;
201 gainfile.open (infile.Data());
203 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
208 while (line.ReadLine(gainfile)){
210 TObjArray *tokens = line.Tokenize(
" ");
211 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
212 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
213 Int_t channel = s.Atoi();
214 g3079[channel] = gain;
215 outgain <<
" R3079, channel=" << channel <<
" gain=" << gain << endl;
220 TString infile =
"GainFactorIter1_3179_r20.txt";
221 cout <<
"Opening file: " << infile.Data() << endl;
222 gainfile.open (infile.Data());
224 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
229 while (line.ReadLine(gainfile)){
231 TObjArray *tokens = line.Tokenize(
" ");
232 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
233 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
234 Int_t channel = s.Atoi();
235 g3179[channel] = gain;
236 outgain <<
" R3179, channel=" << channel <<
" gain=" << gain << endl;
241 TString infile =
"GainFactorIter1_3180_r20.txt";
242 cout <<
"Opening file: " << infile.Data() << endl;
243 gainfile.open (infile.Data());
245 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
250 while (line.ReadLine(gainfile)){
252 TObjArray *tokens = line.Tokenize(
" ");
253 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
254 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
255 Int_t channel = s.Atoi();
256 g3180[channel] = gain;
257 outgain <<
" R3180, channel=" << channel <<
" gain=" << gain << endl;
262 TString infile =
"GainFactorIter1_3182_r20.txt";
263 cout <<
"Opening file: " << infile.Data() << endl;
264 gainfile.open (infile.Data());
266 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
271 while (line.ReadLine(gainfile)){
273 TObjArray *tokens = line.Tokenize(
" ");
274 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
275 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
276 Int_t channel = s.Atoi();
277 g3182[channel] = gain;
278 outgain <<
" R3182, channel=" << channel <<
" gain=" << gain << endl;
286 TString infile =
"GainFactorIter1_2931_r20-60.txt";
287 cout <<
"Opening file: " << infile.Data() << endl;
288 gainfile.open (infile.Data());
290 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
295 while (line.ReadLine(gainfile)){
297 TObjArray *tokens = line.Tokenize(
" ");
298 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
299 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
300 Int_t channel = s.Atoi();
301 g2931_r20_60[channel] = gain;
302 outgain <<
" R2931_r20_60, channel=" << channel <<
" gain=" << gain << endl;
306 TString infile =
"GainFactorIter1_3079_r20-60.txt";
307 cout <<
"Opening file: " << infile.Data() << endl;
308 gainfile.open (infile.Data());
310 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
315 while (line.ReadLine(gainfile)){
317 TObjArray *tokens = line.Tokenize(
" ");
318 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
319 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
320 Int_t channel = s.Atoi();
321 g3079_r20_60[channel] = gain;
322 outgain <<
" R3079_r20_60, channel=" << channel <<
" gain=" << gain << endl;
327 TString infile =
"GainFactorIter1_3179_r20-60.txt";
328 cout <<
"Opening file: " << infile.Data() << endl;
329 gainfile.open (infile.Data());
331 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
336 while (line.ReadLine(gainfile)){
338 TObjArray *tokens = line.Tokenize(
" ");
339 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
340 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
341 Int_t channel = s.Atoi();
342 g3179_r20_60[channel] = gain;
343 outgain <<
" R3179_r20_60, channel=" << channel <<
" gain=" << gain << endl;
348 TString infile =
"GainFactorIter1_3180_r20-60.txt";
349 cout <<
"Opening file: " << infile.Data() << endl;
350 gainfile.open (infile.Data());
352 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
357 while (line.ReadLine(gainfile)){
359 TObjArray *tokens = line.Tokenize(
" ");
360 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
361 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
362 Int_t channel = s.Atoi();
363 g3180_r20_60[channel] = gain;
364 outgain <<
" R3180_r20_60, channel=" << channel <<
" gain=" << gain << endl;
369 TString infile =
"GainFactorIter1_3182_r20-60.txt";
370 cout <<
"Opening file: " << infile.Data() << endl;
371 gainfile.open (infile.Data());
373 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
378 while (line.ReadLine(gainfile)){
380 TObjArray *tokens = line.Tokenize(
" ");
381 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
382 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
383 Int_t channel = s.Atoi();
384 g3182_r20_60[channel] = gain;
385 outgain <<
" R3182_r20_60, channel=" << channel <<
" gain=" << gain << endl;
394 TString infile =
"GainFactorIter1_3079-3182_r20-60.txt";
395 cout <<
"Opening file: " << infile.Data() << endl;
396 gainfile.open (infile.Data());
398 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
403 while (line.ReadLine(gainfile)){
405 TObjArray *tokens = line.Tokenize(
" ");
406 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
407 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
408 Int_t channel = s.Atoi();
409 g3079_3182_r20_60[channel] = gain;
410 outgain <<
" R3182_r20_60, channel=" << channel <<
" gain=" << gain << endl;
415 TString infile =
"GainFactorIter1_3079-3182_r20.txt";
416 cout <<
"Opening file: " << infile.Data() << endl;
417 gainfile.open (infile.Data());
419 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
424 while (line.ReadLine(gainfile)){
426 TObjArray *tokens = line.Tokenize(
" ");
427 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
428 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
429 Int_t channel = s.Atoi();
430 g3079_3182_r20[channel] = gain;
431 outgain <<
" R3182_r20_60, channel=" << channel <<
" gain=" << gain << endl;
440 TString infile =
"GainFactorIter1_2931-3182_r20-60.txt";
441 cout <<
"Opening file: " << infile.Data() << endl;
442 gainfile.open (infile.Data());
444 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
449 while (line.ReadLine(gainfile)){
451 TObjArray *tokens = line.Tokenize(
" ");
452 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
453 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
454 Int_t channel = s.Atoi();
455 g2931_3182_r20_60[channel] = gain;
456 outgain <<
" R3182_r20_60, channel=" << channel <<
" gain=" << gain << endl;
461 TString infile =
"GainFactorIter1_2931-3182_r20.txt";
462 cout <<
"Opening file: " << infile.Data() << endl;
463 gainfile.open (infile.Data());
465 cout <<
"ERROR: Failed to open data file= " << infile.Data() << endl;
470 while (line.ReadLine(gainfile)){
472 TObjArray *tokens = line.Tokenize(
" ");
473 Float_t gain = (((TObjString*)tokens->At(0))->GetString()).Atof();
474 TString s = ((TObjString*)tokens->At(1))->GetString().Remove(0,8);
475 Int_t channel = s.Atoi();
476 g2931_3182_r20[channel] = gain;
477 outgain <<
" R3182_r20_60, channel=" << channel <<
" gain=" << gain << endl;
486 for (Int_t jj=0;jj<nchan;jj++) {
487 if (g2931[jj]!=1 || g3079[jj]!=1) h3079_2931->Fill(g2931[jj],g3079[jj]);
488 if (g2931[jj]!=1 || g3179[jj]!=1) h3179_2931->Fill(g2931[jj],g3179[jj]);
489 if (g2931[jj]!=1 || g3180[jj]!=1) h3180_2931->Fill(g2931[jj],g3180[jj]);
490 if (g2931[jj]!=1 || g3182[jj]!=1) h3182_2931->Fill(g2931[jj],g3182[jj]);
494 if (g2931_r20_60[jj]!=1 || g3079_r20_60[jj]!=1) h3079_2931_r20_60->Fill(g2931_r20_60[jj],g3079_r20_60[jj]);
495 if (g2931_r20_60[jj]!=1 || g3179_r20_60[jj]!=1) h3179_2931_r20_60->Fill(g2931_r20_60[jj],g3179_r20_60[jj]);
496 if (g2931_r20_60[jj]!=1 || g3180_r20_60[jj]!=1) h3180_2931_r20_60->Fill(g2931_r20_60[jj],g3180_r20_60[jj]);
497 if (g2931_r20_60[jj]!=1 || g3182_r20_60[jj]!=1) h3182_2931_r20_60->Fill(g2931_r20_60[jj],g3182_r20_60[jj]);
499 if (g2931[jj]!=1 || g3079_3182_r20[jj]!=1) h3079_3182_2931_r20->Fill(g2931[jj],g3079_3182_r20[jj]);
500 if (g2931_r20_60[jj]!=1 || g3079_3182_r20_60[jj]!=1) h3079_3182_2931_r20_60->Fill(g2931_r20_60[jj],g3079_3182_r20_60[jj]);
502 if (g2931[jj]!=1 && g3079_3182_r20[jj]!=1) gRatio_r20->Fill(g3079_3182_r20[jj]/g2931[jj]);
503 if (g2931_r20_60[jj]!=1 && g3079_3182_r20_60[jj]!=1) gRatio_r20_60->Fill(g3079_3182_r20_60[jj]/g2931_r20_60[jj]);
509 TCanvas *
c1 =
new TCanvas(
"c1",
"c1 plot_gain_factors",200,10,700,700);
520 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
521 h_yvsx2931_r20_60->SetTitle(
string);
522 h_yvsx2931_r20_60->GetZaxis()->SetRangeUser(zmin,zmax);
523 h_yvsx2931_r20_60->GetYaxis()->SetTitle(
"y");
524 h_yvsx2931_r20_60->GetXaxis()->SetTitle(
"x");
525 h_yvsx2931_r20_60->Draw(
"colz");
531 h_unordered2931_r20_60->SetTitle(
string);;
532 h_unordered2931_r20_60->GetYaxis()->SetRangeUser(ymin,ymax);
533 h_unordered2931_r20_60->GetYaxis()->SetTitle(
"Counts");
534 h_unordered2931_r20_60->GetXaxis()->SetTitle(
"Gain Factor");
535 h_unordered2931_r20_60->Fit(
"gaus");
536 h_unordered2931_r20_60->Draw(
"");
542 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
543 h_yvsx2931_r20->SetTitle(
string);
544 h_yvsx2931_r20->GetZaxis()->SetRangeUser(zmin,zmax);
545 h_yvsx2931_r20->GetYaxis()->SetTitle(
"y");
546 h_yvsx2931_r20->GetXaxis()->SetTitle(
"x");
547 h_yvsx2931_r20->Draw(
"colz");
553 h_unordered2931_r20->SetTitle(
string);;
554 h_unordered2931_r20->GetYaxis()->SetRangeUser(ymin,ymax);
555 h_unordered2931_r20->GetYaxis()->SetTitle(
"Counts");
556 h_unordered2931_r20->GetXaxis()->SetTitle(
"Gain Factor");
557 h_unordered2931_r20->Draw(
"");
559 TCanvas *
c2 =
new TCanvas(
"c2",
"c2 plot_gain_factors",200,10,700,700);
570 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
571 h_yvsx3079_r20_60->SetTitle(
string);
572 h_yvsx3079_r20_60->GetZaxis()->SetRangeUser(zmin,zmax);
573 h_yvsx3079_r20_60->GetYaxis()->SetTitle(
"y");
574 h_yvsx3079_r20_60->GetXaxis()->SetTitle(
"x");
575 h_yvsx3079_r20_60->Draw(
"colz");
581 h_unordered3079_r20_60->SetTitle(
string);;
582 h_unordered3079_r20_60->GetYaxis()->SetRangeUser(ymin,ymax);
583 h_unordered3079_r20_60->GetYaxis()->SetTitle(
"Counts");
584 h_unordered3079_r20_60->GetXaxis()->SetTitle(
"Gain Factor");
585 h_unordered3079_r20_60->Draw(
"");
591 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
592 h_yvsx3079_r20->SetTitle(
string);
593 h_yvsx3079_r20->GetZaxis()->SetRangeUser(zmin,zmax);
594 h_yvsx3079_r20->GetYaxis()->SetTitle(
"y");
595 h_yvsx3079_r20->GetXaxis()->SetTitle(
"x");
596 h_yvsx3079_r20->Draw(
"colz");
602 h_unordered3079_r20->SetTitle(
string);;
603 h_unordered3079_r20->GetYaxis()->SetRangeUser(ymin,ymax);
604 h_unordered3079_r20->GetYaxis()->SetTitle(
"Counts");
605 h_unordered3079_r20->GetXaxis()->SetTitle(
"Gain Factor");
606 h_unordered3079_r20->Draw(
"");
608 TCanvas *
c3 =
new TCanvas(
"c3",
"c3 plot_gain_factors",200,10,700,700);
619 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
620 h_yvsx3179_r20_60->SetTitle(
string);
621 h_yvsx3179_r20_60->GetZaxis()->SetRangeUser(zmin,zmax);
622 h_yvsx3179_r20_60->GetYaxis()->SetTitle(
"y");
623 h_yvsx3179_r20_60->GetXaxis()->SetTitle(
"x");
624 h_yvsx3179_r20_60->Draw(
"colz");
630 h_unordered3179_r20_60->SetTitle(
string);;
631 h_unordered3179_r20_60->GetYaxis()->SetRangeUser(ymin,ymax);
632 h_unordered3179_r20_60->GetYaxis()->SetTitle(
"Counts");
633 h_unordered3179_r20_60->GetXaxis()->SetTitle(
"Gain Factor");
634 h_unordered3179_r20_60->Draw(
"");
640 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
641 h_yvsx3179_r20->SetTitle(
string);
642 h_yvsx3179_r20->GetZaxis()->SetRangeUser(zmin,zmax);
643 h_yvsx3179_r20->GetYaxis()->SetTitle(
"y");
644 h_yvsx3179_r20->GetXaxis()->SetTitle(
"x");
645 h_yvsx3179_r20->Draw(
"colz");
651 h_unordered3179_r20->SetTitle(
string);;
652 h_unordered3179_r20->GetYaxis()->SetRangeUser(ymin,ymax);
653 h_unordered3179_r20->GetYaxis()->SetTitle(
"Counts");
654 h_unordered3179_r20->GetXaxis()->SetTitle(
"Gain Factor");
655 h_unordered3179_r20->Draw(
"");
658 TCanvas *
c4 =
new TCanvas(
"c4",
"c4 plot_gain_factors",200,10,700,700);
669 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
670 h_yvsx3180_r20_60->SetTitle(
string);
671 h_yvsx3180_r20_60->GetZaxis()->SetRangeUser(zmin,zmax);
672 h_yvsx3180_r20_60->GetYaxis()->SetTitle(
"y");
673 h_yvsx3180_r20_60->GetXaxis()->SetTitle(
"x");
674 h_yvsx3180_r20_60->Draw(
"colz");
680 h_unordered3180_r20_60->SetTitle(
string);;
681 h_unordered3180_r20_60->GetYaxis()->SetRangeUser(ymin,ymax);
682 h_unordered3180_r20_60->GetYaxis()->SetTitle(
"Counts");
683 h_unordered3180_r20_60->GetXaxis()->SetTitle(
"Gain Factor");
684 h_unordered3180_r20_60->Draw(
"");
690 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
691 h_yvsx3180_r20->SetTitle(
string);
692 h_yvsx3180_r20->GetZaxis()->SetRangeUser(zmin,zmax);
693 h_yvsx3180_r20->GetYaxis()->SetTitle(
"y");
694 h_yvsx3180_r20->GetXaxis()->SetTitle(
"x");
695 h_yvsx3180_r20->Draw(
"colz");
701 h_unordered3180_r20->SetTitle(
string);;
702 h_unordered3180_r20->GetYaxis()->SetRangeUser(ymin,ymax);
703 h_unordered3180_r20->GetYaxis()->SetTitle(
"Counts");
704 h_unordered3180_r20->GetXaxis()->SetTitle(
"Gain Factor");
705 h_unordered3180_r20->Draw(
"");
708 TCanvas *
c5 =
new TCanvas(
"c5",
"c5 plot_gain_factors",200,10,700,700);
719 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
720 h_yvsx3182_r20_60->SetTitle(
string);
721 h_yvsx3182_r20_60->GetZaxis()->SetRangeUser(zmin,zmax);
722 h_yvsx3182_r20_60->GetYaxis()->SetTitle(
"y");
723 h_yvsx3182_r20_60->GetXaxis()->SetTitle(
"x");
724 h_yvsx3182_r20_60->Draw(
"colz");
730 h_unordered3182_r20_60->SetTitle(
string);;
731 h_unordered3182_r20_60->GetYaxis()->SetRangeUser(ymin,ymax);
732 h_unordered3182_r20_60->GetYaxis()->SetTitle(
"Counts");
733 h_unordered3182_r20_60->GetXaxis()->SetTitle(
"Gain Factor");
734 h_unordered3182_r20_60->Draw(
"");
740 sprintf(
string,
"Electron Gain Factors Run%4d\n",runnum);
741 h_yvsx3182_r20->SetTitle(
string);
742 h_yvsx3182_r20->GetZaxis()->SetRangeUser(zmin,zmax);
743 h_yvsx3182_r20->GetYaxis()->SetTitle(
"y");
744 h_yvsx3182_r20->GetXaxis()->SetTitle(
"x");
745 h_yvsx3182_r20->Draw(
"colz");
751 h_unordered3182_r20->SetTitle(
string);;
752 h_unordered3182_r20->GetYaxis()->SetRangeUser(ymin,ymax);
753 h_unordered3182_r20->GetYaxis()->SetTitle(
"Counts");
754 h_unordered3182_r20->GetXaxis()->SetTitle(
"Gain Factor");
755 h_unordered3182_r20->Draw(
"");
757 TCanvas *
c6 =
new TCanvas(
"c6",
"c6 plot_gain_factors",200,10,700,700);
765 h3079_2931->SetTitle(
"");
767 h3079_2931->GetYaxis()->SetTitle(
"Gain R3079");
768 h3079_2931->GetXaxis()->SetTitle(
"Gain R2931");
769 h3079_2931->Draw(
"colz");
770 TLine *diag =
new TLine (0,0,2,2);
771 diag->SetLineColor(2);
772 diag->SetLineWidth(2);
777 h3179_2931->SetTitle(
"");
779 h3179_2931->GetYaxis()->SetTitle(
"Gain R3179");
780 h3179_2931->GetXaxis()->SetTitle(
"Gain R2931");
781 h3179_2931->Draw(
"colz");
782 TLine *diag =
new TLine (0,0,2,2);
783 diag->SetLineColor(2);
784 diag->SetLineWidth(2);
789 h3180_2931->SetTitle(
"");
791 h3180_2931->GetYaxis()->SetTitle(
"Gain R3180");
792 h3180_2931->GetXaxis()->SetTitle(
"Gain R2931");
793 h3180_2931->Draw(
"colz");
794 TLine *diag =
new TLine (0,0,2,2);
795 diag->SetLineColor(2);
796 diag->SetLineWidth(2);
801 h3182_2931->SetTitle(
"");
803 h3182_2931->GetYaxis()->SetTitle(
"Gain R3182");
804 h3182_2931->GetXaxis()->SetTitle(
"Gain R2931");
805 h3182_2931->Draw(
"colz");
806 TLine *diag =
new TLine (0,0,2,2);
807 diag->SetLineColor(2);
808 diag->SetLineWidth(2);
812 TCanvas *c7 =
new TCanvas(
"c7",
"c7 plot_gain_factors",200,10,700,700);
820 h3079_2931_r20_60->SetTitle(
"");
822 h3079_2931_r20_60->GetYaxis()->SetTitle(
"Gain R3079");
823 h3079_2931_r20_60->GetXaxis()->SetTitle(
"Gain R2931");
824 h3079_2931_r20_60->Draw(
"colz");
825 TLine *diag =
new TLine (0,0,2,2);
826 diag->SetLineColor(2);
827 diag->SetLineWidth(2);
832 h3179_2931_r20_60->SetTitle(
"");
834 h3179_2931_r20_60->GetYaxis()->SetTitle(
"Gain R3179");
835 h3179_2931_r20_60->GetXaxis()->SetTitle(
"Gain R2931");
836 h3179_2931_r20_60->Draw(
"colz");
837 TLine *diag =
new TLine (0,0,2,2);
838 diag->SetLineColor(2);
839 diag->SetLineWidth(2);
844 h3180_2931_r20_60->SetTitle(
"");
846 h3180_2931_r20_60->GetYaxis()->SetTitle(
"Gain R3180");
847 h3180_2931_r20_60->GetXaxis()->SetTitle(
"Gain R2931");
848 h3180_2931_r20_60->Draw(
"colz");
849 TLine *diag =
new TLine (0,0,2,2);
850 diag->SetLineColor(2);
851 diag->SetLineWidth(2);
856 h3182_2931_r20_60->SetTitle(
"");
858 h3182_2931_r20_60->GetYaxis()->SetTitle(
"Gain R3182");
859 h3182_2931_r20_60->GetXaxis()->SetTitle(
"Gain R2931");
860 h3182_2931_r20_60->Draw(
"colz");
861 TLine *diag =
new TLine (0,0,2,2);
862 diag->SetLineColor(2);
863 diag->SetLineWidth(2);
867 TCanvas *c8 =
new TCanvas(
"c8",
"c8 plot_gain_factors",200,10,700,700);
878 sprintf(
string,
"Electron Gain Factors Run 3079-3182");
879 h_yvsx3079_3182_r20_60->SetTitle(
string);
880 h_yvsx3079_3182_r20_60->GetZaxis()->SetRangeUser(zmin,zmax);
881 h_yvsx3079_3182_r20_60->GetYaxis()->SetTitle(
"y");
882 h_yvsx3079_3182_r20_60->GetXaxis()->SetTitle(
"x");
883 h_yvsx3079_3182_r20_60->Draw(
"colz");
889 h_unordered3079_3182_r20_60->SetTitle(
string);;
890 h_unordered3079_3182_r20_60->GetYaxis()->SetRangeUser(ymin,ymax);
891 h_unordered3079_3182_r20_60->GetYaxis()->SetTitle(
"Counts");
892 h_unordered3079_3182_r20_60->GetXaxis()->SetTitle(
"Gain Factor");
893 h_unordered3079_3182_r20_60->Fit(
"gaus");
894 h_unordered3079_3182_r20_60->Draw(
"");
900 sprintf(
string,
"Electron Gain Factors Run 3079-3182");
901 h_yvsx3079_3182_r20->SetTitle(
string);
902 h_yvsx3079_3182_r20->GetZaxis()->SetRangeUser(zmin,zmax);
903 h_yvsx3079_3182_r20->GetYaxis()->SetTitle(
"y");
904 h_yvsx3079_3182_r20->GetXaxis()->SetTitle(
"x");
905 h_yvsx3079_3182_r20->Draw(
"colz");
911 h_unordered3079_3182_r20->SetTitle(
string);;
912 h_unordered3079_3182_r20->GetYaxis()->SetRangeUser(ymin,ymax);
913 h_unordered3079_3182_r20->GetYaxis()->SetTitle(
"Counts");
914 h_unordered3079_3182_r20->GetXaxis()->SetTitle(
"Gain Factor");
915 h_unordered3079_3182_r20->Draw(
"");
918 TCanvas *c9 =
new TCanvas(
"c9",
"c9 plot_gain_factors",200,10,700,700);
926 h3079_3182_2931_r20_60->SetTitle(
"");
928 h3079_3182_2931_r20_60->GetYaxis()->SetTitle(
"Gain R3079-3182");
929 h3079_3182_2931_r20_60->GetXaxis()->SetTitle(
"Gain R2931");
930 h3079_3182_2931_r20_60->Draw(
"colz");
931 TLine *diag =
new TLine (0,0,2,2);
932 diag->SetLineColor(2);
933 diag->SetLineWidth(2);
938 h3079_3182_2931_r20->SetTitle(
"");
940 h3079_3182_2931_r20->GetYaxis()->SetTitle(
"Gain R3079-3182");
941 h3079_3182_2931_r20->GetXaxis()->SetTitle(
"Gain R2931");
942 h3079_3182_2931_r20->Draw(
"colz");
943 TLine *diag =
new TLine (0,0,2,2);
944 diag->SetLineColor(2);
945 diag->SetLineWidth(2);
952 gRatio_r20_60->SetTitle(
string);;
954 gRatio_r20_60->GetYaxis()->SetTitle(
"Counts");
955 gRatio_r20_60->GetXaxis()->SetTitle(
"Ratio R3079-3182/R2931 _r20_60");
956 gRatio_r20_60->Fit(
"gaus");
957 gRatio_r20_60->Draw(
"");
963 gRatio_r20->SetTitle(
string);;
965 gRatio_r20->GetYaxis()->SetTitle(
"Counts");
966 gRatio_r20->GetXaxis()->SetTitle(
"Ratio R3079-3182/R2931 _r20");
967 gRatio_r20->Fit(
"gaus");
968 gRatio_r20->Draw(
"");
971 TCanvas *c10 =
new TCanvas(
"c10",
"c10 plot_gain_factors",200,10,700,700);
982 sprintf(
string,
"Electron Gain Factors Run 2931-3182");
983 h_yvsx2931_3182_r20_60->SetTitle(
string);
984 h_yvsx2931_3182_r20_60->GetZaxis()->SetRangeUser(zmin,zmax);
985 h_yvsx2931_3182_r20_60->GetYaxis()->SetTitle(
"y");
986 h_yvsx2931_3182_r20_60->GetXaxis()->SetTitle(
"x");
987 h_yvsx2931_3182_r20_60->Draw(
"colz");
993 h_unordered2931_3182_r20_60->SetTitle(
string);;
994 h_unordered2931_3182_r20_60->GetYaxis()->SetRangeUser(ymin,ymax);
995 h_unordered2931_3182_r20_60->GetYaxis()->SetTitle(
"Counts");
996 h_unordered2931_3182_r20_60->GetXaxis()->SetTitle(
"Gain Factor");
997 h_unordered2931_3182_r20_60->Fit(
"gaus");
998 h_unordered2931_3182_r20_60->Draw(
"");
1004 sprintf(
string,
"Electron Gain Factors Run 2931-3182");
1005 h_yvsx2931_3182_r20->SetTitle(
string);
1006 h_yvsx2931_3182_r20->GetZaxis()->SetRangeUser(zmin,zmax);
1007 h_yvsx2931_3182_r20->GetYaxis()->SetTitle(
"y");
1008 h_yvsx2931_3182_r20->GetXaxis()->SetTitle(
"x");
1009 h_yvsx2931_3182_r20->Draw(
"colz");
1015 h_unordered2931_3182_r20->SetTitle(
string);;
1016 h_unordered2931_3182_r20->GetYaxis()->SetRangeUser(ymin,ymax);
1017 h_unordered2931_3182_r20->GetYaxis()->SetTitle(
"Counts");
1018 h_unordered2931_3182_r20->GetXaxis()->SetTitle(
"Gain Factor");
1019 h_unordered2931_3182_r20->Draw(
"");
1030 sprintf(
string,
"plot_gain_factors.pdf(");
1032 sprintf(
string,
"plot_gain_factors.pdf");
1034 sprintf(
string,
"plot_gain_factors.pdf");
1036 sprintf(
string,
"plot_gain_factors.pdf");
1038 sprintf(
string,
"plot_gain_factors.pdf");
1040 sprintf(
string,
"plot_gain_factors.pdf");
1042 sprintf(
string,
"plot_gain_factors.pdf");
1044 sprintf(
string,
"plot_gain_factors.pdf");
1046 sprintf(
string,
"plot_gain_factors.pdf");
1047 c10->SaveAs(
string);
1048 sprintf(
string,
"plot_gain_factors.pdf)");
sprintf(text,"Post KinFit Cut")
printf("string=%s", string)
void plot_gain_factors(void)