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",
94 const Int_t NMAXM = 73;
96 cout <<
"********************************************************************* NMAXM = " << NMAXM << endl;
101 TString LEDrunsM[NMAXM] = {
169 "315812",
"315984",
"316826",
"317116",
"317193",
"317268",
"317271",
"317273",
"317363",
"317444",
"317606",
170 "317607",
"317609",
"317610",
"317611",
"317612",
"317613",
"317617",
"317785",
"318758",
"319198",
"319401",
171 "319517",
"319519",
"319520",
"319564",
"319612",
"319734",
"319771",
"319774",
"319857",
"319969",
"320117",
172 "320158",
"320203",
"320205",
"320348",
"320579",
"320873",
"320892",
"320952",
"321019",
"321036",
"321187",
173 "321339",
"321359",
"321371",
"321447",
"321514",
"321853",
"321874",
"322781",
"322782",
"323314",
"323502",
174 "323579",
"323613",
"323742",
"324030",
"324032",
"324138",
"324225",
"324296",
"324919",
"325141",
"325787",
175 "326234",
"326780",
"326875",
"327288",
"327438",
"327552",
"327579"
185 cout <<
"********************************************************************* first massives defined " << endl;
193 Float_t X0M[NMAXM] = {
209 0., 2., 17., 22., 23., 24., 24., 24., 27., 29., 32., 32., 32., 32., 32., 32., 32., 32., 38.,
210 51., 58., 63., 65., 65., 65., 66., 68., 70., 71., 71., 72., 74., 77., 78., 79., 79., 80., 85.,
211 90., 91., 92., 93., 93., 98., 101., 101., 101., 104., 106., 112., 112., 129., 129., 138., 141., 142., 143.,
212 146., 150., 150., 151., 153., 155., 165., 169., 179., 183., 193., 195., 203., 205., 208., 209.
263 cout <<
"********************************************************************* both massives are defined " << endl;
301 const Int_t yearcase = 0;
303 cout <<
"************************************** yearcase = " << yearcase << endl;
314 const Int_t flagHEP17selection = 2;
318 cout <<
"************************************** flagHEP17selection = " << flagHEP17selection << endl;
330 TCanvas*
c1 =
new TCanvas(
"c1",
"GSM", 10, 10, 1010, 1010);
335 c1->Range(0, 0, 25, 18);
340 TLatex*
t =
new TLatex();
343 t->SetTextSize(0.03);
347 0.9, 15.5,
"Time dependence of full Amplitude averaged over events of each LED run for some random HE channels");
369 Float_t RrangeMIN = y1;
370 Float_t RrangeMAX = y2;
378 cout <<
"************************************** RrangeMIN = " << RrangeMIN <<
" RrangeMAX = " << RrangeMAX << endl;
383 const Int_t NDEP = 8;
384 const Int_t NETA0 = 83;
385 const Int_t NPHI0 = 73;
387 Double_t mapRATIO[NDEP][NETA0][NPHI0];
388 Double_t mapRATIOD2[NETA0][NPHI0];
389 Int_t mapRATIOD20[NETA0][NPHI0];
392 Double_t normalization[NETA0][NPHI0];
393 cout <<
"************************************** NDEP = " << NDEP <<
" NETA0 = " << NETA0 <<
" NPHI0 = " << NPHI0
397 Int_t NMAXSIZE = NMAXM;
398 Float_t
X0[NMAXSIZE];
399 TString LEDruns[NMAXSIZE];
400 Double_t
XX[NMAXSIZE];
401 Double_t XXE[NMAXSIZE];
402 Double_t XXX[NMAXSIZE];
403 Double_t XXXE[NMAXSIZE];
404 Int_t indWAS[NMAXSIZE];
406 Double_t
YY[NMAXSIZE];
407 Double_t YYE[NMAXSIZE];
408 cout <<
"************************************** NMAXSIZE = " << NMAXSIZE <<
" NMAXM = " << NMAXM << endl;
411 Double_t GSMRATIOD2[NMAXSIZE][NETA0][NPHI0];
419 Int_t NMAXmM = NMAXSIZE - 1;
420 Int_t NMAXaM = NMAXSIZE;
426 }
else if (yearcase == 2) {
431 }
else if (yearcase == 3) {
436 }
else if (yearcase == 4) {
441 }
else if (yearcase == 5) {
448 cout <<
"************************************** NMINmM = " << NMINmM <<
" NMAXmM = " << NMAXmM
449 <<
" NMAXaM = " << NMAXaM << endl;
450 if (NMINmM == -1 || NMAXmM == -1 || NMAXaM == -1)
451 cout <<
" STOP !!!!!! NMINmM == -1 || NMAXmM == -1 || NMAXaM == -1 " << endl;
456 for (
int jjj = NMINmM; jjj <= NMAXmM; jjj++) {
457 LEDruns[jjj - NMINmM] = LEDrunsM[jjj];
458 X0[jjj - NMINmM] = X0M[jjj];
467 cout <<
"******************* NP = " << NP << endl;
474 Double_t cutMinA = 50000.;
475 Double_t cutMaxA = 150000.;
483 for (
int kk1 = 0; kk1 < NP; kk1++) {
488 if (verbosity == 2) {
489 cout <<
"ORDINATE points: kk1 = " << kk1 <<
" XX[kk1]= " << XX[kk1] << endl;
492 XXE[kk1] = 0.001 * XX[kk1];
499 for (
int jjj = 0; jjj <= 82; jjj++) {
500 for (
int kkk = 0; kkk <= 72; kkk++) {
501 mapRATIOD2[jjj][kkk] = 0.;
502 mapRATIOD20[jjj][kkk] = 0.;
503 normalization[jjj][kkk] = 0.;
505 for (
int k1 = 0; k1 < NP; k1++) {
506 GSMRATIOD2[k1][jjj][kkk] = mapRATIOD2[jjj][kkk];
509 for (
int iii = 0; iii < NDEP; iii++) {
510 mapRATIO[iii][jjj][kkk] = 0.;
522 TString
fname =
"/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMweb/histos/LED_";
526 TH1F* Seff1D =
new TH1F(
"Seff1D",
"", 1000, 10., 100010.);
527 TH1F* Ceff1D =
new TH1F(
"Ceff1D",
"", 1500, 10., 500010.);
534 TH2F* mapBADchannels =
new TH2F(
"mapBADchannels",
" ", 82, -41., 41., 72, 0., 72.);
535 TH2F* mapBADchannels0 =
new TH2F(
"mapBADchannels0",
" ", 82, -41., 41., 72, 0., 72.);
537 TH2F* mapchannelsdepth1 =
new TH2F(
"mapchannelsdepth1",
" ", 82, -41., 41., 72, 0., 72.);
538 TH2F* mapchannelsdepth2 =
new TH2F(
"mapchannelsdepth2",
" ", 82, -41., 41., 72, 0., 72.);
539 TH2F* mapchannelsdepth3 =
new TH2F(
"mapchannelsdepth3",
" ", 82, -41., 41., 72, 0., 72.);
540 TH2F* mapchannelsdepth4 =
new TH2F(
"mapchannelsdepth4",
" ", 82, -41., 41., 72, 0., 72.);
541 TH2F* mapchannelsdepth5 =
new TH2F(
"mapchannelsdepth5",
" ", 82, -41., 41., 72, 0., 72.);
542 TH2F* mapchannelsdepth6 =
new TH2F(
"mapchannelsdepth6",
" ", 82, -41., 41., 72, 0., 72.);
543 TH2F* mapchannelsdepth7 =
new TH2F(
"mapchannelsdepth7",
" ", 82, -41., 41., 72, 0., 72.);
545 TH1F* gainkoeff =
new TH1F(
"gainkoeff",
"", 100, y1, y2);
546 TH1F* gainkoeff0 =
new TH1F(
"gainkoeff0",
"", 100, 0.9, 1.1);
547 TH1F* gainkoeff9 =
new TH1F(
"gainkoeff9",
"", 100, 0.1, 1.9);
548 TH1F* GOODruns =
new TH1F(
"GOODruns",
"", NP, 0.,
float(NP));
549 TH1F* BADruns =
new TH1F(
"BADruns",
"", NP, 0.,
float(NP));
550 TH1F* NotEmptyDepthes =
new TH1F(
"NotEmptyDepthes",
"", 56, 0., 56.);
569 cout <<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! firstrun = " << firstrun <<
" run = " << LEDruns[firstrun] << endl;
577 cout <<
"!!!!!!!!!!!!!!!!!!!!!! use root files from my shunt6 dir. " << endl;
582 TH1F* Aeff1D =
new TH1F(
"Aeff1D",
"", 200, 0., 2000000.);
584 for (
int k1 = firstrun; k1 < NP; k1++) {
607 TString epsName = fname + LEDruns[k1] +
".root";
611 TFile* hfile =
new TFile(epsName,
"READ");
623 TH1F* Aeff1 = (TH1F*)hfile->Get(
"h_ADCAmpl_HE");
625 int kx = Aeff1->GetXaxis()->GetNbins();
628 for (
int jjj = 0; jjj < kx; jjj++) {
629 if (
double(Aeff1->GetBinContent(jjj)) > 0. && maxvalueA < jjj)
632 Aeff1D->Fill(
float(jjj),
double(Aeff1->GetBinContent(jjj)));
634 cout <<
" run = " << LEDruns[k1] <<
" k1= " << k1 <<
" max bin value= " << maxvalueA <<
" ck1count= " << ck1count
647 gStyle->SetOptStat(101110);
648 Aeff1->SetMarkerStyle(20);
649 Aeff1->SetMarkerSize(0.4);
650 Aeff1->GetYaxis()->SetLabelSize(0.04);
652 Aeff1->SetXTitle(
"Aijk");
653 Aeff1->SetYTitle(
"N");
654 Aeff1->SetMarkerColor(4);
655 Aeff1->SetLineColor(4);
656 Aeff1->SetMinimum(0.8);
659 TString fdir =
"testamt0shunt6gsm2018/";
661 TString
plotName = fdir +
"Aijk-Run" + LEDruns[k1] +
".png";
662 c1->SaveAs(plotName);
663 cout <<
"****PLOT AijkLastRun.png is drawn **** " << endl;
667 if (k1 == firstrun) {
674 gStyle->SetOptStat(101110);
675 Aeff1->SetMarkerStyle(20);
676 Aeff1->SetMarkerSize(0.4);
677 Aeff1->GetYaxis()->SetLabelSize(0.04);
678 Aeff1->SetTitle(
"First run & events & channels");
679 Aeff1->SetXTitle(
"Aijk");
680 Aeff1->SetYTitle(
"N");
681 Aeff1->SetMarkerColor(4);
682 Aeff1->SetLineColor(4);
683 Aeff1->SetMinimum(0.8);
686 TString fdir =
"testamt0shunt6gsm2018/";
687 TString plotName = fdir +
"AijkFirstRun.png";
688 c1->SaveAs(plotName);
689 cout <<
"****PLOT AijkLAST.png is drawn **** " << endl;
709 TH2F* twod1 = (TH2F*)hfile->Get(
"h_mapDepth1ADCAmpl12_HE");
710 TH2F* twod2 = (TH2F*)hfile->Get(
"h_mapDepth2ADCAmpl12_HE");
711 TH2F* twod3 = (TH2F*)hfile->Get(
"h_mapDepth3ADCAmpl12_HE");
713 TH2F* twod4 = (TH2F*)hfile->Get(
"h_mapDepth4ADCAmpl12_HE");
714 TH2F* twod5 = (TH2F*)hfile->Get(
"h_mapDepth5ADCAmpl12_HE");
715 TH2F* twod6 = (TH2F*)hfile->Get(
"h_mapDepth6ADCAmpl12_HE");
716 TH2F* twod7 = (TH2F*)hfile->Get(
"h_mapDepth7ADCAmpl12_HE");
728 int nx = twod1->GetXaxis()->GetNbins();
729 int ny = twod1->GetYaxis()->GetNbins();
732 TH2F* t0010 = (TH2F*)hfile->Get(
"h_mapDepth1_HE");
733 TH2F* t0020 = (TH2F*)hfile->Get(
"h_mapDepth2_HE");
734 TH2F* t0030 = (TH2F*)hfile->Get(
"h_mapDepth3_HE");
735 TH2F* t0040 = (TH2F*)hfile->Get(
"h_mapDepth4_HE");
736 TH2F* t0050 = (TH2F*)hfile->Get(
"h_mapDepth5_HE");
737 TH2F* t0060 = (TH2F*)hfile->Get(
"h_mapDepth6_HE");
738 TH2F* t0070 = (TH2F*)hfile->Get(
"h_mapDepth7_HE");
740 TH2F* Ceff1 = (TH2F*)twod1->Clone(
"Ceff1");
741 TH2F* Ceff2 = (TH2F*)twod2->Clone(
"Ceff2");
742 TH2F* Ceff3 = (TH2F*)twod3->Clone(
"Ceff3");
743 TH2F* Ceff4 = (TH2F*)twod4->Clone(
"Ceff4");
744 TH2F* Ceff5 = (TH2F*)twod5->Clone(
"Ceff5");
745 TH2F* Ceff6 = (TH2F*)twod6->Clone(
"Ceff6");
746 TH2F* Ceff7 = (TH2F*)twod7->Clone(
"Ceff7");
749 Ceff1->Divide(twod1, t0010, 1, 1,
"B");
750 Ceff2->Divide(twod2, t0020, 1, 1,
"B");
751 Ceff3->Divide(twod3, t0030, 1, 1,
"B");
752 Ceff4->Divide(twod4, t0040, 1, 1,
"B");
753 Ceff5->Divide(twod5, t0050, 1, 1,
"B");
754 Ceff6->Divide(twod6, t0060, 1, 1,
"B");
755 Ceff7->Divide(twod7, t0070, 1, 1,
"B");
758 for (
int jjj = 0; jjj < nx; jjj++) {
759 for (
int kkk = 0; kkk < ny; kkk++) {
761 if (flagHEP17selection == 0 ||
762 (flagHEP17selection == 1 && (((jjj > 56 && jjj < 62) && (kkk > 63 && kkk < 68)) ||
763 ((jjj > 61 && jjj < 71) && (kkk == 64 || kkk == 66)))) ||
764 (flagHEP17selection == 2 && !(((jjj > 14 && jjj < 25) && (kkk > 55 && kkk < 64))))) {
767 if (Ceff1->GetBinContent(jjj, kkk) > 0.)
768 mapchannelsdepth1->Fill(
double(jjj) - 41.,
double(kkk), Ceff1->GetBinContent(jjj, kkk));
769 if (Ceff2->GetBinContent(jjj, kkk) > 0.)
770 mapchannelsdepth2->Fill(
double(jjj) - 41.,
double(kkk), Ceff2->GetBinContent(jjj, kkk));
771 if (Ceff3->GetBinContent(jjj, kkk) > 0.)
772 mapchannelsdepth3->Fill(
double(jjj) - 41.,
double(kkk), Ceff3->GetBinContent(jjj, kkk));
773 if (Ceff4->GetBinContent(jjj, kkk) > 0.)
774 mapchannelsdepth4->Fill(
double(jjj) - 41.,
double(kkk), Ceff4->GetBinContent(jjj, kkk));
775 if (Ceff5->GetBinContent(jjj, kkk) > 0.)
776 mapchannelsdepth5->Fill(
double(jjj) - 41.,
double(kkk), Ceff5->GetBinContent(jjj, kkk));
777 if (Ceff6->GetBinContent(jjj, kkk) > 0.)
778 mapchannelsdepth6->Fill(
double(jjj) - 41.,
double(kkk), Ceff6->GetBinContent(jjj, kkk));
779 if (Ceff7->GetBinContent(jjj, kkk) > 0.)
780 mapchannelsdepth7->Fill(
double(jjj) - 41.,
double(kkk), Ceff7->GetBinContent(jjj, kkk));
791 for (
int jjj = 0; jjj < nx; jjj++) {
792 for (
int kkk = 0; kkk < ny; kkk++) {
795 if (flagHEP17selection == 0 ||
796 (flagHEP17selection == 1 && (((jjj > 56 && jjj < 62) && (kkk > 63 && kkk < 68)) ||
797 ((jjj > 61 && jjj < 71) && (kkk == 64 || kkk == 66)))) ||
798 (flagHEP17selection == 2 && !(((jjj > 14 && jjj < 25) && (kkk > 55 && kkk < 64))))) {
801 if (Ceff1->GetBinContent(jjj, kkk) != 0.) {
802 Ceff1D->Fill(Ceff1->GetBinContent(jjj, kkk));
803 Seff1D->Fill(Ceff1->GetBinContent(jjj, kkk));
805 if (Ceff2->GetBinContent(jjj, kkk) != 0.) {
806 Ceff1D->Fill(Ceff2->GetBinContent(jjj, kkk));
807 Seff1D->Fill(Ceff2->GetBinContent(jjj, kkk));
809 if (Ceff3->GetBinContent(jjj, kkk) != 0.) {
810 Ceff1D->Fill(Ceff3->GetBinContent(jjj, kkk));
811 Seff1D->Fill(Ceff3->GetBinContent(jjj, kkk));
813 if (Ceff4->GetBinContent(jjj, kkk) != 0.) {
814 Ceff1D->Fill(Ceff4->GetBinContent(jjj, kkk));
815 Seff1D->Fill(Ceff4->GetBinContent(jjj, kkk));
817 if (Ceff5->GetBinContent(jjj, kkk) != 0.) {
818 Ceff1D->Fill(Ceff5->GetBinContent(jjj, kkk));
819 Seff1D->Fill(Ceff5->GetBinContent(jjj, kkk));
821 if (Ceff6->GetBinContent(jjj, kkk) != 0.) {
822 Ceff1D->Fill(Ceff6->GetBinContent(jjj, kkk));
823 Seff1D->Fill(Ceff6->GetBinContent(jjj, kkk));
825 if (Ceff7->GetBinContent(jjj, kkk) != 0.) {
826 Ceff1D->Fill(Ceff7->GetBinContent(jjj, kkk));
827 Seff1D->Fill(Ceff7->GetBinContent(jjj, kkk));
838 for (
int jjj = 0; jjj < nx; jjj++) {
839 for (
int kkk = 0; kkk < ny; kkk++) {
841 if (flagHEP17selection == 0 ||
842 (flagHEP17selection == 1 && (((jjj > 56 && jjj < 62) && (kkk > 63 && kkk < 68)) ||
843 ((jjj > 61 && jjj < 71) && (kkk == 64 || kkk == 66)))) ||
844 (flagHEP17selection == 2 && !(((jjj > 14 && jjj < 25) && (kkk > 55 && kkk < 64))))) {
845 if (Ceff1->GetBinContent(jjj, kkk) > cutMinA && Ceff1->GetBinContent(jjj, kkk) < cutMaxA)
846 mapRATIO[1][jjj][kkk] = Ceff1->GetBinContent(jjj, kkk);
847 if (Ceff2->GetBinContent(jjj, kkk) > cutMinA && Ceff2->GetBinContent(jjj, kkk) < cutMaxA)
848 mapRATIO[2][jjj][kkk] = Ceff2->GetBinContent(jjj, kkk);
849 if (Ceff3->GetBinContent(jjj, kkk) > cutMinA && Ceff3->GetBinContent(jjj, kkk) < cutMaxA)
850 mapRATIO[3][jjj][kkk] = Ceff3->GetBinContent(jjj, kkk);
851 if (Ceff4->GetBinContent(jjj, kkk) > cutMinA && Ceff4->GetBinContent(jjj, kkk) < cutMaxA)
852 mapRATIO[4][jjj][kkk] = Ceff4->GetBinContent(jjj, kkk);
853 if (Ceff5->GetBinContent(jjj, kkk) > cutMinA && Ceff5->GetBinContent(jjj, kkk) < cutMaxA)
854 mapRATIO[5][jjj][kkk] = Ceff5->GetBinContent(jjj, kkk);
855 if (Ceff6->GetBinContent(jjj, kkk) > cutMinA && Ceff6->GetBinContent(jjj, kkk) < cutMaxA)
856 mapRATIO[6][jjj][kkk] = Ceff6->GetBinContent(jjj, kkk);
857 if (Ceff7->GetBinContent(jjj, kkk) > cutMinA && Ceff7->GetBinContent(jjj, kkk) < cutMaxA)
858 mapRATIO[7][jjj][kkk] = Ceff7->GetBinContent(jjj, kkk);
883 int totalhep17count = 0;
884 int totalhep17count1 = 0;
885 int totalhep17count2 = 0;
886 int totalhep17count3 = 0;
887 int totalhep17count4 = 0;
888 int totalhep17count5 = 0;
889 int totalhep17count6 = 0;
890 int totalhep17count7 = 0;
891 for (
int iii = 1; iii < NDEP; iii++) {
892 for (
int jjj = 0; jjj < nx; jjj++) {
893 for (
int kkk = 0; kkk < ny; kkk++) {
896 if (mapRATIO[iii][jjj][kkk] > 0) {
899 if (verbosity == 4 && k1 == 0) {
900 cout <<
" k1= " << k1 <<
" depth= " << iii <<
" eta= " << jjj <<
" phi= " << kkk
901 <<
" mapRATIO= " << mapRATIO[iii][jjj][kkk] << endl;
918 mapRATIOD2[jjj][kkk] += mapRATIO[iii][jjj][kkk];
920 mapRATIOD20[jjj][kkk]++;
921 if (verbosity == 3 && iii == 3)
922 cout <<
" depth = " << iii <<
" k1 = " << k1 <<
" eta = " << jjj
923 <<
" mapRATIOD2[jjj][kkk] = " << mapRATIOD2[jjj][kkk] <<
" #entries = " << mapRATIOD20[jjj][kkk]
924 <<
" mapRATIO[iii][jjj][kkk] = " << mapRATIO[iii][jjj][kkk] << endl;
933 if (verbosity == 4 && k1 == 0) {
934 cout <<
" k1= " << k1 <<
" totalhep17count= " << totalhep17count << endl;
935 cout <<
" k1= " << k1 <<
" totalhep17count1= " << totalhep17count1 << endl;
936 cout <<
" k1= " << k1 <<
" totalhep17count2= " << totalhep17count2 << endl;
937 cout <<
" k1= " << k1 <<
" totalhep17count3= " << totalhep17count3 << endl;
938 cout <<
" k1= " << k1 <<
" totalhep17count4= " << totalhep17count4 << endl;
939 cout <<
" k1= " << k1 <<
" totalhep17count5= " << totalhep17count5 << endl;
940 cout <<
" k1= " << k1 <<
" totalhep17count6= " << totalhep17count6 << endl;
941 cout <<
" k1= " << k1 <<
" totalhep17count7= " << totalhep17count7 << endl;
946 Int_t depthAVERAGEcount = 0;
947 for (
int jjj = 0; jjj < nx; jjj++) {
948 for (
int kkk = 0; kkk < ny; kkk++) {
951 depthAVERAGEcount = 4 * (jjj - 57) + (kkk - 64);
952 if (mapRATIOD20[jjj][kkk] != 0) {
953 NotEmptyDepthes->Fill(
float(depthAVERAGEcount));
955 cout <<
"****aver per depthes********* phi = " << kkk <<
" RunIndex = " << k1 <<
" eta = " << jjj
956 <<
" #entries = " << mapRATIOD20[jjj][kkk] << endl;
957 mapRATIOD2[jjj][kkk] /= mapRATIOD20[jjj][kkk];
958 if (verbosity == 3 && kkk == 3)
959 cout <<
"****aver per depthes********* phi = " << jjj <<
" RunIndex = " << k1 <<
" eta = " << jjj
960 <<
" Nphi = " << mapRATIOD20[jjj][kkk] << endl;
967 if (k1 == firstrun && kmm == 0) {
969 cout <<
"* to be printed once only CHECK IT please ************ kmm = " << kmm << endl;
972 for (
int jjj = 0; jjj < nx; jjj++) {
973 for (
int kkk = 0; kkk < ny; kkk++) {
974 normalization[jjj][kkk] = mapRATIOD2[jjj][kkk];
984 for (
int jjj = 0; jjj < nx; jjj++) {
985 for (
int kkk = 0; kkk < ny; kkk++) {
986 if (normalization[jjj][kkk] != 0) {
987 GSMRATIOD2[k1][jjj][kkk] = mapRATIOD2[jjj][kkk] / normalization[jjj][kkk];
989 if (GSMRATIOD2[k1][jjj][kkk] < RrangeMAX && GSMRATIOD2[k1][jjj][kkk] > RrangeMIN) {
990 gainkoeff->Fill(GSMRATIOD2[k1][jjj][kkk]);
991 gainkoeff0->Fill(GSMRATIOD2[k1][jjj][kkk]);
992 gainkoeff9->Fill(GSMRATIOD2[k1][jjj][kkk]);
998 GOODruns->Fill(
float(k1));
1000 if (GSMRATIOD2[k1][jjj][kkk] > 0.)
1001 BADruns->Fill(
float(k1));
1015 for (
int jjj = 0; jjj <= 82; jjj++) {
1016 for (
int kkk = 0; kkk <= 72; kkk++) {
1017 mapRATIOD2[jjj][kkk] = 0.;
1018 mapRATIOD20[jjj][kkk] = 0.;
1019 for (
int iii = 0; iii < NDEP; iii++) {
1020 mapRATIO[iii][jjj][kkk] = 0.;
1032 cout <<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DONE: last LED run READ " << endl;
1046 cout <<
"**** **** **** **** **** Draw Dependencies: *** " << endl;
1049 Int_t Method = NMethodsStart;
1050 while (Method < NMethodsToUse + 1) {
1051 if (Method != 9999992) {
1052 cout <<
" **** START Method " << Method << endl;
1055 cout <<
"****Draw 0 Dependencies: <Aijk> for each event and all LED runs *** " << endl;
1059 gStyle->SetOptStat(101110);
1060 Ceff1D->SetMarkerStyle(20);
1061 Ceff1D->SetMarkerSize(0.4);
1062 Ceff1D->GetYaxis()->SetLabelSize(0.04);
1063 Ceff1D->SetTitle(
"all runs & channels");
1064 Ceff1D->SetXTitle(
"<Aijk>");
1065 Ceff1D->SetYTitle(
"N");
1066 Ceff1D->SetMarkerColor(4);
1067 Ceff1D->SetLineColor(4);
1073 cout <<
"****Draw 1 Dependencies: <Aijk> for each event and all LED runs ZOOM *** " << endl;
1077 gStyle->SetOptStat(101110);
1079 Seff1D->SetMarkerStyle(20);
1080 Seff1D->SetMarkerSize(0.4);
1081 Seff1D->GetYaxis()->SetLabelSize(0.04);
1082 Seff1D->SetTitle(
"ZOOM all runs & channels");
1083 Seff1D->SetXTitle(
"<Aijk> ZOOM ");
1084 Seff1D->SetYTitle(
"N");
1085 Seff1D->SetMarkerColor(4);
1086 Seff1D->SetLineColor(4);
1093 cout <<
"****Draw 2 Dependencies: GSM ratio vs days *** " << endl;
1094 for (
int k1 = 0; k1 < NP; k1++) {
1100 TPad* pad1 =
new TPad(
"pad1",
"This is pad1", 0.02, 0.02, 0.99, 0.99, 0);
1103 pad1->Range(-0.255174, -19.25, 2.29657, -6.75);
1105 pad1->DrawFrame(x1, y1, x2, y2);
1107 pad1->GetFrame()->SetFillColor(0);
1112 Int_t colorlines = 0;
1113 Int_t generalcount = 0;
1116 for (
int jjj = 0; jjj < 82; jjj++) {
1117 for (
int kkk = 0; kkk < 72; kkk++) {
1119 for (
int k1 = 0; k1 < NP; k1++) {
1120 if (GSMRATIOD2[k1][jjj][kkk] != 0) {
1123 if (GSMRATIOD2[k1][jjj][kkk] < RrangeMAX && GSMRATIOD2[k1][jjj][kkk] > RrangeMIN) {
1127 YY[sscount] = GSMRATIOD2[k1][jjj][kkk];
1128 XXX[sscount] = XX[k1];
1129 indWAS[sscount] = k1;
1130 mapBADchannels->Fill(
double(jjj) - 42.,
double(kkk) - 1., GSMRATIOD2[k1][jjj][kkk]);
1131 mapBADchannels0->Fill(
double(jjj) - 42.,
double(kkk) - 1., 1.);
1138 Int_t MMcount = sscount + 1;
1141 if (generalcount == 1 && verbosity == 2)
1142 for (
int k1 = 0; k1 < MMcount; k1++) {
1143 cout <<
"**** All GOOD runs: indWAS[k1](1,..) = " << indWAS[k1] + 1 <<
" XXX[k1]+1 = " << XXX[k1] + 1
1146 gr1 =
new TGraph(MMcount, XXX, YY);
1147 colorlines = generalcount / 5. + 2;
1148 gr1->SetLineColor(colorlines);
1149 gr1->SetMarkerColor(colorlines);
1150 gr1->SetMarkerStyle(20);
1151 gr1->SetMarkerSize(1.2);
1152 gr1->SetFillStyle(0);
1153 gr1->GetXaxis()->SetTitle(
"days");
1154 gr1->GetYaxis()->SetTitle(
"R");
1163 TLegend leg(xx1, yy1, xx2, yy2,
"HE SiPM: R vs t(days)");
1166 leg.SetBorderSize(1);
1167 leg.DrawClone(
"Same");
1188 cout <<
"****Draw 3 Dependencies: 2D SiPM channels *** " << endl;
1189 TH2F* Cdepth2hbff = (TH2F*)mapBADchannels->Clone(
"Cdepth2hbff");
1190 Cdepth2hbff->Divide(mapBADchannels, mapBADchannels0, 1, 1,
"B");
1191 Cdepth2hbff->Sumw2();
1194 gStyle->SetOptStat(0000000);
1195 Cdepth2hbff->SetMarkerStyle(20);
1196 Cdepth2hbff->SetMarkerSize(0.4);
1197 Cdepth2hbff->GetYaxis()->SetLabelSize(0.04);
1198 Cdepth2hbff->SetTitle(
"within R & Weighted by R");
1199 Cdepth2hbff->SetXTitle(
"#eta \b");
1200 Cdepth2hbff->SetYTitle(
"#phi \b");
1201 Cdepth2hbff->SetMarkerColor(4);
1202 Cdepth2hbff->SetLineColor(4);
1203 Cdepth2hbff->Draw(
"COLZ");
1207 cout <<
"****Draw 4 Dependencies: gains LED runs *** " << endl;
1212 gStyle->SetOptStat(1100);
1214 gainkoeff->SetMarkerStyle(20);
1215 gainkoeff->SetMarkerSize(0.4);
1216 gainkoeff->GetYaxis()->SetLabelSize(0.04);
1217 gainkoeff->SetXTitle(
"gains");
1218 gainkoeff->SetYTitle(
"N");
1219 gainkoeff->SetMarkerColor(4);
1220 gainkoeff->SetLineColor(4);
1222 gainkoeff->Draw(
"PL");
1226 cout <<
"****Draw 5 Dependencies: gains LED runs *** " << endl;
1231 gStyle->SetOptStat(1100);
1233 gainkoeff9->SetMarkerStyle(20);
1234 gainkoeff9->SetMarkerSize(0.4);
1235 gainkoeff9->GetYaxis()->SetLabelSize(0.04);
1236 gainkoeff9->SetXTitle(
"gains");
1237 gainkoeff9->SetYTitle(
"N");
1238 gainkoeff9->SetMarkerColor(4);
1239 gainkoeff9->SetLineColor(4);
1241 gainkoeff9->Draw(
"PL");
1245 cout <<
"****Draw 6 Dependencies: gains LED runs *** " << endl;
1250 gStyle->SetOptStat(1100);
1252 gainkoeff0->SetMarkerStyle(20);
1253 gainkoeff0->SetMarkerSize(0.4);
1254 gainkoeff0->GetYaxis()->SetLabelSize(0.04);
1255 gainkoeff0->SetXTitle(
"gains");
1256 gainkoeff0->SetYTitle(
"N");
1257 gainkoeff0->SetMarkerColor(4);
1258 gainkoeff0->SetLineColor(4);
1260 gainkoeff0->Draw(
"PL");
1264 cout <<
"****Draw 7 Dependencies: BADruns *** " << endl;
1268 gPad->SetLogy(kFALSE);
1269 gStyle->SetOptStat(101110);
1270 BADruns->SetMarkerStyle(20);
1271 BADruns->SetMarkerSize(0.4);
1272 BADruns->GetYaxis()->SetLabelSize(0.04);
1273 BADruns->SetTitle(
"#channels outside Rrange VS iRun");
1274 BADruns->SetXTitle(
"iRun");
1275 BADruns->SetYTitle(
"#channels");
1276 BADruns->SetMarkerColor(4);
1277 BADruns->SetLineColor(4);
1279 BADruns->Draw(
"PL");
1282 int cx = BADruns->GetXaxis()->GetNbins();
1283 cout <<
"***** ************* Number of runs w/ R outside unit-range = " << cx << endl;
1285 for (
int jjj = 1; jjj <= cx; jjj++) {
1286 if (BADruns->GetBinContent(jjj) > 200.) {
1287 cout <<
"BADruns w/ content>60: jjj= " << jjj <<
" run= " << LEDruns[jjj - 1]
1288 <<
" R ouside unit-range for # channels= " << BADruns->GetBinContent(jjj) << endl;
1293 cout <<
"BADruns w/ content>60 nbadruns= " << nbadruns << endl;
1299 cout <<
"****Draw 8 Dependencies: Goodruns *** " << endl;
1303 gStyle->SetOptStat(101110);
1304 GOODruns->SetMarkerStyle(20);
1305 GOODruns->SetMarkerSize(0.4);
1306 GOODruns->GetYaxis()->SetLabelSize(0.04);
1307 GOODruns->SetTitle(
"#channels inside Rrange VS iRun");
1308 GOODruns->SetXTitle(
"iRun");
1309 GOODruns->SetYTitle(
"#channels");
1310 GOODruns->SetMarkerColor(4);
1311 GOODruns->SetLineColor(4);
1313 GOODruns->Draw(
"PL");
1316 int cx = GOODruns->GetXaxis()->GetNbins();
1317 cout <<
"************* cx = " << cx << endl;
1318 for (
int jjj = 0; jjj <= cx; jjj++) {
1321 if (GOODruns->GetBinContent(jjj) > 1400.)
1322 cout <<
"GOODruns: k1(0,...)= " << jjj
1323 <<
" GOODruns->GetBinContent(jjj)= " << GOODruns->GetBinContent(jjj) << endl;
1330 cout <<
"****Draw 9 Dependencies: depthes with zero A *** " << endl;
1333 gPad->SetLogy(kFALSE);
1334 gStyle->SetOptStat(1110000);
1335 NotEmptyDepthes->SetMarkerStyle(20);
1336 NotEmptyDepthes->SetMarkerSize(0.4);
1337 NotEmptyDepthes->GetYaxis()->SetLabelSize(0.04);
1338 NotEmptyDepthes->SetTitle(
"# Not Empty Channels in etq-phi projection");
1339 NotEmptyDepthes->SetXTitle(
"4*(eta-57)+(phi-64)");
1340 NotEmptyDepthes->SetYTitle(
"N");
1341 NotEmptyDepthes->SetMarkerColor(4);
1342 NotEmptyDepthes->SetLineColor(4);
1344 NotEmptyDepthes->Draw(
"PL");
1348 cout <<
"****Draw 10 Dependencies: Aijk for each event and all LED runs *** " << endl;
1361 gStyle->SetOptStat(101110);
1363 Aeff1D->SetMarkerStyle(20);
1364 Aeff1D->SetMarkerSize(0.4);
1365 Aeff1D->GetYaxis()->SetLabelSize(0.04);
1366 Aeff1D->SetTitle(
"all runs & events& channels");
1367 Aeff1D->SetXTitle(
"Aijk");
1368 Aeff1D->SetYTitle(
"N");
1369 Aeff1D->SetMarkerColor(4);
1370 Aeff1D->SetLineColor(4);
1373 Aeff1D->SetMinimum(0.8);
1381 cout <<
"****Draw 11 <A>: 2D Depthes1,2,3,4 *** " << endl;
1389 mapchannelsdepth1->SetStats(0);
1390 mapchannelsdepth1->SetTitle(
"<A> Depth1");
1391 mapchannelsdepth1->SetXTitle(
"#eta \b");
1392 mapchannelsdepth1->SetYTitle(
"#phi \b");
1393 mapchannelsdepth1->Draw(
"COLZ");
1395 mapchannelsdepth2->SetStats(0);
1396 mapchannelsdepth2->SetTitle(
"<A> Depth2");
1397 mapchannelsdepth2->SetXTitle(
"#eta \b");
1398 mapchannelsdepth2->SetYTitle(
"#phi \b");
1399 mapchannelsdepth2->Draw(
"COLZ");
1401 mapchannelsdepth3->SetStats(0);
1402 mapchannelsdepth3->SetTitle(
"<A> Depth3");
1403 mapchannelsdepth3->SetXTitle(
"#eta \b");
1404 mapchannelsdepth3->SetYTitle(
"#phi \b");
1405 mapchannelsdepth3->Draw(
"COLZ");
1407 mapchannelsdepth4->SetStats(0);
1408 mapchannelsdepth4->SetTitle(
"<A> Depth4");
1409 mapchannelsdepth4->SetXTitle(
"#eta \b");
1410 mapchannelsdepth4->SetYTitle(
"#phi \b");
1411 mapchannelsdepth4->Draw(
"COLZ");
1418 cout <<
"****Draw 12 <A>: 2D Depthes5,6,7 *** " << endl;
1426 mapchannelsdepth5->SetStats(0);
1427 mapchannelsdepth5->SetTitle(
"<A> Depth5");
1428 mapchannelsdepth5->SetXTitle(
"#eta \b");
1429 mapchannelsdepth5->SetYTitle(
"#phi \b");
1430 mapchannelsdepth5->Draw(
"COLZ");
1432 mapchannelsdepth6->SetStats(0);
1433 mapchannelsdepth6->SetTitle(
"<A> Depth6");
1434 mapchannelsdepth6->SetXTitle(
"#eta \b");
1435 mapchannelsdepth6->SetYTitle(
"#phi \b");
1436 mapchannelsdepth6->Draw(
"COLZ");
1438 mapchannelsdepth7->SetStats(0);
1439 mapchannelsdepth7->SetTitle(
"<A> Depth7");
1440 mapchannelsdepth7->SetXTitle(
"#eta \b");
1441 mapchannelsdepth7->SetYTitle(
"#phi \b");
1442 mapchannelsdepth7->Draw(
"COLZ");
1450 cout <<
"****Draw 13 function, fC *** " << endl;
1456 double c0 = 1.000000;
1457 double b1 = 2.71238e-05;
1458 double a2 = 1.32877e-10;
1460 Double_t
x[
n],
y[
n];
1461 for (Int_t
i = 0;
i <
n;
i++) {
1462 x[
i] = (
i + 1) * 20000.;
1463 y[
i] = a2 * x[
i] * x[
i] / 40. / 40. + b1 * x[
i] / 40. + c0;
1467 TGraph* gr =
new TGraph(n, x, y);
1492 TString fdir =
"testamt0shunt6gsm2018/";
1494 TString plotName = fdir + MethodName[Method] +
".png";
1495 c1->SaveAs(plotName);
1496 cout <<
"****PLOT " << Method <<
" drawn **** " << endl;
uint16_t const *__restrict__ x
static constexpr float b1