Extacting the OCDB in a separate module. The detectors have write permission in the...
[u/mrichter/AliRoot.git] / EMCAL / macros / CalibrationDB / get_pedestalAll.C
CommitLineData
83b4f746 1typedef struct
2{
3 int row;
4 int col;
5 int gain;
6 int csp;
7 int fee;
8 int chip;
9 int chan;
10} mapData;
11
12#include "constants.h"
13
14void get_pedestalAll(int runNumber = 33,
15 const int save = 0, const int saveDb=0)
16{
17 //Extracts pedestals from the file RUN_0{runNumber}.root.
18 //If saveDb != 0, saves pedestals to the local OCDB, separately for low and high gains.
19 //Used constant.h file with the constants and map.txt file with mapping related
20 //to the Sept-Oct 2007 beam test at CERN.
21
22 TString DBFolder ="local://";
23 TString DBPathLow = "Calib/Data/LowGain";
24 TString DBPathHigh = "Calib/Data/HighGain";
25
26 Int_t firstRun = runNumber;
27 Int_t lastRun = 999999999;
28
29 // setup
30 gROOT->Time();
31 gStyle->SetOptFit(1);
32 gStyle->SetOptTitle(1);
33 gStyle->SetOptStat(0);
34
35 gStyle->SetFillColor(10);
36 gStyle->SetCanvasColor(10);
37
38 gStyle->SetPadBorderSize(0);
39 gStyle->SetPadBorderMode(0);
40 gStyle->SetPadLeftMargin(0.15);
41 gStyle->SetPadBottomMargin(0.15);
42
43 gStyle->SetTitleOffset(1.2,"X");
44 gStyle->SetTitleOffset(0.9,"Y");
45 gStyle->SetTitleSize(0.045,"X");
46 gStyle->SetTitleSize(0.045,"Y");
47
48 char FECstr0[20];
49 char FECstr1[20];
50 sprintf(FECstr0, "FEC %d", FEC[0]);
51 sprintf(FECstr1, "FEC %d", FEC[1]);
52
53 // get root file
54 char rootFile[80];
55 sprintf(rootFile,"RUN_%04d.root",runNumber);
56 cout<<"\n root file: "<<rootFile<<endl;
57 TFile *f = new TFile(rootFile);
58 if (f==NULL)
59 {
60 cout<<"\n ---> No root file.\n"<<endl;
61 return 0;
62 }
63
64
65 // get map info
66 ifstream fin;
67 fin.open("map.txt");
68
69 mapData chmap[CHANNELS];
70
71 char dummy[20];
72 fin >> dummy >> dummy >> dummy >> dummy >> dummy >> dummy >> dummy >> dummy >> dummy;
73
74 int ichan = 0;
75 int idum = 0;
76 int nchan = 0;
77 while ( fin.good() ) {
78 fin >> idum >> ichan;
79 if (! (fin.good() && ichan<CHANNELS) ) break;
80 fin >> chmap[ichan].row >> chmap[ichan].col >> chmap[ichan].gain >> chmap[ichan].csp
81 >> chmap[ichan].fee >> chmap[ichan].chip >> chmap[ichan].chan;
82 nchan++;
83 }
84
85 cout << " info for " << nchan << " channels read from map " << endl;
86
87 // get hSig and hPed profile histograms; the indices are channel id's
88 TProfile *hPed = (TProfile *) gROOT->FindObject("hPed");
89 TProfile *hMean = (TProfile *) gROOT->FindObject("hMean");
90 TProfile *hSig = (TProfile *) gROOT->FindObject("hSig");
91 TProfile *hAll = (TProfile *) gROOT->FindObject("hAll");
92 hPed->Approximate(false); // prevent ROOT from smoothing. profiles.
93 hMean->Approximate(false);
94 hSig->Approximate(false);
95 hAll->Approximate(false);
96
97 hPed->SetErrorOption("s"); // don't divide error with sqrt(entries)
98 hMean->SetErrorOption("s");
99 hSig->SetErrorOption("s");
100 hAll->SetErrorOption("s");
101
102 TH1F *hRMS = new TH1F("hRMS", "hRMS", CHANNELS, -0.5, CHANNELS - 0.5);
103 TH1F *hRMS1D = new TH1F("hRMS1D", "hRMS1D", 100, 0, 1);
104
105 // define canvas : we'll have plots with info vs channel and info vs CSP (high and low)
106 bool extra = false;
107 if (extra) {
108 TCanvas *cSignal = new TCanvas("cSignal","Signal",500,0,500,620);
109 cSignal->Divide(1,3);
110 }
111 TCanvas *cPedestal = new TCanvas("cPedestal","Pedestal",400,50,500,620);
112 cPedestal->Divide(1,3);
113 TCanvas *cMean = new TCanvas("cMean","Mean",400,50,500,620);
114 cMean->Divide(1,3);
115 TCanvas *cRMS = new TCanvas("cRMS","Pedestal RMS",400,50,500,620);
116 cRMS->Divide(1,3);
117
118 TCanvas *cRMS1D = new TCanvas("cRMS1D","Pedestal RMS - 1D",10,10,400,300);
119
120 const int NGAIN = 2;
121 const char * GAINSTR[] = {"Low", "High"};
122
123 // plot results
124 TH1F* hRMSCSP[NGAIN];
125 TH1F* hPedCSP[NGAIN];
126 TH1F* hSigCSP[NGAIN];
127 TH1F* hMeanCSP[NGAIN];
128
129 char info[80];
130 char id[80];
131
132 for (int igain=0; igain<NGAIN; igain++) {
133 sprintf(id, "hRMSCSP%d",igain);
134 sprintf(info, "RMS vs CSP # - %s gain",GAINSTR[igain]);
135 hRMSCSP[igain] = new TH1F(id, info, NCSP, -0.5, NCSP-0.5);
136
137 sprintf(id, "hPedCSP%d",igain);
138 sprintf(info, "Pedestal vs CSP # - %s gain",GAINSTR[igain]);
139 hPedCSP[igain] = new TH1F(id, info, NCSP, -0.5, NCSP-0.5);
140
141 sprintf(id, "hSigCSP%d",igain);
142 sprintf(info, "Signal vs CSP # - %s gain",GAINSTR[igain]);
143 hSigCSP[igain] = new TH1F(id, info, NCSP, -0.5, NCSP-0.5);
144
145 sprintf(id, "hMeanCSP%d",igain);
146 sprintf(info, "Mean vs CSP # - %s gain",GAINSTR[igain]);
147 hMeanCSP[igain] = new TH1F(id, info, NCSP, -0.5, NCSP-0.5);
148
149 // setup the way the plots should look
150 hRMSCSP[igain]->SetXTitle("CSP channels");
151 hRMSCSP[igain]->SetYTitle("RMS (ADC counts)");
152 hRMSCSP[igain]->SetMarkerStyle(20);
153 hRMSCSP[igain]->SetMarkerColor(2);
154 hRMSCSP[igain]->SetMarkerSize(1);
155 hRMSCSP[igain]->GetYaxis()->SetNdivisions(505);
156
157 hPedCSP[igain]->SetXTitle("CSP channels");
158 hPedCSP[igain]->SetYTitle("Pedestal (ADC counts)");
159 hPedCSP[igain]->SetMarkerStyle(20);
160 hPedCSP[igain]->SetMarkerColor(2);
161 hPedCSP[igain]->SetMarkerSize(1);
162 hPedCSP[igain]->GetYaxis()->SetNdivisions(505);
163
164 hSigCSP[igain]->SetXTitle("CSP channels");
165 hSigCSP[igain]->SetYTitle("Signal (ADC counts)");
166 hSigCSP[igain]->SetMarkerStyle(20);
167 hSigCSP[igain]->SetMarkerColor(2);
168 hSigCSP[igain]->SetMarkerSize(1);
169 hSigCSP[igain]->GetYaxis()->SetNdivisions(505);
170
171 hMeanCSP[igain]->SetXTitle("CSP channels");
172 hMeanCSP[igain]->SetYTitle("Signal (ADC counts)");
173 hMeanCSP[igain]->SetMarkerStyle(20);
174 hMeanCSP[igain]->SetMarkerColor(2);
175 hMeanCSP[igain]->SetMarkerSize(1);
176 hMeanCSP[igain]->GetYaxis()->SetNdivisions(505);
177 }
178
179 //Creates calibration objects
180 AliEMCALCalibData* cdb[2];
181 cdb[0] = new AliEMCALCalibData(); //for low gain
182 cdb[1] = new AliEMCALCalibData(); //for high gain
183
184 // fill CSP histograms too
185 for (Int_t k=0; k<CHANNELS; k++) {
186 int igain = chmap[k].gain;
187 int icsp = chmap[k].csp;
188 int col = chmap[k].col;
189 int row = chmap[k].row;
190 if (chmap[k].fee != FEC[0]) { icsp += NCSP/2; } // offset for 2nd card
191
192 // report suspicious channels
193 if ( hPed->GetBinContent(k+1) == 0 ) {
194 printf("Zero pedestal channel : %d, FEE %d Chip %d Chan %d : CSP %d gain %d\n",
195 k, chmap[k].fee, chmap[k].chip, chmap[k].chan, icsp, igain);
196 }
197
198 hRMSCSP[igain]->SetBinContent(icsp+1, hPed->GetBinError(k+1));
199 hRMS->SetBinContent(k+1, hPed->GetBinError(k+1));
200 if (igain == 1) {
201 hRMS1D->Fill(hPed->GetBinError(k+1));
202 }
203
204 Int_t supermod=0;
205 cdb[igain]->SetADCpedestal(supermod,col,row,hPed->GetBinContent(k+1));
206 printf("--- col%d row%d gain%d ped %.3f\n",col,row,igain,
207 cdb[igain]->GetADCpedestal(supermod,col,row));
208
209 hPedCSP[igain]->SetBinContent(icsp+1, hPed->GetBinContent(k+1));
210 hPedCSP[igain]->SetBinError(icsp+1, hPed->GetBinError(k+1));
211
212 hSigCSP[igain]->SetBinContent(icsp+1, hSig->GetBinContent(k+1));
213 hSigCSP[igain]->SetBinError(icsp+1, hSig->GetBinError(k+1));
214
215 hMeanCSP[igain]->SetBinContent(icsp+1, hMean->GetBinContent(k+1));
216 hMeanCSP[igain]->SetBinError(icsp+1, hMean->GetBinError(k+1));
217 }
218
219 //-------------------------------------------------------------------------------
220
221 //Save calibration objects to OCDB.
222 if(saveDb) {
223
162637e4 224 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
83b4f746 225 AliCDBManager::Instance()->SetSpecificStorage("EMCAL/*",DBFolder.Data());
226
227 AliCDBMetaData md;
228 md.SetComment("EMCAL beam test at CERN (Oct 2007)");
229
230 AliCDBStorage* storage = AliCDBManager::Instance()->GetSpecificStorage("EMCAL/*");
231 if(storage) {
232
233 AliCDBId idLow(DBPathLow.Data(),firstRun,lastRun);
234 storage->Put(cdb[0],idLow, &md);
235
236 AliCDBId idHigh(DBPathHigh.Data(),firstRun,lastRun);
237 storage->Put(cdb[1],idHigh, &md);
238
239 }
240
241 }
242
243
244 // draw RMS
245 cRMS->cd(1);
246 hRMS->Draw("hist");
247 cRMS->cd(2);
248 hRMSCSP[0]->Draw("P");
249 cRMS->cd(3);
250 hRMSCSP[1]->Draw("P");
251
252 // lines
253 double min = hRMSCSP[1]->GetMinimum();
254 double max = hRMSCSP[1]->GetMaximum();
255 int ntcards = NCSP/8; // 8 CSPs per T-card
256 for (int tcard = 0; tcard<ntcards; tcard++) {
257 double xpos = tcard*8 - 0.5;
258 TLine *line = new TLine(xpos, min, xpos, max);
259 line->SetLineColor(3);
260 line->SetLineWidth(1);
261 line->Draw("same");
262
263 //text
264 double xtex = tcard*8 + 1;
265 double ytex = max * 0.1;
266 char texstr[20];
267 sprintf(texstr,"T-card %d", tcard%4);
268 TLatex *tex = new TLatex(xtex, ytex, texstr);
269 tex->SetTextSize(0.05);
270 tex->SetTextColor(4);
271 tex->SetLineWidth(2);
272 tex->Draw();
273 }
274
275 char Run[40];
276 sprintf(Run,"Run: %d", runNumber);
277 TLatex *tex = new TLatex(8, max*1.1, Run); // 8 is just an arb. position
278 tex->SetTextSize(0.05);
279 tex->SetTextColor(4);
280 tex->SetLineWidth(2);
281 tex->Draw();
282
283 TLatex *tex = new TLatex(16, max*1.1, ", Gain: high");
284 tex->SetTextSize(0.05);
285 tex->SetTextColor(4);
286 tex->SetLineWidth(2);
287 tex->Draw();
288
289 cRMS->cd(1);
290 min = hRMS->GetMinimum();
291 max = hRMS->GetMaximum();
292 double fecpos = CHANNELS/2 - 0.5;
293 TLine *line = new TLine(fecpos, min, fecpos, max);
294 line->SetLineColor(4);
295 line->SetLineWidth(1);
296 line->Draw("same");
297
298 TLatex *tex = new TLatex(fecpos*0.5, max*1.1, FECstr0);
299 tex->SetTextSize(0.05);
300 tex->SetTextColor(4);
301 tex->SetLineWidth(2);
302 tex->Draw();
303
304 TLatex *tex = new TLatex(fecpos*1.5, max*1.1, FECstr1);
305 tex->SetTextSize(0.05);
306 tex->SetTextColor(4);
307 tex->SetLineWidth(2);
308 tex->Draw();
309
310 cRMS->cd(2);
311 min = hRMSCSP[0]->GetMinimum();
312 max = hRMSCSP[0]->GetMaximum();
313 fecpos = NCSP/2 - 0.5;
314 TLine *line = new TLine(fecpos, min, fecpos, max);
315 line->SetLineColor(4);
316 line->SetLineWidth(1);
317 line->Draw("same");
318
319 TLatex *tex = new TLatex(fecpos*0.5, max*1.1, FECstr0);
320 tex->SetTextSize(0.05);
321 tex->SetTextColor(4);
322 tex->SetLineWidth(2);
323 tex->Draw();
324
325 TLatex *tex = new TLatex(fecpos*1.5, max*1.1, FECstr1);
326 tex->SetTextSize(0.05);
327 tex->SetTextColor(4);
328 tex->SetLineWidth(2);
329 tex->Draw();
330
331 // make Pedestal plot
332 //-------------------------------------------------------------------------------
333 cPedestal->cd(1);
334 hPed->Draw("hist");
335 cPedestal->cd(2);
336 hPedCSP[0]->Draw("P");
337 cPedestal->cd(3);
338 hPedCSP[1]->Draw("P");
339
340 // lines
341 min = hPedCSP[1]->GetMinimum();
342 max = hPedCSP[1]->GetMaximum();
343 for (int tcard = 0; tcard<ntcards; tcard++) {
344 double xpos = tcard*8 - 0.5;
345 TLine *line = new TLine(xpos, min, xpos, max);
346 line->SetLineColor(3);
347 line->SetLineWidth(1);
348 line->Draw("same");
349
350 //text
351 double xtex = tcard*8 + 1;
352 double ytex = max * 0.1;
353 char texstr[20];
354 sprintf(texstr,"T-card %d", tcard%4);
355 TLatex *tex = new TLatex(xtex, ytex, texstr);
356 tex->SetTextSize(0.05);
357 tex->SetTextColor(4);
358 tex->SetLineWidth(2);
359 tex->Draw();
360 }
361
362 sprintf(Run,"Run: %d", runNumber);
363 TLatex *tex = new TLatex(8, max*1.1, Run); // 8 is just an arb. position
364 tex->SetTextSize(0.05);
365 tex->SetTextColor(4);
366 tex->SetLineWidth(2);
367 tex->Draw();
368
369 TLatex *tex = new TLatex(16, max*1.1, ", Gain: high");
370 tex->SetTextSize(0.05);
371 tex->SetTextColor(4);
372 tex->SetLineWidth(2);
373 tex->Draw();
374
375 cPedestal->cd(1);
376 min = hPed->GetMinimum();
377 max = hPed->GetMaximum();
378 fecpos = CHANNELS/2 - 0.5;
379 TLine *line = new TLine(fecpos, min, fecpos, max);
380 line->SetLineColor(4);
381 line->SetLineWidth(1);
382 line->Draw("same");
383
384 TLatex *tex = new TLatex(fecpos*0.5, max*1.1, FECstr0);
385 tex->SetTextSize(0.05);
386 tex->SetTextColor(4);
387 tex->SetLineWidth(2);
388 tex->Draw();
389
390 TLatex *tex = new TLatex(fecpos*1.5, max*1.1, FECstr1);
391 tex->SetTextSize(0.05);
392 tex->SetTextColor(4);
393 tex->SetLineWidth(2);
394 tex->Draw();
395
396 cPedestal->cd(2);
397 min = hPedCSP[0]->GetMinimum();
398 max = hPedCSP[0]->GetMaximum();
399 fecpos = NCSP/2 - 0.5;
400 TLine *line = new TLine(fecpos, min, fecpos, max);
401 line->SetLineColor(4);
402 line->SetLineWidth(1);
403 line->Draw("same");
404
405 TLatex *tex = new TLatex(fecpos*0.5, max*1.1, FECstr0);
406 tex->SetTextSize(0.05);
407 tex->SetTextColor(4);
408 tex->SetLineWidth(2);
409 tex->Draw();
410
411 TLatex *tex = new TLatex(fecpos*1.5, max*1.1, FECstr1);
412 tex->SetTextSize(0.05);
413 tex->SetTextColor(4);
414 tex->SetLineWidth(2);
415 tex->Draw();
416
417 // make Signal plot
418 //-------------------------------------------------------------------------------
419 if (extra) {
420 cSignal->cd(1);
421 hSig->Draw("hist");
422 cSignal->cd(2);
423 hSigCSP[0]->Draw("P");
424 cSignal->cd(3);
425 hSigCSP[1]->Draw("P");
426
427 // lines
428 min = hSigCSP[1]->GetMinimum();
429 max = hSigCSP[1]->GetMaximum();
430 for (int tcard = 0; tcard<ntcards; tcard++) {
431 double xpos = tcard*8 - 0.5;
432 TLine *line = new TLine(xpos, min, xpos, max);
433 line->SetLineColor(3);
434 line->SetLineWidth(1);
435 line->Draw("same");
436
437 //text
438 double xtex = tcard*8 + 1;
439 double ytex = max * 0.1;
440 char texstr[20];
441 sprintf(texstr,"T-card %d", tcard%4);
442 TLatex *tex = new TLatex(xtex, ytex, texstr);
443 tex->SetTextSize(0.05);
444 tex->SetTextColor(4);
445 tex->SetLineWidth(2);
446 tex->Draw();
447 }
448
449 sprintf(Run,"Run: %d", runNumber);
450 TLatex *tex = new TLatex(8, max*1.1, Run); // 8 is just an arb. position
451 tex->SetTextSize(0.05);
452 tex->SetTextColor(4);
453 tex->SetLineWidth(2);
454 tex->Draw();
455
456 TLatex *tex = new TLatex(16, max*1.1, ", Gain: high");
457 tex->SetTextSize(0.05);
458 tex->SetTextColor(4);
459 tex->SetLineWidth(2);
460 tex->Draw();
461
462 cSignal->cd(1);
463 min = hSig->GetMinimum();
464 max = hSig->GetMaximum();
465 fecpos = CHANNELS/2 - 0.5;
466 TLine *line = new TLine(fecpos, min, fecpos, max);
467 line->SetLineColor(4);
468 line->SetLineWidth(1);
469 line->Draw("same");
470
471 TLatex *tex = new TLatex(fecpos*0.5, max*1.1, FECstr0);
472 tex->SetTextSize(0.05);
473 tex->SetTextColor(4);
474 tex->SetLineWidth(2);
475 tex->Draw();
476
477 TLatex *tex = new TLatex(fecpos*1.5, max*1.1, FECstr1);
478 tex->SetTextSize(0.05);
479 tex->SetTextColor(4);
480 tex->SetLineWidth(2);
481 tex->Draw();
482
483 cSignal->cd(2);
484 min = hSigCSP[0]->GetMinimum();
485 max = hSigCSP[0]->GetMaximum();
486 fecpos = NCSP/2 - 0.5;
487 TLine *line = new TLine(fecpos, min, fecpos, max);
488 line->SetLineColor(4);
489 line->SetLineWidth(1);
490 line->Draw("same");
491
492 TLatex *tex = new TLatex(fecpos*0.5, max*1.1, FECstr0);
493 tex->SetTextSize(0.05);
494 tex->SetTextColor(4);
495 tex->SetLineWidth(2);
496 tex->Draw();
497
498 TLatex *tex = new TLatex(fecpos*1.5, max*1.1, FECstr1);
499 tex->SetTextSize(0.05);
500 tex->SetTextColor(4);
501 tex->SetLineWidth(2);
502 tex->Draw();
503 }
504
505 // make Mean plot
506 //-------------------------------------------------------------------------------
507 cMean->cd(1);
508 hMean->Draw("hist");
509 cMean->cd(2);
510 hMeanCSP[0]->Draw("P");
511 cMean->cd(3);
512 hMeanCSP[1]->Draw("P");
513
514 // lines
515 min = hMeanCSP[1]->GetMinimum();
516 max = hMeanCSP[1]->GetMaximum();
517 for (int tcard = 0; tcard<ntcards; tcard++) {
518 double xpos = tcard*8 - 0.5;
519 TLine *line = new TLine(xpos, min, xpos, max);
520 line->SetLineColor(3);
521 line->SetLineWidth(1);
522 line->Draw("same");
523
524 //text
525 double xtex = tcard*8 + 1;
526 double ytex = max * 0.1;
527 char texstr[20];
528 sprintf(texstr,"T-card %d", tcard%4);
529 TLatex *tex = new TLatex(xtex, ytex, texstr);
530 tex->SetTextSize(0.05);
531 tex->SetTextColor(4);
532 tex->SetLineWidth(2);
533 tex->Draw();
534 }
535
536 sprintf(Run,"Run: %d", runNumber);
537 TLatex *tex = new TLatex(8, max*1.1, Run); // 8 is just an arb. position
538 tex->SetTextSize(0.05);
539 tex->SetTextColor(4);
540 tex->SetLineWidth(2);
541 tex->Draw();
542
543 TLatex *tex = new TLatex(16, max*1.1, ", Gain: high");
544 tex->SetTextSize(0.05);
545 tex->SetTextColor(4);
546 tex->SetLineWidth(2);
547 tex->Draw();
548
549 cMean->cd(1);
550 min = hMean->GetMinimum();
551 max = hMean->GetMaximum();
552 fecpos = CHANNELS/2 - 0.5;
553 TLine *line = new TLine(fecpos, min, fecpos, max);
554 line->SetLineColor(4);
555 line->SetLineWidth(1);
556 line->Draw("same");
557
558 TLatex *tex = new TLatex(fecpos*0.5, max*1.1, FECstr0);
559 tex->SetTextSize(0.05);
560 tex->SetTextColor(4);
561 tex->SetLineWidth(2);
562 tex->Draw();
563
564 TLatex *tex = new TLatex(fecpos*1.5, max*1.1, FECstr1);
565 tex->SetTextSize(0.05);
566 tex->SetTextColor(4);
567 tex->SetLineWidth(2);
568 tex->Draw();
569
570 cMean->cd(2);
571 min = hMeanCSP[0]->GetMinimum();
572 max = hMeanCSP[0]->GetMaximum();
573 fecpos = NCSP/2 - 0.5;
574 TLine *line = new TLine(fecpos, min, fecpos, max);
575 line->SetLineColor(4);
576 line->SetLineWidth(1);
577 line->Draw("same");
578
579 TLatex *tex = new TLatex(fecpos*0.5, max*1.1, FECstr0);
580 tex->SetTextSize(0.05);
581 tex->SetTextColor(4);
582 tex->SetLineWidth(2);
583 tex->Draw();
584
585 TLatex *tex = new TLatex(fecpos*1.5, max*1.1, FECstr1);
586 tex->SetTextSize(0.05);
587 tex->SetTextColor(4);
588 tex->SetLineWidth(2);
589 tex->Draw();
590
591 // make unique files
592 if (save) {
593 char gifFile[80];
594 if (extra) {
595 sprintf(gifFile,"gif/Run%d_Signal.gif",runNumber);
596 cSignal->SaveAs(gifFile);
597 }
598 sprintf(gifFile,"gif/Run%d_Pedestal.gif",runNumber);
599 cPedestal->SaveAs(gifFile);
600 sprintf(gifFile,"gif/Run%d_RMS.gif",runNumber);
601 cRMS->SaveAs(gifFile);
602 sprintf(gifFile,"gif/Run%d_Mean.gif",runNumber);
603 cMean->SaveAs(gifFile);
604 }
605
606 cRMS1D->cd();
607 hRMS1D->Fit("gaus");
608 hRMS1D->Draw();
609
610}
611