00001
00002
00003
00004
00005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParHistos.h"
00006 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaNumbering.h"
00007
00008
00009
00010
00011
00012
00013
00014 ClassImp(TEcnaParHistos)
00015
00016
00017
00018 TEcnaParHistos::~TEcnaParHistos()
00019 {
00020
00021
00022
00023
00024
00025
00026 }
00027
00028
00029
00030
00031
00032
00033 TEcnaParHistos::TEcnaParHistos()
00034 {
00035
00036
00037
00038
00039 Init();
00040 }
00041
00042 TEcnaParHistos::TEcnaParHistos(TEcnaObject* pObjectManager, const TString SubDet)
00043 {
00044
00045
00046
00047
00048 Init();
00049 Long_t i_this = (Long_t)this;
00050 pObjectManager->RegisterPointer("TEcnaParHistos", i_this);
00051
00052
00053 fEcal = 0;
00054 Int_t iParEcal = pObjectManager->GetPointerValue("TEcnaParEcal");
00055 if( iParEcal == 0 )
00056 {fEcal = new TEcnaParEcal(pObjectManager, SubDet.Data()); }
00057 else
00058 {fEcal = (TEcnaParEcal*)iParEcal;}
00059
00060
00061 fEcalNumbering = 0;
00062 Int_t iEcalNumbering = pObjectManager->GetPointerValue("TEcnaNumbering");
00063 if( iEcalNumbering == 0 )
00064 {fEcalNumbering = new TEcnaNumbering(pObjectManager, SubDet.Data()); }
00065 else
00066 {fEcalNumbering = (TEcnaNumbering*)iEcalNumbering;}
00067
00068 SetEcalSubDetector(SubDet.Data());
00069 }
00070
00071
00072
00073 TEcnaParHistos::TEcnaParHistos(const TString SubDet,
00074 const TEcnaParEcal* pEcal,
00075 const TEcnaNumbering* pEcalNumbering)
00076 {
00077
00078
00079
00080
00081 Init();
00082 SetEcalSubDetector(SubDet.Data(), pEcal, pEcalNumbering);
00083 }
00084
00085 void TEcnaParHistos::Init()
00086 {
00087 fgMaxCar = (Int_t)512;
00088
00089 fTTBELL = '\007';
00090
00091
00092 fCnaCommand = 0;
00093 fCnaError = 0;
00094
00095
00096
00097 fMaxColorNumber = (Int_t)4;
00098
00099 fMarginAutoMinMax = (Double_t)0.05;
00100
00101
00102
00103 fNbOfRunsDisplayed = (Int_t)20;
00104
00105
00106 fMaxNbOfRunsInLists = (Int_t)5000;
00107
00108
00109
00110 Int_t MaxCar = fgMaxCar;
00111 fOnlyOnePlot.Resize(MaxCar);
00112 fOnlyOnePlot = "ONLYONE";
00113
00114 MaxCar = fgMaxCar;
00115 fSeveralPlot.Resize(MaxCar);
00116 fSeveralPlot = "SAME";
00117
00118 MaxCar = fgMaxCar;
00119 fSameOnePlot.Resize(MaxCar);
00120 fSameOnePlot = "SAME n";
00121
00122 MaxCar = fgMaxCar;
00123 fAllXtalsInStinPlot.Resize(MaxCar);
00124 fAllXtalsInStinPlot = "SAME in Stin";
00125
00126 fPlotAllXtalsInStin = 0;
00127
00128 }
00129
00130 void TEcnaParHistos::SetEcalSubDetector(const TString SubDet)
00131 {
00132
00133
00134 Int_t MaxCar = fgMaxCar;
00135 fFlagSubDet.Resize(MaxCar);
00136 fFlagSubDet = fEcal->GetEcalSubDetector();
00137 }
00138
00139
00140 void TEcnaParHistos::SetEcalSubDetector(const TString SubDet,
00141 const TEcnaParEcal* pEcal,
00142 const TEcnaNumbering* pEcalNumbering)
00143 {
00144
00145
00146 fEcal = 0;
00147 if( pEcal == 0 )
00148 {fEcal = new TEcnaParEcal(SubDet.Data()); ;}
00149 else
00150 {fEcal = (TEcnaParEcal*)pEcal;}
00151
00152 Int_t MaxCar = fgMaxCar;
00153 fFlagSubDet.Resize(MaxCar);
00154 fFlagSubDet = fEcal->GetEcalSubDetector();
00155
00156 fEcalNumbering = 0;
00157 if( pEcalNumbering == 0 )
00158 {fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal); ;}
00159 else
00160 {fEcalNumbering = (TEcnaNumbering*)pEcalNumbering;}
00161 }
00162
00163
00164 Int_t TEcnaParHistos::MaxNbOfRunsInLists(){return fMaxNbOfRunsInLists;}
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216 UInt_t TEcnaParHistos::SetCanvasWidth(const TString HistoCode, const TString opt_plot)
00217 {
00218
00219
00220 UInt_t canv_w = CanvasFormatW("petit");
00221
00222 if( HistoCode == "D_Adc_EvNb" || HistoCode == "D_NOE_ChNb" ||
00223 HistoCode == "D_Ped_ChNb" || HistoCode == "D_LFN_ChNb" ||
00224 HistoCode == "D_TNo_ChNb" || HistoCode == "D_HFN_ChNb" ||
00225 HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" ||
00226 HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" ||
00227 HistoCode == "H_MCs_Date" || HistoCode == "H_LFN_Date" ||
00228 HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" ||
00229 (HistoCode == "D_MSp_SpNb" && opt_plot != "ONLYONE") ||
00230 (HistoCode == "D_SSp_SpNb" && opt_plot != "ONLYONE") )
00231 {
00232 canv_w = CanvasFormatH("moyen");
00233 }
00234
00235 if( (HistoCode == "D_Adc_EvDs" || HistoCode == "D_NOE_ChDs" ||
00236 HistoCode == "D_Ped_ChDs" || HistoCode == "D_LFN_ChDs" ||
00237 HistoCode == "D_TNo_ChDs" || HistoCode == "D_HFN_ChDs" ||
00238 HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" ||
00239 HistoCode == "D_MSp_SpDs" || HistoCode == "D_SSp_SpDs" ||
00240 HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" ||
00241 HistoCode == "H_MCs_RuDs" || HistoCode == "H_LFN_RuDs" ||
00242 HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs") && opt_plot != "ONLYONE" )
00243 {
00244 canv_w = CanvasFormatH("moyen");
00245 }
00246
00247 return canv_w;
00248 }
00249
00250 UInt_t TEcnaParHistos::SetCanvasHeight(const TString HistoCode, const TString opt_plot)
00251 {
00252
00253
00254 UInt_t canv_h = CanvasFormatH("petit");
00255
00256 if( HistoCode == "D_Adc_EvNb" || HistoCode == "D_NOE_ChNb" ||
00257 HistoCode == "D_Ped_ChNb" || HistoCode == "D_LFN_ChNb" ||
00258 HistoCode == "D_TNo_ChNb" || HistoCode == "D_HFN_ChNb" ||
00259 HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" ||
00260 HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" ||
00261 HistoCode == "H_MCs_Date" || HistoCode == "H_LFN_Date" ||
00262 HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" ||
00263 (HistoCode == "D_MSp_SpNb" && opt_plot != "ONLYONE") ||
00264 (HistoCode == "D_SSp_SpNb" && opt_plot != "ONLYONE") )
00265 {
00266 canv_h = CanvasFormatW("moyen");
00267 }
00268
00269 if( (HistoCode == "D_Adc_EvDs" || HistoCode == "D_NOE_ChDs" ||
00270 HistoCode == "D_Ped_ChDs" || HistoCode == "D_LFN_ChDs" ||
00271 HistoCode == "D_TNo_ChDs" || HistoCode == "D_HFN_ChDs" ||
00272 HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" ||
00273 HistoCode == "D_MSp_SpDs" || HistoCode == "D_SSp_SpDs" ||
00274 HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" ||
00275 HistoCode == "H_MCs_RuDs" || HistoCode == "H_LFN_RuDs" ||
00276 HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs") && opt_plot != "ONLYONE" )
00277 {
00278 canv_h = CanvasFormatW("moyen");
00279 }
00280
00281 return canv_h;
00282 }
00283
00284 UInt_t TEcnaParHistos::CanvasFormatW(const TString chformat)
00285 {
00286
00287
00288 UInt_t canv_w = 375;
00289
00290 if ( chformat == "petit" ){canv_w = 375;}
00291 if ( chformat == "moyen" ){canv_w = 450;}
00292 if ( chformat == "grand" ){canv_w = 572;}
00293
00294 if ( chformat == "etaphiSM" ){canv_w = 760;}
00295 if ( chformat == "phietaEB" ){canv_w = 636;}
00296
00297 if ( chformat == "IXIYDee" ){canv_w = 320;}
00298 if ( chformat == "IYIXEE" ){canv_w = 636;}
00299 return canv_w;
00300 }
00301
00302 UInt_t TEcnaParHistos::CanvasFormatH(const TString chformat)
00303 {
00304
00305
00306 UInt_t canv_h = 530;
00307
00308 if ( chformat == "petit" ){canv_h = 530;}
00309 if ( chformat == "moyen" ){canv_h = 636;}
00310 if ( chformat == "grand" ){canv_h = 810;}
00311
00312 if ( chformat == "etaphiSM" ){canv_h = 306;}
00313 if ( chformat == "phietaEB" ){canv_h = 450;}
00314
00315 if ( chformat == "IXIYDee" ){canv_h = 720;}
00316 if ( chformat == "IYIXEE" ){canv_h = 450;}
00317 return canv_h;
00318 }
00319
00320
00321
00322
00323
00324
00325 Double_t TEcnaParHistos::BoxLeftX(const TString chtype)
00326 {
00327
00328
00329 Double_t value = 0.4;
00330
00331 if ( chtype == "general_comment" ) {value = 0.015;}
00332
00333 if ( chtype == "top_left_box_SM" ) {value = 0.015;}
00334 if ( chtype == "top_left_box_EB" ) {value = 0.015;}
00335 if ( chtype == "top_mid_box_EB" ) {value = 0.350;}
00336 if ( chtype == "top_right_box_EB" ) {value = 0.630;}
00337
00338 if ( chtype == "top_left_box_Dee" ) {value = 0.015;}
00339 if ( chtype == "top_left_box_EE" ) {value = 0.015;}
00340 if ( chtype == "top_mid_box_EE" ) {value = 0.240;}
00341 if ( chtype == "top_right_box_EE" ) {value = 0.610;}
00342
00343 if ( chtype == "bottom_left_box" ) {value = 0.015;}
00344 if ( chtype == "bottom_left_box_evol" ) {value = 0.015;}
00345 if ( chtype == "bottom_mid_box" ) {value = 0.250;}
00346 if ( chtype == "bottom_right_box" ) {value = 0.455;}
00347 if ( chtype == "bottom_right_box_evol") {value = 0.540;}
00348 if ( chtype == "bottom_right_box_evpr") {value = 0.540;}
00349
00350 if ( chtype == "several_plots_box" ) {value = 0.015;}
00351 if ( chtype == "several_evol_box" ) {value = 0.015;}
00352 if ( chtype == "several_evpr_box" ) {value = 0.015;}
00353
00354 return value;
00355 }
00356
00357 Double_t TEcnaParHistos::BoxRightX(const TString chtype)
00358 {
00359
00360
00361 Double_t value = 0.6;
00362
00363 if ( chtype == "general_comment" ) {value = 0.680;}
00364
00365 if ( chtype == "top_left_box_SM" ) {value = 0.125;}
00366 if ( chtype == "top_left_box_EB" ) {value = 0.349;}
00367 if ( chtype == "top_mid_box_EB" ) {value = 0.629;}
00368 if ( chtype == "top_right_box_EB" ) {value = 0.985;}
00369
00370 if ( chtype == "top_left_box_Dee" ) {value = 0.425;}
00371 if ( chtype == "top_left_box_EE" ) {value = 0.260;}
00372 if ( chtype == "top_mid_box_EE" ) {value = 0.609;}
00373 if ( chtype == "top_right_box_EE" ) {value = 0.985;}
00374
00375 if ( chtype == "bottom_left_box" ) {value = 0.445;}
00376 if ( chtype == "bottom_left_box_evol" ) {value = 0.450;}
00377 if ( chtype == "bottom_mid_box" ) {value = 0.750;}
00378 if ( chtype == "bottom_right_box" ) {value = 0.985;}
00379 if ( chtype == "bottom_right_box_evol") {value = 0.985;}
00380 if ( chtype == "bottom_right_box_evpr") {value = 0.985;}
00381
00382 if ( chtype == "several_plots_box" ) {value = 0.985;}
00383 if ( chtype == "several_evol_box" ) {value = 0.635;}
00384 if ( chtype == "several_evpr_box" ) {value = 0.635;}
00385
00386 return value;
00387 }
00388
00389 Double_t TEcnaParHistos::BoxBottomY(const TString chtype)
00390 {
00391
00392
00393 Double_t value = 0.8;
00394
00395 if ( chtype == "general_comment" ) {value = 0.960;}
00396
00397 if ( chtype == "top_left_box_SM" ) {value = 0.880;}
00398 if ( chtype == "top_left_box_EB" ) {value = 0.880;}
00399 if ( chtype == "top_mid_box_EB" ) {value = 0.880;}
00400 if ( chtype == "top_right_box_EB" ) {value = 0.880;}
00401
00402 if ( chtype == "top_left_box_Dee" ) {value = 0.925;}
00403 if ( chtype == "top_left_box_EE" ) {value = 0.880;}
00404 if ( chtype == "top_mid_box_EE" ) {value = 0.880;}
00405 if ( chtype == "top_right_box_EE" ) {value = 0.880;}
00406
00407 if ( chtype == "bottom_left_box" ) {value = 0.010;}
00408 if ( chtype == "bottom_left_box_evol" ) {value = 0.010;}
00409 if ( chtype == "bottom_right_box" ) {value = 0.010;}
00410 if ( chtype == "bottom_right_box_evol") {value = 0.010;}
00411 if ( chtype == "bottom_right_box_evpr") {value = 0.010;}
00412 if ( chtype == "several_plots_box" ) {value = 0.010;}
00413 if ( chtype == "several_evol_box" ) {value = 0.010;}
00414 if ( chtype == "several_evpr_box" ) {value = 0.010;}
00415
00416 return value;
00417 }
00418
00419 Double_t TEcnaParHistos::BoxTopY(const TString chtype)
00420 {
00421
00422
00423 Double_t value = 0.9;
00424
00425 if ( chtype == "general_comment" ) {value = 0.999;}
00426
00427 if ( chtype == "top_left_box_SM" ) {value = 0.955;}
00428 if ( chtype == "top_left_box_EB" ) {value = 0.955;}
00429 if ( chtype == "top_mid_box_EB" ) {value = 0.955;}
00430 if ( chtype == "top_right_box_EB" ) {value = 0.955;}
00431
00432 if ( chtype == "top_left_box_Dee" ) {value = 0.969;}
00433 if ( chtype == "top_left_box_EE" ) {value = 0.955;}
00434 if ( chtype == "top_mid_box_EE" ) {value = 0.955;}
00435 if ( chtype == "top_right_box_EE" ) {value = 0.955;}
00436
00437 if ( chtype == "bottom_left_box" ) {value = 0.120;}
00438 if ( chtype == "bottom_left_box_evol" ) {value = 0.120;}
00439 if ( chtype == "bottom_right_box" ) {value = 0.120;}
00440 if ( chtype == "bottom_right_box_Dee" ) {value = 0.100;}
00441
00442 if ( chtype == "bottom_right_box_evol") {value = 0.120;}
00443 if ( chtype == "bottom_right_box_evpr") {value = 0.120;}
00444 if ( chtype == "several_plots_box" ) {value = 0.200;}
00445 if ( chtype == "several_evol_box" ) {value = 0.200;}
00446 if ( chtype == "several_evpr_box" ) {value = 0.200;}
00447
00448 return value;
00449 }
00450
00451
00452
00453
00454
00455
00456
00457 void TEcnaParHistos::SetColorPalette(const TString user_color_palette)
00458 {
00459
00460
00461 fMaxColorNumber = 4;
00462
00463 if (!(user_color_palette == "Rainbow" || user_color_palette == "rainbow") ){fMaxColorNumber = 5;}
00464 if ( user_color_palette == "Rainbow" || user_color_palette == "rainbow" ){fMaxColorNumber = 6;}
00465 }
00466
00467 Color_t TEcnaParHistos::ColorTab(const Int_t& user_color_number)
00468 {
00469
00470
00471
00472
00473 TColor* my_color = new TColor();
00474
00475 Color_t couleur = ColorDefinition("noir");
00476
00477 if ( fMaxColorNumber != 6 )
00478 {
00479
00480 if(user_color_number == 0){couleur = ColorDefinition("noir");}
00481 if(user_color_number == 1){couleur = ColorDefinition("rouge");}
00482 if(user_color_number == 2){couleur = ColorDefinition("bleu");}
00483 if(user_color_number == 3){couleur = (Color_t)my_color->GetColor("#009900");}
00484 if(user_color_number == 4){couleur = ColorDefinition("marron28");}
00485 if(user_color_number == 5){couleur = (Color_t)my_color->GetColor("#9900BB");}
00486
00487 }
00488 if ( fMaxColorNumber == 6 )
00489 {
00490
00491 if(user_color_number == 0){couleur = (Color_t)my_color->GetColor("#EE0000");}
00492 if(user_color_number == 1){couleur = (Color_t)my_color->GetColor("#FF6611");}
00493 if(user_color_number == 2){couleur = (Color_t)my_color->GetColor("#FFCC00");}
00494 if(user_color_number == 3){couleur = (Color_t)my_color->GetColor("#009900");}
00495 if(user_color_number == 4){couleur = (Color_t)my_color->GetColor("#0044EE");}
00496 if(user_color_number == 5){couleur = (Color_t)my_color->GetColor("#6633BB");}
00497 if(user_color_number == 6){couleur = (Color_t)my_color->GetColor("#9900BB");}
00498 }
00499
00500 if( user_color_number < 0 || user_color_number > fMaxColorNumber ){couleur = 0;}
00501
00502 return couleur;
00503 }
00504
00505
00506 Color_t TEcnaParHistos::ColorDefinition(const TString chcolor)
00507 {
00508
00509
00510
00511
00512 Color_t couleur = 1;
00513
00514 if ( chcolor == "noir" ) {couleur = 1;}
00515 if ( chcolor == "rouge" ) {couleur = 2;}
00516 if ( chcolor == "vert_fonce" ) {couleur = 3;}
00517 if ( chcolor == "bleu_fonce" ) {couleur = 4;}
00518 if ( chcolor == "jaune" ) {couleur = 5;}
00519 if ( chcolor == "rose" ) {couleur = 6;}
00520 if ( chcolor == "bleu_clair" ) {couleur = 7;}
00521 if ( chcolor == "vert" ) {couleur = 8;}
00522 if ( chcolor == "bleu" ) {couleur = 9;}
00523 if ( chcolor == "blanc" ) {couleur = 10;}
00524
00525 if ( chcolor == "marron23" ) {couleur = 23;}
00526 if ( chcolor == "marron24" ) {couleur = 24;}
00527 if ( chcolor == "marron25" ) {couleur = 24;}
00528 if ( chcolor == "marron27" ) {couleur = 27;}
00529 if ( chcolor == "marron28" ) {couleur = 28;}
00530
00531 if ( chcolor == "bleu33" ) {couleur = 33;}
00532 if ( chcolor == "bleu36" ) {couleur = 36;}
00533 if ( chcolor == "bleu38" ) {couleur = 38;}
00534 if ( chcolor == "bleu39" ) {couleur = 39;}
00535
00536 if ( chcolor == "orange41" ) {couleur = 41;}
00537 if ( chcolor == "orange42" ) {couleur = 42;}
00538
00539 if ( chcolor == "rouge44" ) {couleur = 44;}
00540 if ( chcolor == "rouge46" ) {couleur = 46;}
00541 if ( chcolor == "rouge47" ) {couleur = 47;}
00542 if ( chcolor == "rouge48" ) {couleur = 48;}
00543 if ( chcolor == "rouge49" ) {couleur = 49;}
00544 if ( chcolor == "rouge50" ) {couleur = 50;}
00545
00546 if ( chcolor == "vert31" ) {couleur = 31;}
00547 if ( chcolor == "vert32" ) {couleur = 32;}
00548 if ( chcolor == "vert36" ) {couleur = 36;}
00549 if ( chcolor == "vert37" ) {couleur = 37;}
00550
00551 if ( chcolor == "violet" ) {couleur = 49;}
00552
00553 if ( chcolor == "turquoise29") {couleur = 29;}
00554
00555 if ( chcolor == "gris12" ) {couleur = 12;}
00556 if ( chcolor == "gris13" ) {couleur = 13;}
00557 if ( chcolor == "gris14" ) {couleur = 14;}
00558 if ( chcolor == "gris15" ) {couleur = 15;}
00559 if ( chcolor == "gris16" ) {couleur = 16;}
00560 if ( chcolor == "gris17" ) {couleur = 17;}
00561 if ( chcolor == "gris18" ) {couleur = 18;}
00562
00563 return couleur;
00564 }
00565
00566
00567
00568
00569
00570 Int_t TEcnaParHistos::GetMaxNbOfColors(){return fMaxColorNumber;}
00571 Int_t TEcnaParHistos::GetNbOfRunsDisplayed(){return fNbOfRunsDisplayed;}
00572 Double_t TEcnaParHistos::GetMarginAutoMinMax(){return fMarginAutoMinMax;}
00573
00574
00575
00576
00577
00578
00579 void TEcnaParHistos::SetViewHistoStyle(const TString HistoType)
00580 {
00581
00582
00583
00584 gStyle->SetPalette(1,0);
00585
00586
00587 gStyle->SetOptDate(0);
00588
00589
00590 gStyle->SetTitleW(0.5); gStyle->SetTitleH(0.075);
00591
00592 if( HistoType == "colz" || HistoType == "lego" ||
00593 HistoType == "surf" || HistoType == "Stin" )
00594 {gStyle->SetTitleW(0.8); gStyle->SetTitleH(0.075);}
00595
00596 if( (HistoType == "H1Basic") || (HistoType == "Evol") )
00597 {gStyle->SetTitleW(0.5); gStyle->SetTitleH(0.075);}
00598
00599 if( HistoType == "Stex2DEB" )
00600 {gStyle->SetTitleW(0.2); gStyle->SetTitleH(0.095);}
00601
00602 if( HistoType == "Stex2DEE" )
00603 {gStyle->SetTitleW(0.45); gStyle->SetTitleH(0.08);}
00604
00605 if( HistoType == "Stex2DEENb" )
00606 {gStyle->SetTitleW(0.85); gStyle->SetTitleH(0.08);}
00607
00608 if( HistoType == "Stas2DEB" || HistoType == "Stas2DEE" )
00609 {gStyle->SetTitleW(0.225); gStyle->SetTitleH(0.095);}
00610
00611 if(HistoType == "Global" || HistoType == "Proj" || HistoType == "SampProj" || HistoType == "EvolProj")
00612 {gStyle->SetTitleW(0.5); gStyle->SetTitleH(0.08);}
00613
00614
00615 gStyle->SetOptStat(1110);
00616
00617
00618 if( HistoType == "colz" || HistoType == "lego" ||
00619 HistoType == "surf" || HistoType == "Stin" )
00620 {
00621 gStyle->SetStatW(0.55); gStyle->SetStatH(0.2);
00622 gStyle->SetStatY(1);
00623 }
00624
00625 if( HistoType == "Global" )
00626 {
00627 gStyle->SetStatW(0.375); gStyle->SetStatH(0.180);
00628 gStyle->SetStatY(0.9875);
00629 }
00630 if( HistoType == "Proj" || HistoType == "SampProj" || HistoType == "EvolProj" )
00631 {
00632 gStyle->SetStatW(0.375); gStyle->SetStatH(0.180);
00633 gStyle->SetStatY(0.9875);
00634 }
00635
00636 if( (HistoType == "H1Basic") || (HistoType == "Evol") )
00637 {
00638 gStyle->SetStatW(0.375); gStyle->SetStatH(0.180);
00639 gStyle->SetStatY(0.9875);
00640 }
00641
00642
00643
00644 gStyle->SetMarkerStyle(1);
00645 if( HistoType == "Global" ){gStyle->SetMarkerStyle(20);}
00646
00647
00648 }
00649
00650
00651 void TEcnaParHistos::SetViewHistoPadMargins(const TString HistoType, const TString opt_plot)
00652 {
00653
00654
00655
00656 gStyle->SetPadBottomMargin(0.125);
00657 gStyle->SetPadTopMargin(0.125);
00658 gStyle->SetPadLeftMargin(0.125);
00659 gStyle->SetPadRightMargin(0.125);
00660
00661 if(HistoType == "colz" || HistoType == "lego" ||
00662 HistoType == "surf" || HistoType == "Stin")
00663 {
00664 gStyle->SetPadBottomMargin(0.125);
00665 gStyle->SetPadTopMargin(0.135);
00666 gStyle->SetPadLeftMargin(0.135);
00667 gStyle->SetPadRightMargin(0.135);
00668 }
00669
00670 if( HistoType == "Stex2DEB" )
00671 {
00672 gStyle->SetPadBottomMargin(0.145);
00673 gStyle->SetPadTopMargin(0.135);
00674 gStyle->SetPadLeftMargin(0.125);
00675 gStyle->SetPadRightMargin(0.125);
00676 }
00677
00678 if( HistoType == "Stex2DEE" || HistoType == "Stex2DEENb")
00679 {
00680 gStyle->SetPadBottomMargin(0.120);
00681 gStyle->SetPadTopMargin(0.110);
00682 gStyle->SetPadLeftMargin(0.130);
00683 gStyle->SetPadRightMargin(0.130);
00684 }
00685 if( HistoType == "Stas2DEB" )
00686 {
00687 gStyle->SetPadBottomMargin(0.145);
00688 gStyle->SetPadTopMargin(0.135);
00689 gStyle->SetPadLeftMargin(0.125);
00690 gStyle->SetPadRightMargin(0.125);
00691 }
00692
00693 if( HistoType == "Stas2DEE")
00694 {
00695 gStyle->SetPadBottomMargin(0.145);
00696 gStyle->SetPadTopMargin(0.135);
00697 gStyle->SetPadLeftMargin(0.105);
00698 gStyle->SetPadRightMargin(0.115);
00699 }
00700 if(HistoType == "Global")
00701 {
00702 gStyle->SetPadBottomMargin((Float_t)0.125);
00703 gStyle->SetPadTopMargin((Float_t)0.175);
00704 gStyle->SetPadLeftMargin((Float_t)0.115);
00705 gStyle->SetPadRightMargin((Float_t)0.05);
00706 }
00707
00708 if(HistoType == "Proj" || HistoType == "SampProj")
00709 {
00710 gStyle->SetPadBottomMargin(0.115);
00711 gStyle->SetPadTopMargin(0.155);
00712 gStyle->SetPadLeftMargin(0.15);
00713 gStyle->SetPadRightMargin(0.05);
00714 }
00715
00716 if( HistoType == "H1Basic" )
00717 {
00718 gStyle->SetPadBottomMargin(0.1275);
00719 gStyle->SetPadTopMargin(0.165);
00720 gStyle->SetPadLeftMargin(0.15);
00721 gStyle->SetPadRightMargin(0.05);
00722 }
00723
00724 if( HistoType == "Evol" && opt_plot == "ONLYONE")
00725 {
00726 gStyle->SetPadBottomMargin(0.110);
00727 gStyle->SetPadTopMargin(0.2);
00728 gStyle->SetPadLeftMargin(0.115);
00729 gStyle->SetPadRightMargin(0.035);
00730 }
00731 if( HistoType == "Evol" && opt_plot == "SAME")
00732 {
00733 gStyle->SetPadBottomMargin(0.110);
00734 gStyle->SetPadTopMargin(0.185);
00735 gStyle->SetPadLeftMargin(0.115);
00736 gStyle->SetPadRightMargin(0.035);
00737 }
00738 if( HistoType == "Evol" && opt_plot == "SAME n")
00739 {
00740 gStyle->SetPadBottomMargin(0.110);
00741 gStyle->SetPadTopMargin(0.1);
00742 gStyle->SetPadLeftMargin(0.115);
00743 gStyle->SetPadRightMargin(0.035);
00744 }
00745
00746 if( HistoType == "EvolProj" && opt_plot == "ONLYONE")
00747 {
00748 gStyle->SetPadBottomMargin(0.1275);
00749 gStyle->SetPadTopMargin(0.165);
00750 gStyle->SetPadLeftMargin(0.15);
00751 gStyle->SetPadRightMargin(0.05);
00752 }
00753 if( HistoType == "EvolProj" && opt_plot == "SAME")
00754 {
00755 gStyle->SetPadBottomMargin(0.110);
00756 gStyle->SetPadTopMargin(0.185);
00757 gStyle->SetPadLeftMargin(0.115);
00758 gStyle->SetPadRightMargin(0.035);
00759 }
00760 if( HistoType == "EvolProj" && opt_plot == "SAME n")
00761 {
00762 gStyle->SetPadBottomMargin(0.110);
00763 gStyle->SetPadTopMargin(0.1);
00764 gStyle->SetPadLeftMargin(0.115);
00765 gStyle->SetPadRightMargin(0.035);
00766 }
00767 }
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778 void TEcnaParHistos::SetViewHistoStats(TH1D* histo, const TString HistoType)
00779 {
00780
00781
00782 Bool_t b_true = kTRUE;
00783 Bool_t b_false = kFALSE;
00784
00785 histo->SetStats(b_false);
00786
00787 if(HistoType == "Global"){histo->SetStats(b_false);}
00788 if(HistoType == "Proj" || HistoType == "SampProj" ){histo->SetStats(b_true);}
00789 }
00790
00791 void TEcnaParHistos::SetViewHistoOffsets(TH1D* histo, const TString HistoType, const TString opt_plot)
00792 {
00793
00794
00795 if(HistoType == "Global")
00796 {
00797
00798 histo->GetXaxis()->SetTitleOffset((Float_t)1.05);
00799 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00800
00801 histo->GetXaxis()->SetLabelOffset((Float_t)0.006);
00802 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00803
00804 histo->GetXaxis()->SetTickLength((Float_t)0.03);
00805 histo->GetXaxis()->SetNdivisions((Int_t)510);
00806
00807
00808 histo->GetYaxis()->SetTitleOffset((Float_t)1.5);
00809 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00810
00811 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00812 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00813
00814 histo->GetYaxis()->SetTickLength((Float_t)0.03);
00815 histo->GetYaxis()->SetNdivisions((Int_t)510);
00816 }
00817
00818 if(HistoType == "Proj" || HistoType == "SampGlobal" || HistoType == "SampProj" )
00819 {
00820
00821 histo->GetXaxis()->SetTitleOffset((Float_t)1.05);
00822 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00823
00824 histo->GetXaxis()->SetLabelOffset((Float_t)0.006);
00825 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00826
00827 histo->GetXaxis()->SetTickLength((Float_t)0.03);
00828 histo->GetXaxis()->SetNdivisions((Int_t)510);
00829
00830
00831 histo->GetYaxis()->SetTitleOffset((Float_t)1.75);
00832 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00833
00834 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00835 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00836
00837 histo->GetYaxis()->SetTickLength((Float_t)0.03);
00838 histo->GetYaxis()->SetNdivisions((Int_t)510);
00839 }
00840
00841 if( HistoType == "H1Basic" || HistoType == "Evol" ||
00842 ( HistoType == "EvolProj" && !(opt_plot == "SAME" || opt_plot == "SAME n") ) )
00843 {
00844
00845 histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
00846 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00847
00848 histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
00849 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00850
00851 histo->GetXaxis()->SetTickLength((Float_t)0.03);
00852 histo->GetXaxis()->SetNdivisions((Int_t)510);
00853
00854
00855 histo->GetYaxis()->SetTitleOffset((Float_t)1.75);
00856 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00857
00858 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00859 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00860
00861 histo->GetYaxis()->SetTickLength((Float_t)0.03);
00862 histo->GetYaxis()->SetNdivisions((Int_t)510);
00863 }
00864
00865 if( HistoType == "EvolProj" && (opt_plot == "SAME" || opt_plot == "SAME n") )
00866 {
00867
00868 histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
00869 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00870
00871 histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
00872 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00873
00874 histo->GetXaxis()->SetTickLength((Float_t)0.03);
00875 histo->GetXaxis()->SetNdivisions((Int_t)510);
00876
00877
00878 histo->GetYaxis()->SetTitleOffset((Float_t)1.25);
00879 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00880
00881 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00882 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00883
00884 histo->GetYaxis()->SetTickLength((Float_t)0.03);
00885 histo->GetYaxis()->SetNdivisions((Int_t)510);
00886 }
00887
00888 if(HistoType == "colz")
00889 {
00890
00891 histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
00892 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00893
00894 histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
00895 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00896
00897 histo->GetXaxis()->SetTickLength((Float_t)0.03);
00898 histo->GetXaxis()->SetNdivisions((Int_t)510);
00899
00900
00901 histo->GetYaxis()->SetTitleOffset((Float_t)1.45);
00902 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00903
00904 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00905 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00906
00907 histo->GetYaxis()->SetTickLength((Float_t)0.03);
00908 histo->GetYaxis()->SetNdivisions((Int_t)510);
00909 }
00910
00911 if(HistoType == "lego" || HistoType == "surf" )
00912 {
00913
00914 histo->GetXaxis()->SetTitleOffset((Float_t)1.7);
00915 histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00916
00917 histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
00918 histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00919
00920 histo->GetXaxis()->SetTickLength((Float_t)0.03);
00921 histo->GetXaxis()->SetNdivisions((Int_t)510);
00922
00923
00924 histo->GetYaxis()->SetTitleOffset((Float_t)1.85);
00925 histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00926
00927 histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00928 histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00929
00930 histo->GetYaxis()->SetTickLength((Float_t)0.03);
00931 histo->GetYaxis()->SetNdivisions((Int_t)510);
00932 }
00933
00934 if(HistoType == "Stin")
00935 {
00936
00937 histo->GetXaxis()->SetTitleOffset((Float_t)9999.);
00938 histo->GetXaxis()->SetTitleSize((Float_t)0.05);
00939
00940 histo->GetXaxis()->SetLabelOffset((Float_t)9999.);
00941 histo->GetXaxis()->SetLabelSize((Float_t)0.);
00942
00943 histo->GetXaxis()->SetNdivisions((Int_t)1);
00944 histo->GetXaxis()->SetTickLength((Float_t)0.);
00945
00946
00947 histo->GetYaxis()->SetTitleOffset((Float_t)9999.);
00948 histo->GetYaxis()->SetTitleSize((Float_t)0.05);
00949
00950 histo->GetYaxis()->SetLabelOffset((Float_t)9999.);
00951 histo->GetYaxis()->SetLabelSize((Float_t)0.);
00952
00953 histo->GetYaxis()->SetNdivisions((Int_t)1);
00954 histo->GetYaxis()->SetTickLength((Float_t)0.);
00955 }
00956
00957 if( HistoType == "Stex2DEB" || HistoType == "Stex2DEE" || HistoType == "Stex2DEENb" ||
00958 HistoType == "Stas2DEB" || HistoType == "Stas2DEE" )
00959 {
00960
00961 histo->GetXaxis()->SetTitleOffset((Float_t)9999.);
00962 histo->GetXaxis()->SetTitleSize((Float_t)0.075);
00963
00964 histo->GetXaxis()->SetLabelOffset((Float_t)9999.);
00965 histo->GetXaxis()->SetLabelSize((Float_t)0.);
00966
00967 histo->GetXaxis()->SetNdivisions((Int_t)1);
00968 histo->GetXaxis()->SetTickLength((Float_t)0.);
00969
00970
00971 histo->GetYaxis()->SetTitleOffset((Float_t)9999.);
00972 histo->GetYaxis()->SetTitleSize((Float_t)0.075);
00973
00974 histo->GetYaxis()->SetLabelOffset((Float_t)9999.);
00975 histo->GetYaxis()->SetLabelSize((Float_t)0.);
00976
00977 histo->GetYaxis()->SetNdivisions((Int_t)1);
00978 histo->GetYaxis()->SetTickLength((Float_t)0.);
00979 }
00980 }
00981
00982
00983 Float_t TEcnaParHistos::AxisTitleOffset()
00984 {
00985 return AxisTitleOffset("");
00986 }
00987 Float_t TEcnaParHistos::AxisTitleOffset(const TString opt)
00988 {
00989 Float_t tit_off = 1.;
00990
00991 if( opt == "" ){tit_off = 0.055;}
00992 if( opt == "Towx" ){tit_off = 1.15;}
00993 if( opt == "Towy" ){tit_off = 1.15;}
00994 if( opt == "SMx" ){tit_off = 1.15;}
00995 if( opt == "SMy" ){tit_off = 0.5;}
00996 if( opt == "SMyInEB" ){tit_off = 0.7;}
00997 if( opt == "EBy" ){tit_off = 1.;}
00998 if( opt == "EBx" ){tit_off = 1.3;}
00999
01000 if( opt == "SCx" ){tit_off = 1.15;}
01001 if( opt == "SCy" ){tit_off = 1.15;}
01002 if( opt == "Deex"){tit_off = 0.75;}
01003 if( opt == "Deey"){tit_off = 1.2;}
01004 if( opt == "EEx" ){tit_off = 1.2;}
01005 if( opt == "EEy" ){tit_off = 1.;}
01006
01007 return tit_off;
01008 }
01009
01010 Float_t TEcnaParHistos::AxisTitleSize()
01011 {
01012 return AxisTitleSize("");
01013 }
01014 Float_t TEcnaParHistos::AxisTitleSize(const TString opt)
01015 {
01016 Float_t tit_siz = 0.045;
01017 if( opt == "" ){tit_siz = 0.045;}
01018 return tit_siz;
01019 }
01020
01021 Float_t TEcnaParHistos::AxisLabelOffset()
01022 {
01023 return AxisLabelOffset("");
01024 }
01025 Float_t TEcnaParHistos::AxisLabelOffset(const TString opt)
01026 {
01027 Float_t lab_off = 0.02;
01028 if( opt == "" ){lab_off = 0.02;}
01029
01030 if( opt == "Towx"){lab_off = 0.01;}
01031 if( opt == "Towy"){lab_off = 0.03;}
01032 if( opt == "SMx" ){lab_off = 0.01;}
01033 if( opt == "SMy" ){lab_off = 0.015;}
01034 if( opt == "EBx" ){lab_off = 0.03;}
01035 if( opt == "EBy" ){lab_off = 0.015;}
01036
01037 if( opt == "SCx" ){lab_off = 0.01;}
01038 if( opt == "SCy" ){lab_off = 0.03;}
01039 if( opt == "Deex"){lab_off = 0.002;}
01040 if( opt == "Deey"){lab_off = 0.03;}
01041 if( opt == "EEx" ){lab_off = 0.015;}
01042 if( opt == "EEy" ){lab_off = 0.02;}
01043
01044 return lab_off;
01045 }
01046
01047 Float_t TEcnaParHistos::AxisLabelSize()
01048 {
01049 return AxisLabelSize("");
01050 }
01051 Float_t TEcnaParHistos::AxisLabelSize(const TString opt)
01052 {
01053 Float_t lab_siz = 0.035;
01054 if( opt == "SMx" ){lab_siz = 0.05;}
01055 if( opt == "SMy" ){lab_siz = 0.05;}
01056 if( opt == "EBx" ){lab_siz = 0.04;}
01057 if( opt == "EBy" ){lab_siz = 0.04;}
01058 return lab_siz;
01059 }
01060
01061 Float_t TEcnaParHistos::AxisTickSize()
01062 {
01063 return AxisTickSize("");
01064 }
01065 Float_t TEcnaParHistos::AxisTickSize(const TString opt)
01066 {
01067
01068 Float_t tic_siz = 0.;
01069 if( opt == "Dee" ){tic_siz = 0.;}
01070 if( opt == "Deex" ){tic_siz = 0.01;}
01071 if( opt == "Deey" ){tic_siz = 0.02;}
01072 if( opt == "SMx" ){tic_siz = 0.03;}
01073 if( opt == "SMy" ){tic_siz = 0.0075;}
01074 if( opt == "EEx" ){tic_siz = 0.06;}
01075 if( opt == "EEy" ){tic_siz = 0.005;}
01076
01077 return tic_siz;
01078 }
01079
01080
01081 void TEcnaParHistos::SetViewGraphOffsets(TGraph* graph, const TString HistoType)
01082 {
01083
01084
01085 if( (HistoType == "H1Basic") || (HistoType == "Evol") )
01086 {
01087
01088 graph->GetXaxis()->SetTitleOffset((Float_t)1.10);
01089 graph->GetXaxis()->SetTitleSize((Float_t)0.04);
01090
01091 graph->GetXaxis()->SetLabelOffset((Float_t)0.015);
01092 graph->GetXaxis()->SetLabelSize((Float_t)0.04);
01093
01094 graph->GetXaxis()->SetTickLength((Float_t)0.02);
01095 graph->GetXaxis()->SetNdivisions((Int_t)510);
01096
01097
01098 graph->GetYaxis()->SetTitleOffset((Float_t)1.25);
01099 graph->GetYaxis()->SetTitleSize((Float_t)0.04);
01100
01101 graph->GetYaxis()->SetLabelOffset((Float_t)0.01);
01102 graph->GetYaxis()->SetLabelSize((Float_t)0.04);
01103
01104 graph->GetYaxis()->SetTickLength((Float_t)0.03);
01105 graph->GetYaxis()->SetNdivisions((Int_t)510);
01106 }
01107 }
01108
01109 Float_t TEcnaParHistos::DeeOffsetX(const TString opt_plot, const Int_t& DeeNumber)
01110 {
01111 Float_t offset = 0;
01112 if( opt_plot == "Dee" ){offset = 0;}
01113 if( opt_plot == "EE" )
01114 {
01115 Double_t vertic_empty_strip_1 = 1.;
01116 if( DeeNumber == 1 ){offset = vertic_empty_strip_1
01117 + fEcal->MaxStinHocoInStex()+ 2*fEcal->MaxStinHocoInStex() + 1.;}
01118 if( DeeNumber == 2 ){offset = vertic_empty_strip_1 + 2*fEcal->MaxStinHocoInStex() + 1.;}
01119 if( DeeNumber == 3 ){offset = vertic_empty_strip_1 + fEcal->MaxStinHocoInStex();}
01120 if( DeeNumber == 4 ){offset = vertic_empty_strip_1 + 0.;}
01121 }
01122 return offset;
01123 }
01124
01125
01126 Float_t TEcnaParHistos::DeeNameOffsetX(const Int_t& DeeNumber)
01127 {
01128 Float_t offset = 0;
01129
01130 if( DeeNumber == 1 ){offset = 8.;}
01131 if( DeeNumber == 2 ){offset = 0.;}
01132 if( DeeNumber == 3 ){offset = 7.6;}
01133 if( DeeNumber == 4 ){offset = -0.5;}
01134
01135 return offset;
01136 }
01137
01138 Float_t TEcnaParHistos::DeeNumberOffsetX(const TString opt_plot, const Int_t& DeeNumber)
01139 {
01140 Float_t offset = 0;
01141
01142 if( opt_plot == "Dee" )
01143 {
01144 if( DeeNumber == 1 ){offset = 2.5;}
01145 if( DeeNumber == 2 ){offset = 41.5;}
01146 if( DeeNumber == 3 ){offset = 2.5;}
01147 if( DeeNumber == 4 ){offset = 41.5;}
01148 }
01149 if( opt_plot == "EE" )
01150 {
01151 if( DeeNumber == 1 ){offset = 0.42;}
01152 if( DeeNumber == 2 ){offset = 8.15;}
01153 if( DeeNumber == 3 ){offset = 0.42;}
01154 if( DeeNumber == 4 ){offset = 8.15;}
01155 }
01156 return offset;
01157 }
01158
01159
01160
01161
01162
01163
01164
01165
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176
01177 TPaveText* TEcnaParHistos::SetPaveGeneralComment(const TString comment)
01178 {
01179
01180
01181 TPaveText* title_g1;
01182
01183 if( comment != "" )
01184 {
01185 fCnew++;
01186
01187 Double_t pav_gen_xgauche = BoxLeftX("general_comment");
01188 Double_t pav_gen_xdroite = BoxRightX("general_comment");
01189 Double_t pav_gen_ybas = BoxBottomY("general_comment");
01190 Double_t pav_gen_yhaut = BoxTopY("general_comment");
01191
01192 title_g1 =
01193 new TPaveText(pav_gen_xgauche, pav_gen_ybas,
01194 pav_gen_xdroite, pav_gen_yhaut); fCnewRoot++;
01195
01196 Option_t* opt_pav = "arc"; title_g1->SetOption(opt_pav);
01197
01198 TString tit_gen = comment.Data();
01199
01200 title_g1->AddText(tit_gen);
01201
01202
01203 Int_t cTextPaveAlign = 12; title_g1->SetTextAlign(cTextPaveAlign);
01204
01205 Int_t cTextPaveFont = 40; title_g1->SetTextFont(cTextPaveFont);
01206
01207 Float_t cTextPaveSize = 0.04; title_g1->SetTextSize(cTextPaveSize);
01208 Int_t cTextBorderSize = 0; title_g1->SetBorderSize(cTextBorderSize);
01209 Double_t cTextPaveRadius = 5.; title_g1->SetCornerRadius(cTextPaveRadius);
01210
01211
01212 fCdelete++;
01213 }
01214 else
01215 {
01216 title_g1 = new TPaveText( 0, 0, 0, 0); title_g1=0; fCnewRoot++;
01217 }
01218 return title_g1;
01219 }
01220
01221 TPaveText* TEcnaParHistos::SetPaveAnalysisRun(const TString ana_type, const Int_t& nb_of_samples,
01222 const Int_t& run_number, const TString run_type,
01223 const Int_t& first_evt, const Int_t& last_evt, const TString nb_col)
01224 {
01225
01226
01227 char* f_in = new char[fgMaxCar]; fCnew++;
01228
01229
01230 Double_t pav_bot_left_xgauche = BoxLeftX("bottom_left_box");
01231 Double_t pav_bot_left_xdroite = BoxRightX("bottom_left_box");
01232 Double_t pav_bot_left_ybas = BoxBottomY("bottom_left_box");
01233 Double_t pav_bot_left_yhaut = BoxTopY("bottom_left_box");
01234
01235 TPaveText *com_bot_left =
01236 new TPaveText(pav_bot_left_xgauche, pav_bot_left_ybas,
01237 pav_bot_left_xdroite, pav_bot_left_yhaut); fCnewRoot++;
01238
01239
01240 Int_t cTextPaveAlign = 12; com_bot_left->SetTextAlign(cTextPaveAlign);
01241
01242 Int_t cTextPaveFont = 100; com_bot_left->SetTextFont(cTextPaveFont);
01243
01244 Float_t cTextPaveSize = 0.025; com_bot_left->SetTextSize(cTextPaveSize);
01245
01246 Int_t cTextBorderSize = 1; com_bot_left->SetBorderSize(cTextBorderSize);
01247
01248 if( nb_col == "TwoCol")
01249 {
01250 cTextPaveSize = 0.035; com_bot_left->SetTextSize(cTextPaveSize);
01251 sprintf(f_in, "Run: %d Samples: 1 - %d", run_number, nb_of_samples);
01252 com_bot_left->AddText(f_in);
01253 cTextPaveSize = 0.035; com_bot_left->SetTextSize(cTextPaveSize);
01254 sprintf(f_in, "Type: %-20s", run_type.Data());
01255 com_bot_left->AddText(f_in);
01256 sprintf(f_in, "Analysis: %-10s Evts range: %d - %d ", ana_type.Data(), first_evt, last_evt);
01257 com_bot_left->AddText(f_in);
01258 }
01259 else
01260 {
01261 cTextPaveSize = 0.0225; com_bot_left->SetTextSize(cTextPaveSize);
01262 sprintf(f_in, "Run: %d ", run_number);
01263 com_bot_left->AddText(f_in);
01264 sprintf(f_in, "Type: %-20s", run_type.Data());
01265 com_bot_left->AddText(f_in);
01266 sprintf(f_in, "Analysis: %-10s ", ana_type.Data());
01267 com_bot_left->AddText(f_in);
01268 Int_t un = 1;
01269 sprintf(f_in, "Samples: %d - %d", un, nb_of_samples);
01270 com_bot_left->AddText(f_in);
01271 sprintf(f_in, "Evts range: %d - %d", first_evt, last_evt);
01272 com_bot_left->AddText(f_in);
01273 }
01274
01275 delete [] f_in; fCdelete++;
01276
01277 return com_bot_left;
01278 }
01279
01280 TPaveText* TEcnaParHistos::SetPaveNbOfEvts(const Int_t& nb_of_evts,
01281 const TString start_date, const TString stop_date,
01282 const TString nb_col)
01283 {
01284
01285
01286 char* f_in = new char[fgMaxCar]; fCnew++;
01287
01288
01289
01290 Double_t pav_bot_right_xgauche = BoxLeftX("bottom_right_box");
01291 Double_t pav_bot_right_xdroite = BoxRightX("bottom_right_box");
01292 Double_t pav_bot_right_ybas = BoxBottomY("bottom_right_box");
01293 Double_t pav_bot_right_yhaut = BoxTopY("bottom_right_box");
01294 TPaveText *com_bot_right =
01295 new TPaveText(pav_bot_right_xgauche, pav_bot_right_ybas,
01296 pav_bot_right_xdroite, pav_bot_right_yhaut); fCnewRoot++;
01297
01298
01299 Int_t cTextPaveAlign = 12; com_bot_right->SetTextAlign(cTextPaveAlign);
01300
01301 Int_t cTextPaveFont = 100; com_bot_right->SetTextFont(cTextPaveFont);
01302
01303 Float_t cTextPaveSize = 0.025; com_bot_right->SetTextSize(cTextPaveSize);
01304
01305 Int_t cTextBorderSize = 1; com_bot_right->SetBorderSize(cTextBorderSize);
01306
01307 if( nb_col == "TwoCol")
01308 {
01309 cTextPaveSize = 0.0325; com_bot_right->SetTextSize(cTextPaveSize);
01310 sprintf(f_in, "First evt: %s %8d events ", start_date.Data(), nb_of_evts);
01311 com_bot_right->AddText(f_in);
01312 sprintf(f_in, "Last evt: %s ", stop_date.Data());
01313 com_bot_right->AddText(f_in);
01314 }
01315 else
01316 {
01317 cTextPaveSize = 0.0225; com_bot_right->SetTextSize(cTextPaveSize);
01318 sprintf(f_in, "%d events", nb_of_evts);
01319 com_bot_right->AddText(f_in);
01320 sprintf(f_in, "First evt: %s ", start_date.Data());
01321 com_bot_right->AddText(f_in);
01322 sprintf(f_in, "Last evt: %s ", stop_date.Data());
01323 com_bot_right->AddText(f_in);
01324 }
01325
01326 delete [] f_in; fCdelete++;
01327
01328 return com_bot_right;
01329 }
01330
01331 TPaveText* TEcnaParHistos::SetPaveEvolNbOfEvtsAna(const TString ana_type, const Int_t& nb_of_samples,
01332 const Int_t& first_req_evt, const Int_t& last_req_evt,
01333 const TString HistoType)
01334 {
01335
01336
01337 char* f_in = new char[fgMaxCar]; fCnew++;
01338
01339
01340 Double_t pav_bot_left_xgauche = BoxLeftX("bottom_left_box");
01341 Double_t pav_bot_left_xdroite = BoxRightX("bottom_left_box");
01342 Double_t pav_bot_left_ybas = BoxBottomY("bottom_left_box");
01343 Double_t pav_bot_left_yhaut = BoxTopY("bottom_left_box");
01344
01345 if( HistoType == "EvolProj" )
01346 {
01347 pav_bot_left_xgauche = BoxLeftX("bottom_left_box_evol");
01348 pav_bot_left_xdroite = BoxRightX("bottom_left_box_evol");
01349 pav_bot_left_ybas = BoxBottomY("bottom_left_box_evol");
01350 pav_bot_left_yhaut = BoxTopY("bottom_left_box_evol");
01351 }
01352
01353 TPaveText *com_bot_left =
01354 new TPaveText(pav_bot_left_xgauche, pav_bot_left_ybas,
01355 pav_bot_left_xdroite, pav_bot_left_yhaut); fCnewRoot++;
01356
01357
01358 Int_t cTextPaveAlign = 12; com_bot_left->SetTextAlign(cTextPaveAlign);
01359
01360 Int_t cTextPaveFont = 100; com_bot_left->SetTextFont(cTextPaveFont);
01361
01362 Float_t cTextPaveSize = 0.03; com_bot_left->SetTextSize(cTextPaveSize);
01363 Int_t cTextBorderSize = 1; com_bot_left->SetBorderSize(cTextBorderSize);
01364
01365 TString analysis_name = ana_type.Data();
01366
01367 sprintf(f_in, "Analysis: %s", analysis_name.Data());
01368 com_bot_left->AddText(f_in);
01369 sprintf(f_in, "Samples: 1 - %d", nb_of_samples);
01370 com_bot_left->AddText(f_in);
01371 sprintf(f_in, "Evts range: %d - %d ", first_req_evt, last_req_evt);
01372 com_bot_left->AddText(f_in);
01373
01374 delete [] f_in; fCdelete++;
01375
01376 return com_bot_left;
01377 }
01378
01379 TPaveText* TEcnaParHistos::SetPaveEvolRuns(const Int_t& start_evol_run, const TString start_evol_date,
01380 const Int_t& stop_evol_run, const TString stop_evol_date,
01381 const TString opt_plot, const TString HistoType)
01382 {
01383
01384
01385 char* f_in = new char[fgMaxCar]; fCnew++;
01386
01387
01388 Double_t pav_border_xgauche = BoxLeftX("bottom_right_box_evol");
01389 Double_t pav_border_xdroite = BoxRightX("bottom_right_box_evol");
01390 Double_t pav_border_ybas = BoxBottomY("bottom_right_box_evol");
01391 Double_t pav_border_yhaut = BoxTopY("bottom_right_box_evol");
01392
01393 if( opt_plot == "SAME n" )
01394 {
01395 pav_border_xgauche = BoxLeftX("bottom_right_box_evpr");
01396 pav_border_xdroite = BoxRightX("bottom_right_box_evpr");
01397 pav_border_ybas = BoxBottomY("top_right_box_EB");
01398 pav_border_yhaut = BoxTopY("top_right_box_EB");
01399 }
01400
01401 TPaveText *pav_evol_runs =
01402 new TPaveText(pav_border_xgauche, pav_border_ybas,
01403 pav_border_xdroite, pav_border_yhaut); fCnewRoot++;
01404
01405
01406 Int_t cTextPaveAlign = 12; pav_evol_runs->SetTextAlign(cTextPaveAlign);
01407
01408
01409 Int_t cTextPaveFont = 100; pav_evol_runs->SetTextFont(cTextPaveFont);
01410
01411 Float_t cTextPaveSize = 0.025;
01412 if( HistoType == "Evol" || HistoType == "EvolProj"){cTextPaveSize = 0.0225;}
01413
01414 pav_evol_runs->SetTextSize(cTextPaveSize);
01415 Int_t cTextBorderSize = 1; pav_evol_runs->SetBorderSize(cTextBorderSize);
01416
01417 if( !( (HistoType == "Evol" && opt_plot == "SAME n") ||
01418 (HistoType == "EvolProj" && opt_plot == "SAME n") ) )
01419 {
01420 sprintf(f_in, "First run: %d", start_evol_run);
01421 pav_evol_runs->AddText(f_in);
01422 sprintf(f_in, "(%s) ", start_evol_date.Data());
01423 pav_evol_runs->AddText(f_in);
01424 sprintf(f_in, "Last run: %d", stop_evol_run);
01425 pav_evol_runs->AddText(f_in);
01426 sprintf(f_in, "(%s) ", stop_evol_date.Data());
01427 pav_evol_runs->AddText(f_in);
01428 }
01429
01430 if( (HistoType == "Evol" && opt_plot == "SAME n") ||
01431 (HistoType == "EvolProj" && opt_plot == "SAME n") )
01432 {
01433 sprintf(f_in, "First run: %d (%s) ", start_evol_run, start_evol_date.Data());
01434 pav_evol_runs->AddText(f_in);
01435 sprintf(f_in, "Last run: %d (%s)", stop_evol_run, stop_evol_date.Data());
01436 pav_evol_runs->AddText(f_in);
01437 }
01438
01439 delete [] f_in; fCdelete++;
01440
01441 return pav_evol_runs;
01442 }
01443
01444 TPaveText* TEcnaParHistos::SetOptionSamePaveBorder(const TString chopt, const TString HistoType)
01445 {
01446
01447
01448
01449
01450
01451
01452 Double_t pav_left_xgauche = BoxLeftX("several_plots_box");
01453 Double_t pav_left_xdroite = BoxRightX("several_plots_box");
01454 Double_t pav_left_ybas = BoxBottomY("several_plots_box");
01455 Double_t pav_left_yhaut = BoxTopY("several_plots_box");
01456
01457 if(chopt == "sevevol")
01458 {
01459 pav_left_xgauche = BoxLeftX("several_evol_box");
01460 pav_left_xdroite = BoxRightX("several_evol_box");
01461 pav_left_ybas = BoxBottomY("several_evol_box");
01462 pav_left_yhaut = BoxTopY("several_evol_box");
01463
01464 if( HistoType == "EvolProj" )
01465 {
01466 pav_left_xgauche = BoxLeftX("several_evpr_box");
01467 pav_left_xdroite = BoxRightX("several_evpr_box");
01468 pav_left_ybas = BoxBottomY("several_evpr_box");
01469 pav_left_yhaut = BoxTopY("several_evpr_box");
01470 }
01471 }
01472
01473 TPaveText *com_several =
01474 new TPaveText(pav_left_xgauche, pav_left_ybas,
01475 pav_left_xdroite, pav_left_yhaut); fCnewRoot++;
01476
01477 return com_several;
01478 }
01479
01480
01481
01482
01483
01484
01485
01486
01487 TPaveText* TEcnaParHistos::SetPaveStas()
01488 {
01489 char* f_in = new char[fgMaxCar]; fCnew++;
01490
01491 Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
01492 Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
01493 Double_t pav_top_left_ybas = BoxBottomY("top_left_box_SM");
01494 Double_t pav_top_left_yhaut = BoxTopY("top_left_box_SM");
01495
01496 TPaveText *com_top_left =
01497 new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
01498 pav_top_left_xdroite, pav_top_left_yhaut); fCnewRoot++;
01499
01500
01501 Int_t cTextPaveAlign = 12; com_top_left->SetTextAlign(cTextPaveAlign);
01502
01503 Int_t cTextPaveFont = 100; com_top_left->SetTextFont(cTextPaveFont);
01504
01505 Float_t cTextPaveSize = 0.04; com_top_left->SetTextSize(cTextPaveSize);
01506 Int_t cTextBorderSize = 1; com_top_left->SetBorderSize(cTextBorderSize);
01507
01508 if ( fFlagSubDet == "EB"){sprintf(f_in, "EB");}
01509 if ( fFlagSubDet == "EE"){sprintf(f_in, "EE");}
01510
01511 com_top_left->AddText(f_in);
01512
01513 delete [] f_in; fCdelete++;
01514
01515 return com_top_left;
01516 }
01517
01518 TPaveText* TEcnaParHistos::SetPaveSM(const TString chopt, const Int_t& SM_number,
01519 const TString EB_type)
01520 {
01521
01522
01523 char* f_in = new char[fgMaxCar]; fCnew++;
01524
01525
01526 Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
01527 Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
01528 Double_t pav_top_left_ybas = BoxBottomY("top_left_box_SM");
01529 Double_t pav_top_left_yhaut = BoxTopY("top_left_box_SM");
01530
01531 if( chopt == "standard" || (chopt == "standGH" && EB_type == "EB-") )
01532 {
01533 pav_top_left_xgauche = BoxLeftX("top_left_box_EB");
01534 pav_top_left_xdroite = BoxRightX("top_left_box_EB");
01535 pav_top_left_ybas = BoxBottomY("top_left_box_EB");
01536 pav_top_left_yhaut = BoxTopY("top_left_box_EB");
01537 }
01538
01539 if( chopt == "standSM" || chopt == "standStex" || (chopt == "standGH" && EB_type == "EB+") )
01540 {
01541 pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
01542 pav_top_left_xdroite = BoxRightX("top_left_box_SM");
01543 pav_top_left_ybas = BoxBottomY("top_left_box_SM");
01544 pav_top_left_yhaut = BoxTopY("top_left_box_SM");
01545 }
01546
01547 if( chopt == "several" )
01548 {
01549 pav_top_left_xgauche = BoxLeftX("several_plots_box");
01550 pav_top_left_xdroite = BoxRightX("several_plots_box");
01551 pav_top_left_ybas = BoxBottomY("several_plots_box");
01552 pav_top_left_yhaut = BoxTopY("several_plots_box");
01553 }
01554
01555 if( chopt == "sevevol" )
01556 {
01557 pav_top_left_xgauche = BoxLeftX("several_evol_box");
01558 pav_top_left_xdroite = BoxRightX("several_evol_box");
01559 pav_top_left_ybas = BoxBottomY("several_evol_box");
01560 pav_top_left_yhaut = BoxTopY("several_evol_box");
01561 }
01562
01563 TPaveText *com_top_left =
01564 new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
01565 pav_top_left_xdroite, pav_top_left_yhaut); fCnewRoot++;
01566
01567
01568 Int_t cTextPaveAlign = 12; com_top_left->SetTextAlign(cTextPaveAlign);
01569
01570 Int_t cTextPaveFont = 100; com_top_left->SetTextFont(cTextPaveFont);
01571
01572 Float_t cTextPaveSize = 0.04; com_top_left->SetTextSize(cTextPaveSize);
01573 Int_t cTextBorderSize = 1; com_top_left->SetBorderSize(cTextBorderSize);
01574
01575 if( chopt == "standard" || chopt == "standSM" || chopt == "standStex" || chopt == "standGH")
01576 {
01577 Int_t sm_nb = SM_number;
01578 if( EB_type == "EB+" ){sprintf(f_in, "EB+%d", sm_nb);}
01579 if( EB_type == "EB-" )
01580 {sm_nb = -SM_number+fEcal->MaxSMInEB()/2;
01581 sprintf(f_in, "EB%d (SM%d)", sm_nb, SM_number);}
01582 com_top_left->AddText(f_in);
01583 }
01584
01585 delete [] f_in; fCdelete++;
01586
01587 return com_top_left;
01588 }
01589
01590 TPaveText* TEcnaParHistos::SetPaveTower(const Int_t& SMtower_X)
01591 {
01592
01593
01594 char* f_in = new char[fgMaxCar]; fCnew++;
01595
01596 Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
01597 Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
01598 Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EB");
01599 Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EB");
01600 TPaveText *com_top_mid =
01601 new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
01602 pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
01603
01604
01605 Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
01606
01607 Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
01608
01609 Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
01610 Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
01611
01612 sprintf(f_in, " Tower: %d ", SMtower_X);
01613 com_top_mid->AddText(f_in);
01614
01615 delete [] f_in; fCdelete++;
01616
01617 return com_top_mid;
01618 }
01619
01620 TPaveText* TEcnaParHistos::SetPaveTowersXY(const Int_t& SMtower_X, const Int_t& SMtower_Y)
01621 {
01622
01623
01624 char* f_in = new char[fgMaxCar]; fCnew++;
01625
01626 Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
01627 Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
01628 Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EB");
01629 Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EB");
01630 TPaveText *com_top_mid =
01631 new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
01632 pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
01633
01634
01635 Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
01636
01637 Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
01638
01639 Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
01640 Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
01641
01642 sprintf(f_in, " Tower X: %d ", SMtower_X);
01643 com_top_mid->AddText(f_in);
01644 sprintf(f_in, " Tower Y: %d ", SMtower_Y);
01645 com_top_mid->AddText(f_in);
01646
01647 delete [] f_in; fCdelete++;
01648
01649 return com_top_mid;
01650 }
01651
01652
01653 TPaveText* TEcnaParHistos::SetPaveCrystal(const Int_t& StexCrys, const Int_t& StexStinA,
01654 const Int_t& StinEcha)
01655 {
01656 Int_t arg_AlreadyRead = 0;
01657 Int_t flag_all_samples = 0;
01658 return SetPaveCrystal(StexCrys, StexStinA, StinEcha, arg_AlreadyRead, flag_all_samples);
01659 }
01660
01661 TPaveText* TEcnaParHistos::SetPaveCrystal(const Int_t& StexCrys, const Int_t& StexStinA,
01662 const Int_t& StinEcha, const Int_t& arg_AlreadyRead,
01663 const Int_t& flag_all_samples)
01664 {
01665
01666
01667 char* f_in = new char[fgMaxCar]; fCnew++;
01668
01669
01670 Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
01671 Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
01672 Double_t pav_top_right_ybas = BoxBottomY("top_right_box_EB");
01673 Double_t pav_top_right_yhaut = BoxTopY("top_right_box_EB");
01674 if( fFlagSubDet == "EE" )
01675 {
01676 pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
01677 pav_top_right_xdroite = BoxRightX("top_right_box_EE");
01678 pav_top_right_ybas = BoxBottomY("top_right_box_EE");
01679 pav_top_right_yhaut = BoxTopY("top_right_box_EE");
01680 }
01681
01682 TPaveText *com_top_right =
01683 new TPaveText(pav_top_right_xgauche, pav_top_right_ybas,
01684 pav_top_right_xdroite, pav_top_right_yhaut); fCnewRoot++;
01685
01686
01687 Int_t cTextPaveAlign = 12; com_top_right->SetTextAlign(cTextPaveAlign);
01688
01689 Int_t cTextPaveFont = 100; com_top_right->SetTextFont(cTextPaveFont);
01690
01691 Float_t cTextPaveSize = 0.03; com_top_right->SetTextSize(cTextPaveSize);
01692 Int_t cTextBorderSize = 1; com_top_right->SetBorderSize(cTextBorderSize);
01693
01694 if( fFlagSubDet == "EB" )
01695 {
01696 if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
01697 {sprintf(f_in, "Channel: %d ", StinEcha);}
01698 if( arg_AlreadyRead == 1 && flag_all_samples == 1 )
01699 {sprintf(f_in, "Channel: 0 to %d", fEcal->MaxCrysInStin()-1 );}
01700 com_top_right->AddText(f_in);
01701 if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
01702 {sprintf(f_in, "Crystal in SM: %d ", StexCrys);
01703 com_top_right->AddText(f_in);}
01704 }
01705
01706 if( fFlagSubDet == "EE" )
01707 {
01708 Int_t StinEchap = StinEcha+1;
01709 if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
01710 {sprintf(f_in, "Xtal in SC: %d ", StinEchap);}
01711 if( arg_AlreadyRead == 1 && flag_all_samples == 1 )
01712 {sprintf(f_in, "Xtal in SC: 1 to %d", fEcal->MaxCrysInStin());}
01713 com_top_right->AddText(f_in);
01714 if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
01715 {
01716 Int_t IX_Dee_crys = StexCrys/fEcal->MaxCrysIYInDee() + 1;
01717 Int_t IY_Dee_crys = StexCrys%fEcal->MaxCrysIYInDee();
01718 if( IY_Dee_crys == 0 ){IX_Dee_crys--; IY_Dee_crys = fEcal->MaxCrysIYInDee();}
01719 sprintf(f_in, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
01720 com_top_right->AddText(f_in);
01721 }
01722 }
01723
01724 delete [] f_in; fCdelete++;
01725
01726 return com_top_right;
01727 }
01728
01729 TPaveText* TEcnaParHistos::SetPaveCrystalSample(const Int_t& StexCrys, const Int_t& StexStinA,
01730 const Int_t& StinEcha, const Int_t& iSample)
01731 {
01732
01733
01734 char* f_in = new char[fgMaxCar]; fCnew++;
01735
01736 Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
01737 Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
01738 Double_t pav_top_right_ybas = BoxBottomY("top_right_box_EB");
01739 Double_t pav_top_right_yhaut = BoxTopY("top_right_box_EB");
01740 if( fFlagSubDet == "EE" )
01741 {
01742 pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
01743 pav_top_right_xdroite = BoxRightX("top_right_box_EE");
01744 pav_top_right_ybas = BoxBottomY("top_right_box_EE");
01745 pav_top_right_yhaut = BoxTopY("top_right_box_EE");
01746 }
01747
01748 TPaveText *com_top_right =
01749 new TPaveText(pav_top_right_xgauche, pav_top_right_ybas,
01750 pav_top_right_xdroite, pav_top_right_yhaut); fCnewRoot++;
01751
01752
01753 Int_t cTextPaveAlign = 12; com_top_right->SetTextAlign(cTextPaveAlign);
01754
01755 Int_t cTextPaveFont = 100; com_top_right->SetTextFont(cTextPaveFont);
01756
01757 Float_t cTextPaveSize = 0.03; com_top_right->SetTextSize(cTextPaveSize);
01758 Int_t cTextBorderSize = 1; com_top_right->SetBorderSize(cTextBorderSize);
01759
01760
01761 if( fFlagSubDet == "EB" )
01762 {
01763 sprintf(f_in, " Channel: %d ", StinEcha);
01764 com_top_right->AddText(f_in);
01765 sprintf(f_in, " Crystal in SM: %d ", StexCrys);
01766 com_top_right->AddText(f_in);
01767 }
01768
01769 if( fFlagSubDet == "EE" )
01770 {
01771 Int_t StinEchap = StinEcha+1;
01772 sprintf(f_in, " Channel: %d ", StinEchap);
01773 com_top_right->AddText(f_in);
01774 Int_t IX_Dee_crys = StexCrys/fEcal->MaxCrysIYInDee() + 1;
01775 Int_t IY_Dee_crys = StexCrys%fEcal->MaxCrysIYInDee();
01776 if( IY_Dee_crys == 0 ){IX_Dee_crys--; IY_Dee_crys = fEcal->MaxCrysIYInDee();}
01777 sprintf(f_in, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
01778 com_top_right->AddText(f_in);
01779 }
01780
01781 Int_t iSample_p = iSample+1;
01782 sprintf(f_in, " Sample: %d ", iSample_p);
01783 com_top_right->AddText(f_in);
01784
01785 delete [] f_in; fCdelete++;
01786
01787 return com_top_right;
01788 }
01789
01790 TPaveText* TEcnaParHistos::SetPaveLVRB(const Int_t& SMNumber, const Int_t& SMtower)
01791 {
01792
01793
01794
01795 Double_t pav_bot_xgauche = BoxLeftX("bottom_left_box");
01796 Double_t pav_bot_xdroite = BoxRightX("bottom_right_box");
01797 Double_t pav_bot_ybas = BoxBottomY("bottom_left_box");
01798 Double_t pav_bot_yhaut = BoxTopY("bottom_left_box");
01799 TPaveText *com_bot_mid =
01800 new TPaveText(pav_bot_xgauche, pav_bot_ybas,
01801 pav_bot_xdroite, pav_bot_yhaut); fCnewRoot++;
01802
01803 Color_t couleur_noir = ColorDefinition("noir");
01804 Color_t couleur_rouge = SetColorsForNumbers("lvrb_top");
01805 Color_t couleur_bleu_fonce = SetColorsForNumbers("lvrb_bottom");
01806
01807 if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
01808 {
01809 TText *t1 = com_bot_mid->AddText(" <= IP (#eta = 0) (#eta = +85) => ");
01810 t1->SetTextColor(couleur_noir);
01811 }
01812
01813 if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
01814 {
01815 TText *t2 = com_bot_mid->AddText(" <= (#eta = -85) IP (#eta = 0) => ");
01816 t2->SetTextColor(couleur_noir);
01817 }
01818
01819 if(fEcalNumbering->GetTowerLvrbType(SMtower) == "top")
01820 {
01821 TText *t3 = 0;
01822 if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
01823 {t3 = com_bot_mid->AddText(" <=== LVRB ");}
01824 if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
01825 {t3 = com_bot_mid->AddText(" LVRB ===> ");}
01826 t3->SetTextColor(couleur_rouge);
01827 }
01828
01829 if(fEcalNumbering->GetTowerLvrbType(SMtower) == "bottom")
01830 {
01831 TText *t4 = 0;
01832 if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
01833 {t4 = com_bot_mid->AddText(" LVRB ===> ");}
01834 if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
01835 {t4 = com_bot_mid->AddText(" <=== LVRB ");}
01836 t4->SetTextColor(couleur_bleu_fonce);
01837 }
01838 return com_bot_mid;
01839
01840 }
01841
01842 Color_t TEcnaParHistos::SetColorsForNumbers(const TString chtype_number)
01843 {
01844
01845
01846 Color_t couleur = ColorDefinition("noir");
01847
01848 if ( chtype_number == "crystal" ){couleur = ColorDefinition("noir");}
01849 if ( chtype_number == "lvrb_top" ){couleur = ColorDefinition("rouge");}
01850 if ( chtype_number == "lvrb_bottom" ){couleur = ColorDefinition("bleu_fonce");}
01851
01852 return couleur;
01853 }
01854
01855
01856
01857
01858
01859
01860
01861
01862 TPaveText* TEcnaParHistos::SetPaveDee(const TString chopt, const Int_t& DeeNumber,
01863 const TString DeeType)
01864 {
01865
01866
01867 char* f_in = new char[fgMaxCar]; fCnew++;
01868
01869
01870 Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
01871 Double_t pav_top_left_xdroite = BoxRightX("top_left_box_EE");
01872 Double_t pav_top_left_ybas = BoxBottomY("top_left_box_EE");
01873 Double_t pav_top_left_yhaut = BoxTopY("top_left_box_EE");
01874
01875 if(chopt == "standard" || chopt == "standGH")
01876 {
01877 pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
01878 pav_top_left_xdroite = BoxRightX("top_left_box_EE");
01879 pav_top_left_ybas = BoxBottomY("top_left_box_EE");
01880 pav_top_left_yhaut = BoxTopY("top_left_box_EE");
01881 }
01882
01883 if( chopt == "standDee" || chopt == "standStex" )
01884 {
01885 pav_top_left_xgauche = BoxLeftX("top_left_box_Dee");
01886 pav_top_left_xdroite = BoxRightX("top_left_box_Dee");
01887 pav_top_left_ybas = BoxBottomY("top_left_box_Dee");
01888 pav_top_left_yhaut = BoxTopY("top_left_box_Dee");
01889 }
01890
01891 if(chopt == "several")
01892 {
01893 pav_top_left_xgauche = BoxLeftX("several_plots_box");
01894 pav_top_left_xdroite = BoxRightX("several_plots_box");
01895 pav_top_left_ybas = BoxBottomY("several_plots_box");
01896 pav_top_left_yhaut = BoxTopY("several_plots_box");
01897 }
01898 if(chopt == "sevevol")
01899 {
01900 pav_top_left_xgauche = BoxLeftX("several_evol_box");
01901 pav_top_left_xdroite = BoxRightX("several_evol_box");
01902 pav_top_left_ybas = BoxBottomY("several_evol_box");
01903 pav_top_left_yhaut = BoxTopY("several_evol_box");
01904 }
01905
01906 TPaveText *com_top_left =
01907 new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
01908 pav_top_left_xdroite, pav_top_left_yhaut); fCnewRoot++;
01909
01910
01911 Int_t cTextPaveAlign = 12; com_top_left->SetTextAlign(cTextPaveAlign);
01912
01913 Int_t cTextPaveFont = 100; com_top_left->SetTextFont(cTextPaveFont);
01914
01915 Float_t cTextPaveSize = 0.04; com_top_left->SetTextSize(cTextPaveSize);
01916 Int_t cTextBorderSize = 1; com_top_left->SetBorderSize(cTextBorderSize);
01917
01918 if( chopt == "standard" )
01919 {
01920 sprintf(f_in, " Dee: %d", DeeNumber);
01921 com_top_left->AddText(f_in);
01922 sprintf(f_in, " (%s)", DeeType.Data());
01923 com_top_left->AddText(f_in);
01924 }
01925
01926 if( chopt == "standDee" || chopt == "standStex" || chopt == "standGH" )
01927 {
01928 sprintf(f_in, " Dee: %d (%s) ", DeeNumber, DeeType.Data());
01929 com_top_left->AddText(f_in);
01930 }
01931
01932 delete [] f_in; fCdelete++;
01933
01934 return com_top_left;
01935 }
01936
01937 TPaveText* TEcnaParHistos::SetPaveSC(const Int_t& DeeSC_X, const Int_t& DeeNumber)
01938 {
01939
01940
01941 char* f_in = new char[fgMaxCar]; fCnew++;
01942
01943 Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
01944 Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
01945 Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EE");
01946 Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EE");
01947 TPaveText *com_top_mid =
01948 new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
01949 pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
01950
01951
01952 Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
01953
01954 Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
01955
01956 Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
01957 Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
01958
01959 sprintf(f_in, "Sector: S%d, SC: %d",
01960 fEcalNumbering->GetDSFrom1DeeSCEcna(DeeNumber, DeeSC_X),
01961 fEcalNumbering->GetDSSCFrom1DeeSCEcna(DeeNumber, DeeSC_X));
01962 com_top_mid->AddText(f_in);
01963 sprintf(f_in, "SC for const.: %d",
01964 fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(DeeNumber,DeeSC_X));
01965 com_top_mid->AddText(f_in);
01966 sprintf(f_in, "Quadrant: %s",
01967 fEcalNumbering->GetSCQuadFrom1DeeSCEcna(DeeSC_X).Data());
01968 com_top_mid->AddText(f_in);
01969 delete [] f_in; fCdelete++;
01970
01971 return com_top_mid;
01972 }
01973
01974 TPaveText* TEcnaParHistos::SetPaveSCsXY(const Int_t& DeeSC_X, const Int_t& DeeSC_Y)
01975 {
01976
01977
01978 char* f_in = new char[fgMaxCar]; fCnew++;
01979
01980 Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
01981 Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
01982 Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EE");
01983 Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EE");
01984 TPaveText *com_top_mid =
01985 new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
01986 pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
01987
01988
01989 Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
01990
01991 Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
01992
01993 Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
01994 Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
01995
01996 sprintf(f_in, "SC X: %d", DeeSC_X);
01997 com_top_mid->AddText(f_in);
01998 sprintf(f_in, "SC Y: %d", DeeSC_Y);
01999 com_top_mid->AddText(f_in);
02000
02001 delete [] f_in; fCdelete++;
02002
02003 return com_top_mid;
02004 }
02005
02006 TPaveText* TEcnaParHistos::SetPaveCxyz(const Int_t& DeeNumber)
02007 {
02008
02009
02010
02011 Double_t pav_bot_xgauche = BoxRightX("bottom_mid_box");
02012 Double_t pav_bot_xdroite = BoxLeftX("bottom_mid_box");
02013 Double_t pav_bot_ybas = BoxBottomY("bottom_left_box");
02014 Double_t pav_bot_yhaut = BoxTopY("bottom_left_box");
02015 TPaveText *com_bot_mid =
02016 new TPaveText(pav_bot_xgauche, pav_bot_ybas,
02017 pav_bot_xdroite, pav_bot_yhaut); fCnewRoot++;
02018
02019
02020
02021
02022
02023 com_bot_mid->SetTextSize(0.0325);
02024
02025 if( DeeNumber == 1 )
02026 {
02027 com_bot_mid->AddText(" y ");
02028 com_bot_mid->AddText(" #uparrow ");
02029 com_bot_mid->AddText(" (Near) x #leftarrow #otimes z (Far) " );
02030 }
02031 if( DeeNumber == 2 )
02032 {
02033 com_bot_mid->AddText(" y ");
02034 com_bot_mid->AddText(" #uparrow ");
02035 com_bot_mid->AddText(" (Near) x #leftarrow #otimes z (Far) " );
02036 }
02037 if( DeeNumber == 3 )
02038 {
02039 com_bot_mid->AddText(" y ");
02040 com_bot_mid->AddText(" #uparrow ");
02041 com_bot_mid->AddText(" (Far) z (#bullet) #rightarrow x (Near) " );
02042 }
02043 if( DeeNumber == 4 )
02044 {
02045 com_bot_mid->AddText(" y ");
02046 com_bot_mid->AddText(" #uparrow ");
02047 com_bot_mid->AddText(" (Far) z (#bullet) #rightarrow x (Near) " );
02048 }
02049
02050
02051 return com_bot_mid;
02052 }
02053
02054
02055
02056
02057
02058
02059 TPaveText* TEcnaParHistos::SetPaveStex(const TString chopt, const Int_t& StexNumber)
02060 {
02061 TPaveText* pav_text = 0;
02062
02063 if( StexNumber > 0 )
02064 {
02065 if ( fFlagSubDet == "EB" )
02066 {
02067 TString EB_type = fEcalNumbering->GetSMHalfBarrel(StexNumber);
02068 pav_text = SetPaveSM(chopt, StexNumber, EB_type);
02069 }
02070 if ( fFlagSubDet == "EE" )
02071 {
02072 TString dee_type = fEcalNumbering->GetEEDeeType(StexNumber);
02073 pav_text = SetPaveDee(chopt, StexNumber, dee_type);
02074 }
02075 }
02076 if( StexNumber == 0 ){pav_text = SetPaveStas();}
02077
02078 return pav_text;
02079 }
02080
02081 TPaveText* TEcnaParHistos::SetPaveStin(const Int_t& StinNumber, const Int_t& StexNumber)
02082 {
02083 TPaveText* pav_text = 0;
02084 if ( fFlagSubDet == "EB"){pav_text = SetPaveTower(StinNumber);}
02085 if ( fFlagSubDet == "EE"){pav_text = SetPaveSC(StinNumber, StexNumber);}
02086 return pav_text;
02087 }
02088
02089 TPaveText* TEcnaParHistos::SetPaveStinsXY(const Int_t& StexStin_X, const Int_t& StexStin_Y)
02090 {
02091 TPaveText* pav_text = 0;
02092 if ( fFlagSubDet == "EB"){pav_text = SetPaveTowersXY(StexStin_X, StexStin_Y);}
02093 if ( fFlagSubDet == "EE"){pav_text = SetPaveSCsXY(StexStin_X, StexStin_Y);}
02094 return pav_text;
02095 }
02096
02097
02098
02099
02100
02101
02102 TString TEcnaParHistos::GetHistoType(const TString HistoCode)
02103 {
02104
02105
02106
02107 TString HistoType;
02108 Int_t MaxCar = fgMaxCar;
02109 HistoType.Resize(MaxCar);
02110 HistoType = "(no quantity type info)";
02111
02112
02113 if ( HistoCode == "D_NOE_ChNb" || HistoCode == "D_Ped_ChNb" ||
02114 HistoCode == "D_TNo_ChNb" || HistoCode == "D_LFN_ChNb" || HistoCode == "D_HFN_ChNb" ||
02115 HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" )
02116 {HistoType = "Global";}
02117
02118
02119
02120 if ( HistoCode == "D_NOE_ChDs" || HistoCode == "D_Ped_ChDs" ||
02121 HistoCode == "D_TNo_ChDs" || HistoCode == "D_LFN_ChDs" || HistoCode == "D_HFN_ChDs" ||
02122 HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" )
02123 {HistoType = "Proj";}
02124
02125
02126 if ( HistoCode == "D_MSp_SpNb" || HistoCode == "D_SSp_SpNb" )
02127 {HistoType = "H1Basic";}
02128
02129
02130 if ( HistoCode == "D_MSp_SpDs" || HistoCode == "D_SSp_SpDs" )
02131 {HistoType = "H1BasicProj";}
02132
02133
02134 if ( HistoCode == "D_Adc_EvNb" ){HistoType = "SampGlobal";}
02135
02136 if ( HistoCode == "D_Adc_EvDs" ){HistoType = "SampProj";}
02137
02138
02139 if ( HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" || HistoCode == "H_MCs_Date" ||
02140 HistoCode == "H_LFN_Date" || HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" )
02141 {HistoType = "Evol";}
02142
02143
02144 if ( HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" || HistoCode == "H_MCs_RuDs" ||
02145 HistoCode == "H_LFN_RuDs" || HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs" )
02146 {HistoType = "EvolProj";}
02147
02148 return HistoType;
02149 }
02150
02151 TString TEcnaParHistos::GetXVarHisto(const TString HistoCode, const TString SubDet, const Int_t& StexNumber)
02152 {
02153
02154
02155
02156 TString HistoType = GetHistoType(HistoCode.Data());
02157
02158 TString XVarHisto;
02159 Int_t MaxCar = fgMaxCar;
02160 XVarHisto.Resize(MaxCar);
02161 XVarHisto = "(no X variable info)";
02162
02163 if( HistoType == "Global" )
02164 {
02165 if( StexNumber == 0 && SubDet == "EB" ){XVarHisto = "Tower number";}
02166 if( StexNumber == 0 && SubDet == "EE" ){XVarHisto = "SC number";}
02167 if( StexNumber != 0){XVarHisto = "Xtal number";}
02168 }
02169 if( HistoType == "Proj" ){XVarHisto = "Bin number";}
02170
02171 if( HistoType == "H1Basic"){XVarHisto = "Sample number";}
02172 if( HistoType == "H1BasicProj"){XVarHisto = "Total noise";}
02173
02174 if( HistoType == "SampGlobal" ){XVarHisto = "Event number";}
02175
02176 if( HistoType == "SampProj" ){XVarHisto = "ADC count";}
02177
02178 if( HistoType == "Evol" ){XVarHisto = "Date";}
02179
02180 if( HistoType == "EvolProj" ){XVarHisto = "Bin number";}
02181
02182 return XVarHisto;
02183
02184 }
02185
02186 TString TEcnaParHistos::GetYVarHisto(const TString HistoCode, const TString SubDet, const Int_t& StexNumber)
02187 {
02188
02189
02190
02191 TString HistoType = GetHistoType(HistoCode.Data());
02192
02193 TString YVarHisto;
02194 Int_t MaxCar = fgMaxCar;
02195 YVarHisto.Resize(MaxCar);
02196 YVarHisto = "(no Y variable info)";
02197
02198 if( HistoType == "Global" )
02199 {
02200 if( HistoCode == "D_NOE_ChNb" ){YVarHisto = "Nb of events";}
02201 if( HistoCode == "D_Ped_ChNb" ){YVarHisto = "Pedestal";}
02202 if( HistoCode == "D_TNo_ChNb" ){YVarHisto = "Total Noise";}
02203 if( HistoCode == "D_MCs_ChNb" ){YVarHisto = "Mean Cor(s,s')";}
02204 if( HistoCode == "D_LFN_ChNb" ){YVarHisto = "Low Freq. Noise";}
02205 if( HistoCode == "D_HFN_ChNb" ){YVarHisto = "High Freq. Noise";}
02206 if( HistoCode == "D_SCs_ChNb" ){YVarHisto = "Sigma Cor(s,s')";}
02207 }
02208
02209 if( HistoType == "Proj" )
02210 {
02211 if( StexNumber == 0 && SubDet == "EB" ){YVarHisto = "Number of towers";}
02212 if( StexNumber == 0 && SubDet == "EE" ){YVarHisto = "Number of SCs";}
02213 if( StexNumber != 0){YVarHisto = "Number of Xtals";}
02214 }
02215
02216 if( HistoType == "H1Basic"){YVarHisto = "ADC count";}
02217 if( HistoType == "H1BasicProj"){YVarHisto = "Number of samples";}
02218
02219 if( HistoType == "SampGlobal" ){YVarHisto = "ADC count";}
02220
02221 if( HistoType == "SampProj" ){YVarHisto = "Number of events";}
02222
02223 if( HistoType == "EvolProj" ){YVarHisto = "Number of runs";}
02224
02225 if( HistoType == "Evol" )
02226 {
02227 if( HistoCode == "H_Ped_Date" ){YVarHisto = "Pedestal";}
02228 if( HistoCode == "H_TNo_Date" ){YVarHisto = "Total Noise";}
02229 if( HistoCode == "H_MCs_Date" ){YVarHisto = "Mean Cor(s,s')";}
02230 if( HistoCode == "H_LFN_Date" ){YVarHisto = "Low Freq. Noise";}
02231 if( HistoCode == "H_HFN_Date" ){YVarHisto = "High Freq. Noise";}
02232 if( HistoCode == "H_SCs_Date" ){YVarHisto = "Sigma Cor(s,s')";}
02233 }
02234
02235
02236
02237
02238
02239
02240 return YVarHisto;
02241
02242 }
02243
02244 TString TEcnaParHistos::GetQuantityName(const TString chqcode)
02245 {
02246
02247
02248 TString chqname;
02249 Int_t MaxCar = fgMaxCar;
02250 chqname.Resize(MaxCar);
02251 chqname = "(no quantity name info)";
02252
02253 if(chqcode == "D_NOE_ChNb"){chqname = "Number of events";}
02254 if(chqcode == "D_NOE_ChDs"){chqname = "Nb of events";}
02255 if(chqcode == "D_Ped_ChNb"){chqname = "Pedestal";}
02256 if(chqcode == "D_Ped_ChDs"){chqname = "Pedestal";}
02257 if(chqcode == "D_TNo_ChNb"){chqname = "Total Noise";}
02258 if(chqcode == "D_TNo_ChDs"){chqname = "Total Noise";}
02259 if(chqcode == "D_MCs_ChNb"){chqname = "Mean Cor(s,s')";}
02260 if(chqcode == "D_MCs_ChDs"){chqname = "Mean Cor(s,s')";}
02261 if(chqcode == "D_LFN_ChNb"){chqname = "Low Freq. Noise";}
02262 if(chqcode == "D_LFN_ChDs"){chqname = "Low Freq. Noise";}
02263 if(chqcode == "D_HFN_ChNb"){chqname = "High Freq. Noise";}
02264 if(chqcode == "D_HFN_ChDs"){chqname = "High Freq. Noise";}
02265 if(chqcode == "D_SCs_ChNb"){chqname = "Sigma Cor(s,s')";}
02266 if(chqcode == "D_SCs_ChDs"){chqname = "Sigma Cor(s,s')";}
02267 if(chqcode == "D_MSp_SpNb"){chqname = "Sample means";}
02268 if(chqcode == "D_MSp_SpDs"){chqname = "Sample means";}
02269 if(chqcode == "D_SSp_SpNb"){chqname = "Sample sigmas";}
02270 if(chqcode == "D_SSp_SpDs"){chqname = "Sample sigmas";}
02271 if(chqcode == "D_Adc_EvNb"){chqname = "Sample ADC";}
02272 if(chqcode == "D_Adc_EvDs"){chqname = "Sample ADC distribution";}
02273 if(chqcode == "H_Ped_Date"){chqname = "Pedestal";}
02274 if(chqcode == "H_TNo_Date"){chqname = "Total Noise";}
02275 if(chqcode == "H_MCs_Date"){chqname = "Mean Cor(s,s')";}
02276 if(chqcode == "H_LFN_Date"){chqname = "Low Freq. Noise";}
02277 if(chqcode == "H_HFN_Date"){chqname = "High Freq. Noise";}
02278 if(chqcode == "H_SCs_Date"){chqname = "Sigma Cor(s,s')";}
02279 if(chqcode == "H_Ped_RuDs"){chqname = "Pedestal";}
02280 if(chqcode == "H_TNo_RuDs"){chqname = "Total Noise";}
02281 if(chqcode == "H_MCs_RuDs"){chqname = "Mean Cor(s,s')";}
02282 if(chqcode == "H_LFN_RuDs"){chqname = "Low Freq. Noise";}
02283 if(chqcode == "H_HFN_RuDs"){chqname = "High Freq. Noise";}
02284 if(chqcode == "H_SCs_RuDs"){chqname = "Sigma Cor(s,s')";}
02285 return chqname;
02286 }
02287
02288 Double_t TEcnaParHistos::GetYminDefaultValue(const TString chqcode)
02289 {
02290 Double_t vmin = (Double_t)0.;
02291
02292 if(chqcode == "H2LFccMosMatrix"){vmin = (Double_t)-1.;}
02293 if(chqcode == "H2HFccMosMatrix"){vmin = (Double_t)-1.;}
02294 if(chqcode == "H2CorccInStins" ){vmin = (Double_t)-1.;}
02295
02296 if(chqcode == "D_NOE_ChNb"){vmin = (Double_t)0.;}
02297 if(chqcode == "D_Ped_ChNb"){vmin = (Double_t)0.;}
02298 if(chqcode == "D_TNo_ChNb"){vmin = (Double_t)0.;}
02299 if(chqcode == "D_MCs_ChNb"){vmin = (Double_t)-1.;}
02300 if(chqcode == "D_LFN_ChNb"){vmin = (Double_t)0.;}
02301 if(chqcode == "D_HFN_ChNb"){vmin = (Double_t)0.;}
02302 if(chqcode == "D_SCs_ChNb"){vmin = (Double_t)-1.;}
02303
02304 if(chqcode == "D_NOE_ChDs"){vmin = (Double_t)0.1;}
02305 if(chqcode == "D_Ped_ChDs"){vmin = (Double_t)0.1;}
02306 if(chqcode == "D_TNo_ChDs"){vmin = (Double_t)0.1;}
02307 if(chqcode == "D_MCs_ChDs"){vmin = (Double_t)0.1;}
02308 if(chqcode == "D_LFN_ChDs"){vmin = (Double_t)0.1;}
02309 if(chqcode == "D_HFN_ChDs"){vmin = (Double_t)0.1;}
02310 if(chqcode == "D_SCs_ChDs"){vmin = (Double_t)0.1;}
02311
02312 if(chqcode == "D_MSp_SpNb"){vmin = (Double_t)0.;}
02313 if(chqcode == "D_MSp_SpDs"){vmin = (Double_t)0.1;}
02314 if(chqcode == "D_SSp_SpNb"){vmin = (Double_t)0.;}
02315 if(chqcode == "D_SSp_SpDs"){vmin = (Double_t)0.1;}
02316
02317 if(chqcode == "D_Adc_EvNb"){vmin = (Double_t)0.;}
02318 if(chqcode == "D_Adc_EvDs"){vmin = (Double_t)0.1;}
02319
02320 if(chqcode == "H_Ped_Date"){vmin = (Double_t)0.;}
02321 if(chqcode == "H_TNo_Date"){vmin = (Double_t)0.;}
02322 if(chqcode == "H_MCs_Date"){vmin = (Double_t)-1.;}
02323 if(chqcode == "H_LFN_Date"){vmin = (Double_t)0.;}
02324 if(chqcode == "H_HFN_Date"){vmin = (Double_t)0.;}
02325 if(chqcode == "H_SCs_Date"){vmin = (Double_t)0.;}
02326
02327 if(chqcode == "H_Ped_RuDs"){vmin = (Double_t)0.1;}
02328 if(chqcode == "H_TNo_RuDs"){vmin = (Double_t)0.1;}
02329 if(chqcode == "H_MCs_RuDs"){vmin = (Double_t)0.1;}
02330 if(chqcode == "H_LFN_RuDs"){vmin = (Double_t)0.1;}
02331 if(chqcode == "H_HFN_RuDs"){vmin = (Double_t)0.1;}
02332 if(chqcode == "H_SCs_RuDs"){vmin = (Double_t)0.1;}
02333
02334 return vmin;
02335 }
02336
02337 Double_t TEcnaParHistos::GetYmaxDefaultValue(const TString chqcode)
02338 {
02339 Double_t vmax = (Double_t)0.;
02340
02341 if( fFlagSubDet == "EB" )
02342 {
02343 if(chqcode == "H2LFccMosMatrix" ){vmax = (Double_t)1.;}
02344 if(chqcode == "H2HFccMosMatrix" ){vmax = (Double_t)1.;}
02345 if(chqcode == "H2CorccInStins" ){vmax = (Double_t)1.;}
02346
02347 if(chqcode == "D_NOE_ChNb"){vmax = (Double_t)500.;}
02348 if(chqcode == "D_Ped_ChNb"){vmax = (Double_t)500.;}
02349 if(chqcode == "D_TNo_ChNb"){vmax = (Double_t)2.5;}
02350 if(chqcode == "D_LFN_ChNb"){vmax = (Double_t)2.5;}
02351 if(chqcode == "D_HFN_ChNb"){vmax = (Double_t)2.5;}
02352 if(chqcode == "D_MCs_ChNb"){vmax = (Double_t)1.;}
02353 if(chqcode == "D_SCs_ChNb"){vmax = (Double_t)1.5;}
02354
02355 if(chqcode == "D_NOE_ChDs"){vmax = (Double_t)5000.;}
02356 if(chqcode == "D_Ped_ChDs"){vmax = (Double_t)5000.;}
02357 if(chqcode == "D_TNo_ChDs"){vmax = (Double_t)5000.;}
02358 if(chqcode == "D_LFN_ChDs"){vmax = (Double_t)5000.;}
02359 if(chqcode == "D_HFN_ChDs"){vmax = (Double_t)5000.;}
02360 if(chqcode == "D_MCs_ChDs"){vmax = (Double_t)5000.;}
02361 if(chqcode == "D_SCs_ChDs"){vmax = (Double_t)5000.;}
02362
02363 if(chqcode == "D_MSp_SpNb"){vmax = (Double_t)500.;}
02364 if(chqcode == "D_MSp_SpDs"){vmax = (Double_t)10.;}
02365 if(chqcode == "D_SSp_SpNb"){vmax = (Double_t)5.;}
02366 if(chqcode == "D_SSp_SpDs"){vmax = (Double_t)10.;}
02367
02368 if(chqcode == "D_Adc_EvNb"){vmax = (Double_t)500.;}
02369 if(chqcode == "D_Adc_EvDs"){vmax = (Double_t)150.;}
02370
02371 if(chqcode == "H_Ped_Date"){vmax = (Double_t)500.;}
02372 if(chqcode == "H_TNo_Date"){vmax = (Double_t)5.;}
02373 if(chqcode == "H_LFN_Date"){vmax = (Double_t)5.;}
02374 if(chqcode == "H_HFN_Date"){vmax = (Double_t)5.;}
02375 if(chqcode == "H_MCs_Date"){vmax = (Double_t)1.;}
02376 if(chqcode == "H_SCs_Date"){vmax = (Double_t)0.5;}
02377
02378 if(chqcode == "H_Ped_RuDs"){vmax = (Double_t)1000.;}
02379 if(chqcode == "H_TNo_RuDs"){vmax = (Double_t)1000.;}
02380 if(chqcode == "H_LFN_RuDs"){vmax = (Double_t)1000.;}
02381 if(chqcode == "H_HFN_RuDs"){vmax = (Double_t)1000.;}
02382 if(chqcode == "H_MCs_RuDs"){vmax = (Double_t)1000.;}
02383 if(chqcode == "H_SCs_RuDs"){vmax = (Double_t)1000.;}
02384 }
02385
02386 if( fFlagSubDet == "EE" )
02387 {
02388 if(chqcode == "H2LFccMosMatrix"){vmax = (Double_t)1.;}
02389 if(chqcode == "H2HFccMosMatrix"){vmax = (Double_t)1.;}
02390 if(chqcode == "H2CorccInStins" ){vmax = (Double_t)0.05;}
02391
02392 if(chqcode == "D_NOE_ChNb"){vmax = (Double_t)500.;}
02393 if(chqcode == "D_Ped_ChNb"){vmax = (Double_t)500.;}
02394 if(chqcode == "D_TNo_ChNb"){vmax = (Double_t)5.;}
02395 if(chqcode == "D_LFN_ChNb"){vmax = (Double_t)5.;}
02396 if(chqcode == "D_HFN_ChNb"){vmax = (Double_t)5.;}
02397 if(chqcode == "D_MCs_ChNb"){vmax = (Double_t)1.;}
02398 if(chqcode == "D_SCs_ChNb"){vmax = (Double_t)2.5;}
02399
02400 if(chqcode == "D_NOE_ChDs"){vmax = (Double_t)1000.;}
02401 if(chqcode == "D_Ped_ChDs"){vmax = (Double_t)1000.;}
02402 if(chqcode == "D_TNo_ChDs"){vmax = (Double_t)1000.;}
02403 if(chqcode == "D_LFN_ChDs"){vmax = (Double_t)1000.;}
02404 if(chqcode == "D_HFN_ChDs"){vmax = (Double_t)1000.;}
02405 if(chqcode == "D_MCs_ChDs"){vmax = (Double_t)1000.;}
02406 if(chqcode == "D_SCs_ChDs"){vmax = (Double_t)1000.;}
02407
02408 if(chqcode == "D_MSp_SpNb"){vmax = (Double_t)500.;}
02409 if(chqcode == "D_MSp_SpDs"){vmax = (Double_t)1000.;}
02410 if(chqcode == "D_SSp_SpNb"){vmax = (Double_t)5.;}
02411 if(chqcode == "D_SSp_SpDs"){vmax = (Double_t)100.;}
02412
02413 if(chqcode == "D_Adc_EvNb"){vmax = (Double_t)500.;}
02414 if(chqcode == "D_Adc_EvDs"){vmax = (Double_t)1000.;}
02415
02416 if(chqcode == "H_Ped_Date"){vmax = (Double_t)500.;}
02417 if(chqcode == "H_TNo_Date"){vmax = (Double_t)5.;}
02418 if(chqcode == "H_LFN_Date"){vmax = (Double_t)5.;}
02419 if(chqcode == "H_HFN_Date"){vmax = (Double_t)5.;}
02420 if(chqcode == "H_MCs_Date"){vmax = (Double_t)1.;}
02421 if(chqcode == "H_SCs_Date"){vmax = (Double_t)0.5;}
02422
02423 if(chqcode == "H_Ped_RuDs"){vmax = (Double_t)1000.;}
02424 if(chqcode == "H_TNo_RuDs"){vmax = (Double_t)1000.;}
02425 if(chqcode == "H_LFN_RuDs"){vmax = (Double_t)1000.;}
02426 if(chqcode == "H_HFN_RuDs"){vmax = (Double_t)1000.;}
02427 if(chqcode == "H_MCs_RuDs"){vmax = (Double_t)1000.;}
02428 if(chqcode == "H_SCs_RuDs"){vmax = (Double_t)1000.;}
02429 }
02430 return vmax;
02431 }
02432
02433
02434
02435
02436
02437
02438
02439
02440 TString TEcnaParHistos::BuildStandardDetectorCode(const TString UserDetector)
02441 {
02442 TString StandardDetectorCode = "?";
02443
02444 if( UserDetector == "Super-module" || UserDetector == "SuperModule" ||
02445 UserDetector == "super-module" || UserDetector == "SM" )
02446 {StandardDetectorCode = "SM";}
02447
02448 if( UserDetector == "DEE" || UserDetector == "Dee" )
02449 {StandardDetectorCode = "Dee";}
02450
02451 if( UserDetector == "Ecal barrel" || UserDetector == "EcalBarrel" ||
02452 UserDetector == "ecal barrel" || UserDetector == "Barrel" || UserDetector == "barrel" ||
02453 UserDetector == "EB" )
02454 {StandardDetectorCode = "EB";}
02455
02456 if( UserDetector == "Ecal endcap" || UserDetector == "EcalEndcap" ||
02457 UserDetector == "ecal endcap" || UserDetector == "Endcap" || UserDetector == "endcap" ||
02458 UserDetector == "EE" )
02459 {StandardDetectorCode = "EE";}
02460
02461 if( StandardDetectorCode == "?" )
02462 {
02463 cout << "*TEcnaParHistos::BuildStandardDetectorCode(...)> UserDetector = " << UserDetector
02464 << " : code not found (NB: relevant codes can be added in method TEcnaParHistos::BuildStandardDetectorCode)."
02465 << fTTBELL << endl;
02466 }
02467 return StandardDetectorCode;
02468 }
02469
02470
02471 TString TEcnaParHistos::BuildStandardPlotOption(const TString CallingMethod, const TString UserPlotOption)
02472 {
02473 TString StandardPlotOption = "?";
02474
02475 if( CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time" )
02476 {
02477 if( UserPlotOption == "ONLY ONE" || UserPlotOption == "ONLY ONE" ||
02478 UserPlotOption == "Only one" || UserPlotOption == "OnlyOne" ||
02479 UserPlotOption == "" || UserPlotOption == " " ||
02480 UserPlotOption == "ONLYONE" || UserPlotOption == fOnlyOnePlot )
02481 {StandardPlotOption = fOnlyOnePlot;}
02482
02483 if( UserPlotOption == "SAME" || UserPlotOption == "Same" || UserPlotOption == fSeveralPlot )
02484 {StandardPlotOption = fSeveralPlot;}
02485
02486 if( UserPlotOption == "SAME n" || UserPlotOption == "Same n" || UserPlotOption == fSameOnePlot )
02487 {StandardPlotOption = fSameOnePlot;}
02488
02489 if( UserPlotOption == fAllXtalsInStinPlot )
02490 {StandardPlotOption = fAllXtalsInStinPlot;}
02491 }
02492
02493 if( CallingMethod == "1DX" )
02494 {
02495 if( UserPlotOption == "ALL XTALS IN TOWER" || UserPlotOption == "ALL CHANNELS IN TOWER" ||
02496 UserPlotOption == "AllXtalsInTower" || UserPlotOption == "AllChannelsInTower" ||
02497 UserPlotOption == "ALL XTALS IN TOW" || UserPlotOption == "ALL CHANNELS IN TOW" ||
02498 UserPlotOption == "AllXtalsInTow" || UserPlotOption == "AllChannelsInTow" ||
02499 UserPlotOption == "ALL XTALS IN SC" || UserPlotOption == "ALL CHANNELS IN SC" ||
02500 UserPlotOption == "AllXtalsInSC" || UserPlotOption == "AllChannelsInSC" ||
02501 UserPlotOption == "SAME IN TOWER" || UserPlotOption == "SameInTower" ||
02502 UserPlotOption == "SAME IN TOW" || UserPlotOption == "SameInTow" ||
02503 UserPlotOption == "SAME IN SC" || UserPlotOption == "SameInSC" ||
02504 UserPlotOption == "Same in tower" || UserPlotOption == "Same in tow" ||
02505 UserPlotOption == "Same in SC" || UserPlotOption == "SameInSC" ||
02506 UserPlotOption == "" || UserPlotOption == " " ||
02507 UserPlotOption == fAllXtalsInStinPlot )
02508 {StandardPlotOption = fAllXtalsInStinPlot;}
02509 }
02510
02511 if( CallingMethod == "2D" )
02512 {
02513 if( UserPlotOption == "COLZ" ||
02514 UserPlotOption == "" ||
02515 UserPlotOption == " " ){StandardPlotOption = "COLZ";}
02516 if( UserPlotOption == "BOX" ){StandardPlotOption = "BOX";}
02517 if( UserPlotOption == "TEXT" ){StandardPlotOption = "TEXT";}
02518 if( UserPlotOption == "CONTZ" ){StandardPlotOption = "CONTZ";}
02519 if( UserPlotOption == "LEGO2Z" ){StandardPlotOption = "LEGO2Z";}
02520 if( UserPlotOption == "SURF1Z" ){StandardPlotOption = "SURF1Z";}
02521 if( UserPlotOption == "SURF2Z" ){StandardPlotOption = "SURF2Z";}
02522 if( UserPlotOption == "SURF3Z" ){StandardPlotOption = "SURF3Z";}
02523 if( UserPlotOption == "SURF4" ){StandardPlotOption = "SURF4";}
02524 if( UserPlotOption == "ASCII" ){StandardPlotOption = "ASCII";}
02525 }
02526
02527
02528 if( StandardPlotOption == "?" )
02529 {
02530 cout << "*TEcnaParHistos::BuildStandardPlotOption(...)> UserPlotOption = " << UserPlotOption
02531 << " : code not found (NB: relevant codes can be added in method TEcnaParHistos::BuildStandardPlotOption)."
02532 << fTTBELL << endl;
02533 }
02534 return StandardPlotOption;
02535 }
02536
02537
02538 TString TEcnaParHistos::BuildStandardHistoCode(const TString CallingMethod, const TString UserHistoCode)
02539 {
02540
02541 TString StandardHistoCode = "?";
02542
02543 if( CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time" )
02544 {
02545
02546 if( UserHistoCode == "Number of events" || UserHistoCode == "Nb of evts" ||
02547 UserHistoCode == "NumberbOfEvents" || UserHistoCode == "NbOfEvts" ||
02548 UserHistoCode == "number of events" || UserHistoCode == "noe" ||
02549 UserHistoCode == "NOE" )
02550 {StandardHistoCode = "NOE";}
02551
02552 if( UserHistoCode == "Pedestals" || UserHistoCode == "Pedestal" ||
02553 UserHistoCode == "pedestals" || UserHistoCode == "pedestal" ||
02554 UserHistoCode == "ped" || UserHistoCode == "Ped" )
02555 {StandardHistoCode = "Ped";}
02556
02557 if( UserHistoCode == "Total noise" || UserHistoCode == "TotalNoise" ||
02558 UserHistoCode == "total noise" || UserHistoCode == "TN" ||
02559 UserHistoCode == "tn" || UserHistoCode == "TNo" )
02560 {StandardHistoCode = "TNo";}
02561
02562 if( UserHistoCode == "Low frequency noise" || UserHistoCode == "LowFrequencyNoise" ||
02563 UserHistoCode == "LF noise" || UserHistoCode == "LFNoise" ||
02564 UserHistoCode == "low frequency noise" || UserHistoCode == "lfn" ||
02565 UserHistoCode == "LFN")
02566 {StandardHistoCode = "LFN";}
02567
02568 if( UserHistoCode == "High frequency noise" || UserHistoCode == "HighFrequencyNoise" ||
02569 UserHistoCode == "HF noise" || UserHistoCode == "HFNoise" ||
02570 UserHistoCode == "high frequency noise" ||
02571 UserHistoCode == "hfn" || UserHistoCode == "HFN")
02572 {StandardHistoCode = "HFN";}
02573
02574 if( UserHistoCode == "Mean correlations between samples" ||
02575 UserHistoCode == "MeanCorrelationsBetweenSamples" ||
02576 UserHistoCode == "Correlations between samples" ||
02577 UserHistoCode == "CorrelationsBetweenSamples" ||
02578 UserHistoCode == "Mean corss" || UserHistoCode == "MeanCorss" ||
02579 UserHistoCode == "Corss" || UserHistoCode == "corss" ||
02580 UserHistoCode == "Css" || UserHistoCode == "css" ||
02581 UserHistoCode == "mean correlations between samples" ||
02582 UserHistoCode == "mcs" || UserHistoCode == "MCs" )
02583 {StandardHistoCode = "MCs";}
02584
02585 if( UserHistoCode == "Sigma of correlations between samples" ||
02586 UserHistoCode == "SigmaOfCorrelationsBetweenSamples" ||
02587 UserHistoCode == "Sigma corss" || UserHistoCode == "SigmaCorss" ||
02588 UserHistoCode == "SigCorss" || UserHistoCode == "sigcorss" ||
02589 UserHistoCode == "SCss" || UserHistoCode == "scss" ||
02590 UserHistoCode == "sigma of correlations between samples" ||
02591 UserHistoCode == "scs" || UserHistoCode == "SCs")
02592 {StandardHistoCode = "SCs";}
02593
02594 if( UserHistoCode == "Number of crystals" || UserHistoCode == "NumberOfCrystals" ||
02595 UserHistoCode == "Nb of crystals" || UserHistoCode == "NbOfCrystals" ||
02596 UserHistoCode == "Number of xtals" || UserHistoCode == "NumberOfXtals" ||
02597 UserHistoCode == "Nb of xtals" || UserHistoCode == "NbOfXtals" ||
02598 UserHistoCode == "nox" || UserHistoCode == "NOX" )
02599 {StandardHistoCode = "NOX";}
02600
02601 if( UserHistoCode == "Number of samples" || UserHistoCode == "NumberOfSamples" ||
02602 UserHistoCode == "Nb of samples" || UserHistoCode == "NbOfSamples" ||
02603 UserHistoCode == "nos" || UserHistoCode == "NOS" )
02604 {StandardHistoCode = "NOS";}
02605
02606 if( UserHistoCode == "Sample number" || UserHistoCode == "SampleNumber" ||
02607 UserHistoCode == "Sample#" || UserHistoCode == "Samp#" ||
02608 UserHistoCode == "Sample" || UserHistoCode == "sample" ||
02609 UserHistoCode == "Smp" )
02610 {StandardHistoCode = "Smp";}
02611
02612 if( UserHistoCode == "Sample mean" || UserHistoCode == "SampleMean" ||
02613 UserHistoCode == "Sample average" || UserHistoCode == "SampleAverage" ||
02614 UserHistoCode == "SampMean" || UserHistoCode == "SampAverage" ||
02615 UserHistoCode == "MSp" )
02616 {StandardHistoCode = "MSp";}
02617
02618 if( UserHistoCode == "Sample sigma" || UserHistoCode == "SampleSigma" ||
02619 UserHistoCode == "Sigma of samples" || UserHistoCode == "SigmaOfSamples" ||
02620 UserHistoCode == "SampSigma" ||
02621 UserHistoCode == "SSp" )
02622 {StandardHistoCode = "SSp";}
02623
02624 if( UserHistoCode == "Event" || UserHistoCode == "event" ||
02625 UserHistoCode == "Event number" || UserHistoCode == "event number" ||
02626 UserHistoCode == "EventNumber" || UserHistoCode == "Event#" ||
02627 UserHistoCode == "EvtNumber" || UserHistoCode == "Evt#" ||
02628 UserHistoCode == "Evt number" || UserHistoCode == "evt number" ||
02629 UserHistoCode == "Evt" )
02630 {StandardHistoCode = "Evt";}
02631
02632 if( UserHistoCode == "ADC value" || UserHistoCode == "ADCValue" ||
02633 UserHistoCode == "Adc value" || UserHistoCode == "AdcValue" ||
02634 UserHistoCode == "Sample ADC" || UserHistoCode == "SampleAdc" ||
02635 UserHistoCode == "ADC" || UserHistoCode == "Adc" )
02636 {StandardHistoCode = "Adc";}
02637
02638 if( UserHistoCode == "date" || UserHistoCode == "Date" || UserHistoCode == "time" ||
02639 UserHistoCode == "Time" )
02640 {StandardHistoCode = "Time";}
02641
02642 if( UserHistoCode == "Number of runs" || UserHistoCode == "NumberOfRuns" ||
02643 UserHistoCode == "Nb of runs" || UserHistoCode == "NbOfRuns" ||
02644 UserHistoCode == "nor" || UserHistoCode == "NOR" )
02645 {StandardHistoCode = "NOR";}
02646
02647
02648 if( UserHistoCode == "Tower" || UserHistoCode == "tower" || UserHistoCode == "tow" ||
02649 UserHistoCode == "Tower number" || UserHistoCode == "tower number" || UserHistoCode == "tow nb" ||
02650 UserHistoCode == "Tower#" || UserHistoCode == "tower#" || UserHistoCode == "tow#" ||
02651 UserHistoCode == "Tow#" || UserHistoCode == "Tow" )
02652 {StandardHistoCode = "Tow";}
02653
02654 if( UserHistoCode == "Super crystal" || UserHistoCode == "SuperCrystal" || UserHistoCode == "SuperXtal" ||
02655 UserHistoCode == "Super crystal number" || UserHistoCode == "SuperCrystalNumber" ||
02656 UserHistoCode == "SuperXtalNumber" ||
02657 UserHistoCode == "Super crystal nb" || UserHistoCode == "SuperCrystal#" ||
02658 UserHistoCode == "SuperXtal#" ||
02659 UserHistoCode == "SC#" || UserHistoCode == "SC" )
02660 {StandardHistoCode = "SC";}
02661
02662 if( UserHistoCode == "Crystal" || UserHistoCode == "crystal" || UserHistoCode == "Xtal" ||
02663 UserHistoCode == "Crystal number" || UserHistoCode == "crystal number" || UserHistoCode == "Xtal number" ||
02664 UserHistoCode == "Crystal#" || UserHistoCode == "crystal#" || UserHistoCode == "Xtal#" ||
02665 UserHistoCode == "Xtal" )
02666 {StandardHistoCode = "Xtal";}
02667
02668 if( StandardHistoCode == "Tow" || StandardHistoCode == "SC" || StandardHistoCode == "Xtal" )
02669 {StandardHistoCode = "XtalORStin";}
02670 }
02671
02672 if( CallingMethod == "2D" )
02673 {
02674
02675 if( UserHistoCode == "Correlation" || UserHistoCode == "Correlations" ||
02676 UserHistoCode == "correlation" || UserHistoCode == "correlations" ||
02677 UserHistoCode == "Correl" || UserHistoCode == "correl" ||
02678 UserHistoCode == "cor" || UserHistoCode == "Cor" )
02679 {StandardHistoCode = "Cor";}
02680
02681 if( UserHistoCode == "Covariance" || UserHistoCode == "Covariances" ||
02682 UserHistoCode == "covariance" || UserHistoCode == "covariances" ||
02683 UserHistoCode == "Covar" || UserHistoCode == "covar" ||
02684 UserHistoCode == "cov" || UserHistoCode == "Cov" )
02685 {StandardHistoCode = "Cov";}
02686
02687
02688 if( UserHistoCode == "LF towers" || UserHistoCode == "LF between towers" ||
02689 UserHistoCode == "LFTowers" || UserHistoCode == "LFBetweenTowers" ||
02690 UserHistoCode == "LFTow" || UserHistoCode == "lftow" ||
02691 UserHistoCode == "LFtt" || UserHistoCode == "lftt" ||
02692 UserHistoCode == "LF SCs" || UserHistoCode == "LF between SCs" ||
02693 UserHistoCode == "LFSCs" || UserHistoCode == "LFBetweenSCs" ||
02694 UserHistoCode == "LFSuperXtals" || UserHistoCode == "lfsc" ||
02695 UserHistoCode == "LFSC" || UserHistoCode == "lfsx" ||
02696 UserHistoCode == "MttLF" )
02697 {StandardHistoCode = "MttLF";}
02698
02699 if( UserHistoCode == "HF towers" || UserHistoCode == "HF between towers" ||
02700 UserHistoCode == "HFTowers" || UserHistoCode == "HFBetweenTowers" ||
02701 UserHistoCode == "HFTow" || UserHistoCode == "hftow" ||
02702 UserHistoCode == "HFtt" || UserHistoCode == "hftt" ||
02703 UserHistoCode == "HF SCs" || UserHistoCode == "HF between SCs" ||
02704 UserHistoCode == "HFSCs" || UserHistoCode == "HFBetweenSCs" ||
02705 UserHistoCode == "HFSuperXtals" || UserHistoCode == "hfsc" ||
02706 UserHistoCode == "HFSC" || UserHistoCode == "hfsx" ||
02707 UserHistoCode == "MttHF" )
02708 {StandardHistoCode = "MttHF";}
02709
02710 if( UserHistoCode == "LF channels" || UserHistoCode == "LF between channels" ||
02711 UserHistoCode == "LFChannels" || UserHistoCode == "LFBetweenChannels" ||
02712 UserHistoCode == "LFChan" || UserHistoCode == "lfchan" ||
02713 UserHistoCode == "LFcc" || UserHistoCode == "lfcc" || UserHistoCode == "MccLF" )
02714 {StandardHistoCode = "MccLF";}
02715
02716 if( UserHistoCode == "HF channels" || UserHistoCode == "HF between channels" ||
02717 UserHistoCode == "HFChannels" || UserHistoCode == "HFBetweenChannels" ||
02718 UserHistoCode == "HFChan" || UserHistoCode == "hfchan" ||
02719 UserHistoCode == "HFcc" || UserHistoCode == "hfcc" || UserHistoCode == "MccHF" )
02720 {StandardHistoCode = "MccHF";}
02721
02722 if( UserHistoCode == "Samples" || UserHistoCode == "Between samples" ||
02723 UserHistoCode == "samples" || UserHistoCode == "between samples" ||
02724 UserHistoCode == "BetweenSamples" ||
02725 UserHistoCode == "Samp" || UserHistoCode == "samp" ||
02726 UserHistoCode == "ss" || UserHistoCode == "Mss" )
02727 {StandardHistoCode = "Mss";}
02728 }
02729
02730
02731 if( StandardHistoCode == "?" )
02732 {
02733 cout << "*TEcnaParHistos::BuildStandardHistoCode(...)> UserHistoCode = " << UserHistoCode
02734 << " : code not found (NB: relevant codes can be added in method TEcnaParHistos::BuildStandardHistoCode)."
02735 << fTTBELL << endl;
02736 }
02737 return StandardHistoCode;
02738 }
02739
02740
02741 TString TEcnaParHistos::GetTechHistoCode(const TString StandardHistoCode)
02742 {
02743 TString TechHistoCode = "?";
02744
02745
02746 if( StandardHistoCode == "NOE" ){TechHistoCode = "D_NOE_ChNb";}
02747 if( StandardHistoCode == "Ped" ){TechHistoCode = "D_Ped_ChNb";}
02748 if( StandardHistoCode == "TNo" ){TechHistoCode = "D_TNo_ChNb";}
02749 if( StandardHistoCode == "LFN" ){TechHistoCode = "D_LFN_ChNb";}
02750 if( StandardHistoCode == "HFN" ){TechHistoCode = "D_HFN_ChNb";}
02751 if( StandardHistoCode == "MCs" ){TechHistoCode = "D_MCs_ChNb";}
02752 if( StandardHistoCode == "SCs" ){TechHistoCode = "D_SCs_ChNb";}
02753
02754 if( TechHistoCode == "?" )
02755 {
02756 cout << "*TEcnaParHistos::GetTechHistoCode(...)> StandardHistoCode = " << StandardHistoCode
02757 << " : code not found " << fTTBELL << endl;
02758 }
02759 return TechHistoCode;
02760 }
02761
02762
02763 TString TEcnaParHistos::GetTechHistoCode(const TString X_Quantity, const TString Y_Quantity)
02764 {
02765
02766 TString TechHistoCode = "?";
02767
02768
02769 if ( X_Quantity == "XtalORStin" && Y_Quantity == "NOE" ){TechHistoCode = "D_NOE_ChNb";}
02770 if ( X_Quantity == "XtalORStin" && Y_Quantity == "Ped" ){TechHistoCode = "D_Ped_ChNb";}
02771 if ( X_Quantity == "XtalORStin" && Y_Quantity == "TNo" ){TechHistoCode = "D_TNo_ChNb";}
02772 if ( X_Quantity == "XtalORStin" && Y_Quantity == "LFN" ){TechHistoCode = "D_LFN_ChNb";}
02773 if ( X_Quantity == "XtalORStin" && Y_Quantity == "HFN" ){TechHistoCode = "D_HFN_ChNb";}
02774 if ( X_Quantity == "XtalORStin" && Y_Quantity == "MCs" ){TechHistoCode = "D_MCs_ChNb";}
02775 if ( X_Quantity == "XtalORStin" && Y_Quantity == "SCs" ){TechHistoCode = "D_SCs_ChNb";}
02776
02777 if ( X_Quantity == "NOE" && Y_Quantity == "NOX" ){TechHistoCode = "D_NOE_ChDs";}
02778 if ( X_Quantity == "Ped" && Y_Quantity == "NOX" ){TechHistoCode = "D_Ped_ChDs";}
02779 if ( X_Quantity == "TNo" && Y_Quantity == "NOX" ){TechHistoCode = "D_TNo_ChDs";}
02780 if ( X_Quantity == "LFN" && Y_Quantity == "NOX" ){TechHistoCode = "D_LFN_ChDs";}
02781 if ( X_Quantity == "HFN" && Y_Quantity == "NOX" ){TechHistoCode = "D_HFN_ChDs";}
02782 if ( X_Quantity == "MCs" && Y_Quantity == "NOX" ){TechHistoCode = "D_MCs_ChDs";}
02783 if ( X_Quantity == "SCs" && Y_Quantity == "NOX" ){TechHistoCode = "D_SCs_ChDs";}
02784
02785 if ( X_Quantity == "Smp" && Y_Quantity == "MSp" ){TechHistoCode = "D_MSp_SpNb";}
02786 if ( X_Quantity == "MSp" && Y_Quantity == "NOS" ){TechHistoCode = "D_MSp_SpDs";}
02787 if ( X_Quantity == "Smp" && Y_Quantity == "SSp" ){TechHistoCode = "D_SSp_SpNb";}
02788 if ( X_Quantity == "SSp" && Y_Quantity == "NOS" ){TechHistoCode = "D_SSp_SpDs";}
02789
02790 if ( X_Quantity == "Evt" && Y_Quantity == "Adc" ){TechHistoCode = "D_Adc_EvNb";}
02791 if ( X_Quantity == "Adc" && Y_Quantity == "NOE" ){TechHistoCode = "D_Adc_EvDs";}
02792
02793
02794 if( X_Quantity == "Time" && Y_Quantity == "Ped" ){TechHistoCode = "H_Ped_Date";}
02795 if( X_Quantity == "Ped" && Y_Quantity == "NOR" ){TechHistoCode = "H_Ped_RuDs";}
02796
02797 if( X_Quantity == "Time" && Y_Quantity == "TNo" ){TechHistoCode = "H_TNo_Date";}
02798 if( X_Quantity == "TNo" && Y_Quantity == "NOR" ){TechHistoCode = "H_TNo_RuDs";}
02799
02800 if( X_Quantity == "Time" && Y_Quantity == "LFN" ){TechHistoCode = "H_LFN_Date";}
02801 if( X_Quantity == "LFN" && Y_Quantity == "NOR" ){TechHistoCode = "H_LFN_RuDs";}
02802
02803 if( X_Quantity == "Time" && Y_Quantity == "HFN" ){TechHistoCode = "H_HFN_Date";}
02804 if( X_Quantity == "HFN" && Y_Quantity == "NOR" ){TechHistoCode = "H_HFN_RuDs";}
02805
02806 if( X_Quantity == "Time" && Y_Quantity == "MCs" ){TechHistoCode = "H_MCs_Date";}
02807 if( X_Quantity == "MCs" && Y_Quantity == "NOR" ){TechHistoCode = "H_MCs_RuDs";}
02808
02809 if( X_Quantity == "Time" && Y_Quantity == "SCs" ){TechHistoCode = "H_SCs_Date";}
02810 if( X_Quantity == "SCs" && Y_Quantity == "NOR" ){TechHistoCode = "H_SCs_RuDs";}
02811
02812 if( TechHistoCode == "?" )
02813 {
02814 cout << "TEcnaParHistos::GetTechHistoCode(...)> HistoCode not found. X_Quantity = " << X_Quantity
02815 << ", Y_Quantity = "<< Y_Quantity << endl;
02816 }
02817 return TechHistoCode;
02818 }
02819
02820 TString TEcnaParHistos::GetCodeOnlyOnePlot(){return fOnlyOnePlot;}
02821 TString TEcnaParHistos::GetCodeSeveralPlot(){return fSeveralPlot;}
02822 TString TEcnaParHistos::GetCodeSameOnePlot(){return fSameOnePlot;}
02823 TString TEcnaParHistos::GetCodeAllXtalsInStinPlot(){return fAllXtalsInStinPlot;}
02824 Int_t TEcnaParHistos::GetCodePlotAllXtalsInStin(){return fPlotAllXtalsInStin;}
02825
02826