File indexing completed on 2024-04-06 12:05:50
0001
0002
0003
0004
0005
0006
0007
0008 #include "LogEleMapdb.h"
0009
0010 #include <iostream>
0011 #include <fstream>
0012
0013 #include "TH1.h"
0014 #include "TH2.h"
0015 #include "TCanvas.h"
0016 #include "TROOT.h"
0017 #include <TMath.h>
0018 #include "TStyle.h"
0019 #include "TSystem.h"
0020 #include "TLegend.h"
0021 #include "TText.h"
0022 #include "TAxis.h"
0023 #include "TFile.h"
0024 #include "TLine.h"
0025 #include "TGraph.h"
0026 #include <TPaveText.h>
0027
0028
0029
0030
0031
0032 using namespace std;
0033
0034
0035 int main(int argc, char *argv[]) {
0036 gROOT->Reset();
0037 gROOT->SetStyle("Plain");
0038 gStyle->SetOptStat(0);
0039 gStyle->SetOptTitle(1);
0040
0041 if (argc < 2)
0042 return 1;
0043 char fname[300];
0044 char refname[300];
0045 sprintf(fname, "%s", argv[1]);
0046 sprintf(refname, "%s", argv[2]);
0047
0048 cout << fname << " " << refname << std::endl;
0049
0050
0051
0052
0053
0054
0055 string promt = (string)fname;
0056 string runnumber = "";
0057 for (unsigned int i = promt.size() - 11; i < promt.size() - 5; i++)
0058 runnumber += fname[i];
0059 string refrunnumber = "";
0060 promt = (string)refname;
0061 for (unsigned int i = promt.size() - 11; i < promt.size() - 5; i++)
0062 refrunnumber += refname[i];
0063
0064 TFile *hfile = new TFile(fname, "READ");
0065 TFile *hreffile = new TFile(refname, "READ");
0066
0067
0068 double MIN_M[7][5] = {{0., 0., 0., 0., 0.},
0069 {0., 0., 0., 0., 0.},
0070 {0, 0., 0., 0., 0.},
0071 {0, 1.0, 1.0, 0.2, 0.1},
0072 {0, 0.10, 0.10, 0.18, 0.30},
0073 {0, 0.8, 0.8, 0.8, 0.1},
0074 {0, -0.5, -0.5, -0.5, -0.5}};
0075 double MAX_M[7][5] = {{0., 0., 0., 0., 0.},
0076 {0., 0., 0., 0., 0.},
0077 {0, 900, 900, 9000, 3000},
0078 {0, 3.9, 3.9, 4.4, 2.0},
0079 {0, 0.95, 0.98, 0.96, 1.04},
0080 {0, 8.0, 8.0, 8.0, 2.8},
0081 {0, 6.5, 6.5, 6.5, 3.5}};
0082
0083
0084 double MIN_C[7][5] = {{0., 0., 0., 0., 0.},
0085 {0., 0., 0., 0., 0.},
0086 {0, 120., 120., 120., 60.},
0087 {0, 1.0, 1.0, 0.50, 0.2},
0088 {0, 0.6, 0.64, 0.25, 0.25},
0089 {0, 1.0, 1.0, 1.0, 1.0},
0090 {0, 0.5, 0.5, 0.5, 0.5}};
0091 double MAX_C[7][5] = {{0., 0., 0., 0., 0.},
0092 {0., 0., 0., 0., 0.},
0093 {0, 1E20, 1E20, 1E20, 1E20},
0094 {0, 2.3, 2.3, 3.0, 2.3},
0095 {0, 1., 1., 1., 1.00},
0096 {0, 5.5, 5.5, 3.5, 5.2},
0097 {0, 8.5, 8.5, 8.5, 9.5}};
0098 double porog[5] = {0., 2., 2., 5., 1.};
0099
0100 double Pedest[2][5] = {{0., 0.2, 0.9, 0.1, 0.2}, {0., 0.2, 0.2, 0.1, 0.16}};
0101
0102
0103
0104
0105
0106 TCanvas *cHB = new TCanvas("cHB", "cHB", 1000, 1000);
0107
0108 TCanvas *cHE = new TCanvas("cHE", "cHE", 1500, 1500);
0109
0110 TCanvas *cONE = new TCanvas("cONE", "cONE", 1500, 500);
0111 TCanvas *cPED = new TCanvas("cPED", "cPED", 1000, 500);
0112
0113 TCanvas *cHF = new TCanvas("cHF", "cHF", 1000, 1000);
0114
0115 char *str = (char *)alloca(10000);
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131 Int_t ALLDEPTH = 10;
0132
0133 int k_min[5] = {0, 1, 1, 4, 1};
0134
0135
0136
0137 int k_max[5] = {0, 4, 7, 4, 4};
0138
0139 TH2F *Map_Ampl[33][5][ALLDEPTH];
0140 TH2F *Map_SUB[5][ALLDEPTH];
0141 TH1F *HistAmplDepth[22][5][ALLDEPTH];
0142 TH1F *HistAmpl[22][5];
0143
0144 TH1F *HistPed[3][5][4];
0145 TH2F *Map_Ped[3][5];
0146 TH1F *hist_GoodTSshape[5];
0147 TH1F *hist_GoodTSshape0[5];
0148 TH1F *hist_BadTSshape[5];
0149 TH1F *hist_BadTSshape0[5];
0150 TH1F *hist_ADC_All[5];
0151 TH1F *hist_ADC_DS[5][ALLDEPTH];
0152 TH1F *hist_SumADC[5][ALLDEPTH];
0153 TH1F *hist_SumADC0[5][ALLDEPTH];
0154 TH1F *hist_SumADC1[5][ALLDEPTH];
0155
0156 Map_SUB[1][1] = (TH2F *)hfile->Get("h_mapDepth1_HB");
0157 Map_SUB[1][2] = (TH2F *)hfile->Get("h_mapDepth2_HB");
0158 Map_SUB[2][1] = (TH2F *)hfile->Get("h_mapDepth1_HE");
0159 Map_SUB[2][2] = (TH2F *)hfile->Get("h_mapDepth2_HE");
0160 Map_SUB[2][3] = (TH2F *)hfile->Get("h_mapDepth3_HE");
0161 Map_SUB[3][4] = (TH2F *)hfile->Get("h_mapDepth4_HO");
0162 Map_SUB[4][1] = (TH2F *)hfile->Get("h_mapDepth1_HF");
0163 Map_SUB[4][2] = (TH2F *)hfile->Get("h_mapDepth2_HF");
0164
0165 Map_SUB[2][4] = (TH2F *)hfile->Get("h_mapDepth4_HE");
0166 Map_SUB[2][5] = (TH2F *)hfile->Get("h_mapDepth5_HE");
0167 Map_SUB[2][6] = (TH2F *)hfile->Get("h_mapDepth6_HE");
0168 Map_SUB[2][7] = (TH2F *)hfile->Get("h_mapDepth7_HE");
0169 Map_SUB[4][3] = (TH2F *)hfile->Get("h_mapDepth3_HF");
0170 Map_SUB[4][4] = (TH2F *)hfile->Get("h_mapDepth4_HF");
0171
0172 Map_SUB[1][3] = (TH2F *)hfile->Get("h_mapDepth3_HB");
0173 Map_SUB[1][4] = (TH2F *)hfile->Get("h_mapDepth4_HB");
0174
0175
0176
0177
0178 for (int sub = 1; sub <= 4; sub++) {
0179
0180 if (sub == 1)
0181 cHB->Divide(2, 2);
0182
0183 if (sub == 2)
0184 cHE->Divide(3, 3);
0185 if (sub == 3)
0186 cONE->Divide(1, 1);
0187
0188 if (sub == 4)
0189 cHF->Divide(2, 2);
0190
0191
0192
0193 for (int k = k_min[sub]; k <= k_max[sub]; k++) {
0194 if (sub == 1)
0195 cHB->cd(k);
0196 if (sub == 2)
0197 cHE->cd(k);
0198 if (sub == 3)
0199 cONE->cd(k - 3);
0200 if (sub == 4)
0201 cHF->cd(k);
0202 gPad->SetGridy();
0203 gPad->SetGridx();
0204 gPad->SetLogz();
0205 if (sub == 1)
0206 sprintf(str, "HB, Depth%d \b", k);
0207 if (sub == 2)
0208 sprintf(str, "HE, Depth%d \b", k);
0209 if (sub == 3)
0210 sprintf(str, "HO, Depth%d \b", k);
0211 if (sub == 4)
0212 sprintf(str, "HF, Depth%d \b", k);
0213 Map_SUB[sub][k]->SetTitle(str);
0214 Map_SUB[sub][k]->SetXTitle("#eta \b");
0215 Map_SUB[sub][k]->SetYTitle("#phi \b");
0216 Map_SUB[sub][k]->SetZTitle("Number of events \b");
0217 if (sub == 3)
0218 Map_SUB[sub][k]->SetTitleOffset(0.8, "Z");
0219 Map_SUB[sub][k]->Draw("COLZ");
0220 Map_SUB[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
0221
0222 if (sub == 1) {
0223 cHB->Modified();
0224 cHB->Update();
0225 }
0226 if (sub == 2) {
0227 cHE->Modified();
0228 cHE->Update();
0229 }
0230 if (sub == 3) {
0231 cONE->Modified();
0232 cONE->Update();
0233 }
0234 if (sub == 4) {
0235 cHF->Modified();
0236 cHF->Update();
0237 }
0238 }
0239
0240 if (sub == 1) {
0241 cHB->Print("MapRateEntryHB.png");
0242 cHB->Clear();
0243 }
0244 if (sub == 2) {
0245 cHE->Print("MapRateEntryHE.png");
0246 cHE->Clear();
0247 }
0248 if (sub == 3) {
0249 cONE->Print("MapRateEntryHO.png");
0250 cONE->Clear();
0251 }
0252 if (sub == 4) {
0253 cHF->Print("MapRateEntryHF.png");
0254 cHF->Clear();
0255 }
0256 }
0257
0258
0259
0260
0261
0262 Map_Ampl[1][1][1] = (TH2F *)hfile->Get("h_mapDepth1Error_HB");
0263 Map_Ampl[1][1][2] = (TH2F *)hfile->Get("h_mapDepth2Error_HB");
0264 Map_Ampl[1][2][1] = (TH2F *)hfile->Get("h_mapDepth1Error_HE");
0265 Map_Ampl[1][2][2] = (TH2F *)hfile->Get("h_mapDepth2Error_HE");
0266 Map_Ampl[1][2][3] = (TH2F *)hfile->Get("h_mapDepth3Error_HE");
0267 Map_Ampl[1][3][4] = (TH2F *)hfile->Get("h_mapDepth4Error_HO");
0268 Map_Ampl[1][4][1] = (TH2F *)hfile->Get("h_mapDepth1Error_HF");
0269 Map_Ampl[1][4][2] = (TH2F *)hfile->Get("h_mapDepth2Error_HF");
0270
0271 Map_Ampl[1][2][4] = (TH2F *)hfile->Get("h_mapDepth4Error_HE");
0272 Map_Ampl[1][2][5] = (TH2F *)hfile->Get("h_mapDepth5Error_HE");
0273 Map_Ampl[1][2][6] = (TH2F *)hfile->Get("h_mapDepth6Error_HE");
0274 Map_Ampl[1][2][7] = (TH2F *)hfile->Get("h_mapDepth7Error_HE");
0275 Map_Ampl[1][4][3] = (TH2F *)hfile->Get("h_mapDepth3Error_HF");
0276 Map_Ampl[1][4][4] = (TH2F *)hfile->Get("h_mapDepth4Error_HF");
0277
0278 Map_Ampl[1][1][3] = (TH2F *)hfile->Get("h_mapDepth3Error_HB");
0279 Map_Ampl[1][1][4] = (TH2F *)hfile->Get("h_mapDepth4Error_HB");
0280
0281 for (int sub = 1; sub <= 4; sub++) {
0282
0283 if (sub == 1)
0284 cHB->Divide(2, 2);
0285
0286 if (sub == 2)
0287 cHE->Divide(3, 3);
0288 if (sub == 3)
0289 cONE->Divide(1, 1);
0290
0291 if (sub == 4)
0292 cHF->Divide(2, 2);
0293
0294
0295
0296 for (int k = k_min[sub]; k <= k_max[sub]; k++) {
0297 if (sub == 1)
0298 cHB->cd(k);
0299 if (sub == 2)
0300 cHE->cd(k);
0301 if (sub == 3)
0302 cONE->cd(k - 3);
0303 if (sub == 4)
0304 cHF->cd(k);
0305 Map_Ampl[1][sub][k]->Divide(Map_Ampl[1][sub][k], Map_SUB[sub][k], 1, 1, "B");
0306 gPad->SetGridy();
0307 gPad->SetGridx();
0308 gPad->SetLogz();
0309 if (sub == 1)
0310 sprintf(str, "HB, Depth%d \b", k);
0311 if (sub == 2)
0312 sprintf(str, "HE, Depth%d \b", k);
0313 if (sub == 3)
0314 sprintf(str, "HO, Depth%d \b", k);
0315 if (sub == 4)
0316 sprintf(str, "HF, Depth%d \b", k);
0317 Map_Ampl[1][sub][k]->SetTitle(str);
0318 Map_Ampl[1][sub][k]->SetXTitle("#eta \b");
0319 Map_Ampl[1][sub][k]->SetYTitle("#phi \b");
0320 Map_Ampl[1][sub][k]->SetZTitle("Rate \b");
0321 if (sub == 3)
0322 Map_Ampl[1][sub][k]->SetTitleOffset(0.8, "Z");
0323 Map_Ampl[1][sub][k]->Draw("COLZ");
0324 Map_Ampl[1][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
0325 Map_Ampl[1][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
0326 if (sub == 1) {
0327 cHB->Modified();
0328 cHB->Update();
0329 }
0330 if (sub == 2) {
0331 cHE->Modified();
0332 cHE->Update();
0333 }
0334 if (sub == 3) {
0335 cONE->Modified();
0336 cONE->Update();
0337 }
0338 if (sub == 4) {
0339 cHF->Modified();
0340 cHF->Update();
0341 }
0342 }
0343
0344 if (sub == 1) {
0345 cHB->Print("MapRateCapIDHB.png");
0346 cHB->Clear();
0347 }
0348 if (sub == 2) {
0349 cHE->Print("MapRateCapIDHE.png");
0350 cHE->Clear();
0351 }
0352 if (sub == 3) {
0353 cONE->Print("MapRateCapIDHO.png");
0354 cONE->Clear();
0355 }
0356 if (sub == 4) {
0357 cHF->Print("MapRateCapIDHF.png");
0358 cHF->Clear();
0359 }
0360 }
0361
0362
0363
0364
0365
0366 Map_Ampl[2][1][1] = (TH2F *)hfile->Get("h_mapDepth1ADCAmpl225_HB");
0367 Map_Ampl[2][1][2] = (TH2F *)hfile->Get("h_mapDepth2ADCAmpl225_HB");
0368 Map_Ampl[2][2][1] = (TH2F *)hfile->Get("h_mapDepth1ADCAmpl225_HE");
0369 Map_Ampl[2][2][2] = (TH2F *)hfile->Get("h_mapDepth2ADCAmpl225_HE");
0370 Map_Ampl[2][2][3] = (TH2F *)hfile->Get("h_mapDepth3ADCAmpl225_HE");
0371 Map_Ampl[2][3][4] = (TH2F *)hfile->Get("h_mapDepth4ADCAmpl225_HO");
0372 Map_Ampl[2][4][1] = (TH2F *)hfile->Get("h_mapDepth1ADCAmpl225_HF");
0373 Map_Ampl[2][4][2] = (TH2F *)hfile->Get("h_mapDepth2ADCAmpl225_HF");
0374
0375 Map_Ampl[2][2][4] = (TH2F *)hfile->Get("h_mapDepth4ADCAmpl225_HE");
0376 Map_Ampl[2][2][5] = (TH2F *)hfile->Get("h_mapDepth5ADCAmpl225_HE");
0377 Map_Ampl[2][2][6] = (TH2F *)hfile->Get("h_mapDepth6ADCAmpl225_HE");
0378 Map_Ampl[2][2][7] = (TH2F *)hfile->Get("h_mapDepth7ADCAmpl225_HE");
0379 Map_Ampl[2][4][3] = (TH2F *)hfile->Get("h_mapDepth3ADCAmpl225_HF");
0380 Map_Ampl[2][4][4] = (TH2F *)hfile->Get("h_mapDepth4ADCAmpl225_HF");
0381
0382 Map_Ampl[2][1][3] = (TH2F *)hfile->Get("h_mapDepth3ADCAmpl225_HB");
0383 Map_Ampl[2][1][4] = (TH2F *)hfile->Get("h_mapDepth4ADCAmpl225_HB");
0384
0385 HistAmpl[2][1] = (TH1F *)hfile->Get("h_ADCAmpl_HB");
0386 HistAmpl[2][2] = (TH1F *)hfile->Get("h_ADCAmpl_HE");
0387 HistAmpl[2][3] = (TH1F *)hfile->Get("h_ADCAmpl_HO");
0388 HistAmpl[2][4] = (TH1F *)hfile->Get("h_ADCAmpl_HF");
0389
0390
0391
0392
0393
0394 Map_Ampl[3][1][1] = (TH2F *)hfile->Get("h_mapDepth1Amplitude225_HB");
0395 Map_Ampl[3][1][2] = (TH2F *)hfile->Get("h_mapDepth2Amplitude225_HB");
0396 Map_Ampl[3][2][1] = (TH2F *)hfile->Get("h_mapDepth1Amplitude225_HE");
0397 Map_Ampl[3][2][2] = (TH2F *)hfile->Get("h_mapDepth2Amplitude225_HE");
0398 Map_Ampl[3][2][3] = (TH2F *)hfile->Get("h_mapDepth3Amplitude225_HE");
0399 Map_Ampl[3][3][4] = (TH2F *)hfile->Get("h_mapDepth4Amplitude225_HO");
0400 Map_Ampl[3][4][1] = (TH2F *)hfile->Get("h_mapDepth1Amplitude225_HF");
0401 Map_Ampl[3][4][2] = (TH2F *)hfile->Get("h_mapDepth2Amplitude225_HF");
0402
0403 Map_Ampl[3][2][4] = (TH2F *)hfile->Get("h_mapDepth4Amplitude225_HE");
0404 Map_Ampl[3][2][5] = (TH2F *)hfile->Get("h_mapDepth5Amplitude225_HE");
0405 Map_Ampl[3][2][6] = (TH2F *)hfile->Get("h_mapDepth6Amplitude225_HE");
0406 Map_Ampl[3][2][7] = (TH2F *)hfile->Get("h_mapDepth7Amplitude225_HE");
0407 Map_Ampl[3][4][3] = (TH2F *)hfile->Get("h_mapDepth3Amplitude225_HF");
0408 Map_Ampl[3][4][4] = (TH2F *)hfile->Get("h_mapDepth4Amplitude225_HF");
0409
0410 Map_Ampl[3][1][3] = (TH2F *)hfile->Get("h_mapDepth3Amplitude225_HB");
0411 Map_Ampl[3][1][4] = (TH2F *)hfile->Get("h_mapDepth4Amplitude225_HB");
0412
0413 HistAmpl[3][1] = (TH1F *)hfile->Get("h_Amplitude_HB");
0414 HistAmpl[3][2] = (TH1F *)hfile->Get("h_Amplitude_HE");
0415 HistAmpl[3][3] = (TH1F *)hfile->Get("h_Amplitude_HO");
0416 HistAmpl[3][4] = (TH1F *)hfile->Get("h_Amplitude_HF");
0417
0418
0419
0420
0421
0422 Map_Ampl[4][1][1] = (TH2F *)hfile->Get("h_mapDepth1Ampl047_HB");
0423 Map_Ampl[4][1][2] = (TH2F *)hfile->Get("h_mapDepth2Ampl047_HB");
0424 Map_Ampl[4][2][1] = (TH2F *)hfile->Get("h_mapDepth1Ampl047_HE");
0425 Map_Ampl[4][2][2] = (TH2F *)hfile->Get("h_mapDepth2Ampl047_HE");
0426 Map_Ampl[4][2][3] = (TH2F *)hfile->Get("h_mapDepth3Ampl047_HE");
0427 Map_Ampl[4][3][4] = (TH2F *)hfile->Get("h_mapDepth4Ampl047_HO");
0428 Map_Ampl[4][4][1] = (TH2F *)hfile->Get("h_mapDepth1Ampl047_HF");
0429 Map_Ampl[4][4][2] = (TH2F *)hfile->Get("h_mapDepth2Ampl047_HF");
0430
0431 Map_Ampl[4][2][4] = (TH2F *)hfile->Get("h_mapDepth4Ampl047_HE");
0432 Map_Ampl[4][2][5] = (TH2F *)hfile->Get("h_mapDepth5Ampl047_HE");
0433 Map_Ampl[4][2][6] = (TH2F *)hfile->Get("h_mapDepth6Ampl047_HE");
0434 Map_Ampl[4][2][7] = (TH2F *)hfile->Get("h_mapDepth7Ampl047_HE");
0435 Map_Ampl[4][4][3] = (TH2F *)hfile->Get("h_mapDepth3Ampl047_HF");
0436 Map_Ampl[4][4][4] = (TH2F *)hfile->Get("h_mapDepth4Ampl047_HF");
0437
0438 Map_Ampl[4][1][3] = (TH2F *)hfile->Get("h_mapDepth3Ampl047_HB");
0439 Map_Ampl[4][1][4] = (TH2F *)hfile->Get("h_mapDepth4Ampl047_HB");
0440
0441 HistAmpl[4][1] = (TH1F *)hfile->Get("h_Ampl_HB");
0442 HistAmpl[4][2] = (TH1F *)hfile->Get("h_Ampl_HE");
0443 HistAmpl[4][3] = (TH1F *)hfile->Get("h_Ampl_HO");
0444 HistAmpl[4][4] = (TH1F *)hfile->Get("h_Ampl_HF");
0445
0446
0447
0448
0449
0450 Map_Ampl[5][1][1] = (TH2F *)hfile->Get("h_mapDepth1TSmeanA225_HB");
0451 Map_Ampl[5][1][2] = (TH2F *)hfile->Get("h_mapDepth2TSmeanA225_HB");
0452 Map_Ampl[5][2][1] = (TH2F *)hfile->Get("h_mapDepth1TSmeanA225_HE");
0453 Map_Ampl[5][2][2] = (TH2F *)hfile->Get("h_mapDepth2TSmeanA225_HE");
0454 Map_Ampl[5][2][3] = (TH2F *)hfile->Get("h_mapDepth3TSmeanA225_HE");
0455 Map_Ampl[5][3][4] = (TH2F *)hfile->Get("h_mapDepth4TSmeanA225_HO");
0456 Map_Ampl[5][4][1] = (TH2F *)hfile->Get("h_mapDepth1TSmeanA225_HF");
0457 Map_Ampl[5][4][2] = (TH2F *)hfile->Get("h_mapDepth2TSmeanA225_HF");
0458
0459 Map_Ampl[5][2][4] = (TH2F *)hfile->Get("h_mapDepth4TSmeanA225_HE");
0460 Map_Ampl[5][2][5] = (TH2F *)hfile->Get("h_mapDepth5TSmeanA225_HE");
0461 Map_Ampl[5][2][6] = (TH2F *)hfile->Get("h_mapDepth6TSmeanA225_HE");
0462 Map_Ampl[5][2][7] = (TH2F *)hfile->Get("h_mapDepth7TSmeanA225_HE");
0463 Map_Ampl[5][4][3] = (TH2F *)hfile->Get("h_mapDepth3TSmeanA225_HF");
0464 Map_Ampl[5][4][4] = (TH2F *)hfile->Get("h_mapDepth4TSmeanA225_HF");
0465
0466 Map_Ampl[5][1][3] = (TH2F *)hfile->Get("h_mapDepth3TSmeanA225_HB");
0467 Map_Ampl[5][1][4] = (TH2F *)hfile->Get("h_mapDepth4TSmeanA225_HB");
0468
0469 HistAmpl[5][1] = (TH1F *)hfile->Get("h_TSmeanA_HB");
0470 HistAmpl[5][2] = (TH1F *)hfile->Get("h_TSmeanA_HE");
0471 HistAmpl[5][3] = (TH1F *)hfile->Get("h_TSmeanA_HO");
0472 HistAmpl[5][4] = (TH1F *)hfile->Get("h_TSmeanA_HF");
0473
0474
0475
0476
0477
0478 Map_Ampl[6][1][1] = (TH2F *)hfile->Get("h_mapDepth1TSmaxA225_HB");
0479 Map_Ampl[6][1][2] = (TH2F *)hfile->Get("h_mapDepth2TSmaxA225_HB");
0480 Map_Ampl[6][2][1] = (TH2F *)hfile->Get("h_mapDepth1TSmaxA225_HE");
0481 Map_Ampl[6][2][2] = (TH2F *)hfile->Get("h_mapDepth2TSmaxA225_HE");
0482 Map_Ampl[6][2][3] = (TH2F *)hfile->Get("h_mapDepth3TSmaxA225_HE");
0483 Map_Ampl[6][3][4] = (TH2F *)hfile->Get("h_mapDepth4TSmaxA225_HO");
0484 Map_Ampl[6][4][1] = (TH2F *)hfile->Get("h_mapDepth1TSmaxA225_HF");
0485 Map_Ampl[6][4][2] = (TH2F *)hfile->Get("h_mapDepth2TSmaxA225_HF");
0486
0487 Map_Ampl[6][2][4] = (TH2F *)hfile->Get("h_mapDepth4TSmaxA225_HE");
0488 Map_Ampl[6][2][5] = (TH2F *)hfile->Get("h_mapDepth5TSmaxA225_HE");
0489 Map_Ampl[6][2][6] = (TH2F *)hfile->Get("h_mapDepth6TSmaxA225_HE");
0490 Map_Ampl[6][2][7] = (TH2F *)hfile->Get("h_mapDepth7TSmaxA225_HE");
0491 Map_Ampl[6][4][3] = (TH2F *)hfile->Get("h_mapDepth3TSmaxA225_HF");
0492 Map_Ampl[6][4][4] = (TH2F *)hfile->Get("h_mapDepth4TSmaxA225_HF");
0493
0494 Map_Ampl[6][1][3] = (TH2F *)hfile->Get("h_mapDepth3TSmaxA225_HB");
0495 Map_Ampl[6][1][4] = (TH2F *)hfile->Get("h_mapDepth4TSmaxA225_HB");
0496
0497 HistAmpl[6][1] = (TH1F *)hfile->Get("h_TSmaxA_HB");
0498 HistAmpl[6][2] = (TH1F *)hfile->Get("h_TSmaxA_HE");
0499 HistAmpl[6][3] = (TH1F *)hfile->Get("h_TSmaxA_HO");
0500 HistAmpl[6][4] = (TH1F *)hfile->Get("h_TSmaxA_HF");
0501
0502 for (int test = 2; test <= 6; test++) {
0503 for (int sub = 1; sub <= 4; sub++) {
0504
0505 if (sub == 1)
0506 cHB->Divide(2, 2);
0507
0508 if (sub == 2)
0509 cHE->Divide(3, 3);
0510 if (sub == 3)
0511 cONE->Divide(1, 1);
0512
0513 if (sub == 4)
0514 cHF->Divide(2, 2);
0515
0516
0517
0518 for (int k = k_min[sub]; k <= k_max[sub]; k++) {
0519 if (sub == 1)
0520 cHB->cd(k);
0521 if (sub == 2)
0522 cHE->cd(k);
0523 if (sub == 3)
0524 cONE->cd(k - 3);
0525 if (sub == 4)
0526 cHF->cd(k);
0527 Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_SUB[sub][k], 1, 1, "B");
0528 gPad->SetGridy();
0529 gPad->SetGridx();
0530 gPad->SetLogz();
0531 if (sub == 1)
0532 sprintf(str, "HB, Depth%d \b", k);
0533 if (sub == 2)
0534 sprintf(str, "HE, Depth%d \b", k);
0535 if (sub == 3)
0536 sprintf(str, "HO, Depth%d \b", k);
0537 if (sub == 4)
0538 sprintf(str, "HF, Depth%d \b", k);
0539 Map_Ampl[test][sub][k]->SetTitle(str);
0540 Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
0541 Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
0542 Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
0543 if (sub == 3)
0544 Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
0545 Map_Ampl[test][sub][k]->Draw("COLZ");
0546 Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
0547 Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
0548 if (sub == 1) {
0549 cHB->Modified();
0550 cHB->Update();
0551 }
0552 if (sub == 2) {
0553 cHE->Modified();
0554 cHE->Update();
0555 }
0556 if (sub == 3) {
0557 cONE->Modified();
0558 cONE->Update();
0559 }
0560 if (sub == 4) {
0561 cHF->Modified();
0562 cHF->Update();
0563 }
0564 }
0565 if (test == 2) {
0566 if (sub == 1) {
0567 cHB->Print("MapRateAmplHB.png");
0568 cHB->Clear();
0569 }
0570 if (sub == 2) {
0571 cHE->Print("MapRateAmplHE.png");
0572 cHE->Clear();
0573 }
0574 if (sub == 3) {
0575 cONE->Print("MapRateAmplHO.png");
0576 cONE->Clear();
0577 }
0578 if (sub == 4) {
0579 cHF->Print("MapRateAmplHF.png");
0580 cHF->Clear();
0581 }
0582 }
0583 if (test == 3) {
0584 if (sub == 1) {
0585 cHB->Print("MapRateRMSHB.png");
0586 cHB->Clear();
0587 }
0588 if (sub == 2) {
0589 cHE->Print("MapRateRMSHE.png");
0590 cHE->Clear();
0591 }
0592 if (sub == 3) {
0593 cONE->Print("MapRateRMSHO.png");
0594 cONE->Clear();
0595 }
0596 if (sub == 4) {
0597 cHF->Print("MapRateRMSHF.png");
0598 cHF->Clear();
0599 }
0600 }
0601 if (test == 4) {
0602 if (sub == 1) {
0603 cHB->Print("MapRate43TStoAllTSHB.png");
0604 cHB->Clear();
0605 }
0606 if (sub == 2) {
0607 cHE->Print("MapRate43TStoAllTSHE.png");
0608 cHE->Clear();
0609 }
0610 if (sub == 3) {
0611 cONE->Print("MapRate43TStoAllTSHO.png");
0612 cONE->Clear();
0613 }
0614 if (sub == 4) {
0615 cHF->Print("MapRate43TStoAllTSHF.png");
0616 cHF->Clear();
0617 }
0618 }
0619 if (test == 5) {
0620 if (sub == 1) {
0621 cHB->Print("MapRateMeanPosHB.png");
0622 cHB->Clear();
0623 }
0624 if (sub == 2) {
0625 cHE->Print("MapRateMeanPosHE.png");
0626 cHE->Clear();
0627 }
0628 if (sub == 3) {
0629 cONE->Print("MapRateMeanPosHO.png");
0630 cONE->Clear();
0631 }
0632 if (sub == 4) {
0633 cHF->Print("MapRateMeanPosHF.png");
0634 cHF->Clear();
0635 }
0636 }
0637 if (test == 6) {
0638 if (sub == 1) {
0639 cHB->Print("MapRateMaxPosHB.png");
0640 cHB->Clear();
0641 }
0642 if (sub == 2) {
0643 cHE->Print("MapRateMaxPosHE.png");
0644 cHE->Clear();
0645 }
0646 if (sub == 3) {
0647 cONE->Print("MapRateMaxPosHO.png");
0648 cONE->Clear();
0649 }
0650 if (sub == 4) {
0651 cHF->Print("MapRateMaxPosHF.png");
0652 cHF->Clear();
0653 }
0654 }
0655
0656
0657
0658
0659
0660
0661
0662
0663
0664
0665
0666
0667
0668
0669 cONE->Divide(3, 1);
0670 if (test == 2 && sub == 2) {
0671 cONE->cd(2);
0672 TH1F *kjkjkhj2 = (TH1F *)hfile->Get("h_AmplitudeHEtest1");
0673 kjkjkhj2->Draw("");
0674 kjkjkhj2->SetTitle("HE, All Depth: shunt1");
0675 cONE->cd(3);
0676 TH1F *kjkjkhj3 = (TH1F *)hfile->Get("h_AmplitudeHEtest6");
0677 kjkjkhj3->Draw("");
0678 kjkjkhj3->SetTitle("HE, All Depth: shunt6");
0679 }
0680 if (test == 2 && sub == 1) {
0681 cONE->cd(2);
0682 TH1F *kjkjkhb2 = (TH1F *)hfile->Get("h_AmplitudeHBtest1");
0683 kjkjkhb2->Draw("");
0684 kjkjkhb2->SetTitle("HB, All Depth: shunt1");
0685 cONE->cd(3);
0686 TH1F *kjkjkhb3 = (TH1F *)hfile->Get("h_AmplitudeHBtest6");
0687 kjkjkhb3->Draw("");
0688 kjkjkhb3->SetTitle("HB, All Depth: shunt6");
0689 }
0690
0691 cONE->cd(1);
0692 gPad->SetGridy();
0693 gPad->SetGridx();
0694 gPad->SetLogy();
0695 if (sub == 1)
0696 HistAmpl[test][sub]->SetTitle("HB, All Depth: shunt6");
0697 if (sub == 2)
0698 HistAmpl[test][sub]->SetTitle("HE, All Depth: shunt6");
0699 if (sub == 3)
0700 HistAmpl[test][sub]->SetTitle("HO, All Depth");
0701 if (sub == 4)
0702 HistAmpl[test][sub]->SetTitle("HF, All Depth");
0703 if (test == 2)
0704 HistAmpl[test][sub]->SetXTitle("ADC Amlitude in each event & cell \b");
0705 if (test == 3)
0706 HistAmpl[test][sub]->SetXTitle("RMS in each event & cell \b");
0707 if (test == 4)
0708 HistAmpl[test][sub]->SetXTitle("Ratio in each event & cell \b");
0709 if (test == 5)
0710 HistAmpl[test][sub]->SetXTitle("Mean TS position in each event & cell \b");
0711 if (test == 6)
0712 HistAmpl[test][sub]->SetXTitle("Max TS position in each event & cell \b");
0713 HistAmpl[test][sub]->SetYTitle("Number of cell-events \b");
0714 HistAmpl[test][sub]->SetLineColor(4);
0715 HistAmpl[test][sub]->SetLineWidth(2);
0716 HistAmpl[test][sub]->SetTitleOffset(1.4, "Y");
0717 HistAmpl[test][sub]->Draw("");
0718
0719
0720 if (test == 2) {
0721 gPad->SetLogx();
0722 }
0723 if (test == 3)
0724 HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 5.);
0725 if (test == 4)
0726 HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 1.);
0727 if (test == 5)
0728 HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
0729 if (test == 6)
0730 HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
0731 cONE->Modified();
0732 cONE->Update();
0733 double min_x[] = {MIN_M[test][sub], MIN_M[test][sub]};
0734 double min_y[] = {0., 100000000.};
0735 TGraph *MIN = new TGraph(2, min_x, min_y);
0736 MIN->SetLineStyle(2);
0737 MIN->SetLineColor(2);
0738 MIN->SetLineWidth(2 + 100 * 100);
0739 MIN->SetFillStyle(3005);
0740 MIN->SetFillColor(2);
0741 MIN->Draw("L");
0742 double max_x[] = {MAX_M[test][sub], MAX_M[test][sub]};
0743 double max_y[] = {0., 100000000.};
0744 TGraph *MAX = new TGraph(2, max_x, max_y);
0745 MAX->SetLineStyle(2);
0746 MAX->SetLineColor(2);
0747 MAX->SetLineWidth(-2 - 100 * 100);
0748 MAX->SetFillStyle(3004);
0749 MAX->SetFillColor(2);
0750 MAX->Draw("L");
0751 if (test == 2) {
0752 if (sub == 1) {
0753 cONE->Print("HistAmplHB.png");
0754 cONE->Clear();
0755 }
0756 if (sub == 2) {
0757 cONE->Print("HistAmplHE.png");
0758 cONE->Clear();
0759 }
0760 if (sub == 3) {
0761 cONE->Print("HistAmplHO.png");
0762 cONE->Clear();
0763 }
0764 if (sub == 4) {
0765 cONE->Print("HistAmplHF.png");
0766 cONE->Clear();
0767 }
0768 }
0769 if (test == 3) {
0770 if (sub == 1) {
0771 cONE->Print("HistRMSHB.png");
0772 cONE->Clear();
0773 }
0774 if (sub == 2) {
0775 cONE->Print("HistRMSHE.png");
0776 cONE->Clear();
0777 }
0778 if (sub == 3) {
0779 cONE->Print("HistRMSHO.png");
0780 cONE->Clear();
0781 }
0782 if (sub == 4) {
0783 cONE->Print("HistRMSHF.png");
0784 cONE->Clear();
0785 }
0786 }
0787 if (test == 4) {
0788 if (sub == 1) {
0789 cONE->Print("Hist43TStoAllTSHB.png");
0790 cONE->Clear();
0791 }
0792 if (sub == 2) {
0793 cONE->Print("Hist43TStoAllTSHE.png");
0794 cONE->Clear();
0795 }
0796 if (sub == 3) {
0797 cONE->Print("Hist43TStoAllTSHO.png");
0798 cONE->Clear();
0799 }
0800 if (sub == 4) {
0801 cONE->Print("Hist43TStoAllTSHF.png");
0802 cONE->Clear();
0803 }
0804 }
0805 if (test == 5) {
0806 if (sub == 1) {
0807 cONE->Print("HistMeanPosHB.png");
0808 cONE->Clear();
0809 }
0810 if (sub == 2) {
0811 cONE->Print("HistMeanPosHE.png");
0812 cONE->Clear();
0813 }
0814 if (sub == 3) {
0815 cONE->Print("HistMeanPosHO.png");
0816 cONE->Clear();
0817 }
0818 if (sub == 4) {
0819 cONE->Print("HistMeanPosHF.png");
0820 cONE->Clear();
0821 }
0822 }
0823 if (test == 6) {
0824 if (sub == 1) {
0825 cONE->Print("HistMaxPosHB.png");
0826 cONE->Clear();
0827 }
0828 if (sub == 2) {
0829 cONE->Print("HistMaxPosHE.png");
0830 cONE->Clear();
0831 }
0832 if (sub == 3) {
0833 cONE->Print("HistMaxPosHO.png");
0834 cONE->Clear();
0835 }
0836 if (sub == 4) {
0837 cONE->Print("HistMaxPosHF.png");
0838 cONE->Clear();
0839 }
0840 }
0841 }
0842 }
0843
0844 TH2F *Map_Calib[5][5];
0845
0846 Map_Calib[1][1] = (TH2F *)hfile->Get("h_map_HB");
0847 Map_Calib[1][2] = (TH2F *)hfile->Get("h_map_HB");
0848 Map_Calib[2][1] = (TH2F *)hfile->Get("h_map_HE");
0849 Map_Calib[2][2] = (TH2F *)hfile->Get("h_map_HE");
0850 Map_Calib[2][3] = (TH2F *)hfile->Get("h_map_HE");
0851 Map_Calib[3][4] = (TH2F *)hfile->Get("h_map_HO");
0852 Map_Calib[4][1] = (TH2F *)hfile->Get("h_map_HF");
0853 Map_Calib[4][2] = (TH2F *)hfile->Get("h_map_HF");
0854
0855
0856
0857
0858
0859 for (int sub = 1; sub <= 4; sub++) {
0860
0861
0862 cONE->Divide(1, 1);
0863
0864
0865
0866
0867 int k = 1;
0868 cONE->cd(k);
0869
0870
0871 if (sub == 3)
0872 k = 4;
0873
0874 gPad->SetGridy();
0875 gPad->SetGridx();
0876 gPad->SetLogz();
0877 if (sub == 1)
0878 sprintf(str, "HB");
0879 if (sub == 2)
0880 sprintf(str, "HE");
0881 if (sub == 3)
0882 sprintf(str, "HO");
0883 if (sub == 4)
0884 sprintf(str, "HF");
0885 Map_Calib[sub][k]->SetTitle(str);
0886 Map_Calib[sub][k]->SetXTitle("#eta \b");
0887 Map_Calib[sub][k]->SetYTitle("#phi \b");
0888 Map_Calib[sub][k]->SetZTitle("Number of events\b");
0889 if (sub == 3)
0890 Map_Calib[sub][k]->SetTitleOffset(0.8, "Z");
0891 Map_Calib[sub][k]->Draw("COLZ");
0892 Map_Calib[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
0893
0894
0895
0896 cONE->Modified();
0897 cONE->Update();
0898
0899
0900
0901 if (sub == 1) {
0902 cONE->Print("MapRateCalibEntryHB.png");
0903 cONE->Clear();
0904 }
0905 if (sub == 2) {
0906 cONE->Print("MapRateCalibEntryHE.png");
0907 cONE->Clear();
0908 }
0909 if (sub == 3) {
0910 cONE->Print("MapRateCalibEntryHO.png");
0911 cONE->Clear();
0912 }
0913 if (sub == 4) {
0914 cONE->Print("MapRateCalibEntryHF.png");
0915 cONE->Clear();
0916 }
0917 }
0918
0919
0920
0921
0922
0923 Map_Ampl[11][1][1] = (TH2F *)hfile->Get("h_mapCapCalib047_HB");
0924 Map_Ampl[11][1][2] = (TH2F *)hfile->Get("h_mapCapCalib047_HB");
0925 Map_Ampl[11][2][1] = (TH2F *)hfile->Get("h_mapCapCalib047_HE");
0926 Map_Ampl[11][2][2] = (TH2F *)hfile->Get("h_mapCapCalib047_HE");
0927 Map_Ampl[11][2][3] = (TH2F *)hfile->Get("h_mapCapCalib047_HE");
0928 Map_Ampl[11][3][4] = (TH2F *)hfile->Get("h_mapCapCalib047_HO");
0929 Map_Ampl[11][4][1] = (TH2F *)hfile->Get("h_mapCapCalib047_HF");
0930 Map_Ampl[11][4][2] = (TH2F *)hfile->Get("h_mapCapCalib047_HF");
0931
0932 for (int sub = 1; sub <= 4; sub++) {
0933
0934
0935 cONE->Divide(1, 1);
0936
0937
0938
0939
0940 int k = 1;
0941 cONE->cd(k);
0942
0943
0944 if (sub == 3)
0945 k = 4;
0946
0947 Map_Ampl[11][sub][k]->Divide(Map_Ampl[11][sub][k], Map_Calib[sub][k], 1, 1, "B");
0948 gPad->SetGridy();
0949 gPad->SetGridx();
0950 gPad->SetLogz();
0951 if (sub == 1)
0952 sprintf(str, "HB");
0953 if (sub == 2)
0954 sprintf(str, "HE");
0955 if (sub == 3)
0956 sprintf(str, "HO");
0957 if (sub == 4)
0958 sprintf(str, "HF");
0959 Map_Ampl[11][sub][k]->SetTitle(str);
0960 Map_Ampl[11][sub][k]->SetXTitle("#eta \b");
0961 Map_Ampl[11][sub][k]->SetYTitle("#phi \b");
0962 Map_Ampl[11][sub][k]->SetZTitle("Rate \b");
0963 Map_Ampl[11][sub][k]->SetTitleOffset(0.75, "Z");
0964 Map_Ampl[11][sub][k]->Draw("COLZ");
0965 Map_Ampl[11][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
0966 Map_Ampl[11][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
0967
0968
0969 cONE->Modified();
0970 cONE->Update();
0971
0972
0973
0974 if (sub == 1) {
0975 cONE->Print("MapRateCapCalibHB.png");
0976 cONE->Clear();
0977 }
0978 if (sub == 2) {
0979 cONE->Print("MapRateCapCalibHE.png");
0980 cONE->Clear();
0981 }
0982 if (sub == 3) {
0983 cONE->Print("MapRateCapCalibHO.png");
0984 cONE->Clear();
0985 }
0986 if (sub == 4) {
0987 cONE->Print("MapRateCapCalibHF.png");
0988 cONE->Clear();
0989 }
0990 }
0991
0992
0993
0994
0995
0996 Map_Ampl[12][1][1] = (TH2F *)hfile->Get("h_mapADCCalib047_HB");
0997 Map_Ampl[12][1][2] = (TH2F *)hfile->Get("h_mapADCCalib047_HB");
0998 Map_Ampl[12][2][1] = (TH2F *)hfile->Get("h_mapADCCalib047_HE");
0999 Map_Ampl[12][2][2] = (TH2F *)hfile->Get("h_mapADCCalib047_HE");
1000 Map_Ampl[12][2][3] = (TH2F *)hfile->Get("h_mapADCCalib047_HE");
1001 Map_Ampl[12][3][4] = (TH2F *)hfile->Get("h_mapADCCalib047_HO");
1002 Map_Ampl[12][4][1] = (TH2F *)hfile->Get("h_mapADCCalib047_HF");
1003 Map_Ampl[12][4][2] = (TH2F *)hfile->Get("h_mapADCCalib047_HF");
1004
1005 HistAmpl[12][1] = (TH1F *)hfile->Get("h_ADCCalib_HB");
1006 HistAmpl[12][2] = (TH1F *)hfile->Get("h_ADCCalib_HE");
1007 HistAmpl[12][3] = (TH1F *)hfile->Get("h_ADCCalib_HO");
1008 HistAmpl[12][4] = (TH1F *)hfile->Get("h_ADCCalib_HF");
1009
1010
1011
1012
1013
1014 Map_Ampl[13][1][1] = (TH2F *)hfile->Get("h_mapWidthCalib047_HB");
1015 Map_Ampl[13][1][2] = (TH2F *)hfile->Get("h_mapWidthCalib047_HB");
1016 Map_Ampl[13][2][1] = (TH2F *)hfile->Get("h_mapWidthCalib047_HE");
1017 Map_Ampl[13][2][2] = (TH2F *)hfile->Get("h_mapWidthCalib047_HE");
1018 Map_Ampl[13][2][3] = (TH2F *)hfile->Get("h_mapWidthCalib047_HE");
1019 Map_Ampl[13][3][4] = (TH2F *)hfile->Get("h_mapWidthCalib047_HO");
1020 Map_Ampl[13][4][1] = (TH2F *)hfile->Get("h_mapWidthCalib047_HF");
1021 Map_Ampl[13][4][2] = (TH2F *)hfile->Get("h_mapWidthCalib047_HF");
1022
1023 HistAmpl[13][1] = (TH1F *)hfile->Get("h_WidthCalib_HB");
1024 HistAmpl[13][2] = (TH1F *)hfile->Get("h_WidthCalib_HE");
1025 HistAmpl[13][3] = (TH1F *)hfile->Get("h_WidthCalib_HO");
1026 HistAmpl[13][4] = (TH1F *)hfile->Get("h_WidthCalib_HF");
1027
1028
1029
1030
1031
1032 Map_Ampl[14][1][1] = (TH2F *)hfile->Get("h_mapRatioCalib047_HB");
1033 Map_Ampl[14][1][2] = (TH2F *)hfile->Get("h_mapRatioCalib047_HB");
1034 Map_Ampl[14][2][1] = (TH2F *)hfile->Get("h_mapRatioCalib047_HE");
1035 Map_Ampl[14][2][2] = (TH2F *)hfile->Get("h_mapRatioCalib047_HE");
1036 Map_Ampl[14][2][3] = (TH2F *)hfile->Get("h_mapRatioCalib047_HE");
1037 Map_Ampl[14][3][4] = (TH2F *)hfile->Get("h_mapRatioCalib047_HO");
1038 Map_Ampl[14][4][1] = (TH2F *)hfile->Get("h_mapRatioCalib047_HF");
1039 Map_Ampl[14][4][2] = (TH2F *)hfile->Get("h_mapRatioCalib047_HF");
1040
1041 HistAmpl[14][1] = (TH1F *)hfile->Get("h_RatioCalib_HB");
1042 HistAmpl[14][2] = (TH1F *)hfile->Get("h_RatioCalib_HE");
1043 HistAmpl[14][3] = (TH1F *)hfile->Get("h_RatioCalib_HO");
1044 HistAmpl[14][4] = (TH1F *)hfile->Get("h_RatioCalib_HF");
1045
1046
1047
1048
1049
1050 Map_Ampl[15][1][1] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HB");
1051 Map_Ampl[15][1][2] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HB");
1052 Map_Ampl[15][2][1] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HE");
1053 Map_Ampl[15][2][2] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HE");
1054 Map_Ampl[15][2][3] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HE");
1055 Map_Ampl[15][3][4] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HO");
1056 Map_Ampl[15][4][1] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HF");
1057 Map_Ampl[15][4][2] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HF");
1058
1059 HistAmpl[15][1] = (TH1F *)hfile->Get("h_TSmeanCalib_HB");
1060 HistAmpl[15][2] = (TH1F *)hfile->Get("h_TSmeanCalib_HE");
1061 HistAmpl[15][3] = (TH1F *)hfile->Get("h_TSmeanCalib_HO");
1062 HistAmpl[15][4] = (TH1F *)hfile->Get("h_TSmeanCalib_HF");
1063
1064
1065
1066
1067
1068 Map_Ampl[16][1][1] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HB");
1069 Map_Ampl[16][1][2] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HB");
1070 Map_Ampl[16][2][1] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HE");
1071 Map_Ampl[16][2][2] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HE");
1072 Map_Ampl[16][2][3] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HE");
1073 Map_Ampl[16][3][4] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HO");
1074 Map_Ampl[16][4][1] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HF");
1075 Map_Ampl[16][4][2] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HF");
1076
1077 HistAmpl[16][1] = (TH1F *)hfile->Get("h_TSmaxCalib_HB");
1078 HistAmpl[16][2] = (TH1F *)hfile->Get("h_TSmaxCalib_HE");
1079 HistAmpl[16][3] = (TH1F *)hfile->Get("h_TSmaxCalib_HO");
1080 HistAmpl[16][4] = (TH1F *)hfile->Get("h_TSmaxCalib_HF");
1081
1082 for (int test = 12; test <= 16; test++) {
1083 for (int sub = 1; sub <= 4; sub++) {
1084 if (sub == 1)
1085 cONE->Divide(1, 1);
1086 if (sub == 2)
1087 cONE->Divide(1, 1);
1088 if (sub == 3)
1089 cONE->Divide(1, 1);
1090 if (sub == 4)
1091 cONE->Divide(1, 1);
1092
1093
1094
1095 int k = 1;
1096 if (sub == 1) {
1097 k = 1;
1098 cONE->cd(k);
1099 }
1100 if (sub == 2) {
1101 k = 1;
1102 cONE->cd(k);
1103 }
1104 if (sub == 3) {
1105 k = 4;
1106 cONE->cd(k - 3);
1107 }
1108 if (sub == 4) {
1109 k = 1;
1110 cONE->cd(k);
1111 }
1112 Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_Calib[sub][k], 1, 1, "B");
1113 gPad->SetGridy();
1114 gPad->SetGridx();
1115 gPad->SetLogz();
1116 if (sub == 1)
1117 sprintf(str, "HB");
1118 if (sub == 2)
1119 sprintf(str, "HE");
1120 if (sub == 3)
1121 sprintf(str, "HO");
1122 if (sub == 4)
1123 sprintf(str, "HF");
1124 Map_Ampl[test][sub][k]->SetTitle(str);
1125 Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
1126 Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
1127 Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
1128 Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
1129 Map_Ampl[test][sub][k]->Draw("COLZ");
1130 Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1131 Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.00001, 1.);
1132
1133
1134 cONE->Modified();
1135 cONE->Update();
1136
1137
1138 if (test == 12) {
1139 if (sub == 1) {
1140 cONE->Print("MapRateAmplCalibHB.png");
1141 cONE->Clear();
1142 }
1143 if (sub == 2) {
1144 cONE->Print("MapRateAmplCalibHE.png");
1145 cONE->Clear();
1146 }
1147 if (sub == 3) {
1148 cONE->Print("MapRateAmplCalibHO.png");
1149 cONE->Clear();
1150 }
1151 if (sub == 4) {
1152 cONE->Print("MapRateAmplCalibHF.png");
1153 cONE->Clear();
1154 }
1155 }
1156 if (test == 13) {
1157 if (sub == 1) {
1158 cONE->Print("MapRateRMSCalibHB.png");
1159 cONE->Clear();
1160 }
1161 if (sub == 2) {
1162 cONE->Print("MapRateRMSCalibHE.png");
1163 cONE->Clear();
1164 }
1165 if (sub == 3) {
1166 cONE->Print("MapRateRMSCalibHO.png");
1167 cONE->Clear();
1168 }
1169 if (sub == 4) {
1170 cONE->Print("MapRateRMSCalibHF.png");
1171 cONE->Clear();
1172 }
1173 }
1174 if (test == 14) {
1175 if (sub == 1) {
1176 cONE->Print("MapRate43TStoAllTSCalibHB.png");
1177 cONE->Clear();
1178 }
1179 if (sub == 2) {
1180 cONE->Print("MapRate43TStoAllTSCalibHE.png");
1181 cONE->Clear();
1182 }
1183 if (sub == 3) {
1184 cONE->Print("MapRate43TStoAllTSCalibHO.png");
1185 cONE->Clear();
1186 }
1187 if (sub == 4) {
1188 cONE->Print("MapRate43TStoAllTSCalibHF.png");
1189 cONE->Clear();
1190 }
1191 }
1192 if (test == 15) {
1193 if (sub == 1) {
1194 cONE->Print("MapRateMeanPosCalibHB.png");
1195 cONE->Clear();
1196 }
1197 if (sub == 2) {
1198 cONE->Print("MapRateMeanPosCalibHE.png");
1199 cONE->Clear();
1200 }
1201 if (sub == 3) {
1202 cONE->Print("MapRateMeanPosCalibHO.png");
1203 cONE->Clear();
1204 }
1205 if (sub == 4) {
1206 cONE->Print("MapRateMeanPosCalibHF.png");
1207 cONE->Clear();
1208 }
1209 }
1210 if (test == 16) {
1211 if (sub == 1) {
1212 cONE->Print("MapRateMaxPosCalibHB.png");
1213 cONE->Clear();
1214 }
1215 if (sub == 2) {
1216 cONE->Print("MapRateMaxPosCalibHE.png");
1217 cONE->Clear();
1218 }
1219 if (sub == 3) {
1220 cONE->Print("MapRateMaxPosCalibHO.png");
1221 cONE->Clear();
1222 }
1223 if (sub == 4) {
1224 cONE->Print("MapRateMaxPosCalibHF.png");
1225 cONE->Clear();
1226 }
1227 }
1228
1229 cONE->Divide(1, 1);
1230 cONE->cd(1);
1231 gPad->SetGridy();
1232 gPad->SetGridx();
1233 gPad->SetLogy();
1234 if (sub == 1)
1235 HistAmpl[test][sub]->SetTitle("HB, All Depth");
1236 if (sub == 2)
1237 HistAmpl[test][sub]->SetTitle("HE, All Depth");
1238 if (sub == 3)
1239 HistAmpl[test][sub]->SetTitle("HO, All Depth");
1240 if (sub == 4)
1241 HistAmpl[test][sub]->SetTitle("HF, All Depth");
1242 if (test == 12)
1243 HistAmpl[test][sub]->SetXTitle("ADC Amlitude in each event & cell \b");
1244 if (test == 13)
1245 HistAmpl[test][sub]->SetXTitle("Amplitude RMS in each event & cell \b");
1246 if (test == 14)
1247 HistAmpl[test][sub]->SetXTitle("Ratio in each event & cell \b");
1248 if (test == 15)
1249 HistAmpl[test][sub]->SetXTitle("Mean TS position in each event & cell \b");
1250 if (test == 16)
1251 HistAmpl[test][sub]->SetXTitle("Max TS position in each event & cell \b");
1252 HistAmpl[test][sub]->SetYTitle("Number of cell-events \b");
1253 HistAmpl[test][sub]->SetLineColor(4);
1254 HistAmpl[test][sub]->SetLineWidth(2);
1255 HistAmpl[test][sub]->SetTitleOffset(1.4, "Y");
1256 HistAmpl[test][sub]->Draw("");
1257
1258 if (test == 12) {
1259 gPad->SetLogx();
1260 HistAmpl[test][sub]->GetXaxis()->SetRangeUser(1., 10000.);
1261 }
1262 if (test == 13)
1263 HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 5.);
1264 if (test == 14)
1265 HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 1.);
1266 if (test == 15)
1267 HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
1268 if (test == 16)
1269 HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
1270 cONE->Modified();
1271 cONE->Update();
1272 double min_x[] = {MIN_C[test - 10][sub], MIN_C[test - 10][sub]};
1273 double min_y[] = {0., 100000000.};
1274 TGraph *MIN = new TGraph(2, min_x, min_y);
1275 MIN->SetLineStyle(2);
1276 MIN->SetLineColor(2);
1277 MIN->SetLineWidth(2 + 100 * 100);
1278 MIN->SetFillStyle(3005);
1279 MIN->SetFillColor(2);
1280 MIN->Draw("L");
1281 double max_x[] = {MAX_C[test - 10][sub], MAX_C[test - 10][sub]};
1282 double max_y[] = {0., 100000000.};
1283 TGraph *MAX = new TGraph(2, max_x, max_y);
1284 MAX->SetLineStyle(2);
1285 MAX->SetLineColor(2);
1286 MAX->SetLineWidth(-2 - 100 * 100);
1287 MAX->SetFillStyle(3004);
1288 MAX->SetFillColor(2);
1289 MAX->Draw("L");
1290 if (test == 12) {
1291 if (sub == 1) {
1292 cONE->Print("HistAmplCalibHB.png");
1293 cONE->Clear();
1294 }
1295 if (sub == 2) {
1296 cONE->Print("HistAmplCalibHE.png");
1297 cONE->Clear();
1298 }
1299 if (sub == 3) {
1300 cONE->Print("HistAmplCalibHO.png");
1301 cONE->Clear();
1302 }
1303 if (sub == 4) {
1304 cONE->Print("HistAmplCalibHF.png");
1305 cONE->Clear();
1306 }
1307 }
1308 if (test == 13) {
1309 if (sub == 1) {
1310 cONE->Print("HistRMSCalibHB.png");
1311 cONE->Clear();
1312 }
1313 if (sub == 2) {
1314 cONE->Print("HistRMSCalibHE.png");
1315 cONE->Clear();
1316 }
1317 if (sub == 3) {
1318 cONE->Print("HistRMSCalibHO.png");
1319 cONE->Clear();
1320 }
1321 if (sub == 4) {
1322 cONE->Print("HistRMSCalibHF.png");
1323 cONE->Clear();
1324 }
1325 }
1326 if (test == 14) {
1327 if (sub == 1) {
1328 cONE->Print("Hist43TStoAllTSCalibHB.png");
1329 cONE->Clear();
1330 }
1331 if (sub == 2) {
1332 cONE->Print("Hist43TStoAllTSCalibHE.png");
1333 cONE->Clear();
1334 }
1335 if (sub == 3) {
1336 cONE->Print("Hist43TStoAllTSCalibHO.png");
1337 cONE->Clear();
1338 }
1339 if (sub == 4) {
1340 cONE->Print("Hist43TStoAllTSCalibHF.png");
1341 cONE->Clear();
1342 }
1343 }
1344 if (test == 15) {
1345 if (sub == 1) {
1346 cONE->Print("HistMeanPosCalibHB.png");
1347 cONE->Clear();
1348 }
1349 if (sub == 2) {
1350 cONE->Print("HistMeanPosCalibHE.png");
1351 cONE->Clear();
1352 }
1353 if (sub == 3) {
1354 cONE->Print("HistMeanPosCalibHO.png");
1355 cONE->Clear();
1356 }
1357 if (sub == 4) {
1358 cONE->Print("HistMeanPosCalibHF.png");
1359 cONE->Clear();
1360 }
1361 }
1362 if (test == 16) {
1363 if (sub == 1) {
1364 cONE->Print("HistMaxPosCalibHB.png");
1365 cONE->Clear();
1366 }
1367 if (sub == 2) {
1368 cONE->Print("HistMaxPosCalibHE.png");
1369 cONE->Clear();
1370 }
1371 if (sub == 3) {
1372 cONE->Print("HistMaxPosCalibHO.png");
1373 cONE->Clear();
1374 }
1375 if (sub == 4) {
1376 cONE->Print("HistMaxPosCalibHF.png");
1377 cONE->Clear();
1378 }
1379 }
1380 }
1381 }
1382
1383
1384
1385
1386
1387 Map_Ampl[21][1][1] = (TH2F *)hfile->Get("h_mapDepth1AmplE34_HB");
1388 Map_Ampl[21][1][2] = (TH2F *)hfile->Get("h_mapDepth2AmplE34_HB");
1389 Map_Ampl[21][1][3] = (TH2F *)hfile->Get("h_mapDepth3AmplE34_HB");
1390 Map_Ampl[21][1][4] = (TH2F *)hfile->Get("h_mapDepth4AmplE34_HB");
1391 Map_Ampl[21][2][1] = (TH2F *)hfile->Get("h_mapDepth1AmplE34_HE");
1392 Map_Ampl[21][2][2] = (TH2F *)hfile->Get("h_mapDepth2AmplE34_HE");
1393 Map_Ampl[21][2][3] = (TH2F *)hfile->Get("h_mapDepth3AmplE34_HE");
1394 Map_Ampl[21][2][4] = (TH2F *)hfile->Get("h_mapDepth4AmplE34_HE");
1395 Map_Ampl[21][2][5] = (TH2F *)hfile->Get("h_mapDepth5AmplE34_HE");
1396 Map_Ampl[21][2][6] = (TH2F *)hfile->Get("h_mapDepth6AmplE34_HE");
1397 Map_Ampl[21][2][7] = (TH2F *)hfile->Get("h_mapDepth7AmplE34_HE");
1398 Map_Ampl[21][3][4] = (TH2F *)hfile->Get("h_mapDepth4AmplE34_HO");
1399 Map_Ampl[21][4][1] = (TH2F *)hfile->Get("h_mapDepth1AmplE34_HF");
1400 Map_Ampl[21][4][2] = (TH2F *)hfile->Get("h_mapDepth2AmplE34_HF");
1401 Map_Ampl[21][4][3] = (TH2F *)hfile->Get("h_mapDepth3AmplE34_HF");
1402 Map_Ampl[21][4][4] = (TH2F *)hfile->Get("h_mapDepth4AmplE34_HF");
1403
1404 TH2F *Map_RefAmpl[5][ALLDEPTH];
1405 TH2F *Map_RefSUB[5][ALLDEPTH];
1406
1407 Map_RefAmpl[1][1] = (TH2F *)hreffile->Get("h_mapDepth1AmplE34_HB");
1408 Map_RefAmpl[1][2] = (TH2F *)hreffile->Get("h_mapDepth2AmplE34_HB");
1409 Map_RefAmpl[1][3] = (TH2F *)hreffile->Get("h_mapDepth3AmplE34_HB");
1410 Map_RefAmpl[1][4] = (TH2F *)hreffile->Get("h_mapDepth4AmplE34_HB");
1411 Map_RefAmpl[2][1] = (TH2F *)hreffile->Get("h_mapDepth1AmplE34_HE");
1412 Map_RefAmpl[2][2] = (TH2F *)hreffile->Get("h_mapDepth2AmplE34_HE");
1413 Map_RefAmpl[2][3] = (TH2F *)hreffile->Get("h_mapDepth3AmplE34_HE");
1414 Map_RefAmpl[2][4] = (TH2F *)hreffile->Get("h_mapDepth4AmplE34_HE");
1415 Map_RefAmpl[2][5] = (TH2F *)hreffile->Get("h_mapDepth5AmplE34_HE");
1416 Map_RefAmpl[2][6] = (TH2F *)hreffile->Get("h_mapDepth6AmplE34_HE");
1417 Map_RefAmpl[2][7] = (TH2F *)hreffile->Get("h_mapDepth7AmplE34_HE");
1418 Map_RefAmpl[3][4] = (TH2F *)hreffile->Get("h_mapDepth4AmplE34_HO");
1419 Map_RefAmpl[4][1] = (TH2F *)hreffile->Get("h_mapDepth1AmplE34_HF");
1420 Map_RefAmpl[4][2] = (TH2F *)hreffile->Get("h_mapDepth2AmplE34_HF");
1421 Map_RefAmpl[4][3] = (TH2F *)hreffile->Get("h_mapDepth3AmplE34_HF");
1422 Map_RefAmpl[4][4] = (TH2F *)hreffile->Get("h_mapDepth4AmplE34_HF");
1423
1424 Map_RefSUB[1][1] = (TH2F *)hreffile->Get("h_mapDepth1_HB");
1425 Map_RefSUB[1][2] = (TH2F *)hreffile->Get("h_mapDepth2_HB");
1426 Map_RefSUB[1][3] = (TH2F *)hreffile->Get("h_mapDepth3_HB");
1427 Map_RefSUB[1][4] = (TH2F *)hreffile->Get("h_mapDepth4_HB");
1428 Map_RefSUB[2][1] = (TH2F *)hreffile->Get("h_mapDepth1_HE");
1429 Map_RefSUB[2][2] = (TH2F *)hreffile->Get("h_mapDepth2_HE");
1430 Map_RefSUB[2][3] = (TH2F *)hreffile->Get("h_mapDepth3_HE");
1431 Map_RefSUB[2][4] = (TH2F *)hreffile->Get("h_mapDepth4_HE");
1432 Map_RefSUB[2][5] = (TH2F *)hreffile->Get("h_mapDepth5_HE");
1433 Map_RefSUB[2][6] = (TH2F *)hreffile->Get("h_mapDepth6_HE");
1434 Map_RefSUB[2][7] = (TH2F *)hreffile->Get("h_mapDepth7_HE");
1435 Map_RefSUB[3][4] = (TH2F *)hreffile->Get("h_mapDepth4_HO");
1436 Map_RefSUB[4][1] = (TH2F *)hreffile->Get("h_mapDepth1_HF");
1437 Map_RefSUB[4][2] = (TH2F *)hreffile->Get("h_mapDepth2_HF");
1438 Map_RefSUB[4][3] = (TH2F *)hreffile->Get("h_mapDepth3_HF");
1439 Map_RefSUB[4][4] = (TH2F *)hreffile->Get("h_mapDepth4_HF");
1440
1441 HistAmplDepth[21][1][1] = new TH1F("diffAmpl_Depth1_HB", "", 100, -10., 10.);
1442 HistAmplDepth[21][1][2] = new TH1F("diffAmpl_Depth2_HB", "", 100, -10., 10.);
1443 HistAmplDepth[21][1][3] = new TH1F("diffAmpl_Depth3_HB", "", 100, -10., 10.);
1444 HistAmplDepth[21][1][4] = new TH1F("diffAmpl_Depth4_HB", "", 100, -10., 10.);
1445 HistAmplDepth[21][2][1] = new TH1F("diffAmpl_Depth1_HE", "", 100, -10., 10.);
1446 HistAmplDepth[21][2][2] = new TH1F("diffAmpl_Depth2_HE", "", 100, -10., 10.);
1447 HistAmplDepth[21][2][3] = new TH1F("diffAmpl_Depth3_HE", "", 100, -10., 10.);
1448 HistAmplDepth[21][2][4] = new TH1F("diffAmpl_Depth4_HE", "", 100, -10., 10.);
1449 HistAmplDepth[21][2][5] = new TH1F("diffAmpl_Depth5_HE", "", 100, -10., 10.);
1450 HistAmplDepth[21][2][6] = new TH1F("diffAmpl_Depth6_HE", "", 100, -10., 10.);
1451 HistAmplDepth[21][2][7] = new TH1F("diffAmpl_Depth7_HE", "", 100, -10., 10.);
1452 HistAmplDepth[21][3][4] = new TH1F("diffAmpl_Depth4_HO", "", 100, -10., 10.);
1453 HistAmplDepth[21][4][1] = new TH1F("diffAmpl_Depth1_HF", "", 100, -10., 10.);
1454 HistAmplDepth[21][4][2] = new TH1F("diffAmpl_Depth2_HF", "", 100, -10., 10.);
1455 HistAmplDepth[21][4][3] = new TH1F("diffAmpl_Depth3_HF", "", 100, -10., 10.);
1456 HistAmplDepth[21][4][4] = new TH1F("diffAmpl_Depth4_HF", "", 100, -10., 10.);
1457
1458 for (int sub = 1; sub <= 4; sub++) {
1459
1460 if (sub == 1)
1461 cHB->Divide(2, 2);
1462
1463 if (sub == 2)
1464 cHE->Divide(3, 3);
1465 if (sub == 3)
1466 cONE->Divide(1, 1);
1467
1468 if (sub == 4)
1469 cHF->Divide(2, 2);
1470
1471
1472
1473 for (int k = k_min[sub]; k <= k_max[sub]; k++) {
1474 if (sub == 1)
1475 cHB->cd(k);
1476 if (sub == 2)
1477 cHE->cd(k);
1478 if (sub == 3)
1479 cONE->cd(k - 3);
1480 if (sub == 4)
1481 cHF->cd(k);
1482 Map_Ampl[21][sub][k]->Divide(Map_Ampl[21][sub][k], Map_SUB[sub][k], 1, 1, "B");
1483 gPad->SetGridy();
1484 gPad->SetGridx();
1485 gPad->SetLogz();
1486 if (sub == 1)
1487 sprintf(str, "HB, Depth%d \b", k);
1488 if (sub == 2)
1489 sprintf(str, "HE, Depth%d \b", k);
1490 if (sub == 3)
1491 sprintf(str, "HO, Depth%d \b", k);
1492 if (sub == 4)
1493 sprintf(str, "HF, Depth%d \b", k);
1494 Map_Ampl[21][sub][k]->SetTitle(str);
1495 Map_Ampl[21][sub][k]->SetXTitle("#eta \b");
1496 Map_Ampl[21][sub][k]->SetYTitle("#phi \b");
1497 Map_Ampl[21][sub][k]->SetZTitle("Response \b");
1498 Map_Ampl[21][sub][k]->SetTitleOffset(1.1, "Z");
1499 Map_Ampl[21][sub][k]->Draw("COLZ");
1500 Map_Ampl[21][sub][k]->GetYaxis()->SetRangeUser(0, 71.);
1501
1502 if (sub == 1) {
1503 cHB->Modified();
1504 cHB->Update();
1505 }
1506 if (sub == 2) {
1507 cHE->Modified();
1508 cHE->Update();
1509 }
1510 if (sub == 3) {
1511 cONE->Modified();
1512 cONE->Update();
1513 }
1514 if (sub == 4) {
1515 cHF->Modified();
1516 cHF->Update();
1517 }
1518 }
1519 if (sub == 1) {
1520 cHB->Print("MapRateAmpl1HB.png");
1521 cHB->Clear();
1522 }
1523 if (sub == 2) {
1524 cHE->Print("MapRateAmpl1HE.png");
1525 cHE->Clear();
1526 }
1527 if (sub == 3) {
1528 cONE->Print("MapRateAmpl1HO.png");
1529 cONE->Clear();
1530 }
1531 if (sub == 4) {
1532 cHF->Print("MapRateAmpl1HF.png");
1533 cHF->Clear();
1534 }
1535
1536
1537 if (sub == 1)
1538 cHB->Divide(2, 2);
1539
1540 if (sub == 2)
1541 cHE->Divide(3, 3);
1542 if (sub == 3)
1543 cONE->Divide(1, 1);
1544
1545 if (sub == 4)
1546 cHF->Divide(2, 2);
1547
1548 for (int k = k_min[sub]; k <= k_max[sub]; k++) {
1549 if (sub == 1)
1550 cHB->cd(k);
1551 if (sub == 2)
1552 cHE->cd(k);
1553 if (sub == 3)
1554 cONE->cd(k - 3);
1555 if (sub == 4)
1556 cHF->cd(k);
1557 Map_RefAmpl[sub][k]->Divide(Map_RefAmpl[sub][k], Map_RefSUB[sub][k], 1, 1, "B");
1558 gPad->SetGridy();
1559 gPad->SetGridx();
1560 gPad->SetLogz();
1561 if (sub == 1)
1562 sprintf(str, "HB, Depth%d \b", k);
1563 if (sub == 2)
1564 sprintf(str, "HE, Depth%d \b", k);
1565 if (sub == 3)
1566 sprintf(str, "HO, Depth%d \b", k);
1567 if (sub == 4)
1568 sprintf(str, "HF, Depth%d \b", k);
1569 Map_RefAmpl[sub][k]->SetTitle(str);
1570 Map_RefAmpl[sub][k]->SetXTitle("#eta \b");
1571 Map_RefAmpl[sub][k]->SetYTitle("#phi \b");
1572 Map_RefAmpl[sub][k]->SetZTitle("Response\b");
1573 Map_RefAmpl[sub][k]->SetTitleOffset(1.1, "Z");
1574 Map_RefAmpl[sub][k]->Draw("COLZ");
1575 Map_RefAmpl[sub][k]->GetYaxis()->SetRangeUser(0, 71.);
1576
1577 if (sub == 1) {
1578 cHB->Modified();
1579 cHB->Update();
1580 }
1581 if (sub == 2) {
1582 cHE->Modified();
1583 cHE->Update();
1584 }
1585 if (sub == 3) {
1586 cONE->Modified();
1587 cONE->Update();
1588 }
1589 if (sub == 4) {
1590 cHF->Modified();
1591 cHF->Update();
1592 }
1593 }
1594 if (sub == 1) {
1595 cHB->Print("MapRateAmpl2HB.png");
1596 cHB->Clear();
1597 }
1598 if (sub == 2) {
1599 cHE->Print("MapRateAmpl2HE.png");
1600 cHE->Clear();
1601 }
1602 if (sub == 3) {
1603 cONE->Print("MapRateAmpl2HO.png");
1604 cONE->Clear();
1605 }
1606 if (sub == 4) {
1607 cHF->Print("MapRateAmpl2HF.png");
1608 cHF->Clear();
1609 }
1610
1611
1612 if (sub == 1)
1613 cHB->Divide(2, 2);
1614
1615 if (sub == 2)
1616 cHE->Divide(3, 3);
1617 if (sub == 3)
1618 cONE->Divide(1, 1);
1619
1620 if (sub == 4)
1621 cHF->Divide(2, 2);
1622
1623 for (int k = k_min[sub]; k <= k_max[sub]; k++) {
1624 if (sub == 1)
1625 cHB->cd(k);
1626 if (sub == 2)
1627 cHE->cd(k);
1628 if (sub == 3)
1629 cONE->cd(k - 3);
1630 if (sub == 4)
1631 cHF->cd(k);
1632 TH2F *TTT = new TH2F("Map", "Map", 82, -41, 40, 72, 0, 71);
1633 for (int x = 1; x <= Map_Ampl[21][sub][k]->GetXaxis()->GetNbins(); x++) {
1634 for (int y = 1; y <= Map_Ampl[21][sub][k]->GetYaxis()->GetNbins(); y++) {
1635 if (Map_Ampl[21][sub][k]->GetBinContent(x, y) != 0 && Map_RefAmpl[sub][k]->GetBinContent(x, y) != 0) {
1636 double ccc1 = Map_Ampl[21][sub][k]->GetBinContent(x, y) - Map_RefAmpl[sub][k]->GetBinContent(x, y);
1637 ccc1 = 100. * ccc1 / Map_Ampl[21][sub][k]->GetBinContent(x, y);
1638 HistAmplDepth[21][sub][k]->Fill(ccc1);
1639 Map_Ampl[21][sub][k]->SetBinContent(x, y, fabs(ccc1));
1640 if (fabs(ccc1) > porog[sub])
1641 TTT->SetBinContent(x, y, fabs(ccc1));
1642 else
1643 TTT->SetBinContent(x, y, 0);
1644 }
1645 }
1646 }
1647 gPad->SetGridy();
1648 gPad->SetGridx();
1649
1650 if (sub == 1)
1651 sprintf(str, "HB, Depth%d \b", k);
1652 if (sub == 2)
1653 sprintf(str, "HE, Depth%d \b", k);
1654 if (sub == 3)
1655 sprintf(str, "HO, Depth%d \b", k);
1656 if (sub == 4)
1657 sprintf(str, "HF, Depth%d \b", k);
1658 TTT->SetTitle(str);
1659 TTT->SetXTitle("#eta \b");
1660 TTT->SetYTitle("#phi \b");
1661 TTT->SetZTitle("Relative difference, % \b");
1662 TTT->SetTitleOffset(0.9, "Z");
1663 TTT->Draw("COLZ");
1664 TTT->GetYaxis()->SetRangeUser(0, 71.);
1665 TTT->GetZaxis()->SetRangeUser(0, 10.);
1666 if (sub == 1) {
1667 cHB->Modified();
1668 cHB->Update();
1669 }
1670 if (sub == 2) {
1671 cHE->Modified();
1672 cHE->Update();
1673 }
1674 if (sub == 3) {
1675 cONE->Modified();
1676 cONE->Update();
1677 }
1678 if (sub == 4) {
1679 cHF->Modified();
1680 cHF->Update();
1681 }
1682 }
1683
1684 if (sub == 1) {
1685 cHB->Print("MapRateAmplDriftHB.png");
1686 cHB->Clear();
1687 }
1688 if (sub == 2) {
1689 cHE->Print("MapRateAmplDriftHE.png");
1690 cHE->Clear();
1691 }
1692 if (sub == 3) {
1693 cONE->Print("MapRateAmplDriftHO.png");
1694 cONE->Clear();
1695 }
1696 if (sub == 4) {
1697 cHF->Print("MapRateAmplDriftHF.png");
1698 cHF->Clear();
1699 }
1700
1701
1702
1703 if (sub == 1)
1704 cHB->Divide(2, 2);
1705
1706 if (sub == 2)
1707 cHE->Divide(3, 3);
1708 if (sub == 3)
1709 cONE->Divide(1, 1);
1710
1711 if (sub == 4)
1712 cHF->Divide(2, 2);
1713
1714 for (int k = k_min[sub]; k <= k_max[sub]; k++) {
1715 if (sub == 1)
1716 cHB->cd(k);
1717 if (sub == 2)
1718 cHE->cd(k);
1719 if (sub == 3)
1720 cONE->cd(k - 3);
1721 if (sub == 4)
1722 cHF->cd(k);
1723 gPad->SetGridy();
1724 gPad->SetGridx();
1725 gPad->SetLogy();
1726 if (sub == 1)
1727 sprintf(str, "HB, Depth%d \b", k);
1728 if (sub == 2)
1729 sprintf(str, "HE, Depth%d \b", k);
1730 if (sub == 3)
1731 sprintf(str, "HO, Depth%d \b", k);
1732 if (sub == 4)
1733 sprintf(str, "HF, Depth%d \b", k);
1734 HistAmplDepth[21][sub][k]->SetTitle(str);
1735 HistAmplDepth[21][sub][k]->SetYTitle("Number of cell-events \b");
1736 HistAmplDepth[21][sub][k]->SetXTitle("Per cent \b");
1737 HistAmplDepth[21][sub][k]->SetLineColor(4);
1738 HistAmplDepth[21][sub][k]->SetLineWidth(2);
1739 HistAmplDepth[21][sub][k]->SetTitleOffset(1.4, "Y");
1740 HistAmplDepth[21][sub][k]->Draw();
1741
1742 HistAmplDepth[21][sub][k]->GetXaxis()->SetRangeUser(-10., 10.);
1743 if (sub == 1) {
1744 cHB->Modified();
1745 cHB->Update();
1746 }
1747 if (sub == 2) {
1748 cHE->Modified();
1749 cHE->Update();
1750 }
1751 if (sub == 3) {
1752 cONE->Modified();
1753 cONE->Update();
1754 }
1755 if (sub == 4) {
1756 cHF->Modified();
1757 cHF->Update();
1758 }
1759 double min_x[] = {-1 * porog[sub], -1 * porog[sub]};
1760 double min_y[] = {0., 100000000.};
1761 TGraph *MIN = new TGraph(2, min_x, min_y);
1762 MIN->SetLineStyle(2);
1763 MIN->SetLineColor(2);
1764 MIN->SetLineWidth(2 + 100 * 100);
1765 MIN->SetFillStyle(3005);
1766 MIN->SetFillColor(2);
1767 MIN->Draw("L");
1768 double max_x[] = {porog[sub], porog[sub]};
1769 double max_y[] = {0., 100000000.};
1770 TGraph *MAX = new TGraph(2, max_x, max_y);
1771 MAX->SetLineStyle(2);
1772 MAX->SetLineColor(2);
1773 MAX->SetLineWidth(-2 - 100 * 100);
1774 MAX->SetFillStyle(3004);
1775 MAX->SetFillColor(2);
1776 MAX->Draw("L");
1777 }
1778 if (sub == 1) {
1779 cHB->Print("HistAmplDriftDepthHB.png");
1780 cHB->Clear();
1781 }
1782 if (sub == 2) {
1783 cHE->Print("HistAmplDriftDepthHE.png");
1784 cHE->Clear();
1785 }
1786 if (sub == 3) {
1787 cONE->Print("HistAmplDriftDepthHO.png");
1788 cONE->Clear();
1789 }
1790 if (sub == 4) {
1791 cHF->Print("HistAmplDriftDepthHF.png");
1792 cHF->Clear();
1793 }
1794 }
1795
1796
1797
1798
1799
1800 Map_Ampl[31][1][1] = (TH2F *)hfile->Get("h_mapDepth1pedestal_HB");
1801 Map_Ampl[31][1][2] = (TH2F *)hfile->Get("h_mapDepth2pedestal_HB");
1802 Map_Ampl[31][1][3] = (TH2F *)hfile->Get("h_mapDepth3pedestal_HB");
1803 Map_Ampl[31][1][4] = (TH2F *)hfile->Get("h_mapDepth4pedestal_HB");
1804 Map_Ampl[31][2][1] = (TH2F *)hfile->Get("h_mapDepth1pedestal_HE");
1805 Map_Ampl[31][2][2] = (TH2F *)hfile->Get("h_mapDepth2pedestal_HE");
1806 Map_Ampl[31][2][3] = (TH2F *)hfile->Get("h_mapDepth3pedestal_HE");
1807 Map_Ampl[31][2][4] = (TH2F *)hfile->Get("h_mapDepth4pedestal_HE");
1808 Map_Ampl[31][2][5] = (TH2F *)hfile->Get("h_mapDepth5pedestal_HE");
1809 Map_Ampl[31][2][6] = (TH2F *)hfile->Get("h_mapDepth6pedestal_HE");
1810 Map_Ampl[31][2][7] = (TH2F *)hfile->Get("h_mapDepth7pedestal_HE");
1811 Map_Ampl[31][3][4] = (TH2F *)hfile->Get("h_mapDepth4pedestal_HO");
1812 Map_Ampl[31][4][1] = (TH2F *)hfile->Get("h_mapDepth1pedestal_HF");
1813 Map_Ampl[31][4][2] = (TH2F *)hfile->Get("h_mapDepth2pedestal_HF");
1814 Map_Ampl[31][4][3] = (TH2F *)hfile->Get("h_mapDepth3pedestal_HF");
1815 Map_Ampl[31][4][4] = (TH2F *)hfile->Get("h_mapDepth4pedestal_HF");
1816
1817 Map_Ampl[32][1][1] = (TH2F *)hfile->Get("h_mapDepth1pedestalw_HB");
1818 Map_Ampl[32][1][2] = (TH2F *)hfile->Get("h_mapDepth2pedestalw_HB");
1819 Map_Ampl[32][1][3] = (TH2F *)hfile->Get("h_mapDepth3pedestalw_HB");
1820 Map_Ampl[32][1][4] = (TH2F *)hfile->Get("h_mapDepth4pedestalw_HB");
1821 Map_Ampl[32][2][1] = (TH2F *)hfile->Get("h_mapDepth1pedestalw_HE");
1822 Map_Ampl[32][2][2] = (TH2F *)hfile->Get("h_mapDepth2pedestalw_HE");
1823 Map_Ampl[32][2][3] = (TH2F *)hfile->Get("h_mapDepth3pedestalw_HE");
1824 Map_Ampl[32][2][4] = (TH2F *)hfile->Get("h_mapDepth4pedestalw_HE");
1825 Map_Ampl[32][2][5] = (TH2F *)hfile->Get("h_mapDepth5pedestalw_HE");
1826 Map_Ampl[32][2][6] = (TH2F *)hfile->Get("h_mapDepth6pedestalw_HE");
1827 Map_Ampl[32][2][7] = (TH2F *)hfile->Get("h_mapDepth7pedestalw_HE");
1828 Map_Ampl[32][3][4] = (TH2F *)hfile->Get("h_mapDepth4pedestalw_HO");
1829 Map_Ampl[32][4][1] = (TH2F *)hfile->Get("h_mapDepth1pedestalw_HF");
1830 Map_Ampl[32][4][2] = (TH2F *)hfile->Get("h_mapDepth2pedestalw_HF");
1831 Map_Ampl[32][4][3] = (TH2F *)hfile->Get("h_mapDepth3pedestalw_HF");
1832 Map_Ampl[32][4][4] = (TH2F *)hfile->Get("h_mapDepth4pedestalw_HF");
1833
1834 HistPed[1][1][0] = (TH1F *)hfile->Get("h_pedestal0_HB");
1835 HistPed[1][1][1] = (TH1F *)hfile->Get("h_pedestal1_HB");
1836 HistPed[1][1][2] = (TH1F *)hfile->Get("h_pedestal2_HB");
1837 HistPed[1][1][3] = (TH1F *)hfile->Get("h_pedestal3_HB");
1838 HistPed[2][1][0] = (TH1F *)hfile->Get("h_pedestalw0_HB");
1839 HistPed[2][1][1] = (TH1F *)hfile->Get("h_pedestalw1_HB");
1840 HistPed[2][1][2] = (TH1F *)hfile->Get("h_pedestalw2_HB");
1841 HistPed[2][1][3] = (TH1F *)hfile->Get("h_pedestalw3_HB");
1842
1843 HistPed[1][2][0] = (TH1F *)hfile->Get("h_pedestal0_HE");
1844 HistPed[1][2][1] = (TH1F *)hfile->Get("h_pedestal1_HE");
1845 HistPed[1][2][2] = (TH1F *)hfile->Get("h_pedestal2_HE");
1846 HistPed[1][2][3] = (TH1F *)hfile->Get("h_pedestal3_HE");
1847 HistPed[2][2][0] = (TH1F *)hfile->Get("h_pedestalw0_HE");
1848 HistPed[2][2][1] = (TH1F *)hfile->Get("h_pedestalw1_HE");
1849 HistPed[2][2][2] = (TH1F *)hfile->Get("h_pedestalw2_HE");
1850 HistPed[2][2][3] = (TH1F *)hfile->Get("h_pedestalw3_HE");
1851
1852 HistPed[1][3][0] = (TH1F *)hfile->Get("h_pedestal0_HO");
1853 HistPed[1][3][1] = (TH1F *)hfile->Get("h_pedestal1_HO");
1854 HistPed[1][3][2] = (TH1F *)hfile->Get("h_pedestal2_HO");
1855 HistPed[1][3][3] = (TH1F *)hfile->Get("h_pedestal3_HO");
1856 HistPed[2][3][0] = (TH1F *)hfile->Get("h_pedestalw0_HO");
1857 HistPed[2][3][1] = (TH1F *)hfile->Get("h_pedestalw1_HO");
1858 HistPed[2][3][2] = (TH1F *)hfile->Get("h_pedestalw2_HO");
1859 HistPed[2][3][3] = (TH1F *)hfile->Get("h_pedestalw3_HO");
1860
1861 HistPed[1][4][0] = (TH1F *)hfile->Get("h_pedestal0_HF");
1862 HistPed[1][4][1] = (TH1F *)hfile->Get("h_pedestal1_HF");
1863 HistPed[1][4][2] = (TH1F *)hfile->Get("h_pedestal2_HF");
1864 HistPed[1][4][3] = (TH1F *)hfile->Get("h_pedestal3_HF");
1865 HistPed[2][4][0] = (TH1F *)hfile->Get("h_pedestalw0_HF");
1866 HistPed[2][4][1] = (TH1F *)hfile->Get("h_pedestalw1_HF");
1867 HistPed[2][4][2] = (TH1F *)hfile->Get("h_pedestalw2_HF");
1868 HistPed[2][4][3] = (TH1F *)hfile->Get("h_pedestalw3_HF");
1869
1870 for (int test = 31; test <= 32; test++) {
1871 for (int sub = 1; sub <= 4; sub++) {
1872
1873 if (sub == 1)
1874 cHB->Divide(2, 2);
1875
1876 if (sub == 2)
1877 cHE->Divide(3, 3);
1878 if (sub == 3)
1879 cONE->Divide(1, 1);
1880
1881 if (sub == 4)
1882 cHF->Divide(2, 2);
1883
1884
1885
1886 for (int k = k_min[sub]; k <= k_max[sub]; k++) {
1887 if (sub == 1)
1888 cHB->cd(k);
1889 if (sub == 2)
1890 cHE->cd(k);
1891 if (sub == 3)
1892 cONE->cd(k - 3);
1893 if (sub == 4)
1894 cHF->cd(k);
1895 Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_SUB[sub][k], 1, 1, "B");
1896 gPad->SetGridy();
1897 gPad->SetGridx();
1898 gPad->SetLogz();
1899 if (sub == 1)
1900 sprintf(str, "HB, Depth%d \b", k);
1901 if (sub == 2)
1902 sprintf(str, "HE, Depth%d \b", k);
1903 if (sub == 3)
1904 sprintf(str, "HO, Depth%d \b", k);
1905 if (sub == 4)
1906 sprintf(str, "HF, Depth%d \b", k);
1907 Map_Ampl[test][sub][k]->SetTitle(str);
1908 Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
1909 Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
1910 Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
1911 if (sub == 3)
1912 Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
1913 Map_Ampl[test][sub][k]->Draw("COLZ");
1914 Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1915 Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
1916 if (sub == 1) {
1917 cHB->Modified();
1918 cHB->Update();
1919 }
1920 if (sub == 2) {
1921 cHE->Modified();
1922 cHE->Update();
1923 }
1924 if (sub == 3) {
1925 cONE->Modified();
1926 cONE->Update();
1927 }
1928 if (sub == 4) {
1929 cHF->Modified();
1930 cHF->Update();
1931 }
1932 }
1933 if (test == 31) {
1934 if (sub == 1) {
1935 cHB->Print("MapRatePedHB.png");
1936 cHB->Clear();
1937 }
1938 if (sub == 2) {
1939 cHE->Print("MapRatePedHE.png");
1940 cHE->Clear();
1941 }
1942 if (sub == 3) {
1943 cONE->Print("MapRatePedHO.png");
1944 cONE->Clear();
1945 }
1946 if (sub == 4) {
1947 cHF->Print("MapRatePedHF.png");
1948 cHF->Clear();
1949 }
1950 }
1951 if (test == 32) {
1952 if (sub == 1) {
1953 cHB->Print("MapRatePedWidthsHB.png");
1954 cHB->Clear();
1955 }
1956 if (sub == 2) {
1957 cHE->Print("MapRatePedWidthsHE.png");
1958 cHE->Clear();
1959 }
1960 if (sub == 3) {
1961 cONE->Print("MapRatePedWidthsHO.png");
1962 cONE->Clear();
1963 }
1964 if (sub == 4) {
1965 cHF->Print("MapRatePedWidthsHF.png");
1966 cHF->Clear();
1967 }
1968 }
1969
1970
1971
1972 cPED->Divide(2, 2);
1973 for (int cap = 0; cap <= 3; cap++) {
1974 cPED->cd(cap + 1);
1975 gPad->SetGridy();
1976 gPad->SetGridx();
1977 gPad->SetLogy();
1978
1979 if (sub == 1)
1980 sprintf(str, "HB, Cap%d, all depth\b", cap);
1981 if (sub == 2)
1982 sprintf(str, "HE, Cap%d, all depth\b", cap);
1983 if (sub == 3)
1984 sprintf(str, "HO, Cap%d, all depth\b", cap);
1985 if (sub == 4)
1986 sprintf(str, "HF, Cap%d, all depth\b", cap);
1987
1988 HistPed[test - 30][sub][cap]->SetTitle(str);
1989
1990 if (test == 31)
1991 HistPed[test - 30][sub][cap]->SetXTitle("Pedestals in each event & cell \b");
1992 if (test == 32)
1993 HistPed[test - 30][sub][cap]->SetXTitle("Pedestal Widths in each event & cell \b");
1994
1995 HistPed[test - 30][sub][cap]->SetYTitle("Number of channel-events \b");
1996 HistPed[test - 30][sub][cap]->SetLineColor(4);
1997 HistPed[test - 30][sub][cap]->SetLineWidth(2);
1998 HistPed[test - 30][sub][cap]->SetTitleOffset(1.4, "Y");
1999 HistPed[test - 30][sub][cap]->Draw("");
2000
2001
2002
2003
2004 cPED->Modified();
2005 cPED->Update();
2006 double min_x[] = {Pedest[test - 31][sub], Pedest[test - 31][sub]};
2007 double min_y[] = {0., 100000000.};
2008 TGraph *MIN = new TGraph(2, min_x, min_y);
2009 MIN->SetLineStyle(2);
2010 MIN->SetLineColor(2);
2011 MIN->SetLineWidth(2 + 100 * 100);
2012 MIN->SetFillStyle(3005);
2013 MIN->SetFillColor(2);
2014 MIN->Draw("L");
2015 }
2016 if (test == 31) {
2017 if (sub == 1) {
2018 cPED->Print("HistPedestalsHB.png");
2019 cPED->Clear();
2020 }
2021 if (sub == 2) {
2022 cPED->Print("HistPedestalsHE.png");
2023 cPED->Clear();
2024 }
2025 if (sub == 3) {
2026 cPED->Print("HistPedestalsHO.png");
2027 cPED->Clear();
2028 }
2029 if (sub == 4) {
2030 cPED->Print("HistPedestalsHF.png");
2031 cPED->Clear();
2032 }
2033 }
2034 if (test == 32) {
2035 if (sub == 1) {
2036 cPED->Print("HistPedestalWidthsHB.png");
2037 cPED->Clear();
2038 }
2039 if (sub == 2) {
2040 cPED->Print("HistPedestalWidthsHE.png");
2041 cPED->Clear();
2042 }
2043 if (sub == 3) {
2044 cPED->Print("HistPedestalWidthsHO.png");
2045 cPED->Clear();
2046 }
2047 if (sub == 4) {
2048 cPED->Print("HistPedestalWidthsHF.png");
2049 cPED->Clear();
2050 }
2051 }
2052 }
2053 }
2054
2055
2056
2057
2058
2059 cPED->Clear();
2060 Map_Ped[1][1] = (TH2F *)hfile->Get("h2_pedvsampl_HB");
2061 Map_Ped[1][2] = (TH2F *)hfile->Get("h2_pedvsampl_HE");
2062 Map_Ped[1][3] = (TH2F *)hfile->Get("h2_pedvsampl_HO");
2063 Map_Ped[1][4] = (TH2F *)hfile->Get("h2_pedvsampl_HF");
2064 Map_Ped[2][1] = (TH2F *)hfile->Get("h2_pedwvsampl_HB");
2065 Map_Ped[2][2] = (TH2F *)hfile->Get("h2_pedwvsampl_HE");
2066 Map_Ped[2][3] = (TH2F *)hfile->Get("h2_pedwvsampl_HO");
2067 Map_Ped[2][4] = (TH2F *)hfile->Get("h2_pedwvsampl_HF");
2068 for (int sub = 1; sub <= 4; sub++) {
2069 cPED->Divide(2, 1);
2070 for (int test = 1; test <= 2; test++) {
2071 cPED->cd(test);
2072 gPad->SetGridy();
2073 gPad->SetGridx();
2074 gPad->SetLogz();
2075 if (test == 1)
2076 Map_Ped[test][sub]->SetXTitle("Pedestal, fC \b");
2077 if (test == 2)
2078 Map_Ped[test][sub]->SetXTitle("pedestal Width, fC \b");
2079 Map_Ped[test][sub]->SetYTitle("Amplitude, fC \b");
2080 Map_Ped[test][sub]->SetZTitle("entries \b");
2081 if (test == 1)
2082 sprintf(str, "Cap0 Pedestal vs Amplitude \b");
2083 if (test == 2)
2084 sprintf(str, "Cap0 pedestalWidth vs Amplitude \b");
2085 Map_Ped[test][sub]->SetTitle(str);
2086 Map_Ped[test][sub]->Draw("COLZ");
2087
2088
2089 cPED->Modified();
2090 cPED->Update();
2091 }
2092 if (sub == 1) {
2093 cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHB.png");
2094 cPED->Clear();
2095 }
2096 if (sub == 2) {
2097 cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHE.png");
2098 cPED->Clear();
2099 }
2100 if (sub == 3) {
2101 cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHO.png");
2102 cPED->Clear();
2103 }
2104 if (sub == 4) {
2105 cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHF.png");
2106 cPED->Clear();
2107 }
2108 }
2109
2110
2111
2112
2113
2114 cONE->Clear();
2115 hist_GoodTSshape[1] = (TH1F *)hfile->Get("h_shape_good_channels_HB");
2116 hist_GoodTSshape[2] = (TH1F *)hfile->Get("h_shape_good_channels_HE");
2117 hist_GoodTSshape[3] = (TH1F *)hfile->Get("h_shape_good_channels_HO");
2118 hist_GoodTSshape[4] = (TH1F *)hfile->Get("h_shape_good_channels_HF");
2119
2120 hist_GoodTSshape0[1] = (TH1F *)hfile->Get("h_shape0_good_channels_HB");
2121 hist_GoodTSshape0[2] = (TH1F *)hfile->Get("h_shape0_good_channels_HE");
2122 hist_GoodTSshape0[3] = (TH1F *)hfile->Get("h_shape0_good_channels_HO");
2123 hist_GoodTSshape0[4] = (TH1F *)hfile->Get("h_shape0_good_channels_HF");
2124
2125 hist_BadTSshape[1] = (TH1F *)hfile->Get("h_shape_bad_channels_HB");
2126 hist_BadTSshape[2] = (TH1F *)hfile->Get("h_shape_bad_channels_HE");
2127 hist_BadTSshape[3] = (TH1F *)hfile->Get("h_shape_bad_channels_HO");
2128 hist_BadTSshape[4] = (TH1F *)hfile->Get("h_shape_bad_channels_HF");
2129
2130 hist_BadTSshape0[1] = (TH1F *)hfile->Get("h_shape0_bad_channels_HB");
2131 hist_BadTSshape0[2] = (TH1F *)hfile->Get("h_shape0_bad_channels_HE");
2132 hist_BadTSshape0[3] = (TH1F *)hfile->Get("h_shape0_bad_channels_HO");
2133 hist_BadTSshape0[4] = (TH1F *)hfile->Get("h_shape0_bad_channels_HF");
2134
2135 cONE->cd(1);
2136
2137 for (int sub = 1; sub <= 4; sub++) {
2138
2139 gPad->SetGridy();
2140 gPad->SetGridx();
2141 gPad->SetLogz();
2142 hist_GoodTSshape[sub]->Divide(hist_GoodTSshape[sub], hist_GoodTSshape0[sub], 1, 1, "B");
2143 hist_GoodTSshape[sub]->SetXTitle("Time slice \b");
2144 hist_GoodTSshape[sub]->SetYTitle("ADC counts \b");
2145 sprintf(str, "Mean ADC Shape \b");
2146 hist_GoodTSshape[sub]->SetTitle(str);
2147 hist_GoodTSshape[sub]->Draw("");
2148
2149
2150 cONE->Modified();
2151 cONE->Update();
2152 if (sub == 1) {
2153 cONE->Print("HistGoodTSshapesHB.png");
2154 cONE->Clear();
2155 }
2156 if (sub == 2) {
2157 cONE->Print("HistGoodTSshapesHE.png");
2158 cONE->Clear();
2159 }
2160 if (sub == 3) {
2161 cONE->Print("HistGoodTSshapesHO.png");
2162 cONE->Clear();
2163 }
2164 if (sub == 4) {
2165 cONE->Print("HistGoodTSshapesHF.png");
2166 cONE->Clear();
2167 }
2168 }
2169
2170 for (int sub = 1; sub <= 4; sub++) {
2171
2172 gPad->SetGridy();
2173 gPad->SetGridx();
2174 gPad->SetLogz();
2175 hist_BadTSshape[sub]->Divide(hist_BadTSshape[sub], hist_BadTSshape0[sub], 1, 1, "B");
2176 hist_BadTSshape[sub]->SetXTitle("Time slice \b");
2177 hist_BadTSshape[sub]->SetYTitle("ADC counts \b");
2178 sprintf(str, "Mean ADC Shape \b");
2179 hist_BadTSshape[sub]->SetTitle(str);
2180 hist_BadTSshape[sub]->Draw("");
2181
2182
2183 cONE->Modified();
2184 cONE->Update();
2185 if (sub == 1) {
2186 cONE->Print("HistBadTSshapesHB.png");
2187 cONE->Clear();
2188 }
2189 if (sub == 2) {
2190 cONE->Print("HistBadTSshapesHE.png");
2191 cONE->Clear();
2192 }
2193 if (sub == 3) {
2194 cONE->Print("HistBadTSshapesHO.png");
2195 cONE->Clear();
2196 }
2197 if (sub == 4) {
2198 cONE->Print("HistBadTSshapesHF.png");
2199 cONE->Clear();
2200 }
2201 }
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433 std::cout << " We are here to print 2017 MAPs (do not use for run3 )" << std::endl;
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763 std::string raw_class, raw_class1, raw_class2, raw_class3;
2764 int ind = 0;
2765
2766 for (int sub = 1; sub <= 4; sub++) {
2767 ofstream htmlFileT, htmlFileC, htmlFileD, htmlFileP, htmlFileS;
2768 if (sub == 1) {
2769 htmlFileT.open("HB_Tile.html");
2770 htmlFileC.open("HB_Calib.html");
2771 htmlFileD.open("HB_Drift.html");
2772 htmlFileP.open("HB_Pedestals.html");
2773 htmlFileS.open("HB_Shapes.html");
2774 }
2775 if (sub == 2) {
2776 htmlFileT.open("HE_Tile.html");
2777 htmlFileC.open("HE_Calib.html");
2778 htmlFileD.open("HE_Drift.html");
2779 htmlFileP.open("HE_Pedestals.html");
2780 htmlFileS.open("HE_Shapes.html");
2781 }
2782 if (sub == 3) {
2783 htmlFileT.open("HO_Tile.html");
2784 htmlFileC.open("HO_Calib.html");
2785 htmlFileD.open("HO_Drift.html");
2786 htmlFileP.open("HO_Pedestals.html");
2787 htmlFileS.open("HO_Shapes.html");
2788 }
2789 if (sub == 4) {
2790 htmlFileT.open("HF_Tile.html");
2791 htmlFileC.open("HF_Calib.html");
2792 htmlFileD.open("HF_Drift.html");
2793 htmlFileP.open("HF_Pedestals.html");
2794 htmlFileS.open("HF_Shapes.html");
2795 }
2796
2797
2798 htmlFileT << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
2799 htmlFileT << "<head>" << std::endl;
2800 htmlFileT << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
2801 htmlFileT << "<title> Remote Monitoring Tool Global</title>" << std::endl;
2802 htmlFileT << "<style type=\"text/css\">" << std::endl;
2803 htmlFileT << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
2804 << std::endl;
2805 htmlFileT << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
2806 htmlFileT << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
2807 "text-align: center;}"
2808 << std::endl;
2809 htmlFileT << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
2810 htmlFileT << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
2811 htmlFileT << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
2812 htmlFileT << "</style>" << std::endl;
2813 htmlFileT << "<body>" << std::endl;
2814
2815 if (sub == 1)
2816 htmlFileT << "<h1> Criteria for megatile channels for HB, RUN = " << runnumber << " </h1>" << std::endl;
2817 if (sub == 2)
2818 htmlFileT << "<h1> Criteria for megatile channels for HE, RUN = " << runnumber << " </h1>" << std::endl;
2819 if (sub == 3)
2820 htmlFileT << "<h1> Criteria for megatile channels for HO, RUN = " << runnumber << " </h1>" << std::endl;
2821 if (sub == 4)
2822 htmlFileT << "<h1> Criteria for megatile channels for HF, RUN = " << runnumber << " </h1>" << std::endl;
2823 htmlFileT << "<br>" << std::endl;
2824
2825
2826
2827 htmlFileT << "<h2> 0. Entries for each channel.</h3>" << std::endl;
2828 htmlFileT << "<h3> 0.A. Entries in each channel for each depth.</h3>" << std::endl;
2829 htmlFileT << "<h4> Channel legend: color is number of hits in digi collection </h4>" << std::endl;
2830 if (sub == 1)
2831 htmlFileT << " <img src=\"MapRateEntryHB.png\" />" << std::endl;
2832 if (sub == 2)
2833 htmlFileT << " <img src=\"MapRateEntryHE.png\" />" << std::endl;
2834 if (sub == 3)
2835 htmlFileT << " <img src=\"MapRateEntryHO.png\" />" << std::endl;
2836 if (sub == 4)
2837 htmlFileT << " <img src=\"MapRateEntryHF.png\" />" << std::endl;
2838 htmlFileT << "<br>" << std::endl;
2839
2840
2841 htmlFileT << "<h2> 1. Cm criterion: CapID errors for each channel.</h3>" << std::endl;
2842 htmlFileT << "<h3> 1.A. Rate of CapId failures in each channel for each depth.</h3>" << std::endl;
2843 htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
2844 if (sub == 1)
2845 htmlFileT << " <img src=\"MapRateCapIDHB.png\" />" << std::endl;
2846 if (sub == 2)
2847 htmlFileT << " <img src=\"MapRateCapIDHE.png\" />" << std::endl;
2848 if (sub == 3)
2849 htmlFileT << " <img src=\"MapRateCapIDHO.png\" />" << std::endl;
2850 if (sub == 4)
2851 htmlFileT << " <img src=\"MapRateCapIDHF.png\" />" << std::endl;
2852 htmlFileT << "<br>" << std::endl;
2853
2854
2855 htmlFileT << "<h2> 2. Am criterion: ADC amplitude collected over all TSs(Full Amplitude) for each channel. </h3>"
2856 << std::endl;
2857 htmlFileT << "<h3> 2.A. Full ADC amplitude distribution over all events, channels and depths.</h3>" << std::endl;
2858 htmlFileT << "<h4> Legend: Bins less " << MIN_M[2][sub] << " correpond to bad ADC amplitude </h4>" << std::endl;
2859 if (sub == 1)
2860 htmlFileT << " <img src=\"HistAmplHB.png\" />" << std::endl;
2861 if (sub == 2)
2862 htmlFileT << " <img src=\"HistAmplHE.png\" />" << std::endl;
2863 if (sub == 3)
2864 htmlFileT << " <img src=\"HistAmplHO.png\" />" << std::endl;
2865 if (sub == 4)
2866 htmlFileT << " <img src=\"HistAmplHF.png\" />" << std::endl;
2867 htmlFileT << "<br>" << std::endl;
2868 htmlFileT << "<h3> 2.B. Rate of bad ADC amplitude (<" << MIN_M[2][sub] << ") in each channel for each depth. </h3>"
2869 << std::endl;
2870 htmlFileT << "<h4> Channel legend: white - good, other colours - bad. </h4>" << std::endl;
2871 if (sub == 1)
2872 htmlFileT << " <img src=\"MapRateAmplHB.png\" />" << std::endl;
2873 if (sub == 2)
2874 htmlFileT << " <img src=\"MapRateAmplHE.png\" />" << std::endl;
2875 if (sub == 3)
2876 htmlFileT << " <img src=\"MapRateAmplHO.png\" />" << std::endl;
2877 if (sub == 4)
2878 htmlFileT << " <img src=\"MapRateAmplHF.png\" />" << std::endl;
2879 htmlFileT << "<br>" << std::endl;
2880
2881
2882 htmlFileT << "<h2> 3. Wm criterion: RMS (width) of ADC amplutude for each channel.</h3>" << std::endl;
2883 htmlFileT << "<h3> 3.A. RMS distribution over all events, channel and depth.</h3>" << std::endl;
2884 htmlFileT << "<h4> Legend: Bins less " << MIN_M[3][sub] << " and more " << MAX_M[3][sub]
2885 << " correpond to bad RMS </h4>" << std::endl;
2886 if (sub == 1)
2887 htmlFileT << " <img src=\"HistRMSHB.png\" />" << std::endl;
2888 if (sub == 2)
2889 htmlFileT << " <img src=\"HistRMSHE.png\" />" << std::endl;
2890 if (sub == 3)
2891 htmlFileT << " <img src=\"HistRMSHO.png\" />" << std::endl;
2892 if (sub == 4)
2893 htmlFileT << " <img src=\"HistRMSHF.png\" />" << std::endl;
2894 htmlFileT << "<br>" << std::endl;
2895 htmlFileT << "<h3> 3.B. Rate of bad RMS (<" << MIN_M[3][sub] << ",>" << MAX_M[3][sub]
2896 << ") in each channel for each depth.</h3>" << std::endl;
2897 htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
2898 if (sub == 1)
2899 htmlFileT << " <img src=\"MapRateRMSHB.png\" />" << std::endl;
2900 if (sub == 2)
2901 htmlFileT << " <img src=\"MapRateRMSHE.png\" />" << std::endl;
2902 if (sub == 3)
2903 htmlFileT << " <img src=\"MapRateRMSHO.png\" />" << std::endl;
2904 if (sub == 4)
2905 htmlFileT << " <img src=\"MapRateRMSHF.png\" />" << std::endl;
2906 htmlFileT << "<br>" << std::endl;
2907
2908
2909 htmlFileT << "<h2> 4. Rm criterion: Ratio ADC value sum over four near maximum (-2, -1, max, +1) TS to ADC value "
2910 "sum over all TS for each channel. </h3>"
2911 << std::endl;
2912 htmlFileT << "<h3> 4.A. Ratio distribution over all events, channels and depths.</h3>" << std::endl;
2913 htmlFileT << "<h4> Legend: Bins less " << MIN_M[4][sub] << " and more " << MAX_M[4][sub]
2914 << " correpond to bad ratio </h4>" << std::endl;
2915 if (sub == 1)
2916 htmlFileT << " <img src=\"Hist43TStoAllTSHB.png\" />" << std::endl;
2917 if (sub == 2)
2918 htmlFileT << " <img src=\"Hist43TStoAllTSHE.png\" />" << std::endl;
2919 if (sub == 3)
2920 htmlFileT << " <img src=\"Hist43TStoAllTSHO.png\" />" << std::endl;
2921 if (sub == 4)
2922 htmlFileT << " <img src=\"Hist43TStoAllTSHF.png\" />" << std::endl;
2923 htmlFileT << "<br>" << std::endl;
2924 htmlFileT << "<h3> 4.B. Rate of bad ratio (<" << MIN_M[4][sub] << ", >" << MAX_M[4][sub]
2925 << ") in each channel for each depth.</h3>" << std::endl;
2926 htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
2927 if (sub == 1)
2928 htmlFileT << " <img src=\"MapRate43TStoAllTSHB.png\" />" << std::endl;
2929 if (sub == 2)
2930 htmlFileT << " <img src=\"MapRate43TStoAllTSHE.png\" />" << std::endl;
2931 if (sub == 3)
2932 htmlFileT << " <img src=\"MapRate43TStoAllTSHO.png\" />" << std::endl;
2933 if (sub == 4)
2934 htmlFileT << " <img src=\"MapRate43TStoAllTSHF.png\" />" << std::endl;
2935 htmlFileT << "<br>" << std::endl;
2936
2937
2938 htmlFileT << "<h2> 5. TNm criterion: Mean TS position for each channel.</h3>" << std::endl;
2939 htmlFileT << "<h3> 5.A. TN position distribution over all events, channels and depths.</h3>" << std::endl;
2940 htmlFileT << "<h4> Legend: Bins less " << MIN_M[5][sub] << " and more " << MAX_M[5][sub]
2941 << " correpond to bad mean position </h4>" << std::endl;
2942 if (sub == 1)
2943 htmlFileT << " <img src=\"HistMeanPosHB.png\" />" << std::endl;
2944 if (sub == 2)
2945 htmlFileT << " <img src=\"HistMeanPosHE.png\" />" << std::endl;
2946 if (sub == 3)
2947 htmlFileT << " <img src=\"HistMeanPosHO.png\" />" << std::endl;
2948 if (sub == 4)
2949 htmlFileT << " <img src=\"HistMeanPosHF.png\" />" << std::endl;
2950 htmlFileT << "<br>" << std::endl;
2951 htmlFileT << "<h3> 5.B. Rate of bad TN position (<" << MIN_M[5][sub] << ", >" << MAX_M[5][sub]
2952 << ") in each channel for each depth. </h3>" << std::endl;
2953 htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
2954 if (sub == 1)
2955 htmlFileT << " <img src=\"MapRateMeanPosHB.png\" />" << std::endl;
2956 if (sub == 2)
2957 htmlFileT << " <img src=\"MapRateMeanPosHE.png\" />" << std::endl;
2958 if (sub == 3)
2959 htmlFileT << " <img src=\"MapRateMeanPosHO.png\" />" << std::endl;
2960 if (sub == 4)
2961 htmlFileT << " <img src=\"MapRateMeanPosHF.png\" />" << std::endl;
2962 htmlFileT << "<br>" << std::endl;
2963
2964
2965 htmlFileT << "<h2> 6.TXm criterion: Maximum TS position for each channel.</h3>" << std::endl;
2966 htmlFileT << "<h3> 6.A. TX position distribution over all events, channel and depth.</h3>" << std::endl;
2967 htmlFileT << "<h4> Legend: Bins less " << MIN_M[6][sub] << " and more " << MAX_M[6][sub]
2968 << " correpond to bad position </h4>" << std::endl;
2969 if (sub == 1)
2970 htmlFileT << " <img src=\"HistMaxPosHB.png\" />" << std::endl;
2971 if (sub == 2)
2972 htmlFileT << " <img src=\"HistMaxPosHE.png\" />" << std::endl;
2973 if (sub == 3)
2974 htmlFileT << " <img src=\"HistMaxPosHO.png\" />" << std::endl;
2975 if (sub == 4)
2976 htmlFileT << " <img src=\"HistMaxPosHF.png\" />" << std::endl;
2977 htmlFileT << "<br>" << std::endl;
2978 htmlFileT << "<h3> 6.B. Rate of bad TX position (<" << MIN_M[6][sub] << ", >" << MAX_M[6][sub]
2979 << ") in each channel for each depth. </h3>" << std::endl;
2980 htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
2981 if (sub == 1)
2982 htmlFileT << " <img src=\"MapRateMaxPosHB.png\" />" << std::endl;
2983 if (sub == 2)
2984 htmlFileT << " <img src=\"MapRateMaxPosHE.png\" />" << std::endl;
2985 if (sub == 3)
2986 htmlFileT << " <img src=\"MapRateMaxPosHO.png\" />" << std::endl;
2987 if (sub == 4)
2988 htmlFileT << " <img src=\"MapRateMaxPosHF.png\" />" << std::endl;
2989 htmlFileT << "<br>" << std::endl;
2990
2991 htmlFileT << "</body> " << std::endl;
2992 htmlFileT << "</html> " << std::endl;
2993 htmlFileT.close();
2994
2995
2996 htmlFileC << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
2997 htmlFileC << "<head>" << std::endl;
2998 htmlFileC << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
2999 htmlFileC << "<title> Raw Data Analyser </title>" << std::endl;
3000 htmlFileC << "<style type=\"text/css\">" << std::endl;
3001 htmlFileC << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
3002 << std::endl;
3003 htmlFileC << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
3004 htmlFileC << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
3005 "text-align: center;}"
3006 << std::endl;
3007 htmlFileC << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
3008 htmlFileC << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
3009 htmlFileC << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
3010 htmlFileC << "</style>" << std::endl;
3011 htmlFileC << "<body>" << std::endl;
3012
3013 if (sub == 1)
3014 htmlFileC << "<h1> Criteria for calibration channels for HB, RUN = " << runnumber << " </h1>" << std::endl;
3015 if (sub == 2)
3016 htmlFileC << "<h1> Criteria for calibration channels for HE, RUN = " << runnumber << " </h1>" << std::endl;
3017 if (sub == 3)
3018 htmlFileC << "<h1> Criteria for calibration channels for HO, RUN = " << runnumber << " </h1>" << std::endl;
3019 if (sub == 4)
3020 htmlFileC << "<h1> Criteria for calibration channels for HF, RUN = " << runnumber << " </h1>" << std::endl;
3021 htmlFileC << "<br>" << std::endl;
3022
3023
3024 htmlFileC << "<h2> 1.Cc criterion: CapID errors for each channel.</h3>" << std::endl;
3025 htmlFileC << "<h3> 1.A. Rate of CapId failures in each channel for each depth.</h3>" << std::endl;
3026 htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
3027 if (sub == 1)
3028 htmlFileC << " <img src=\"MapRateCapCalibHB.png\" />" << std::endl;
3029 if (sub == 2)
3030 htmlFileC << " <img src=\"MapRateCapCalibHE.png\" />" << std::endl;
3031 if (sub == 3)
3032 htmlFileC << " <img src=\"MapRateCapCalibHO.png\" />" << std::endl;
3033 if (sub == 4)
3034 htmlFileC << " <img src=\"MapRateCapCalibHF.png\" />" << std::endl;
3035 htmlFileC << "<br>" << std::endl;
3036
3037
3038 htmlFileC << "<h2> 2. Ac criterion: ADC amplitude collected over all TSs(Full Amplitude) for each channel. </h3>"
3039 << std::endl;
3040 htmlFileC << "<h3> 2.A. Full ADC amplitude distribution over all events, channels and depths.</h3>" << std::endl;
3041 htmlFileC << "<h4> Legend: Bins less " << MIN_C[2][sub] << " correpond to bad ADC amplitude </h4>" << std::endl;
3042 if (sub == 1)
3043 htmlFileC << " <img src=\"HistAmplCalibHB.png\" />" << std::endl;
3044 if (sub == 2)
3045 htmlFileC << " <img src=\"HistAmplCalibHE.png\" />" << std::endl;
3046 if (sub == 3)
3047 htmlFileC << " <img src=\"HistAmplCalibHO.png\" />" << std::endl;
3048 if (sub == 4)
3049 htmlFileC << " <img src=\"HistAmplCalibHF.png\" />" << std::endl;
3050 htmlFileC << "<br>" << std::endl;
3051 htmlFileC << "<h3> 2.B. Rate of bad ADC amplitude (<" << MIN_C[2][sub] << ") in each channel for each depth. </h3>"
3052 << std::endl;
3053 htmlFileC << "<h4> Channel legend: white - good, other colours - bad. </h4>" << std::endl;
3054 if (sub == 1)
3055 htmlFileC << " <img src=\"MapRateAmplCalibHB.png\" />" << std::endl;
3056 if (sub == 2)
3057 htmlFileC << " <img src=\"MapRateAmplCalibHE.png\" />" << std::endl;
3058 if (sub == 3)
3059 htmlFileC << " <img src=\"MapRateAmplCalibHO.png\" />" << std::endl;
3060 if (sub == 4)
3061 htmlFileC << " <img src=\"MapRateAmplCalibHF.png\" />" << std::endl;
3062 htmlFileC << "<br>" << std::endl;
3063
3064
3065 htmlFileC << "<h2> 3. Wc criterion: RMS (width) of ADC amplutude for each channel.</h3>" << std::endl;
3066 htmlFileC << "<h3> 3.A. W distribution over all events, channel and depth.</h3>" << std::endl;
3067 htmlFileC << "<h4> Legend: Bins less " << MIN_C[3][sub] << " and more " << MAX_C[3][sub]
3068 << " correpond to bad RMS </h4>" << std::endl;
3069 if (sub == 1)
3070 htmlFileC << " <img src=\"HistRMSCalibHB.png\" />" << std::endl;
3071 if (sub == 2)
3072 htmlFileC << " <img src=\"HistRMSCalibHE.png\" />" << std::endl;
3073 if (sub == 3)
3074 htmlFileC << " <img src=\"HistRMSCalibHO.png\" />" << std::endl;
3075 if (sub == 4)
3076 htmlFileC << " <img src=\"HistRMSCalibHF.png\" />" << std::endl;
3077 htmlFileC << "<br>" << std::endl;
3078 htmlFileC << "<h3> 3.B. Rate of bad W (<" << MIN_C[3][sub] << ",>" << MAX_C[3][sub]
3079 << ") in each channel for each depth.</h3>" << std::endl;
3080 htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
3081 if (sub == 1)
3082 htmlFileC << " <img src=\"MapRateRMSCalibHB.png\" />" << std::endl;
3083 if (sub == 2)
3084 htmlFileC << " <img src=\"MapRateRMSCalibHE.png\" />" << std::endl;
3085 if (sub == 3)
3086 htmlFileC << " <img src=\"MapRateRMSCalibHO.png\" />" << std::endl;
3087 if (sub == 4)
3088 htmlFileC << " <img src=\"MapRateRMSCalibHF.png\" />" << std::endl;
3089 htmlFileC << "<br>" << std::endl;
3090
3091
3092 htmlFileC << "<h2> 4. Rc criterion: Ratio ADC value sum over five near maximum (-2, -1, max, +1, +2) TS to ADC "
3093 "value sum over all TS for each channel. </h3>"
3094 << std::endl;
3095 htmlFileC << "<h3> 4.A. Ratio distribution over all events, channels and depths.</h3>" << std::endl;
3096 htmlFileC << "<h4> Legend: Bins less " << MIN_C[4][sub] << " and more " << MAX_C[4][sub]
3097 << " correpond to bad ratio </h4>" << std::endl;
3098 if (sub == 1)
3099 htmlFileC << " <img src=\"Hist43TStoAllTSCalibHB.png\" />" << std::endl;
3100 if (sub == 2)
3101 htmlFileC << " <img src=\"Hist43TStoAllTSCalibHE.png\" />" << std::endl;
3102 if (sub == 3)
3103 htmlFileC << " <img src=\"Hist43TStoAllTSCalibHO.png\" />" << std::endl;
3104 if (sub == 4)
3105 htmlFileC << " <img src=\"Hist43TStoAllTSCalibHF.png\" />" << std::endl;
3106 htmlFileC << "<br>" << std::endl;
3107 htmlFileC << "<h3> 4.B. Rate of bad Ratio (<" << MIN_C[4][sub] << ", >" << MAX_C[4][sub]
3108 << ") in each channel for each depth.</h3>" << std::endl;
3109 htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
3110 if (sub == 1)
3111 htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHB.png\" />" << std::endl;
3112 if (sub == 2)
3113 htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHE.png\" />" << std::endl;
3114 if (sub == 3)
3115 htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHO.png\" />" << std::endl;
3116 if (sub == 4)
3117 htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHF.png\" />" << std::endl;
3118 htmlFileC << "<br>" << std::endl;
3119
3120
3121 htmlFileC << "<h2> 5. TNc criterion: Mean TS position for each channel.</h3>" << std::endl;
3122 htmlFileC << "<h3> 5.A. TN position distribution over all events, channels and depths.</h3>" << std::endl;
3123 htmlFileC << "<h4> Legend: Bins less " << MIN_C[5][sub] << " and more " << MAX_C[5][sub]
3124 << " correpond to bad position </h4>" << std::endl;
3125 if (sub == 1)
3126 htmlFileC << " <img src=\"HistMeanPosCalibHB.png\" />" << std::endl;
3127 if (sub == 2)
3128 htmlFileC << " <img src=\"HistMeanPosCalibHE.png\" />" << std::endl;
3129 if (sub == 3)
3130 htmlFileC << " <img src=\"HistMeanPosCalibHO.png\" />" << std::endl;
3131 if (sub == 4)
3132 htmlFileC << " <img src=\"HistMeanPosCalibHF.png\" />" << std::endl;
3133 htmlFileC << "<br>" << std::endl;
3134 htmlFileC << "<h3> 5.B. Rate of bad TN position (<" << MIN_C[5][sub] << ", >" << MAX_C[5][sub]
3135 << ") in each channel for each depth. </h3>" << std::endl;
3136 htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
3137 if (sub == 1)
3138 htmlFileC << " <img src=\"MapRateMeanPosCalibHB.png\" />" << std::endl;
3139 if (sub == 2)
3140 htmlFileC << " <img src=\"MapRateMeanPosCalibHE.png\" />" << std::endl;
3141 if (sub == 3)
3142 htmlFileC << " <img src=\"MapRateMeanPosCalibHO.png\" />" << std::endl;
3143 if (sub == 4)
3144 htmlFileC << " <img src=\"MapRateMeanPosCalibHF.png\" />" << std::endl;
3145 htmlFileC << "<br>" << std::endl;
3146
3147
3148 htmlFileC << "<h2> 6.TXc criterion: Maximum TS position for each channel.</h3>" << std::endl;
3149 htmlFileC << "<h3> 6.A. TX position distribution over all events, channel and depth.</h3>" << std::endl;
3150 htmlFileC << "<h4> Legend: Bins less " << MIN_C[6][sub] << " and more " << MAX_C[6][sub]
3151 << " correpond to bad position </h4>" << std::endl;
3152 if (sub == 1)
3153 htmlFileC << " <img src=\"HistMaxPosCalibHB.png\" />" << std::endl;
3154 if (sub == 2)
3155 htmlFileC << " <img src=\"HistMaxPosCalibHE.png\" />" << std::endl;
3156 if (sub == 3)
3157 htmlFileC << " <img src=\"HistMaxPosCalibHO.png\" />" << std::endl;
3158 if (sub == 4)
3159 htmlFileC << " <img src=\"HistMaxPosCalibHF.png\" />" << std::endl;
3160 htmlFileC << "<br>" << std::endl;
3161 htmlFileC << "<h3> 6.B. Rate of bad TX position (<" << MIN_C[6][sub] << ", >" << MAX_C[6][sub]
3162 << ") in each channel for each depth. </h3>" << std::endl;
3163 htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
3164 if (sub == 1)
3165 htmlFileC << " <img src=\"MapRateMaxPosCalibHB.png\" />" << std::endl;
3166 if (sub == 2)
3167 htmlFileC << " <img src=\"MapRateMaxPosCalibHE.png\" />" << std::endl;
3168 if (sub == 3)
3169 htmlFileC << " <img src=\"MapRateMaxPosCalibHO.png\" />" << std::endl;
3170 if (sub == 4)
3171 htmlFileC << " <img src=\"MapRateMaxPosCalibHF.png\" />" << std::endl;
3172 htmlFileC << "<br>" << std::endl;
3173
3174 htmlFileC << "</body> " << std::endl;
3175 htmlFileC << "</html> " << std::endl;
3176 htmlFileC.close();
3177
3178
3179 htmlFileD << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
3180 htmlFileD << "<head>" << std::endl;
3181 htmlFileD << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
3182 htmlFileD << "<title> Remote Monitoring Tool Global </title>" << std::endl;
3183 htmlFileD << "<style type=\"text/css\">" << std::endl;
3184 htmlFileD << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
3185 << std::endl;
3186 htmlFileD << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
3187 htmlFileD << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
3188 "text-align: center;}"
3189 << std::endl;
3190 htmlFileD << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
3191 htmlFileD << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
3192 htmlFileD << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
3193 htmlFileD << "</style>" << std::endl;
3194 htmlFileD << "<body>" << std::endl;
3195
3196 if (sub == 1)
3197 htmlFileD << "<h1> Response drift for HB: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
3198 << " </h1>" << std::endl;
3199 if (sub == 2)
3200 htmlFileD << "<h1> Response drift for HE: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
3201 << " </h1>" << std::endl;
3202 if (sub == 3)
3203 htmlFileD << "<h1> Response drift for HO: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
3204 << " </h1>" << std::endl;
3205 if (sub == 4)
3206 htmlFileD << "<h1> Response drift for HF: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
3207 << " </h1>" << std::endl;
3208 htmlFileD << "<br>" << std::endl;
3209
3210
3211 htmlFileD << "<h2> 1. Gain Stability (GS) </h3>" << std::endl;
3212 htmlFileD << "<h3> 1.A. Averaged channel response, collected over all TS, for Current run in each channel for each "
3213 "depth.</h3>"
3214 << std::endl;
3215 htmlFileD << "<h4> Channel legend: colour means cooresponding value of mean response. </h4>" << std::endl;
3216 if (sub == 1)
3217 htmlFileD << " <img src=\"MapRateAmpl1HB.png\" />" << std::endl;
3218 if (sub == 2)
3219 htmlFileD << " <img src=\"MapRateAmpl1HE.png\" />" << std::endl;
3220 if (sub == 3)
3221 htmlFileD << " <img src=\"MapRateAmpl1HO.png\" />" << std::endl;
3222 if (sub == 4)
3223 htmlFileD << " <img src=\"MapRateAmpl1HF.png\" />" << std::endl;
3224 htmlFileD << "<br>" << std::endl;
3225 htmlFileD << "<h3> 1.B. Averaged channel response, collected over all TS, for Reference run in each channel for "
3226 "each depth.</h3>"
3227 << std::endl;
3228 htmlFileD << "<h4> Channel legend: colour means cooresponding value of mean response. </h4>" << std::endl;
3229 if (sub == 1)
3230 htmlFileD << " <img src=\"MapRateAmpl2HB.png\" />" << std::endl;
3231 if (sub == 2)
3232 htmlFileD << " <img src=\"MapRateAmpl2HE.png\" />" << std::endl;
3233 if (sub == 3)
3234 htmlFileD << " <img src=\"MapRateAmpl2HO.png\" />" << std::endl;
3235 if (sub == 4)
3236 htmlFileD << " <img src=\"MapRateAmpl2HF.png\" />" << std::endl;
3237 htmlFileD << "<br>" << std::endl;
3238 htmlFileD << "<h3> 1.C. Relative difference between Current run and Current run distribution over all events, "
3239 "channels for each depth.</h3>"
3240 << std::endl;
3241 htmlFileD << "<h4> Legend: Bins less -" << porog[sub] << "% and more +" << porog[sub]
3242 << "% correpond to bad relative difference position </h4>" << std::endl;
3243 if (sub == 1)
3244 htmlFileD << " <img src=\"HistAmplDriftDepthHB.png\" />" << std::endl;
3245 if (sub == 2)
3246 htmlFileD << " <img src=\"HistAmplDriftDepthHE.png\" />" << std::endl;
3247 if (sub == 3)
3248 htmlFileD << " <img src=\"HistAmplDriftDepthHO.png\" />" << std::endl;
3249 if (sub == 4)
3250 htmlFileD << " <img src=\"HistAmplDriftDepthHF.png\" />" << std::endl;
3251 htmlFileD << "<br>" << std::endl;
3252 htmlFileD << "<h3> 1.D. Rate of bad relative difference (<-" << porog[sub] << ", >+" << porog[sub]
3253 << ") in each channel for each depth.</h3>" << std::endl;
3254 htmlFileD << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
3255 if (sub == 1)
3256 htmlFileD << " <img src=\"MapRateAmplDriftHB.png\" />" << std::endl;
3257 if (sub == 2)
3258 htmlFileD << " <img src=\"MapRateAmplDriftHE.png\" />" << std::endl;
3259 if (sub == 3)
3260 htmlFileD << " <img src=\"MapRateAmplDriftHO.png\" />" << std::endl;
3261 if (sub == 4)
3262 htmlFileD << " <img src=\"MapRateAmplDriftHF.png\" />" << std::endl;
3263 htmlFileD << "<br>" << std::endl;
3264
3265 htmlFileD << "</body> " << std::endl;
3266 htmlFileD << "</html> " << std::endl;
3267 htmlFileD.close();
3268
3269
3270 htmlFileP << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
3271 htmlFileP << "<head>" << std::endl;
3272 htmlFileP << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
3273 htmlFileP << "<title> Remote Monitoring Tool Global</title>" << std::endl;
3274 htmlFileP << "<style type=\"text/css\">" << std::endl;
3275 htmlFileP << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
3276 << std::endl;
3277 htmlFileP << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
3278 htmlFileP << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
3279 "text-align: center;}"
3280 << std::endl;
3281 htmlFileP << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
3282 htmlFileP << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
3283 htmlFileP << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
3284 htmlFileP << "</style>" << std::endl;
3285 htmlFileP << "<body>" << std::endl;
3286
3287 if (sub == 1)
3288 htmlFileP << "<h1> Pedestals for HB, RUN = " << runnumber << " </h1>" << std::endl;
3289 if (sub == 2)
3290 htmlFileP << "<h1> Pedestals for HE, RUN = " << runnumber << " </h1>" << std::endl;
3291 if (sub == 3)
3292 htmlFileP << "<h1> Pedestals for HO, RUN = " << runnumber << " </h1>" << std::endl;
3293 if (sub == 4)
3294 htmlFileP << "<h1> Pedestals for HF, RUN = " << runnumber << " </h1>" << std::endl;
3295 htmlFileP << "<br>" << std::endl;
3296
3297
3298 htmlFileP << "<h2> 1.Pm criterion: Pedestals for each CapID .</h3>" << std::endl;
3299 htmlFileP << "<h3> 1.A. Pedestal distribution over all events, channels for each CapID and all depths.</h3>"
3300 << std::endl;
3301 htmlFileP << "<h4> Legend: Bins less " << Pedest[0][sub] << " correpond to bad Pedestals </h4>" << std::endl;
3302 if (sub == 1)
3303 htmlFileP << " <img src=\"HistPedestalsHB.png\" />" << std::endl;
3304 if (sub == 2)
3305 htmlFileP << " <img src=\"HistPedestalsHE.png\" />" << std::endl;
3306 if (sub == 3)
3307 htmlFileP << " <img src=\"HistPedestalsHO.png\" />" << std::endl;
3308 if (sub == 4)
3309 htmlFileP << " <img src=\"HistPedestalsHF.png\" />" << std::endl;
3310 htmlFileP << "<br>" << std::endl;
3311 htmlFileP << "<h3> 1.B. Rate of channels at very low Pedestals at least in one CapID for each depth.</h3>"
3312 << std::endl;
3313 htmlFileP << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
3314 if (sub == 1)
3315 htmlFileP << " <img src=\"MapRatePedHB.png\" />" << std::endl;
3316 if (sub == 2)
3317 htmlFileP << " <img src=\"MapRatePedHE.png\" />" << std::endl;
3318 if (sub == 3)
3319 htmlFileP << " <img src=\"MapRatePedHO.png\" />" << std::endl;
3320 if (sub == 4)
3321 htmlFileP << " <img src=\"MapRatePedHF.png\" />" << std::endl;
3322
3323
3324 htmlFileP << "<h2> 2.pWm criterion: Pedestal Widths for each CapID .</h3>" << std::endl;
3325 htmlFileP << "<h3> 2.A. Pedestal Widths distribution over all events, channels for each CapID and all depths.</h3>"
3326 << std::endl;
3327 htmlFileP << "<h4> Legend: Bins less " << Pedest[1][sub] << " correpond to bad Pedestal Widths </h4>" << std::endl;
3328 if (sub == 1)
3329 htmlFileP << " <img src=\"HistPedestalWidthsHB.png\" />" << std::endl;
3330 if (sub == 2)
3331 htmlFileP << " <img src=\"HistPedestalWidthsHE.png\" />" << std::endl;
3332 if (sub == 3)
3333 htmlFileP << " <img src=\"HistPedestalWidthsHO.png\" />" << std::endl;
3334 if (sub == 4)
3335 htmlFileP << " <img src=\"HistPedestalWidthsHF.png\" />" << std::endl;
3336 htmlFileP << "<br>" << std::endl;
3337 htmlFileP << "<h3> 2.B. Rate of channels at very low Pedestal Widths at least in one CapID for each depth.</h3>"
3338 << std::endl;
3339 htmlFileP << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
3340 if (sub == 1)
3341 htmlFileP << " <img src=\"MapRatePedWidthsHB.png\" />" << std::endl;
3342 if (sub == 2)
3343 htmlFileP << " <img src=\"MapRatePedWidthsHE.png\" />" << std::endl;
3344 if (sub == 3)
3345 htmlFileP << " <img src=\"MapRatePedWidthsHO.png\" />" << std::endl;
3346 if (sub == 4)
3347 htmlFileP << " <img src=\"MapRatePedWidthsHF.png\" />" << std::endl;
3348
3349
3350 htmlFileP << "<h2> 3.Pedestal and pedestalWidths vs Amplitude .</h3>" << std::endl;
3351 htmlFileP << "<h3> 3.A. Correlation of Pedestal(pedestalWidths) and Amplitude over all channels and events .</h3>"
3352 << std::endl;
3353 htmlFileP << "<h4> Legend: colour - entries </h4>" << std::endl;
3354 if (sub == 1)
3355 htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHB.png\" />" << std::endl;
3356 if (sub == 2)
3357 htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHE.png\" />" << std::endl;
3358 if (sub == 3)
3359 htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHO.png\" />" << std::endl;
3360 if (sub == 4)
3361 htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHF.png\" />" << std::endl;
3362 htmlFileP << "<br>" << std::endl;
3363
3364
3365
3366 htmlFileS << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
3367 htmlFileS << "<head>" << std::endl;
3368 htmlFileS << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
3369 htmlFileS << "<title> Remote Monitoring Tool Global</title>" << std::endl;
3370 htmlFileS << "<style type=\"text/css\">" << std::endl;
3371 htmlFileS << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
3372 << std::endl;
3373 htmlFileS << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
3374 htmlFileS << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
3375 "text-align: center;}"
3376 << std::endl;
3377 htmlFileS << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
3378 htmlFileS << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
3379 htmlFileS << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
3380 htmlFileS << "</style>" << std::endl;
3381 htmlFileS << "<body>" << std::endl;
3382
3383 if (sub == 1)
3384 htmlFileS << "<h1> ADC Shape for HB, RUN = " << runnumber << " </h1>" << std::endl;
3385 if (sub == 2)
3386 htmlFileS << "<h1> ADC Shape for HE, RUN = " << runnumber << " </h1>" << std::endl;
3387 if (sub == 3)
3388 htmlFileS << "<h1> ADC Shape for HO, RUN = " << runnumber << " </h1>" << std::endl;
3389 if (sub == 4)
3390 htmlFileS << "<h1> ADC Shape for HF, RUN = " << runnumber << " </h1>" << std::endl;
3391 htmlFileP << "<br>" << std::endl;
3392
3393 htmlFileS << "<h2> 1.Mean ADC Shape </h3>" << std::endl;
3394 htmlFileS << "<h3> 1.A. ADC shape averaged over all good channels, depth and events.</h3>" << std::endl;
3395
3396 if (sub == 1)
3397 htmlFileS << " <img src=\"HistGoodTSshapesHB.png\" />" << std::endl;
3398 if (sub == 2)
3399 htmlFileS << " <img src=\"HistGoodTSshapesHE.png\" />" << std::endl;
3400 if (sub == 3)
3401 htmlFileS << " <img src=\"HistGoodTSshapesHO.png\" />" << std::endl;
3402 if (sub == 4)
3403 htmlFileS << " <img src=\"HistGoodTSshapesHF.png\" />" << std::endl;
3404 htmlFileS << "<br>" << std::endl;
3405 htmlFileS << "<h3> 1.B. ADC shape averaged over all bad channels, depth and events. Bad channels are selected by 5 "
3406 "criteria: CapId, A, W, P, Pw</h3>"
3407 << std::endl;
3408
3409 if (sub == 1)
3410 htmlFileS << " <img src=\"HistBadTSshapesHB.png\" />" << std::endl;
3411 if (sub == 2)
3412 htmlFileS << " <img src=\"HistBadTSshapesHE.png\" />" << std::endl;
3413 if (sub == 3)
3414 htmlFileS << " <img src=\"HistBadTSshapesHO.png\" />" << std::endl;
3415 if (sub == 4)
3416 htmlFileS << " <img src=\"HistBadTSshapesHF.png\" />" << std::endl;
3417
3418 htmlFileS << "<h2> 2. ADC in Time Slice </h3>" << std::endl;
3419 htmlFileS << "<h3> 2.A. ADC counts histogrammed over all channels, depth and events.</h3>" << std::endl;
3420
3421 if (sub == 1)
3422 htmlFileS << " <img src=\"Hist_ADC_HB_All.png\" />" << std::endl;
3423 if (sub == 2)
3424 htmlFileS << " <img src=\"Hist_ADC_HE_All.png\" />" << std::endl;
3425 if (sub == 3)
3426 htmlFileS << " <img src=\"Hist_ADC_HO_All.png\" />" << std::endl;
3427 if (sub == 4)
3428 htmlFileS << " <img src=\"Hist_ADC_HF_All.png\" />" << std::endl;
3429 htmlFileS << "<br>" << std::endl;
3430 htmlFileS << "<h3> 2.B. ADC counts histogrammed over all channels and events for each depth separately. </h3>"
3431 << std::endl;
3432
3433 if (sub == 1)
3434 htmlFileS << " <img src=\"Hist_ADC_HB_DS.png\" />" << std::endl;
3435 if (sub == 2)
3436 htmlFileS << " <img src=\"Hist_ADC_HE_DS.png\" />" << std::endl;
3437 if (sub == 3)
3438 htmlFileS << " <img src=\"Hist_ADC_HO_DS.png\" />" << std::endl;
3439 if (sub == 4)
3440 htmlFileS << " <img src=\"Hist_ADC_HF_DS.png\" />" << std::endl;
3441
3442 htmlFileS << "<h2> 3. ADC Sum in Time Slice </h3>" << std::endl;
3443 htmlFileS << "<h3> 3.A. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"
3444 << std::endl;
3445
3446 if (sub == 1)
3447 htmlFileS << " <img src=\"Hist_SumADC_HB.png\" />" << std::endl;
3448 if (sub == 2)
3449 htmlFileS << " <img src=\"Hist_SumADC_HE.png\" />" << std::endl;
3450 if (sub == 3)
3451 htmlFileS << " <img src=\"Hist_SumADC_HO.png\" />" << std::endl;
3452 if (sub == 4)
3453 htmlFileS << " <img src=\"Hist_SumADC_HF.png\" />" << std::endl;
3454
3455 htmlFileS << "<h3> 3.B. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"
3456 << std::endl;
3457
3458 if (sub == 1)
3459 htmlFileS << " <img src=\"Hist_SumADC_HB0.png\" />" << std::endl;
3460 if (sub == 2)
3461 htmlFileS << " <img src=\"Hist_SumADC_HE0.png\" />" << std::endl;
3462 if (sub == 3)
3463 htmlFileS << " <img src=\"Hist_SumADC_HO0.png\" />" << std::endl;
3464 if (sub == 4)
3465 htmlFileS << " <img src=\"Hist_SumADC_HF0.png\" />" << std::endl;
3466
3467 htmlFileS << "<h3> 3.C. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"
3468 << std::endl;
3469
3470 if (sub == 1)
3471 htmlFileS << " <img src=\"Hist_SumADC_HB1.png\" />" << std::endl;
3472 if (sub == 2)
3473 htmlFileS << " <img src=\"Hist_SumADC_HE1.png\" />" << std::endl;
3474 if (sub == 3)
3475 htmlFileS << " <img src=\"Hist_SumADC_HO1.png\" />" << std::endl;
3476 if (sub == 4)
3477 htmlFileS << " <img src=\"Hist_SumADC_HF1.png\" />" << std::endl;
3478
3479 htmlFileS.close();
3480 }
3481
3482
3483
3484
3485
3486
3487 for (int sub = 1; sub <= 4; sub++) {
3488 ofstream htmlFile;
3489 if (sub == 1)
3490 htmlFile.open("HB.html");
3491 if (sub == 2)
3492 htmlFile.open("HE.html");
3493 if (sub == 3)
3494 htmlFile.open("HO.html");
3495 if (sub == 4)
3496 htmlFile.open("HF.html");
3497
3498 htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
3499 htmlFile << "<head>" << std::endl;
3500 htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
3501 htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
3502 htmlFile << "<style type=\"text/css\">" << std::endl;
3503 htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
3504 << std::endl;
3505 htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
3506 htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
3507 "text-align: center;}"
3508 << std::endl;
3509 htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
3510 htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
3511 htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
3512 htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
3513 htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
3514 htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
3515 htmlFile << " td.s8 { font-family: arial, arial ce, helvetica; background-color: #00FFFF; }" << std::endl;
3516 htmlFile << " td.s9 { font-family: arial, arial ce, helvetica; background-color: #FFE4E1; }" << std::endl;
3517 htmlFile << " td.s10 { font-family: arial, arial ce, helvetica; background-color: #A0522D; }" << std::endl;
3518 htmlFile << " td.s11 { font-family: arial, arial ce, helvetica; background-color: #1E90FF; }" << std::endl;
3519 htmlFile << " td.s12 { font-family: arial, arial ce, helvetica; background-color: #00BFFF; }" << std::endl;
3520 htmlFile << " td.s13 { font-family: arial, arial ce, helvetica; background-color: #FFFF00; }" << std::endl;
3521 htmlFile << " td.s14 { font-family: arial, arial ce, helvetica; background-color: #B8860B; }" << std::endl;
3522 htmlFile << "</style>" << std::endl;
3523 htmlFile << "<body>" << std::endl;
3524 if (sub == 1)
3525 htmlFile << "<h1> HCAL BARREL, RUN = " << runnumber << " </h1>" << std::endl;
3526 if (sub == 2)
3527 htmlFile << "<h1> HCAL ENDCAP, RUN = " << runnumber << " </h1>" << std::endl;
3528 if (sub == 3)
3529 htmlFile << "<h1> HCAL OUTER, RUN = " << runnumber << " </h1>" << std::endl;
3530 if (sub == 4)
3531 htmlFile << "<h1> HCAL FORWARD, RUN = " << runnumber << " </h1>" << std::endl;
3532 htmlFile << "<br>" << std::endl;
3533
3534 htmlFile << "<a name=\"Top\"></a>\n";
3535 htmlFile << "<b>Contents:<br>\n";
3536 htmlFile << "1. <a href=\"#AnalysisResults\">Analysis results</a><br>\n";
3537 htmlFile << "2. <a href=\"#Status\">Status</a><br>\n";
3538 htmlFile << "2A. <a href=\"#ChannelMap\">Channel map</a><br>\n";
3539
3540
3541
3542 htmlFile << "<a name=\"AnalysisResults\"></a>\n";
3543 if (sub == 1)
3544 htmlFile << "<h2> 1. Analysis results for HB</h2>" << std::endl;
3545 if (sub == 2)
3546 htmlFile << "<h2> 1. Analysis results for HE</h2>" << std::endl;
3547 if (sub == 3)
3548 htmlFile << "<h2> 1. Analysis results for HO</h2>" << std::endl;
3549 if (sub == 4)
3550 htmlFile << "<h2> 1. Analysis results for HF</h2>" << std::endl;
3551 htmlFile << "<table width=\"400\">" << std::endl;
3552 htmlFile << "<tr>" << std::endl;
3553
3554 if (sub == 1) {
3555
3556 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3557 << runnumber << "/HB_Tile.html\">Megatile Channels</a></td>" << std::endl;
3558
3559
3560
3561
3562 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3563 << runnumber << "/HB_Pedestals.html\">Pedestals</a></td>" << std::endl;
3564 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3565 << runnumber << "/HB_Shapes.html\">ADC Shapes</a></td>" << std::endl;
3566 }
3567 if (sub == 2) {
3568
3569 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3570 << runnumber << "/HE_Tile.html\">Megatile Channels</a></td>" << std::endl;
3571
3572
3573
3574
3575 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3576 << runnumber << "/HE_Pedestals.html\">Pedestals</a></td>" << std::endl;
3577 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3578 << runnumber << "/HE_Shapes.html\">ADC Shapes</a></td>" << std::endl;
3579 }
3580 if (sub == 3) {
3581 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3582 << runnumber << "/HO_Tile.html\">Megatile Channels</a></td>" << std::endl;
3583
3584
3585 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3586 << runnumber << "/HO_Pedestals.html\">Pedestals</a></td>" << std::endl;
3587 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3588 << runnumber << "/HO_Shapes.html\">ADC Shapes</a></td>" << std::endl;
3589 }
3590 if (sub == 4) {
3591 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3592 << runnumber << "/HF_Tile.html\">Megatile Channels</a></td>" << std::endl;
3593
3594
3595 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3596 << runnumber << "/HF_Pedestals.html\">Pedestals</a></td>" << std::endl;
3597 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
3598 << runnumber << "/HF_Shapes.html\">ADC Shapes</a></td>" << std::endl;
3599 }
3600
3601 htmlFile << "</tr>" << std::endl;
3602 htmlFile << "</table>" << std::endl;
3603 htmlFile << "<br>" << std::endl;
3604
3605 htmlFile << "<a name=\"Status\"></a>\n";
3606 if (sub == 1)
3607 htmlFile << "<h2> 2.Status HB over all criteria </h2>" << std::endl;
3608 if (sub == 2)
3609 htmlFile << "<h2> 2.Status HE over all criteria </h2>" << std::endl;
3610 if (sub == 3)
3611 htmlFile << "<h2> 2.Status HO over all criteria </h2>" << std::endl;
3612 if (sub == 4)
3613 htmlFile << "<h2> 2.Status HF over all criteria </h2>" << std::endl;
3614
3615 htmlFile << "<a name=\"ChannelMap\"></a>\n";
3616 htmlFile << "<h3> 2.A.Channel map for each Depth </h3>" << std::endl;
3617 htmlFile << "<h4> Channel legend: green - good, not yellow - suspicious(rate of failures at least 0.1), white - "
3618 "not applicable or out of range </h4>"
3619 << std::endl;
3620 if (sub == 1)
3621 htmlFile << " <img src=\"MAPHB.png\" />" << std::endl;
3622 if (sub == 2)
3623 htmlFile << " <img src=\"MAPHE.png\" />" << std::endl;
3624 if (sub == 3)
3625 htmlFile << " <img src=\"MAPHO.png\" />" << std::endl;
3626 if (sub == 4)
3627 htmlFile << " <img src=\"MAPHF.png\" />" << std::endl;
3628 htmlFile << "<br>" << std::endl;
3629 htmlFile << "<a href=\"#Top\">to top</a><br>\n";
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994 htmlFile << "</body> " << std::endl;
3995 htmlFile << "</html> " << std::endl;
3996 htmlFile.close();
3997 }
3998
3999
4000
4001 ofstream htmlFile;
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048 htmlFile.open("MAP.html");
4049 htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
4050 htmlFile << "<head>" << std::endl;
4051 htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
4052 htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
4053 htmlFile << "<style type=\"text/css\">" << std::endl;
4054 htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
4055 << std::endl;
4056 htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
4057 htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
4058 "text-align: center;}"
4059 << std::endl;
4060 htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
4061 htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
4062 htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
4063 htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
4064 htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
4065 htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
4066 htmlFile << "</style>" << std::endl;
4067 htmlFile << "<body>" << std::endl;
4068
4069 htmlFile << "<h1> Remote Monitoring Tool, RUN = " << runnumber << ". </h1>" << std::endl;
4070 htmlFile << "<br>" << std::endl;
4071
4072 htmlFile << "<h2> 1. Analysis results for subdetectors </h2>" << std::endl;
4073 htmlFile << "<table width=\"400\">" << std::endl;
4074 htmlFile << "<tr>" << std::endl;
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
4085 << runnumber << "/HB.html\">HB</a></td>" << std::endl;
4086 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
4087 << runnumber << "/HE.html\">HE</a></td>" << std::endl;
4088 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
4089 << runnumber << "/HO.html\">HO</a></td>" << std::endl;
4090 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/GLOBAL_"
4091 << runnumber << "/HF.html\">HF</a></td>" << std::endl;
4092
4093 htmlFile << "</tr>" << std::endl;
4094 htmlFile << "</table>" << std::endl;
4095 htmlFile << "<br>" << std::endl;
4096
4097 htmlFile << "<h2> 2. HCAL status over all criteria and subdetectors </h2>" << std::endl;
4098 htmlFile << "<h3> 2.A. Channels in detector space </h3>" << std::endl;
4099 htmlFile << "<h4> Legend for channel status: green - good, others - may be a problems, white - not applicable or out "
4100 "of range </h4>"
4101 << std::endl;
4102 htmlFile << " <img src=\"MAP.png\" />" << std::endl;
4103 htmlFile << "<br>" << std::endl;
4104
4105 htmlFile << "<h3> 2.B. List of Bad channels </h3>" << std::endl;
4106
4107
4108
4109 htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalRMT/HELP.html\"> "
4110 "Description of criteria for bad channel selection</a></td>"
4111 << std::endl;
4112
4113 htmlFile << "<table>" << std::endl;
4114 htmlFile << "<tr>";
4115 htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
4116 htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
4117 htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
4118 htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
4119 htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
4120 htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
4121 htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
4122 htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
4123 htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
4124 htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
4125 htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
4126 htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
4127 htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
4128 htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
4129 htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
4130 htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
4131 htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
4132 htmlFile << "<td class=\"s5\" align=\"center\">RMT-criteria</td>" << std::endl;
4133 htmlFile << "</tr>" << std::endl;
4134
4135 ind = 0;
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177 htmlFile << "</table>" << std::endl;
4178 htmlFile << "<br>" << std::endl;
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320 htmlFile << "</body> " << std::endl;
4321 htmlFile << "</html> " << std::endl;
4322 htmlFile.close();
4323
4324
4325
4326
4327 hfile->Close();
4328
4329
4330 gSystem->Exit(0);
4331
4332 }