18 #include <TPaveText.h>
19 #include <TPostScript.h>
26 #include "TGraphErrors.h"
35 cout <<
"********************************************************************* START job " << endl;
58 const Int_t NMethods = 14;
59 const Int_t NMethodsStart = 0;
60 const Int_t NMethodsToUse = 13;
62 TString MethodName[NMethods] = {
"PLOT0",
77 const Int_t NMAXM = 70;
79 cout <<
"********************************************************************* NMAXM = " << NMAXM << endl;
81 TString LEDrunsM[NMAXM] = {
83 "315812",
"315984",
"316826",
"317116",
"317193",
"317268",
"317271",
"317273",
"317363",
"317444",
"317606",
84 "317607",
"317609",
"317610",
"317611",
"317612",
"317613",
"317617",
"317785",
"318758",
"319198",
"319401",
85 "319517",
"319519",
"319520",
"319564",
"319612",
"319734",
"319771",
"319774",
"319857",
"319969",
"320117",
86 "320158",
"320203",
"320205",
"320348",
"320579",
"320873",
"320892",
"320952",
"321019",
"321036",
"321187",
87 "321339",
"321359",
"321371",
"321447",
"321514",
"322781",
"322782",
"323314",
"323502",
"323579",
"323613",
88 "323742",
"324030",
"324032",
"324138",
"324225",
"324296",
"324919",
"325141",
"325787",
"326234",
"326875",
89 "327288",
"327438",
"327552",
"327579"
92 cout <<
"********************************************************************* first massives defined " << endl;
93 Float_t X0M[NMAXM] = {
95 0., 2., 17., 22., 23., 24., 24., 24., 27., 29., 32., 32., 32., 32., 32., 32., 32., 32.,
96 38., 51., 58., 63., 65., 65., 65., 66., 68., 70., 71., 71., 72., 74., 77., 78., 79., 79.,
97 80., 85., 90., 91., 92., 93., 93., 98., 101., 101., 101., 104., 106., 129., 129., 138., 141., 142.,
98 143., 146., 150., 150., 151., 153., 155., 165., 169., 179., 183., 195., 203., 205., 208., 209.,
100 cout <<
"********************************************************************* both massives are defined " << endl;
104 const Int_t yearcase = 0;
106 cout <<
"************************************** yearcase = " << yearcase << endl;
119 const Int_t flagHFP17selection = 0;
121 cout <<
"************************************** flagHFP17selection = " << flagHFP17selection << endl;
133 TCanvas*
c1 =
new TCanvas(
"c1",
"GSM", 10, 10, 1010, 1010);
138 c1->Range(0, 0, 25, 18);
143 TLatex*
t =
new TLatex();
146 t->SetTextSize(0.03);
150 0.9, 15.5,
"Time dependence of full Amplitude averaged over events of each LED run for some random HF channels");
172 Float_t RrangeMIN = y1;
173 Float_t RrangeMAX = y2;
181 cout <<
"************************************** RrangeMIN = " << RrangeMIN <<
" RrangeMAX = " << RrangeMAX << endl;
186 const Int_t NDEP = 5;
187 const Int_t NETA0 = 83;
188 const Int_t NPHI0 = 73;
190 Double_t mapRATIO[NDEP][NETA0][NPHI0];
191 Double_t mapRATIOD2[NETA0][NPHI0];
192 Int_t mapRATIOD20[NETA0][NPHI0];
195 Double_t normalization[NETA0][NPHI0];
196 cout <<
"************************************** NDEP = " << NDEP <<
" NETA0 = " << NETA0 <<
" NPHI0 = " << NPHI0
200 Int_t NMAXSIZE = NMAXM;
201 Float_t
X0[NMAXSIZE];
202 TString LEDruns[NMAXSIZE];
203 Double_t
XX[NMAXSIZE];
204 Double_t XXE[NMAXSIZE];
205 Double_t XXX[NMAXSIZE];
206 Double_t XXXE[NMAXSIZE];
207 Int_t indWAS[NMAXSIZE];
209 Double_t
YY[NMAXSIZE];
210 Double_t YYE[NMAXSIZE];
211 cout <<
"************************************** NMAXSIZE = " << NMAXSIZE <<
" NMAXM = " << NMAXM << endl;
214 Double_t GSMRATIOD2[NMAXSIZE][NETA0][NPHI0];
222 Int_t NMAXmM = NMAXSIZE - 1;
223 Int_t NMAXaM = NMAXSIZE;
229 }
else if (yearcase == 2) {
234 }
else if (yearcase == 3) {
239 }
else if (yearcase == 4) {
244 }
else if (yearcase == 5) {
251 cout <<
"************************************** NMINmM = " << NMINmM <<
" NMAXmM = " << NMAXmM
252 <<
" NMAXaM = " << NMAXaM << endl;
253 if (NMINmM == -1 || NMAXmM == -1 || NMAXaM == -1)
254 cout <<
" STOP !!!!!! NMINmM == -1 || NMAXmM == -1 || NMAXaM == -1 " << endl;
259 for (
int jjj = NMINmM; jjj <= NMAXmM; jjj++) {
260 LEDruns[jjj - NMINmM] = LEDrunsM[jjj];
261 X0[jjj - NMINmM] = X0M[jjj];
270 cout <<
"******************* NP = " << NP << endl;
278 Double_t cutMinA = 100.;
279 Double_t cutMaxA = 5000.;
286 for (
int kk1 = 0; kk1 < NP; kk1++) {
291 if (verbosity == 2) {
292 cout <<
"ORDINATE points: kk1 = " << kk1 <<
" XX[kk1]= " << XX[kk1] << endl;
295 XXE[kk1] = 0.001 * XX[kk1];
302 for (
int jjj = 0; jjj <= 82; jjj++) {
303 for (
int kkk = 0; kkk <= 72; kkk++) {
304 mapRATIOD2[jjj][kkk] = 0.;
305 mapRATIOD20[jjj][kkk] = 0.;
306 normalization[jjj][kkk] = 0.;
308 for (
int k1 = 0; k1 < NP; k1++) {
309 GSMRATIOD2[k1][jjj][kkk] = mapRATIOD2[jjj][kkk];
312 for (
int iii = 0; iii < NDEP; iii++) {
313 mapRATIO[iii][jjj][kkk] = 0.;
325 TString
fname =
"/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMweb/histos/LED_";
329 TH1F* Seff1D =
new TH1F(
"Seff1D",
"", 1000, 10., 1010.);
330 TH1F* Ceff1D =
new TH1F(
"Ceff1D",
"", 1500, 10., 8010.);
332 TH2F* mapBADchannels =
new TH2F(
"mapBADchannels",
" ", 82, -41., 41., 72, 0., 72.);
333 TH2F* mapBADchannels0 =
new TH2F(
"mapBADchannels0",
" ", 82, -41., 41., 72, 0., 72.);
335 TH2F* mapchannelsdepth1 =
new TH2F(
"mapchannelsdepth1",
" ", 82, -41., 41., 72, 0., 72.);
336 TH2F* mapchannelsdepth2 =
new TH2F(
"mapchannelsdepth2",
" ", 82, -41., 41., 72, 0., 72.);
337 TH2F* mapchannelsdepth3 =
new TH2F(
"mapchannelsdepth3",
" ", 82, -41., 41., 72, 0., 72.);
338 TH2F* mapchannelsdepth4 =
new TH2F(
"mapchannelsdepth4",
" ", 82, -41., 41., 72, 0., 72.);
340 TH1F* gainkoeff =
new TH1F(
"gainkoeff",
"", 100, y1, y2);
341 TH1F* gainkoeff0 =
new TH1F(
"gainkoeff0",
"", 100, 0.9, 1.1);
342 TH1F* gainkoeff9 =
new TH1F(
"gainkoeff9",
"", 100, 0.1, 1.9);
343 TH1F* GOODruns =
new TH1F(
"GOODruns",
"", NP, 0.,
float(NP));
344 TH1F* BADruns =
new TH1F(
"BADruns",
"", NP, 0.,
float(NP));
345 TH1F* NotEmptyDepthes =
new TH1F(
"NotEmptyDepthes",
"", 56, 0., 56.);
351 cout <<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! firstrun = " << firstrun <<
" run = " << LEDruns[firstrun] << endl;
358 cout <<
"!!!!!!!!!!!!!!!!!!!!!! use root files from official RMT dir. " << endl;
362 TH1F* Aeff1D =
new TH1F(
"Aeff1D",
"", 250, 0., 500000.);
365 for (
int k1 = firstrun; k1 < NP; k1++) {
374 TString epsName = fname + LEDruns[k1] +
".root";
378 TFile* hfile =
new TFile(epsName,
"READ");
380 TH1F* Aeff1 = (TH1F*)hfile->Get(
"h_ADCAmpl_HF");
382 int kx = Aeff1->GetXaxis()->GetNbins();
385 for (
int jjj = 0; jjj < kx; jjj++) {
386 if (
double(Aeff1->GetBinContent(jjj)) > 0. && maxvalueA < jjj)
389 Aeff1D->Fill(
float(jjj),
double(Aeff1->GetBinContent(jjj)));
391 cout <<
" run = " << LEDruns[k1] <<
" k1= " << k1 <<
" max bin value= " << maxvalueA <<
" ck1count= " << ck1count
404 gStyle->SetOptStat(101110);
405 Aeff1->SetMarkerStyle(20);
406 Aeff1->SetMarkerSize(0.4);
407 Aeff1->GetYaxis()->SetLabelSize(0.04);
408 Aeff1->SetTitle(
"Last run & events & channels");
409 Aeff1->SetXTitle(
"Aijk");
410 Aeff1->SetYTitle(
"N");
411 Aeff1->SetMarkerColor(4);
412 Aeff1->SetLineColor(4);
413 Aeff1->SetMinimum(0.8);
416 TString fdir =
"testamt5gsmHF2018/";
418 TString
plotName = fdir +
"Aijk-Run" + LEDruns[k1] +
".png";
419 c1->SaveAs(plotName);
420 cout <<
"****PLOT AijkLastRun.png is drawn **** " << endl;
424 if (k1 == firstrun) {
431 gStyle->SetOptStat(101110);
432 Aeff1->SetMarkerStyle(20);
433 Aeff1->SetMarkerSize(0.4);
434 Aeff1->GetYaxis()->SetLabelSize(0.04);
435 Aeff1->SetTitle(
"First run & events & channels");
436 Aeff1->SetXTitle(
"Aijk");
437 Aeff1->SetYTitle(
"N");
438 Aeff1->SetMarkerColor(4);
439 Aeff1->SetLineColor(4);
440 Aeff1->SetMinimum(0.8);
443 TString fdir =
"testamt5gsmHF2018/";
444 TString
plotName = fdir +
"AijkFirstRun.png";
445 c1->SaveAs(plotName);
446 cout <<
"****PLOT AijkFirstRun.png is drawn **** " << endl;
466 TH2F* twod1 = (TH2F*)hfile->Get(
"h_mapDepth1ADCAmpl12_HF");
467 TH2F* twod2 = (TH2F*)hfile->Get(
"h_mapDepth2ADCAmpl12_HF");
468 TH2F* twod3 = (TH2F*)hfile->Get(
"h_mapDepth3ADCAmpl12_HF");
470 TH2F* twod4 = (TH2F*)hfile->Get(
"h_mapDepth4ADCAmpl12_HF");
479 int nx = twod1->GetXaxis()->GetNbins();
480 int ny = twod1->GetYaxis()->GetNbins();
483 TH2F* t0010 = (TH2F*)hfile->Get(
"h_mapDepth1_HF");
484 TH2F* t0020 = (TH2F*)hfile->Get(
"h_mapDepth2_HF");
485 TH2F* t0030 = (TH2F*)hfile->Get(
"h_mapDepth3_HF");
486 TH2F* t0040 = (TH2F*)hfile->Get(
"h_mapDepth4_HF");
488 TH2F* Ceff1 = (TH2F*)twod1->Clone(
"Ceff1");
489 TH2F* Ceff2 = (TH2F*)twod2->Clone(
"Ceff2");
490 TH2F* Ceff3 = (TH2F*)twod3->Clone(
"Ceff3");
491 TH2F* Ceff4 = (TH2F*)twod4->Clone(
"Ceff4");
494 Ceff1->Divide(twod1, t0010, 1, 1,
"B");
495 Ceff2->Divide(twod2, t0020, 1, 1,
"B");
496 Ceff3->Divide(twod3, t0030, 1, 1,
"B");
497 Ceff4->Divide(twod4, t0040, 1, 1,
"B");
500 for (
int jjj = 0; jjj < nx; jjj++) {
501 for (
int kkk = 0; kkk < ny; kkk++) {
503 if (flagHFP17selection == 0 ||
504 (flagHFP17selection == 1 && (((jjj > 56 && jjj < 62) && (kkk > 63 && kkk < 68)) ||
505 ((jjj > 61 && jjj < 71) && (kkk == 64 || kkk == 66)))) ||
506 (flagHFP17selection == 2 && !(((jjj > 14 && jjj < 25) && (kkk > 55 && kkk < 64))))) {
509 if (Ceff1->GetBinContent(jjj, kkk) > 0.)
510 mapchannelsdepth1->Fill(
double(jjj) - 41.,
double(kkk), Ceff1->GetBinContent(jjj, kkk));
511 if (Ceff2->GetBinContent(jjj, kkk) > 0.)
512 mapchannelsdepth2->Fill(
double(jjj) - 41.,
double(kkk), Ceff2->GetBinContent(jjj, kkk));
513 if (Ceff3->GetBinContent(jjj, kkk) > 0.)
514 mapchannelsdepth3->Fill(
double(jjj) - 41.,
double(kkk), Ceff3->GetBinContent(jjj, kkk));
515 if (Ceff4->GetBinContent(jjj, kkk) > 0.)
516 mapchannelsdepth4->Fill(
double(jjj) - 41.,
double(kkk), Ceff4->GetBinContent(jjj, kkk));
527 for (
int jjj = 0; jjj < nx; jjj++) {
528 for (
int kkk = 0; kkk < ny; kkk++) {
531 if (flagHFP17selection == 0 ||
532 (flagHFP17selection == 1 && (((jjj > 56 && jjj < 62) && (kkk > 63 && kkk < 68)) ||
533 ((jjj > 61 && jjj < 71) && (kkk == 64 || kkk == 66)))) ||
534 (flagHFP17selection == 2 && !(((jjj > 14 && jjj < 25) && (kkk > 55 && kkk < 64))))) {
537 if (Ceff1->GetBinContent(jjj, kkk) != 0.) {
538 Ceff1D->Fill(Ceff1->GetBinContent(jjj, kkk));
539 Seff1D->Fill(Ceff1->GetBinContent(jjj, kkk));
541 if (Ceff2->GetBinContent(jjj, kkk) != 0.) {
542 Ceff1D->Fill(Ceff2->GetBinContent(jjj, kkk));
543 Seff1D->Fill(Ceff2->GetBinContent(jjj, kkk));
545 if (Ceff3->GetBinContent(jjj, kkk) != 0.) {
546 Ceff1D->Fill(Ceff3->GetBinContent(jjj, kkk));
547 Seff1D->Fill(Ceff3->GetBinContent(jjj, kkk));
549 if (Ceff4->GetBinContent(jjj, kkk) != 0.) {
550 Ceff1D->Fill(Ceff4->GetBinContent(jjj, kkk));
551 Seff1D->Fill(Ceff4->GetBinContent(jjj, kkk));
562 for (
int jjj = 0; jjj < nx; jjj++) {
563 for (
int kkk = 0; kkk < ny; kkk++) {
565 if (flagHFP17selection == 0 ||
566 (flagHFP17selection == 1 && (((jjj > 56 && jjj < 62) && (kkk > 63 && kkk < 68)) ||
567 ((jjj > 61 && jjj < 71) && (kkk == 64 || kkk == 66)))) ||
568 (flagHFP17selection == 2 && !(((jjj > 14 && jjj < 25) && (kkk > 55 && kkk < 64))))) {
569 if (Ceff1->GetBinContent(jjj, kkk) > cutMinA && Ceff1->GetBinContent(jjj, kkk) < cutMaxA)
570 mapRATIO[1][jjj][kkk] = Ceff1->GetBinContent(jjj, kkk);
571 if (Ceff2->GetBinContent(jjj, kkk) > cutMinA && Ceff2->GetBinContent(jjj, kkk) < cutMaxA)
572 mapRATIO[2][jjj][kkk] = Ceff2->GetBinContent(jjj, kkk);
573 if (Ceff3->GetBinContent(jjj, kkk) > cutMinA && Ceff3->GetBinContent(jjj, kkk) < cutMaxA)
574 mapRATIO[3][jjj][kkk] = Ceff3->GetBinContent(jjj, kkk);
575 if (Ceff4->GetBinContent(jjj, kkk) > cutMinA && Ceff4->GetBinContent(jjj, kkk) < cutMaxA)
576 mapRATIO[4][jjj][kkk] = Ceff4->GetBinContent(jjj, kkk);
601 int totalhep17count = 0;
602 int totalhep17count1 = 0;
603 int totalhep17count2 = 0;
604 int totalhep17count3 = 0;
605 int totalhep17count4 = 0;
606 int totalhep17count5 = 0;
607 int totalhep17count6 = 0;
608 int totalhep17count7 = 0;
609 for (
int iii = 1; iii < NDEP; iii++) {
610 for (
int jjj = 0; jjj < nx; jjj++) {
611 for (
int kkk = 0; kkk < ny; kkk++) {
614 if (mapRATIO[iii][jjj][kkk] > 0) {
617 if (verbosity == 4 && k1 == 0) {
618 cout <<
" k1= " << k1 <<
" depth= " << iii <<
" eta= " << jjj <<
" phi= " << kkk
619 <<
" mapRATIO= " << mapRATIO[iii][jjj][kkk] << endl;
636 mapRATIOD2[jjj][kkk] += mapRATIO[iii][jjj][kkk];
638 mapRATIOD20[jjj][kkk]++;
639 if (verbosity == 3 && iii == 3)
640 cout <<
" depth = " << iii <<
" k1 = " << k1 <<
" eta = " << jjj
641 <<
" mapRATIOD2[jjj][kkk] = " << mapRATIOD2[jjj][kkk] <<
" #entries = " << mapRATIOD20[jjj][kkk]
642 <<
" mapRATIO[iii][jjj][kkk] = " << mapRATIO[iii][jjj][kkk] << endl;
651 if (verbosity == 4 && k1 == 0) {
652 cout <<
" k1= " << k1 <<
" totalhep17count= " << totalhep17count << endl;
653 cout <<
" k1= " << k1 <<
" totalhep17count1= " << totalhep17count1 << endl;
654 cout <<
" k1= " << k1 <<
" totalhep17count2= " << totalhep17count2 << endl;
655 cout <<
" k1= " << k1 <<
" totalhep17count3= " << totalhep17count3 << endl;
656 cout <<
" k1= " << k1 <<
" totalhep17count4= " << totalhep17count4 << endl;
657 cout <<
" k1= " << k1 <<
" totalhep17count5= " << totalhep17count5 << endl;
658 cout <<
" k1= " << k1 <<
" totalhep17count6= " << totalhep17count6 << endl;
659 cout <<
" k1= " << k1 <<
" totalhep17count7= " << totalhep17count7 << endl;
664 Int_t depthAVERAGEcount = 0;
665 for (
int jjj = 0; jjj < nx; jjj++) {
666 for (
int kkk = 0; kkk < ny; kkk++) {
669 depthAVERAGEcount = 4 * (jjj - 57) + (kkk - 64);
670 if (mapRATIOD20[jjj][kkk] != 0) {
671 NotEmptyDepthes->Fill(
float(depthAVERAGEcount));
673 cout <<
"****aver per depthes********* phi = " << kkk <<
" RunIndex = " << k1 <<
" eta = " << jjj
674 <<
" #entries = " << mapRATIOD20[jjj][kkk] << endl;
675 mapRATIOD2[jjj][kkk] /= mapRATIOD20[jjj][kkk];
676 if (verbosity == 3 && kkk == 3)
677 cout <<
"****aver per depthes********* phi = " << jjj <<
" RunIndex = " << k1 <<
" eta = " << jjj
678 <<
" Nphi = " << mapRATIOD20[jjj][kkk] << endl;
685 if (k1 == firstrun && kmm == 0) {
687 cout <<
"* to be printed once only CHFCK IT please ************ kmm = " << kmm << endl;
690 for (
int jjj = 0; jjj < nx; jjj++) {
691 for (
int kkk = 0; kkk < ny; kkk++) {
692 normalization[jjj][kkk] = mapRATIOD2[jjj][kkk];
702 for (
int jjj = 0; jjj < nx; jjj++) {
703 for (
int kkk = 0; kkk < ny; kkk++) {
704 if (normalization[jjj][kkk] != 0) {
705 GSMRATIOD2[k1][jjj][kkk] = mapRATIOD2[jjj][kkk] / normalization[jjj][kkk];
707 if (GSMRATIOD2[k1][jjj][kkk] < RrangeMAX && GSMRATIOD2[k1][jjj][kkk] > RrangeMIN) {
708 gainkoeff->Fill(GSMRATIOD2[k1][jjj][kkk]);
709 gainkoeff0->Fill(GSMRATIOD2[k1][jjj][kkk]);
710 gainkoeff9->Fill(GSMRATIOD2[k1][jjj][kkk]);
716 GOODruns->Fill(
float(k1));
718 if (GSMRATIOD2[k1][jjj][kkk] > 0.)
719 BADruns->Fill(
float(k1));
733 for (
int jjj = 0; jjj <= 82; jjj++) {
734 for (
int kkk = 0; kkk <= 72; kkk++) {
735 mapRATIOD2[jjj][kkk] = 0.;
736 mapRATIOD20[jjj][kkk] = 0.;
737 for (
int iii = 0; iii < NDEP; iii++) {
738 mapRATIO[iii][jjj][kkk] = 0.;
750 cout <<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DONE: last LED run READ " << endl;
764 cout <<
"**** **** **** **** **** Draw Dependencies: *** " << endl;
767 Int_t Method = NMethodsStart;
768 while (Method < NMethodsToUse + 1) {
769 if (Method != 9999992) {
770 cout <<
" **** START Method " << Method << endl;
773 cout <<
"****Draw 0 Dependencies: <Aijk> for each event and all LED runs *** " << endl;
777 gStyle->SetOptStat(101110);
778 Ceff1D->SetMarkerStyle(20);
779 Ceff1D->SetMarkerSize(0.4);
780 Ceff1D->GetYaxis()->SetLabelSize(0.04);
781 Ceff1D->SetTitle(
"all runs & channels");
782 Ceff1D->SetXTitle(
"<Aijk>");
783 Ceff1D->SetYTitle(
"N");
784 Ceff1D->SetMarkerColor(4);
785 Ceff1D->SetLineColor(4);
791 cout <<
"****Draw 1 Dependencies: <Aijk> for each event and all LED runs ZOOM *** " << endl;
795 gStyle->SetOptStat(101110);
797 Seff1D->SetMarkerStyle(20);
798 Seff1D->SetMarkerSize(0.4);
799 Seff1D->GetYaxis()->SetLabelSize(0.04);
800 Seff1D->SetTitle(
"ZOOM all runs & channels");
801 Seff1D->SetXTitle(
"<Aijk> ZOOM ");
802 Seff1D->SetYTitle(
"N");
803 Seff1D->SetMarkerColor(4);
804 Seff1D->SetLineColor(4);
811 cout <<
"****Draw 2 Dependencies: GSM ratio vs days *** " << endl;
812 for (
int k1 = 0; k1 < NP; k1++) {
818 TPad* pad1 =
new TPad(
"pad1",
"This is pad1", 0.02, 0.02, 0.99, 0.99, 0);
821 pad1->Range(-0.255174, -19.25, 2.29657, -6.75);
823 pad1->DrawFrame(x1, y1, x2, y2);
825 pad1->GetFrame()->SetFillColor(0);
830 Int_t colorlines = 0;
831 Int_t generalcount = 0;
834 for (
int jjj = 0; jjj < 82; jjj++) {
835 for (
int kkk = 0; kkk < 72; kkk++) {
837 for (
int k1 = 0; k1 < NP; k1++) {
838 if (GSMRATIOD2[k1][jjj][kkk] != 0) {
841 if (GSMRATIOD2[k1][jjj][kkk] < RrangeMAX && GSMRATIOD2[k1][jjj][kkk] > RrangeMIN) {
845 YY[sscount] = GSMRATIOD2[k1][jjj][kkk];
846 XXX[sscount] = XX[k1];
847 indWAS[sscount] = k1;
848 mapBADchannels->Fill(
double(jjj) - 42.,
double(kkk) - 1., GSMRATIOD2[k1][jjj][kkk]);
849 mapBADchannels0->Fill(
double(jjj) - 42.,
double(kkk) - 1., 1.);
856 Int_t MMcount = sscount + 1;
859 if (generalcount == 1 && verbosity == 2)
860 for (
int k1 = 0; k1 < MMcount; k1++) {
861 cout <<
"**** All GOOD runs: indWAS[k1](1,..) = " << indWAS[k1] + 1 <<
" XXX[k1]+1 = " << XXX[k1] + 1
864 gr1 =
new TGraph(MMcount, XXX, YY);
865 colorlines = generalcount / 5. + 2;
866 gr1->SetLineColor(colorlines);
867 gr1->SetMarkerColor(colorlines);
868 gr1->SetMarkerStyle(20);
869 gr1->SetMarkerSize(1.2);
870 gr1->SetFillStyle(0);
871 gr1->GetXaxis()->SetTitle(
"days");
872 gr1->GetYaxis()->SetTitle(
"R");
881 TLegend leg(xx1, yy1, xx2, yy2,
"HF: R vs t(days)");
884 leg.SetBorderSize(1);
885 leg.DrawClone(
"Same");
906 cout <<
"****Draw 3 Dependencies: 2D SiPM channels *** " << endl;
907 TH2F* Cdepth2hbff = (TH2F*)mapBADchannels->Clone(
"Cdepth2hbff");
908 Cdepth2hbff->Divide(mapBADchannels, mapBADchannels0, 1, 1,
"B");
909 Cdepth2hbff->Sumw2();
912 gStyle->SetOptStat(0000000);
913 Cdepth2hbff->SetMarkerStyle(20);
914 Cdepth2hbff->SetMarkerSize(0.4);
915 Cdepth2hbff->GetYaxis()->SetLabelSize(0.04);
916 Cdepth2hbff->SetTitle(
"within R & Weighted by R");
917 Cdepth2hbff->SetXTitle(
"#eta \b");
918 Cdepth2hbff->SetYTitle(
"#phi \b");
919 Cdepth2hbff->SetMarkerColor(4);
920 Cdepth2hbff->SetLineColor(4);
921 Cdepth2hbff->Draw(
"COLZ");
925 cout <<
"****Draw 4 Dependencies: gains LED runs *** " << endl;
930 gStyle->SetOptStat(1100);
932 gainkoeff->SetMarkerStyle(20);
933 gainkoeff->SetMarkerSize(0.4);
934 gainkoeff->GetYaxis()->SetLabelSize(0.04);
935 gainkoeff->SetXTitle(
"gains");
936 gainkoeff->SetYTitle(
"N");
937 gainkoeff->SetMarkerColor(4);
938 gainkoeff->SetLineColor(4);
940 gainkoeff->Draw(
"PL");
944 cout <<
"****Draw 5 Dependencies: gains LED runs *** " << endl;
949 gStyle->SetOptStat(1100);
951 gainkoeff9->SetMarkerStyle(20);
952 gainkoeff9->SetMarkerSize(0.4);
953 gainkoeff9->GetYaxis()->SetLabelSize(0.04);
954 gainkoeff9->SetXTitle(
"gains");
955 gainkoeff9->SetYTitle(
"N");
956 gainkoeff9->SetMarkerColor(4);
957 gainkoeff9->SetLineColor(4);
959 gainkoeff9->Draw(
"PL");
963 cout <<
"****Draw 6 Dependencies: gains LED runs *** " << endl;
968 gStyle->SetOptStat(1100);
970 gainkoeff0->SetMarkerStyle(20);
971 gainkoeff0->SetMarkerSize(0.4);
972 gainkoeff0->GetYaxis()->SetLabelSize(0.04);
973 gainkoeff0->SetXTitle(
"gains");
974 gainkoeff0->SetYTitle(
"N");
975 gainkoeff0->SetMarkerColor(4);
976 gainkoeff0->SetLineColor(4);
978 gainkoeff0->Draw(
"PL");
982 cout <<
"****Draw 7 Dependencies: BADruns *** " << endl;
986 gPad->SetLogy(kFALSE);
987 gStyle->SetOptStat(101110);
988 BADruns->SetMarkerStyle(20);
989 BADruns->SetMarkerSize(0.4);
990 BADruns->GetYaxis()->SetLabelSize(0.04);
991 BADruns->SetTitle(
"#channels outside Rrange VS iRun");
992 BADruns->SetXTitle(
"iRun");
993 BADruns->SetYTitle(
"#channels");
994 BADruns->SetMarkerColor(4);
995 BADruns->SetLineColor(4);
1000 int cx = BADruns->GetXaxis()->GetNbins();
1001 cout <<
"***** ************* Number of runs w/ R outside unit-range = " << cx << endl;
1003 for (
int jjj = 1; jjj <= cx; jjj++) {
1004 if (BADruns->GetBinContent(jjj) > 200.) {
1005 cout <<
"BADruns w/ content>60: jjj= " << jjj <<
" run= " << LEDruns[jjj - 1]
1006 <<
" R ouside unit-range for # channels= " << BADruns->GetBinContent(jjj) << endl;
1011 cout <<
"BADruns w/ content>60 nbadruns= " << nbadruns << endl;
1017 cout <<
"****Draw 8 Dependencies: Goodruns *** " << endl;
1021 gStyle->SetOptStat(101110);
1022 GOODruns->SetMarkerStyle(20);
1023 GOODruns->SetMarkerSize(0.4);
1024 GOODruns->GetYaxis()->SetLabelSize(0.04);
1025 GOODruns->SetTitle(
"#channels inside Rrange VS iRun");
1026 GOODruns->SetXTitle(
"iRun");
1027 GOODruns->SetYTitle(
"#channels");
1028 GOODruns->SetMarkerColor(4);
1029 GOODruns->SetLineColor(4);
1031 GOODruns->Draw(
"PL");
1034 int cx = GOODruns->GetXaxis()->GetNbins();
1035 cout <<
"************* cx = " << cx << endl;
1036 for (
int jjj = 0; jjj <= cx; jjj++) {
1039 if (GOODruns->GetBinContent(jjj) > 1400.)
1040 cout <<
"GOODruns: k1(0,...)= " << jjj
1041 <<
" GOODruns->GetBinContent(jjj)= " << GOODruns->GetBinContent(jjj) << endl;
1048 cout <<
"****Draw 9 Dependencies: depthes with zero A *** " << endl;
1051 gPad->SetLogy(kFALSE);
1052 gStyle->SetOptStat(1110000);
1053 NotEmptyDepthes->SetMarkerStyle(20);
1054 NotEmptyDepthes->SetMarkerSize(0.4);
1055 NotEmptyDepthes->GetYaxis()->SetLabelSize(0.04);
1056 NotEmptyDepthes->SetTitle(
"# Not Empty Channels in etq-phi projection");
1057 NotEmptyDepthes->SetXTitle(
"4*(eta-57)+(phi-64)");
1058 NotEmptyDepthes->SetYTitle(
"N");
1059 NotEmptyDepthes->SetMarkerColor(4);
1060 NotEmptyDepthes->SetLineColor(4);
1062 NotEmptyDepthes->Draw(
"PL");
1066 cout <<
"****Draw 10 Dependencies: Aijk for each event and all LED runs *** " << endl;
1079 gStyle->SetOptStat(101110);
1081 Aeff1D->SetMarkerStyle(20);
1082 Aeff1D->SetMarkerSize(0.4);
1083 Aeff1D->GetYaxis()->SetLabelSize(0.04);
1084 Aeff1D->SetTitle(
"all runs & events& channels");
1085 Aeff1D->SetXTitle(
"Aijk");
1086 Aeff1D->SetYTitle(
"N");
1087 Aeff1D->SetMarkerColor(4);
1088 Aeff1D->SetLineColor(4);
1091 Aeff1D->SetMinimum(0.8);
1099 cout <<
"****Draw 11 <A>: 2D Depthes1,2,3,4 *** " << endl;
1107 mapchannelsdepth1->SetStats(0);
1108 mapchannelsdepth1->SetTitle(
"<A> Depth1");
1109 mapchannelsdepth1->SetXTitle(
"#eta \b");
1110 mapchannelsdepth1->SetYTitle(
"#phi \b");
1111 mapchannelsdepth1->Draw(
"COLZ");
1113 mapchannelsdepth2->SetStats(0);
1114 mapchannelsdepth2->SetTitle(
"<A> Depth2");
1115 mapchannelsdepth2->SetXTitle(
"#eta \b");
1116 mapchannelsdepth2->SetYTitle(
"#phi \b");
1117 mapchannelsdepth2->Draw(
"COLZ");
1119 mapchannelsdepth3->SetStats(0);
1120 mapchannelsdepth3->SetTitle(
"<A> Depth3");
1121 mapchannelsdepth3->SetXTitle(
"#eta \b");
1122 mapchannelsdepth3->SetYTitle(
"#phi \b");
1123 mapchannelsdepth3->Draw(
"COLZ");
1125 mapchannelsdepth4->SetStats(0);
1126 mapchannelsdepth4->SetTitle(
"<A> Depth4");
1127 mapchannelsdepth4->SetXTitle(
"#eta \b");
1128 mapchannelsdepth4->SetYTitle(
"#phi \b");
1129 mapchannelsdepth4->Draw(
"COLZ");
1136 cout <<
"****Draw 12 not used yet *** " << endl;
1153 cout <<
"****Draw 13 function, fC *** " << endl;
1159 double c0 = 1.000000;
1160 double b1 = 2.71238e-05;
1161 double a2 = 1.32877e-10;
1163 Double_t x[
n], y[
n];
1164 for (Int_t
i = 0;
i <
n;
i++) {
1165 x[
i] = (
i + 1) * 20000.;
1166 y[
i] = a2 * x[
i] * x[
i] / 40. / 40. + b1 * x[
i] / 40. + c0;
1170 TGraph* gr =
new TGraph(n, x, y);
1195 TString fdir =
"testamt5gsmHF2018/";
1197 TString
plotName = fdir + MethodName[Method] +
".png";
1198 c1->SaveAs(plotName);
1199 cout <<
"****PLOT " << Method <<
" drawn **** " << endl;
static constexpr float b1