File indexing completed on 2024-09-07 04:34:49
0001
0002
0003
0004
0005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParHistos.h"
0006 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaNumbering.h"
0007
0008
0009
0010
0011
0012
0013
0014 ClassImp(TEcnaParHistos);
0015
0016
0017
0018 TEcnaParHistos::~TEcnaParHistos() {
0019
0020
0021
0022
0023
0024
0025 }
0026
0027
0028
0029
0030
0031
0032 TEcnaParHistos::TEcnaParHistos() {
0033
0034
0035
0036
0037 Init();
0038 }
0039
0040 TEcnaParHistos::TEcnaParHistos(TEcnaObject* pObjectManager, const TString& SubDet) {
0041
0042
0043
0044
0045 Init();
0046 Long_t i_this = (Long_t)this;
0047 pObjectManager->RegisterPointer("TEcnaParHistos", i_this);
0048
0049
0050 fEcal = nullptr;
0051 Long_t iParEcal = pObjectManager->GetPointerValue("TEcnaParEcal");
0052 if (iParEcal == 0) {
0053 fEcal = new TEcnaParEcal(pObjectManager, SubDet.Data());
0054 } else {
0055 fEcal = (TEcnaParEcal*)iParEcal;
0056 }
0057
0058
0059 fEcalNumbering = nullptr;
0060 Long_t iEcalNumbering = pObjectManager->GetPointerValue("TEcnaNumbering");
0061 if (iEcalNumbering == 0) {
0062 fEcalNumbering = new TEcnaNumbering(pObjectManager, SubDet.Data());
0063 } else {
0064 fEcalNumbering = (TEcnaNumbering*)iEcalNumbering;
0065 }
0066
0067 SetEcalSubDetector(SubDet.Data());
0068 }
0069
0070 TEcnaParHistos::TEcnaParHistos(const TString& SubDet, TEcnaParEcal* pEcal, TEcnaNumbering* pEcalNumbering) {
0071
0072
0073
0074
0075 Init();
0076 SetEcalSubDetector(SubDet.Data(), pEcal, pEcalNumbering);
0077 }
0078
0079 void TEcnaParHistos::Init() {
0080 fgMaxCar = (Int_t)512;
0081
0082 fTTBELL = '\007';
0083
0084
0085 fCnaCommand = 0;
0086 fCnaError = 0;
0087
0088
0089
0090 fMaxColorNumber = (Int_t)4;
0091
0092 fMarginAutoMinMax = (Double_t)0.05;
0093
0094
0095
0096 fNbOfRunsDisplayed = (Int_t)20;
0097
0098
0099 fMaxNbOfRunsInLists = (Int_t)5000;
0100
0101
0102
0103 Int_t MaxCar = fgMaxCar;
0104 fOnlyOnePlot.Resize(MaxCar);
0105 fOnlyOnePlot = "ONLYONE";
0106
0107 MaxCar = fgMaxCar;
0108 fSeveralPlot.Resize(MaxCar);
0109 fSeveralPlot = "SAME";
0110
0111 MaxCar = fgMaxCar;
0112 fSameOnePlot.Resize(MaxCar);
0113 fSameOnePlot = "SAME n";
0114
0115 MaxCar = fgMaxCar;
0116 fAllXtalsInStinPlot.Resize(MaxCar);
0117 fAllXtalsInStinPlot = "SAME in Stin";
0118
0119 fPlotAllXtalsInStin = 0;
0120
0121 }
0122
0123 void TEcnaParHistos::SetEcalSubDetector(const TString& SubDet) {
0124
0125
0126 Int_t MaxCar = fgMaxCar;
0127 fFlagSubDet.Resize(MaxCar);
0128 fFlagSubDet = fEcal->GetEcalSubDetector();
0129 }
0130
0131 void TEcnaParHistos::SetEcalSubDetector(const TString& SubDet, TEcnaParEcal* pEcal, TEcnaNumbering* pEcalNumbering) {
0132
0133
0134 fEcal = nullptr;
0135 if (pEcal == nullptr) {
0136 fEcal = new TEcnaParEcal(SubDet.Data());
0137 ;
0138 } else {
0139 fEcal = pEcal;
0140 }
0141
0142 Int_t MaxCar = fgMaxCar;
0143 fFlagSubDet.Resize(MaxCar);
0144 fFlagSubDet = fEcal->GetEcalSubDetector();
0145
0146 fEcalNumbering = nullptr;
0147 if (pEcalNumbering == nullptr) {
0148 fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal);
0149 ;
0150 } else {
0151 fEcalNumbering = pEcalNumbering;
0152 }
0153 }
0154
0155 Int_t TEcnaParHistos::MaxNbOfRunsInLists() { return fMaxNbOfRunsInLists; }
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207 UInt_t TEcnaParHistos::SetCanvasWidth(const TString& HistoCode, const TString& opt_plot) {
0208
0209
0210 UInt_t canv_w = CanvasFormatW("petit");
0211
0212 if (HistoCode == "D_Adc_EvNb" || HistoCode == "D_NOE_ChNb" || HistoCode == "D_Ped_ChNb" ||
0213 HistoCode == "D_LFN_ChNb" || HistoCode == "D_TNo_ChNb" || HistoCode == "D_HFN_ChNb" ||
0214 HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" || HistoCode == "H_Ped_Date" ||
0215 HistoCode == "H_TNo_Date" || HistoCode == "H_MCs_Date" || HistoCode == "H_LFN_Date" ||
0216 HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" || (HistoCode == "D_MSp_SpNb" && opt_plot != "ONLYONE") ||
0217 (HistoCode == "D_SSp_SpNb" && opt_plot != "ONLYONE")) {
0218 canv_w = CanvasFormatH("moyen");
0219 }
0220
0221 if ((HistoCode == "D_Adc_EvDs" || HistoCode == "D_NOE_ChDs" || HistoCode == "D_Ped_ChDs" ||
0222 HistoCode == "D_LFN_ChDs" || HistoCode == "D_TNo_ChDs" || HistoCode == "D_HFN_ChDs" ||
0223 HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" || HistoCode == "D_MSp_SpDs" ||
0224 HistoCode == "D_SSp_SpDs" || HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" ||
0225 HistoCode == "H_MCs_RuDs" || HistoCode == "H_LFN_RuDs" || HistoCode == "H_HFN_RuDs" ||
0226 HistoCode == "H_SCs_RuDs") &&
0227 opt_plot != "ONLYONE") {
0228 canv_w = CanvasFormatH("moyen");
0229 }
0230
0231 return canv_w;
0232 }
0233
0234 UInt_t TEcnaParHistos::SetCanvasHeight(const TString& HistoCode, const TString& opt_plot) {
0235
0236
0237 UInt_t canv_h = CanvasFormatH("petit");
0238
0239 if (HistoCode == "D_Adc_EvNb" || HistoCode == "D_NOE_ChNb" || HistoCode == "D_Ped_ChNb" ||
0240 HistoCode == "D_LFN_ChNb" || HistoCode == "D_TNo_ChNb" || HistoCode == "D_HFN_ChNb" ||
0241 HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" || HistoCode == "H_Ped_Date" ||
0242 HistoCode == "H_TNo_Date" || HistoCode == "H_MCs_Date" || HistoCode == "H_LFN_Date" ||
0243 HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" || (HistoCode == "D_MSp_SpNb" && opt_plot != "ONLYONE") ||
0244 (HistoCode == "D_SSp_SpNb" && opt_plot != "ONLYONE")) {
0245 canv_h = CanvasFormatW("moyen");
0246 }
0247
0248 if ((HistoCode == "D_Adc_EvDs" || HistoCode == "D_NOE_ChDs" || HistoCode == "D_Ped_ChDs" ||
0249 HistoCode == "D_LFN_ChDs" || HistoCode == "D_TNo_ChDs" || HistoCode == "D_HFN_ChDs" ||
0250 HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" || HistoCode == "D_MSp_SpDs" ||
0251 HistoCode == "D_SSp_SpDs" || HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" ||
0252 HistoCode == "H_MCs_RuDs" || HistoCode == "H_LFN_RuDs" || HistoCode == "H_HFN_RuDs" ||
0253 HistoCode == "H_SCs_RuDs") &&
0254 opt_plot != "ONLYONE") {
0255 canv_h = CanvasFormatW("moyen");
0256 }
0257
0258 return canv_h;
0259 }
0260
0261 UInt_t TEcnaParHistos::CanvasFormatW(const TString& chformat) {
0262
0263
0264 UInt_t canv_w = 375;
0265
0266 if (chformat == "petit") {
0267 canv_w = 375;
0268 }
0269 if (chformat == "moyen") {
0270 canv_w = 450;
0271 }
0272 if (chformat == "grand") {
0273 canv_w = 572;
0274 }
0275
0276 if (chformat == "etaphiSM") {
0277 canv_w = 760;
0278 }
0279 if (chformat == "phietaEB") {
0280 canv_w = 636;
0281 }
0282
0283 if (chformat == "IXIYDee") {
0284 canv_w = 320;
0285 }
0286 if (chformat == "IYIXEE") {
0287 canv_w = 636;
0288 }
0289 return canv_w;
0290 }
0291
0292 UInt_t TEcnaParHistos::CanvasFormatH(const TString& chformat) {
0293
0294
0295 UInt_t canv_h = 530;
0296
0297 if (chformat == "petit") {
0298 canv_h = 530;
0299 }
0300 if (chformat == "moyen") {
0301 canv_h = 636;
0302 }
0303 if (chformat == "grand") {
0304 canv_h = 810;
0305 }
0306
0307 if (chformat == "etaphiSM") {
0308 canv_h = 306;
0309 }
0310 if (chformat == "phietaEB") {
0311 canv_h = 450;
0312 }
0313
0314 if (chformat == "IXIYDee") {
0315 canv_h = 720;
0316 }
0317 if (chformat == "IYIXEE") {
0318 canv_h = 450;
0319 }
0320 return canv_h;
0321 }
0322
0323
0324
0325
0326
0327
0328 Double_t TEcnaParHistos::BoxLeftX(const TString& chtype) {
0329
0330
0331 Double_t value = 0.4;
0332
0333 if (chtype == "general_comment") {
0334 value = 0.015;
0335 }
0336
0337 if (chtype == "top_left_box_SM") {
0338 value = 0.015;
0339 }
0340 if (chtype == "top_left_box_EB") {
0341 value = 0.015;
0342 }
0343 if (chtype == "top_mid_box_EB") {
0344 value = 0.350;
0345 }
0346 if (chtype == "top_right_box_EB") {
0347 value = 0.630;
0348 }
0349
0350 if (chtype == "top_left_box_Dee") {
0351 value = 0.015;
0352 }
0353 if (chtype == "top_left_box_EE") {
0354 value = 0.015;
0355 }
0356 if (chtype == "top_mid_box_EE") {
0357 value = 0.240;
0358 }
0359 if (chtype == "top_right_box_EE") {
0360 value = 0.610;
0361 }
0362
0363 if (chtype == "bottom_left_box") {
0364 value = 0.015;
0365 }
0366 if (chtype == "bottom_left_box_evol") {
0367 value = 0.015;
0368 }
0369 if (chtype == "bottom_mid_box") {
0370 value = 0.250;
0371 }
0372 if (chtype == "bottom_right_box") {
0373 value = 0.455;
0374 }
0375 if (chtype == "bottom_right_box_evol") {
0376 value = 0.540;
0377 }
0378 if (chtype == "bottom_right_box_evpr") {
0379 value = 0.540;
0380 }
0381
0382 if (chtype == "several_plots_box") {
0383 value = 0.015;
0384 }
0385 if (chtype == "several_evol_box") {
0386 value = 0.015;
0387 }
0388 if (chtype == "several_evpr_box") {
0389 value = 0.015;
0390 }
0391
0392 return value;
0393 }
0394
0395 Double_t TEcnaParHistos::BoxRightX(const TString& chtype) {
0396
0397
0398 Double_t value = 0.6;
0399
0400 if (chtype == "general_comment") {
0401 value = 0.680;
0402 }
0403
0404 if (chtype == "top_left_box_SM") {
0405 value = 0.125;
0406 }
0407 if (chtype == "top_left_box_EB") {
0408 value = 0.349;
0409 }
0410 if (chtype == "top_mid_box_EB") {
0411 value = 0.629;
0412 }
0413 if (chtype == "top_right_box_EB") {
0414 value = 0.985;
0415 }
0416
0417 if (chtype == "top_left_box_Dee") {
0418 value = 0.425;
0419 }
0420 if (chtype == "top_left_box_EE") {
0421 value = 0.260;
0422 }
0423 if (chtype == "top_mid_box_EE") {
0424 value = 0.609;
0425 }
0426 if (chtype == "top_right_box_EE") {
0427 value = 0.985;
0428 }
0429
0430 if (chtype == "bottom_left_box") {
0431 value = 0.445;
0432 }
0433 if (chtype == "bottom_left_box_evol") {
0434 value = 0.450;
0435 }
0436 if (chtype == "bottom_mid_box") {
0437 value = 0.750;
0438 }
0439 if (chtype == "bottom_right_box") {
0440 value = 0.985;
0441 }
0442 if (chtype == "bottom_right_box_evol") {
0443 value = 0.985;
0444 }
0445 if (chtype == "bottom_right_box_evpr") {
0446 value = 0.985;
0447 }
0448
0449 if (chtype == "several_plots_box") {
0450 value = 0.985;
0451 }
0452 if (chtype == "several_evol_box") {
0453 value = 0.635;
0454 }
0455 if (chtype == "several_evpr_box") {
0456 value = 0.635;
0457 }
0458
0459 return value;
0460 }
0461
0462 Double_t TEcnaParHistos::BoxBottomY(const TString& chtype) {
0463
0464
0465 Double_t value = 0.8;
0466
0467 if (chtype == "general_comment") {
0468 value = 0.960;
0469 }
0470
0471 if (chtype == "top_left_box_SM") {
0472 value = 0.880;
0473 }
0474 if (chtype == "top_left_box_EB") {
0475 value = 0.880;
0476 }
0477 if (chtype == "top_mid_box_EB") {
0478 value = 0.880;
0479 }
0480 if (chtype == "top_right_box_EB") {
0481 value = 0.880;
0482 }
0483
0484 if (chtype == "top_left_box_Dee") {
0485 value = 0.925;
0486 }
0487 if (chtype == "top_left_box_EE") {
0488 value = 0.880;
0489 }
0490 if (chtype == "top_mid_box_EE") {
0491 value = 0.880;
0492 }
0493 if (chtype == "top_right_box_EE") {
0494 value = 0.880;
0495 }
0496
0497 if (chtype == "bottom_left_box") {
0498 value = 0.010;
0499 }
0500 if (chtype == "bottom_left_box_evol") {
0501 value = 0.010;
0502 }
0503 if (chtype == "bottom_right_box") {
0504 value = 0.010;
0505 }
0506 if (chtype == "bottom_right_box_evol") {
0507 value = 0.010;
0508 }
0509 if (chtype == "bottom_right_box_evpr") {
0510 value = 0.010;
0511 }
0512 if (chtype == "several_plots_box") {
0513 value = 0.010;
0514 }
0515 if (chtype == "several_evol_box") {
0516 value = 0.010;
0517 }
0518 if (chtype == "several_evpr_box") {
0519 value = 0.010;
0520 }
0521
0522 return value;
0523 }
0524
0525 Double_t TEcnaParHistos::BoxTopY(const TString& chtype) {
0526
0527
0528 Double_t value = 0.9;
0529
0530 if (chtype == "general_comment") {
0531 value = 0.999;
0532 }
0533
0534 if (chtype == "top_left_box_SM") {
0535 value = 0.955;
0536 }
0537 if (chtype == "top_left_box_EB") {
0538 value = 0.955;
0539 }
0540 if (chtype == "top_mid_box_EB") {
0541 value = 0.955;
0542 }
0543 if (chtype == "top_right_box_EB") {
0544 value = 0.955;
0545 }
0546
0547 if (chtype == "top_left_box_Dee") {
0548 value = 0.969;
0549 }
0550 if (chtype == "top_left_box_EE") {
0551 value = 0.955;
0552 }
0553 if (chtype == "top_mid_box_EE") {
0554 value = 0.955;
0555 }
0556 if (chtype == "top_right_box_EE") {
0557 value = 0.955;
0558 }
0559
0560 if (chtype == "bottom_left_box") {
0561 value = 0.120;
0562 }
0563 if (chtype == "bottom_left_box_evol") {
0564 value = 0.120;
0565 }
0566 if (chtype == "bottom_right_box") {
0567 value = 0.120;
0568 }
0569 if (chtype == "bottom_right_box_Dee") {
0570 value = 0.100;
0571 }
0572
0573 if (chtype == "bottom_right_box_evol") {
0574 value = 0.120;
0575 }
0576 if (chtype == "bottom_right_box_evpr") {
0577 value = 0.120;
0578 }
0579 if (chtype == "several_plots_box") {
0580 value = 0.200;
0581 }
0582 if (chtype == "several_evol_box") {
0583 value = 0.200;
0584 }
0585 if (chtype == "several_evpr_box") {
0586 value = 0.200;
0587 }
0588
0589 return value;
0590 }
0591
0592
0593
0594
0595
0596
0597
0598 void TEcnaParHistos::SetColorPalette(const TString& user_color_palette) {
0599
0600
0601 fMaxColorNumber = 4;
0602
0603 if (!(user_color_palette == "Rainbow" || user_color_palette == "rainbow")) {
0604 fMaxColorNumber = 5;
0605 }
0606 if (user_color_palette == "Rainbow" || user_color_palette == "rainbow") {
0607 fMaxColorNumber = 6;
0608 }
0609 }
0610
0611 Color_t TEcnaParHistos::ColorTab(const Int_t& user_color_number) {
0612
0613
0614
0615
0616 TColor* my_color = new TColor();
0617
0618 Color_t couleur = ColorDefinition("noir");
0619
0620 if (fMaxColorNumber != 6) {
0621
0622 if (user_color_number == 0) {
0623 couleur = ColorDefinition("noir");
0624 }
0625 if (user_color_number == 1) {
0626 couleur = ColorDefinition("rouge");
0627 }
0628 if (user_color_number == 2) {
0629 couleur = ColorDefinition("bleu");
0630 }
0631 if (user_color_number == 3) {
0632 couleur = (Color_t)my_color->GetColor("#009900");
0633 }
0634 if (user_color_number == 4) {
0635 couleur = ColorDefinition("marron28");
0636 }
0637 if (user_color_number == 5) {
0638 couleur = (Color_t)my_color->GetColor("#9900BB");
0639 }
0640 }
0641 if (fMaxColorNumber == 6) {
0642
0643 if (user_color_number == 0) {
0644 couleur = (Color_t)my_color->GetColor("#EE0000");
0645 }
0646 if (user_color_number == 1) {
0647 couleur = (Color_t)my_color->GetColor("#FF6611");
0648 }
0649 if (user_color_number == 2) {
0650 couleur = (Color_t)my_color->GetColor("#FFCC00");
0651 }
0652 if (user_color_number == 3) {
0653 couleur = (Color_t)my_color->GetColor("#009900");
0654 }
0655 if (user_color_number == 4) {
0656 couleur = (Color_t)my_color->GetColor("#0044EE");
0657 }
0658 if (user_color_number == 5) {
0659 couleur = (Color_t)my_color->GetColor("#6633BB");
0660 }
0661 if (user_color_number == 6) {
0662 couleur = (Color_t)my_color->GetColor("#9900BB");
0663 }
0664 }
0665
0666 if (user_color_number < 0 || user_color_number > fMaxColorNumber) {
0667 couleur = 0;
0668 }
0669
0670 return couleur;
0671 }
0672
0673
0674 Color_t TEcnaParHistos::ColorDefinition(const TString& chcolor) {
0675
0676
0677
0678
0679 Color_t couleur = 1;
0680
0681 if (chcolor == "noir") {
0682 couleur = 1;
0683 }
0684 if (chcolor == "rouge") {
0685 couleur = 2;
0686 }
0687 if (chcolor == "vert_fonce") {
0688 couleur = 3;
0689 }
0690 if (chcolor == "bleu_fonce") {
0691 couleur = 4;
0692 }
0693 if (chcolor == "jaune") {
0694 couleur = 5;
0695 }
0696 if (chcolor == "rose") {
0697 couleur = 6;
0698 }
0699 if (chcolor == "bleu_clair") {
0700 couleur = 7;
0701 }
0702 if (chcolor == "vert") {
0703 couleur = 8;
0704 }
0705 if (chcolor == "bleu") {
0706 couleur = 9;
0707 }
0708 if (chcolor == "blanc") {
0709 couleur = 10;
0710 }
0711
0712 if (chcolor == "marron23") {
0713 couleur = 23;
0714 }
0715 if (chcolor == "marron24") {
0716 couleur = 24;
0717 }
0718 if (chcolor == "marron25") {
0719 couleur = 24;
0720 }
0721 if (chcolor == "marron27") {
0722 couleur = 27;
0723 }
0724 if (chcolor == "marron28") {
0725 couleur = 28;
0726 }
0727
0728 if (chcolor == "bleu33") {
0729 couleur = 33;
0730 }
0731 if (chcolor == "bleu36") {
0732 couleur = 36;
0733 }
0734 if (chcolor == "bleu38") {
0735 couleur = 38;
0736 }
0737 if (chcolor == "bleu39") {
0738 couleur = 39;
0739 }
0740
0741 if (chcolor == "orange41") {
0742 couleur = 41;
0743 }
0744 if (chcolor == "orange42") {
0745 couleur = 42;
0746 }
0747
0748 if (chcolor == "rouge44") {
0749 couleur = 44;
0750 }
0751 if (chcolor == "rouge46") {
0752 couleur = 46;
0753 }
0754 if (chcolor == "rouge47") {
0755 couleur = 47;
0756 }
0757 if (chcolor == "rouge48") {
0758 couleur = 48;
0759 }
0760 if (chcolor == "rouge49") {
0761 couleur = 49;
0762 }
0763 if (chcolor == "rouge50") {
0764 couleur = 50;
0765 }
0766
0767 if (chcolor == "vert31") {
0768 couleur = 31;
0769 }
0770 if (chcolor == "vert32") {
0771 couleur = 32;
0772 }
0773 if (chcolor == "vert36") {
0774 couleur = 36;
0775 }
0776 if (chcolor == "vert37") {
0777 couleur = 37;
0778 }
0779
0780 if (chcolor == "violet") {
0781 couleur = 49;
0782 }
0783
0784 if (chcolor == "turquoise29") {
0785 couleur = 29;
0786 }
0787
0788 if (chcolor == "gris12") {
0789 couleur = 12;
0790 }
0791 if (chcolor == "gris13") {
0792 couleur = 13;
0793 }
0794 if (chcolor == "gris14") {
0795 couleur = 14;
0796 }
0797 if (chcolor == "gris15") {
0798 couleur = 15;
0799 }
0800 if (chcolor == "gris16") {
0801 couleur = 16;
0802 }
0803 if (chcolor == "gris17") {
0804 couleur = 17;
0805 }
0806 if (chcolor == "gris18") {
0807 couleur = 18;
0808 }
0809
0810 return couleur;
0811 }
0812
0813
0814
0815
0816
0817 Int_t TEcnaParHistos::GetMaxNbOfColors() { return fMaxColorNumber; }
0818 Int_t TEcnaParHistos::GetNbOfRunsDisplayed() { return fNbOfRunsDisplayed; }
0819 Double_t TEcnaParHistos::GetMarginAutoMinMax() { return fMarginAutoMinMax; }
0820
0821
0822
0823
0824
0825
0826 void TEcnaParHistos::SetViewHistoStyle(const TString& HistoType) {
0827
0828
0829
0830 gStyle->SetPalette(1, nullptr);
0831
0832
0833 gStyle->SetOptDate(0);
0834
0835
0836 gStyle->SetTitleW(0.5);
0837 gStyle->SetTitleH(0.075);
0838
0839 if (HistoType == "colz" || HistoType == "lego" || HistoType == "surf" || HistoType == "Stin") {
0840 gStyle->SetTitleW(0.8);
0841 gStyle->SetTitleH(0.075);
0842 }
0843
0844 if ((HistoType == "H1Basic") || (HistoType == "Evol")) {
0845 gStyle->SetTitleW(0.5);
0846 gStyle->SetTitleH(0.075);
0847 }
0848
0849 if (HistoType == "Stex2DEB") {
0850 gStyle->SetTitleW(0.2);
0851 gStyle->SetTitleH(0.095);
0852 }
0853
0854 if (HistoType == "Stex2DEE") {
0855 gStyle->SetTitleW(0.45);
0856 gStyle->SetTitleH(0.08);
0857 }
0858
0859 if (HistoType == "Stex2DEENb") {
0860 gStyle->SetTitleW(0.85);
0861 gStyle->SetTitleH(0.08);
0862 }
0863
0864 if (HistoType == "Stas2DEB" || HistoType == "Stas2DEE") {
0865 gStyle->SetTitleW(0.225);
0866 gStyle->SetTitleH(0.095);
0867 }
0868
0869 if (HistoType == "Global" || HistoType == "Proj" || HistoType == "SampProj" || HistoType == "EvolProj") {
0870 gStyle->SetTitleW(0.5);
0871 gStyle->SetTitleH(0.08);
0872 }
0873
0874
0875 gStyle->SetOptStat(1110);
0876
0877
0878 if (HistoType == "colz" || HistoType == "lego" || HistoType == "surf" || HistoType == "Stin") {
0879 gStyle->SetStatW(0.55);
0880 gStyle->SetStatH(0.2);
0881 gStyle->SetStatY(1);
0882 }
0883
0884 if (HistoType == "Global") {
0885 gStyle->SetStatW(0.375);
0886 gStyle->SetStatH(0.180);
0887 gStyle->SetStatY(0.9875);
0888 }
0889 if (HistoType == "Proj" || HistoType == "SampProj" || HistoType == "EvolProj") {
0890 gStyle->SetStatW(0.375);
0891 gStyle->SetStatH(0.180);
0892 gStyle->SetStatY(0.9875);
0893 }
0894
0895 if ((HistoType == "H1Basic") || (HistoType == "Evol")) {
0896 gStyle->SetStatW(0.375);
0897 gStyle->SetStatH(0.180);
0898 gStyle->SetStatY(0.9875);
0899 }
0900
0901
0902
0903 gStyle->SetMarkerStyle(1);
0904 if (HistoType == "Global") {
0905 gStyle->SetMarkerStyle(20);
0906 }
0907 }
0908
0909
0910 void TEcnaParHistos::SetViewHistoPadMargins(const TString& HistoType, const TString& opt_plot) {
0911
0912
0913
0914 gStyle->SetPadBottomMargin(0.125);
0915 gStyle->SetPadTopMargin(0.125);
0916 gStyle->SetPadLeftMargin(0.125);
0917 gStyle->SetPadRightMargin(0.125);
0918
0919 if (HistoType == "colz" || HistoType == "lego" || HistoType == "surf" || HistoType == "Stin") {
0920 gStyle->SetPadBottomMargin(0.125);
0921 gStyle->SetPadTopMargin(0.135);
0922 gStyle->SetPadLeftMargin(0.135);
0923 gStyle->SetPadRightMargin(0.135);
0924 }
0925
0926 if (HistoType == "Stex2DEB") {
0927 gStyle->SetPadBottomMargin(0.145);
0928 gStyle->SetPadTopMargin(0.135);
0929 gStyle->SetPadLeftMargin(0.125);
0930 gStyle->SetPadRightMargin(0.125);
0931 }
0932
0933 if (HistoType == "Stex2DEE" || HistoType == "Stex2DEENb") {
0934 gStyle->SetPadBottomMargin(0.120);
0935 gStyle->SetPadTopMargin(0.110);
0936 gStyle->SetPadLeftMargin(0.130);
0937 gStyle->SetPadRightMargin(0.130);
0938 }
0939 if (HistoType == "Stas2DEB") {
0940 gStyle->SetPadBottomMargin(0.145);
0941 gStyle->SetPadTopMargin(0.135);
0942 gStyle->SetPadLeftMargin(0.125);
0943 gStyle->SetPadRightMargin(0.125);
0944 }
0945
0946 if (HistoType == "Stas2DEE") {
0947 gStyle->SetPadBottomMargin(0.145);
0948 gStyle->SetPadTopMargin(0.135);
0949 gStyle->SetPadLeftMargin(0.105);
0950 gStyle->SetPadRightMargin(0.115);
0951 }
0952 if (HistoType == "Global") {
0953 gStyle->SetPadBottomMargin((Float_t)0.125);
0954 gStyle->SetPadTopMargin((Float_t)0.175);
0955 gStyle->SetPadLeftMargin((Float_t)0.115);
0956 gStyle->SetPadRightMargin((Float_t)0.05);
0957 }
0958
0959 if (HistoType == "Proj" || HistoType == "SampProj") {
0960 gStyle->SetPadBottomMargin(0.115);
0961 gStyle->SetPadTopMargin(0.155);
0962 gStyle->SetPadLeftMargin(0.15);
0963 gStyle->SetPadRightMargin(0.05);
0964 }
0965
0966 if (HistoType == "H1Basic") {
0967 gStyle->SetPadBottomMargin(0.1275);
0968 gStyle->SetPadTopMargin(0.165);
0969 gStyle->SetPadLeftMargin(0.15);
0970 gStyle->SetPadRightMargin(0.05);
0971 }
0972
0973 if (HistoType == "Evol" && opt_plot == "ONLYONE") {
0974 gStyle->SetPadBottomMargin(0.110);
0975 gStyle->SetPadTopMargin(0.2);
0976 gStyle->SetPadLeftMargin(0.115);
0977 gStyle->SetPadRightMargin(0.035);
0978 }
0979 if (HistoType == "Evol" && opt_plot == "SAME") {
0980 gStyle->SetPadBottomMargin(0.110);
0981 gStyle->SetPadTopMargin(0.185);
0982 gStyle->SetPadLeftMargin(0.115);
0983 gStyle->SetPadRightMargin(0.035);
0984 }
0985 if (HistoType == "Evol" && opt_plot == "SAME n") {
0986 gStyle->SetPadBottomMargin(0.110);
0987 gStyle->SetPadTopMargin(0.1);
0988 gStyle->SetPadLeftMargin(0.115);
0989 gStyle->SetPadRightMargin(0.035);
0990 }
0991
0992 if (HistoType == "EvolProj" && opt_plot == "ONLYONE") {
0993 gStyle->SetPadBottomMargin(0.1275);
0994 gStyle->SetPadTopMargin(0.165);
0995 gStyle->SetPadLeftMargin(0.15);
0996 gStyle->SetPadRightMargin(0.05);
0997 }
0998 if (HistoType == "EvolProj" && opt_plot == "SAME") {
0999 gStyle->SetPadBottomMargin(0.110);
1000 gStyle->SetPadTopMargin(0.185);
1001 gStyle->SetPadLeftMargin(0.115);
1002 gStyle->SetPadRightMargin(0.035);
1003 }
1004 if (HistoType == "EvolProj" && opt_plot == "SAME n") {
1005 gStyle->SetPadBottomMargin(0.110);
1006 gStyle->SetPadTopMargin(0.1);
1007 gStyle->SetPadLeftMargin(0.115);
1008 gStyle->SetPadRightMargin(0.035);
1009 }
1010 }
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021 void TEcnaParHistos::SetViewHistoStats(TH1D* histo, const TString& HistoType) {
1022
1023
1024 Bool_t b_true = kTRUE;
1025 Bool_t b_false = kFALSE;
1026
1027 histo->SetStats(b_false);
1028
1029 if (HistoType == "Global") {
1030 histo->SetStats(b_false);
1031 }
1032 if (HistoType == "Proj" || HistoType == "SampProj") {
1033 histo->SetStats(b_true);
1034 }
1035 }
1036
1037 void TEcnaParHistos::SetViewHistoOffsets(TH1D* histo, const TString& HistoType, const TString& opt_plot) {
1038
1039
1040 if (HistoType == "Global") {
1041
1042 histo->GetXaxis()->SetTitleOffset((Float_t)1.05);
1043 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
1044
1045 histo->GetXaxis()->SetLabelOffset((Float_t)0.006);
1046 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
1047
1048 histo->GetXaxis()->SetTickLength((Float_t)0.03);
1049 histo->GetXaxis()->SetNdivisions((Int_t)510);
1050
1051
1052 histo->GetYaxis()->SetTitleOffset((Float_t)1.5);
1053 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
1054
1055 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
1056 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
1057
1058 histo->GetYaxis()->SetTickLength((Float_t)0.03);
1059 histo->GetYaxis()->SetNdivisions((Int_t)510);
1060 }
1061
1062 if (HistoType == "Proj" || HistoType == "SampGlobal" || HistoType == "SampProj") {
1063
1064 histo->GetXaxis()->SetTitleOffset((Float_t)1.05);
1065 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
1066
1067 histo->GetXaxis()->SetLabelOffset((Float_t)0.006);
1068 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
1069
1070 histo->GetXaxis()->SetTickLength((Float_t)0.03);
1071 histo->GetXaxis()->SetNdivisions((Int_t)510);
1072
1073
1074 histo->GetYaxis()->SetTitleOffset((Float_t)1.75);
1075 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
1076
1077 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
1078 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
1079
1080 histo->GetYaxis()->SetTickLength((Float_t)0.03);
1081 histo->GetYaxis()->SetNdivisions((Int_t)510);
1082 }
1083
1084 if (HistoType == "H1Basic" || HistoType == "Evol" ||
1085 (HistoType == "EvolProj" && !(opt_plot == "SAME" || opt_plot == "SAME n"))) {
1086
1087 histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
1088 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
1089
1090 histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
1091 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
1092
1093 histo->GetXaxis()->SetTickLength((Float_t)0.03);
1094 histo->GetXaxis()->SetNdivisions((Int_t)510);
1095
1096
1097 histo->GetYaxis()->SetTitleOffset((Float_t)1.75);
1098 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
1099
1100 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
1101 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
1102
1103 histo->GetYaxis()->SetTickLength((Float_t)0.03);
1104 histo->GetYaxis()->SetNdivisions((Int_t)510);
1105 }
1106
1107 if (HistoType == "EvolProj" && (opt_plot == "SAME" || opt_plot == "SAME n")) {
1108
1109 histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
1110 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
1111
1112 histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
1113 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
1114
1115 histo->GetXaxis()->SetTickLength((Float_t)0.03);
1116 histo->GetXaxis()->SetNdivisions((Int_t)510);
1117
1118
1119 histo->GetYaxis()->SetTitleOffset((Float_t)1.25);
1120 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
1121
1122 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
1123 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
1124
1125 histo->GetYaxis()->SetTickLength((Float_t)0.03);
1126 histo->GetYaxis()->SetNdivisions((Int_t)510);
1127 }
1128
1129 if (HistoType == "colz") {
1130
1131 histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
1132 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
1133
1134 histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
1135 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
1136
1137 histo->GetXaxis()->SetTickLength((Float_t)0.03);
1138 histo->GetXaxis()->SetNdivisions((Int_t)510);
1139
1140
1141 histo->GetYaxis()->SetTitleOffset((Float_t)1.45);
1142 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
1143
1144 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
1145 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
1146
1147 histo->GetYaxis()->SetTickLength((Float_t)0.03);
1148 histo->GetYaxis()->SetNdivisions((Int_t)510);
1149 }
1150
1151 if (HistoType == "lego" || HistoType == "surf") {
1152
1153 histo->GetXaxis()->SetTitleOffset((Float_t)1.7);
1154 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
1155
1156 histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
1157 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
1158
1159 histo->GetXaxis()->SetTickLength((Float_t)0.03);
1160 histo->GetXaxis()->SetNdivisions((Int_t)510);
1161
1162
1163 histo->GetYaxis()->SetTitleOffset((Float_t)1.85);
1164 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
1165
1166 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
1167 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
1168
1169 histo->GetYaxis()->SetTickLength((Float_t)0.03);
1170 histo->GetYaxis()->SetNdivisions((Int_t)510);
1171 }
1172
1173 if (HistoType == "Stin") {
1174
1175 histo->GetXaxis()->SetTitleOffset((Float_t)9999.);
1176 histo->GetXaxis()->SetTitleSize((Float_t)0.05);
1177
1178 histo->GetXaxis()->SetLabelOffset((Float_t)9999.);
1179 histo->GetXaxis()->SetLabelSize((Float_t)0.);
1180
1181 histo->GetXaxis()->SetNdivisions((Int_t)1);
1182 histo->GetXaxis()->SetTickLength((Float_t)0.);
1183
1184
1185 histo->GetYaxis()->SetTitleOffset((Float_t)9999.);
1186 histo->GetYaxis()->SetTitleSize((Float_t)0.05);
1187
1188 histo->GetYaxis()->SetLabelOffset((Float_t)9999.);
1189 histo->GetYaxis()->SetLabelSize((Float_t)0.);
1190
1191 histo->GetYaxis()->SetNdivisions((Int_t)1);
1192 histo->GetYaxis()->SetTickLength((Float_t)0.);
1193 }
1194
1195 if (HistoType == "Stex2DEB" || HistoType == "Stex2DEE" || HistoType == "Stex2DEENb" || HistoType == "Stas2DEB" ||
1196 HistoType == "Stas2DEE") {
1197
1198 histo->GetXaxis()->SetTitleOffset((Float_t)9999.);
1199 histo->GetXaxis()->SetTitleSize((Float_t)0.075);
1200
1201 histo->GetXaxis()->SetLabelOffset((Float_t)9999.);
1202 histo->GetXaxis()->SetLabelSize((Float_t)0.);
1203
1204 histo->GetXaxis()->SetNdivisions((Int_t)1);
1205 histo->GetXaxis()->SetTickLength((Float_t)0.);
1206
1207
1208 histo->GetYaxis()->SetTitleOffset((Float_t)9999.);
1209 histo->GetYaxis()->SetTitleSize((Float_t)0.075);
1210
1211 histo->GetYaxis()->SetLabelOffset((Float_t)9999.);
1212 histo->GetYaxis()->SetLabelSize((Float_t)0.);
1213
1214 histo->GetYaxis()->SetNdivisions((Int_t)1);
1215 histo->GetYaxis()->SetTickLength((Float_t)0.);
1216 }
1217 }
1218
1219
1220 Float_t TEcnaParHistos::AxisTitleOffset() { return AxisTitleOffset(""); }
1221 Float_t TEcnaParHistos::AxisTitleOffset(const TString& opt) {
1222 Float_t tit_off = 1.;
1223
1224 if (opt == "") {
1225 tit_off = 0.055;
1226 }
1227 if (opt == "Towx") {
1228 tit_off = 1.15;
1229 }
1230 if (opt == "Towy") {
1231 tit_off = 1.15;
1232 }
1233 if (opt == "SMx") {
1234 tit_off = 1.15;
1235 }
1236 if (opt == "SMy") {
1237 tit_off = 0.5;
1238 }
1239 if (opt == "SMyInEB") {
1240 tit_off = 0.7;
1241 }
1242 if (opt == "EBy") {
1243 tit_off = 1.;
1244 }
1245 if (opt == "EBx") {
1246 tit_off = 1.3;
1247 }
1248
1249 if (opt == "SCx") {
1250 tit_off = 1.15;
1251 }
1252 if (opt == "SCy") {
1253 tit_off = 1.15;
1254 }
1255 if (opt == "Deex") {
1256 tit_off = 0.75;
1257 }
1258 if (opt == "Deey") {
1259 tit_off = 1.2;
1260 }
1261 if (opt == "EEx") {
1262 tit_off = 1.2;
1263 }
1264 if (opt == "EEy") {
1265 tit_off = 1.;
1266 }
1267
1268 return tit_off;
1269 }
1270
1271 Float_t TEcnaParHistos::AxisTitleSize() { return AxisTitleSize(""); }
1272 Float_t TEcnaParHistos::AxisTitleSize(const TString& opt) {
1273 Float_t tit_siz = 0.045;
1274 if (opt == "") {
1275 tit_siz = 0.045;
1276 }
1277 return tit_siz;
1278 }
1279
1280 Float_t TEcnaParHistos::AxisLabelOffset() { return AxisLabelOffset(""); }
1281 Float_t TEcnaParHistos::AxisLabelOffset(const TString& opt) {
1282 Float_t lab_off = 0.02;
1283 if (opt == "") {
1284 lab_off = 0.02;
1285 }
1286
1287 if (opt == "Towx") {
1288 lab_off = 0.01;
1289 }
1290 if (opt == "Towy") {
1291 lab_off = 0.03;
1292 }
1293 if (opt == "SMx") {
1294 lab_off = 0.01;
1295 }
1296 if (opt == "SMy") {
1297 lab_off = 0.015;
1298 }
1299 if (opt == "EBx") {
1300 lab_off = 0.03;
1301 }
1302 if (opt == "EBy") {
1303 lab_off = 0.015;
1304 }
1305
1306 if (opt == "SCx") {
1307 lab_off = 0.01;
1308 }
1309 if (opt == "SCy") {
1310 lab_off = 0.03;
1311 }
1312 if (opt == "Deex") {
1313 lab_off = 0.002;
1314 }
1315 if (opt == "Deey") {
1316 lab_off = 0.03;
1317 }
1318 if (opt == "EEx") {
1319 lab_off = 0.015;
1320 }
1321 if (opt == "EEy") {
1322 lab_off = 0.02;
1323 }
1324
1325 return lab_off;
1326 }
1327
1328 Float_t TEcnaParHistos::AxisLabelSize() { return AxisLabelSize(""); }
1329 Float_t TEcnaParHistos::AxisLabelSize(const TString& opt) {
1330 Float_t lab_siz = 0.035;
1331 if (opt == "SMx") {
1332 lab_siz = 0.05;
1333 }
1334 if (opt == "SMy") {
1335 lab_siz = 0.05;
1336 }
1337 if (opt == "EBx") {
1338 lab_siz = 0.04;
1339 }
1340 if (opt == "EBy") {
1341 lab_siz = 0.04;
1342 }
1343 return lab_siz;
1344 }
1345
1346 Float_t TEcnaParHistos::AxisTickSize() { return AxisTickSize(""); }
1347 Float_t TEcnaParHistos::AxisTickSize(const TString& opt) {
1348
1349 Float_t tic_siz = 0.;
1350 if (opt == "Dee") {
1351 tic_siz = 0.;
1352 }
1353 if (opt == "Deex") {
1354 tic_siz = 0.01;
1355 }
1356 if (opt == "Deey") {
1357 tic_siz = 0.02;
1358 }
1359 if (opt == "SMx") {
1360 tic_siz = 0.03;
1361 }
1362 if (opt == "SMy") {
1363 tic_siz = 0.0075;
1364 }
1365 if (opt == "EEx") {
1366 tic_siz = 0.06;
1367 }
1368 if (opt == "EEy") {
1369 tic_siz = 0.005;
1370 }
1371
1372 return tic_siz;
1373 }
1374
1375
1376 void TEcnaParHistos::SetViewGraphOffsets(TGraph* graph, const TString& HistoType) {
1377
1378
1379 if ((HistoType == "H1Basic") || (HistoType == "Evol")) {
1380
1381 graph->GetXaxis()->SetTitleOffset((Float_t)1.10);
1382 graph->GetXaxis()->SetTitleSize((Float_t)0.04);
1383
1384 graph->GetXaxis()->SetLabelOffset((Float_t)0.015);
1385 graph->GetXaxis()->SetLabelSize((Float_t)0.04);
1386
1387 graph->GetXaxis()->SetTickLength((Float_t)0.02);
1388 graph->GetXaxis()->SetNdivisions((Int_t)510);
1389
1390
1391 graph->GetYaxis()->SetTitleOffset((Float_t)1.25);
1392 graph->GetYaxis()->SetTitleSize((Float_t)0.04);
1393
1394 graph->GetYaxis()->SetLabelOffset((Float_t)0.01);
1395 graph->GetYaxis()->SetLabelSize((Float_t)0.04);
1396
1397 graph->GetYaxis()->SetTickLength((Float_t)0.03);
1398 graph->GetYaxis()->SetNdivisions((Int_t)510);
1399 }
1400 }
1401
1402 Float_t TEcnaParHistos::DeeOffsetX(const TString& opt_plot, const Int_t& DeeNumber) {
1403 Float_t offset = 0;
1404 if (opt_plot == "Dee") {
1405 offset = 0;
1406 }
1407 if (opt_plot == "EE") {
1408 Double_t vertic_empty_strip_1 = 1.;
1409 if (DeeNumber == 1) {
1410 offset = vertic_empty_strip_1 + fEcal->MaxStinHocoInStex() + 2 * fEcal->MaxStinHocoInStex() + 1.;
1411 }
1412 if (DeeNumber == 2) {
1413 offset = vertic_empty_strip_1 + 2 * fEcal->MaxStinHocoInStex() + 1.;
1414 }
1415 if (DeeNumber == 3) {
1416 offset = vertic_empty_strip_1 + fEcal->MaxStinHocoInStex();
1417 }
1418 if (DeeNumber == 4) {
1419 offset = vertic_empty_strip_1 + 0.;
1420 }
1421 }
1422 return offset;
1423 }
1424
1425
1426 Float_t TEcnaParHistos::DeeNameOffsetX(const Int_t& DeeNumber) {
1427 Float_t offset = 0;
1428
1429 if (DeeNumber == 1) {
1430 offset = 8.;
1431 }
1432 if (DeeNumber == 2) {
1433 offset = 0.;
1434 }
1435 if (DeeNumber == 3) {
1436 offset = 7.6;
1437 }
1438 if (DeeNumber == 4) {
1439 offset = -0.5;
1440 }
1441
1442 return offset;
1443 }
1444
1445 Float_t TEcnaParHistos::DeeNumberOffsetX(const TString& opt_plot, const Int_t& DeeNumber) {
1446 Float_t offset = 0;
1447
1448 if (opt_plot == "Dee") {
1449 if (DeeNumber == 1) {
1450 offset = 2.5;
1451 }
1452 if (DeeNumber == 2) {
1453 offset = 41.5;
1454 }
1455 if (DeeNumber == 3) {
1456 offset = 2.5;
1457 }
1458 if (DeeNumber == 4) {
1459 offset = 41.5;
1460 }
1461 }
1462 if (opt_plot == "EE") {
1463 if (DeeNumber == 1) {
1464 offset = 0.42;
1465 }
1466 if (DeeNumber == 2) {
1467 offset = 8.15;
1468 }
1469 if (DeeNumber == 3) {
1470 offset = 0.42;
1471 }
1472 if (DeeNumber == 4) {
1473 offset = 8.15;
1474 }
1475 }
1476 return offset;
1477 }
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497 TPaveText* TEcnaParHistos::SetPaveGeneralComment(const TString& comment) {
1498
1499
1500 TPaveText* title_g1;
1501
1502 if (comment != "") {
1503 fCnew++;
1504
1505 Double_t pav_gen_xgauche = BoxLeftX("general_comment");
1506 Double_t pav_gen_xdroite = BoxRightX("general_comment");
1507 Double_t pav_gen_ybas = BoxBottomY("general_comment");
1508 Double_t pav_gen_yhaut = BoxTopY("general_comment");
1509
1510 title_g1 = new TPaveText(pav_gen_xgauche, pav_gen_ybas, pav_gen_xdroite, pav_gen_yhaut);
1511 fCnewRoot++;
1512
1513 Option_t* opt_pav = "arc";
1514 title_g1->SetOption(opt_pav);
1515
1516 TString tit_gen = comment.Data();
1517
1518
1519
1520
1521
1522 title_g1->AddText(tit_gen);
1523
1524
1525
1526 Int_t cTextPaveAlign = 12;
1527 title_g1->SetTextAlign(cTextPaveAlign);
1528
1529 Int_t cTextPaveFont = 40;
1530 title_g1->SetTextFont(cTextPaveFont);
1531
1532 Float_t cTextPaveSize = 0.04;
1533 title_g1->SetTextSize(cTextPaveSize);
1534 Int_t cTextBorderSize = 0;
1535 title_g1->SetBorderSize(cTextBorderSize);
1536 Double_t cTextPaveRadius = 5.;
1537 title_g1->SetCornerRadius(cTextPaveRadius);
1538
1539
1540 fCdelete++;
1541 } else {
1542 title_g1 = nullptr;
1543 fCnewRoot++;
1544 }
1545 return title_g1;
1546 }
1547
1548 TPaveText* TEcnaParHistos::SetPaveAnalysisRun(const TString& ana_type,
1549 const Int_t& nb_of_samples,
1550 const Int_t& run_number,
1551 const TString& run_type,
1552 const Int_t& first_evt,
1553 const Int_t& last_evt,
1554 const TString& nb_col) {
1555
1556
1557 char f_in[fgMaxCar];
1558
1559
1560 Double_t pav_bot_left_xgauche = BoxLeftX("bottom_left_box");
1561 Double_t pav_bot_left_xdroite = BoxRightX("bottom_left_box");
1562 Double_t pav_bot_left_ybas = BoxBottomY("bottom_left_box");
1563 Double_t pav_bot_left_yhaut = BoxTopY("bottom_left_box");
1564
1565 TPaveText* com_bot_left =
1566 new TPaveText(pav_bot_left_xgauche, pav_bot_left_ybas, pav_bot_left_xdroite, pav_bot_left_yhaut);
1567 fCnewRoot++;
1568
1569
1570 Int_t cTextPaveAlign = 12;
1571 com_bot_left->SetTextAlign(cTextPaveAlign);
1572
1573 Int_t cTextPaveFont = 100;
1574 com_bot_left->SetTextFont(cTextPaveFont);
1575
1576 Float_t cTextPaveSize = 0.025;
1577 com_bot_left->SetTextSize(cTextPaveSize);
1578
1579 Int_t cTextBorderSize = 1;
1580 com_bot_left->SetBorderSize(cTextBorderSize);
1581
1582 if (nb_col == "TwoCol") {
1583 cTextPaveSize = 0.035;
1584 com_bot_left->SetTextSize(cTextPaveSize);
1585 snprintf(f_in, fgMaxCar, "Run: %d Samples: 1 - %d", run_number, nb_of_samples);
1586 com_bot_left->AddText(f_in);
1587 cTextPaveSize = 0.035;
1588 com_bot_left->SetTextSize(cTextPaveSize);
1589 snprintf(f_in, fgMaxCar, "Type: %-20s", run_type.Data());
1590 com_bot_left->AddText(f_in);
1591 snprintf(f_in, fgMaxCar, "Analysis: %-10s Evts range: %d - %d ", ana_type.Data(), first_evt, last_evt);
1592 com_bot_left->AddText(f_in);
1593 } else {
1594 cTextPaveSize = 0.0225;
1595 com_bot_left->SetTextSize(cTextPaveSize);
1596 snprintf(f_in, fgMaxCar, "Run: %d ", run_number);
1597 com_bot_left->AddText(f_in);
1598 snprintf(f_in, fgMaxCar, "Type: %-20s", run_type.Data());
1599 com_bot_left->AddText(f_in);
1600 snprintf(f_in, fgMaxCar, "Analysis: %-10s ", ana_type.Data());
1601 com_bot_left->AddText(f_in);
1602 Int_t un = 1;
1603 snprintf(f_in, fgMaxCar, "Samples: %d - %d", un, nb_of_samples);
1604 com_bot_left->AddText(f_in);
1605 snprintf(f_in, fgMaxCar, "Evts range: %d - %d", first_evt, last_evt);
1606 com_bot_left->AddText(f_in);
1607 }
1608
1609 return com_bot_left;
1610 }
1611
1612 TPaveText* TEcnaParHistos::SetPaveNbOfEvts(const Int_t& nb_of_evts,
1613 const TString& start_date,
1614 const TString& stop_date,
1615 const TString& nb_col) {
1616
1617
1618 char f_in[fgMaxCar];
1619
1620
1621
1622 Double_t pav_bot_right_xgauche = BoxLeftX("bottom_right_box");
1623 Double_t pav_bot_right_xdroite = BoxRightX("bottom_right_box");
1624 Double_t pav_bot_right_ybas = BoxBottomY("bottom_right_box");
1625 Double_t pav_bot_right_yhaut = BoxTopY("bottom_right_box");
1626 TPaveText* com_bot_right =
1627 new TPaveText(pav_bot_right_xgauche, pav_bot_right_ybas, pav_bot_right_xdroite, pav_bot_right_yhaut);
1628 fCnewRoot++;
1629
1630
1631 Int_t cTextPaveAlign = 12;
1632 com_bot_right->SetTextAlign(cTextPaveAlign);
1633
1634 Int_t cTextPaveFont = 100;
1635 com_bot_right->SetTextFont(cTextPaveFont);
1636
1637 Float_t cTextPaveSize = 0.025;
1638 com_bot_right->SetTextSize(cTextPaveSize);
1639
1640 Int_t cTextBorderSize = 1;
1641 com_bot_right->SetBorderSize(cTextBorderSize);
1642
1643 if (nb_col == "TwoCol") {
1644 cTextPaveSize = 0.0325;
1645 com_bot_right->SetTextSize(cTextPaveSize);
1646 snprintf(f_in, fgMaxCar, "First evt: %s %8d events ", start_date.Data(), nb_of_evts);
1647 com_bot_right->AddText(f_in);
1648 snprintf(f_in, fgMaxCar, "Last evt: %s ", stop_date.Data());
1649 com_bot_right->AddText(f_in);
1650 } else {
1651 cTextPaveSize = 0.0225;
1652 com_bot_right->SetTextSize(cTextPaveSize);
1653 snprintf(f_in, fgMaxCar, "%d events", nb_of_evts);
1654 com_bot_right->AddText(f_in);
1655 snprintf(f_in, fgMaxCar, "First evt: %s ", start_date.Data());
1656 com_bot_right->AddText(f_in);
1657 snprintf(f_in, fgMaxCar, "Last evt: %s ", stop_date.Data());
1658 com_bot_right->AddText(f_in);
1659 }
1660
1661 return com_bot_right;
1662 }
1663
1664 TPaveText* TEcnaParHistos::SetPaveEvolNbOfEvtsAna(const TString& ana_type,
1665 const Int_t& nb_of_samples,
1666 const Int_t& first_req_evt,
1667 const Int_t& last_req_evt,
1668 const TString& HistoType) {
1669
1670
1671 char f_in[fgMaxCar];
1672
1673
1674 Double_t pav_bot_left_xgauche = BoxLeftX("bottom_left_box");
1675 Double_t pav_bot_left_xdroite = BoxRightX("bottom_left_box");
1676 Double_t pav_bot_left_ybas = BoxBottomY("bottom_left_box");
1677 Double_t pav_bot_left_yhaut = BoxTopY("bottom_left_box");
1678
1679 if (HistoType == "EvolProj") {
1680 pav_bot_left_xgauche = BoxLeftX("bottom_left_box_evol");
1681 pav_bot_left_xdroite = BoxRightX("bottom_left_box_evol");
1682 pav_bot_left_ybas = BoxBottomY("bottom_left_box_evol");
1683 pav_bot_left_yhaut = BoxTopY("bottom_left_box_evol");
1684 }
1685
1686 TPaveText* com_bot_left =
1687 new TPaveText(pav_bot_left_xgauche, pav_bot_left_ybas, pav_bot_left_xdroite, pav_bot_left_yhaut);
1688 fCnewRoot++;
1689
1690
1691 Int_t cTextPaveAlign = 12;
1692 com_bot_left->SetTextAlign(cTextPaveAlign);
1693
1694 Int_t cTextPaveFont = 100;
1695 com_bot_left->SetTextFont(cTextPaveFont);
1696
1697 Float_t cTextPaveSize = 0.03;
1698 com_bot_left->SetTextSize(cTextPaveSize);
1699 Int_t cTextBorderSize = 1;
1700 com_bot_left->SetBorderSize(cTextBorderSize);
1701
1702 TString analysis_name = ana_type.Data();
1703
1704 snprintf(f_in, fgMaxCar, "Analysis: %s", analysis_name.Data());
1705 com_bot_left->AddText(f_in);
1706 snprintf(f_in, fgMaxCar, "Samples: 1 - %d", nb_of_samples);
1707 com_bot_left->AddText(f_in);
1708 snprintf(f_in, fgMaxCar, "Evts range: %d - %d ", first_req_evt, last_req_evt);
1709 com_bot_left->AddText(f_in);
1710
1711 return com_bot_left;
1712 }
1713
1714 TPaveText* TEcnaParHistos::SetPaveEvolRuns(const Int_t& start_evol_run,
1715 const TString& start_evol_date,
1716 const Int_t& stop_evol_run,
1717 const TString& stop_evol_date,
1718 const TString& opt_plot,
1719 const TString& HistoType) {
1720
1721
1722 char f_in[fgMaxCar];
1723
1724
1725 Double_t pav_border_xgauche = BoxLeftX("bottom_right_box_evol");
1726 Double_t pav_border_xdroite = BoxRightX("bottom_right_box_evol");
1727 Double_t pav_border_ybas = BoxBottomY("bottom_right_box_evol");
1728 Double_t pav_border_yhaut = BoxTopY("bottom_right_box_evol");
1729
1730 if (opt_plot == "SAME n") {
1731 pav_border_xgauche = BoxLeftX("bottom_right_box_evpr");
1732 pav_border_xdroite = BoxRightX("bottom_right_box_evpr");
1733 pav_border_ybas = BoxBottomY("top_right_box_EB");
1734 pav_border_yhaut = BoxTopY("top_right_box_EB");
1735 }
1736
1737 TPaveText* pav_evol_runs = new TPaveText(pav_border_xgauche, pav_border_ybas, pav_border_xdroite, pav_border_yhaut);
1738 fCnewRoot++;
1739
1740
1741 Int_t cTextPaveAlign = 12;
1742 pav_evol_runs->SetTextAlign(cTextPaveAlign);
1743
1744
1745 Int_t cTextPaveFont = 100;
1746 pav_evol_runs->SetTextFont(cTextPaveFont);
1747
1748 Float_t cTextPaveSize = 0.025;
1749 if (HistoType == "Evol" || HistoType == "EvolProj") {
1750 cTextPaveSize = 0.0225;
1751 }
1752
1753 pav_evol_runs->SetTextSize(cTextPaveSize);
1754 Int_t cTextBorderSize = 1;
1755 pav_evol_runs->SetBorderSize(cTextBorderSize);
1756
1757 if (!((HistoType == "Evol" && opt_plot == "SAME n") || (HistoType == "EvolProj" && opt_plot == "SAME n"))) {
1758 snprintf(f_in, fgMaxCar, "First run: %d", start_evol_run);
1759 pav_evol_runs->AddText(f_in);
1760 snprintf(f_in, fgMaxCar, "(%s) ", start_evol_date.Data());
1761 pav_evol_runs->AddText(f_in);
1762 snprintf(f_in, fgMaxCar, "Last run: %d", stop_evol_run);
1763 pav_evol_runs->AddText(f_in);
1764 snprintf(f_in, fgMaxCar, "(%s) ", stop_evol_date.Data());
1765 pav_evol_runs->AddText(f_in);
1766 }
1767
1768 if ((HistoType == "Evol" && opt_plot == "SAME n") || (HistoType == "EvolProj" && opt_plot == "SAME n")) {
1769 snprintf(f_in, fgMaxCar, "First run: %d (%s) ", start_evol_run, start_evol_date.Data());
1770 pav_evol_runs->AddText(f_in);
1771 snprintf(f_in, fgMaxCar, "Last run: %d (%s)", stop_evol_run, stop_evol_date.Data());
1772 pav_evol_runs->AddText(f_in);
1773 }
1774
1775 return pav_evol_runs;
1776 }
1777
1778 TPaveText* TEcnaParHistos::SetOptionSamePaveBorder(const TString& chopt, const TString& HistoType) {
1779
1780
1781
1782
1783
1784
1785 Double_t pav_left_xgauche = BoxLeftX("several_plots_box");
1786 Double_t pav_left_xdroite = BoxRightX("several_plots_box");
1787 Double_t pav_left_ybas = BoxBottomY("several_plots_box");
1788 Double_t pav_left_yhaut = BoxTopY("several_plots_box");
1789
1790 if (chopt == "sevevol") {
1791 pav_left_xgauche = BoxLeftX("several_evol_box");
1792 pav_left_xdroite = BoxRightX("several_evol_box");
1793 pav_left_ybas = BoxBottomY("several_evol_box");
1794 pav_left_yhaut = BoxTopY("several_evol_box");
1795
1796 if (HistoType == "EvolProj") {
1797 pav_left_xgauche = BoxLeftX("several_evpr_box");
1798 pav_left_xdroite = BoxRightX("several_evpr_box");
1799 pav_left_ybas = BoxBottomY("several_evpr_box");
1800 pav_left_yhaut = BoxTopY("several_evpr_box");
1801 }
1802 }
1803
1804 TPaveText* com_several = new TPaveText(pav_left_xgauche, pav_left_ybas, pav_left_xdroite, pav_left_yhaut);
1805 fCnewRoot++;
1806
1807 return com_several;
1808 }
1809
1810
1811
1812
1813
1814
1815
1816
1817 TPaveText* TEcnaParHistos::SetPaveStas() {
1818 char f_in[fgMaxCar];
1819
1820 Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
1821 Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
1822 Double_t pav_top_left_ybas = BoxBottomY("top_left_box_SM");
1823 Double_t pav_top_left_yhaut = BoxTopY("top_left_box_SM");
1824
1825 TPaveText* com_top_left =
1826 new TPaveText(pav_top_left_xgauche, pav_top_left_ybas, pav_top_left_xdroite, pav_top_left_yhaut);
1827 fCnewRoot++;
1828
1829
1830 Int_t cTextPaveAlign = 12;
1831 com_top_left->SetTextAlign(cTextPaveAlign);
1832
1833 Int_t cTextPaveFont = 100;
1834 com_top_left->SetTextFont(cTextPaveFont);
1835
1836 Float_t cTextPaveSize = 0.04;
1837 com_top_left->SetTextSize(cTextPaveSize);
1838 Int_t cTextBorderSize = 1;
1839 com_top_left->SetBorderSize(cTextBorderSize);
1840
1841 if (fFlagSubDet == "EB") {
1842 snprintf(f_in, fgMaxCar, "EB");
1843 }
1844 if (fFlagSubDet == "EE") {
1845 snprintf(f_in, fgMaxCar, "EE");
1846 }
1847
1848 com_top_left->AddText(f_in);
1849
1850 return com_top_left;
1851 }
1852
1853 TPaveText* TEcnaParHistos::SetPaveSM(const TString& chopt, const Int_t& SM_number, const TString& EB_type) {
1854
1855
1856 char f_in[fgMaxCar];
1857
1858
1859 Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
1860 Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
1861 Double_t pav_top_left_ybas = BoxBottomY("top_left_box_SM");
1862 Double_t pav_top_left_yhaut = BoxTopY("top_left_box_SM");
1863
1864 if (chopt == "standard" || (chopt == "standGH" && EB_type == "EB-")) {
1865 pav_top_left_xgauche = BoxLeftX("top_left_box_EB");
1866 pav_top_left_xdroite = BoxRightX("top_left_box_EB");
1867 pav_top_left_ybas = BoxBottomY("top_left_box_EB");
1868 pav_top_left_yhaut = BoxTopY("top_left_box_EB");
1869 }
1870
1871 if (chopt == "standSM" || chopt == "standStex" || (chopt == "standGH" && EB_type == "EB+")) {
1872 pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
1873 pav_top_left_xdroite = BoxRightX("top_left_box_SM");
1874 pav_top_left_ybas = BoxBottomY("top_left_box_SM");
1875 pav_top_left_yhaut = BoxTopY("top_left_box_SM");
1876 }
1877
1878 if (chopt == "several") {
1879 pav_top_left_xgauche = BoxLeftX("several_plots_box");
1880 pav_top_left_xdroite = BoxRightX("several_plots_box");
1881 pav_top_left_ybas = BoxBottomY("several_plots_box");
1882 pav_top_left_yhaut = BoxTopY("several_plots_box");
1883 }
1884
1885 if (chopt == "sevevol") {
1886 pav_top_left_xgauche = BoxLeftX("several_evol_box");
1887 pav_top_left_xdroite = BoxRightX("several_evol_box");
1888 pav_top_left_ybas = BoxBottomY("several_evol_box");
1889 pav_top_left_yhaut = BoxTopY("several_evol_box");
1890 }
1891
1892 TPaveText* com_top_left =
1893 new TPaveText(pav_top_left_xgauche, pav_top_left_ybas, pav_top_left_xdroite, pav_top_left_yhaut);
1894 fCnewRoot++;
1895
1896
1897 Int_t cTextPaveAlign = 12;
1898 com_top_left->SetTextAlign(cTextPaveAlign);
1899
1900 Int_t cTextPaveFont = 100;
1901 com_top_left->SetTextFont(cTextPaveFont);
1902
1903 Float_t cTextPaveSize = 0.04;
1904 com_top_left->SetTextSize(cTextPaveSize);
1905 Int_t cTextBorderSize = 1;
1906 com_top_left->SetBorderSize(cTextBorderSize);
1907
1908 if (chopt == "standard" || chopt == "standSM" || chopt == "standStex" || chopt == "standGH") {
1909 Int_t sm_nb = SM_number;
1910 if (EB_type == "EB+") {
1911 snprintf(f_in, fgMaxCar, "EB+%d", sm_nb);
1912 }
1913 if (EB_type == "EB-") {
1914 sm_nb = -SM_number + fEcal->MaxSMInEB() / 2;
1915 snprintf(f_in, fgMaxCar, "EB%d (SM%d)", sm_nb, SM_number);
1916 }
1917 com_top_left->AddText(f_in);
1918 }
1919
1920 return com_top_left;
1921 }
1922
1923 TPaveText* TEcnaParHistos::SetPaveTower(const Int_t& SMtower_X) {
1924
1925
1926 char f_in[fgMaxCar];
1927
1928 Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
1929 Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
1930 Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EB");
1931 Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EB");
1932 TPaveText* com_top_mid = new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas, pav_top_mid_xdroite, pav_top_mid_yhaut);
1933 fCnewRoot++;
1934
1935
1936 Int_t cTextPaveAlign = 12;
1937 com_top_mid->SetTextAlign(cTextPaveAlign);
1938
1939 Int_t cTextPaveFont = 100;
1940 com_top_mid->SetTextFont(cTextPaveFont);
1941
1942 Float_t cTextPaveSize = 0.03;
1943 com_top_mid->SetTextSize(cTextPaveSize);
1944 Int_t cTextBorderSize = 1;
1945 com_top_mid->SetBorderSize(cTextBorderSize);
1946
1947 snprintf(f_in, fgMaxCar, " Tower: %d ", SMtower_X);
1948 com_top_mid->AddText(f_in);
1949
1950 return com_top_mid;
1951 }
1952
1953 TPaveText* TEcnaParHistos::SetPaveTowersXY(const Int_t& SMtower_X, const Int_t& SMtower_Y) {
1954
1955
1956 char f_in[fgMaxCar];
1957
1958 Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
1959 Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
1960 Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EB");
1961 Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EB");
1962 TPaveText* com_top_mid = new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas, pav_top_mid_xdroite, pav_top_mid_yhaut);
1963 fCnewRoot++;
1964
1965
1966 Int_t cTextPaveAlign = 12;
1967 com_top_mid->SetTextAlign(cTextPaveAlign);
1968
1969 Int_t cTextPaveFont = 100;
1970 com_top_mid->SetTextFont(cTextPaveFont);
1971
1972 Float_t cTextPaveSize = 0.03;
1973 com_top_mid->SetTextSize(cTextPaveSize);
1974 Int_t cTextBorderSize = 1;
1975 com_top_mid->SetBorderSize(cTextBorderSize);
1976
1977 snprintf(f_in, fgMaxCar, " Tower X: %d ", SMtower_X);
1978 com_top_mid->AddText(f_in);
1979 snprintf(f_in, fgMaxCar, " Tower Y: %d ", SMtower_Y);
1980 com_top_mid->AddText(f_in);
1981
1982 return com_top_mid;
1983 }
1984
1985 TPaveText* TEcnaParHistos::SetPaveCrystal(const Int_t& StexCrys, const Int_t& StexStinA, const Int_t& StinEcha) {
1986 Int_t arg_AlreadyRead = 0;
1987 Int_t flag_all_samples = 0;
1988 return SetPaveCrystal(StexCrys, StexStinA, StinEcha, arg_AlreadyRead, flag_all_samples);
1989 }
1990
1991 TPaveText* TEcnaParHistos::SetPaveCrystal(const Int_t& StexCrys,
1992 const Int_t& StexStinA,
1993 const Int_t& StinEcha,
1994 const Int_t& arg_AlreadyRead,
1995 const Int_t& flag_all_samples) {
1996
1997
1998 char f_in[fgMaxCar];
1999
2000
2001 Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
2002 Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
2003 Double_t pav_top_right_ybas = BoxBottomY("top_right_box_EB");
2004 Double_t pav_top_right_yhaut = BoxTopY("top_right_box_EB");
2005 if (fFlagSubDet == "EE") {
2006 pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
2007 pav_top_right_xdroite = BoxRightX("top_right_box_EE");
2008 pav_top_right_ybas = BoxBottomY("top_right_box_EE");
2009 pav_top_right_yhaut = BoxTopY("top_right_box_EE");
2010 }
2011
2012 TPaveText* com_top_right =
2013 new TPaveText(pav_top_right_xgauche, pav_top_right_ybas, pav_top_right_xdroite, pav_top_right_yhaut);
2014 fCnewRoot++;
2015
2016
2017 Int_t cTextPaveAlign = 12;
2018 com_top_right->SetTextAlign(cTextPaveAlign);
2019
2020 Int_t cTextPaveFont = 100;
2021 com_top_right->SetTextFont(cTextPaveFont);
2022
2023 Float_t cTextPaveSize = 0.03;
2024 com_top_right->SetTextSize(cTextPaveSize);
2025 Int_t cTextBorderSize = 1;
2026 com_top_right->SetBorderSize(cTextBorderSize);
2027
2028 if (fFlagSubDet == "EB") {
2029 if (arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0)) {
2030 snprintf(f_in, fgMaxCar, "Channel: %d ", StinEcha);
2031 }
2032 if (arg_AlreadyRead == 1 && flag_all_samples == 1) {
2033 snprintf(f_in, fgMaxCar, "Channel: 0 to %d", fEcal->MaxCrysInStin() - 1);
2034 }
2035 com_top_right->AddText(f_in);
2036 if (arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0)) {
2037 snprintf(f_in, fgMaxCar, "Crystal in SM: %d ", StexCrys);
2038 com_top_right->AddText(f_in);
2039 }
2040 }
2041
2042 if (fFlagSubDet == "EE") {
2043 Int_t StinEchap = StinEcha + 1;
2044 if (arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0)) {
2045 snprintf(f_in, fgMaxCar, "Xtal in SC: %d ", StinEchap);
2046 }
2047 if (arg_AlreadyRead == 1 && flag_all_samples == 1) {
2048 snprintf(f_in, fgMaxCar, "Xtal in SC: 1 to %d", fEcal->MaxCrysInStin());
2049 }
2050 com_top_right->AddText(f_in);
2051 if (arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0)) {
2052 Int_t IX_Dee_crys = StexCrys / fEcal->MaxCrysIYInDee() + 1;
2053 Int_t IY_Dee_crys = StexCrys % fEcal->MaxCrysIYInDee();
2054 if (IY_Dee_crys == 0) {
2055 IX_Dee_crys--;
2056 IY_Dee_crys = fEcal->MaxCrysIYInDee();
2057 }
2058 snprintf(f_in, fgMaxCar, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
2059 com_top_right->AddText(f_in);
2060 }
2061 }
2062
2063 return com_top_right;
2064 }
2065
2066 TPaveText* TEcnaParHistos::SetPaveCrystalSample(const Int_t& StexCrys,
2067 const Int_t& StexStinA,
2068 const Int_t& StinEcha,
2069 const Int_t& iSample) {
2070
2071
2072 char f_in[fgMaxCar];
2073
2074 Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
2075 Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
2076 Double_t pav_top_right_ybas = BoxBottomY("top_right_box_EB");
2077 Double_t pav_top_right_yhaut = BoxTopY("top_right_box_EB");
2078 if (fFlagSubDet == "EE") {
2079 pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
2080 pav_top_right_xdroite = BoxRightX("top_right_box_EE");
2081 pav_top_right_ybas = BoxBottomY("top_right_box_EE");
2082 pav_top_right_yhaut = BoxTopY("top_right_box_EE");
2083 }
2084
2085 TPaveText* com_top_right =
2086 new TPaveText(pav_top_right_xgauche, pav_top_right_ybas, pav_top_right_xdroite, pav_top_right_yhaut);
2087 fCnewRoot++;
2088
2089
2090 Int_t cTextPaveAlign = 12;
2091 com_top_right->SetTextAlign(cTextPaveAlign);
2092
2093 Int_t cTextPaveFont = 100;
2094 com_top_right->SetTextFont(cTextPaveFont);
2095
2096 Float_t cTextPaveSize = 0.03;
2097 com_top_right->SetTextSize(cTextPaveSize);
2098 Int_t cTextBorderSize = 1;
2099 com_top_right->SetBorderSize(cTextBorderSize);
2100
2101 if (fFlagSubDet == "EB") {
2102 snprintf(f_in, fgMaxCar, " Channel: %d ", StinEcha);
2103 com_top_right->AddText(f_in);
2104 snprintf(f_in, fgMaxCar, " Crystal in SM: %d ", StexCrys);
2105 com_top_right->AddText(f_in);
2106 }
2107
2108 if (fFlagSubDet == "EE") {
2109 Int_t StinEchap = StinEcha + 1;
2110 snprintf(f_in, fgMaxCar, " Channel: %d ", StinEchap);
2111 com_top_right->AddText(f_in);
2112 Int_t IX_Dee_crys = StexCrys / fEcal->MaxCrysIYInDee() + 1;
2113 Int_t IY_Dee_crys = StexCrys % fEcal->MaxCrysIYInDee();
2114 if (IY_Dee_crys == 0) {
2115 IX_Dee_crys--;
2116 IY_Dee_crys = fEcal->MaxCrysIYInDee();
2117 }
2118 snprintf(f_in, fgMaxCar, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
2119 com_top_right->AddText(f_in);
2120 }
2121
2122 Int_t iSample_p = iSample + 1;
2123 snprintf(f_in, fgMaxCar, " Sample: %d ", iSample_p);
2124 com_top_right->AddText(f_in);
2125
2126 return com_top_right;
2127 }
2128
2129 TPaveText* TEcnaParHistos::SetPaveLVRB(const Int_t& SMNumber, const Int_t& SMtower) {
2130
2131
2132
2133 Double_t pav_bot_xgauche = BoxLeftX("bottom_left_box");
2134 Double_t pav_bot_xdroite = BoxRightX("bottom_right_box");
2135 Double_t pav_bot_ybas = BoxBottomY("bottom_left_box");
2136 Double_t pav_bot_yhaut = BoxTopY("bottom_left_box");
2137 TPaveText* com_bot_mid = new TPaveText(pav_bot_xgauche, pav_bot_ybas, pav_bot_xdroite, pav_bot_yhaut);
2138 fCnewRoot++;
2139
2140 Color_t couleur_noir = ColorDefinition("noir");
2141 Color_t couleur_rouge = SetColorsForNumbers("lvrb_top");
2142 Color_t couleur_bleu_fonce = SetColorsForNumbers("lvrb_bottom");
2143
2144 if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+") {
2145 TText* t1 = com_bot_mid->AddText(" <= IP (#eta = 0) (#eta = +85) => ");
2146 t1->SetTextColor(couleur_noir);
2147 }
2148
2149 if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-") {
2150 TText* t2 = com_bot_mid->AddText(" <= (#eta = -85) IP (#eta = 0) => ");
2151 t2->SetTextColor(couleur_noir);
2152 }
2153
2154 if (fEcalNumbering->GetTowerLvrbType(SMtower) == "top") {
2155 TText* t3 = nullptr;
2156 if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+") {
2157 t3 = com_bot_mid->AddText(" <=== LVRB ");
2158 } else if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-") {
2159 t3 = com_bot_mid->AddText(" LVRB ===> ");
2160 }
2161 if (t3 != nullptr) {
2162 t3->SetTextColor(couleur_rouge);
2163 }
2164 }
2165
2166 if (fEcalNumbering->GetTowerLvrbType(SMtower) == "bottom") {
2167 TText* t4 = nullptr;
2168 if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+") {
2169 t4 = com_bot_mid->AddText(" LVRB ===> ");
2170 } else if (fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-") {
2171 t4 = com_bot_mid->AddText(" <=== LVRB ");
2172 }
2173 if (t4 != nullptr) {
2174 t4->SetTextColor(couleur_bleu_fonce);
2175 }
2176 }
2177 return com_bot_mid;
2178
2179 }
2180
2181 Color_t TEcnaParHistos::SetColorsForNumbers(const TString& chtype_number) {
2182
2183
2184 Color_t couleur = ColorDefinition("noir");
2185
2186 if (chtype_number == "crystal") {
2187 couleur = ColorDefinition("noir");
2188 }
2189 if (chtype_number == "lvrb_top") {
2190 couleur = ColorDefinition("rouge");
2191 }
2192 if (chtype_number == "lvrb_bottom") {
2193 couleur = ColorDefinition("bleu_fonce");
2194 }
2195
2196 return couleur;
2197 }
2198
2199
2200
2201
2202
2203
2204
2205
2206 TPaveText* TEcnaParHistos::SetPaveDee(const TString& chopt, const Int_t& DeeNumber, const TString& DeeType) {
2207
2208
2209 char f_in[fgMaxCar];
2210
2211
2212 Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
2213 Double_t pav_top_left_xdroite = BoxRightX("top_left_box_EE");
2214 Double_t pav_top_left_ybas = BoxBottomY("top_left_box_EE");
2215 Double_t pav_top_left_yhaut = BoxTopY("top_left_box_EE");
2216
2217 if (chopt == "standard" || chopt == "standGH") {
2218 pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
2219 pav_top_left_xdroite = BoxRightX("top_left_box_EE");
2220 pav_top_left_ybas = BoxBottomY("top_left_box_EE");
2221 pav_top_left_yhaut = BoxTopY("top_left_box_EE");
2222 }
2223
2224 if (chopt == "standDee" || chopt == "standStex") {
2225 pav_top_left_xgauche = BoxLeftX("top_left_box_Dee");
2226 pav_top_left_xdroite = BoxRightX("top_left_box_Dee");
2227 pav_top_left_ybas = BoxBottomY("top_left_box_Dee");
2228 pav_top_left_yhaut = BoxTopY("top_left_box_Dee");
2229 }
2230
2231 if (chopt == "several") {
2232 pav_top_left_xgauche = BoxLeftX("several_plots_box");
2233 pav_top_left_xdroite = BoxRightX("several_plots_box");
2234 pav_top_left_ybas = BoxBottomY("several_plots_box");
2235 pav_top_left_yhaut = BoxTopY("several_plots_box");
2236 }
2237 if (chopt == "sevevol") {
2238 pav_top_left_xgauche = BoxLeftX("several_evol_box");
2239 pav_top_left_xdroite = BoxRightX("several_evol_box");
2240 pav_top_left_ybas = BoxBottomY("several_evol_box");
2241 pav_top_left_yhaut = BoxTopY("several_evol_box");
2242 }
2243
2244 TPaveText* com_top_left =
2245 new TPaveText(pav_top_left_xgauche, pav_top_left_ybas, pav_top_left_xdroite, pav_top_left_yhaut);
2246 fCnewRoot++;
2247
2248
2249 Int_t cTextPaveAlign = 12;
2250 com_top_left->SetTextAlign(cTextPaveAlign);
2251
2252 Int_t cTextPaveFont = 100;
2253 com_top_left->SetTextFont(cTextPaveFont);
2254
2255 Float_t cTextPaveSize = 0.04;
2256 com_top_left->SetTextSize(cTextPaveSize);
2257 Int_t cTextBorderSize = 1;
2258 com_top_left->SetBorderSize(cTextBorderSize);
2259
2260 if (chopt == "standard") {
2261 snprintf(f_in, fgMaxCar, " Dee: %d", DeeNumber);
2262 com_top_left->AddText(f_in);
2263 snprintf(f_in, fgMaxCar, " (%s)", DeeType.Data());
2264 com_top_left->AddText(f_in);
2265 }
2266
2267 if (chopt == "standDee" || chopt == "standStex" || chopt == "standGH") {
2268 snprintf(f_in, fgMaxCar, " Dee: %d (%s) ", DeeNumber, DeeType.Data());
2269 com_top_left->AddText(f_in);
2270 }
2271
2272 return com_top_left;
2273 }
2274
2275 TPaveText* TEcnaParHistos::SetPaveSC(const Int_t& DeeSC_X, const Int_t& DeeNumber) {
2276
2277
2278 char f_in[fgMaxCar];
2279
2280 Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
2281 Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
2282 Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EE");
2283 Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EE");
2284 TPaveText* com_top_mid = new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas, pav_top_mid_xdroite, pav_top_mid_yhaut);
2285 fCnewRoot++;
2286
2287
2288 Int_t cTextPaveAlign = 12;
2289 com_top_mid->SetTextAlign(cTextPaveAlign);
2290
2291 Int_t cTextPaveFont = 100;
2292 com_top_mid->SetTextFont(cTextPaveFont);
2293
2294 Float_t cTextPaveSize = 0.03;
2295 com_top_mid->SetTextSize(cTextPaveSize);
2296 Int_t cTextBorderSize = 1;
2297 com_top_mid->SetBorderSize(cTextBorderSize);
2298
2299 snprintf(f_in,
2300 fgMaxCar,
2301 "Sector: S%d, SC: %d",
2302 fEcalNumbering->GetDSFrom1DeeSCEcna(DeeNumber, DeeSC_X),
2303 fEcalNumbering->GetDSSCFrom1DeeSCEcna(DeeNumber, DeeSC_X));
2304 com_top_mid->AddText(f_in);
2305 snprintf(f_in, fgMaxCar, "SC for const.: %d", fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(DeeNumber, DeeSC_X));
2306 com_top_mid->AddText(f_in);
2307 snprintf(f_in, fgMaxCar, "Quadrant: %s", fEcalNumbering->GetSCQuadFrom1DeeSCEcna(DeeSC_X).Data());
2308 com_top_mid->AddText(f_in);
2309
2310 return com_top_mid;
2311 }
2312
2313 TPaveText* TEcnaParHistos::SetPaveSCsXY(const Int_t& DeeSC_X, const Int_t& DeeSC_Y) {
2314
2315
2316 char f_in[fgMaxCar];
2317
2318 Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
2319 Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
2320 Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EE");
2321 Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EE");
2322 TPaveText* com_top_mid = new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas, pav_top_mid_xdroite, pav_top_mid_yhaut);
2323 fCnewRoot++;
2324
2325
2326 Int_t cTextPaveAlign = 12;
2327 com_top_mid->SetTextAlign(cTextPaveAlign);
2328
2329 Int_t cTextPaveFont = 100;
2330 com_top_mid->SetTextFont(cTextPaveFont);
2331
2332 Float_t cTextPaveSize = 0.03;
2333 com_top_mid->SetTextSize(cTextPaveSize);
2334 Int_t cTextBorderSize = 1;
2335 com_top_mid->SetBorderSize(cTextBorderSize);
2336
2337 snprintf(f_in, fgMaxCar, "SC X: %d", DeeSC_X);
2338 com_top_mid->AddText(f_in);
2339 snprintf(f_in, fgMaxCar, "SC Y: %d", DeeSC_Y);
2340 com_top_mid->AddText(f_in);
2341
2342 return com_top_mid;
2343 }
2344
2345 TPaveText* TEcnaParHistos::SetPaveCxyz(const Int_t& DeeNumber) {
2346
2347
2348
2349 Double_t pav_bot_xgauche = BoxRightX("bottom_mid_box");
2350 Double_t pav_bot_xdroite = BoxLeftX("bottom_mid_box");
2351 Double_t pav_bot_ybas = BoxBottomY("bottom_left_box");
2352 Double_t pav_bot_yhaut = BoxTopY("bottom_left_box");
2353 TPaveText* com_bot_mid = new TPaveText(pav_bot_xgauche, pav_bot_ybas, pav_bot_xdroite, pav_bot_yhaut);
2354 fCnewRoot++;
2355
2356
2357
2358
2359
2360 com_bot_mid->SetTextSize(0.0325);
2361
2362 if (DeeNumber == 1) {
2363 com_bot_mid->AddText(" y ");
2364 com_bot_mid->AddText(" #uparrow ");
2365 com_bot_mid->AddText(" (Near) x #leftarrow #otimes z (Far) ");
2366 }
2367 if (DeeNumber == 2) {
2368 com_bot_mid->AddText(" y ");
2369 com_bot_mid->AddText(" #uparrow ");
2370 com_bot_mid->AddText(" (Near) x #leftarrow #otimes z (Far) ");
2371 }
2372 if (DeeNumber == 3) {
2373 com_bot_mid->AddText(" y ");
2374 com_bot_mid->AddText(" #uparrow ");
2375 com_bot_mid->AddText(" (Far) z (#bullet) #rightarrow x (Near) ");
2376 }
2377 if (DeeNumber == 4) {
2378 com_bot_mid->AddText(" y ");
2379 com_bot_mid->AddText(" #uparrow ");
2380 com_bot_mid->AddText(" (Far) z (#bullet) #rightarrow x (Near) ");
2381 }
2382
2383
2384 return com_bot_mid;
2385 }
2386
2387
2388
2389
2390
2391
2392 TPaveText* TEcnaParHistos::SetPaveStex(const TString& chopt, const Int_t& StexNumber) {
2393 TPaveText* pav_text = nullptr;
2394
2395 if (StexNumber > 0) {
2396 if (fFlagSubDet == "EB") {
2397 TString EB_type = fEcalNumbering->GetSMHalfBarrel(StexNumber);
2398 pav_text = SetPaveSM(chopt, StexNumber, EB_type);
2399 }
2400 if (fFlagSubDet == "EE") {
2401 TString dee_type = fEcalNumbering->GetEEDeeType(StexNumber);
2402 pav_text = SetPaveDee(chopt, StexNumber, dee_type);
2403 }
2404 }
2405 if (StexNumber == 0) {
2406 pav_text = SetPaveStas();
2407 }
2408
2409 return pav_text;
2410 }
2411
2412 TPaveText* TEcnaParHistos::SetPaveStin(const Int_t& StinNumber, const Int_t& StexNumber) {
2413 TPaveText* pav_text = nullptr;
2414 if (fFlagSubDet == "EB") {
2415 pav_text = SetPaveTower(StinNumber);
2416 }
2417 if (fFlagSubDet == "EE") {
2418 pav_text = SetPaveSC(StinNumber, StexNumber);
2419 }
2420 return pav_text;
2421 }
2422
2423 TPaveText* TEcnaParHistos::SetPaveStinsXY(const Int_t& StexStin_X, const Int_t& StexStin_Y) {
2424 TPaveText* pav_text = nullptr;
2425 if (fFlagSubDet == "EB") {
2426 pav_text = SetPaveTowersXY(StexStin_X, StexStin_Y);
2427 }
2428 if (fFlagSubDet == "EE") {
2429 pav_text = SetPaveSCsXY(StexStin_X, StexStin_Y);
2430 }
2431 return pav_text;
2432 }
2433
2434
2435
2436
2437
2438
2439 TString TEcnaParHistos::GetHistoType(const TString& HistoCode) {
2440
2441
2442
2443 TString HistoType;
2444 Int_t MaxCar = fgMaxCar;
2445 HistoType.Resize(MaxCar);
2446 HistoType = "(no quantity type info)";
2447
2448
2449 if (HistoCode == "D_NOE_ChNb" || HistoCode == "D_Ped_ChNb" || HistoCode == "D_TNo_ChNb" ||
2450 HistoCode == "D_LFN_ChNb" || HistoCode == "D_HFN_ChNb" || HistoCode == "D_MCs_ChNb" ||
2451 HistoCode == "D_SCs_ChNb") {
2452 HistoType = "Global";
2453 }
2454
2455
2456
2457 if (HistoCode == "D_NOE_ChDs" || HistoCode == "D_Ped_ChDs" || HistoCode == "D_TNo_ChDs" ||
2458 HistoCode == "D_LFN_ChDs" || HistoCode == "D_HFN_ChDs" || HistoCode == "D_MCs_ChDs" ||
2459 HistoCode == "D_SCs_ChDs") {
2460 HistoType = "Proj";
2461 }
2462
2463
2464 if (HistoCode == "D_MSp_SpNb" || HistoCode == "D_SSp_SpNb") {
2465 HistoType = "H1Basic";
2466 }
2467
2468
2469 if (HistoCode == "D_MSp_SpDs" || HistoCode == "D_SSp_SpDs") {
2470 HistoType = "H1BasicProj";
2471 }
2472
2473
2474 if (HistoCode == "D_Adc_EvNb") {
2475 HistoType = "SampGlobal";
2476 }
2477
2478 if (HistoCode == "D_Adc_EvDs") {
2479 HistoType = "SampProj";
2480 }
2481
2482
2483 if (HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" || HistoCode == "H_MCs_Date" ||
2484 HistoCode == "H_LFN_Date" || HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date") {
2485 HistoType = "Evol";
2486 }
2487
2488
2489 if (HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" || HistoCode == "H_MCs_RuDs" ||
2490 HistoCode == "H_LFN_RuDs" || HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs") {
2491 HistoType = "EvolProj";
2492 }
2493
2494 return HistoType;
2495 }
2496
2497 TString TEcnaParHistos::GetXVarHisto(const TString& HistoCode, const TString& SubDet, const Int_t& StexNumber) {
2498
2499
2500
2501 TString HistoType = GetHistoType(HistoCode.Data());
2502
2503 TString XVarHisto;
2504 Int_t MaxCar = fgMaxCar;
2505 XVarHisto.Resize(MaxCar);
2506 XVarHisto = "(no X variable info)";
2507
2508 if (HistoType == "Global") {
2509 if (StexNumber == 0 && SubDet == "EB") {
2510 XVarHisto = "Tower number";
2511 }
2512 if (StexNumber == 0 && SubDet == "EE") {
2513 XVarHisto = "SC number";
2514 }
2515 if (StexNumber != 0) {
2516 XVarHisto = "Xtal number";
2517 }
2518 }
2519 if (HistoType == "Proj") {
2520 XVarHisto = "Bin number";
2521 }
2522
2523 if (HistoType == "H1Basic") {
2524 XVarHisto = "Sample number";
2525 }
2526 if (HistoType == "H1BasicProj") {
2527 XVarHisto = "Total noise";
2528 }
2529
2530 if (HistoType == "SampGlobal") {
2531 XVarHisto = "Event number";
2532 }
2533
2534 if (HistoType == "SampProj") {
2535 XVarHisto = "ADC count";
2536 }
2537
2538 if (HistoType == "Evol") {
2539 XVarHisto = "Date";
2540 }
2541
2542 if (HistoType == "EvolProj") {
2543 XVarHisto = "Bin number";
2544 }
2545
2546 return XVarHisto;
2547
2548 }
2549
2550 TString TEcnaParHistos::GetYVarHisto(const TString& HistoCode, const TString& SubDet, const Int_t& StexNumber) {
2551
2552
2553
2554 TString HistoType = GetHistoType(HistoCode.Data());
2555
2556 TString YVarHisto;
2557 Int_t MaxCar = fgMaxCar;
2558 YVarHisto.Resize(MaxCar);
2559 YVarHisto = "(no Y variable info)";
2560
2561 if (HistoType == "Global") {
2562 if (HistoCode == "D_NOE_ChNb") {
2563 YVarHisto = "Nb of events";
2564 }
2565 if (HistoCode == "D_Ped_ChNb") {
2566 YVarHisto = "Pedestal";
2567 }
2568 if (HistoCode == "D_TNo_ChNb") {
2569 YVarHisto = "Total Noise";
2570 }
2571 if (HistoCode == "D_MCs_ChNb") {
2572 YVarHisto = "Mean Cor(s,s')";
2573 }
2574 if (HistoCode == "D_LFN_ChNb") {
2575 YVarHisto = "Low Freq. Noise";
2576 }
2577 if (HistoCode == "D_HFN_ChNb") {
2578 YVarHisto = "High Freq. Noise";
2579 }
2580 if (HistoCode == "D_SCs_ChNb") {
2581 YVarHisto = "Sigma Cor(s,s')";
2582 }
2583 }
2584
2585 if (HistoType == "Proj") {
2586 if (StexNumber == 0 && SubDet == "EB") {
2587 YVarHisto = "Number of towers";
2588 }
2589 if (StexNumber == 0 && SubDet == "EE") {
2590 YVarHisto = "Number of SCs";
2591 }
2592 if (StexNumber != 0) {
2593 YVarHisto = "Number of Xtals";
2594 }
2595 }
2596
2597 if (HistoType == "H1Basic") {
2598 YVarHisto = "ADC count";
2599 }
2600 if (HistoType == "H1BasicProj") {
2601 YVarHisto = "Number of samples";
2602 }
2603
2604 if (HistoType == "SampGlobal") {
2605 YVarHisto = "ADC count";
2606 }
2607
2608 if (HistoType == "SampProj") {
2609 YVarHisto = "Number of events";
2610 }
2611
2612 if (HistoType == "EvolProj") {
2613 YVarHisto = "Number of runs";
2614 }
2615
2616 if (HistoType == "Evol") {
2617 if (HistoCode == "H_Ped_Date") {
2618 YVarHisto = "Pedestal";
2619 }
2620 if (HistoCode == "H_TNo_Date") {
2621 YVarHisto = "Total Noise";
2622 }
2623 if (HistoCode == "H_MCs_Date") {
2624 YVarHisto = "Mean Cor(s,s')";
2625 }
2626 if (HistoCode == "H_LFN_Date") {
2627 YVarHisto = "Low Freq. Noise";
2628 }
2629 if (HistoCode == "H_HFN_Date") {
2630 YVarHisto = "High Freq. Noise";
2631 }
2632 if (HistoCode == "H_SCs_Date") {
2633 YVarHisto = "Sigma Cor(s,s')";
2634 }
2635 }
2636
2637
2638
2639
2640
2641
2642 return YVarHisto;
2643
2644 }
2645
2646 TString TEcnaParHistos::GetQuantityName(const TString& chqcode) {
2647
2648
2649 TString chqname;
2650 Int_t MaxCar = fgMaxCar;
2651 chqname.Resize(MaxCar);
2652 chqname = "(no quantity name info)";
2653
2654 if (chqcode == "D_NOE_ChNb") {
2655 chqname = "Number of events";
2656 }
2657 if (chqcode == "D_NOE_ChDs") {
2658 chqname = "Nb of events";
2659 }
2660 if (chqcode == "D_Ped_ChNb") {
2661 chqname = "Pedestal";
2662 }
2663 if (chqcode == "D_Ped_ChDs") {
2664 chqname = "Pedestal";
2665 }
2666 if (chqcode == "D_TNo_ChNb") {
2667 chqname = "Total Noise";
2668 }
2669 if (chqcode == "D_TNo_ChDs") {
2670 chqname = "Total Noise";
2671 }
2672 if (chqcode == "D_MCs_ChNb") {
2673 chqname = "Mean Cor(s,s')";
2674 }
2675 if (chqcode == "D_MCs_ChDs") {
2676 chqname = "Mean Cor(s,s')";
2677 }
2678 if (chqcode == "D_LFN_ChNb") {
2679 chqname = "Low Freq. Noise";
2680 }
2681 if (chqcode == "D_LFN_ChDs") {
2682 chqname = "Low Freq. Noise";
2683 }
2684 if (chqcode == "D_HFN_ChNb") {
2685 chqname = "High Freq. Noise";
2686 }
2687 if (chqcode == "D_HFN_ChDs") {
2688 chqname = "High Freq. Noise";
2689 }
2690 if (chqcode == "D_SCs_ChNb") {
2691 chqname = "Sigma Cor(s,s')";
2692 }
2693 if (chqcode == "D_SCs_ChDs") {
2694 chqname = "Sigma Cor(s,s')";
2695 }
2696 if (chqcode == "D_MSp_SpNb") {
2697 chqname = "Sample means";
2698 }
2699 if (chqcode == "D_MSp_SpDs") {
2700 chqname = "Sample means";
2701 }
2702 if (chqcode == "D_SSp_SpNb") {
2703 chqname = "Sample sigmas";
2704 }
2705 if (chqcode == "D_SSp_SpDs") {
2706 chqname = "Sample sigmas";
2707 }
2708 if (chqcode == "D_Adc_EvNb") {
2709 chqname = "Sample ADC";
2710 }
2711 if (chqcode == "D_Adc_EvDs") {
2712 chqname = "Sample ADC distribution";
2713 }
2714 if (chqcode == "H_Ped_Date") {
2715 chqname = "Pedestal";
2716 }
2717 if (chqcode == "H_TNo_Date") {
2718 chqname = "Total Noise";
2719 }
2720 if (chqcode == "H_MCs_Date") {
2721 chqname = "Mean Cor(s,s')";
2722 }
2723 if (chqcode == "H_LFN_Date") {
2724 chqname = "Low Freq. Noise";
2725 }
2726 if (chqcode == "H_HFN_Date") {
2727 chqname = "High Freq. Noise";
2728 }
2729 if (chqcode == "H_SCs_Date") {
2730 chqname = "Sigma Cor(s,s')";
2731 }
2732 if (chqcode == "H_Ped_RuDs") {
2733 chqname = "Pedestal";
2734 }
2735 if (chqcode == "H_TNo_RuDs") {
2736 chqname = "Total Noise";
2737 }
2738 if (chqcode == "H_MCs_RuDs") {
2739 chqname = "Mean Cor(s,s')";
2740 }
2741 if (chqcode == "H_LFN_RuDs") {
2742 chqname = "Low Freq. Noise";
2743 }
2744 if (chqcode == "H_HFN_RuDs") {
2745 chqname = "High Freq. Noise";
2746 }
2747 if (chqcode == "H_SCs_RuDs") {
2748 chqname = "Sigma Cor(s,s')";
2749 }
2750 return chqname;
2751 }
2752
2753 Double_t TEcnaParHistos::GetYminDefaultValue(const TString& chqcode) {
2754 Double_t vmin = (Double_t)0.;
2755
2756 if (chqcode == "H2LFccMosMatrix") {
2757 vmin = (Double_t)-1.;
2758 }
2759 if (chqcode == "H2HFccMosMatrix") {
2760 vmin = (Double_t)-1.;
2761 }
2762 if (chqcode == "H2CorccInStins") {
2763 vmin = (Double_t)-1.;
2764 }
2765
2766 if (chqcode == "D_NOE_ChNb") {
2767 vmin = (Double_t)0.;
2768 }
2769 if (chqcode == "D_Ped_ChNb") {
2770 vmin = (Double_t)0.;
2771 }
2772 if (chqcode == "D_TNo_ChNb") {
2773 vmin = (Double_t)0.;
2774 }
2775 if (chqcode == "D_MCs_ChNb") {
2776 vmin = (Double_t)-1.;
2777 }
2778 if (chqcode == "D_LFN_ChNb") {
2779 vmin = (Double_t)0.;
2780 }
2781 if (chqcode == "D_HFN_ChNb") {
2782 vmin = (Double_t)0.;
2783 }
2784 if (chqcode == "D_SCs_ChNb") {
2785 vmin = (Double_t)-1.;
2786 }
2787
2788 if (chqcode == "D_NOE_ChDs") {
2789 vmin = (Double_t)0.1;
2790 }
2791 if (chqcode == "D_Ped_ChDs") {
2792 vmin = (Double_t)0.1;
2793 }
2794 if (chqcode == "D_TNo_ChDs") {
2795 vmin = (Double_t)0.1;
2796 }
2797 if (chqcode == "D_MCs_ChDs") {
2798 vmin = (Double_t)0.1;
2799 }
2800 if (chqcode == "D_LFN_ChDs") {
2801 vmin = (Double_t)0.1;
2802 }
2803 if (chqcode == "D_HFN_ChDs") {
2804 vmin = (Double_t)0.1;
2805 }
2806 if (chqcode == "D_SCs_ChDs") {
2807 vmin = (Double_t)0.1;
2808 }
2809
2810 if (chqcode == "D_MSp_SpNb") {
2811 vmin = (Double_t)0.;
2812 }
2813 if (chqcode == "D_MSp_SpDs") {
2814 vmin = (Double_t)0.1;
2815 }
2816 if (chqcode == "D_SSp_SpNb") {
2817 vmin = (Double_t)0.;
2818 }
2819 if (chqcode == "D_SSp_SpDs") {
2820 vmin = (Double_t)0.1;
2821 }
2822
2823 if (chqcode == "D_Adc_EvNb") {
2824 vmin = (Double_t)0.;
2825 }
2826 if (chqcode == "D_Adc_EvDs") {
2827 vmin = (Double_t)0.1;
2828 }
2829
2830 if (chqcode == "H_Ped_Date") {
2831 vmin = (Double_t)0.;
2832 }
2833 if (chqcode == "H_TNo_Date") {
2834 vmin = (Double_t)0.;
2835 }
2836 if (chqcode == "H_MCs_Date") {
2837 vmin = (Double_t)-1.;
2838 }
2839 if (chqcode == "H_LFN_Date") {
2840 vmin = (Double_t)0.;
2841 }
2842 if (chqcode == "H_HFN_Date") {
2843 vmin = (Double_t)0.;
2844 }
2845 if (chqcode == "H_SCs_Date") {
2846 vmin = (Double_t)0.;
2847 }
2848
2849 if (chqcode == "H_Ped_RuDs") {
2850 vmin = (Double_t)0.1;
2851 }
2852 if (chqcode == "H_TNo_RuDs") {
2853 vmin = (Double_t)0.1;
2854 }
2855 if (chqcode == "H_MCs_RuDs") {
2856 vmin = (Double_t)0.1;
2857 }
2858 if (chqcode == "H_LFN_RuDs") {
2859 vmin = (Double_t)0.1;
2860 }
2861 if (chqcode == "H_HFN_RuDs") {
2862 vmin = (Double_t)0.1;
2863 }
2864 if (chqcode == "H_SCs_RuDs") {
2865 vmin = (Double_t)0.1;
2866 }
2867
2868 return vmin;
2869 }
2870
2871 Double_t TEcnaParHistos::GetYmaxDefaultValue(const TString& chqcode) {
2872 Double_t vmax = (Double_t)0.;
2873
2874 if (fFlagSubDet == "EB") {
2875 if (chqcode == "H2LFccMosMatrix") {
2876 vmax = (Double_t)1.;
2877 }
2878 if (chqcode == "H2HFccMosMatrix") {
2879 vmax = (Double_t)1.;
2880 }
2881 if (chqcode == "H2CorccInStins") {
2882 vmax = (Double_t)1.;
2883 }
2884
2885 if (chqcode == "D_NOE_ChNb") {
2886 vmax = (Double_t)500.;
2887 }
2888 if (chqcode == "D_Ped_ChNb") {
2889 vmax = (Double_t)500.;
2890 }
2891 if (chqcode == "D_TNo_ChNb") {
2892 vmax = (Double_t)2.5;
2893 }
2894 if (chqcode == "D_LFN_ChNb") {
2895 vmax = (Double_t)2.5;
2896 }
2897 if (chqcode == "D_HFN_ChNb") {
2898 vmax = (Double_t)2.5;
2899 }
2900 if (chqcode == "D_MCs_ChNb") {
2901 vmax = (Double_t)1.;
2902 }
2903 if (chqcode == "D_SCs_ChNb") {
2904 vmax = (Double_t)1.5;
2905 }
2906
2907 if (chqcode == "D_NOE_ChDs") {
2908 vmax = (Double_t)5000.;
2909 }
2910 if (chqcode == "D_Ped_ChDs") {
2911 vmax = (Double_t)5000.;
2912 }
2913 if (chqcode == "D_TNo_ChDs") {
2914 vmax = (Double_t)5000.;
2915 }
2916 if (chqcode == "D_LFN_ChDs") {
2917 vmax = (Double_t)5000.;
2918 }
2919 if (chqcode == "D_HFN_ChDs") {
2920 vmax = (Double_t)5000.;
2921 }
2922 if (chqcode == "D_MCs_ChDs") {
2923 vmax = (Double_t)5000.;
2924 }
2925 if (chqcode == "D_SCs_ChDs") {
2926 vmax = (Double_t)5000.;
2927 }
2928
2929 if (chqcode == "D_MSp_SpNb") {
2930 vmax = (Double_t)500.;
2931 }
2932 if (chqcode == "D_MSp_SpDs") {
2933 vmax = (Double_t)10.;
2934 }
2935 if (chqcode == "D_SSp_SpNb") {
2936 vmax = (Double_t)5.;
2937 }
2938 if (chqcode == "D_SSp_SpDs") {
2939 vmax = (Double_t)10.;
2940 }
2941
2942 if (chqcode == "D_Adc_EvNb") {
2943 vmax = (Double_t)500.;
2944 }
2945 if (chqcode == "D_Adc_EvDs") {
2946 vmax = (Double_t)150.;
2947 }
2948
2949 if (chqcode == "H_Ped_Date") {
2950 vmax = (Double_t)500.;
2951 }
2952 if (chqcode == "H_TNo_Date") {
2953 vmax = (Double_t)5.;
2954 }
2955 if (chqcode == "H_LFN_Date") {
2956 vmax = (Double_t)5.;
2957 }
2958 if (chqcode == "H_HFN_Date") {
2959 vmax = (Double_t)5.;
2960 }
2961 if (chqcode == "H_MCs_Date") {
2962 vmax = (Double_t)1.;
2963 }
2964 if (chqcode == "H_SCs_Date") {
2965 vmax = (Double_t)0.5;
2966 }
2967
2968 if (chqcode == "H_Ped_RuDs") {
2969 vmax = (Double_t)1000.;
2970 }
2971 if (chqcode == "H_TNo_RuDs") {
2972 vmax = (Double_t)1000.;
2973 }
2974 if (chqcode == "H_LFN_RuDs") {
2975 vmax = (Double_t)1000.;
2976 }
2977 if (chqcode == "H_HFN_RuDs") {
2978 vmax = (Double_t)1000.;
2979 }
2980 if (chqcode == "H_MCs_RuDs") {
2981 vmax = (Double_t)1000.;
2982 }
2983 if (chqcode == "H_SCs_RuDs") {
2984 vmax = (Double_t)1000.;
2985 }
2986 }
2987
2988 if (fFlagSubDet == "EE") {
2989 if (chqcode == "H2LFccMosMatrix") {
2990 vmax = (Double_t)1.;
2991 }
2992 if (chqcode == "H2HFccMosMatrix") {
2993 vmax = (Double_t)1.;
2994 }
2995 if (chqcode == "H2CorccInStins") {
2996 vmax = (Double_t)0.05;
2997 }
2998
2999 if (chqcode == "D_NOE_ChNb") {
3000 vmax = (Double_t)500.;
3001 }
3002 if (chqcode == "D_Ped_ChNb") {
3003 vmax = (Double_t)500.;
3004 }
3005 if (chqcode == "D_TNo_ChNb") {
3006 vmax = (Double_t)5.;
3007 }
3008 if (chqcode == "D_LFN_ChNb") {
3009 vmax = (Double_t)5.;
3010 }
3011 if (chqcode == "D_HFN_ChNb") {
3012 vmax = (Double_t)5.;
3013 }
3014 if (chqcode == "D_MCs_ChNb") {
3015 vmax = (Double_t)1.;
3016 }
3017 if (chqcode == "D_SCs_ChNb") {
3018 vmax = (Double_t)2.5;
3019 }
3020
3021 if (chqcode == "D_NOE_ChDs") {
3022 vmax = (Double_t)1000.;
3023 }
3024 if (chqcode == "D_Ped_ChDs") {
3025 vmax = (Double_t)1000.;
3026 }
3027 if (chqcode == "D_TNo_ChDs") {
3028 vmax = (Double_t)1000.;
3029 }
3030 if (chqcode == "D_LFN_ChDs") {
3031 vmax = (Double_t)1000.;
3032 }
3033 if (chqcode == "D_HFN_ChDs") {
3034 vmax = (Double_t)1000.;
3035 }
3036 if (chqcode == "D_MCs_ChDs") {
3037 vmax = (Double_t)1000.;
3038 }
3039 if (chqcode == "D_SCs_ChDs") {
3040 vmax = (Double_t)1000.;
3041 }
3042
3043 if (chqcode == "D_MSp_SpNb") {
3044 vmax = (Double_t)500.;
3045 }
3046 if (chqcode == "D_MSp_SpDs") {
3047 vmax = (Double_t)1000.;
3048 }
3049 if (chqcode == "D_SSp_SpNb") {
3050 vmax = (Double_t)5.;
3051 }
3052 if (chqcode == "D_SSp_SpDs") {
3053 vmax = (Double_t)100.;
3054 }
3055
3056 if (chqcode == "D_Adc_EvNb") {
3057 vmax = (Double_t)500.;
3058 }
3059 if (chqcode == "D_Adc_EvDs") {
3060 vmax = (Double_t)1000.;
3061 }
3062
3063 if (chqcode == "H_Ped_Date") {
3064 vmax = (Double_t)500.;
3065 }
3066 if (chqcode == "H_TNo_Date") {
3067 vmax = (Double_t)5.;
3068 }
3069 if (chqcode == "H_LFN_Date") {
3070 vmax = (Double_t)5.;
3071 }
3072 if (chqcode == "H_HFN_Date") {
3073 vmax = (Double_t)5.;
3074 }
3075 if (chqcode == "H_MCs_Date") {
3076 vmax = (Double_t)1.;
3077 }
3078 if (chqcode == "H_SCs_Date") {
3079 vmax = (Double_t)0.5;
3080 }
3081
3082 if (chqcode == "H_Ped_RuDs") {
3083 vmax = (Double_t)1000.;
3084 }
3085 if (chqcode == "H_TNo_RuDs") {
3086 vmax = (Double_t)1000.;
3087 }
3088 if (chqcode == "H_LFN_RuDs") {
3089 vmax = (Double_t)1000.;
3090 }
3091 if (chqcode == "H_HFN_RuDs") {
3092 vmax = (Double_t)1000.;
3093 }
3094 if (chqcode == "H_MCs_RuDs") {
3095 vmax = (Double_t)1000.;
3096 }
3097 if (chqcode == "H_SCs_RuDs") {
3098 vmax = (Double_t)1000.;
3099 }
3100 }
3101 return vmax;
3102 }
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112 TString TEcnaParHistos::BuildStandardDetectorCode(const TString& UserDetector) {
3113 TString StandardDetectorCode = "?";
3114
3115 if (UserDetector == "Super-module" || UserDetector == "SuperModule" || UserDetector == "super-module" ||
3116 UserDetector == "SM" || UserDetector == " " || UserDetector == "")
3117 {
3118 StandardDetectorCode = "SM";
3119 }
3120
3121 if (UserDetector == "DEE" || UserDetector == "Dee") {
3122 StandardDetectorCode = "Dee";
3123 }
3124
3125 if (UserDetector == "Ecal barrel" || UserDetector == "EcalBarrel" || UserDetector == "ecal barrel" ||
3126 UserDetector == "Barrel" || UserDetector == "barrel" || UserDetector == "EB") {
3127 StandardDetectorCode = "EB";
3128 }
3129
3130 if (UserDetector == "Ecal endcap" || UserDetector == "EcalEndcap" || UserDetector == "ecal endcap" ||
3131 UserDetector == "Endcap" || UserDetector == "endcap" || UserDetector == "EE") {
3132 StandardDetectorCode = "EE";
3133 }
3134
3135 if (StandardDetectorCode == "?") {
3136 std::cout << "*TEcnaParHistos::BuildStandardDetectorCode(...)> UserDetector = " << UserDetector
3137 << " : code not found." << fTTBELL << std::endl;
3138
3139 ListOfStandardCodes("DetectorCode");
3140 }
3141 return StandardDetectorCode;
3142 }
3143
3144
3145 TString TEcnaParHistos::BuildStandardPlotOption(const TString& CallingMethod, const TString& UserPlotOption) {
3146 TString StandardPlotOption = "?";
3147
3148 if (CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time") {
3149 if (UserPlotOption == "ONLY ONE" || UserPlotOption == "only one" || UserPlotOption == "onlyone" ||
3150 UserPlotOption == "Only one" || UserPlotOption == "OnlyOne" || UserPlotOption == "ONLYONE" ||
3151 UserPlotOption == fOnlyOnePlot || UserPlotOption == " " || UserPlotOption == "")
3152 {
3153 StandardPlotOption = fOnlyOnePlot;
3154 }
3155
3156 if (UserPlotOption == "SAME" || UserPlotOption == "Same" || UserPlotOption == fSeveralPlot) {
3157 StandardPlotOption = fSeveralPlot;
3158 }
3159
3160 if (UserPlotOption == "SAME n" || UserPlotOption == "Same n" || UserPlotOption == fSameOnePlot) {
3161 StandardPlotOption = fSameOnePlot;
3162 }
3163
3164 if (UserPlotOption == fAllXtalsInStinPlot)
3165 {
3166 StandardPlotOption = fAllXtalsInStinPlot;
3167 }
3168 }
3169
3170 if (CallingMethod == "1DX") {
3171 if (UserPlotOption == "ALL XTALS IN TOWER" || UserPlotOption == "ALL CHANNELS IN TOWER" ||
3172 UserPlotOption == "AllXtalsInTower" || UserPlotOption == "AllChannelsInTower" ||
3173 UserPlotOption == "ALL XTALS IN TOW" || UserPlotOption == "ALL CHANNELS IN TOW" ||
3174 UserPlotOption == "AllXtalsInTow" || UserPlotOption == "AllChannelsInTow" ||
3175 UserPlotOption == "ALL XTALS IN SC" || UserPlotOption == "ALL CHANNELS IN SC" ||
3176 UserPlotOption == "AllXtalsInSC" || UserPlotOption == "AllChannelsInSC" || UserPlotOption == "SAME IN TOWER" ||
3177 UserPlotOption == "SameInTower" || UserPlotOption == "SAME IN TOW" || UserPlotOption == "SameInTow" ||
3178 UserPlotOption == "SAME IN SC" || UserPlotOption == "SameInSC" || UserPlotOption == "Same in tower" ||
3179 UserPlotOption == "Same in tow" || UserPlotOption == "Same in SC" || UserPlotOption == "SameInSC" ||
3180 UserPlotOption == fAllXtalsInStinPlot || UserPlotOption == " " || UserPlotOption == "")
3181 {
3182 StandardPlotOption = fAllXtalsInStinPlot;
3183 }
3184 }
3185
3186 if (CallingMethod == "2D") {
3187 if (UserPlotOption == "COLZ" || UserPlotOption == " " || UserPlotOption == "")
3188 {
3189 StandardPlotOption = "COLZ";
3190 }
3191 if (UserPlotOption == "BOX") {
3192 StandardPlotOption = "BOX";
3193 }
3194 if (UserPlotOption == "TEXT") {
3195 StandardPlotOption = "TEXT";
3196 }
3197 if (UserPlotOption == "CONTZ") {
3198 StandardPlotOption = "CONTZ";
3199 }
3200 if (UserPlotOption == "LEGO2Z") {
3201 StandardPlotOption = "LEGO2Z";
3202 }
3203 if (UserPlotOption == "SURF1Z") {
3204 StandardPlotOption = "SURF1Z";
3205 }
3206 if (UserPlotOption == "SURF2Z") {
3207 StandardPlotOption = "SURF2Z";
3208 }
3209 if (UserPlotOption == "SURF3Z") {
3210 StandardPlotOption = "SURF3Z";
3211 }
3212 if (UserPlotOption == "SURF4") {
3213 StandardPlotOption = "SURF4";
3214 }
3215 if (UserPlotOption == "ASCII") {
3216 StandardPlotOption = "ASCII";
3217 }
3218 }
3219
3220
3221 if (StandardPlotOption == "?") {
3222 std::cout << "*TEcnaParHistos::BuildStandardPlotOption(...)> UserPlotOption = " << UserPlotOption
3223 << " : code not found." << fTTBELL << std::endl;
3224
3225 ListOfStandardCodes("PlotOption");
3226 }
3227 return StandardPlotOption;
3228 }
3229
3230
3231 TString TEcnaParHistos::BuildStandard1DHistoCodeX(const TString& CallingMethod, const TString& UserHistoCode) {
3232
3233 TString StandardHistoCode = "?";
3234 if (CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time") {
3235
3236 if (UserHistoCode == "Tower" || UserHistoCode == "tower" || UserHistoCode == "tow" ||
3237 UserHistoCode == "Tower number" || UserHistoCode == "tower number" || UserHistoCode == "tow nb" ||
3238 UserHistoCode == "Tower#" || UserHistoCode == "tower#" || UserHistoCode == "tow#" || UserHistoCode == "Tow#" ||
3239 UserHistoCode == "Tow") {
3240 StandardHistoCode = "Tow";
3241 }
3242
3243 if (UserHistoCode == "Super crystal" || UserHistoCode == "SuperCrystal" || UserHistoCode == "SuperXtal" ||
3244 UserHistoCode == "Super crystal number" || UserHistoCode == "SuperCrystalNumber" ||
3245 UserHistoCode == "SuperXtalNumber" || UserHistoCode == "Super crystal nb" || UserHistoCode == "SuperCrystal#" ||
3246 UserHistoCode == "SuperXtal#" || UserHistoCode == "SC#" || UserHistoCode == "SC") {
3247 StandardHistoCode = "SC";
3248 }
3249
3250 if (UserHistoCode == "Crystal" || UserHistoCode == "crystal" || UserHistoCode == "Xtal" ||
3251 UserHistoCode == "Crystal number" || UserHistoCode == "crystal number" || UserHistoCode == "Xtal number" ||
3252 UserHistoCode == "Crystal#" || UserHistoCode == "crystal#" || UserHistoCode == "Xtal#" ||
3253 UserHistoCode == "Xtal") {
3254 StandardHistoCode = "Xtal";
3255 }
3256
3257 if (StandardHistoCode == "Tow" || StandardHistoCode == "SC" || StandardHistoCode == "Xtal") {
3258 StandardHistoCode = "XtalORStin";
3259 }
3260
3261 if (UserHistoCode == "Sample number" || UserHistoCode == "SampleNumber" || UserHistoCode == "Sample#" ||
3262 UserHistoCode == "Samp#" || UserHistoCode == "Sample" || UserHistoCode == "sample" || UserHistoCode == "Smp") {
3263 StandardHistoCode = "Smp";
3264 }
3265
3266 if (UserHistoCode == "Event" || UserHistoCode == "event" || UserHistoCode == "Event number" ||
3267 UserHistoCode == "event number" || UserHistoCode == "EventNumber" || UserHistoCode == "Event#" ||
3268 UserHistoCode == "EvtNumber" || UserHistoCode == "Evt#" || UserHistoCode == "Evt number" ||
3269 UserHistoCode == "evt number" || UserHistoCode == "Evt") {
3270 StandardHistoCode = "Evt";
3271 }
3272
3273
3274 if (StandardHistoCode == "?") {
3275 StandardHistoCode = BuildStandard1DHistoCodeXY(UserHistoCode);
3276 }
3277 }
3278
3279
3280 if (StandardHistoCode == "?") {
3281 std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeX(...)> UserHistoCode = " << UserHistoCode
3282 << " : code not found." << fTTBELL << std::endl;
3283
3284 ListOfStandardCodes("1DHistoCodeX");
3285 }
3286 return StandardHistoCode;
3287 }
3288
3289
3290 TString TEcnaParHistos::BuildStandard1DHistoCodeY(const TString& CallingMethod, const TString& UserHistoCode) {
3291
3292 TString StandardHistoCode = "?";
3293
3294 if (CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time") {
3295
3296 if (UserHistoCode == "Number of crystals" || UserHistoCode == "NumberOfCrystals" ||
3297 UserHistoCode == "Nb of crystals" || UserHistoCode == "NbOfCrystals" || UserHistoCode == "Number of xtals" ||
3298 UserHistoCode == "NumberOfXtals" || UserHistoCode == "Nb of xtals" || UserHistoCode == "NbOfXtals" ||
3299 UserHistoCode == "nox" || UserHistoCode == "NOX") {
3300 StandardHistoCode = "NOX";
3301 }
3302
3303 if (UserHistoCode == "Number of samples" || UserHistoCode == "NumberOfSamples" ||
3304 UserHistoCode == "Nb of samples" || UserHistoCode == "NbOfSamples" || UserHistoCode == "nos" ||
3305 UserHistoCode == "NOS") {
3306 StandardHistoCode = "NOS";
3307 }
3308
3309 if (UserHistoCode == "Number of runs" || UserHistoCode == "NumberOfRuns" || UserHistoCode == "Nb of runs" ||
3310 UserHistoCode == "NbOfRuns" || UserHistoCode == "nor" || UserHistoCode == "NOR") {
3311 StandardHistoCode = "NOR";
3312 }
3313
3314
3315 if (StandardHistoCode == "?") {
3316 StandardHistoCode = BuildStandard1DHistoCodeXY(UserHistoCode);
3317 }
3318 }
3319
3320 if (StandardHistoCode == "?") {
3321 std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeY(...)> UserHistoCode = " << UserHistoCode
3322 << " : code not found." << fTTBELL << std::endl;
3323
3324 ListOfStandardCodes("1DHistoCodeY");
3325 }
3326 return StandardHistoCode;
3327 }
3328
3329
3330 TString TEcnaParHistos::BuildStandard1DHistoCodeXY(const TString& UserHistoCode) {
3331
3332 TString StandardHistoCode = "?";
3333
3334
3335 if (UserHistoCode == "Number of events" || UserHistoCode == "Nb of evts" || UserHistoCode == "NumberbOfEvents" ||
3336 UserHistoCode == "NbOfEvts" || UserHistoCode == "number of events" || UserHistoCode == "noe" ||
3337 UserHistoCode == "NOE" || UserHistoCode == " " || UserHistoCode == "")
3338 {
3339 StandardHistoCode = "NOE";
3340 }
3341
3342 if (UserHistoCode == "Pedestals" || UserHistoCode == "Pedestal" || UserHistoCode == "pedestals" ||
3343 UserHistoCode == "pedestal" || UserHistoCode == "ped" || UserHistoCode == "Ped") {
3344 StandardHistoCode = "Ped";
3345 }
3346
3347 if (UserHistoCode == "Total noise" || UserHistoCode == "TotalNoise" || UserHistoCode == "total noise" ||
3348 UserHistoCode == "TN" || UserHistoCode == "tn" || UserHistoCode == "TNo") {
3349 StandardHistoCode = "TNo";
3350 }
3351
3352 if (UserHistoCode == "Low frequency noise" || UserHistoCode == "LowFrequencyNoise" || UserHistoCode == "LF noise" ||
3353 UserHistoCode == "LFNoise" || UserHistoCode == "low frequency noise" || UserHistoCode == "lfn" ||
3354 UserHistoCode == "LFN") {
3355 StandardHistoCode = "LFN";
3356 }
3357
3358 if (UserHistoCode == "High frequency noise" || UserHistoCode == "HighFrequencyNoise" || UserHistoCode == "HF noise" ||
3359 UserHistoCode == "HFNoise" || UserHistoCode == "high frequency noise" || UserHistoCode == "hfn" ||
3360 UserHistoCode == "HFN") {
3361 StandardHistoCode = "HFN";
3362 }
3363
3364 if (UserHistoCode == "Mean correlations between samples" || UserHistoCode == "MeanCorrelationsBetweenSamples" ||
3365 UserHistoCode == "Correlations between samples" || UserHistoCode == "CorrelationsBetweenSamples" ||
3366 UserHistoCode == "Mean corss" || UserHistoCode == "MeanCorss" || UserHistoCode == "Corss" ||
3367 UserHistoCode == "corss" || UserHistoCode == "Css" || UserHistoCode == "css" ||
3368 UserHistoCode == "mean correlations between samples" || UserHistoCode == "mcs" || UserHistoCode == "MCs") {
3369 StandardHistoCode = "MCs";
3370 }
3371
3372 if (UserHistoCode == "Sigma of correlations between samples" ||
3373 UserHistoCode == "SigmaOfCorrelationsBetweenSamples" || UserHistoCode == "Sigma corss" ||
3374 UserHistoCode == "SigmaCorss" || UserHistoCode == "SigCorss" || UserHistoCode == "sigcorss" ||
3375 UserHistoCode == "SCss" || UserHistoCode == "scss" || UserHistoCode == "sigma of correlations between samples" ||
3376 UserHistoCode == "scs" || UserHistoCode == "SCs") {
3377 StandardHistoCode = "SCs";
3378 }
3379
3380 if (UserHistoCode == "Sample mean" || UserHistoCode == "SampleMean" || UserHistoCode == "Sample average" ||
3381 UserHistoCode == "SampleAverage" || UserHistoCode == "SampMean" || UserHistoCode == "SampAverage" ||
3382 UserHistoCode == "MSp") {
3383 StandardHistoCode = "MSp";
3384 }
3385
3386 if (UserHistoCode == "Sample sigma" || UserHistoCode == "SampleSigma" || UserHistoCode == "Sigma of samples" ||
3387 UserHistoCode == "SigmaOfSamples" || UserHistoCode == "SampSigma" || UserHistoCode == "SSp") {
3388 StandardHistoCode = "SSp";
3389 }
3390
3391 if (UserHistoCode == "date" || UserHistoCode == "Date" || UserHistoCode == "time" || UserHistoCode == "Time") {
3392 StandardHistoCode = "Time";
3393 }
3394
3395 if (UserHistoCode == "ADC value" || UserHistoCode == "ADCValue" || UserHistoCode == "Adc value" ||
3396 UserHistoCode == "AdcValue" || UserHistoCode == "Sample ADC" || UserHistoCode == "SampleAdc" ||
3397 UserHistoCode == "ADC" || UserHistoCode == "Adc") {
3398 StandardHistoCode = "Adc";
3399 }
3400
3401
3402 if (StandardHistoCode == "?") {
3403 std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeXY(...)> UserHistoCode = " << UserHistoCode
3404 << " : code not found." << fTTBELL << std::endl;
3405
3406 ListOfStandardCodes("1DHistoCodeXY");
3407 }
3408 return StandardHistoCode;
3409 }
3410
3411
3412 TString TEcnaParHistos::BuildStandardCovOrCorCode(const TString& CallingMethod, const TString& UserHistoCode) {
3413
3414 TString StandardHistoCode = "?";
3415 if (CallingMethod == "2D") {
3416
3417 if (UserHistoCode == "Correlation" || UserHistoCode == "Correlations" || UserHistoCode == "correlation" ||
3418 UserHistoCode == "correlations" || UserHistoCode == "Correl" || UserHistoCode == "correl" ||
3419 UserHistoCode == "cor" || UserHistoCode == "Cor" || UserHistoCode == " " || UserHistoCode == "")
3420 {
3421 StandardHistoCode = "Cor";
3422 }
3423
3424 if (UserHistoCode == "Covariance" || UserHistoCode == "Covariances" || UserHistoCode == "covariance" ||
3425 UserHistoCode == "covariances" || UserHistoCode == "Covar" || UserHistoCode == "covar" ||
3426 UserHistoCode == "cov" || UserHistoCode == "Cov") {
3427 StandardHistoCode = "Cov";
3428 }
3429 }
3430
3431 if (StandardHistoCode == "?") {
3432 std::cout << "*TEcnaParHistos::BuildStandardCovOrCorCode(...)> UserHistoCode = " << UserHistoCode
3433 << " : code not found." << fTTBELL << std::endl;
3434
3435 ListOfStandardCodes("CovOrCorCode");
3436 }
3437 return StandardHistoCode;
3438 }
3439
3440
3441 TString TEcnaParHistos::BuildStandardBetweenWhatCode(const TString& CallingMethod, const TString& UserHistoCode) {
3442
3443 TString StandardHistoCode = "?";
3444 if (CallingMethod == "2D") {
3445
3446 if (UserHistoCode == "Samples" || UserHistoCode == "Between samples" || UserHistoCode == "samples" ||
3447 UserHistoCode == "between samples" || UserHistoCode == "BetweenSamples" || UserHistoCode == "Samp" ||
3448 UserHistoCode == "samp" || UserHistoCode == "ss" || UserHistoCode == "Mss") {
3449 StandardHistoCode = "Mss";
3450 }
3451
3452 if (UserHistoCode == "LF channels" || UserHistoCode == "LF between channels" || UserHistoCode == "LFChannels" ||
3453 UserHistoCode == "LFBetweenChannels" || UserHistoCode == "LFChan" || UserHistoCode == "lfchan" ||
3454 UserHistoCode == "LFcc" || UserHistoCode == "lfcc" || UserHistoCode == "MccLF") {
3455 StandardHistoCode = "MccLF";
3456 }
3457
3458 if (UserHistoCode == "HF channels" || UserHistoCode == "HF between channels" || UserHistoCode == "HFChannels" ||
3459 UserHistoCode == "HFBetweenChannels" || UserHistoCode == "HFChan" || UserHistoCode == "hfchan" ||
3460 UserHistoCode == "HFcc" || UserHistoCode == "hfcc" || UserHistoCode == "MccHF") {
3461 StandardHistoCode = "MccHF";
3462 }
3463
3464 if (UserHistoCode == "LF towers" || UserHistoCode == "LF between towers" || UserHistoCode == "LFTowers" ||
3465 UserHistoCode == "LFBetweenTowers" || UserHistoCode == "LFTow" || UserHistoCode == "lftow" ||
3466 UserHistoCode == "LFtt" || UserHistoCode == "lftt" || UserHistoCode == "LF SCs" ||
3467 UserHistoCode == "LF between SCs" || UserHistoCode == "LFSCs" || UserHistoCode == "LFBetweenSCs" ||
3468 UserHistoCode == "LFSuperXtals" || UserHistoCode == "lfsc" || UserHistoCode == "LFSC" ||
3469 UserHistoCode == "lfsx" || UserHistoCode == "MttLF") {
3470 StandardHistoCode = "MttLF";
3471 }
3472
3473 if (UserHistoCode == "HF towers" || UserHistoCode == "HF between towers" || UserHistoCode == "HFTowers" ||
3474 UserHistoCode == "HFBetweenTowers" || UserHistoCode == "HFTow" || UserHistoCode == "hftow" ||
3475 UserHistoCode == "HFtt" || UserHistoCode == "hftt" || UserHistoCode == "HF SCs" ||
3476 UserHistoCode == "HF between SCs" || UserHistoCode == "HFSCs" || UserHistoCode == "HFBetweenSCs" ||
3477 UserHistoCode == "HFSuperXtals" || UserHistoCode == "hfsc" || UserHistoCode == "HFSC" ||
3478 UserHistoCode == "hfsx" || UserHistoCode == "MttHF") {
3479 StandardHistoCode = "MttHF";
3480 }
3481 }
3482
3483
3484 if (StandardHistoCode == "?") {
3485 std::cout << "*TEcnaParHistos::BuildStandardBetweenWhatCode(...)> UserHistoCode = " << UserHistoCode
3486 << " : code not found." << fTTBELL << std::endl;
3487
3488 ListOfStandardCodes("BetweenWhatCode");
3489 }
3490 return StandardHistoCode;
3491 }
3492
3493
3494
3495 void TEcnaParHistos::ListOfStandardCodes(const TString& TypeOfCode) {
3496
3497
3498 if (TypeOfCode == "DetectorCode") {
3499 std::cout << "*--------------------------------------- Standard detector codes:" << std::endl;
3500 std::cout << " EB (ECAL Barrel) " << std::endl;
3501 std::cout << " EE (ECAL Endcap) " << std::endl;
3502 std::cout << " SM (Barrel Super Module) " << std::endl;
3503 std::cout << " Dee (Encap Dee) " << std::endl;
3504 std::cout << " Other codes are available" << std::endl;
3505 std::cout << " See source file: TEcnaParHistos::BuildStandardDetectorCode(...)." << std::endl;
3506 std::cout << "*----------------------------------------------------------------" << std::endl;
3507 }
3508
3509 if (TypeOfCode == "PlotOption") {
3510 std::cout << "*--------------------------------------- Standard plot options:" << std::endl;
3511 std::cout << " All ROOT DRAW options and: " << std::endl;
3512 std::cout << " (nothing) " << std::endl;
3513 std::cout << " SAME n " << std::endl;
3514 std::cout << " ASCII " << std::endl;
3515 std::cout << " Other codes are available" << std::endl;
3516 std::cout << " See source file: TEcnaParHistos::BuildStandardPlotOption(...)." << std::endl;
3517 std::cout << "*--------------------------------------------------------------" << std::endl;
3518 }
3519
3520 if (TypeOfCode == "1DHistoCodeX") {
3521 std::cout << "*---------------------- Standard 1D histo codes for X coordinate:" << std::endl;
3522 std::cout << " Tow (SM tower) " << std::endl;
3523 std::cout << " SC (Dee super crystal) " << std::endl;
3524 std::cout << " Xtal (crystal) " << std::endl;
3525 std::cout << " Smp (Adc sample) " << std::endl;
3526 std::cout << " Evt (event) " << std::endl;
3527 std::cout << " Other codes are available" << std::endl;
3528 std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeX(...)." << std::endl;
3529 std::cout << "*----------------------------------------------------------------" << std::endl;
3530 }
3531
3532 if (TypeOfCode == "1DHistoCodeY") {
3533 std::cout << "*---------------------- Standard 1D histo codes for Y coordinate;" << std::endl;
3534 std::cout << " NOX (number of crystals) " << std::endl;
3535 std::cout << " NOS (number of samples) " << std::endl;
3536 std::cout << " NOR (number of runs) " << std::endl;
3537 std::cout << " Other codes are available" << std::endl;
3538 std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeY(...)." << std::endl;
3539 std::cout << "*----------------------------------------------------------------" << std::endl;
3540 }
3541
3542 if (TypeOfCode == "1DHistoCodeXY") {
3543 std::cout << "*------------------ Standard 1D histo codes for X or Y coordinate;" << std::endl;
3544 std::cout << " NOE (number of events) " << std::endl;
3545 std::cout << " Ped (pedestal) " << std::endl;
3546 std::cout << " TNo (total noise) " << std::endl;
3547 std::cout << " LFN (low frequency noise) " << std::endl;
3548 std::cout << " HFN (high frequency noise) " << std::endl;
3549 std::cout << " MCs (mean correlation between samples) " << std::endl;
3550 std::cout << " SCs (sigma of correlations between samples) " << std::endl;
3551 std::cout << " MSp (sample mean) " << std::endl;
3552 std::cout << " SSp (sample sigma) " << std::endl;
3553 std::cout << " Time (time, date) " << std::endl;
3554 std::cout << " Adc (ADC sample value) " << std::endl;
3555 std::cout << " Other codes are available" << std::endl;
3556 std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeXY(...)." << std::endl;
3557 std::cout << "*-----------------------------------------------------------------" << std::endl;
3558 }
3559
3560 if (TypeOfCode == "CovOrCorCode") {
3561 std::cout << "*-------- Standard codes for matrix type (correlation or covariance);" << std::endl;
3562 std::cout << " Cor (correlation) " << std::endl;
3563 std::cout << " cov (covariance) " << std::endl;
3564 std::cout << " Other codes are available" << std::endl;
3565 std::cout << " See source file: TEcnaParHistos::BuildStandardCovOrCorCode(...)." << std::endl;
3566 std::cout << "*--------------------------------------------------------------------" << std::endl;
3567 }
3568
3569 if (TypeOfCode == "BetweenWhatCode") {
3570 std::cout << "*-------- Standard codes for quantities in correlation or covariance;" << std::endl;
3571 std::cout << " Mss (between samples) " << std::endl;
3572 std::cout << " MccLF (low frequency between channels) " << std::endl;
3573 std::cout << " MccHF (high frequency between channels) " << std::endl;
3574 std::cout << " MttLF (low frequency between towers [if EB] or SC [if EE]) " << std::endl;
3575 std::cout << " MttLF (high frequency between towers [if EB] or SC [if EE]) " << std::endl;
3576 std::cout << " Other codes are available" << std::endl;
3577 std::cout << " See source file: TEcnaParHistos::BuildStandardBetweenWhatCode(...)." << std::endl;
3578 std::cout << "*--------------------------------------------------------------------" << std::endl;
3579 }
3580 }
3581
3582
3583
3584 TString TEcnaParHistos::GetTechHistoCode(const TString& StandardHistoCode) {
3585 TString TechHistoCode = "?";
3586
3587
3588 if (StandardHistoCode == "NOE") {
3589 TechHistoCode = "D_NOE_ChNb";
3590 }
3591 if (StandardHistoCode == "Ped") {
3592 TechHistoCode = "D_Ped_ChNb";
3593 }
3594 if (StandardHistoCode == "TNo") {
3595 TechHistoCode = "D_TNo_ChNb";
3596 }
3597 if (StandardHistoCode == "LFN") {
3598 TechHistoCode = "D_LFN_ChNb";
3599 }
3600 if (StandardHistoCode == "HFN") {
3601 TechHistoCode = "D_HFN_ChNb";
3602 }
3603 if (StandardHistoCode == "MCs") {
3604 TechHistoCode = "D_MCs_ChNb";
3605 }
3606 if (StandardHistoCode == "SCs") {
3607 TechHistoCode = "D_SCs_ChNb";
3608 }
3609
3610 if (TechHistoCode == "?") {
3611 std::cout << "*TEcnaParHistos::GetTechHistoCode(...)> StandardHistoCode = " << StandardHistoCode
3612 << " : code not found " << fTTBELL << std::endl;
3613 }
3614 return TechHistoCode;
3615 }
3616
3617 TString TEcnaParHistos::GetTechHistoCode(const TString& X_Quantity, const TString& Y_Quantity) {
3618
3619 TString TechHistoCode = "?";
3620
3621
3622 if (X_Quantity == "XtalORStin" && Y_Quantity == "NOE") {
3623 TechHistoCode = "D_NOE_ChNb";
3624 }
3625 if (X_Quantity == "XtalORStin" && Y_Quantity == "Ped") {
3626 TechHistoCode = "D_Ped_ChNb";
3627 }
3628 if (X_Quantity == "XtalORStin" && Y_Quantity == "TNo") {
3629 TechHistoCode = "D_TNo_ChNb";
3630 }
3631 if (X_Quantity == "XtalORStin" && Y_Quantity == "LFN") {
3632 TechHistoCode = "D_LFN_ChNb";
3633 }
3634 if (X_Quantity == "XtalORStin" && Y_Quantity == "HFN") {
3635 TechHistoCode = "D_HFN_ChNb";
3636 }
3637 if (X_Quantity == "XtalORStin" && Y_Quantity == "MCs") {
3638 TechHistoCode = "D_MCs_ChNb";
3639 }
3640 if (X_Quantity == "XtalORStin" && Y_Quantity == "SCs") {
3641 TechHistoCode = "D_SCs_ChNb";
3642 }
3643
3644 if (X_Quantity == "NOE" && Y_Quantity == "NOX") {
3645 TechHistoCode = "D_NOE_ChDs";
3646 }
3647 if (X_Quantity == "Ped" && Y_Quantity == "NOX") {
3648 TechHistoCode = "D_Ped_ChDs";
3649 }
3650 if (X_Quantity == "TNo" && Y_Quantity == "NOX") {
3651 TechHistoCode = "D_TNo_ChDs";
3652 }
3653 if (X_Quantity == "LFN" && Y_Quantity == "NOX") {
3654 TechHistoCode = "D_LFN_ChDs";
3655 }
3656 if (X_Quantity == "HFN" && Y_Quantity == "NOX") {
3657 TechHistoCode = "D_HFN_ChDs";
3658 }
3659 if (X_Quantity == "MCs" && Y_Quantity == "NOX") {
3660 TechHistoCode = "D_MCs_ChDs";
3661 }
3662 if (X_Quantity == "SCs" && Y_Quantity == "NOX") {
3663 TechHistoCode = "D_SCs_ChDs";
3664 }
3665
3666 if (X_Quantity == "Smp" && Y_Quantity == "MSp") {
3667 TechHistoCode = "D_MSp_SpNb";
3668 }
3669 if (X_Quantity == "MSp" && Y_Quantity == "NOS") {
3670 TechHistoCode = "D_MSp_SpDs";
3671 }
3672 if (X_Quantity == "Smp" && Y_Quantity == "SSp") {
3673 TechHistoCode = "D_SSp_SpNb";
3674 }
3675 if (X_Quantity == "SSp" && Y_Quantity == "NOS") {
3676 TechHistoCode = "D_SSp_SpDs";
3677 }
3678
3679 if (X_Quantity == "Evt" && Y_Quantity == "Adc") {
3680 TechHistoCode = "D_Adc_EvNb";
3681 }
3682 if (X_Quantity == "Adc" && Y_Quantity == "NOE") {
3683 TechHistoCode = "D_Adc_EvDs";
3684 }
3685
3686
3687 if (X_Quantity == "Time" && Y_Quantity == "Ped") {
3688 TechHistoCode = "H_Ped_Date";
3689 }
3690 if (X_Quantity == "Ped" && Y_Quantity == "NOR") {
3691 TechHistoCode = "H_Ped_RuDs";
3692 }
3693
3694 if (X_Quantity == "Time" && Y_Quantity == "TNo") {
3695 TechHistoCode = "H_TNo_Date";
3696 }
3697 if (X_Quantity == "TNo" && Y_Quantity == "NOR") {
3698 TechHistoCode = "H_TNo_RuDs";
3699 }
3700
3701 if (X_Quantity == "Time" && Y_Quantity == "LFN") {
3702 TechHistoCode = "H_LFN_Date";
3703 }
3704 if (X_Quantity == "LFN" && Y_Quantity == "NOR") {
3705 TechHistoCode = "H_LFN_RuDs";
3706 }
3707
3708 if (X_Quantity == "Time" && Y_Quantity == "HFN") {
3709 TechHistoCode = "H_HFN_Date";
3710 }
3711 if (X_Quantity == "HFN" && Y_Quantity == "NOR") {
3712 TechHistoCode = "H_HFN_RuDs";
3713 }
3714
3715 if (X_Quantity == "Time" && Y_Quantity == "MCs") {
3716 TechHistoCode = "H_MCs_Date";
3717 }
3718 if (X_Quantity == "MCs" && Y_Quantity == "NOR") {
3719 TechHistoCode = "H_MCs_RuDs";
3720 }
3721
3722 if (X_Quantity == "Time" && Y_Quantity == "SCs") {
3723 TechHistoCode = "H_SCs_Date";
3724 }
3725 if (X_Quantity == "SCs" && Y_Quantity == "NOR") {
3726 TechHistoCode = "H_SCs_RuDs";
3727 }
3728
3729 if (TechHistoCode == "?") {
3730 std::cout << "TEcnaParHistos::GetTechHistoCode(...)> HistoCode not found. X_Quantity = " << X_Quantity
3731 << ", Y_Quantity = " << Y_Quantity << std::endl;
3732 }
3733 return TechHistoCode;
3734 }
3735
3736 TString TEcnaParHistos::GetCodeOnlyOnePlot() { return fOnlyOnePlot; }
3737 TString TEcnaParHistos::GetCodeSeveralPlot() { return fSeveralPlot; }
3738 TString TEcnaParHistos::GetCodeSameOnePlot() { return fSameOnePlot; }
3739 TString TEcnaParHistos::GetCodeAllXtalsInStinPlot() { return fAllXtalsInStinPlot; }
3740 Int_t TEcnaParHistos::GetCodePlotAllXtalsInStin() { return fPlotAllXtalsInStin; }
3741
3742