CMS 3D CMS Logo

TEcnaParHistos.cc
Go to the documentation of this file.
1 //----------Author's Name: B.Fabbro DSM/IRFU/SPP CEA-Saclay
2 //----------Copyright: Those valid for CEA sofware
3 //----------Modified:10/10/2011
4 
7 
8 //--------------------------------------
9 // TEcnaParHistos.cc
10 // Class creation: 19 May 2005
11 // Documentation: see TEcnaParHistos.h
12 //--------------------------------------
13 
15 //______________________________________________________________________________
16 //
17 
19 {
20  //destructor
21 
22  //if (fEcalNumbering != 0){delete fEcalNumbering; fCdelete++;}
23  //if (fEcal != 0){delete fEcal; fCdelete++;}
24 
25  //std::cout << "[Info Management] CLASS: TEcnaParHistos. DESTROY OBJECT: this = " << this << std::endl;
26 }
27 
28 //===================================================================
29 //
30 // Constructors
31 //
32 //===================================================================
34 {
35 // Constructor without argument
36 
37  //std::cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << std::endl;
38 
39  Init();
40 }
41 
42 TEcnaParHistos::TEcnaParHistos(TEcnaObject* pObjectManager, const TString& SubDet)
43 {
44 // Constructor without argument
45 
46  //std::cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << std::endl;
47 
48  Init();
49  Long_t i_this = (Long_t)this;
50  pObjectManager->RegisterPointer("TEcnaParHistos", i_this);
51 
52  //............................ fEcal => to be changed in fParEcal
53  fEcal = nullptr;
54  Long_t iParEcal = pObjectManager->GetPointerValue("TEcnaParEcal");
55  if( iParEcal == 0 )
56  {fEcal = new TEcnaParEcal(pObjectManager, SubDet.Data()); /*fCnew++*/}
57  else
58  {fEcal = (TEcnaParEcal*)iParEcal;}
59 
60  //............................ fEcalNumbering
61  fEcalNumbering = nullptr;
62  Long_t iEcalNumbering = pObjectManager->GetPointerValue("TEcnaNumbering");
63  if( iEcalNumbering == 0 )
64  {fEcalNumbering = new TEcnaNumbering(pObjectManager, SubDet.Data()); /*fCnew++*/}
65  else
66  {fEcalNumbering = (TEcnaNumbering*)iEcalNumbering;}
67 
68  SetEcalSubDetector(SubDet.Data());
69 }
70 
71 
72 
74  const TEcnaParEcal* pEcal,
75  const TEcnaNumbering* pEcalNumbering)
76 {
77 // Constructor with argument
78 
79  //std::cout << "[Info Management] CLASS: TEcnaParHistos. CREATE OBJECT: this = " << this << std::endl;
80 
81  Init();
82  SetEcalSubDetector(SubDet.Data(), pEcal, pEcalNumbering);
83 }
84 
86 {
87  fgMaxCar = (Int_t)512; // max number of characters in TStrings
88 
89  fTTBELL = '\007';
90 
91  //................ Init CNA Command and error numbering
92  fCnaCommand = 0;
93  fCnaError = 0;
94 
95  //........................................................................................
96 
97  fMaxColorNumber = (Int_t)4; // number_of_colors - 1 for histos in option SAME
98 
99  fMarginAutoMinMax = (Double_t)0.05; // factor for automatic margin plots:
100  // plot min = min - (max-min)*fMarginAutoMinMax
101  // plot max = max + (max-min)*fMarginAutoMinMax
102 
103  fNbOfRunsDisplayed = (Int_t)20; // Nb of run numbers displayed on the top of the plot
104  // in stability/evolution plots, option ONLYONE
105 
106  fMaxNbOfRunsInLists = (Int_t)5000; // Maximum number of runs in the ListOfRun files
107  // used for the stability/evolution plots.
108 
109  //........................ init code plot type (Init)
110  Int_t MaxCar = fgMaxCar;
111  fOnlyOnePlot.Resize(MaxCar);
112  fOnlyOnePlot = "ONLYONE";
113 
114  MaxCar = fgMaxCar;
115  fSeveralPlot.Resize(MaxCar);
116  fSeveralPlot = "SAME";
117 
118  MaxCar = fgMaxCar;
119  fSameOnePlot.Resize(MaxCar);
120  fSameOnePlot = "SAME n";
121 
122  MaxCar = fgMaxCar;
123  fAllXtalsInStinPlot.Resize(MaxCar);
124  fAllXtalsInStinPlot = "SAME in Stin";
125 
127 
128 }// end of Init()
129 
131 {
132  // Set Subdetector (EB or EE)
133 
134  Int_t MaxCar = fgMaxCar;
135  fFlagSubDet.Resize(MaxCar);
137 }
138 
139 
141  const TEcnaParEcal* pEcal,
142  const TEcnaNumbering* pEcalNumbering)
143 {
144  // Set Subdetector (EB or EE)
145 
146  fEcal = nullptr;
147  if( pEcal == nullptr )
148  {fEcal = new TEcnaParEcal(SubDet.Data()); /*fCnew++*/ ;}
149  else
150  {fEcal = (TEcnaParEcal*)pEcal;}
151 
152  Int_t MaxCar = fgMaxCar;
153  fFlagSubDet.Resize(MaxCar);
155 
156  fEcalNumbering = nullptr;
157  if( pEcalNumbering == nullptr )
158  {fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal); /*fCnew++*/ ;}
159  else
160  {fEcalNumbering = (TEcnaNumbering*)pEcalNumbering;}
161 }
162 
163 
165 
166 //---------------------------------------------------------------------------------------------
167 // HistoCode list modification (06/10/09)
168 //
169 // D = Detector Plot ChNb = Channel Number
170 // ChDs = Channel Distribution (Y projection)
171 //
172 // H = History Plot Date = date in format YYMMJJ hhmmss
173 // RuDs = Run distribution
174 //
175 // old code new code
176 //
177 // * 1 H1NbOfEvtsGlobal D_NOE_ChNb NOE = Number Of Events
178 // * 2 H1NbOfEvtsProj D_NOE_ChDs
179 // * 3 H1EvEvGlobal D_Ped_ChNb Ped = Pedestal
180 // * 4 H1EvEvProj D_Ped_ChDs
181 // * 5 H1EvSigGlobal D_TNo_ChNb TNo = Total Noise
182 // * 6 H1EvSigProj D_TNo_ChDs
183 // * 7 H1SigEvGlobal D_LFN_ChNb LFN = Low Frequency noise
184 // * 8 H1SigEvProj D_LFN_ChDs
185 // * 9 H1SigSigGlobal D_HFN_ChNb HFN = High Frequency noise
186 // * 10 H1SigSigProj D_HFN_ChDs
187 // * 11 H1EvCorssGlobal D_MCs_ChNb MCs = Mean correlations between samples
188 // * 12 H1EvCorssProj D_MCs_ChDs
189 // * 13 H1SigCorssGlobal D_SCs_ChNb SCs = Sigma of the correlations between samples
190 // * 14 H1SigCorssProj D_SCs_ChDs
191 // * 15 Ev D_MSp_SpNb MSp = Mean samples
192 // * 16 EvProj D_MSp_SpDs
193 // * 17 Sigma D_SSp_SpNb SSp = Sigma of the samples
194 // * 18 SigmaProj D_SSp_SpDs
195 // * 19 SampTime D_Adc_EvNb Adc = ADC count as a function of Event number
196 // * 20 AdcProj D_Adc_EvDs
197 // * 21 EvolEvEv H_Ped_Date
198 // * 22 EvolEvEvProj H_Ped_RuDs
199 // * 23 EvolEvSig H_TNo_Date
200 // * 24 EvolEvSigProj H_TNo_RuDs
201 // * 25 EvolSigEv H_LFN_Date
202 // * 26 EvolSigEvProj H_LFN_RuDs
203 // * 27 EvolSigSig H_HFN_Date
204 // * 28 EvolSigSigProj H_HFN_RuDs
205 // * 29 EvolEvCorss H_MCs_Date
206 // * 30 EvolEvCorssProj H_MCs_RuDs
207 // * 31 EvolSigCorss H_SCs_Date
208 // * 32 EvolSigCorssProj H_SCs_RuDs
209 //
210 //===========================================================================
211 //
212 // SetCanvasWidth, SetCanvasHeight,
213 // CanvasFormatW, CanvasFormatH,
214 //
215 //===========================================================================
216 UInt_t TEcnaParHistos::SetCanvasWidth(const TString& HistoCode, const TString& opt_plot)
217 {
218 //........................................ Taille/format canvas
219 
220  UInt_t canv_w = CanvasFormatW("petit");
221 
222  if( HistoCode == "D_Adc_EvNb" || HistoCode == "D_NOE_ChNb" ||
223  HistoCode == "D_Ped_ChNb" || HistoCode == "D_LFN_ChNb" ||
224  HistoCode == "D_TNo_ChNb" || HistoCode == "D_HFN_ChNb" ||
225  HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" ||
226  HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" ||
227  HistoCode == "H_MCs_Date" || HistoCode == "H_LFN_Date" ||
228  HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" ||
229  (HistoCode == "D_MSp_SpNb" && opt_plot != "ONLYONE") ||
230  (HistoCode == "D_SSp_SpNb" && opt_plot != "ONLYONE") )
231  {
232  canv_w = CanvasFormatH("moyen"); // format 29.7*21 ( = 21*29.7 en paysage)
233  }
234 
235  if( (HistoCode == "D_Adc_EvDs" || HistoCode == "D_NOE_ChDs" ||
236  HistoCode == "D_Ped_ChDs" || HistoCode == "D_LFN_ChDs" ||
237  HistoCode == "D_TNo_ChDs" || HistoCode == "D_HFN_ChDs" ||
238  HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" ||
239  HistoCode == "D_MSp_SpDs" || HistoCode == "D_SSp_SpDs" ||
240  HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" ||
241  HistoCode == "H_MCs_RuDs" || HistoCode == "H_LFN_RuDs" ||
242  HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs") && opt_plot != "ONLYONE" )
243  {
244  canv_w = CanvasFormatH("moyen"); // format 29.7*21 ( = 21*29.7 en paysage)
245  }
246 
247  return canv_w;
248 }
249 
250 UInt_t TEcnaParHistos::SetCanvasHeight(const TString& HistoCode, const TString& opt_plot)
251 {
252 //........................................ Taille/format canvas
253 
254  UInt_t canv_h = CanvasFormatH("petit");
255 
256  if( HistoCode == "D_Adc_EvNb" || HistoCode == "D_NOE_ChNb" ||
257  HistoCode == "D_Ped_ChNb" || HistoCode == "D_LFN_ChNb" ||
258  HistoCode == "D_TNo_ChNb" || HistoCode == "D_HFN_ChNb" ||
259  HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" ||
260  HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" ||
261  HistoCode == "H_MCs_Date" || HistoCode == "H_LFN_Date" ||
262  HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" ||
263  (HistoCode == "D_MSp_SpNb" && opt_plot != "ONLYONE") ||
264  (HistoCode == "D_SSp_SpNb" && opt_plot != "ONLYONE") )
265  {
266  canv_h = CanvasFormatW("moyen"); // format 29.7*21 ( = 21*29.7 en paysage)
267  }
268 
269  if( (HistoCode == "D_Adc_EvDs" || HistoCode == "D_NOE_ChDs" ||
270  HistoCode == "D_Ped_ChDs" || HistoCode == "D_LFN_ChDs" ||
271  HistoCode == "D_TNo_ChDs" || HistoCode == "D_HFN_ChDs" ||
272  HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" ||
273  HistoCode == "D_MSp_SpDs" || HistoCode == "D_SSp_SpDs" ||
274  HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" ||
275  HistoCode == "H_MCs_RuDs" || HistoCode == "H_LFN_RuDs" ||
276  HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs") && opt_plot != "ONLYONE" )
277  {
278  canv_h = CanvasFormatW("moyen"); // format 29.7*21 ( = 21*29.7 en paysage)
279  }
280 
281  return canv_h;
282 }
283 
284 UInt_t TEcnaParHistos::CanvasFormatW(const TString& chformat)
285 {
286 //Set Canvas width
287 
288  UInt_t canv_w = 375; // default = "petit"
289 
290  if ( chformat == "petit" ){canv_w = 375;} // 21x29.7 portrait
291  if ( chformat == "moyen" ){canv_w = 450;} // 21x29.7 portrait
292  if ( chformat == "grand" ){canv_w = 572;} // 21x29.7 portrait
293 
294  if ( chformat == "etaphiSM" ){canv_w = 760;} // landscape etroit en hauteur pour plot SM
295  if ( chformat == "phietaEB" ){canv_w = 636;} // landscape pour plot EB (32 SMs)
296 
297  if ( chformat == "IXIYDee" ){canv_w = 320;} // portrait etroit en largeur pour plot Dee
298  if ( chformat == "IYIXEE" ){canv_w = 636;} // landscape pour plot EE (4 dees)
299  return canv_w;
300 }
301 //......................................................................
302 UInt_t TEcnaParHistos::CanvasFormatH(const TString& chformat)
303 {
304 //Set Canvas height
305 
306  UInt_t canv_h = 530; // default = "petit"
307 
308  if ( chformat == "petit" ){canv_h = 530;} // 21x29.7 portrait
309  if ( chformat == "moyen" ){canv_h = 636;} // 21x29.7 portrait
310  if ( chformat == "grand" ){canv_h = 810;} // 21x29.7 portrait
311 
312  if ( chformat == "etaphiSM" ){canv_h = 306;} // landscape etroit en hauteur pour plot SM
313  if ( chformat == "phietaEB" ){canv_h = 450;} // landscape pour plot EB (32 SMs)
314 
315  if ( chformat == "IXIYDee" ){canv_h = 720;} // portrait etroit en largeur pour plot Dee
316  if ( chformat == "IYIXEE" ){canv_h = 450;} // landscape pour plot EE (4 dees)
317  return canv_h;
318 }
319 
320 //===========================================================================
321 //
322 // BoxLeftX, BoxRightX, BoxBottomY, BoxTopY
323 //
324 //===========================================================================
325 Double_t TEcnaParHistos::BoxLeftX(const TString& chtype)
326 {
327 //Set the x left coordinate of the box
328 
329  Double_t value = 0.4;
330 
331  if ( chtype == "general_comment" ) {value = 0.015;}
332 
333  if ( chtype == "top_left_box_SM" ) {value = 0.015;}
334  if ( chtype == "top_left_box_EB" ) {value = 0.015;}
335  if ( chtype == "top_mid_box_EB" ) {value = 0.350;}
336  if ( chtype == "top_right_box_EB" ) {value = 0.630;}
337 
338  if ( chtype == "top_left_box_Dee" ) {value = 0.015;}
339  if ( chtype == "top_left_box_EE" ) {value = 0.015;}
340  if ( chtype == "top_mid_box_EE" ) {value = 0.240;}
341  if ( chtype == "top_right_box_EE" ) {value = 0.610;}
342 
343  if ( chtype == "bottom_left_box" ) {value = 0.015;}
344  if ( chtype == "bottom_left_box_evol" ) {value = 0.015;}
345  if ( chtype == "bottom_mid_box" ) {value = 0.250;}
346  if ( chtype == "bottom_right_box" ) {value = 0.455;}
347  if ( chtype == "bottom_right_box_evol") {value = 0.540;}
348  if ( chtype == "bottom_right_box_evpr") {value = 0.540;}
349 
350  if ( chtype == "several_plots_box" ) {value = 0.015;}
351  if ( chtype == "several_evol_box" ) {value = 0.015;}
352  if ( chtype == "several_evpr_box" ) {value = 0.015;}
353 
354  return value;
355 }
356 //.................................................................
357 Double_t TEcnaParHistos::BoxRightX(const TString& chtype)
358 {
359 //Set the x right coordinate of the box
360 
361  Double_t value = 0.6;
362 
363  if ( chtype == "general_comment" ) {value = 0.680;}
364 
365  if ( chtype == "top_left_box_SM" ) {value = 0.125;}
366  if ( chtype == "top_left_box_EB" ) {value = 0.349;}
367  if ( chtype == "top_mid_box_EB" ) {value = 0.629;}
368  if ( chtype == "top_right_box_EB" ) {value = 0.985;}
369 
370  if ( chtype == "top_left_box_Dee" ) {value = 0.425;}
371  if ( chtype == "top_left_box_EE" ) {value = 0.260;}
372  if ( chtype == "top_mid_box_EE" ) {value = 0.609;}
373  if ( chtype == "top_right_box_EE" ) {value = 0.985;}
374 
375  if ( chtype == "bottom_left_box" ) {value = 0.445;}
376  if ( chtype == "bottom_left_box_evol" ) {value = 0.450;} // ex 370
377  if ( chtype == "bottom_mid_box" ) {value = 0.750;}
378  if ( chtype == "bottom_right_box" ) {value = 0.985;}
379  if ( chtype == "bottom_right_box_evol") {value = 0.985;}
380  if ( chtype == "bottom_right_box_evpr") {value = 0.985;}
381 
382  if ( chtype == "several_plots_box" ) {value = 0.985;}
383  if ( chtype == "several_evol_box" ) {value = 0.635;}
384  if ( chtype == "several_evpr_box" ) {value = 0.635;}
385 
386  return value;
387 }
388 //.................................................................
389 Double_t TEcnaParHistos::BoxBottomY(const TString& chtype)
390 {
391 //Set the y bottom coordinate of the box
392 
393  Double_t value = 0.8;
394 
395  if ( chtype == "general_comment" ) {value = 0.960;}
396 
397  if ( chtype == "top_left_box_SM" ) {value = 0.880;}
398  if ( chtype == "top_left_box_EB" ) {value = 0.880;}
399  if ( chtype == "top_mid_box_EB" ) {value = 0.880;}
400  if ( chtype == "top_right_box_EB" ) {value = 0.880;}
401 
402  if ( chtype == "top_left_box_Dee" ) {value = 0.925;}
403  if ( chtype == "top_left_box_EE" ) {value = 0.880;}
404  if ( chtype == "top_mid_box_EE" ) {value = 0.880;}
405  if ( chtype == "top_right_box_EE" ) {value = 0.880;}
406 
407  if ( chtype == "bottom_left_box" ) {value = 0.010;}
408  if ( chtype == "bottom_left_box_evol" ) {value = 0.010;}
409  if ( chtype == "bottom_right_box" ) {value = 0.010;}
410  if ( chtype == "bottom_right_box_evol") {value = 0.010;}
411  if ( chtype == "bottom_right_box_evpr") {value = 0.010;}
412  if ( chtype == "several_plots_box" ) {value = 0.010;}
413  if ( chtype == "several_evol_box" ) {value = 0.010;}
414  if ( chtype == "several_evpr_box" ) {value = 0.010;}
415 
416  return value;
417 }
418 //.................................................................
419 Double_t TEcnaParHistos::BoxTopY(const TString& chtype)
420 {
421 //Set the y top coordinate of the box
422 
423  Double_t value = 0.9;
424 
425  if ( chtype == "general_comment" ) {value = 0.999;}
426 
427  if ( chtype == "top_left_box_SM" ) {value = 0.955;}
428  if ( chtype == "top_left_box_EB" ) {value = 0.955;}
429  if ( chtype == "top_mid_box_EB" ) {value = 0.955;}
430  if ( chtype == "top_right_box_EB" ) {value = 0.955;}
431 
432  if ( chtype == "top_left_box_Dee" ) {value = 0.969;}
433  if ( chtype == "top_left_box_EE" ) {value = 0.955;}
434  if ( chtype == "top_mid_box_EE" ) {value = 0.955;}
435  if ( chtype == "top_right_box_EE" ) {value = 0.955;}
436 
437  if ( chtype == "bottom_left_box" ) {value = 0.120;}
438  if ( chtype == "bottom_left_box_evol" ) {value = 0.120;}
439  if ( chtype == "bottom_right_box" ) {value = 0.120;}
440  if ( chtype == "bottom_right_box_Dee" ) {value = 0.100;}
441 
442  if ( chtype == "bottom_right_box_evol") {value = 0.120;}
443  if ( chtype == "bottom_right_box_evpr") {value = 0.120;}
444  if ( chtype == "several_plots_box" ) {value = 0.200;}
445  if ( chtype == "several_evol_box" ) {value = 0.200;}
446  if ( chtype == "several_evpr_box" ) {value = 0.200;}
447 
448  return value;
449 }
450 
451 //===========================================================================
452 //
453 // SetColorPalette, ColorTab, ColorDefinition
454 //
455 //===========================================================================
456 
457 void TEcnaParHistos::SetColorPalette(const TString& user_color_palette)
458 {
459  //Set color number for palette
460 
461  fMaxColorNumber = 4; // default: 4 ==> Black/Red/Blue/Green/Braun
462 
463  if (!(user_color_palette == "Rainbow" || user_color_palette == "rainbow") ){fMaxColorNumber = 5;}
464  if ( user_color_palette == "Rainbow" || user_color_palette == "rainbow" ){fMaxColorNumber = 6;}
465 }
466 //...........................................................................
467 Color_t TEcnaParHistos::ColorTab(const Int_t& user_color_number)
468 {
469  //Set color from user color number
470 
471  //=========> Color definition: see ROOT User's guide p.151
472 
473  TColor* my_color = new TColor();
474 
475  Color_t couleur = ColorDefinition("noir"); // default = "noir"
476 
477  if ( fMaxColorNumber != 6 )
478  {
479  //................... Standard: 6 colors (fMaxColorNumber = 5)
480  if(user_color_number == 0){couleur = ColorDefinition("noir");} // noir black 1
481  if(user_color_number == 1){couleur = ColorDefinition("rouge");} // rouge red 2
482  if(user_color_number == 2){couleur = ColorDefinition("bleu");} // bleu blue 9
483  if(user_color_number == 3){couleur = (Color_t)my_color->GetColor("#009900");} // vert green
484  if(user_color_number == 4){couleur = ColorDefinition("marron28");} // marron 28 braun 28
485  if(user_color_number == 5){couleur = (Color_t)my_color->GetColor("#9900BB");} // violet purple
486 
487  }
488  if ( fMaxColorNumber == 6 )
489  {
490  //................... Rainbow:7 colors (fMaxColorNumber = 6)
491  if(user_color_number == 0){couleur = (Color_t)my_color->GetColor("#EE0000");} // rouge
492  if(user_color_number == 1){couleur = (Color_t)my_color->GetColor("#FF6611");} // orange
493  if(user_color_number == 2){couleur = (Color_t)my_color->GetColor("#FFCC00");} // jaune
494  if(user_color_number == 3){couleur = (Color_t)my_color->GetColor("#009900");} // vert
495  if(user_color_number == 4){couleur = (Color_t)my_color->GetColor("#0044EE");} // bleu
496  if(user_color_number == 5){couleur = (Color_t)my_color->GetColor("#6633BB");} // indigo
497  if(user_color_number == 6){couleur = (Color_t)my_color->GetColor("#9900BB");} // violet
498  }
499 
500  if( user_color_number < 0 || user_color_number > fMaxColorNumber ){couleur = 0;}
501 
502  return couleur;
503 }
504 // end of ColorTab
505 
506 Color_t TEcnaParHistos::ColorDefinition(const TString& chcolor)
507 {
508  //Set color from color name
509 
510  //=========> Color definition: see ROOT User's guide p.151
511 
512  Color_t couleur = 1; // default = "noir"
513 
514  if ( chcolor == "noir" ) {couleur = 1;}
515  if ( chcolor == "rouge" ) {couleur = 2;}
516  if ( chcolor == "vert_fonce" ) {couleur = 3;}
517  if ( chcolor == "bleu_fonce" ) {couleur = 4;}
518  if ( chcolor == "jaune" ) {couleur = 5;}
519  if ( chcolor == "rose" ) {couleur = 6;}
520  if ( chcolor == "bleu_clair" ) {couleur = 7;}
521  if ( chcolor == "vert" ) {couleur = 8;}
522  if ( chcolor == "bleu" ) {couleur = 9;}
523  if ( chcolor == "blanc" ) {couleur = 10;}
524 
525  if ( chcolor == "marron23" ) {couleur = 23;}
526  if ( chcolor == "marron24" ) {couleur = 24;}
527  if ( chcolor == "marron25" ) {couleur = 24;}
528  if ( chcolor == "marron27" ) {couleur = 27;}
529  if ( chcolor == "marron28" ) {couleur = 28;}
530 
531  if ( chcolor == "bleu33" ) {couleur = 33;}
532  if ( chcolor == "bleu36" ) {couleur = 36;}
533  if ( chcolor == "bleu38" ) {couleur = 38;}
534  if ( chcolor == "bleu39" ) {couleur = 39;}
535 
536  if ( chcolor == "orange41" ) {couleur = 41;}
537  if ( chcolor == "orange42" ) {couleur = 42;}
538 
539  if ( chcolor == "rouge44" ) {couleur = 44;}
540  if ( chcolor == "rouge46" ) {couleur = 46;}
541  if ( chcolor == "rouge47" ) {couleur = 47;}
542  if ( chcolor == "rouge48" ) {couleur = 48;}
543  if ( chcolor == "rouge49" ) {couleur = 49;}
544  if ( chcolor == "rouge50" ) {couleur = 50;}
545 
546  if ( chcolor == "vert31" ) {couleur = 31;}
547  if ( chcolor == "vert32" ) {couleur = 32;}
548  if ( chcolor == "vert36" ) {couleur = 36;}
549  if ( chcolor == "vert37" ) {couleur = 37;}
550 
551  if ( chcolor == "violet" ) {couleur = 49;}
552 
553  if ( chcolor == "turquoise29") {couleur = 29;}
554 
555  if ( chcolor == "gris12" ) {couleur = 12;}
556  if ( chcolor == "gris13" ) {couleur = 13;}
557  if ( chcolor == "gris14" ) {couleur = 14;}
558  if ( chcolor == "gris15" ) {couleur = 15;}
559  if ( chcolor == "gris16" ) {couleur = 16;}
560  if ( chcolor == "gris17" ) {couleur = 17;}
561  if ( chcolor == "gris18" ) {couleur = 18;}
562 
563  return couleur;
564 }
565 // end of ColorDefinition
566 
567 //===========================================================================
568 // GetMaxNbOfColors, GetMarginAutoMinMax, GetNbOfRunsDisplayed
569 //===========================================================================
573 
574 //===========================================================================
575 //
576 // SetViewHistoStyle, SetViewHistoPadMargins
577 //
578 //===========================================================================
580 {
581 // Set style parameters for histo view
582 
583  //......................... Palette
584  gStyle->SetPalette(1,nullptr); // default: rainbow spectrum
585 
586  //............................... Date
587  gStyle->SetOptDate(0);
588 
589  //............................... Histo title size
590  gStyle->SetTitleW(0.5); gStyle->SetTitleH(0.075); // default
591 
592  if( HistoType == "colz" || HistoType == "lego" ||
593  HistoType == "surf" || HistoType == "Stin" )
594  {gStyle->SetTitleW(0.8); gStyle->SetTitleH(0.075);}
595 
596  if( (HistoType == "H1Basic") || (HistoType == "Evol") )
597  {gStyle->SetTitleW(0.5); gStyle->SetTitleH(0.075);}
598 
599  if( HistoType == "Stex2DEB" )
600  {gStyle->SetTitleW(0.2); gStyle->SetTitleH(0.095);}
601 
602  if( HistoType == "Stex2DEE" )
603  {gStyle->SetTitleW(0.45); gStyle->SetTitleH(0.08);}
604 
605  if( HistoType == "Stex2DEENb" )
606  {gStyle->SetTitleW(0.85); gStyle->SetTitleH(0.08);}
607 
608  if( HistoType == "Stas2DEB" || HistoType == "Stas2DEE" )
609  {gStyle->SetTitleW(0.225); gStyle->SetTitleH(0.095);}
610 
611  if(HistoType == "Global" || HistoType == "Proj" || HistoType == "SampProj" || HistoType == "EvolProj")
612  {gStyle->SetTitleW(0.5); gStyle->SetTitleH(0.08);}
613 
614  //............................. Statistics box style
615  gStyle->SetOptStat(1110);
616 
617  //............................. Statistics box size
618  if( HistoType == "colz" || HistoType == "lego" ||
619  HistoType == "surf" || HistoType == "Stin" )
620  {
621  gStyle->SetStatW(0.55); gStyle->SetStatH(0.2);
622  gStyle->SetStatY(1);
623  }
624 
625  if( HistoType == "Global" )
626  {
627  gStyle->SetStatW(0.375); gStyle->SetStatH(0.180);
628  gStyle->SetStatY(0.9875);
629  }
630  if( HistoType == "Proj" || HistoType == "SampProj" || HistoType == "EvolProj" )
631  {
632  gStyle->SetStatW(0.375); gStyle->SetStatH(0.180);
633  gStyle->SetStatY(0.9875);
634  }
635 
636  if( (HistoType == "H1Basic") || (HistoType == "Evol") )
637  {
638  gStyle->SetStatW(0.375); gStyle->SetStatH(0.180);
639  gStyle->SetStatY(0.9875);
640  }
641 
642  //....... Marker and line style
643 
644  gStyle->SetMarkerStyle(1);
645  if( HistoType == "Global" ){gStyle->SetMarkerStyle(20);}
646 
647 
648 }
649 //------- (end of SetViewHistoStyle) ----------------
650 
651 void TEcnaParHistos::SetViewHistoPadMargins(const TString& HistoType, const TString& opt_plot)
652 {
653 // Set active pad margins for histo view
654 
655 //.......... default
656  gStyle->SetPadBottomMargin(0.125);
657  gStyle->SetPadTopMargin(0.125);
658  gStyle->SetPadLeftMargin(0.125);
659  gStyle->SetPadRightMargin(0.125);
660 
661  if(HistoType == "colz" || HistoType == "lego" ||
662  HistoType == "surf" || HistoType == "Stin")
663  {
664  gStyle->SetPadBottomMargin(0.125);
665  gStyle->SetPadTopMargin(0.135);
666  gStyle->SetPadLeftMargin(0.135);
667  gStyle->SetPadRightMargin(0.135);
668  }
669 
670  if( HistoType == "Stex2DEB" )
671  {
672  gStyle->SetPadBottomMargin(0.145);
673  gStyle->SetPadTopMargin(0.135);
674  gStyle->SetPadLeftMargin(0.125);
675  gStyle->SetPadRightMargin(0.125);
676  }
677 
678  if( HistoType == "Stex2DEE" || HistoType == "Stex2DEENb")
679  {
680  gStyle->SetPadBottomMargin(0.120);
681  gStyle->SetPadTopMargin(0.110);
682  gStyle->SetPadLeftMargin(0.130);
683  gStyle->SetPadRightMargin(0.130);
684  }
685  if( HistoType == "Stas2DEB" )
686  {
687  gStyle->SetPadBottomMargin(0.145);
688  gStyle->SetPadTopMargin(0.135);
689  gStyle->SetPadLeftMargin(0.125);
690  gStyle->SetPadRightMargin(0.125);
691  }
692 
693  if( HistoType == "Stas2DEE")
694  {
695  gStyle->SetPadBottomMargin(0.145);
696  gStyle->SetPadTopMargin(0.135);
697  gStyle->SetPadLeftMargin(0.105);
698  gStyle->SetPadRightMargin(0.115);
699  }
700  if(HistoType == "Global")
701  {
702  gStyle->SetPadBottomMargin((Float_t)0.125);
703  gStyle->SetPadTopMargin((Float_t)0.175);
704  gStyle->SetPadLeftMargin((Float_t)0.115);
705  gStyle->SetPadRightMargin((Float_t)0.05);
706  }
707 
708  if(HistoType == "Proj" || HistoType == "SampProj")
709  {
710  gStyle->SetPadBottomMargin(0.115);
711  gStyle->SetPadTopMargin(0.155);
712  gStyle->SetPadLeftMargin(0.15);
713  gStyle->SetPadRightMargin(0.05);
714  }
715 
716  if( HistoType == "H1Basic" )
717  {
718  gStyle->SetPadBottomMargin(0.1275);
719  gStyle->SetPadTopMargin(0.165);
720  gStyle->SetPadLeftMargin(0.15);
721  gStyle->SetPadRightMargin(0.05);
722  }
723 
724  if( HistoType == "Evol" && opt_plot == "ONLYONE")
725  {
726  gStyle->SetPadBottomMargin(0.110);
727  gStyle->SetPadTopMargin(0.2);
728  gStyle->SetPadLeftMargin(0.115);
729  gStyle->SetPadRightMargin(0.035);
730  }
731  if( HistoType == "Evol" && opt_plot == "SAME")
732  {
733  gStyle->SetPadBottomMargin(0.110);
734  gStyle->SetPadTopMargin(0.185);
735  gStyle->SetPadLeftMargin(0.115);
736  gStyle->SetPadRightMargin(0.035);
737  }
738  if( HistoType == "Evol" && opt_plot == "SAME n")
739  {
740  gStyle->SetPadBottomMargin(0.110);
741  gStyle->SetPadTopMargin(0.1);
742  gStyle->SetPadLeftMargin(0.115);
743  gStyle->SetPadRightMargin(0.035);
744  }
745 
746  if( HistoType == "EvolProj" && opt_plot == "ONLYONE")
747  {
748  gStyle->SetPadBottomMargin(0.1275);
749  gStyle->SetPadTopMargin(0.165);
750  gStyle->SetPadLeftMargin(0.15);
751  gStyle->SetPadRightMargin(0.05);
752  }
753  if( HistoType == "EvolProj" && opt_plot == "SAME")
754  {
755  gStyle->SetPadBottomMargin(0.110);
756  gStyle->SetPadTopMargin(0.185);
757  gStyle->SetPadLeftMargin(0.115);
758  gStyle->SetPadRightMargin(0.035);
759  }
760  if( HistoType == "EvolProj" && opt_plot == "SAME n")
761  {
762  gStyle->SetPadBottomMargin(0.110);
763  gStyle->SetPadTopMargin(0.1);
764  gStyle->SetPadLeftMargin(0.115);
765  gStyle->SetPadRightMargin(0.035);
766  }
767 }
768 //------- (end of SetViewHistoPadMargins) ----------------
769 
770 //===========================================================================
771 //
772 // SetViewHistoStats, SetViewHistoOffsets,
773 // AxisTitleOffset, AxisTitleSize, AxisLabelOffset,
774 // AxisLabelSize, AxisTickSize, DeeOffsetX, DeeNameOffsetX,
775 // SetViewGraphOffsets
776 //
777 //===========================================================================
779 {
780  // Set stats box for histo view
781 
782  Bool_t b_true = kTRUE;
783  Bool_t b_false = kFALSE;
784 
785  histo->SetStats(b_false);
786 
787  if(HistoType == "Global"){histo->SetStats(b_false);}
788  if(HistoType == "Proj" || HistoType == "SampProj" ){histo->SetStats(b_true);}
789 }
790 
791 void TEcnaParHistos::SetViewHistoOffsets(TH1D* histo, const TString& HistoType, const TString& opt_plot)
792 {
793 // Set offsets of labels, title axis, etc... for histo view
794 
795  if(HistoType == "Global")
796  {
797  //....................... x axis
798  histo->GetXaxis()->SetTitleOffset((Float_t)1.05);
799  histo->GetXaxis()->SetTitleSize((Float_t)0.04);
800 
801  histo->GetXaxis()->SetLabelOffset((Float_t)0.006);
802  histo->GetXaxis()->SetLabelSize((Float_t)0.04);
803 
804  histo->GetXaxis()->SetTickLength((Float_t)0.03);
805  histo->GetXaxis()->SetNdivisions((Int_t)510);
806 
807  //....................... y axis
808  histo->GetYaxis()->SetTitleOffset((Float_t)1.5);
809  histo->GetYaxis()->SetTitleSize((Float_t)0.04);
810 
811  histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
812  histo->GetYaxis()->SetLabelSize((Float_t)0.04);
813 
814  histo->GetYaxis()->SetTickLength((Float_t)0.03);
815  histo->GetYaxis()->SetNdivisions((Int_t)510);
816  }
817 
818  if(HistoType == "Proj" || HistoType == "SampGlobal" || HistoType == "SampProj" )
819  {
820  //....................... x axis
821  histo->GetXaxis()->SetTitleOffset((Float_t)1.05);
822  histo->GetXaxis()->SetTitleSize((Float_t)0.04);
823 
824  histo->GetXaxis()->SetLabelOffset((Float_t)0.006);
825  histo->GetXaxis()->SetLabelSize((Float_t)0.04);
826 
827  histo->GetXaxis()->SetTickLength((Float_t)0.03);
828  histo->GetXaxis()->SetNdivisions((Int_t)510);
829 
830  //....................... y axis
831  histo->GetYaxis()->SetTitleOffset((Float_t)1.75);
832  histo->GetYaxis()->SetTitleSize((Float_t)0.04);
833 
834  histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
835  histo->GetYaxis()->SetLabelSize((Float_t)0.04);
836 
837  histo->GetYaxis()->SetTickLength((Float_t)0.03);
838  histo->GetYaxis()->SetNdivisions((Int_t)510);
839  }
840 
841  if( HistoType == "H1Basic" || HistoType == "Evol" ||
842  ( HistoType == "EvolProj" && !(opt_plot == "SAME" || opt_plot == "SAME n") ) )
843  {
844  //....................... x axis
845  histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
846  histo->GetXaxis()->SetTitleSize((Float_t)0.04);
847 
848  histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
849  histo->GetXaxis()->SetLabelSize((Float_t)0.04);
850 
851  histo->GetXaxis()->SetTickLength((Float_t)0.03);
852  histo->GetXaxis()->SetNdivisions((Int_t)510);
853 
854  //....................... y axis
855  histo->GetYaxis()->SetTitleOffset((Float_t)1.75);
856  histo->GetYaxis()->SetTitleSize((Float_t)0.04);
857 
858  histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
859  histo->GetYaxis()->SetLabelSize((Float_t)0.04);
860 
861  histo->GetYaxis()->SetTickLength((Float_t)0.03);
862  histo->GetYaxis()->SetNdivisions((Int_t)510);
863  }
864 
865  if( HistoType == "EvolProj" && (opt_plot == "SAME" || opt_plot == "SAME n") )
866  {
867  //....................... x axis
868  histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
869  histo->GetXaxis()->SetTitleSize((Float_t)0.04);
870 
871  histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
872  histo->GetXaxis()->SetLabelSize((Float_t)0.04);
873 
874  histo->GetXaxis()->SetTickLength((Float_t)0.03);
875  histo->GetXaxis()->SetNdivisions((Int_t)510);
876 
877  //....................... y axis
878  histo->GetYaxis()->SetTitleOffset((Float_t)1.25);
879  histo->GetYaxis()->SetTitleSize((Float_t)0.04);
880 
881  histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
882  histo->GetYaxis()->SetLabelSize((Float_t)0.04);
883 
884  histo->GetYaxis()->SetTickLength((Float_t)0.03);
885  histo->GetYaxis()->SetNdivisions((Int_t)510);
886  }
887 
888  if(HistoType == "colz")
889  {
890  //....................... x axis
891  histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
892  histo->GetXaxis()->SetTitleSize((Float_t)0.04);
893 
894  histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
895  histo->GetXaxis()->SetLabelSize((Float_t)0.04);
896 
897  histo->GetXaxis()->SetTickLength((Float_t)0.03);
898  histo->GetXaxis()->SetNdivisions((Int_t)510);
899 
900  //....................... y axis
901  histo->GetYaxis()->SetTitleOffset((Float_t)1.45);
902  histo->GetYaxis()->SetTitleSize((Float_t)0.04);
903 
904  histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
905  histo->GetYaxis()->SetLabelSize((Float_t)0.04);
906 
907  histo->GetYaxis()->SetTickLength((Float_t)0.03);
908  histo->GetYaxis()->SetNdivisions((Int_t)510);
909  }
910 
911  if(HistoType == "lego" || HistoType == "surf" )
912  {
913  //....................... x axis
914  histo->GetXaxis()->SetTitleOffset((Float_t)1.7);
915  histo->GetXaxis()->SetTitleSize((Float_t)0.04);
916 
917  histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
918  histo->GetXaxis()->SetLabelSize((Float_t)0.04);
919 
920  histo->GetXaxis()->SetTickLength((Float_t)0.03);
921  histo->GetXaxis()->SetNdivisions((Int_t)510);
922 
923  //....................... y axis
924  histo->GetYaxis()->SetTitleOffset((Float_t)1.85);
925  histo->GetYaxis()->SetTitleSize((Float_t)0.04);
926 
927  histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
928  histo->GetYaxis()->SetLabelSize((Float_t)0.04);
929 
930  histo->GetYaxis()->SetTickLength((Float_t)0.03);
931  histo->GetYaxis()->SetNdivisions((Int_t)510);
932  }
933 
934  if(HistoType == "Stin")
935  {
936  //.......... x axis (remove labels and ticks)
937  histo->GetXaxis()->SetTitleOffset((Float_t)9999.);
938  histo->GetXaxis()->SetTitleSize((Float_t)0.05);
939 
940  histo->GetXaxis()->SetLabelOffset((Float_t)9999.);
941  histo->GetXaxis()->SetLabelSize((Float_t)0.);
942 
943  histo->GetXaxis()->SetNdivisions((Int_t)1);
944  histo->GetXaxis()->SetTickLength((Float_t)0.);
945 
946  //.......... y axis (remove labels and ticks)
947  histo->GetYaxis()->SetTitleOffset((Float_t)9999.);
948  histo->GetYaxis()->SetTitleSize((Float_t)0.05);
949 
950  histo->GetYaxis()->SetLabelOffset((Float_t)9999.);
951  histo->GetYaxis()->SetLabelSize((Float_t)0.);
952 
953  histo->GetYaxis()->SetNdivisions((Int_t)1);
954  histo->GetYaxis()->SetTickLength((Float_t)0.);
955  }
956 
957  if( HistoType == "Stex2DEB" || HistoType == "Stex2DEE" || HistoType == "Stex2DEENb" ||
958  HistoType == "Stas2DEB" || HistoType == "Stas2DEE" )
959  {
960  //.......... x axis (remove labels and ticks)
961  histo->GetXaxis()->SetTitleOffset((Float_t)9999.);
962  histo->GetXaxis()->SetTitleSize((Float_t)0.075);
963 
964  histo->GetXaxis()->SetLabelOffset((Float_t)9999.);
965  histo->GetXaxis()->SetLabelSize((Float_t)0.);
966 
967  histo->GetXaxis()->SetNdivisions((Int_t)1);
968  histo->GetXaxis()->SetTickLength((Float_t)0.);
969 
970  //.......... y axis (remove labels and ticks)
971  histo->GetYaxis()->SetTitleOffset((Float_t)9999.);
972  histo->GetYaxis()->SetTitleSize((Float_t)0.075);
973 
974  histo->GetYaxis()->SetLabelOffset((Float_t)9999.);
975  histo->GetYaxis()->SetLabelSize((Float_t)0.);
976 
977  histo->GetYaxis()->SetNdivisions((Int_t)1);
978  histo->GetYaxis()->SetTickLength((Float_t)0.);
979  }
980 }
981 
982 //----------------------------------------------
984 {
985  return AxisTitleOffset("");
986 }
987 Float_t TEcnaParHistos::AxisTitleOffset(const TString& opt)
988 {
989  Float_t tit_off = 1.;
990 
991  if( opt == "" ){tit_off = 0.055;}
992  if( opt == "Towx" ){tit_off = 1.15;}
993  if( opt == "Towy" ){tit_off = 1.15;}
994  if( opt == "SMx" ){tit_off = 1.15;}
995  if( opt == "SMy" ){tit_off = 0.5;}
996  if( opt == "SMyInEB" ){tit_off = 0.7;}
997  if( opt == "EBy" ){tit_off = 1.;}
998  if( opt == "EBx" ){tit_off = 1.3;}
999 
1000  if( opt == "SCx" ){tit_off = 1.15;}
1001  if( opt == "SCy" ){tit_off = 1.15;}
1002  if( opt == "Deex"){tit_off = 0.75;}
1003  if( opt == "Deey"){tit_off = 1.2;}
1004  if( opt == "EEx" ){tit_off = 1.2;}
1005  if( opt == "EEy" ){tit_off = 1.;}
1006 
1007  return tit_off;
1008 }
1009 //............................................
1011 {
1012  return AxisTitleSize("");
1013 }
1014 Float_t TEcnaParHistos::AxisTitleSize(const TString& opt)
1015 {
1016  Float_t tit_siz = 0.045;
1017  if( opt == "" ){tit_siz = 0.045;}
1018  return tit_siz;
1019 }
1020 //............................................
1022 {
1023  return AxisLabelOffset("");
1024 }
1025 Float_t TEcnaParHistos::AxisLabelOffset(const TString& opt)
1026 {
1027  Float_t lab_off = 0.02;
1028  if( opt == "" ){lab_off = 0.02;}
1029 
1030  if( opt == "Towx"){lab_off = 0.01;}
1031  if( opt == "Towy"){lab_off = 0.03;}
1032  if( opt == "SMx" ){lab_off = 0.01;}
1033  if( opt == "SMy" ){lab_off = 0.015;}
1034  if( opt == "EBx" ){lab_off = 0.03;}
1035  if( opt == "EBy" ){lab_off = 0.015;}
1036 
1037  if( opt == "SCx" ){lab_off = 0.01;}
1038  if( opt == "SCy" ){lab_off = 0.03;}
1039  if( opt == "Deex"){lab_off = 0.002;}
1040  if( opt == "Deey"){lab_off = 0.03;}
1041  if( opt == "EEx" ){lab_off = 0.015;}
1042  if( opt == "EEy" ){lab_off = 0.02;}
1043 
1044  return lab_off;
1045 }
1046 //............................................
1048 {
1049  return AxisLabelSize("");
1050 }
1051 Float_t TEcnaParHistos::AxisLabelSize(const TString& opt)
1052 {
1053  Float_t lab_siz = 0.035;
1054  if( opt == "SMx" ){lab_siz = 0.05;}
1055  if( opt == "SMy" ){lab_siz = 0.05;}
1056  if( opt == "EBx" ){lab_siz = 0.04;}
1057  if( opt == "EBy" ){lab_siz = 0.04;}
1058  return lab_siz;
1059 }
1060 //............................................
1062 {
1063  return AxisTickSize("");
1064 }
1065 Float_t TEcnaParHistos::AxisTickSize(const TString& opt)
1066 {
1067 //.......... works only with option "S" in TGaxis
1068  Float_t tic_siz = 0.;
1069  if( opt == "Dee" ){tic_siz = 0.;}
1070  if( opt == "Deex" ){tic_siz = 0.01;}
1071  if( opt == "Deey" ){tic_siz = 0.02;}
1072  if( opt == "SMx" ){tic_siz = 0.03;}
1073  if( opt == "SMy" ){tic_siz = 0.0075;}
1074  if( opt == "EEx" ){tic_siz = 0.06;}
1075  if( opt == "EEy" ){tic_siz = 0.005;}
1076 
1077  return tic_siz;
1078 }
1079 //-----------------------------------------------
1080 
1081 void TEcnaParHistos::SetViewGraphOffsets(TGraph* graph, const TString& HistoType)
1082 {
1083 // Set offsets of labels, title axis, etc... for histo view
1084 
1085  if( (HistoType == "H1Basic") || (HistoType == "Evol") )
1086  {
1087  //....................... x axis
1088  graph->GetXaxis()->SetTitleOffset((Float_t)1.10);
1089  graph->GetXaxis()->SetTitleSize((Float_t)0.04);
1090 
1091  graph->GetXaxis()->SetLabelOffset((Float_t)0.015);
1092  graph->GetXaxis()->SetLabelSize((Float_t)0.04);
1093 
1094  graph->GetXaxis()->SetTickLength((Float_t)0.02);
1095  graph->GetXaxis()->SetNdivisions((Int_t)510);
1096 
1097  //....................... y axis
1098  graph->GetYaxis()->SetTitleOffset((Float_t)1.25);
1099  graph->GetYaxis()->SetTitleSize((Float_t)0.04);
1100 
1101  graph->GetYaxis()->SetLabelOffset((Float_t)0.01);
1102  graph->GetYaxis()->SetLabelSize((Float_t)0.04);
1103 
1104  graph->GetYaxis()->SetTickLength((Float_t)0.03);
1105  graph->GetYaxis()->SetNdivisions((Int_t)510);
1106  }
1107 }
1108 //-----------------------------------------------
1109 Float_t TEcnaParHistos::DeeOffsetX(const TString& opt_plot, const Int_t& DeeNumber)
1110 {
1111  Float_t offset = 0;
1112  if( opt_plot == "Dee" ){offset = 0;}
1113  if( opt_plot == "EE" )
1114  {
1115  Double_t vertic_empty_strip_1 = 1.;
1116  if( DeeNumber == 1 ){offset = vertic_empty_strip_1
1118  if( DeeNumber == 2 ){offset = vertic_empty_strip_1 + 2*fEcal->MaxStinHocoInStex() + 1.;}
1119  if( DeeNumber == 3 ){offset = vertic_empty_strip_1 + fEcal->MaxStinHocoInStex();}
1120  if( DeeNumber == 4 ){offset = vertic_empty_strip_1 + 0.;}
1121  }
1122  return offset;
1123 }
1124 
1125 //-----------------------------------------------
1126 Float_t TEcnaParHistos::DeeNameOffsetX(const Int_t& DeeNumber)
1127 {
1128  Float_t offset = 0;
1129 
1130  if( DeeNumber == 1 ){offset = 8.;}
1131  if( DeeNumber == 2 ){offset = 0.;}
1132  if( DeeNumber == 3 ){offset = 7.6;}
1133  if( DeeNumber == 4 ){offset = -0.5;}
1134 
1135  return offset;
1136 }
1137 //-----------------------------------------------
1138 Float_t TEcnaParHistos::DeeNumberOffsetX(const TString& opt_plot, const Int_t& DeeNumber)
1139 {
1140  Float_t offset = 0;
1141 
1142  if( opt_plot == "Dee" )
1143  {
1144  if( DeeNumber == 1 ){offset = 2.5;}
1145  if( DeeNumber == 2 ){offset = 41.5;}
1146  if( DeeNumber == 3 ){offset = 2.5;}
1147  if( DeeNumber == 4 ){offset = 41.5;}
1148  }
1149  if( opt_plot == "EE" )
1150  {
1151  if( DeeNumber == 1 ){offset = 0.42;}
1152  if( DeeNumber == 2 ){offset = 8.15;}
1153  if( DeeNumber == 3 ){offset = 0.42;}
1154  if( DeeNumber == 4 ){offset = 8.15;}
1155  }
1156  return offset;
1157 }
1158 //===========================================================================
1159 //
1160 // SetPaveGeneralComment,
1161 // SetPaveAnalysisRun, SetPaveNbOfEvts,
1162 // SetPaveEvolNbOfEvtsAna, SetPaveEvolRuns,
1163 // SetOptionSamePaveBorder
1164 //
1165 //
1166 // W A R N I N G
1167 //
1168 // ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
1169 //
1170 // WARNING => Paves for plot option "SEVERAL" and "SAMEONE" are treated
1171 // in TEcnaHistos
1172 //
1173 // ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
1174 //
1175 //===========================================================================
1176 
1178 {
1179 // General comment
1180 
1181  TPaveText* title_g1;
1182 
1183  if( comment != "" )
1184  {
1185  fCnew++;
1186 
1187  Double_t pav_gen_xgauche = BoxLeftX("general_comment");
1188  Double_t pav_gen_xdroite = BoxRightX("general_comment");
1189  Double_t pav_gen_ybas = BoxBottomY("general_comment");
1190  Double_t pav_gen_yhaut = BoxTopY("general_comment");
1191 
1192  title_g1 =
1193  new TPaveText(pav_gen_xgauche, pav_gen_ybas,
1194  pav_gen_xdroite, pav_gen_yhaut); fCnewRoot++;
1195 
1196  Option_t* opt_pav = "arc"; title_g1->SetOption(opt_pav); // <= NE MARCHE PAS
1197 
1198  TString tit_gen = comment.Data();
1199 
1200  //<<<<<<< TEcnaParHistos.cc
1201  //sprintf( f_in, tit_gen.Data());
1202  //title_g1->AddText(f_in);
1203  //=======
1204  title_g1->AddText(tit_gen);
1205  //>>>>>>> 1.5
1206 
1207  // 1 = left adjusted, 2 = vertically centered
1208  Int_t cTextPaveAlign = 12; title_g1->SetTextAlign(cTextPaveAlign);
1209  // 10*10 = 10*(ID10 = Courier New) // 10*4 = 10*(ID4 = Arial)
1210  Int_t cTextPaveFont = 40; title_g1->SetTextFont(cTextPaveFont);
1211  // 0.95 = 95% of the pave size
1212  Float_t cTextPaveSize = 0.04; title_g1->SetTextSize(cTextPaveSize);
1213  Int_t cTextBorderSize = 0; title_g1->SetBorderSize(cTextBorderSize);
1214  Double_t cTextPaveRadius = 5.; title_g1->SetCornerRadius(cTextPaveRadius); // <= NE MARCHE PAS
1215  // Int_t cTextPaveShadCol = 0; title_g1->SetShadowColor(cTextPaveShadCol); // <= methode non reconnue
1216 
1217  fCdelete++;
1218  }
1219  else
1220  {
1221  title_g1 = new TPaveText( 0, 0, 0, 0); title_g1=nullptr; fCnewRoot++;
1222  }
1223  return title_g1;
1224 }
1225 
1226 TPaveText* TEcnaParHistos::SetPaveAnalysisRun(const TString& ana_type, const Int_t& nb_of_samples,
1227  const Int_t& run_number, const TString& run_type,
1228  const Int_t& first_evt, const Int_t& last_evt, const TString& nb_col)
1229 {
1230 // Analysis name + Nb of samples + run number comment
1231 
1232  char f_in[fgMaxCar];
1233 
1234  //...................... Pave Analysis name/run number (bottom_left_box)
1235  Double_t pav_bot_left_xgauche = BoxLeftX("bottom_left_box");
1236  Double_t pav_bot_left_xdroite = BoxRightX("bottom_left_box");
1237  Double_t pav_bot_left_ybas = BoxBottomY("bottom_left_box");
1238  Double_t pav_bot_left_yhaut = BoxTopY("bottom_left_box");
1239 
1240  TPaveText *com_bot_left =
1241  new TPaveText(pav_bot_left_xgauche, pav_bot_left_ybas,
1242  pav_bot_left_xdroite, pav_bot_left_yhaut); fCnewRoot++;
1243 
1244  // (1 = left adjusted, 2 = centered adjusted, 3 = left adjusted), 2 = vertically centered
1245  Int_t cTextPaveAlign = 12; com_bot_left->SetTextAlign(cTextPaveAlign);
1246  // 10*10 = 10*(ID10 = Courier New) // 10*4 = 10*(ID4 = Arial)
1247  Int_t cTextPaveFont = 100; com_bot_left->SetTextFont(cTextPaveFont);
1248  // 0.95 = 95% of the pave size
1249  Float_t cTextPaveSize = 0.025; com_bot_left->SetTextSize(cTextPaveSize);
1250  // Int_t cTextPaveShadCol = 0; com_bot_left->SetShadowColor(cTextPaveShadCol);
1251  Int_t cTextBorderSize = 1; com_bot_left->SetBorderSize(cTextBorderSize);
1252 
1253  if( nb_col == "TwoCol")
1254  {
1255  cTextPaveSize = 0.035; com_bot_left->SetTextSize(cTextPaveSize);
1256  snprintf(f_in, fgMaxCar, "Run: %d Samples: 1 - %d", run_number, nb_of_samples);
1257  com_bot_left->AddText(f_in);
1258  cTextPaveSize = 0.035; com_bot_left->SetTextSize(cTextPaveSize);
1259  snprintf(f_in, fgMaxCar, "Type: %-20s", run_type.Data());
1260  com_bot_left->AddText(f_in);
1261  snprintf(f_in, fgMaxCar, "Analysis: %-10s Evts range: %d - %d ", ana_type.Data(), first_evt, last_evt);
1262  com_bot_left->AddText(f_in);
1263  }
1264  else
1265  {
1266  cTextPaveSize = 0.0225; com_bot_left->SetTextSize(cTextPaveSize);
1267  snprintf(f_in, fgMaxCar, "Run: %d ", run_number);
1268  com_bot_left->AddText(f_in);
1269  snprintf(f_in, fgMaxCar, "Type: %-20s", run_type.Data());
1270  com_bot_left->AddText(f_in);
1271  snprintf(f_in, fgMaxCar, "Analysis: %-10s ", ana_type.Data());
1272  com_bot_left->AddText(f_in);
1273  Int_t un = 1;
1274  snprintf(f_in, fgMaxCar, "Samples: %d - %d", un, nb_of_samples);
1275  com_bot_left->AddText(f_in);
1276  snprintf(f_in, fgMaxCar, "Evts range: %d - %d", first_evt, last_evt);
1277  com_bot_left->AddText(f_in);
1278  }
1279 
1280  return com_bot_left;
1281 }
1282 
1283 TPaveText* TEcnaParHistos::SetPaveNbOfEvts(const Int_t& nb_of_evts,
1284  const TString& start_date, const TString& stop_date,
1285  const TString& nb_col)
1286 {
1287 // Number of events box
1288 
1289  char f_in[fgMaxCar];
1290 
1291  //...................... Pave number of events (bottom_right_box)
1292 
1293  Double_t pav_bot_right_xgauche = BoxLeftX("bottom_right_box");
1294  Double_t pav_bot_right_xdroite = BoxRightX("bottom_right_box");
1295  Double_t pav_bot_right_ybas = BoxBottomY("bottom_right_box");
1296  Double_t pav_bot_right_yhaut = BoxTopY("bottom_right_box");
1297  TPaveText *com_bot_right =
1298  new TPaveText(pav_bot_right_xgauche, pav_bot_right_ybas,
1299  pav_bot_right_xdroite, pav_bot_right_yhaut); fCnewRoot++;
1300 
1301  // 1 = left adjusted, 2 = vertically centered
1302  Int_t cTextPaveAlign = 12; com_bot_right->SetTextAlign(cTextPaveAlign);
1303  // 10*4 = 10*(ID4 = Arial) // 10*10 = 10*(ID10 = Courier New)
1304  Int_t cTextPaveFont = 100; com_bot_right->SetTextFont(cTextPaveFont);
1305  // 0.05 = 5% of the pave size
1306  Float_t cTextPaveSize = 0.025; com_bot_right->SetTextSize(cTextPaveSize);
1307  //Int_t cTextPaveShadCol = 0; com_bot_right->SetShadowColor(cTextPaveShadCol);
1308  Int_t cTextBorderSize = 1; com_bot_right->SetBorderSize(cTextBorderSize);
1309 
1310  if( nb_col == "TwoCol")
1311  {
1312  cTextPaveSize = 0.0325; com_bot_right->SetTextSize(cTextPaveSize);
1313  snprintf(f_in, fgMaxCar, "First evt: %s %8d events ", start_date.Data(), nb_of_evts);
1314  com_bot_right->AddText(f_in);
1315  snprintf(f_in, fgMaxCar, "Last evt: %s ", stop_date.Data());
1316  com_bot_right->AddText(f_in);
1317  }
1318  else
1319  {
1320  cTextPaveSize = 0.0225; com_bot_right->SetTextSize(cTextPaveSize);
1321  snprintf(f_in, fgMaxCar, "%d events", nb_of_evts);
1322  com_bot_right->AddText(f_in);
1323  snprintf(f_in, fgMaxCar, "First evt: %s ", start_date.Data());
1324  com_bot_right->AddText(f_in);
1325  snprintf(f_in, fgMaxCar, "Last evt: %s ", stop_date.Data());
1326  com_bot_right->AddText(f_in);
1327  }
1328 
1329  return com_bot_right;
1330 }
1331 
1332 TPaveText* TEcnaParHistos::SetPaveEvolNbOfEvtsAna(const TString& ana_type, const Int_t& nb_of_samples,
1333  const Int_t& first_req_evt, const Int_t& last_req_evt,
1334  const TString& HistoType)
1335 {
1336 // Analysis name + run number comment
1337 
1338  char f_in[fgMaxCar];
1339 
1340  //...................... Pave Analysis name/run number (bottom_left_box)
1341  Double_t pav_bot_left_xgauche = BoxLeftX("bottom_left_box");
1342  Double_t pav_bot_left_xdroite = BoxRightX("bottom_left_box");
1343  Double_t pav_bot_left_ybas = BoxBottomY("bottom_left_box");
1344  Double_t pav_bot_left_yhaut = BoxTopY("bottom_left_box");
1345 
1346  if( HistoType == "EvolProj" )
1347  {
1348  pav_bot_left_xgauche = BoxLeftX("bottom_left_box_evol");
1349  pav_bot_left_xdroite = BoxRightX("bottom_left_box_evol");
1350  pav_bot_left_ybas = BoxBottomY("bottom_left_box_evol");
1351  pav_bot_left_yhaut = BoxTopY("bottom_left_box_evol");
1352  }
1353 
1354  TPaveText *com_bot_left =
1355  new TPaveText(pav_bot_left_xgauche, pav_bot_left_ybas,
1356  pav_bot_left_xdroite, pav_bot_left_yhaut); fCnewRoot++;
1357 
1358  // 1 = left adjusted, 2 = vertically centered
1359  Int_t cTextPaveAlign = 12; com_bot_left->SetTextAlign(cTextPaveAlign);
1360  // 10*10 = 10*(ID10 = Courier New) // 10*4 = 10*(ID4 = Arial)
1361  Int_t cTextPaveFont = 100; com_bot_left->SetTextFont(cTextPaveFont);
1362  // 0.95 = 95% of the pave size
1363  Float_t cTextPaveSize = 0.03; com_bot_left->SetTextSize(cTextPaveSize);
1364  Int_t cTextBorderSize = 1; com_bot_left->SetBorderSize(cTextBorderSize);
1365 
1366  TString analysis_name = ana_type.Data();
1367 
1368  snprintf(f_in, fgMaxCar, "Analysis: %s", analysis_name.Data());
1369  com_bot_left->AddText(f_in);
1370  snprintf(f_in, fgMaxCar, "Samples: 1 - %d", nb_of_samples);
1371  com_bot_left->AddText(f_in);
1372  snprintf(f_in, fgMaxCar, "Evts range: %d - %d ", first_req_evt, last_req_evt);
1373  com_bot_left->AddText(f_in);
1374 
1375  return com_bot_left;
1376 }
1377 
1378 TPaveText* TEcnaParHistos::SetPaveEvolRuns(const Int_t& start_evol_run, const TString& start_evol_date,
1379  const Int_t& stop_evol_run, const TString& stop_evol_date,
1380  const TString& opt_plot, const TString& HistoType)
1381 {
1382 // First and last run of the list of runs
1383 
1384  char f_in[fgMaxCar];
1385 
1386  //...................... Pave first and last runs (bottom_right_box)
1387  Double_t pav_border_xgauche = BoxLeftX("bottom_right_box_evol");
1388  Double_t pav_border_xdroite = BoxRightX("bottom_right_box_evol");
1389  Double_t pav_border_ybas = BoxBottomY("bottom_right_box_evol");
1390  Double_t pav_border_yhaut = BoxTopY("bottom_right_box_evol");
1391 
1392  if( opt_plot == "SAME n" )
1393  {
1394  pav_border_xgauche = BoxLeftX("bottom_right_box_evpr");
1395  pav_border_xdroite = BoxRightX("bottom_right_box_evpr");
1396  pav_border_ybas = BoxBottomY("top_right_box_EB");
1397  pav_border_yhaut = BoxTopY("top_right_box_EB");
1398  }
1399 
1400  TPaveText *pav_evol_runs =
1401  new TPaveText(pav_border_xgauche, pav_border_ybas,
1402  pav_border_xdroite, pav_border_yhaut); fCnewRoot++;
1403 
1404  // 1 = left adjusted, 2 = vertically centered
1405  Int_t cTextPaveAlign = 12; pav_evol_runs->SetTextAlign(cTextPaveAlign);
1406  // 10*4 = 10*(ID4 = Courier helvetica-medium-r-normal = Arial)
1407  // 10*10 = 10*(ID10 = Courier bold-r-normal = Courier New)
1408  Int_t cTextPaveFont = 100; pav_evol_runs->SetTextFont(cTextPaveFont);
1409  // 0.03 = 3% of the pave height
1410  Float_t cTextPaveSize = 0.025;
1411  if( HistoType == "Evol" || HistoType == "EvolProj"){cTextPaveSize = 0.0225;}
1412 
1413  pav_evol_runs->SetTextSize(cTextPaveSize);
1414  Int_t cTextBorderSize = 1; pav_evol_runs->SetBorderSize(cTextBorderSize);
1415 
1416  if( !( (HistoType == "Evol" && opt_plot == "SAME n") ||
1417  (HistoType == "EvolProj" && opt_plot == "SAME n") ) )
1418  {
1419  snprintf(f_in, fgMaxCar, "First run: %d", start_evol_run);
1420  pav_evol_runs->AddText(f_in);
1421  snprintf(f_in, fgMaxCar, "(%s) ", start_evol_date.Data());
1422  pav_evol_runs->AddText(f_in);
1423  snprintf(f_in, fgMaxCar, "Last run: %d", stop_evol_run);
1424  pav_evol_runs->AddText(f_in);
1425  snprintf(f_in, fgMaxCar, "(%s) ", stop_evol_date.Data());
1426  pav_evol_runs->AddText(f_in);
1427  }
1428 
1429  if( (HistoType == "Evol" && opt_plot == "SAME n") ||
1430  (HistoType == "EvolProj" && opt_plot == "SAME n") )
1431  {
1432  snprintf(f_in, fgMaxCar, "First run: %d (%s) ", start_evol_run, start_evol_date.Data());
1433  pav_evol_runs->AddText(f_in);
1434  snprintf(f_in, fgMaxCar, "Last run: %d (%s)", stop_evol_run, stop_evol_date.Data());
1435  pav_evol_runs->AddText(f_in);
1436  }
1437 
1438  return pav_evol_runs;
1439 }
1440 
1441 TPaveText* TEcnaParHistos::SetOptionSamePaveBorder(const TString& chopt, const TString& HistoType)
1442 {
1443 // Pave for plots with option SAME and SAME n.
1444 // Gives just the size/border and return the pointer to the Pave. No text.
1445 // The Pave text is drawn in TEcnaHistos.cc
1446 
1447  //.................................. DEFAULT OPTION: "several"
1448 
1449  Double_t pav_left_xgauche = BoxLeftX("several_plots_box");
1450  Double_t pav_left_xdroite = BoxRightX("several_plots_box");
1451  Double_t pav_left_ybas = BoxBottomY("several_plots_box");
1452  Double_t pav_left_yhaut = BoxTopY("several_plots_box");
1453 
1454  if(chopt == "sevevol")
1455  {
1456  pav_left_xgauche = BoxLeftX("several_evol_box");
1457  pav_left_xdroite = BoxRightX("several_evol_box");
1458  pav_left_ybas = BoxBottomY("several_evol_box");
1459  pav_left_yhaut = BoxTopY("several_evol_box");
1460 
1461  if( HistoType == "EvolProj" )
1462  {
1463  pav_left_xgauche = BoxLeftX("several_evpr_box");
1464  pav_left_xdroite = BoxRightX("several_evpr_box");
1465  pav_left_ybas = BoxBottomY("several_evpr_box");
1466  pav_left_yhaut = BoxTopY("several_evpr_box");
1467  }
1468  }
1469 
1470  TPaveText *com_several =
1471  new TPaveText(pav_left_xgauche, pav_left_ybas,
1472  pav_left_xdroite, pav_left_yhaut); fCnewRoot++;
1473 
1474  return com_several;
1475 }
1476 //.... end of SetOptionSamePaveBorder
1477 //===========================================================================
1478 //
1479 // SetPaveSM, SetPaveTower, SetPaveTowersXY,
1480 // SetPaveEBCrystal, SetPaveEBCrystalSample,
1481 // SetPaveLVRB, SetColorsForNumbers
1482 //
1483 //===========================================================================
1485 {
1486  char f_in[fgMaxCar];
1487  //.................................. DEFAULT OPTION: "standard"
1488  Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
1489  Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
1490  Double_t pav_top_left_ybas = BoxBottomY("top_left_box_SM");
1491  Double_t pav_top_left_yhaut = BoxTopY("top_left_box_SM");
1492 
1493  TPaveText *com_top_left =
1494  new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
1495  pav_top_left_xdroite, pav_top_left_yhaut); fCnewRoot++;
1496 
1497  // 1 = left adjusted, 2 = vertically centered
1498  Int_t cTextPaveAlign = 12; com_top_left->SetTextAlign(cTextPaveAlign);
1499  // 10*10 = 10*(ID10 = Courier New)
1500  Int_t cTextPaveFont = 100; com_top_left->SetTextFont(cTextPaveFont);
1501  // 0.95 = 95% of the pave size
1502  Float_t cTextPaveSize = 0.04; com_top_left->SetTextSize(cTextPaveSize);
1503  Int_t cTextBorderSize = 1; com_top_left->SetBorderSize(cTextBorderSize);
1504 
1505  if ( fFlagSubDet == "EB"){ snprintf(f_in, fgMaxCar, "EB");}
1506  if ( fFlagSubDet == "EE"){ snprintf(f_in, fgMaxCar, "EE");}
1507 
1508  com_top_left->AddText(f_in);
1509 
1510  return com_top_left;
1511 }
1512 
1513 TPaveText* TEcnaParHistos::SetPaveSM(const TString& chopt, const Int_t& SM_number,
1514  const TString& EB_type)
1515 {
1516 // Pave for Super-module plots
1517 
1518  char f_in[fgMaxCar];
1519 
1520  //.................................. DEFAULT OPTION: "standard"
1521  Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
1522  Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
1523  Double_t pav_top_left_ybas = BoxBottomY("top_left_box_SM");
1524  Double_t pav_top_left_yhaut = BoxTopY("top_left_box_SM");
1525 
1526  if( chopt == "standard" || (chopt == "standGH" && EB_type == "EB-") )
1527  {
1528  pav_top_left_xgauche = BoxLeftX("top_left_box_EB");
1529  pav_top_left_xdroite = BoxRightX("top_left_box_EB");
1530  pav_top_left_ybas = BoxBottomY("top_left_box_EB");
1531  pav_top_left_yhaut = BoxTopY("top_left_box_EB");
1532  }
1533 
1534  if( chopt == "standSM" || chopt == "standStex" || (chopt == "standGH" && EB_type == "EB+") )
1535  {
1536  pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
1537  pav_top_left_xdroite = BoxRightX("top_left_box_SM");
1538  pav_top_left_ybas = BoxBottomY("top_left_box_SM");
1539  pav_top_left_yhaut = BoxTopY("top_left_box_SM");
1540  }
1541 
1542  if( chopt == "several" )
1543  {
1544  pav_top_left_xgauche = BoxLeftX("several_plots_box");
1545  pav_top_left_xdroite = BoxRightX("several_plots_box");
1546  pav_top_left_ybas = BoxBottomY("several_plots_box");
1547  pav_top_left_yhaut = BoxTopY("several_plots_box");
1548  }
1549 
1550  if( chopt == "sevevol" )
1551  {
1552  pav_top_left_xgauche = BoxLeftX("several_evol_box");
1553  pav_top_left_xdroite = BoxRightX("several_evol_box");
1554  pav_top_left_ybas = BoxBottomY("several_evol_box");
1555  pav_top_left_yhaut = BoxTopY("several_evol_box");
1556  }
1557 
1558  TPaveText *com_top_left =
1559  new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
1560  pav_top_left_xdroite, pav_top_left_yhaut); fCnewRoot++;
1561 
1562  // 1 = left adjusted, 2 = vertically centered
1563  Int_t cTextPaveAlign = 12; com_top_left->SetTextAlign(cTextPaveAlign);
1564  // 10*10 = 10*(ID10 = Courier New)
1565  Int_t cTextPaveFont = 100; com_top_left->SetTextFont(cTextPaveFont);
1566  // 0.95 = 95% of the pave size
1567  Float_t cTextPaveSize = 0.04; com_top_left->SetTextSize(cTextPaveSize);
1568  Int_t cTextBorderSize = 1; com_top_left->SetBorderSize(cTextBorderSize);
1569 
1570  if( chopt == "standard" || chopt == "standSM" || chopt == "standStex" || chopt == "standGH")
1571  {
1572  Int_t sm_nb = SM_number;
1573  if( EB_type == "EB+" ){ snprintf(f_in, fgMaxCar, "EB+%d", sm_nb);}
1574  if( EB_type == "EB-" )
1575  {sm_nb = -SM_number+fEcal->MaxSMInEB()/2;
1576  snprintf(f_in, fgMaxCar, "EB%d (SM%d)", sm_nb, SM_number);}
1577  com_top_left->AddText(f_in);
1578  }
1579 
1580  return com_top_left;
1581 }
1582 
1583 TPaveText* TEcnaParHistos::SetPaveTower(const Int_t& SMtower_X)
1584 {
1585 // Tower comment
1586 
1587  char f_in[fgMaxCar];
1588  //...................... Pave tower/crystal(channel)/sample (top_right_box)
1589  Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
1590  Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
1591  Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EB");
1592  Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EB");
1593  TPaveText *com_top_mid =
1594  new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
1595  pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
1596 
1597  // 1 = left adjusted, 2 = vertically centered
1598  Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
1599  // 10*10 = 10*(ID10 = Courier New)
1600  Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
1601  // 0.95 = 95% of the pave size
1602  Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
1603  Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
1604 
1605  snprintf(f_in, fgMaxCar, " Tower: %d ", SMtower_X);
1606  com_top_mid->AddText(f_in);
1607 
1608  return com_top_mid;
1609 }
1610 
1611 TPaveText* TEcnaParHistos::SetPaveTowersXY(const Int_t& SMtower_X, const Int_t& SMtower_Y)
1612 {
1613 // Towers X and Y for (TowEcha,TowEcha) cov or cor matrix
1614 
1615  char f_in[fgMaxCar];
1616  //...................... Pave tower/TowEcha(channel)/sample (top_right_box)
1617  Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
1618  Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
1619  Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EB");
1620  Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EB");
1621  TPaveText *com_top_mid =
1622  new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
1623  pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
1624 
1625  // 1 = left adjusted, 2 = vertically centered
1626  Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
1627  // 10*10 = 10*(ID10 = Courier New)
1628  Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
1629  // 0.95 = 95% of the pave size
1630  Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
1631  Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
1632 
1633  snprintf(f_in, fgMaxCar, " Tower X: %d ", SMtower_X);
1634  com_top_mid->AddText(f_in);
1635  snprintf(f_in, fgMaxCar, " Tower Y: %d ", SMtower_Y);
1636  com_top_mid->AddText(f_in);
1637 
1638  return com_top_mid;
1639 }
1640 
1641 
1642 TPaveText* TEcnaParHistos::SetPaveCrystal(const Int_t& StexCrys, const Int_t& StexStinA,
1643  const Int_t& StinEcha)
1644 {
1645  Int_t arg_AlreadyRead = 0;
1646  Int_t flag_all_samples = 0;
1647  return SetPaveCrystal(StexCrys, StexStinA, StinEcha, arg_AlreadyRead, flag_all_samples);
1648 }
1649 
1650 TPaveText* TEcnaParHistos::SetPaveCrystal(const Int_t& StexCrys, const Int_t& StexStinA,
1651  const Int_t& StinEcha, const Int_t& arg_AlreadyRead,
1652  const Int_t& flag_all_samples)
1653 {
1654 // Tower + StinEcha comment. StexCrys range: [1,max]
1655 
1656  char f_in[fgMaxCar];
1657  //...................... Pave tower/StinEcha(channel)/sample (top_right_box)
1658 
1659  Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
1660  Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
1661  Double_t pav_top_right_ybas = BoxBottomY("top_right_box_EB");
1662  Double_t pav_top_right_yhaut = BoxTopY("top_right_box_EB");
1663  if( fFlagSubDet == "EE" )
1664  {
1665  pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
1666  pav_top_right_xdroite = BoxRightX("top_right_box_EE");
1667  pav_top_right_ybas = BoxBottomY("top_right_box_EE");
1668  pav_top_right_yhaut = BoxTopY("top_right_box_EE");
1669  }
1670 
1671  TPaveText *com_top_right =
1672  new TPaveText(pav_top_right_xgauche, pav_top_right_ybas,
1673  pav_top_right_xdroite, pav_top_right_yhaut); fCnewRoot++;
1674 
1675  // 1 = left adjusted, 2 = vertically centered
1676  Int_t cTextPaveAlign = 12; com_top_right->SetTextAlign(cTextPaveAlign);
1677  // 10*10 = 10*(ID10 = Courier New)
1678  Int_t cTextPaveFont = 100; com_top_right->SetTextFont(cTextPaveFont);
1679  // 0.95 = 95% of the pave size
1680  Float_t cTextPaveSize = 0.03; com_top_right->SetTextSize(cTextPaveSize);
1681  Int_t cTextBorderSize = 1; com_top_right->SetBorderSize(cTextBorderSize);
1682 
1683  if( fFlagSubDet == "EB" )
1684  {
1685  if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
1686  { snprintf(f_in, fgMaxCar, "Channel: %d ", StinEcha); } // EB => range = [0,24]
1687  if( arg_AlreadyRead == 1 && flag_all_samples == 1 )
1688  { snprintf(f_in, fgMaxCar, "Channel: 0 to %d", fEcal->MaxCrysInStin()-1 ); }
1689  com_top_right->AddText(f_in);
1690  if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
1691  { snprintf(f_in, fgMaxCar, "Crystal in SM: %d ", StexCrys);
1692  com_top_right->AddText(f_in); }
1693  }
1694 
1695  if( fFlagSubDet == "EE" )
1696  {
1697  Int_t StinEchap = StinEcha+1;
1698  if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
1699  { snprintf(f_in, fgMaxCar, "Xtal in SC: %d ", StinEchap); } // EE => range = [1,25]
1700  if( arg_AlreadyRead == 1 && flag_all_samples == 1 )
1701  { snprintf(f_in, fgMaxCar, "Xtal in SC: 1 to %d", fEcal->MaxCrysInStin()); }
1702  com_top_right->AddText(f_in);
1703  if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
1704  {
1705  Int_t IX_Dee_crys = StexCrys/fEcal->MaxCrysIYInDee() + 1;
1706  Int_t IY_Dee_crys = StexCrys%fEcal->MaxCrysIYInDee();
1707  if( IY_Dee_crys == 0 ){IX_Dee_crys--; IY_Dee_crys = fEcal->MaxCrysIYInDee();}
1708  snprintf(f_in, fgMaxCar, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
1709  com_top_right->AddText(f_in);
1710  }
1711  }
1712 
1713  return com_top_right;
1714 }
1715 
1716 TPaveText* TEcnaParHistos::SetPaveCrystalSample(const Int_t& StexCrys, const Int_t& StexStinA,
1717  const Int_t& StinEcha, const Int_t& iSample)
1718 {
1719 // Tower + StinEcha + sample comment
1720 
1721  char f_in[fgMaxCar];
1722  //...................... Pave tower/StinEcha(channel)/sample (top_right_box)
1723  Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
1724  Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
1725  Double_t pav_top_right_ybas = BoxBottomY("top_right_box_EB");
1726  Double_t pav_top_right_yhaut = BoxTopY("top_right_box_EB");
1727  if( fFlagSubDet == "EE" )
1728  {
1729  pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
1730  pav_top_right_xdroite = BoxRightX("top_right_box_EE");
1731  pav_top_right_ybas = BoxBottomY("top_right_box_EE");
1732  pav_top_right_yhaut = BoxTopY("top_right_box_EE");
1733  }
1734 
1735  TPaveText *com_top_right =
1736  new TPaveText(pav_top_right_xgauche, pav_top_right_ybas,
1737  pav_top_right_xdroite, pav_top_right_yhaut); fCnewRoot++;
1738 
1739  // 1 = left adjusted, 2 = vertically centered
1740  Int_t cTextPaveAlign = 12; com_top_right->SetTextAlign(cTextPaveAlign);
1741  // 10*10 = 10*(ID10 = Courier New)
1742  Int_t cTextPaveFont = 100; com_top_right->SetTextFont(cTextPaveFont);
1743  // 0.95 = 95% of the pave size
1744  Float_t cTextPaveSize = 0.03; com_top_right->SetTextSize(cTextPaveSize);
1745  Int_t cTextBorderSize = 1; com_top_right->SetBorderSize(cTextBorderSize);
1746 
1747 
1748  if( fFlagSubDet == "EB" )
1749  {
1750  snprintf(f_in, fgMaxCar, " Channel: %d ", StinEcha);
1751  com_top_right->AddText(f_in);
1752  snprintf(f_in, fgMaxCar, " Crystal in SM: %d ", StexCrys);
1753  com_top_right->AddText(f_in);
1754  }
1755 
1756  if( fFlagSubDet == "EE" )
1757  {
1758  Int_t StinEchap = StinEcha+1;
1759  snprintf(f_in, fgMaxCar, " Channel: %d ", StinEchap); // EE => range = [1,25]
1760  com_top_right->AddText(f_in);
1761  Int_t IX_Dee_crys = StexCrys/fEcal->MaxCrysIYInDee() + 1;
1762  Int_t IY_Dee_crys = StexCrys%fEcal->MaxCrysIYInDee();
1763  if( IY_Dee_crys == 0 ){IX_Dee_crys--; IY_Dee_crys = fEcal->MaxCrysIYInDee();}
1764  snprintf(f_in, fgMaxCar, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
1765  com_top_right->AddText(f_in);
1766  }
1767 
1768  Int_t iSample_p = iSample+1;
1769  snprintf(f_in, fgMaxCar, " Sample: %d ", iSample_p);
1770  com_top_right->AddText(f_in);
1771 
1772  return com_top_right;
1773 }
1774 
1775 TPaveText* TEcnaParHistos::SetPaveLVRB(const Int_t& SMNumber, const Int_t& SMtower)
1776 {
1777 // LVRB at the top or at the bottom comment
1778 
1779  //....................... GRAND pave "LVRB"
1780  Double_t pav_bot_xgauche = BoxLeftX("bottom_left_box");
1781  Double_t pav_bot_xdroite = BoxRightX("bottom_right_box");
1782  Double_t pav_bot_ybas = BoxBottomY("bottom_left_box");
1783  Double_t pav_bot_yhaut = BoxTopY("bottom_left_box");
1784  TPaveText *com_bot_mid =
1785  new TPaveText(pav_bot_xgauche, pav_bot_ybas,
1786  pav_bot_xdroite, pav_bot_yhaut); fCnewRoot++;
1787 
1788  Color_t couleur_noir = ColorDefinition("noir");
1789  Color_t couleur_rouge = SetColorsForNumbers("lvrb_top");
1790  Color_t couleur_bleu_fonce = SetColorsForNumbers("lvrb_bottom");
1791 
1792  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
1793  {
1794  TText *t1 = com_bot_mid->AddText(" <= IP (#eta = 0) (#eta = +85) => ");
1795  t1->SetTextColor(couleur_noir);
1796  }
1797 
1798  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
1799  {
1800  TText *t2 = com_bot_mid->AddText(" <= (#eta = -85) IP (#eta = 0) => ");
1801  t2->SetTextColor(couleur_noir);
1802  }
1803 
1804  if(fEcalNumbering->GetTowerLvrbType(SMtower) == "top")
1805  {
1806  TText *t3 = nullptr;
1807  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
1808  {t3 = com_bot_mid->AddText(" <=== LVRB ");}
1809  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
1810  {t3 = com_bot_mid->AddText(" LVRB ===> ");}
1811  t3->SetTextColor(couleur_rouge);
1812  }
1813 
1814  if(fEcalNumbering->GetTowerLvrbType(SMtower) == "bottom")
1815  {
1816  TText *t4 = nullptr;
1817  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
1818  {t4 = com_bot_mid->AddText(" LVRB ===> ");}
1819  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
1820  {t4 = com_bot_mid->AddText(" <=== LVRB ");}
1821  t4->SetTextColor(couleur_bleu_fonce);
1822  }
1823  return com_bot_mid;
1824 
1825 }// end of SetPaveLVRB
1826 
1827 Color_t TEcnaParHistos::SetColorsForNumbers(const TString& chtype_number)
1828 {
1829  //Set color of the numbers for SuperModule- or Tower- numbering plots
1830 
1831  Color_t couleur = ColorDefinition("noir"); // default = "noir"
1832 
1833  if ( chtype_number == "crystal" ){couleur = ColorDefinition("noir");}
1834  if ( chtype_number == "lvrb_top" ){couleur = ColorDefinition("rouge");}
1835  if ( chtype_number == "lvrb_bottom" ){couleur = ColorDefinition("bleu_fonce");}
1836 
1837  return couleur;
1838 }
1839 
1840 //===========================================================================
1841 //
1842 // SetPaveDee, SetPaveSC, SetPaveSCsXY,
1843 // SetPaveEECrystal
1844 //
1845 //===========================================================================
1846 
1847 TPaveText* TEcnaParHistos::SetPaveDee(const TString& chopt, const Int_t& DeeNumber,
1848  const TString& DeeType)
1849 {
1850 // Dee pav. Called only once.
1851 
1852  char f_in[fgMaxCar];
1853 
1854  //.................................. DEFAULT OPTION: "standard"
1855  Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
1856  Double_t pav_top_left_xdroite = BoxRightX("top_left_box_EE");
1857  Double_t pav_top_left_ybas = BoxBottomY("top_left_box_EE");
1858  Double_t pav_top_left_yhaut = BoxTopY("top_left_box_EE");
1859 
1860  if(chopt == "standard" || chopt == "standGH")
1861  {
1862  pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
1863  pav_top_left_xdroite = BoxRightX("top_left_box_EE");
1864  pav_top_left_ybas = BoxBottomY("top_left_box_EE");
1865  pav_top_left_yhaut = BoxTopY("top_left_box_EE");
1866  }
1867 
1868  if( chopt == "standDee" || chopt == "standStex" )
1869  {
1870  pav_top_left_xgauche = BoxLeftX("top_left_box_Dee");
1871  pav_top_left_xdroite = BoxRightX("top_left_box_Dee");
1872  pav_top_left_ybas = BoxBottomY("top_left_box_Dee");
1873  pav_top_left_yhaut = BoxTopY("top_left_box_Dee");
1874  }
1875 
1876  if(chopt == "several")
1877  {
1878  pav_top_left_xgauche = BoxLeftX("several_plots_box");
1879  pav_top_left_xdroite = BoxRightX("several_plots_box");
1880  pav_top_left_ybas = BoxBottomY("several_plots_box");
1881  pav_top_left_yhaut = BoxTopY("several_plots_box");
1882  }
1883  if(chopt == "sevevol")
1884  {
1885  pav_top_left_xgauche = BoxLeftX("several_evol_box");
1886  pav_top_left_xdroite = BoxRightX("several_evol_box");
1887  pav_top_left_ybas = BoxBottomY("several_evol_box");
1888  pav_top_left_yhaut = BoxTopY("several_evol_box");
1889  }
1890 
1891  TPaveText *com_top_left =
1892  new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
1893  pav_top_left_xdroite, pav_top_left_yhaut); fCnewRoot++;
1894 
1895  // 1 = left adjusted, 2 = vertically centered
1896  Int_t cTextPaveAlign = 12; com_top_left->SetTextAlign(cTextPaveAlign);
1897  // 10*10 = 10*(ID10 = Courier New)
1898  Int_t cTextPaveFont = 100; com_top_left->SetTextFont(cTextPaveFont);
1899  // 0.95 = 95% of the pave size
1900  Float_t cTextPaveSize = 0.04; com_top_left->SetTextSize(cTextPaveSize);
1901  Int_t cTextBorderSize = 1; com_top_left->SetBorderSize(cTextBorderSize);
1902 
1903  if( chopt == "standard" )
1904  {
1905  snprintf(f_in, fgMaxCar, " Dee: %d", DeeNumber);
1906  com_top_left->AddText(f_in);
1907  snprintf(f_in, fgMaxCar, " (%s)", DeeType.Data());
1908  com_top_left->AddText(f_in);
1909  }
1910 
1911  if( chopt == "standDee" || chopt == "standStex" || chopt == "standGH" )
1912  {
1913  snprintf(f_in, fgMaxCar, " Dee: %d (%s) ", DeeNumber, DeeType.Data());
1914  com_top_left->AddText(f_in);
1915  }
1916 
1917  return com_top_left;
1918 }
1919 
1920 TPaveText* TEcnaParHistos::SetPaveSC(const Int_t& DeeSC_X, const Int_t& DeeNumber)
1921 {
1922 // SC comment
1923 
1924  char f_in[fgMaxCar];
1925  //...................... Pave SC/crystal(channel)/sample (top_right_box)
1926  Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
1927  Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
1928  Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EE");
1929  Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EE");
1930  TPaveText *com_top_mid =
1931  new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
1932  pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
1933 
1934  // 1 = left adjusted, 2 = vertically centered
1935  Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
1936  // 10*10 = 10*(ID10 = Courier New)
1937  Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
1938  // 0.95 = 95% of the pave size
1939  Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
1940  Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
1941 
1942  snprintf(f_in, fgMaxCar, "Sector: S%d, SC: %d",
1943  fEcalNumbering->GetDSFrom1DeeSCEcna(DeeNumber, DeeSC_X),
1944  fEcalNumbering->GetDSSCFrom1DeeSCEcna(DeeNumber, DeeSC_X));
1945  com_top_mid->AddText(f_in);
1946  snprintf(f_in, fgMaxCar, "SC for const.: %d",
1947  fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(DeeNumber,DeeSC_X));
1948  com_top_mid->AddText(f_in);
1949  snprintf(f_in, fgMaxCar, "Quadrant: %s",
1950  fEcalNumbering->GetSCQuadFrom1DeeSCEcna(DeeSC_X).Data());
1951  com_top_mid->AddText(f_in);
1952 
1953  return com_top_mid;
1954 }
1955 
1956 TPaveText* TEcnaParHistos::SetPaveSCsXY(const Int_t& DeeSC_X, const Int_t& DeeSC_Y)
1957 {
1958 // SCs X and Y for (SCEcha,SCEcha) cov or cor matrix
1959 
1960  char f_in[fgMaxCar];
1961  //...................... Pave SC/SCEcha(channel)/sample (top_right_box)
1962  Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
1963  Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
1964  Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EE");
1965  Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EE");
1966  TPaveText *com_top_mid =
1967  new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
1968  pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
1969 
1970  // 1 = left adjusted, 2 = vertically centered
1971  Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
1972  // 10*10 = 10*(ID10 = Courier New)
1973  Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
1974  // 0.95 = 95% of the pave size
1975  Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
1976  Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
1977 
1978  snprintf(f_in, fgMaxCar, "SC X: %d", DeeSC_X);
1979  com_top_mid->AddText(f_in);
1980  snprintf(f_in, fgMaxCar, "SC Y: %d", DeeSC_Y);
1981  com_top_mid->AddText(f_in);
1982 
1983  return com_top_mid;
1984 }
1985 
1986 TPaveText* TEcnaParHistos::SetPaveCxyz(const Int_t& DeeNumber)
1987 {
1988 // Cxyz at the top or at the bottom comment
1989 
1990  //....................... GRAND pave "Cxyz"
1991  Double_t pav_bot_xgauche = BoxRightX("bottom_mid_box");
1992  Double_t pav_bot_xdroite = BoxLeftX("bottom_mid_box");
1993  Double_t pav_bot_ybas = BoxBottomY("bottom_left_box");
1994  Double_t pav_bot_yhaut = BoxTopY("bottom_left_box");
1995  TPaveText *com_bot_mid =
1996  new TPaveText(pav_bot_xgauche, pav_bot_ybas,
1997  pav_bot_xdroite, pav_bot_yhaut); fCnewRoot++;
1998 
1999  //com_bot_mid->SetOption("arc");
2000  //com_bot_mid->SetCornerRadius((Double_t)0.5);
2001  //Int_t cTextPaveFont = 100; com_bot_mid->SetTextFont(cTextPaveFont);
2002 
2003  com_bot_mid->SetTextSize(0.0325);
2004  //........................................... (SetPaveCxyz)
2005  if( DeeNumber == 1 )
2006  {
2007  com_bot_mid->AddText(" y ");
2008  com_bot_mid->AddText(" #uparrow ");
2009  com_bot_mid->AddText(" (Near) x #leftarrow #otimes z (Far) " );
2010  }
2011  if( DeeNumber == 2 )
2012  {
2013  com_bot_mid->AddText(" y ");
2014  com_bot_mid->AddText(" #uparrow ");
2015  com_bot_mid->AddText(" (Near) x #leftarrow #otimes z (Far) " );
2016  }
2017  if( DeeNumber == 3 )
2018  {
2019  com_bot_mid->AddText(" y ");
2020  com_bot_mid->AddText(" #uparrow ");
2021  com_bot_mid->AddText(" (Far) z (#bullet) #rightarrow x (Near) " );
2022  }
2023  if( DeeNumber == 4 )
2024  {
2025  com_bot_mid->AddText(" y ");
2026  com_bot_mid->AddText(" #uparrow ");
2027  com_bot_mid->AddText(" (Far) z (#bullet) #rightarrow x (Near) " );
2028  }
2029 
2030  // com_bot_mid->AddText(" (from IP) " );
2031  return com_bot_mid;
2032 }
2033 //===========================================================================
2034 //
2035 // SetPaveStex, SetPaveStin
2036 //
2037 //===========================================================================
2038 
2039 TPaveText* TEcnaParHistos::SetPaveStex(const TString& chopt, const Int_t& StexNumber)
2040 {
2041  TPaveText* pav_text = nullptr;
2042 
2043  if( StexNumber > 0 )
2044  {
2045  if ( fFlagSubDet == "EB" )
2046  {
2047  TString EB_type = fEcalNumbering->GetSMHalfBarrel(StexNumber);
2048  pav_text = SetPaveSM(chopt, StexNumber, EB_type);
2049  }
2050  if ( fFlagSubDet == "EE" )
2051  {
2052  TString dee_type = fEcalNumbering->GetEEDeeType(StexNumber);
2053  pav_text = SetPaveDee(chopt, StexNumber, dee_type);
2054  }
2055  }
2056  if( StexNumber == 0 ){pav_text = SetPaveStas();}
2057 
2058  return pav_text;
2059 }
2060 
2061 TPaveText* TEcnaParHistos::SetPaveStin(const Int_t& StinNumber, const Int_t& StexNumber)
2062 {
2063  TPaveText* pav_text = nullptr;
2064  if ( fFlagSubDet == "EB"){pav_text = SetPaveTower(StinNumber);}
2065  if ( fFlagSubDet == "EE"){pav_text = SetPaveSC(StinNumber, StexNumber);}
2066  return pav_text;
2067 }
2068 
2069 TPaveText* TEcnaParHistos::SetPaveStinsXY(const Int_t& StexStin_X, const Int_t& StexStin_Y)
2070 {
2071  TPaveText* pav_text = nullptr;
2072  if ( fFlagSubDet == "EB"){pav_text = SetPaveTowersXY(StexStin_X, StexStin_Y);}
2073  if ( fFlagSubDet == "EE"){pav_text = SetPaveSCsXY(StexStin_X, StexStin_Y);}
2074  return pav_text;
2075 }
2076 
2077 //===========================================================================
2078 //
2079 // GetHistoType, GetQuantityName
2080 //
2081 //===========================================================================
2082 TString TEcnaParHistos::GetHistoType(const TString& HistoCode)
2083 {
2084 // Type of the quantity as a function of the quantity code
2085 // Histo type <=> Variable in X coordinate
2086 
2087  TString HistoType;
2088  Int_t MaxCar = fgMaxCar;
2089  HistoType.Resize(MaxCar);
2090  HistoType = "(no quantity type info)";
2091 
2092  //.(1a)............................ Global
2093  if ( HistoCode == "D_NOE_ChNb" || HistoCode == "D_Ped_ChNb" ||
2094  HistoCode == "D_TNo_ChNb" || HistoCode == "D_LFN_ChNb" || HistoCode == "D_HFN_ChNb" ||
2095  HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" )
2096  {HistoType = "Global";} // X coordinate = Xtals for SM or Dee
2097  // Tower for EB
2098  // SC for EE
2099  //.(1b)............................ Proj
2100  if ( HistoCode == "D_NOE_ChDs" || HistoCode == "D_Ped_ChDs" ||
2101  HistoCode == "D_TNo_ChDs" || HistoCode == "D_LFN_ChDs" || HistoCode == "D_HFN_ChDs" ||
2102  HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" )
2103  {HistoType = "Proj";} // X coordinate = bin number
2104 
2105  //.(2)............................ H1Basic
2106  if ( HistoCode == "D_MSp_SpNb" || HistoCode == "D_SSp_SpNb" )
2107  {HistoType = "H1Basic";} // X coordinate = sample number
2108 
2109  //.(2)............................ H1BasicProj
2110  if ( HistoCode == "D_MSp_SpDs" || HistoCode == "D_SSp_SpDs" )
2111  {HistoType = "H1BasicProj";} // X coordinate = total noise
2112 
2113  //.(3a)............................ SampGlobal
2114  if ( HistoCode == "D_Adc_EvNb" ){HistoType = "SampGlobal";} // X coordinate = event number
2115  //.(3b)............................ SampProj
2116  if ( HistoCode == "D_Adc_EvDs" ){HistoType = "SampProj";} // X coordinate = bin number
2117 
2118  //.(4a)............................ Evol
2119  if ( HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" || HistoCode == "H_MCs_Date" ||
2120  HistoCode == "H_LFN_Date" || HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" )
2121  {HistoType = "Evol";} // X coordinate = date
2122 
2123  //.(4b)............................ EvolProj
2124  if ( HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" || HistoCode == "H_MCs_RuDs" ||
2125  HistoCode == "H_LFN_RuDs" || HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs" )
2126  {HistoType = "EvolProj";} // X coordinate = bin number
2127 
2128  return HistoType;
2129 }// end of GetHistoType(...)
2130 
2131 TString TEcnaParHistos::GetXVarHisto(const TString& HistoCode, const TString& SubDet, const Int_t& StexNumber)
2132 {
2133 // Type of the quantity as a function of the quantity code
2134 // Histo type <=> Variable in X coordinate
2135 
2136  TString HistoType = GetHistoType(HistoCode.Data());
2137 
2138  TString XVarHisto;
2139  Int_t MaxCar = fgMaxCar;
2140  XVarHisto.Resize(MaxCar);
2141  XVarHisto = "(no X variable info)";
2142 
2143  if( HistoType == "Global" )
2144  {
2145  if( StexNumber == 0 && SubDet == "EB" ){XVarHisto = "Tower number";}
2146  if( StexNumber == 0 && SubDet == "EE" ){XVarHisto = "SC number";}
2147  if( StexNumber != 0){XVarHisto = "Xtal number";}
2148  }
2149  if( HistoType == "Proj" ){XVarHisto = "Bin number";}
2150 
2151  if( HistoType == "H1Basic"){XVarHisto = "Sample number";}
2152  if( HistoType == "H1BasicProj"){XVarHisto = "Total noise";}
2153 
2154  if( HistoType == "SampGlobal" ){XVarHisto = "Event number";}
2155 
2156  if( HistoType == "SampProj" ){XVarHisto = "ADC count";}
2157 
2158  if( HistoType == "Evol" ){XVarHisto = "Date";}
2159 
2160  if( HistoType == "EvolProj" ){XVarHisto = "Bin number";}
2161 
2162  return XVarHisto;
2163 
2164 }// end of GetXVarHisto(...)
2165 
2166 TString TEcnaParHistos::GetYVarHisto(const TString& HistoCode, const TString& SubDet, const Int_t& StexNumber)
2167 {
2168 // Type of the quantity as a function of the quantity code
2169 // Histo type <=> Variable in Y coordinate
2170 
2171  TString HistoType = GetHistoType(HistoCode.Data());
2172 
2173  TString YVarHisto;
2174  Int_t MaxCar = fgMaxCar;
2175  YVarHisto.Resize(MaxCar);
2176  YVarHisto = "(no Y variable info)";
2177 
2178  if( HistoType == "Global" )
2179  {
2180  if( HistoCode == "D_NOE_ChNb" ){YVarHisto = "Nb of events";}
2181  if( HistoCode == "D_Ped_ChNb" ){YVarHisto = "Pedestal";}
2182  if( HistoCode == "D_TNo_ChNb" ){YVarHisto = "Total Noise";}
2183  if( HistoCode == "D_MCs_ChNb" ){YVarHisto = "Mean Cor(s,s')";}
2184  if( HistoCode == "D_LFN_ChNb" ){YVarHisto = "Low Freq. Noise";}
2185  if( HistoCode == "D_HFN_ChNb" ){YVarHisto = "High Freq. Noise";}
2186  if( HistoCode == "D_SCs_ChNb" ){YVarHisto = "Sigma Cor(s,s')";}
2187  }
2188 
2189  if( HistoType == "Proj" )
2190  {
2191  if( StexNumber == 0 && SubDet == "EB" ){YVarHisto = "Number of towers";}
2192  if( StexNumber == 0 && SubDet == "EE" ){YVarHisto = "Number of SCs";}
2193  if( StexNumber != 0){YVarHisto = "Number of Xtals";}
2194  }
2195 
2196  if( HistoType == "H1Basic"){YVarHisto = "ADC count";}
2197  if( HistoType == "H1BasicProj"){YVarHisto = "Number of samples";}
2198 
2199  if( HistoType == "SampGlobal" ){YVarHisto = "ADC count";}
2200 
2201  if( HistoType == "SampProj" ){YVarHisto = "Number of events";}
2202 
2203  if( HistoType == "EvolProj" ){YVarHisto = "Number of runs";}
2204 
2205  if( HistoType == "Evol" )
2206  {
2207  if( HistoCode == "H_Ped_Date" ){YVarHisto = "Pedestal";}
2208  if( HistoCode == "H_TNo_Date" ){YVarHisto = "Total Noise";}
2209  if( HistoCode == "H_MCs_Date" ){YVarHisto = "Mean Cor(s,s')";}
2210  if( HistoCode == "H_LFN_Date" ){YVarHisto = "Low Freq. Noise";}
2211  if( HistoCode == "H_HFN_Date" ){YVarHisto = "High Freq. Noise";}
2212  if( HistoCode == "H_SCs_Date" ){YVarHisto = "Sigma Cor(s,s')";}
2213  }
2214 
2215 // std::cout << std::endl << "*TEcnaParHistos::GetYVarHisto(...)> HistoType = " << HistoType
2216 // << ", HistoCode = " << HistoCode
2217 // << ", StexNumber = " << StexNumber
2218 // << ", YVarHisto = " << YVarHisto << std::endl;
2219 
2220  return YVarHisto;
2221 
2222 }// end of GetYVarHisto(...)
2223 
2224 TString TEcnaParHistos::GetQuantityName(const TString& chqcode)
2225 {
2226 // Name of the quantity as a function of the histo code
2227 
2228  TString chqname;
2229  Int_t MaxCar = fgMaxCar;
2230  chqname.Resize(MaxCar);
2231  chqname = "(no quantity name info)";
2232 
2233  if(chqcode == "D_NOE_ChNb"){chqname = "Number of events";}
2234  if(chqcode == "D_NOE_ChDs"){chqname = "Nb of events";}
2235  if(chqcode == "D_Ped_ChNb"){chqname = "Pedestal";}
2236  if(chqcode == "D_Ped_ChDs"){chqname = "Pedestal";}
2237  if(chqcode == "D_TNo_ChNb"){chqname = "Total Noise";}
2238  if(chqcode == "D_TNo_ChDs"){chqname = "Total Noise";}
2239  if(chqcode == "D_MCs_ChNb"){chqname = "Mean Cor(s,s')";}
2240  if(chqcode == "D_MCs_ChDs"){chqname = "Mean Cor(s,s')";}
2241  if(chqcode == "D_LFN_ChNb"){chqname = "Low Freq. Noise";}
2242  if(chqcode == "D_LFN_ChDs"){chqname = "Low Freq. Noise";}
2243  if(chqcode == "D_HFN_ChNb"){chqname = "High Freq. Noise";}
2244  if(chqcode == "D_HFN_ChDs"){chqname = "High Freq. Noise";}
2245  if(chqcode == "D_SCs_ChNb"){chqname = "Sigma Cor(s,s')";}
2246  if(chqcode == "D_SCs_ChDs"){chqname = "Sigma Cor(s,s')";}
2247  if(chqcode == "D_MSp_SpNb"){chqname = "Sample means";}
2248  if(chqcode == "D_MSp_SpDs"){chqname = "Sample means";}
2249  if(chqcode == "D_SSp_SpNb"){chqname = "Sample sigmas";}
2250  if(chqcode == "D_SSp_SpDs"){chqname = "Sample sigmas";}
2251  if(chqcode == "D_Adc_EvNb"){chqname = "Sample ADC";}
2252  if(chqcode == "D_Adc_EvDs"){chqname = "Sample ADC distribution";}
2253  if(chqcode == "H_Ped_Date"){chqname = "Pedestal";}
2254  if(chqcode == "H_TNo_Date"){chqname = "Total Noise";}
2255  if(chqcode == "H_MCs_Date"){chqname = "Mean Cor(s,s')";}
2256  if(chqcode == "H_LFN_Date"){chqname = "Low Freq. Noise";}
2257  if(chqcode == "H_HFN_Date"){chqname = "High Freq. Noise";}
2258  if(chqcode == "H_SCs_Date"){chqname = "Sigma Cor(s,s')";}
2259  if(chqcode == "H_Ped_RuDs"){chqname = "Pedestal";}
2260  if(chqcode == "H_TNo_RuDs"){chqname = "Total Noise";}
2261  if(chqcode == "H_MCs_RuDs"){chqname = "Mean Cor(s,s')";}
2262  if(chqcode == "H_LFN_RuDs"){chqname = "Low Freq. Noise";}
2263  if(chqcode == "H_HFN_RuDs"){chqname = "High Freq. Noise";}
2264  if(chqcode == "H_SCs_RuDs"){chqname = "Sigma Cor(s,s')";}
2265  return chqname;
2266 }
2267 
2268 Double_t TEcnaParHistos::GetYminDefaultValue(const TString& chqcode)
2269 {
2270  Double_t vmin = (Double_t)0.;
2271 
2272  if(chqcode == "H2LFccMosMatrix"){vmin = (Double_t)-1.;}
2273  if(chqcode == "H2HFccMosMatrix"){vmin = (Double_t)-1.;}
2274  if(chqcode == "H2CorccInStins" ){vmin = (Double_t)-1.;}
2275 
2276  if(chqcode == "D_NOE_ChNb"){vmin = (Double_t)0.;}
2277  if(chqcode == "D_Ped_ChNb"){vmin = (Double_t)0.;}
2278  if(chqcode == "D_TNo_ChNb"){vmin = (Double_t)0.;}
2279  if(chqcode == "D_MCs_ChNb"){vmin = (Double_t)-1.;}
2280  if(chqcode == "D_LFN_ChNb"){vmin = (Double_t)0.;}
2281  if(chqcode == "D_HFN_ChNb"){vmin = (Double_t)0.;}
2282  if(chqcode == "D_SCs_ChNb"){vmin = (Double_t)-1.;}
2283 
2284  if(chqcode == "D_NOE_ChDs"){vmin = (Double_t)0.1;}
2285  if(chqcode == "D_Ped_ChDs"){vmin = (Double_t)0.1;}
2286  if(chqcode == "D_TNo_ChDs"){vmin = (Double_t)0.1;}
2287  if(chqcode == "D_MCs_ChDs"){vmin = (Double_t)0.1;}
2288  if(chqcode == "D_LFN_ChDs"){vmin = (Double_t)0.1;}
2289  if(chqcode == "D_HFN_ChDs"){vmin = (Double_t)0.1;}
2290  if(chqcode == "D_SCs_ChDs"){vmin = (Double_t)0.1;}
2291 
2292  if(chqcode == "D_MSp_SpNb"){vmin = (Double_t)0.;}
2293  if(chqcode == "D_MSp_SpDs"){vmin = (Double_t)0.1;}
2294  if(chqcode == "D_SSp_SpNb"){vmin = (Double_t)0.;}
2295  if(chqcode == "D_SSp_SpDs"){vmin = (Double_t)0.1;}
2296 
2297  if(chqcode == "D_Adc_EvNb"){vmin = (Double_t)0.;}
2298  if(chqcode == "D_Adc_EvDs"){vmin = (Double_t)0.1;}
2299 
2300  if(chqcode == "H_Ped_Date"){vmin = (Double_t)0.;}
2301  if(chqcode == "H_TNo_Date"){vmin = (Double_t)0.;}
2302  if(chqcode == "H_MCs_Date"){vmin = (Double_t)-1.;}
2303  if(chqcode == "H_LFN_Date"){vmin = (Double_t)0.;}
2304  if(chqcode == "H_HFN_Date"){vmin = (Double_t)0.;}
2305  if(chqcode == "H_SCs_Date"){vmin = (Double_t)0.;}
2306 
2307  if(chqcode == "H_Ped_RuDs"){vmin = (Double_t)0.1;}
2308  if(chqcode == "H_TNo_RuDs"){vmin = (Double_t)0.1;}
2309  if(chqcode == "H_MCs_RuDs"){vmin = (Double_t)0.1;}
2310  if(chqcode == "H_LFN_RuDs"){vmin = (Double_t)0.1;}
2311  if(chqcode == "H_HFN_RuDs"){vmin = (Double_t)0.1;}
2312  if(chqcode == "H_SCs_RuDs"){vmin = (Double_t)0.1;}
2313 
2314  return vmin;
2315 }
2316 
2317 Double_t TEcnaParHistos::GetYmaxDefaultValue(const TString& chqcode)
2318 {
2319  Double_t vmax = (Double_t)0.;
2320 
2321  if( fFlagSubDet == "EB" )
2322  {
2323  if(chqcode == "H2LFccMosMatrix" ){vmax = (Double_t)1.;}
2324  if(chqcode == "H2HFccMosMatrix" ){vmax = (Double_t)1.;}
2325  if(chqcode == "H2CorccInStins" ){vmax = (Double_t)1.;}
2326 
2327  if(chqcode == "D_NOE_ChNb"){vmax = (Double_t)500.;}
2328  if(chqcode == "D_Ped_ChNb"){vmax = (Double_t)500.;}
2329  if(chqcode == "D_TNo_ChNb"){vmax = (Double_t)2.5;}
2330  if(chqcode == "D_LFN_ChNb"){vmax = (Double_t)2.5;}
2331  if(chqcode == "D_HFN_ChNb"){vmax = (Double_t)2.5;}
2332  if(chqcode == "D_MCs_ChNb"){vmax = (Double_t)1.;}
2333  if(chqcode == "D_SCs_ChNb"){vmax = (Double_t)1.5;}
2334 
2335  if(chqcode == "D_NOE_ChDs"){vmax = (Double_t)5000.;}
2336  if(chqcode == "D_Ped_ChDs"){vmax = (Double_t)5000.;}
2337  if(chqcode == "D_TNo_ChDs"){vmax = (Double_t)5000.;}
2338  if(chqcode == "D_LFN_ChDs"){vmax = (Double_t)5000.;}
2339  if(chqcode == "D_HFN_ChDs"){vmax = (Double_t)5000.;}
2340  if(chqcode == "D_MCs_ChDs"){vmax = (Double_t)5000.;}
2341  if(chqcode == "D_SCs_ChDs"){vmax = (Double_t)5000.;}
2342 
2343  if(chqcode == "D_MSp_SpNb"){vmax = (Double_t)500.;}
2344  if(chqcode == "D_MSp_SpDs"){vmax = (Double_t)10.;}
2345  if(chqcode == "D_SSp_SpNb"){vmax = (Double_t)5.;}
2346  if(chqcode == "D_SSp_SpDs"){vmax = (Double_t)10.;}
2347 
2348  if(chqcode == "D_Adc_EvNb"){vmax = (Double_t)500.;}
2349  if(chqcode == "D_Adc_EvDs"){vmax = (Double_t)150.;}
2350 
2351  if(chqcode == "H_Ped_Date"){vmax = (Double_t)500.;}
2352  if(chqcode == "H_TNo_Date"){vmax = (Double_t)5.;}
2353  if(chqcode == "H_LFN_Date"){vmax = (Double_t)5.;}
2354  if(chqcode == "H_HFN_Date"){vmax = (Double_t)5.;}
2355  if(chqcode == "H_MCs_Date"){vmax = (Double_t)1.;}
2356  if(chqcode == "H_SCs_Date"){vmax = (Double_t)0.5;}
2357 
2358  if(chqcode == "H_Ped_RuDs"){vmax = (Double_t)1000.;}
2359  if(chqcode == "H_TNo_RuDs"){vmax = (Double_t)1000.;}
2360  if(chqcode == "H_LFN_RuDs"){vmax = (Double_t)1000.;}
2361  if(chqcode == "H_HFN_RuDs"){vmax = (Double_t)1000.;}
2362  if(chqcode == "H_MCs_RuDs"){vmax = (Double_t)1000.;}
2363  if(chqcode == "H_SCs_RuDs"){vmax = (Double_t)1000.;}
2364  }
2365 
2366  if( fFlagSubDet == "EE" )
2367  {
2368  if(chqcode == "H2LFccMosMatrix"){vmax = (Double_t)1.;}
2369  if(chqcode == "H2HFccMosMatrix"){vmax = (Double_t)1.;}
2370  if(chqcode == "H2CorccInStins" ){vmax = (Double_t)0.05;}
2371 
2372  if(chqcode == "D_NOE_ChNb"){vmax = (Double_t)500.;}
2373  if(chqcode == "D_Ped_ChNb"){vmax = (Double_t)500.;}
2374  if(chqcode == "D_TNo_ChNb"){vmax = (Double_t)5.;}
2375  if(chqcode == "D_LFN_ChNb"){vmax = (Double_t)5.;}
2376  if(chqcode == "D_HFN_ChNb"){vmax = (Double_t)5.;}
2377  if(chqcode == "D_MCs_ChNb"){vmax = (Double_t)1.;}
2378  if(chqcode == "D_SCs_ChNb"){vmax = (Double_t)2.5;}
2379 
2380  if(chqcode == "D_NOE_ChDs"){vmax = (Double_t)1000.;}
2381  if(chqcode == "D_Ped_ChDs"){vmax = (Double_t)1000.;}
2382  if(chqcode == "D_TNo_ChDs"){vmax = (Double_t)1000.;}
2383  if(chqcode == "D_LFN_ChDs"){vmax = (Double_t)1000.;}
2384  if(chqcode == "D_HFN_ChDs"){vmax = (Double_t)1000.;}
2385  if(chqcode == "D_MCs_ChDs"){vmax = (Double_t)1000.;}
2386  if(chqcode == "D_SCs_ChDs"){vmax = (Double_t)1000.;}
2387 
2388  if(chqcode == "D_MSp_SpNb"){vmax = (Double_t)500.;}
2389  if(chqcode == "D_MSp_SpDs"){vmax = (Double_t)1000.;}
2390  if(chqcode == "D_SSp_SpNb"){vmax = (Double_t)5.;}
2391  if(chqcode == "D_SSp_SpDs"){vmax = (Double_t)100.;}
2392 
2393  if(chqcode == "D_Adc_EvNb"){vmax = (Double_t)500.;}
2394  if(chqcode == "D_Adc_EvDs"){vmax = (Double_t)1000.;}
2395 
2396  if(chqcode == "H_Ped_Date"){vmax = (Double_t)500.;}
2397  if(chqcode == "H_TNo_Date"){vmax = (Double_t)5.;}
2398  if(chqcode == "H_LFN_Date"){vmax = (Double_t)5.;}
2399  if(chqcode == "H_HFN_Date"){vmax = (Double_t)5.;}
2400  if(chqcode == "H_MCs_Date"){vmax = (Double_t)1.;}
2401  if(chqcode == "H_SCs_Date"){vmax = (Double_t)0.5;}
2402 
2403  if(chqcode == "H_Ped_RuDs"){vmax = (Double_t)1000.;}
2404  if(chqcode == "H_TNo_RuDs"){vmax = (Double_t)1000.;}
2405  if(chqcode == "H_LFN_RuDs"){vmax = (Double_t)1000.;}
2406  if(chqcode == "H_HFN_RuDs"){vmax = (Double_t)1000.;}
2407  if(chqcode == "H_MCs_RuDs"){vmax = (Double_t)1000.;}
2408  if(chqcode == "H_SCs_RuDs"){vmax = (Double_t)1000.;}
2409  }
2410  return vmax;
2411 }
2412 
2413 //---------------------------------------------------------------------------------------
2414 //
2415 // BuildStandardDetectorCode, BuildStandardPlotOption,
2416 // BuildStandard1DHistoCodeX, BuildStandard1DHistoCodeY,
2417 // BuildStandardCovOrCorCode, BuildStandardBetweenWhatCode,
2418 //
2419 //---------------------------------------------------------------------------------------
2420 //----------------------- BuildStandardDetectorCode
2421 TString TEcnaParHistos::BuildStandardDetectorCode(const TString& UserDetector)
2422 {
2423  TString StandardDetectorCode = "?";
2424 
2425  if( UserDetector == "Super-module" || UserDetector == "SuperModule" ||
2426  UserDetector == "super-module" || UserDetector == "SM" ||
2427  UserDetector == " " || UserDetector == "" ) // (default)
2428  {StandardDetectorCode = "SM";}
2429 
2430  if( UserDetector == "DEE" || UserDetector == "Dee" )
2431  {StandardDetectorCode = "Dee";}
2432 
2433  if( UserDetector == "Ecal barrel" || UserDetector == "EcalBarrel" ||
2434  UserDetector == "ecal barrel" || UserDetector == "Barrel" || UserDetector == "barrel" ||
2435  UserDetector == "EB" )
2436  {StandardDetectorCode = "EB";}
2437 
2438  if( UserDetector == "Ecal endcap" || UserDetector == "EcalEndcap" ||
2439  UserDetector == "ecal endcap" || UserDetector == "Endcap" || UserDetector == "endcap" ||
2440  UserDetector == "EE" )
2441  {StandardDetectorCode = "EE";}
2442 
2443  if( StandardDetectorCode == "?" )
2444  {
2445  std::cout << "*TEcnaParHistos::BuildStandardDetectorCode(...)> UserDetector = " << UserDetector
2446  << " : code not found."
2447  << fTTBELL << std::endl;
2448 
2449  ListOfStandardCodes("DetectorCode");
2450  }
2451  return StandardDetectorCode;
2452 }
2453 
2454 //----------------------- BuildStandardPlotOption
2455 TString TEcnaParHistos::BuildStandardPlotOption(const TString& CallingMethod, const TString& UserPlotOption)
2456 {
2457  TString StandardPlotOption = "?";
2458 
2459  if( CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time" )
2460  {
2461  if( UserPlotOption == "ONLY ONE" || UserPlotOption == "only one" || UserPlotOption == "onlyone" ||
2462  UserPlotOption == "Only one" || UserPlotOption == "OnlyOne" ||
2463  UserPlotOption == "ONLYONE" || UserPlotOption == fOnlyOnePlot ||
2464  UserPlotOption == " " || UserPlotOption == "" ) // (default)
2465  {StandardPlotOption = fOnlyOnePlot;}
2466 
2467  if( UserPlotOption == "SAME" || UserPlotOption == "Same" || UserPlotOption == fSeveralPlot )
2468  {StandardPlotOption = fSeveralPlot;}
2469 
2470  if( UserPlotOption == "SAME n" || UserPlotOption == "Same n" || UserPlotOption == fSameOnePlot )
2471  {StandardPlotOption = fSameOnePlot;}
2472 
2473  if( UserPlotOption == fAllXtalsInStinPlot ) // called with 1D after call with 1DX (special case "SAME in Stin")
2474  {StandardPlotOption = fAllXtalsInStinPlot;}
2475  }
2476 
2477  if( CallingMethod == "1DX" )
2478  {
2479  if( UserPlotOption == "ALL XTALS IN TOWER" || UserPlotOption == "ALL CHANNELS IN TOWER" ||
2480  UserPlotOption == "AllXtalsInTower" || UserPlotOption == "AllChannelsInTower" ||
2481  UserPlotOption == "ALL XTALS IN TOW" || UserPlotOption == "ALL CHANNELS IN TOW" ||
2482  UserPlotOption == "AllXtalsInTow" || UserPlotOption == "AllChannelsInTow" ||
2483  UserPlotOption == "ALL XTALS IN SC" || UserPlotOption == "ALL CHANNELS IN SC" ||
2484  UserPlotOption == "AllXtalsInSC" || UserPlotOption == "AllChannelsInSC" ||
2485  UserPlotOption == "SAME IN TOWER" || UserPlotOption == "SameInTower" ||
2486  UserPlotOption == "SAME IN TOW" || UserPlotOption == "SameInTow" ||
2487  UserPlotOption == "SAME IN SC" || UserPlotOption == "SameInSC" ||
2488  UserPlotOption == "Same in tower" || UserPlotOption == "Same in tow" ||
2489  UserPlotOption == "Same in SC" || UserPlotOption == "SameInSC" ||
2490  UserPlotOption == fAllXtalsInStinPlot ||
2491  UserPlotOption == " " || UserPlotOption == "" ) // (default)
2492  {StandardPlotOption = fAllXtalsInStinPlot;}
2493  }
2494 
2495  if( CallingMethod == "2D" )
2496  {
2497  if( UserPlotOption == "COLZ" ||
2498  UserPlotOption == " " || UserPlotOption == "" ) // (default)
2499  {StandardPlotOption = "COLZ";}
2500  if( UserPlotOption == "BOX" ){StandardPlotOption = "BOX";}
2501  if( UserPlotOption == "TEXT" ){StandardPlotOption = "TEXT";}
2502  if( UserPlotOption == "CONTZ" ){StandardPlotOption = "CONTZ";}
2503  if( UserPlotOption == "LEGO2Z" ){StandardPlotOption = "LEGO2Z";}
2504  if( UserPlotOption == "SURF1Z" ){StandardPlotOption = "SURF1Z";}
2505  if( UserPlotOption == "SURF2Z" ){StandardPlotOption = "SURF2Z";}
2506  if( UserPlotOption == "SURF3Z" ){StandardPlotOption = "SURF3Z";}
2507  if( UserPlotOption == "SURF4" ){StandardPlotOption = "SURF4";}
2508  if( UserPlotOption == "ASCII" ){StandardPlotOption = "ASCII";}
2509  }
2510 
2511  //...................................................
2512  if( StandardPlotOption == "?" )
2513  {
2514  std::cout << "*TEcnaParHistos::BuildStandardPlotOption(...)> UserPlotOption = " << UserPlotOption
2515  << " : code not found."
2516  << fTTBELL << std::endl;
2517 
2518  ListOfStandardCodes("PlotOption");
2519  }
2520  return StandardPlotOption;
2521 }
2522 
2523 
2524 //----------------------- BuildStandard1DHistoCodeX
2525 TString TEcnaParHistos::BuildStandard1DHistoCodeX(const TString& CallingMethod, const TString& UserHistoCode)
2526 {
2527  //........................... user code -> standard code
2528  TString StandardHistoCode = "?";
2529  if( CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time" )
2530  {
2531  //======================================== Only X Quantity for 1D Histos
2532  if( UserHistoCode == "Tower" || UserHistoCode == "tower" || UserHistoCode == "tow" ||
2533  UserHistoCode == "Tower number" || UserHistoCode == "tower number" || UserHistoCode == "tow nb" ||
2534  UserHistoCode == "Tower#" || UserHistoCode == "tower#" || UserHistoCode == "tow#" ||
2535  UserHistoCode == "Tow#" || UserHistoCode == "Tow" )
2536  {StandardHistoCode = "Tow";}
2537 
2538  if( UserHistoCode == "Super crystal" || UserHistoCode == "SuperCrystal" || UserHistoCode == "SuperXtal" ||
2539  UserHistoCode == "Super crystal number" || UserHistoCode == "SuperCrystalNumber" ||
2540  UserHistoCode == "SuperXtalNumber" ||
2541  UserHistoCode == "Super crystal nb" || UserHistoCode == "SuperCrystal#" ||
2542  UserHistoCode == "SuperXtal#" ||
2543  UserHistoCode == "SC#" || UserHistoCode == "SC" )
2544  {StandardHistoCode = "SC";}
2545 
2546  if( UserHistoCode == "Crystal" || UserHistoCode == "crystal" || UserHistoCode == "Xtal" ||
2547  UserHistoCode == "Crystal number" || UserHistoCode == "crystal number" ||
2548  UserHistoCode == "Xtal number" ||
2549  UserHistoCode == "Crystal#" || UserHistoCode == "crystal#" || UserHistoCode == "Xtal#" ||
2550  UserHistoCode == "Xtal" )
2551  {StandardHistoCode = "Xtal";}
2552 
2553  if( StandardHistoCode == "Tow" || StandardHistoCode == "SC" || StandardHistoCode == "Xtal" )
2554  {StandardHistoCode = "XtalORStin";} // management by means of fFapStexNumber ( >0 => Xtal ; =0 => Tow .OR. SC )
2555 
2556  if( UserHistoCode == "Sample number" || UserHistoCode == "SampleNumber" ||
2557  UserHistoCode == "Sample#" || UserHistoCode == "Samp#" ||
2558  UserHistoCode == "Sample" || UserHistoCode == "sample" ||
2559  UserHistoCode == "Smp" )
2560  {StandardHistoCode = "Smp";}
2561 
2562  if( UserHistoCode == "Event" || UserHistoCode == "event" ||
2563  UserHistoCode == "Event number" || UserHistoCode == "event number" ||
2564  UserHistoCode == "EventNumber" || UserHistoCode == "Event#" ||
2565  UserHistoCode == "EvtNumber" || UserHistoCode == "Evt#" ||
2566  UserHistoCode == "Evt number" || UserHistoCode == "evt number" ||
2567  UserHistoCode == "Evt" )
2568  {StandardHistoCode = "Evt";}
2569 
2570  //======================================== X or Y Quantity for 1D Histos
2571  if( StandardHistoCode == "?" )
2572  {
2573  StandardHistoCode = BuildStandard1DHistoCodeXY(UserHistoCode);
2574  }
2575  }
2576 
2577  //---------------------------------------------
2578  if( StandardHistoCode == "?" )
2579  {
2580  std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeX(...)> UserHistoCode = " << UserHistoCode
2581  << " : code not found."
2582  << fTTBELL << std::endl;
2583 
2584  ListOfStandardCodes("1DHistoCodeX");
2585  }
2586  return StandardHistoCode;
2587 }
2588 
2589 //----------------------- BuildStandard1DHistoCodeY
2590 TString TEcnaParHistos::BuildStandard1DHistoCodeY(const TString& CallingMethod, const TString& UserHistoCode)
2591 {
2592  //........................... user code -> standard code
2593  TString StandardHistoCode = "?";
2594 
2595  if( CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time" )
2596  {
2597  //======================================== Only Y Quantity for 1D Histos
2598  if( UserHistoCode == "Number of crystals" || UserHistoCode == "NumberOfCrystals" ||
2599  UserHistoCode == "Nb of crystals" || UserHistoCode == "NbOfCrystals" ||
2600  UserHistoCode == "Number of xtals" || UserHistoCode == "NumberOfXtals" ||
2601  UserHistoCode == "Nb of xtals" || UserHistoCode == "NbOfXtals" ||
2602  UserHistoCode == "nox" || UserHistoCode == "NOX" )
2603  {StandardHistoCode = "NOX";}
2604 
2605  if( UserHistoCode == "Number of samples" || UserHistoCode == "NumberOfSamples" ||
2606  UserHistoCode == "Nb of samples" || UserHistoCode == "NbOfSamples" ||
2607  UserHistoCode == "nos" || UserHistoCode == "NOS" )
2608  {StandardHistoCode = "NOS";}
2609 
2610  if( UserHistoCode == "Number of runs" || UserHistoCode == "NumberOfRuns" ||
2611  UserHistoCode == "Nb of runs" || UserHistoCode == "NbOfRuns" ||
2612  UserHistoCode == "nor" || UserHistoCode == "NOR" )
2613  {StandardHistoCode = "NOR";}
2614 
2615  //======================================== X or Y Quantity for 1D Histos
2616  if( StandardHistoCode == "?" )
2617  {
2618  StandardHistoCode = BuildStandard1DHistoCodeXY(UserHistoCode);
2619  }
2620  }
2621  //---------------------------------------------
2622  if( StandardHistoCode == "?" )
2623  {
2624  std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeY(...)> UserHistoCode = " << UserHistoCode
2625  << " : code not found."
2626  << fTTBELL << std::endl;
2627 
2628  ListOfStandardCodes("1DHistoCodeY");
2629  }
2630  return StandardHistoCode;
2631 }
2632 
2633 //----------------------- BuildStandard1DHistoCodeXY
2634 TString TEcnaParHistos::BuildStandard1DHistoCodeXY(const TString& UserHistoCode)
2635 {
2636  //........................... user code -> standard code
2637  TString StandardHistoCode = "?";
2638 
2639  //======================================== X or Y Quantity for 1D Histos
2640  if( UserHistoCode == "Number of events" || UserHistoCode == "Nb of evts" ||
2641  UserHistoCode == "NumberbOfEvents" || UserHistoCode == "NbOfEvts" ||
2642  UserHistoCode == "number of events" ||
2643  UserHistoCode == "noe" || UserHistoCode == "NOE" ||
2644  UserHistoCode == " " || UserHistoCode == "" ) // (default)
2645  {StandardHistoCode = "NOE";}
2646 
2647  if( UserHistoCode == "Pedestals" || UserHistoCode == "Pedestal" ||
2648  UserHistoCode == "pedestals" || UserHistoCode == "pedestal" ||
2649  UserHistoCode == "ped" || UserHistoCode == "Ped" )
2650  {StandardHistoCode = "Ped";}
2651 
2652  if( UserHistoCode == "Total noise" || UserHistoCode == "TotalNoise" ||
2653  UserHistoCode == "total noise" || UserHistoCode == "TN" ||
2654  UserHistoCode == "tn" || UserHistoCode == "TNo" )
2655  {StandardHistoCode = "TNo";}
2656 
2657  if( UserHistoCode == "Low frequency noise" || UserHistoCode == "LowFrequencyNoise" ||
2658  UserHistoCode == "LF noise" || UserHistoCode == "LFNoise" ||
2659  UserHistoCode == "low frequency noise" || UserHistoCode == "lfn" ||
2660  UserHistoCode == "LFN")
2661  {StandardHistoCode = "LFN";}
2662 
2663  if( UserHistoCode == "High frequency noise" || UserHistoCode == "HighFrequencyNoise" ||
2664  UserHistoCode == "HF noise" || UserHistoCode == "HFNoise" ||
2665  UserHistoCode == "high frequency noise" ||
2666  UserHistoCode == "hfn" || UserHistoCode == "HFN")
2667  {StandardHistoCode = "HFN";}
2668 
2669  if( UserHistoCode == "Mean correlations between samples" ||
2670  UserHistoCode == "MeanCorrelationsBetweenSamples" ||
2671  UserHistoCode == "Correlations between samples" ||
2672  UserHistoCode == "CorrelationsBetweenSamples" ||
2673  UserHistoCode == "Mean corss" || UserHistoCode == "MeanCorss" ||
2674  UserHistoCode == "Corss" || UserHistoCode == "corss" ||
2675  UserHistoCode == "Css" || UserHistoCode == "css" ||
2676  UserHistoCode == "mean correlations between samples" ||
2677  UserHistoCode == "mcs" || UserHistoCode == "MCs" )
2678  {StandardHistoCode = "MCs";}
2679 
2680  if( UserHistoCode == "Sigma of correlations between samples" ||
2681  UserHistoCode == "SigmaOfCorrelationsBetweenSamples" ||
2682  UserHistoCode == "Sigma corss" || UserHistoCode == "SigmaCorss" ||
2683  UserHistoCode == "SigCorss" || UserHistoCode == "sigcorss" ||
2684  UserHistoCode == "SCss" || UserHistoCode == "scss" ||
2685  UserHistoCode == "sigma of correlations between samples" ||
2686  UserHistoCode == "scs" || UserHistoCode == "SCs")
2687  {StandardHistoCode = "SCs";}
2688 
2689  if( UserHistoCode == "Sample mean" || UserHistoCode == "SampleMean" ||
2690  UserHistoCode == "Sample average" || UserHistoCode == "SampleAverage" ||
2691  UserHistoCode == "SampMean" || UserHistoCode == "SampAverage" ||
2692  UserHistoCode == "MSp" )
2693  {StandardHistoCode = "MSp";}
2694 
2695  if( UserHistoCode == "Sample sigma" || UserHistoCode == "SampleSigma" ||
2696  UserHistoCode == "Sigma of samples" || UserHistoCode == "SigmaOfSamples" ||
2697  UserHistoCode == "SampSigma" ||
2698  UserHistoCode == "SSp" )
2699  {StandardHistoCode = "SSp";}
2700 
2701  if( UserHistoCode == "date" || UserHistoCode == "Date" || UserHistoCode == "time" ||
2702  UserHistoCode == "Time" )
2703  {StandardHistoCode = "Time";}
2704 
2705  if( UserHistoCode == "ADC value" || UserHistoCode == "ADCValue" ||
2706  UserHistoCode == "Adc value" || UserHistoCode == "AdcValue" ||
2707  UserHistoCode == "Sample ADC" || UserHistoCode == "SampleAdc" ||
2708  UserHistoCode == "ADC" || UserHistoCode == "Adc" )
2709  {StandardHistoCode = "Adc";}
2710 
2711  //---------------------------------------------
2712  if( StandardHistoCode == "?" )
2713  {
2714  std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeXY(...)> UserHistoCode = " << UserHistoCode
2715  << " : code not found."
2716  << fTTBELL << std::endl;
2717 
2718  ListOfStandardCodes("1DHistoCodeXY");
2719  }
2720  return StandardHistoCode;
2721 }
2722 
2723 //----------------------- BuildStandardCovOrCorCode
2724 TString TEcnaParHistos::BuildStandardCovOrCorCode(const TString& CallingMethod, const TString& UserHistoCode)
2725 {
2726  //........................... user code -> standard code
2727  TString StandardHistoCode = "?";
2728  if( CallingMethod == "2D" )
2729  {
2730  //======================================== Correlation or covariance (CorOrCov)
2731  if( UserHistoCode == "Correlation" || UserHistoCode == "Correlations" ||
2732  UserHistoCode == "correlation" || UserHistoCode == "correlations" ||
2733  UserHistoCode == "Correl" || UserHistoCode == "correl" ||
2734  UserHistoCode == "cor" || UserHistoCode == "Cor" ||
2735  UserHistoCode == " " || UserHistoCode == "" ) // (default)
2736  {StandardHistoCode = "Cor";}
2737 
2738  if( UserHistoCode == "Covariance" || UserHistoCode == "Covariances" ||
2739  UserHistoCode == "covariance" || UserHistoCode == "covariances" ||
2740  UserHistoCode == "Covar" || UserHistoCode == "covar" ||
2741  UserHistoCode == "cov" || UserHistoCode == "Cov" )
2742  {StandardHistoCode = "Cov";}
2743  }
2744  //---------------------------------------------
2745  if( StandardHistoCode == "?" )
2746  {
2747  std::cout << "*TEcnaParHistos::BuildStandardCovOrCorCode(...)> UserHistoCode = " << UserHistoCode
2748  << " : code not found."
2749  << fTTBELL << std::endl;
2750 
2751  ListOfStandardCodes("CovOrCorCode");
2752  }
2753  return StandardHistoCode;
2754 }
2755 
2756 //----------------------- BuildStandardBetweenWhatCode
2757 TString TEcnaParHistos::BuildStandardBetweenWhatCode(const TString& CallingMethod, const TString& UserHistoCode)
2758 {
2759  //........................... user code -> standard code
2760  TString StandardHistoCode = "?";
2761  if( CallingMethod == "2D" )
2762  {
2763  //======================================== Quantity for correlations (BetweenWhat)
2764  if( UserHistoCode == "Samples" || UserHistoCode == "Between samples" ||
2765  UserHistoCode == "samples" || UserHistoCode == "between samples" ||
2766  UserHistoCode == "BetweenSamples" ||
2767  UserHistoCode == "Samp" || UserHistoCode == "samp" ||
2768  UserHistoCode == "ss" || UserHistoCode == "Mss" )
2769  {StandardHistoCode = "Mss";}
2770 
2771  if( UserHistoCode == "LF channels" || UserHistoCode == "LF between channels" ||
2772  UserHistoCode == "LFChannels" || UserHistoCode == "LFBetweenChannels" ||
2773  UserHistoCode == "LFChan" || UserHistoCode == "lfchan" ||
2774  UserHistoCode == "LFcc" || UserHistoCode == "lfcc" || UserHistoCode == "MccLF" )
2775  {StandardHistoCode = "MccLF";}
2776 
2777  if( UserHistoCode == "HF channels" || UserHistoCode == "HF between channels" ||
2778  UserHistoCode == "HFChannels" || UserHistoCode == "HFBetweenChannels" ||
2779  UserHistoCode == "HFChan" || UserHistoCode == "hfchan" ||
2780  UserHistoCode == "HFcc" || UserHistoCode == "hfcc" || UserHistoCode == "MccHF" )
2781  {StandardHistoCode = "MccHF";}
2782 
2783  if( UserHistoCode == "LF towers" || UserHistoCode == "LF between towers" ||
2784  UserHistoCode == "LFTowers" || UserHistoCode == "LFBetweenTowers" ||
2785  UserHistoCode == "LFTow" || UserHistoCode == "lftow" ||
2786  UserHistoCode == "LFtt" || UserHistoCode == "lftt" ||
2787  UserHistoCode == "LF SCs" || UserHistoCode == "LF between SCs" ||
2788  UserHistoCode == "LFSCs" || UserHistoCode == "LFBetweenSCs" ||
2789  UserHistoCode == "LFSuperXtals" || UserHistoCode == "lfsc" ||
2790  UserHistoCode == "LFSC" || UserHistoCode == "lfsx" ||
2791  UserHistoCode == "MttLF" )
2792  {StandardHistoCode = "MttLF";}
2793 
2794  if( UserHistoCode == "HF towers" || UserHistoCode == "HF between towers" ||
2795  UserHistoCode == "HFTowers" || UserHistoCode == "HFBetweenTowers" ||
2796  UserHistoCode == "HFTow" || UserHistoCode == "hftow" ||
2797  UserHistoCode == "HFtt" || UserHistoCode == "hftt" ||
2798  UserHistoCode == "HF SCs" || UserHistoCode == "HF between SCs" ||
2799  UserHistoCode == "HFSCs" || UserHistoCode == "HFBetweenSCs" ||
2800  UserHistoCode == "HFSuperXtals" || UserHistoCode == "hfsc" ||
2801  UserHistoCode == "HFSC" || UserHistoCode == "hfsx" ||
2802  UserHistoCode == "MttHF" )
2803  {StandardHistoCode = "MttHF";}
2804  }
2805 
2806  //---------------------------------------------
2807  if( StandardHistoCode == "?" )
2808  {
2809  std::cout << "*TEcnaParHistos::BuildStandardBetweenWhatCode(...)> UserHistoCode = " << UserHistoCode
2810  << " : code not found."
2811  << fTTBELL << std::endl;
2812 
2813  ListOfStandardCodes("BetweenWhatCode");
2814  }
2815  return StandardHistoCode;
2816 }
2817 
2818 //========================== ListOfStandardCodes ==========================
2819 
2820 void TEcnaParHistos::ListOfStandardCodes(const TString& TypeOfCode)
2821 {
2822  //------ Lists of Standard codes for Plot Histos methods
2823 
2824  if(TypeOfCode == "DetectorCode")
2825  {
2826  std::cout << "*--------------------------------------- Standard detector codes:" << std::endl;
2827  std::cout << " EB (ECAL Barrel) " << std::endl;
2828  std::cout << " EE (ECAL Endcap) " << std::endl;
2829  std::cout << " SM (Barrel Super Module) " << std::endl;
2830  std::cout << " Dee (Encap Dee) " << std::endl;
2831  std::cout << " Other codes are available" << std::endl;
2832  std::cout << " See source file: TEcnaParHistos::BuildStandardDetectorCode(...)." << std::endl;
2833  std::cout << "*----------------------------------------------------------------" << std::endl;
2834  }
2835 
2836  if(TypeOfCode == "PlotOption")
2837  {
2838  std::cout << "*--------------------------------------- Standard plot options:" << std::endl;
2839  std::cout << " All ROOT DRAW options and: " << std::endl;
2840  std::cout << " (nothing) " << std::endl;
2841  std::cout << " SAME n " << std::endl;
2842  std::cout << " ASCII " << std::endl;
2843  std::cout << " Other codes are available" << std::endl;
2844  std::cout << " See source file: TEcnaParHistos::BuildStandardPlotOption(...)." << std::endl;
2845  std::cout << "*--------------------------------------------------------------" << std::endl;
2846  }
2847 
2848  if(TypeOfCode == "1DHistoCodeX")
2849  {
2850  std::cout << "*---------------------- Standard 1D histo codes for X coordinate:" << std::endl;
2851  std::cout << " Tow (SM tower) " << std::endl;
2852  std::cout << " SC (Dee super crystal) " << std::endl;
2853  std::cout << " Xtal (crystal) " << std::endl;
2854  std::cout << " Smp (Adc sample) " << std::endl;
2855  std::cout << " Evt (event) " << std::endl;
2856  std::cout << " Other codes are available" << std::endl;
2857  std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeX(...)." << std::endl;
2858  std::cout << "*----------------------------------------------------------------" << std::endl;
2859  }
2860 
2861  if(TypeOfCode == "1DHistoCodeY")
2862  {
2863  std::cout << "*---------------------- Standard 1D histo codes for Y coordinate;" << std::endl;
2864  std::cout << " NOX (number of crystals) " << std::endl;
2865  std::cout << " NOS (number of samples) " << std::endl;
2866  std::cout << " NOR (number of runs) " << std::endl;
2867  std::cout << " Other codes are available" << std::endl;
2868  std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeY(...)." << std::endl;
2869  std::cout << "*----------------------------------------------------------------" << std::endl;
2870  }
2871 
2872  if(TypeOfCode == "1DHistoCodeXY")
2873  {
2874  std::cout << "*------------------ Standard 1D histo codes for X or Y coordinate;" << std::endl;
2875  std::cout << " NOE (number of events) " << std::endl;
2876  std::cout << " Ped (pedestal) " << std::endl;
2877  std::cout << " TNo (total noise) " << std::endl;
2878  std::cout << " LFN (low frequency noise) " << std::endl;
2879  std::cout << " HFN (high frequency noise) " << std::endl;
2880  std::cout << " MCs (mean correlation between samples) " << std::endl;
2881  std::cout << " SCs (sigma of correlations between samples) " << std::endl;
2882  std::cout << " MSp (sample mean) " << std::endl;
2883  std::cout << " SSp (sample sigma) " << std::endl;
2884  std::cout << " Time (time, date) " << std::endl;
2885  std::cout << " Adc (ADC sample value) " << std::endl;
2886  std::cout << " Other codes are available" << std::endl;
2887  std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeXY(...)." << std::endl;
2888  std::cout << "*-----------------------------------------------------------------" << std::endl;
2889  }
2890 
2891  if(TypeOfCode == "CovOrCorCode")
2892  {
2893  std::cout << "*-------- Standard codes for matrix type (correlation or covariance);" << std::endl;
2894  std::cout << " Cor (correlation) " << std::endl;
2895  std::cout << " cov (covariance) " << std::endl;
2896  std::cout << " Other codes are available" << std::endl;
2897  std::cout << " See source file: TEcnaParHistos::BuildStandardCovOrCorCode(...)." << std::endl;
2898  std::cout << "*--------------------------------------------------------------------" << std::endl;
2899  }
2900 
2901  if(TypeOfCode == "BetweenWhatCode")
2902  {
2903  std::cout << "*-------- Standard codes for quantities in correlation or covariance;" << std::endl;
2904  std::cout << " Mss (between samples) " << std::endl;
2905  std::cout << " MccLF (low frequency between channels) " << std::endl;
2906  std::cout << " MccHF (high frequency between channels) " << std::endl;
2907  std::cout << " MttLF (low frequency between towers [if EB] or SC [if EE]) " << std::endl;
2908  std::cout << " MttLF (high frequency between towers [if EB] or SC [if EE]) " << std::endl;
2909  std::cout << " Other codes are available" << std::endl;
2910  std::cout << " See source file: TEcnaParHistos::BuildStandardBetweenWhatCode(...)." << std::endl;
2911  std::cout << "*--------------------------------------------------------------------" << std::endl;
2912  }
2913 }
2914 
2915 //========================== GetTechHistoCode ==========================
2916 
2917 TString TEcnaParHistos::GetTechHistoCode(const TString& StandardHistoCode)
2918 {
2919  TString TechHistoCode = "?";
2920 
2921  //.................... standard code -> technical code for ViewMatrix, ViewStex, ViewStas
2922  if( StandardHistoCode == "NOE" ){TechHistoCode = "D_NOE_ChNb";}
2923  if( StandardHistoCode == "Ped" ){TechHistoCode = "D_Ped_ChNb";}
2924  if( StandardHistoCode == "TNo" ){TechHistoCode = "D_TNo_ChNb";}
2925  if( StandardHistoCode == "LFN" ){TechHistoCode = "D_LFN_ChNb";}
2926  if( StandardHistoCode == "HFN" ){TechHistoCode = "D_HFN_ChNb";}
2927  if( StandardHistoCode == "MCs" ){TechHistoCode = "D_MCs_ChNb";}
2928  if( StandardHistoCode == "SCs" ){TechHistoCode = "D_SCs_ChNb";}
2929 
2930  if( TechHistoCode == "?" )
2931  {
2932  std::cout << "*TEcnaParHistos::GetTechHistoCode(...)> StandardHistoCode = " << StandardHistoCode
2933  << " : code not found " << fTTBELL << std::endl;
2934  }
2935  return TechHistoCode;
2936 }
2937 //.......................................................................................................
2938 TString TEcnaParHistos::GetTechHistoCode(const TString& X_Quantity, const TString& Y_Quantity)
2939 {
2940  //........................... (X,Y) standard codes -> technical code
2941  TString TechHistoCode = "?";
2942 
2943  //........................... Matrix or Histo type
2944  if ( X_Quantity == "XtalORStin" && Y_Quantity == "NOE" ){TechHistoCode = "D_NOE_ChNb";}
2945  if ( X_Quantity == "XtalORStin" && Y_Quantity == "Ped" ){TechHistoCode = "D_Ped_ChNb";}
2946  if ( X_Quantity == "XtalORStin" && Y_Quantity == "TNo" ){TechHistoCode = "D_TNo_ChNb";}
2947  if ( X_Quantity == "XtalORStin" && Y_Quantity == "LFN" ){TechHistoCode = "D_LFN_ChNb";}
2948  if ( X_Quantity == "XtalORStin" && Y_Quantity == "HFN" ){TechHistoCode = "D_HFN_ChNb";}
2949  if ( X_Quantity == "XtalORStin" && Y_Quantity == "MCs" ){TechHistoCode = "D_MCs_ChNb";}
2950  if ( X_Quantity == "XtalORStin" && Y_Quantity == "SCs" ){TechHistoCode = "D_SCs_ChNb";}
2951 
2952  if ( X_Quantity == "NOE" && Y_Quantity == "NOX" ){TechHistoCode = "D_NOE_ChDs";}
2953  if ( X_Quantity == "Ped" && Y_Quantity == "NOX" ){TechHistoCode = "D_Ped_ChDs";}
2954  if ( X_Quantity == "TNo" && Y_Quantity == "NOX" ){TechHistoCode = "D_TNo_ChDs";}
2955  if ( X_Quantity == "LFN" && Y_Quantity == "NOX" ){TechHistoCode = "D_LFN_ChDs";}
2956  if ( X_Quantity == "HFN" && Y_Quantity == "NOX" ){TechHistoCode = "D_HFN_ChDs";}
2957  if ( X_Quantity == "MCs" && Y_Quantity == "NOX" ){TechHistoCode = "D_MCs_ChDs";}
2958  if ( X_Quantity == "SCs" && Y_Quantity == "NOX" ){TechHistoCode = "D_SCs_ChDs";}
2959 
2960  if ( X_Quantity == "Smp" && Y_Quantity == "MSp" ){TechHistoCode = "D_MSp_SpNb";}
2961  if ( X_Quantity == "MSp" && Y_Quantity == "NOS" ){TechHistoCode = "D_MSp_SpDs";}
2962  if ( X_Quantity == "Smp" && Y_Quantity == "SSp" ){TechHistoCode = "D_SSp_SpNb";}
2963  if ( X_Quantity == "SSp" && Y_Quantity == "NOS" ){TechHistoCode = "D_SSp_SpDs";}
2964 
2965  if ( X_Quantity == "Evt" && Y_Quantity == "Adc" ){TechHistoCode = "D_Adc_EvNb";}
2966  if ( X_Quantity == "Adc" && Y_Quantity == "NOE" ){TechHistoCode = "D_Adc_EvDs";}
2967 
2968  //................................ Histime type
2969  if( X_Quantity == "Time" && Y_Quantity == "Ped" ){TechHistoCode = "H_Ped_Date";}
2970  if( X_Quantity == "Ped" && Y_Quantity == "NOR" ){TechHistoCode = "H_Ped_RuDs";}
2971 
2972  if( X_Quantity == "Time" && Y_Quantity == "TNo" ){TechHistoCode = "H_TNo_Date";}
2973  if( X_Quantity == "TNo" && Y_Quantity == "NOR" ){TechHistoCode = "H_TNo_RuDs";}
2974 
2975  if( X_Quantity == "Time" && Y_Quantity == "LFN" ){TechHistoCode = "H_LFN_Date";}
2976  if( X_Quantity == "LFN" && Y_Quantity == "NOR" ){TechHistoCode = "H_LFN_RuDs";}
2977 
2978  if( X_Quantity == "Time" && Y_Quantity == "HFN" ){TechHistoCode = "H_HFN_Date";}
2979  if( X_Quantity == "HFN" && Y_Quantity == "NOR" ){TechHistoCode = "H_HFN_RuDs";}
2980 
2981  if( X_Quantity == "Time" && Y_Quantity == "MCs" ){TechHistoCode = "H_MCs_Date";}
2982  if( X_Quantity == "MCs" && Y_Quantity == "NOR" ){TechHistoCode = "H_MCs_RuDs";}
2983 
2984  if( X_Quantity == "Time" && Y_Quantity == "SCs" ){TechHistoCode = "H_SCs_Date";}
2985  if( X_Quantity == "SCs" && Y_Quantity == "NOR" ){TechHistoCode = "H_SCs_RuDs";}
2986 
2987  if( TechHistoCode == "?" )
2988  {
2989  std::cout << "TEcnaParHistos::GetTechHistoCode(...)> HistoCode not found. X_Quantity = " << X_Quantity
2990  << ", Y_Quantity = "<< Y_Quantity << std::endl;
2991  }
2992  return TechHistoCode;
2993 }
2994 
3000 
3001 //================== End of TEcnaParHistos.cc ========================
TPaveText * SetPaveTowersXY(const Int_t &, const Int_t &)
TPaveText * SetPaveSCsXY(const Int_t &, const Int_t &)
Int_t fNbOfRunsDisplayed
Int_t MaxCrysIYInDee()
void SetViewHistoStats(TH1D *, const TString &)
Color_t SetColorsForNumbers(const TString &)
TString BuildStandard1DHistoCodeX(const TString &, const TString &)
TPaveText * SetPaveStinsXY(const Int_t &, const Int_t &)
TString GetSCQuadFrom1DeeSCEcna(const Int_t &)
TString BuildStandardPlotOption(const TString &, const TString &)
Float_t AxisTitleOffset()
Int_t GetCodePlotAllXtalsInStin()
void SetViewHistoPadMargins(const TString &, const TString &)
TString GetCodeSameOnePlot()
Double_t fMarginAutoMinMax
TString BuildStandard1DHistoCodeXY(const TString &)
TPaveText * SetPaveSM(const TString &, const Int_t &, const TString &)
TString BuildStandard1DHistoCodeY(const TString &, const TString &)
Float_t DeeNameOffsetX(const Int_t &)
TString fAllXtalsInStinPlot
TString fOnlyOnePlot
TString GetSMHalfBarrel(const Int_t &)
Int_t fMaxNbOfRunsInLists
ClassImp(TEcnaParHistos) TEcnaParHistos
TString GetEEDeeType(const Int_t &)
UInt_t CanvasFormatH(const TString &)
TPaveText * SetPaveEvolRuns(const Int_t &, const TString &, const Int_t &, const TString &, const TString &, const TString &)
Double_t GetYminDefaultValue(const TString &)
Double_t BoxLeftX(const TString &)
UInt_t SetCanvasWidth(const TString &, const TString &)
void SetViewHistoOffsets(TH1D *, const TString &, const TString &)
TPaveText * SetPaveLVRB(const Int_t &, const Int_t &)
void SetViewHistoStyle(const TString &)
TString GetXVarHisto(const TString &, const TString &, const Int_t &)
Double_t GetYmaxDefaultValue(const TString &)
Float_t DeeNumberOffsetX(const TString &, const Int_t &)
TString BuildStandardBetweenWhatCode(const TString &, const TString &)
Float_t AxisTitleSize()
TPaveText * SetPaveNbOfEvts(const Int_t &, const TString &, const TString &, const TString &)
Bool_t RegisterPointer(const TString &, const Long_t &)
Definition: TEcnaObject.cc:105
TString GetTowerLvrbType(const Int_t &)
TPaveText * SetPaveEvolNbOfEvtsAna(const TString &, const Int_t &, const Int_t &, const Int_t &, const TString &)
TPaveText * SetPaveStex(const TString &, const Int_t &)
TString BuildStandardDetectorCode(const TString &)
Float_t AxisLabelOffset()
UInt_t CanvasFormatW(const TString &)
TString GetCodeSeveralPlot()
Int_t MaxNbOfRunsInLists()
TString GetCodeAllXtalsInStinPlot()
Color_t ColorTab(const Int_t &)
TPaveText * SetPaveCxyz(const Int_t &)
UInt_t SetCanvasHeight(const TString &, const TString &)
TString GetQuantityName(const TString &)
Float_t DeeOffsetX(const TString &, const Int_t &)
Int_t GetDSSCFrom1DeeSCEcna(const Int_t &, const Int_t &, const Int_t &)
TPaveText * SetPaveGeneralComment(const TString &)
Float_t AxisTickSize()
Definition: value.py:1
TString GetHistoType(const TString &)
TPaveText * SetPaveTower(const Int_t &)
Int_t MaxCrysInStin()
TEcnaParEcal * fEcal
Int_t GetDSFrom1DeeSCEcna(const Int_t &, const Int_t &)
Int_t GetDeeSCConsFrom1DeeSCEcna(const Int_t &, const Int_t &)
Int_t fPlotAllXtalsInStin
TPaveText * SetPaveCrystal(const Int_t &, const Int_t &, const Int_t &)
TString fFlagSubDet
TString GetYVarHisto(const TString &, const TString &, const Int_t &)
TString fSameOnePlot
Color_t ColorDefinition(const TString &)
TPaveText * SetPaveStin(const Int_t &, const Int_t &)
TPaveText * SetPaveAnalysisRun(const TString &, const Int_t &, const Int_t &, const TString &, const Int_t &, const Int_t &, const TString &)
TString GetTechHistoCode(const TString &)
Double_t BoxTopY(const TString &)
TString BuildStandardCovOrCorCode(const TString &, const TString &)
void SetColorPalette(const TString &)
TPaveText * SetPaveDee(const TString &, const Int_t &, const TString &)
Int_t GetNbOfRunsDisplayed()
TPaveText * SetPaveCrystalSample(const Int_t &, const Int_t &, const Int_t &, const Int_t &)
TPaveText * SetOptionSamePaveBorder(const TString &, const TString &)
Int_t MaxSMInEB()
void SetEcalSubDetector(const TString &)
TString GetCodeOnlyOnePlot()
Double_t GetMarginAutoMinMax()
Double_t BoxRightX(const TString &)
TString GetEcalSubDetector()
Int_t GetMaxNbOfColors()
Int_t MaxStinHocoInStex()
TEcnaNumbering * fEcalNumbering
TPaveText * SetPaveSC(const Int_t &, const Int_t &)
Double_t BoxBottomY(const TString &)
void SetViewGraphOffsets(TGraph *, const TString &)
void ListOfStandardCodes(const TString &)
Long_t GetPointerValue(const TString &)
Definition: TEcnaObject.cc:232
Float_t AxisLabelSize()
TPaveText * SetPaveStas()
TString fSeveralPlot
#define comment(par)
Definition: vmac.h:163