CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
14 ClassImp(TEcnaParHistos)
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 = 0;
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 = 0;
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 
73 TEcnaParHistos::TEcnaParHistos(const TString& SubDet,
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 
130 void TEcnaParHistos::SetEcalSubDetector(const TString& SubDet)
131 {
132  // Set Subdetector (EB or EE)
133 
134  Int_t MaxCar = fgMaxCar;
135  fFlagSubDet.Resize(MaxCar);
137 }
138 
139 
140 void TEcnaParHistos::SetEcalSubDetector(const TString& SubDet,
141  const TEcnaParEcal* pEcal,
142  const TEcnaNumbering* pEcalNumbering)
143 {
144  // Set Subdetector (EB or EE)
145 
146  fEcal = 0;
147  if( pEcal == 0 )
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 = 0;
157  if( pEcalNumbering == 0 )
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,0); // 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 
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=0; 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 = new char[fgMaxCar]; fCnew++;
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  sprintf(f_in, "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  sprintf(f_in, "Type: %-20s", run_type.Data());
1260  com_bot_left->AddText(f_in);
1261  sprintf(f_in, "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  sprintf(f_in, "Run: %d ", run_number);
1268  com_bot_left->AddText(f_in);
1269  sprintf(f_in, "Type: %-20s", run_type.Data());
1270  com_bot_left->AddText(f_in);
1271  sprintf(f_in, "Analysis: %-10s ", ana_type.Data());
1272  com_bot_left->AddText(f_in);
1273  Int_t un = 1;
1274  sprintf(f_in, "Samples: %d - %d", un, nb_of_samples);
1275  com_bot_left->AddText(f_in);
1276  sprintf(f_in, "Evts range: %d - %d", first_evt, last_evt);
1277  com_bot_left->AddText(f_in);
1278  }
1279 
1280  delete [] f_in; fCdelete++;
1281 
1282  return com_bot_left;
1283 }
1284 
1285 TPaveText* TEcnaParHistos::SetPaveNbOfEvts(const Int_t& nb_of_evts,
1286  const TString& start_date, const TString& stop_date,
1287  const TString& nb_col)
1288 {
1289 // Number of events box
1290 
1291  char* f_in = new char[fgMaxCar]; fCnew++;
1292 
1293  //...................... Pave number of events (bottom_right_box)
1294 
1295  Double_t pav_bot_right_xgauche = BoxLeftX("bottom_right_box");
1296  Double_t pav_bot_right_xdroite = BoxRightX("bottom_right_box");
1297  Double_t pav_bot_right_ybas = BoxBottomY("bottom_right_box");
1298  Double_t pav_bot_right_yhaut = BoxTopY("bottom_right_box");
1299  TPaveText *com_bot_right =
1300  new TPaveText(pav_bot_right_xgauche, pav_bot_right_ybas,
1301  pav_bot_right_xdroite, pav_bot_right_yhaut); fCnewRoot++;
1302 
1303  // 1 = left adjusted, 2 = vertically centered
1304  Int_t cTextPaveAlign = 12; com_bot_right->SetTextAlign(cTextPaveAlign);
1305  // 10*4 = 10*(ID4 = Arial) // 10*10 = 10*(ID10 = Courier New)
1306  Int_t cTextPaveFont = 100; com_bot_right->SetTextFont(cTextPaveFont);
1307  // 0.05 = 5% of the pave size
1308  Float_t cTextPaveSize = 0.025; com_bot_right->SetTextSize(cTextPaveSize);
1309  //Int_t cTextPaveShadCol = 0; com_bot_right->SetShadowColor(cTextPaveShadCol);
1310  Int_t cTextBorderSize = 1; com_bot_right->SetBorderSize(cTextBorderSize);
1311 
1312  if( nb_col == "TwoCol")
1313  {
1314  cTextPaveSize = 0.0325; com_bot_right->SetTextSize(cTextPaveSize);
1315  sprintf(f_in, "First evt: %s %8d events ", start_date.Data(), nb_of_evts);
1316  com_bot_right->AddText(f_in);
1317  sprintf(f_in, "Last evt: %s ", stop_date.Data());
1318  com_bot_right->AddText(f_in);
1319  }
1320  else
1321  {
1322  cTextPaveSize = 0.0225; com_bot_right->SetTextSize(cTextPaveSize);
1323  sprintf(f_in, "%d events", nb_of_evts);
1324  com_bot_right->AddText(f_in);
1325  sprintf(f_in, "First evt: %s ", start_date.Data());
1326  com_bot_right->AddText(f_in);
1327  sprintf(f_in, "Last evt: %s ", stop_date.Data());
1328  com_bot_right->AddText(f_in);
1329  }
1330 
1331  delete [] f_in; fCdelete++;
1332 
1333  return com_bot_right;
1334 }
1335 
1336 TPaveText* TEcnaParHistos::SetPaveEvolNbOfEvtsAna(const TString& ana_type, const Int_t& nb_of_samples,
1337  const Int_t& first_req_evt, const Int_t& last_req_evt,
1338  const TString& HistoType)
1339 {
1340 // Analysis name + run number comment
1341 
1342  char* f_in = new char[fgMaxCar]; fCnew++;
1343 
1344  //...................... Pave Analysis name/run number (bottom_left_box)
1345  Double_t pav_bot_left_xgauche = BoxLeftX("bottom_left_box");
1346  Double_t pav_bot_left_xdroite = BoxRightX("bottom_left_box");
1347  Double_t pav_bot_left_ybas = BoxBottomY("bottom_left_box");
1348  Double_t pav_bot_left_yhaut = BoxTopY("bottom_left_box");
1349 
1350  if( HistoType == "EvolProj" )
1351  {
1352  pav_bot_left_xgauche = BoxLeftX("bottom_left_box_evol");
1353  pav_bot_left_xdroite = BoxRightX("bottom_left_box_evol");
1354  pav_bot_left_ybas = BoxBottomY("bottom_left_box_evol");
1355  pav_bot_left_yhaut = BoxTopY("bottom_left_box_evol");
1356  }
1357 
1358  TPaveText *com_bot_left =
1359  new TPaveText(pav_bot_left_xgauche, pav_bot_left_ybas,
1360  pav_bot_left_xdroite, pav_bot_left_yhaut); fCnewRoot++;
1361 
1362  // 1 = left adjusted, 2 = vertically centered
1363  Int_t cTextPaveAlign = 12; com_bot_left->SetTextAlign(cTextPaveAlign);
1364  // 10*10 = 10*(ID10 = Courier New) // 10*4 = 10*(ID4 = Arial)
1365  Int_t cTextPaveFont = 100; com_bot_left->SetTextFont(cTextPaveFont);
1366  // 0.95 = 95% of the pave size
1367  Float_t cTextPaveSize = 0.03; com_bot_left->SetTextSize(cTextPaveSize);
1368  Int_t cTextBorderSize = 1; com_bot_left->SetBorderSize(cTextBorderSize);
1369 
1370  TString analysis_name = ana_type.Data();
1371 
1372  sprintf(f_in, "Analysis: %s", analysis_name.Data());
1373  com_bot_left->AddText(f_in);
1374  sprintf(f_in, "Samples: 1 - %d", nb_of_samples);
1375  com_bot_left->AddText(f_in);
1376  sprintf(f_in, "Evts range: %d - %d ", first_req_evt, last_req_evt);
1377  com_bot_left->AddText(f_in);
1378 
1379  delete [] f_in; fCdelete++;
1380 
1381  return com_bot_left;
1382 }
1383 
1384 TPaveText* TEcnaParHistos::SetPaveEvolRuns(const Int_t& start_evol_run, const TString& start_evol_date,
1385  const Int_t& stop_evol_run, const TString& stop_evol_date,
1386  const TString& opt_plot, const TString& HistoType)
1387 {
1388 // First and last run of the list of runs
1389 
1390  char* f_in = new char[fgMaxCar]; fCnew++;
1391 
1392  //...................... Pave first and last runs (bottom_right_box)
1393  Double_t pav_border_xgauche = BoxLeftX("bottom_right_box_evol");
1394  Double_t pav_border_xdroite = BoxRightX("bottom_right_box_evol");
1395  Double_t pav_border_ybas = BoxBottomY("bottom_right_box_evol");
1396  Double_t pav_border_yhaut = BoxTopY("bottom_right_box_evol");
1397 
1398  if( opt_plot == "SAME n" )
1399  {
1400  pav_border_xgauche = BoxLeftX("bottom_right_box_evpr");
1401  pav_border_xdroite = BoxRightX("bottom_right_box_evpr");
1402  pav_border_ybas = BoxBottomY("top_right_box_EB");
1403  pav_border_yhaut = BoxTopY("top_right_box_EB");
1404  }
1405 
1406  TPaveText *pav_evol_runs =
1407  new TPaveText(pav_border_xgauche, pav_border_ybas,
1408  pav_border_xdroite, pav_border_yhaut); fCnewRoot++;
1409 
1410  // 1 = left adjusted, 2 = vertically centered
1411  Int_t cTextPaveAlign = 12; pav_evol_runs->SetTextAlign(cTextPaveAlign);
1412  // 10*4 = 10*(ID4 = Courier helvetica-medium-r-normal = Arial)
1413  // 10*10 = 10*(ID10 = Courier bold-r-normal = Courier New)
1414  Int_t cTextPaveFont = 100; pav_evol_runs->SetTextFont(cTextPaveFont);
1415  // 0.03 = 3% of the pave height
1416  Float_t cTextPaveSize = 0.025;
1417  if( HistoType == "Evol" || HistoType == "EvolProj"){cTextPaveSize = 0.0225;}
1418 
1419  pav_evol_runs->SetTextSize(cTextPaveSize);
1420  Int_t cTextBorderSize = 1; pav_evol_runs->SetBorderSize(cTextBorderSize);
1421 
1422  if( !( (HistoType == "Evol" && opt_plot == "SAME n") ||
1423  (HistoType == "EvolProj" && opt_plot == "SAME n") ) )
1424  {
1425  sprintf(f_in, "First run: %d", start_evol_run);
1426  pav_evol_runs->AddText(f_in);
1427  sprintf(f_in, "(%s) ", start_evol_date.Data());
1428  pav_evol_runs->AddText(f_in);
1429  sprintf(f_in, "Last run: %d", stop_evol_run);
1430  pav_evol_runs->AddText(f_in);
1431  sprintf(f_in, "(%s) ", stop_evol_date.Data());
1432  pav_evol_runs->AddText(f_in);
1433  }
1434 
1435  if( (HistoType == "Evol" && opt_plot == "SAME n") ||
1436  (HistoType == "EvolProj" && opt_plot == "SAME n") )
1437  {
1438  sprintf(f_in, "First run: %d (%s) ", start_evol_run, start_evol_date.Data());
1439  pav_evol_runs->AddText(f_in);
1440  sprintf(f_in, "Last run: %d (%s)", stop_evol_run, stop_evol_date.Data());
1441  pav_evol_runs->AddText(f_in);
1442  }
1443 
1444  delete [] f_in; fCdelete++;
1445 
1446  return pav_evol_runs;
1447 }
1448 
1449 TPaveText* TEcnaParHistos::SetOptionSamePaveBorder(const TString& chopt, const TString& HistoType)
1450 {
1451 // Pave for plots with option SAME and SAME n.
1452 // Gives just the size/border and return the pointer to the Pave. No text.
1453 // The Pave text is drawn in TEcnaHistos.cc
1454 
1455  //.................................. DEFAULT OPTION: "several"
1456 
1457  Double_t pav_left_xgauche = BoxLeftX("several_plots_box");
1458  Double_t pav_left_xdroite = BoxRightX("several_plots_box");
1459  Double_t pav_left_ybas = BoxBottomY("several_plots_box");
1460  Double_t pav_left_yhaut = BoxTopY("several_plots_box");
1461 
1462  if(chopt == "sevevol")
1463  {
1464  pav_left_xgauche = BoxLeftX("several_evol_box");
1465  pav_left_xdroite = BoxRightX("several_evol_box");
1466  pav_left_ybas = BoxBottomY("several_evol_box");
1467  pav_left_yhaut = BoxTopY("several_evol_box");
1468 
1469  if( HistoType == "EvolProj" )
1470  {
1471  pav_left_xgauche = BoxLeftX("several_evpr_box");
1472  pav_left_xdroite = BoxRightX("several_evpr_box");
1473  pav_left_ybas = BoxBottomY("several_evpr_box");
1474  pav_left_yhaut = BoxTopY("several_evpr_box");
1475  }
1476  }
1477 
1478  TPaveText *com_several =
1479  new TPaveText(pav_left_xgauche, pav_left_ybas,
1480  pav_left_xdroite, pav_left_yhaut); fCnewRoot++;
1481 
1482  return com_several;
1483 }
1484 //.... end of SetOptionSamePaveBorder
1485 //===========================================================================
1486 //
1487 // SetPaveSM, SetPaveTower, SetPaveTowersXY,
1488 // SetPaveEBCrystal, SetPaveEBCrystalSample,
1489 // SetPaveLVRB, SetColorsForNumbers
1490 //
1491 //===========================================================================
1493 {
1494  char* f_in = new char[fgMaxCar]; fCnew++;
1495  //.................................. DEFAULT OPTION: "standard"
1496  Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
1497  Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
1498  Double_t pav_top_left_ybas = BoxBottomY("top_left_box_SM");
1499  Double_t pav_top_left_yhaut = BoxTopY("top_left_box_SM");
1500 
1501  TPaveText *com_top_left =
1502  new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
1503  pav_top_left_xdroite, pav_top_left_yhaut); fCnewRoot++;
1504 
1505  // 1 = left adjusted, 2 = vertically centered
1506  Int_t cTextPaveAlign = 12; com_top_left->SetTextAlign(cTextPaveAlign);
1507  // 10*10 = 10*(ID10 = Courier New)
1508  Int_t cTextPaveFont = 100; com_top_left->SetTextFont(cTextPaveFont);
1509  // 0.95 = 95% of the pave size
1510  Float_t cTextPaveSize = 0.04; com_top_left->SetTextSize(cTextPaveSize);
1511  Int_t cTextBorderSize = 1; com_top_left->SetBorderSize(cTextBorderSize);
1512 
1513  if ( fFlagSubDet == "EB"){sprintf(f_in, "EB");}
1514  if ( fFlagSubDet == "EE"){sprintf(f_in, "EE");}
1515 
1516  com_top_left->AddText(f_in);
1517 
1518  delete [] f_in; fCdelete++;
1519 
1520  return com_top_left;
1521 }
1522 
1523 TPaveText* TEcnaParHistos::SetPaveSM(const TString& chopt, const Int_t& SM_number,
1524  const TString& EB_type)
1525 {
1526 // Pave for Super-module plots
1527 
1528  char* f_in = new char[fgMaxCar]; fCnew++;
1529 
1530  //.................................. DEFAULT OPTION: "standard"
1531  Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
1532  Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
1533  Double_t pav_top_left_ybas = BoxBottomY("top_left_box_SM");
1534  Double_t pav_top_left_yhaut = BoxTopY("top_left_box_SM");
1535 
1536  if( chopt == "standard" || (chopt == "standGH" && EB_type == "EB-") )
1537  {
1538  pav_top_left_xgauche = BoxLeftX("top_left_box_EB");
1539  pav_top_left_xdroite = BoxRightX("top_left_box_EB");
1540  pav_top_left_ybas = BoxBottomY("top_left_box_EB");
1541  pav_top_left_yhaut = BoxTopY("top_left_box_EB");
1542  }
1543 
1544  if( chopt == "standSM" || chopt == "standStex" || (chopt == "standGH" && EB_type == "EB+") )
1545  {
1546  pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
1547  pav_top_left_xdroite = BoxRightX("top_left_box_SM");
1548  pav_top_left_ybas = BoxBottomY("top_left_box_SM");
1549  pav_top_left_yhaut = BoxTopY("top_left_box_SM");
1550  }
1551 
1552  if( chopt == "several" )
1553  {
1554  pav_top_left_xgauche = BoxLeftX("several_plots_box");
1555  pav_top_left_xdroite = BoxRightX("several_plots_box");
1556  pav_top_left_ybas = BoxBottomY("several_plots_box");
1557  pav_top_left_yhaut = BoxTopY("several_plots_box");
1558  }
1559 
1560  if( chopt == "sevevol" )
1561  {
1562  pav_top_left_xgauche = BoxLeftX("several_evol_box");
1563  pav_top_left_xdroite = BoxRightX("several_evol_box");
1564  pav_top_left_ybas = BoxBottomY("several_evol_box");
1565  pav_top_left_yhaut = BoxTopY("several_evol_box");
1566  }
1567 
1568  TPaveText *com_top_left =
1569  new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
1570  pav_top_left_xdroite, pav_top_left_yhaut); fCnewRoot++;
1571 
1572  // 1 = left adjusted, 2 = vertically centered
1573  Int_t cTextPaveAlign = 12; com_top_left->SetTextAlign(cTextPaveAlign);
1574  // 10*10 = 10*(ID10 = Courier New)
1575  Int_t cTextPaveFont = 100; com_top_left->SetTextFont(cTextPaveFont);
1576  // 0.95 = 95% of the pave size
1577  Float_t cTextPaveSize = 0.04; com_top_left->SetTextSize(cTextPaveSize);
1578  Int_t cTextBorderSize = 1; com_top_left->SetBorderSize(cTextBorderSize);
1579 
1580  if( chopt == "standard" || chopt == "standSM" || chopt == "standStex" || chopt == "standGH")
1581  {
1582  Int_t sm_nb = SM_number;
1583  if( EB_type == "EB+" ){sprintf(f_in, "EB+%d", sm_nb);}
1584  if( EB_type == "EB-" )
1585  {sm_nb = -SM_number+fEcal->MaxSMInEB()/2;
1586  sprintf(f_in, "EB%d (SM%d)", sm_nb, SM_number);}
1587  com_top_left->AddText(f_in);
1588  }
1589 
1590  delete [] f_in; fCdelete++;
1591 
1592  return com_top_left;
1593 }
1594 
1595 TPaveText* TEcnaParHistos::SetPaveTower(const Int_t& SMtower_X)
1596 {
1597 // Tower comment
1598 
1599  char* f_in = new char[fgMaxCar]; fCnew++;
1600  //...................... Pave tower/crystal(channel)/sample (top_right_box)
1601  Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
1602  Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
1603  Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EB");
1604  Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EB");
1605  TPaveText *com_top_mid =
1606  new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
1607  pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
1608 
1609  // 1 = left adjusted, 2 = vertically centered
1610  Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
1611  // 10*10 = 10*(ID10 = Courier New)
1612  Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
1613  // 0.95 = 95% of the pave size
1614  Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
1615  Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
1616 
1617  sprintf(f_in, " Tower: %d ", SMtower_X);
1618  com_top_mid->AddText(f_in);
1619 
1620  delete [] f_in; fCdelete++;
1621 
1622  return com_top_mid;
1623 }
1624 
1625 TPaveText* TEcnaParHistos::SetPaveTowersXY(const Int_t& SMtower_X, const Int_t& SMtower_Y)
1626 {
1627 // Towers X and Y for (TowEcha,TowEcha) cov or cor matrix
1628 
1629  char* f_in = new char[fgMaxCar]; fCnew++;
1630  //...................... Pave tower/TowEcha(channel)/sample (top_right_box)
1631  Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
1632  Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
1633  Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EB");
1634  Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EB");
1635  TPaveText *com_top_mid =
1636  new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
1637  pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
1638 
1639  // 1 = left adjusted, 2 = vertically centered
1640  Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
1641  // 10*10 = 10*(ID10 = Courier New)
1642  Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
1643  // 0.95 = 95% of the pave size
1644  Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
1645  Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
1646 
1647  sprintf(f_in, " Tower X: %d ", SMtower_X);
1648  com_top_mid->AddText(f_in);
1649  sprintf(f_in, " Tower Y: %d ", SMtower_Y);
1650  com_top_mid->AddText(f_in);
1651 
1652  delete [] f_in; fCdelete++;
1653 
1654  return com_top_mid;
1655 }
1656 
1657 
1658 TPaveText* TEcnaParHistos::SetPaveCrystal(const Int_t& StexCrys, const Int_t& StexStinA,
1659  const Int_t& StinEcha)
1660 {
1661  Int_t arg_AlreadyRead = 0;
1662  Int_t flag_all_samples = 0;
1663  return SetPaveCrystal(StexCrys, StexStinA, StinEcha, arg_AlreadyRead, flag_all_samples);
1664 }
1665 
1666 TPaveText* TEcnaParHistos::SetPaveCrystal(const Int_t& StexCrys, const Int_t& StexStinA,
1667  const Int_t& StinEcha, const Int_t& arg_AlreadyRead,
1668  const Int_t& flag_all_samples)
1669 {
1670 // Tower + StinEcha comment. StexCrys range: [1,max]
1671 
1672  char* f_in = new char[fgMaxCar]; fCnew++;
1673  //...................... Pave tower/StinEcha(channel)/sample (top_right_box)
1674 
1675  Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
1676  Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
1677  Double_t pav_top_right_ybas = BoxBottomY("top_right_box_EB");
1678  Double_t pav_top_right_yhaut = BoxTopY("top_right_box_EB");
1679  if( fFlagSubDet == "EE" )
1680  {
1681  pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
1682  pav_top_right_xdroite = BoxRightX("top_right_box_EE");
1683  pav_top_right_ybas = BoxBottomY("top_right_box_EE");
1684  pav_top_right_yhaut = BoxTopY("top_right_box_EE");
1685  }
1686 
1687  TPaveText *com_top_right =
1688  new TPaveText(pav_top_right_xgauche, pav_top_right_ybas,
1689  pav_top_right_xdroite, pav_top_right_yhaut); fCnewRoot++;
1690 
1691  // 1 = left adjusted, 2 = vertically centered
1692  Int_t cTextPaveAlign = 12; com_top_right->SetTextAlign(cTextPaveAlign);
1693  // 10*10 = 10*(ID10 = Courier New)
1694  Int_t cTextPaveFont = 100; com_top_right->SetTextFont(cTextPaveFont);
1695  // 0.95 = 95% of the pave size
1696  Float_t cTextPaveSize = 0.03; com_top_right->SetTextSize(cTextPaveSize);
1697  Int_t cTextBorderSize = 1; com_top_right->SetBorderSize(cTextBorderSize);
1698 
1699  if( fFlagSubDet == "EB" )
1700  {
1701  if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
1702  {sprintf(f_in, "Channel: %d ", StinEcha);} // EB => range = [0,24]
1703  if( arg_AlreadyRead == 1 && flag_all_samples == 1 )
1704  {sprintf(f_in, "Channel: 0 to %d", fEcal->MaxCrysInStin()-1 );}
1705  com_top_right->AddText(f_in);
1706  if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
1707  {sprintf(f_in, "Crystal in SM: %d ", StexCrys);
1708  com_top_right->AddText(f_in);}
1709  }
1710 
1711  if( fFlagSubDet == "EE" )
1712  {
1713  Int_t StinEchap = StinEcha+1;
1714  if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
1715  {sprintf(f_in, "Xtal in SC: %d ", StinEchap);} // EE => range = [1,25]
1716  if( arg_AlreadyRead == 1 && flag_all_samples == 1 )
1717  {sprintf(f_in, "Xtal in SC: 1 to %d", fEcal->MaxCrysInStin());}
1718  com_top_right->AddText(f_in);
1719  if( arg_AlreadyRead == 0 || (arg_AlreadyRead == 1 && flag_all_samples == 0 ) )
1720  {
1721  Int_t IX_Dee_crys = StexCrys/fEcal->MaxCrysIYInDee() + 1;
1722  Int_t IY_Dee_crys = StexCrys%fEcal->MaxCrysIYInDee();
1723  if( IY_Dee_crys == 0 ){IX_Dee_crys--; IY_Dee_crys = fEcal->MaxCrysIYInDee();}
1724  sprintf(f_in, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
1725  com_top_right->AddText(f_in);
1726  }
1727  }
1728 
1729  delete [] f_in; fCdelete++;
1730 
1731  return com_top_right;
1732 }
1733 
1734 TPaveText* TEcnaParHistos::SetPaveCrystalSample(const Int_t& StexCrys, const Int_t& StexStinA,
1735  const Int_t& StinEcha, const Int_t& iSample)
1736 {
1737 // Tower + StinEcha + sample comment
1738 
1739  char* f_in = new char[fgMaxCar]; fCnew++;
1740  //...................... Pave tower/StinEcha(channel)/sample (top_right_box)
1741  Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
1742  Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
1743  Double_t pav_top_right_ybas = BoxBottomY("top_right_box_EB");
1744  Double_t pav_top_right_yhaut = BoxTopY("top_right_box_EB");
1745  if( fFlagSubDet == "EE" )
1746  {
1747  pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
1748  pav_top_right_xdroite = BoxRightX("top_right_box_EE");
1749  pav_top_right_ybas = BoxBottomY("top_right_box_EE");
1750  pav_top_right_yhaut = BoxTopY("top_right_box_EE");
1751  }
1752 
1753  TPaveText *com_top_right =
1754  new TPaveText(pav_top_right_xgauche, pav_top_right_ybas,
1755  pav_top_right_xdroite, pav_top_right_yhaut); fCnewRoot++;
1756 
1757  // 1 = left adjusted, 2 = vertically centered
1758  Int_t cTextPaveAlign = 12; com_top_right->SetTextAlign(cTextPaveAlign);
1759  // 10*10 = 10*(ID10 = Courier New)
1760  Int_t cTextPaveFont = 100; com_top_right->SetTextFont(cTextPaveFont);
1761  // 0.95 = 95% of the pave size
1762  Float_t cTextPaveSize = 0.03; com_top_right->SetTextSize(cTextPaveSize);
1763  Int_t cTextBorderSize = 1; com_top_right->SetBorderSize(cTextBorderSize);
1764 
1765 
1766  if( fFlagSubDet == "EB" )
1767  {
1768  sprintf(f_in, " Channel: %d ", StinEcha);
1769  com_top_right->AddText(f_in);
1770  sprintf(f_in, " Crystal in SM: %d ", StexCrys);
1771  com_top_right->AddText(f_in);
1772  }
1773 
1774  if( fFlagSubDet == "EE" )
1775  {
1776  Int_t StinEchap = StinEcha+1;
1777  sprintf(f_in, " Channel: %d ", StinEchap); // EE => range = [1,25]
1778  com_top_right->AddText(f_in);
1779  Int_t IX_Dee_crys = StexCrys/fEcal->MaxCrysIYInDee() + 1;
1780  Int_t IY_Dee_crys = StexCrys%fEcal->MaxCrysIYInDee();
1781  if( IY_Dee_crys == 0 ){IX_Dee_crys--; IY_Dee_crys = fEcal->MaxCrysIYInDee();}
1782  sprintf(f_in, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
1783  com_top_right->AddText(f_in);
1784  }
1785 
1786  Int_t iSample_p = iSample+1;
1787  sprintf(f_in, " Sample: %d ", iSample_p);
1788  com_top_right->AddText(f_in);
1789 
1790  delete [] f_in; fCdelete++;
1791 
1792  return com_top_right;
1793 }
1794 
1795 TPaveText* TEcnaParHistos::SetPaveLVRB(const Int_t& SMNumber, const Int_t& SMtower)
1796 {
1797 // LVRB at the top or at the bottom comment
1798 
1799  //....................... GRAND pave "LVRB"
1800  Double_t pav_bot_xgauche = BoxLeftX("bottom_left_box");
1801  Double_t pav_bot_xdroite = BoxRightX("bottom_right_box");
1802  Double_t pav_bot_ybas = BoxBottomY("bottom_left_box");
1803  Double_t pav_bot_yhaut = BoxTopY("bottom_left_box");
1804  TPaveText *com_bot_mid =
1805  new TPaveText(pav_bot_xgauche, pav_bot_ybas,
1806  pav_bot_xdroite, pav_bot_yhaut); fCnewRoot++;
1807 
1808  Color_t couleur_noir = ColorDefinition("noir");
1809  Color_t couleur_rouge = SetColorsForNumbers("lvrb_top");
1810  Color_t couleur_bleu_fonce = SetColorsForNumbers("lvrb_bottom");
1811 
1812  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
1813  {
1814  TText *t1 = com_bot_mid->AddText(" <= IP (#eta = 0) (#eta = +85) => ");
1815  t1->SetTextColor(couleur_noir);
1816  }
1817 
1818  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
1819  {
1820  TText *t2 = com_bot_mid->AddText(" <= (#eta = -85) IP (#eta = 0) => ");
1821  t2->SetTextColor(couleur_noir);
1822  }
1823 
1824  if(fEcalNumbering->GetTowerLvrbType(SMtower) == "top")
1825  {
1826  TText *t3 = 0;
1827  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
1828  {t3 = com_bot_mid->AddText(" <=== LVRB ");}
1829  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
1830  {t3 = com_bot_mid->AddText(" LVRB ===> ");}
1831  t3->SetTextColor(couleur_rouge);
1832  }
1833 
1834  if(fEcalNumbering->GetTowerLvrbType(SMtower) == "bottom")
1835  {
1836  TText *t4 = 0;
1837  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
1838  {t4 = com_bot_mid->AddText(" LVRB ===> ");}
1839  if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
1840  {t4 = com_bot_mid->AddText(" <=== LVRB ");}
1841  t4->SetTextColor(couleur_bleu_fonce);
1842  }
1843  return com_bot_mid;
1844 
1845 }// end of SetPaveLVRB
1846 
1847 Color_t TEcnaParHistos::SetColorsForNumbers(const TString& chtype_number)
1848 {
1849  //Set color of the numbers for SuperModule- or Tower- numbering plots
1850 
1851  Color_t couleur = ColorDefinition("noir"); // default = "noir"
1852 
1853  if ( chtype_number == "crystal" ){couleur = ColorDefinition("noir");}
1854  if ( chtype_number == "lvrb_top" ){couleur = ColorDefinition("rouge");}
1855  if ( chtype_number == "lvrb_bottom" ){couleur = ColorDefinition("bleu_fonce");}
1856 
1857  return couleur;
1858 }
1859 
1860 //===========================================================================
1861 //
1862 // SetPaveDee, SetPaveSC, SetPaveSCsXY,
1863 // SetPaveEECrystal
1864 //
1865 //===========================================================================
1866 
1867 TPaveText* TEcnaParHistos::SetPaveDee(const TString& chopt, const Int_t& DeeNumber,
1868  const TString& DeeType)
1869 {
1870 // Dee pav. Called only once.
1871 
1872  char* f_in = new char[fgMaxCar]; fCnew++;
1873 
1874  //.................................. DEFAULT OPTION: "standard"
1875  Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
1876  Double_t pav_top_left_xdroite = BoxRightX("top_left_box_EE");
1877  Double_t pav_top_left_ybas = BoxBottomY("top_left_box_EE");
1878  Double_t pav_top_left_yhaut = BoxTopY("top_left_box_EE");
1879 
1880  if(chopt == "standard" || chopt == "standGH")
1881  {
1882  pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
1883  pav_top_left_xdroite = BoxRightX("top_left_box_EE");
1884  pav_top_left_ybas = BoxBottomY("top_left_box_EE");
1885  pav_top_left_yhaut = BoxTopY("top_left_box_EE");
1886  }
1887 
1888  if( chopt == "standDee" || chopt == "standStex" )
1889  {
1890  pav_top_left_xgauche = BoxLeftX("top_left_box_Dee");
1891  pav_top_left_xdroite = BoxRightX("top_left_box_Dee");
1892  pav_top_left_ybas = BoxBottomY("top_left_box_Dee");
1893  pav_top_left_yhaut = BoxTopY("top_left_box_Dee");
1894  }
1895 
1896  if(chopt == "several")
1897  {
1898  pav_top_left_xgauche = BoxLeftX("several_plots_box");
1899  pav_top_left_xdroite = BoxRightX("several_plots_box");
1900  pav_top_left_ybas = BoxBottomY("several_plots_box");
1901  pav_top_left_yhaut = BoxTopY("several_plots_box");
1902  }
1903  if(chopt == "sevevol")
1904  {
1905  pav_top_left_xgauche = BoxLeftX("several_evol_box");
1906  pav_top_left_xdroite = BoxRightX("several_evol_box");
1907  pav_top_left_ybas = BoxBottomY("several_evol_box");
1908  pav_top_left_yhaut = BoxTopY("several_evol_box");
1909  }
1910 
1911  TPaveText *com_top_left =
1912  new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
1913  pav_top_left_xdroite, pav_top_left_yhaut); fCnewRoot++;
1914 
1915  // 1 = left adjusted, 2 = vertically centered
1916  Int_t cTextPaveAlign = 12; com_top_left->SetTextAlign(cTextPaveAlign);
1917  // 10*10 = 10*(ID10 = Courier New)
1918  Int_t cTextPaveFont = 100; com_top_left->SetTextFont(cTextPaveFont);
1919  // 0.95 = 95% of the pave size
1920  Float_t cTextPaveSize = 0.04; com_top_left->SetTextSize(cTextPaveSize);
1921  Int_t cTextBorderSize = 1; com_top_left->SetBorderSize(cTextBorderSize);
1922 
1923  if( chopt == "standard" )
1924  {
1925  sprintf(f_in, " Dee: %d", DeeNumber);
1926  com_top_left->AddText(f_in);
1927  sprintf(f_in, " (%s)", DeeType.Data());
1928  com_top_left->AddText(f_in);
1929  }
1930 
1931  if( chopt == "standDee" || chopt == "standStex" || chopt == "standGH" )
1932  {
1933  sprintf(f_in, " Dee: %d (%s) ", DeeNumber, DeeType.Data());
1934  com_top_left->AddText(f_in);
1935  }
1936 
1937  delete [] f_in; fCdelete++;
1938 
1939  return com_top_left;
1940 }
1941 
1942 TPaveText* TEcnaParHistos::SetPaveSC(const Int_t& DeeSC_X, const Int_t& DeeNumber)
1943 {
1944 // SC comment
1945 
1946  char* f_in = new char[fgMaxCar]; fCnew++;
1947  //...................... Pave SC/crystal(channel)/sample (top_right_box)
1948  Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
1949  Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
1950  Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EE");
1951  Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EE");
1952  TPaveText *com_top_mid =
1953  new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
1954  pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
1955 
1956  // 1 = left adjusted, 2 = vertically centered
1957  Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
1958  // 10*10 = 10*(ID10 = Courier New)
1959  Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
1960  // 0.95 = 95% of the pave size
1961  Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
1962  Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
1963 
1964  sprintf(f_in, "Sector: S%d, SC: %d",
1965  fEcalNumbering->GetDSFrom1DeeSCEcna(DeeNumber, DeeSC_X),
1966  fEcalNumbering->GetDSSCFrom1DeeSCEcna(DeeNumber, DeeSC_X));
1967  com_top_mid->AddText(f_in);
1968  sprintf(f_in, "SC for const.: %d",
1969  fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(DeeNumber,DeeSC_X));
1970  com_top_mid->AddText(f_in);
1971  sprintf(f_in, "Quadrant: %s",
1972  fEcalNumbering->GetSCQuadFrom1DeeSCEcna(DeeSC_X).Data());
1973  com_top_mid->AddText(f_in);
1974  delete [] f_in; fCdelete++;
1975 
1976  return com_top_mid;
1977 }
1978 
1979 TPaveText* TEcnaParHistos::SetPaveSCsXY(const Int_t& DeeSC_X, const Int_t& DeeSC_Y)
1980 {
1981 // SCs X and Y for (SCEcha,SCEcha) cov or cor matrix
1982 
1983  char* f_in = new char[fgMaxCar]; fCnew++;
1984  //...................... Pave SC/SCEcha(channel)/sample (top_right_box)
1985  Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
1986  Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
1987  Double_t pav_top_mid_ybas = BoxBottomY("top_mid_box_EE");
1988  Double_t pav_top_mid_yhaut = BoxTopY("top_mid_box_EE");
1989  TPaveText *com_top_mid =
1990  new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
1991  pav_top_mid_xdroite, pav_top_mid_yhaut); fCnewRoot++;
1992 
1993  // 1 = left adjusted, 2 = vertically centered
1994  Int_t cTextPaveAlign = 12; com_top_mid->SetTextAlign(cTextPaveAlign);
1995  // 10*10 = 10*(ID10 = Courier New)
1996  Int_t cTextPaveFont = 100; com_top_mid->SetTextFont(cTextPaveFont);
1997  // 0.95 = 95% of the pave size
1998  Float_t cTextPaveSize = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
1999  Int_t cTextBorderSize = 1; com_top_mid->SetBorderSize(cTextBorderSize);
2000 
2001  sprintf(f_in, "SC X: %d", DeeSC_X);
2002  com_top_mid->AddText(f_in);
2003  sprintf(f_in, "SC Y: %d", DeeSC_Y);
2004  com_top_mid->AddText(f_in);
2005 
2006  delete [] f_in; fCdelete++;
2007 
2008  return com_top_mid;
2009 }
2010 
2011 TPaveText* TEcnaParHistos::SetPaveCxyz(const Int_t& DeeNumber)
2012 {
2013 // Cxyz at the top or at the bottom comment
2014 
2015  //....................... GRAND pave "Cxyz"
2016  Double_t pav_bot_xgauche = BoxRightX("bottom_mid_box");
2017  Double_t pav_bot_xdroite = BoxLeftX("bottom_mid_box");
2018  Double_t pav_bot_ybas = BoxBottomY("bottom_left_box");
2019  Double_t pav_bot_yhaut = BoxTopY("bottom_left_box");
2020  TPaveText *com_bot_mid =
2021  new TPaveText(pav_bot_xgauche, pav_bot_ybas,
2022  pav_bot_xdroite, pav_bot_yhaut); fCnewRoot++;
2023 
2024  //com_bot_mid->SetOption("arc");
2025  //com_bot_mid->SetCornerRadius((Double_t)0.5);
2026  //Int_t cTextPaveFont = 100; com_bot_mid->SetTextFont(cTextPaveFont);
2027 
2028  com_bot_mid->SetTextSize(0.0325);
2029  //........................................... (SetPaveCxyz)
2030  if( DeeNumber == 1 )
2031  {
2032  com_bot_mid->AddText(" y ");
2033  com_bot_mid->AddText(" #uparrow ");
2034  com_bot_mid->AddText(" (Near) x #leftarrow #otimes z (Far) " );
2035  }
2036  if( DeeNumber == 2 )
2037  {
2038  com_bot_mid->AddText(" y ");
2039  com_bot_mid->AddText(" #uparrow ");
2040  com_bot_mid->AddText(" (Near) x #leftarrow #otimes z (Far) " );
2041  }
2042  if( DeeNumber == 3 )
2043  {
2044  com_bot_mid->AddText(" y ");
2045  com_bot_mid->AddText(" #uparrow ");
2046  com_bot_mid->AddText(" (Far) z (#bullet) #rightarrow x (Near) " );
2047  }
2048  if( DeeNumber == 4 )
2049  {
2050  com_bot_mid->AddText(" y ");
2051  com_bot_mid->AddText(" #uparrow ");
2052  com_bot_mid->AddText(" (Far) z (#bullet) #rightarrow x (Near) " );
2053  }
2054 
2055  // com_bot_mid->AddText(" (from IP) " );
2056  return com_bot_mid;
2057 }
2058 //===========================================================================
2059 //
2060 // SetPaveStex, SetPaveStin
2061 //
2062 //===========================================================================
2063 
2064 TPaveText* TEcnaParHistos::SetPaveStex(const TString& chopt, const Int_t& StexNumber)
2065 {
2066  TPaveText* pav_text = 0;
2067 
2068  if( StexNumber > 0 )
2069  {
2070  if ( fFlagSubDet == "EB" )
2071  {
2072  TString EB_type = fEcalNumbering->GetSMHalfBarrel(StexNumber);
2073  pav_text = SetPaveSM(chopt, StexNumber, EB_type);
2074  }
2075  if ( fFlagSubDet == "EE" )
2076  {
2077  TString dee_type = fEcalNumbering->GetEEDeeType(StexNumber);
2078  pav_text = SetPaveDee(chopt, StexNumber, dee_type);
2079  }
2080  }
2081  if( StexNumber == 0 ){pav_text = SetPaveStas();}
2082 
2083  return pav_text;
2084 }
2085 
2086 TPaveText* TEcnaParHistos::SetPaveStin(const Int_t& StinNumber, const Int_t& StexNumber)
2087 {
2088  TPaveText* pav_text = 0;
2089  if ( fFlagSubDet == "EB"){pav_text = SetPaveTower(StinNumber);}
2090  if ( fFlagSubDet == "EE"){pav_text = SetPaveSC(StinNumber, StexNumber);}
2091  return pav_text;
2092 }
2093 
2094 TPaveText* TEcnaParHistos::SetPaveStinsXY(const Int_t& StexStin_X, const Int_t& StexStin_Y)
2095 {
2096  TPaveText* pav_text = 0;
2097  if ( fFlagSubDet == "EB"){pav_text = SetPaveTowersXY(StexStin_X, StexStin_Y);}
2098  if ( fFlagSubDet == "EE"){pav_text = SetPaveSCsXY(StexStin_X, StexStin_Y);}
2099  return pav_text;
2100 }
2101 
2102 //===========================================================================
2103 //
2104 // GetHistoType, GetQuantityName
2105 //
2106 //===========================================================================
2107 TString TEcnaParHistos::GetHistoType(const TString& HistoCode)
2108 {
2109 // Type of the quantity as a function of the quantity code
2110 // Histo type <=> Variable in X coordinate
2111 
2112  TString HistoType;
2113  Int_t MaxCar = fgMaxCar;
2114  HistoType.Resize(MaxCar);
2115  HistoType = "(no quantity type info)";
2116 
2117  //.(1a)............................ Global
2118  if ( HistoCode == "D_NOE_ChNb" || HistoCode == "D_Ped_ChNb" ||
2119  HistoCode == "D_TNo_ChNb" || HistoCode == "D_LFN_ChNb" || HistoCode == "D_HFN_ChNb" ||
2120  HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" )
2121  {HistoType = "Global";} // X coordinate = Xtals for SM or Dee
2122  // Tower for EB
2123  // SC for EE
2124  //.(1b)............................ Proj
2125  if ( HistoCode == "D_NOE_ChDs" || HistoCode == "D_Ped_ChDs" ||
2126  HistoCode == "D_TNo_ChDs" || HistoCode == "D_LFN_ChDs" || HistoCode == "D_HFN_ChDs" ||
2127  HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" )
2128  {HistoType = "Proj";} // X coordinate = bin number
2129 
2130  //.(2)............................ H1Basic
2131  if ( HistoCode == "D_MSp_SpNb" || HistoCode == "D_SSp_SpNb" )
2132  {HistoType = "H1Basic";} // X coordinate = sample number
2133 
2134  //.(2)............................ H1BasicProj
2135  if ( HistoCode == "D_MSp_SpDs" || HistoCode == "D_SSp_SpDs" )
2136  {HistoType = "H1BasicProj";} // X coordinate = total noise
2137 
2138  //.(3a)............................ SampGlobal
2139  if ( HistoCode == "D_Adc_EvNb" ){HistoType = "SampGlobal";} // X coordinate = event number
2140  //.(3b)............................ SampProj
2141  if ( HistoCode == "D_Adc_EvDs" ){HistoType = "SampProj";} // X coordinate = bin number
2142 
2143  //.(4a)............................ Evol
2144  if ( HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" || HistoCode == "H_MCs_Date" ||
2145  HistoCode == "H_LFN_Date" || HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" )
2146  {HistoType = "Evol";} // X coordinate = date
2147 
2148  //.(4b)............................ EvolProj
2149  if ( HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" || HistoCode == "H_MCs_RuDs" ||
2150  HistoCode == "H_LFN_RuDs" || HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs" )
2151  {HistoType = "EvolProj";} // X coordinate = bin number
2152 
2153  return HistoType;
2154 }// end of GetHistoType(...)
2155 
2156 TString TEcnaParHistos::GetXVarHisto(const TString& HistoCode, const TString& SubDet, const Int_t& StexNumber)
2157 {
2158 // Type of the quantity as a function of the quantity code
2159 // Histo type <=> Variable in X coordinate
2160 
2161  TString HistoType = GetHistoType(HistoCode.Data());
2162 
2163  TString XVarHisto;
2164  Int_t MaxCar = fgMaxCar;
2165  XVarHisto.Resize(MaxCar);
2166  XVarHisto = "(no X variable info)";
2167 
2168  if( HistoType == "Global" )
2169  {
2170  if( StexNumber == 0 && SubDet == "EB" ){XVarHisto = "Tower number";}
2171  if( StexNumber == 0 && SubDet == "EE" ){XVarHisto = "SC number";}
2172  if( StexNumber != 0){XVarHisto = "Xtal number";}
2173  }
2174  if( HistoType == "Proj" ){XVarHisto = "Bin number";}
2175 
2176  if( HistoType == "H1Basic"){XVarHisto = "Sample number";}
2177  if( HistoType == "H1BasicProj"){XVarHisto = "Total noise";}
2178 
2179  if( HistoType == "SampGlobal" ){XVarHisto = "Event number";}
2180 
2181  if( HistoType == "SampProj" ){XVarHisto = "ADC count";}
2182 
2183  if( HistoType == "Evol" ){XVarHisto = "Date";}
2184 
2185  if( HistoType == "EvolProj" ){XVarHisto = "Bin number";}
2186 
2187  return XVarHisto;
2188 
2189 }// end of GetXVarHisto(...)
2190 
2191 TString TEcnaParHistos::GetYVarHisto(const TString& HistoCode, const TString& SubDet, const Int_t& StexNumber)
2192 {
2193 // Type of the quantity as a function of the quantity code
2194 // Histo type <=> Variable in Y coordinate
2195 
2196  TString HistoType = GetHistoType(HistoCode.Data());
2197 
2198  TString YVarHisto;
2199  Int_t MaxCar = fgMaxCar;
2200  YVarHisto.Resize(MaxCar);
2201  YVarHisto = "(no Y variable info)";
2202 
2203  if( HistoType == "Global" )
2204  {
2205  if( HistoCode == "D_NOE_ChNb" ){YVarHisto = "Nb of events";}
2206  if( HistoCode == "D_Ped_ChNb" ){YVarHisto = "Pedestal";}
2207  if( HistoCode == "D_TNo_ChNb" ){YVarHisto = "Total Noise";}
2208  if( HistoCode == "D_MCs_ChNb" ){YVarHisto = "Mean Cor(s,s')";}
2209  if( HistoCode == "D_LFN_ChNb" ){YVarHisto = "Low Freq. Noise";}
2210  if( HistoCode == "D_HFN_ChNb" ){YVarHisto = "High Freq. Noise";}
2211  if( HistoCode == "D_SCs_ChNb" ){YVarHisto = "Sigma Cor(s,s')";}
2212  }
2213 
2214  if( HistoType == "Proj" )
2215  {
2216  if( StexNumber == 0 && SubDet == "EB" ){YVarHisto = "Number of towers";}
2217  if( StexNumber == 0 && SubDet == "EE" ){YVarHisto = "Number of SCs";}
2218  if( StexNumber != 0){YVarHisto = "Number of Xtals";}
2219  }
2220 
2221  if( HistoType == "H1Basic"){YVarHisto = "ADC count";}
2222  if( HistoType == "H1BasicProj"){YVarHisto = "Number of samples";}
2223 
2224  if( HistoType == "SampGlobal" ){YVarHisto = "ADC count";}
2225 
2226  if( HistoType == "SampProj" ){YVarHisto = "Number of events";}
2227 
2228  if( HistoType == "EvolProj" ){YVarHisto = "Number of runs";}
2229 
2230  if( HistoType == "Evol" )
2231  {
2232  if( HistoCode == "H_Ped_Date" ){YVarHisto = "Pedestal";}
2233  if( HistoCode == "H_TNo_Date" ){YVarHisto = "Total Noise";}
2234  if( HistoCode == "H_MCs_Date" ){YVarHisto = "Mean Cor(s,s')";}
2235  if( HistoCode == "H_LFN_Date" ){YVarHisto = "Low Freq. Noise";}
2236  if( HistoCode == "H_HFN_Date" ){YVarHisto = "High Freq. Noise";}
2237  if( HistoCode == "H_SCs_Date" ){YVarHisto = "Sigma Cor(s,s')";}
2238  }
2239 
2240 // std::cout << std::endl << "*TEcnaParHistos::GetYVarHisto(...)> HistoType = " << HistoType
2241 // << ", HistoCode = " << HistoCode
2242 // << ", StexNumber = " << StexNumber
2243 // << ", YVarHisto = " << YVarHisto << std::endl;
2244 
2245  return YVarHisto;
2246 
2247 }// end of GetYVarHisto(...)
2248 
2249 TString TEcnaParHistos::GetQuantityName(const TString& chqcode)
2250 {
2251 // Name of the quantity as a function of the histo code
2252 
2253  TString chqname;
2254  Int_t MaxCar = fgMaxCar;
2255  chqname.Resize(MaxCar);
2256  chqname = "(no quantity name info)";
2257 
2258  if(chqcode == "D_NOE_ChNb"){chqname = "Number of events";}
2259  if(chqcode == "D_NOE_ChDs"){chqname = "Nb of events";}
2260  if(chqcode == "D_Ped_ChNb"){chqname = "Pedestal";}
2261  if(chqcode == "D_Ped_ChDs"){chqname = "Pedestal";}
2262  if(chqcode == "D_TNo_ChNb"){chqname = "Total Noise";}
2263  if(chqcode == "D_TNo_ChDs"){chqname = "Total Noise";}
2264  if(chqcode == "D_MCs_ChNb"){chqname = "Mean Cor(s,s')";}
2265  if(chqcode == "D_MCs_ChDs"){chqname = "Mean Cor(s,s')";}
2266  if(chqcode == "D_LFN_ChNb"){chqname = "Low Freq. Noise";}
2267  if(chqcode == "D_LFN_ChDs"){chqname = "Low Freq. Noise";}
2268  if(chqcode == "D_HFN_ChNb"){chqname = "High Freq. Noise";}
2269  if(chqcode == "D_HFN_ChDs"){chqname = "High Freq. Noise";}
2270  if(chqcode == "D_SCs_ChNb"){chqname = "Sigma Cor(s,s')";}
2271  if(chqcode == "D_SCs_ChDs"){chqname = "Sigma Cor(s,s')";}
2272  if(chqcode == "D_MSp_SpNb"){chqname = "Sample means";}
2273  if(chqcode == "D_MSp_SpDs"){chqname = "Sample means";}
2274  if(chqcode == "D_SSp_SpNb"){chqname = "Sample sigmas";}
2275  if(chqcode == "D_SSp_SpDs"){chqname = "Sample sigmas";}
2276  if(chqcode == "D_Adc_EvNb"){chqname = "Sample ADC";}
2277  if(chqcode == "D_Adc_EvDs"){chqname = "Sample ADC distribution";}
2278  if(chqcode == "H_Ped_Date"){chqname = "Pedestal";}
2279  if(chqcode == "H_TNo_Date"){chqname = "Total Noise";}
2280  if(chqcode == "H_MCs_Date"){chqname = "Mean Cor(s,s')";}
2281  if(chqcode == "H_LFN_Date"){chqname = "Low Freq. Noise";}
2282  if(chqcode == "H_HFN_Date"){chqname = "High Freq. Noise";}
2283  if(chqcode == "H_SCs_Date"){chqname = "Sigma Cor(s,s')";}
2284  if(chqcode == "H_Ped_RuDs"){chqname = "Pedestal";}
2285  if(chqcode == "H_TNo_RuDs"){chqname = "Total Noise";}
2286  if(chqcode == "H_MCs_RuDs"){chqname = "Mean Cor(s,s')";}
2287  if(chqcode == "H_LFN_RuDs"){chqname = "Low Freq. Noise";}
2288  if(chqcode == "H_HFN_RuDs"){chqname = "High Freq. Noise";}
2289  if(chqcode == "H_SCs_RuDs"){chqname = "Sigma Cor(s,s')";}
2290  return chqname;
2291 }
2292 
2293 Double_t TEcnaParHistos::GetYminDefaultValue(const TString& chqcode)
2294 {
2295  Double_t vmin = (Double_t)0.;
2296 
2297  if(chqcode == "H2LFccMosMatrix"){vmin = (Double_t)-1.;}
2298  if(chqcode == "H2HFccMosMatrix"){vmin = (Double_t)-1.;}
2299  if(chqcode == "H2CorccInStins" ){vmin = (Double_t)-1.;}
2300 
2301  if(chqcode == "D_NOE_ChNb"){vmin = (Double_t)0.;}
2302  if(chqcode == "D_Ped_ChNb"){vmin = (Double_t)0.;}
2303  if(chqcode == "D_TNo_ChNb"){vmin = (Double_t)0.;}
2304  if(chqcode == "D_MCs_ChNb"){vmin = (Double_t)-1.;}
2305  if(chqcode == "D_LFN_ChNb"){vmin = (Double_t)0.;}
2306  if(chqcode == "D_HFN_ChNb"){vmin = (Double_t)0.;}
2307  if(chqcode == "D_SCs_ChNb"){vmin = (Double_t)-1.;}
2308 
2309  if(chqcode == "D_NOE_ChDs"){vmin = (Double_t)0.1;}
2310  if(chqcode == "D_Ped_ChDs"){vmin = (Double_t)0.1;}
2311  if(chqcode == "D_TNo_ChDs"){vmin = (Double_t)0.1;}
2312  if(chqcode == "D_MCs_ChDs"){vmin = (Double_t)0.1;}
2313  if(chqcode == "D_LFN_ChDs"){vmin = (Double_t)0.1;}
2314  if(chqcode == "D_HFN_ChDs"){vmin = (Double_t)0.1;}
2315  if(chqcode == "D_SCs_ChDs"){vmin = (Double_t)0.1;}
2316 
2317  if(chqcode == "D_MSp_SpNb"){vmin = (Double_t)0.;}
2318  if(chqcode == "D_MSp_SpDs"){vmin = (Double_t)0.1;}
2319  if(chqcode == "D_SSp_SpNb"){vmin = (Double_t)0.;}
2320  if(chqcode == "D_SSp_SpDs"){vmin = (Double_t)0.1;}
2321 
2322  if(chqcode == "D_Adc_EvNb"){vmin = (Double_t)0.;}
2323  if(chqcode == "D_Adc_EvDs"){vmin = (Double_t)0.1;}
2324 
2325  if(chqcode == "H_Ped_Date"){vmin = (Double_t)0.;}
2326  if(chqcode == "H_TNo_Date"){vmin = (Double_t)0.;}
2327  if(chqcode == "H_MCs_Date"){vmin = (Double_t)-1.;}
2328  if(chqcode == "H_LFN_Date"){vmin = (Double_t)0.;}
2329  if(chqcode == "H_HFN_Date"){vmin = (Double_t)0.;}
2330  if(chqcode == "H_SCs_Date"){vmin = (Double_t)0.;}
2331 
2332  if(chqcode == "H_Ped_RuDs"){vmin = (Double_t)0.1;}
2333  if(chqcode == "H_TNo_RuDs"){vmin = (Double_t)0.1;}
2334  if(chqcode == "H_MCs_RuDs"){vmin = (Double_t)0.1;}
2335  if(chqcode == "H_LFN_RuDs"){vmin = (Double_t)0.1;}
2336  if(chqcode == "H_HFN_RuDs"){vmin = (Double_t)0.1;}
2337  if(chqcode == "H_SCs_RuDs"){vmin = (Double_t)0.1;}
2338 
2339  return vmin;
2340 }
2341 
2342 Double_t TEcnaParHistos::GetYmaxDefaultValue(const TString& chqcode)
2343 {
2344  Double_t vmax = (Double_t)0.;
2345 
2346  if( fFlagSubDet == "EB" )
2347  {
2348  if(chqcode == "H2LFccMosMatrix" ){vmax = (Double_t)1.;}
2349  if(chqcode == "H2HFccMosMatrix" ){vmax = (Double_t)1.;}
2350  if(chqcode == "H2CorccInStins" ){vmax = (Double_t)1.;}
2351 
2352  if(chqcode == "D_NOE_ChNb"){vmax = (Double_t)500.;}
2353  if(chqcode == "D_Ped_ChNb"){vmax = (Double_t)500.;}
2354  if(chqcode == "D_TNo_ChNb"){vmax = (Double_t)2.5;}
2355  if(chqcode == "D_LFN_ChNb"){vmax = (Double_t)2.5;}
2356  if(chqcode == "D_HFN_ChNb"){vmax = (Double_t)2.5;}
2357  if(chqcode == "D_MCs_ChNb"){vmax = (Double_t)1.;}
2358  if(chqcode == "D_SCs_ChNb"){vmax = (Double_t)1.5;}
2359 
2360  if(chqcode == "D_NOE_ChDs"){vmax = (Double_t)5000.;}
2361  if(chqcode == "D_Ped_ChDs"){vmax = (Double_t)5000.;}
2362  if(chqcode == "D_TNo_ChDs"){vmax = (Double_t)5000.;}
2363  if(chqcode == "D_LFN_ChDs"){vmax = (Double_t)5000.;}
2364  if(chqcode == "D_HFN_ChDs"){vmax = (Double_t)5000.;}
2365  if(chqcode == "D_MCs_ChDs"){vmax = (Double_t)5000.;}
2366  if(chqcode == "D_SCs_ChDs"){vmax = (Double_t)5000.;}
2367 
2368  if(chqcode == "D_MSp_SpNb"){vmax = (Double_t)500.;}
2369  if(chqcode == "D_MSp_SpDs"){vmax = (Double_t)10.;}
2370  if(chqcode == "D_SSp_SpNb"){vmax = (Double_t)5.;}
2371  if(chqcode == "D_SSp_SpDs"){vmax = (Double_t)10.;}
2372 
2373  if(chqcode == "D_Adc_EvNb"){vmax = (Double_t)500.;}
2374  if(chqcode == "D_Adc_EvDs"){vmax = (Double_t)150.;}
2375 
2376  if(chqcode == "H_Ped_Date"){vmax = (Double_t)500.;}
2377  if(chqcode == "H_TNo_Date"){vmax = (Double_t)5.;}
2378  if(chqcode == "H_LFN_Date"){vmax = (Double_t)5.;}
2379  if(chqcode == "H_HFN_Date"){vmax = (Double_t)5.;}
2380  if(chqcode == "H_MCs_Date"){vmax = (Double_t)1.;}
2381  if(chqcode == "H_SCs_Date"){vmax = (Double_t)0.5;}
2382 
2383  if(chqcode == "H_Ped_RuDs"){vmax = (Double_t)1000.;}
2384  if(chqcode == "H_TNo_RuDs"){vmax = (Double_t)1000.;}
2385  if(chqcode == "H_LFN_RuDs"){vmax = (Double_t)1000.;}
2386  if(chqcode == "H_HFN_RuDs"){vmax = (Double_t)1000.;}
2387  if(chqcode == "H_MCs_RuDs"){vmax = (Double_t)1000.;}
2388  if(chqcode == "H_SCs_RuDs"){vmax = (Double_t)1000.;}
2389  }
2390 
2391  if( fFlagSubDet == "EE" )
2392  {
2393  if(chqcode == "H2LFccMosMatrix"){vmax = (Double_t)1.;}
2394  if(chqcode == "H2HFccMosMatrix"){vmax = (Double_t)1.;}
2395  if(chqcode == "H2CorccInStins" ){vmax = (Double_t)0.05;}
2396 
2397  if(chqcode == "D_NOE_ChNb"){vmax = (Double_t)500.;}
2398  if(chqcode == "D_Ped_ChNb"){vmax = (Double_t)500.;}
2399  if(chqcode == "D_TNo_ChNb"){vmax = (Double_t)5.;}
2400  if(chqcode == "D_LFN_ChNb"){vmax = (Double_t)5.;}
2401  if(chqcode == "D_HFN_ChNb"){vmax = (Double_t)5.;}
2402  if(chqcode == "D_MCs_ChNb"){vmax = (Double_t)1.;}
2403  if(chqcode == "D_SCs_ChNb"){vmax = (Double_t)2.5;}
2404 
2405  if(chqcode == "D_NOE_ChDs"){vmax = (Double_t)1000.;}
2406  if(chqcode == "D_Ped_ChDs"){vmax = (Double_t)1000.;}
2407  if(chqcode == "D_TNo_ChDs"){vmax = (Double_t)1000.;}
2408  if(chqcode == "D_LFN_ChDs"){vmax = (Double_t)1000.;}
2409  if(chqcode == "D_HFN_ChDs"){vmax = (Double_t)1000.;}
2410  if(chqcode == "D_MCs_ChDs"){vmax = (Double_t)1000.;}
2411  if(chqcode == "D_SCs_ChDs"){vmax = (Double_t)1000.;}
2412 
2413  if(chqcode == "D_MSp_SpNb"){vmax = (Double_t)500.;}
2414  if(chqcode == "D_MSp_SpDs"){vmax = (Double_t)1000.;}
2415  if(chqcode == "D_SSp_SpNb"){vmax = (Double_t)5.;}
2416  if(chqcode == "D_SSp_SpDs"){vmax = (Double_t)100.;}
2417 
2418  if(chqcode == "D_Adc_EvNb"){vmax = (Double_t)500.;}
2419  if(chqcode == "D_Adc_EvDs"){vmax = (Double_t)1000.;}
2420 
2421  if(chqcode == "H_Ped_Date"){vmax = (Double_t)500.;}
2422  if(chqcode == "H_TNo_Date"){vmax = (Double_t)5.;}
2423  if(chqcode == "H_LFN_Date"){vmax = (Double_t)5.;}
2424  if(chqcode == "H_HFN_Date"){vmax = (Double_t)5.;}
2425  if(chqcode == "H_MCs_Date"){vmax = (Double_t)1.;}
2426  if(chqcode == "H_SCs_Date"){vmax = (Double_t)0.5;}
2427 
2428  if(chqcode == "H_Ped_RuDs"){vmax = (Double_t)1000.;}
2429  if(chqcode == "H_TNo_RuDs"){vmax = (Double_t)1000.;}
2430  if(chqcode == "H_LFN_RuDs"){vmax = (Double_t)1000.;}
2431  if(chqcode == "H_HFN_RuDs"){vmax = (Double_t)1000.;}
2432  if(chqcode == "H_MCs_RuDs"){vmax = (Double_t)1000.;}
2433  if(chqcode == "H_SCs_RuDs"){vmax = (Double_t)1000.;}
2434  }
2435  return vmax;
2436 }
2437 
2438 //---------------------------------------------------------------------------------------
2439 //
2440 // BuildStandardDetectorCode, BuildStandardPlotOption,
2441 // BuildStandard1DHistoCodeX, BuildStandard1DHistoCodeY,
2442 // BuildStandardCovOrCorCode, BuildStandardBetweenWhatCode,
2443 //
2444 //---------------------------------------------------------------------------------------
2445 //----------------------- BuildStandardDetectorCode
2446 TString TEcnaParHistos::BuildStandardDetectorCode(const TString& UserDetector)
2447 {
2448  TString StandardDetectorCode = "?";
2449 
2450  if( UserDetector == "Super-module" || UserDetector == "SuperModule" ||
2451  UserDetector == "super-module" || UserDetector == "SM" ||
2452  UserDetector == " " || UserDetector == "" ) // (default)
2453  {StandardDetectorCode = "SM";}
2454 
2455  if( UserDetector == "DEE" || UserDetector == "Dee" )
2456  {StandardDetectorCode = "Dee";}
2457 
2458  if( UserDetector == "Ecal barrel" || UserDetector == "EcalBarrel" ||
2459  UserDetector == "ecal barrel" || UserDetector == "Barrel" || UserDetector == "barrel" ||
2460  UserDetector == "EB" )
2461  {StandardDetectorCode = "EB";}
2462 
2463  if( UserDetector == "Ecal endcap" || UserDetector == "EcalEndcap" ||
2464  UserDetector == "ecal endcap" || UserDetector == "Endcap" || UserDetector == "endcap" ||
2465  UserDetector == "EE" )
2466  {StandardDetectorCode = "EE";}
2467 
2468  if( StandardDetectorCode == "?" )
2469  {
2470  std::cout << "*TEcnaParHistos::BuildStandardDetectorCode(...)> UserDetector = " << UserDetector
2471  << " : code not found."
2472  << fTTBELL << std::endl;
2473 
2474  ListOfStandardCodes("DetectorCode");
2475  }
2476  return StandardDetectorCode;
2477 }
2478 
2479 //----------------------- BuildStandardPlotOption
2480 TString TEcnaParHistos::BuildStandardPlotOption(const TString& CallingMethod, const TString& UserPlotOption)
2481 {
2482  TString StandardPlotOption = "?";
2483 
2484  if( CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time" )
2485  {
2486  if( UserPlotOption == "ONLY ONE" || UserPlotOption == "only one" || UserPlotOption == "onlyone" ||
2487  UserPlotOption == "Only one" || UserPlotOption == "OnlyOne" ||
2488  UserPlotOption == "ONLYONE" || UserPlotOption == fOnlyOnePlot ||
2489  UserPlotOption == " " || UserPlotOption == "" ) // (default)
2490  {StandardPlotOption = fOnlyOnePlot;}
2491 
2492  if( UserPlotOption == "SAME" || UserPlotOption == "Same" || UserPlotOption == fSeveralPlot )
2493  {StandardPlotOption = fSeveralPlot;}
2494 
2495  if( UserPlotOption == "SAME n" || UserPlotOption == "Same n" || UserPlotOption == fSameOnePlot )
2496  {StandardPlotOption = fSameOnePlot;}
2497 
2498  if( UserPlotOption == fAllXtalsInStinPlot ) // called with 1D after call with 1DX (special case "SAME in Stin")
2499  {StandardPlotOption = fAllXtalsInStinPlot;}
2500  }
2501 
2502  if( CallingMethod == "1DX" )
2503  {
2504  if( UserPlotOption == "ALL XTALS IN TOWER" || UserPlotOption == "ALL CHANNELS IN TOWER" ||
2505  UserPlotOption == "AllXtalsInTower" || UserPlotOption == "AllChannelsInTower" ||
2506  UserPlotOption == "ALL XTALS IN TOW" || UserPlotOption == "ALL CHANNELS IN TOW" ||
2507  UserPlotOption == "AllXtalsInTow" || UserPlotOption == "AllChannelsInTow" ||
2508  UserPlotOption == "ALL XTALS IN SC" || UserPlotOption == "ALL CHANNELS IN SC" ||
2509  UserPlotOption == "AllXtalsInSC" || UserPlotOption == "AllChannelsInSC" ||
2510  UserPlotOption == "SAME IN TOWER" || UserPlotOption == "SameInTower" ||
2511  UserPlotOption == "SAME IN TOW" || UserPlotOption == "SameInTow" ||
2512  UserPlotOption == "SAME IN SC" || UserPlotOption == "SameInSC" ||
2513  UserPlotOption == "Same in tower" || UserPlotOption == "Same in tow" ||
2514  UserPlotOption == "Same in SC" || UserPlotOption == "SameInSC" ||
2515  UserPlotOption == fAllXtalsInStinPlot ||
2516  UserPlotOption == " " || UserPlotOption == "" ) // (default)
2517  {StandardPlotOption = fAllXtalsInStinPlot;}
2518  }
2519 
2520  if( CallingMethod == "2D" )
2521  {
2522  if( UserPlotOption == "COLZ" ||
2523  UserPlotOption == " " || UserPlotOption == "" ) // (default)
2524  {StandardPlotOption = "COLZ";}
2525  if( UserPlotOption == "BOX" ){StandardPlotOption = "BOX";}
2526  if( UserPlotOption == "TEXT" ){StandardPlotOption = "TEXT";}
2527  if( UserPlotOption == "CONTZ" ){StandardPlotOption = "CONTZ";}
2528  if( UserPlotOption == "LEGO2Z" ){StandardPlotOption = "LEGO2Z";}
2529  if( UserPlotOption == "SURF1Z" ){StandardPlotOption = "SURF1Z";}
2530  if( UserPlotOption == "SURF2Z" ){StandardPlotOption = "SURF2Z";}
2531  if( UserPlotOption == "SURF3Z" ){StandardPlotOption = "SURF3Z";}
2532  if( UserPlotOption == "SURF4" ){StandardPlotOption = "SURF4";}
2533  if( UserPlotOption == "ASCII" ){StandardPlotOption = "ASCII";}
2534  }
2535 
2536  //...................................................
2537  if( StandardPlotOption == "?" )
2538  {
2539  std::cout << "*TEcnaParHistos::BuildStandardPlotOption(...)> UserPlotOption = " << UserPlotOption
2540  << " : code not found."
2541  << fTTBELL << std::endl;
2542 
2543  ListOfStandardCodes("PlotOption");
2544  }
2545  return StandardPlotOption;
2546 }
2547 
2548 
2549 //----------------------- BuildStandard1DHistoCodeX
2550 TString TEcnaParHistos::BuildStandard1DHistoCodeX(const TString& CallingMethod, const TString& UserHistoCode)
2551 {
2552  //........................... user code -> standard code
2553  TString StandardHistoCode = "?";
2554  if( CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time" )
2555  {
2556  //======================================== Only X Quantity for 1D Histos
2557  if( UserHistoCode == "Tower" || UserHistoCode == "tower" || UserHistoCode == "tow" ||
2558  UserHistoCode == "Tower number" || UserHistoCode == "tower number" || UserHistoCode == "tow nb" ||
2559  UserHistoCode == "Tower#" || UserHistoCode == "tower#" || UserHistoCode == "tow#" ||
2560  UserHistoCode == "Tow#" || UserHistoCode == "Tow" )
2561  {StandardHistoCode = "Tow";}
2562 
2563  if( UserHistoCode == "Super crystal" || UserHistoCode == "SuperCrystal" || UserHistoCode == "SuperXtal" ||
2564  UserHistoCode == "Super crystal number" || UserHistoCode == "SuperCrystalNumber" ||
2565  UserHistoCode == "SuperXtalNumber" ||
2566  UserHistoCode == "Super crystal nb" || UserHistoCode == "SuperCrystal#" ||
2567  UserHistoCode == "SuperXtal#" ||
2568  UserHistoCode == "SC#" || UserHistoCode == "SC" )
2569  {StandardHistoCode = "SC";}
2570 
2571  if( UserHistoCode == "Crystal" || UserHistoCode == "crystal" || UserHistoCode == "Xtal" ||
2572  UserHistoCode == "Crystal number" || UserHistoCode == "crystal number" ||
2573  UserHistoCode == "Xtal number" ||
2574  UserHistoCode == "Crystal#" || UserHistoCode == "crystal#" || UserHistoCode == "Xtal#" ||
2575  UserHistoCode == "Xtal" )
2576  {StandardHistoCode = "Xtal";}
2577 
2578  if( StandardHistoCode == "Tow" || StandardHistoCode == "SC" || StandardHistoCode == "Xtal" )
2579  {StandardHistoCode = "XtalORStin";} // management by means of fFapStexNumber ( >0 => Xtal ; =0 => Tow .OR. SC )
2580 
2581  if( UserHistoCode == "Sample number" || UserHistoCode == "SampleNumber" ||
2582  UserHistoCode == "Sample#" || UserHistoCode == "Samp#" ||
2583  UserHistoCode == "Sample" || UserHistoCode == "sample" ||
2584  UserHistoCode == "Smp" )
2585  {StandardHistoCode = "Smp";}
2586 
2587  if( UserHistoCode == "Event" || UserHistoCode == "event" ||
2588  UserHistoCode == "Event number" || UserHistoCode == "event number" ||
2589  UserHistoCode == "EventNumber" || UserHistoCode == "Event#" ||
2590  UserHistoCode == "EvtNumber" || UserHistoCode == "Evt#" ||
2591  UserHistoCode == "Evt number" || UserHistoCode == "evt number" ||
2592  UserHistoCode == "Evt" )
2593  {StandardHistoCode = "Evt";}
2594 
2595  //======================================== X or Y Quantity for 1D Histos
2596  if( StandardHistoCode == "?" )
2597  {
2598  StandardHistoCode = BuildStandard1DHistoCodeXY(UserHistoCode);
2599  }
2600  }
2601 
2602  //---------------------------------------------
2603  if( StandardHistoCode == "?" )
2604  {
2605  std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeX(...)> UserHistoCode = " << UserHistoCode
2606  << " : code not found."
2607  << fTTBELL << std::endl;
2608 
2609  ListOfStandardCodes("1DHistoCodeX");
2610  }
2611  return StandardHistoCode;
2612 }
2613 
2614 //----------------------- BuildStandard1DHistoCodeY
2615 TString TEcnaParHistos::BuildStandard1DHistoCodeY(const TString& CallingMethod, const TString& UserHistoCode)
2616 {
2617  //........................... user code -> standard code
2618  TString StandardHistoCode = "?";
2619 
2620  if( CallingMethod == "1D" || CallingMethod == "2DS" || CallingMethod == "Time" )
2621  {
2622  //======================================== Only Y Quantity for 1D Histos
2623  if( UserHistoCode == "Number of crystals" || UserHistoCode == "NumberOfCrystals" ||
2624  UserHistoCode == "Nb of crystals" || UserHistoCode == "NbOfCrystals" ||
2625  UserHistoCode == "Number of xtals" || UserHistoCode == "NumberOfXtals" ||
2626  UserHistoCode == "Nb of xtals" || UserHistoCode == "NbOfXtals" ||
2627  UserHistoCode == "nox" || UserHistoCode == "NOX" )
2628  {StandardHistoCode = "NOX";}
2629 
2630  if( UserHistoCode == "Number of samples" || UserHistoCode == "NumberOfSamples" ||
2631  UserHistoCode == "Nb of samples" || UserHistoCode == "NbOfSamples" ||
2632  UserHistoCode == "nos" || UserHistoCode == "NOS" )
2633  {StandardHistoCode = "NOS";}
2634 
2635  if( UserHistoCode == "Number of runs" || UserHistoCode == "NumberOfRuns" ||
2636  UserHistoCode == "Nb of runs" || UserHistoCode == "NbOfRuns" ||
2637  UserHistoCode == "nor" || UserHistoCode == "NOR" )
2638  {StandardHistoCode = "NOR";}
2639 
2640  //======================================== X or Y Quantity for 1D Histos
2641  if( StandardHistoCode == "?" )
2642  {
2643  StandardHistoCode = BuildStandard1DHistoCodeXY(UserHistoCode);
2644  }
2645  }
2646  //---------------------------------------------
2647  if( StandardHistoCode == "?" )
2648  {
2649  std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeY(...)> UserHistoCode = " << UserHistoCode
2650  << " : code not found."
2651  << fTTBELL << std::endl;
2652 
2653  ListOfStandardCodes("1DHistoCodeY");
2654  }
2655  return StandardHistoCode;
2656 }
2657 
2658 //----------------------- BuildStandard1DHistoCodeXY
2659 TString TEcnaParHistos::BuildStandard1DHistoCodeXY(const TString& UserHistoCode)
2660 {
2661  //........................... user code -> standard code
2662  TString StandardHistoCode = "?";
2663 
2664  //======================================== X or Y Quantity for 1D Histos
2665  if( UserHistoCode == "Number of events" || UserHistoCode == "Nb of evts" ||
2666  UserHistoCode == "NumberbOfEvents" || UserHistoCode == "NbOfEvts" ||
2667  UserHistoCode == "number of events" ||
2668  UserHistoCode == "noe" || UserHistoCode == "NOE" ||
2669  UserHistoCode == " " || UserHistoCode == "" ) // (default)
2670  {StandardHistoCode = "NOE";}
2671 
2672  if( UserHistoCode == "Pedestals" || UserHistoCode == "Pedestal" ||
2673  UserHistoCode == "pedestals" || UserHistoCode == "pedestal" ||
2674  UserHistoCode == "ped" || UserHistoCode == "Ped" )
2675  {StandardHistoCode = "Ped";}
2676 
2677  if( UserHistoCode == "Total noise" || UserHistoCode == "TotalNoise" ||
2678  UserHistoCode == "total noise" || UserHistoCode == "TN" ||
2679  UserHistoCode == "tn" || UserHistoCode == "TNo" )
2680  {StandardHistoCode = "TNo";}
2681 
2682  if( UserHistoCode == "Low frequency noise" || UserHistoCode == "LowFrequencyNoise" ||
2683  UserHistoCode == "LF noise" || UserHistoCode == "LFNoise" ||
2684  UserHistoCode == "low frequency noise" || UserHistoCode == "lfn" ||
2685  UserHistoCode == "LFN")
2686  {StandardHistoCode = "LFN";}
2687 
2688  if( UserHistoCode == "High frequency noise" || UserHistoCode == "HighFrequencyNoise" ||
2689  UserHistoCode == "HF noise" || UserHistoCode == "HFNoise" ||
2690  UserHistoCode == "high frequency noise" ||
2691  UserHistoCode == "hfn" || UserHistoCode == "HFN")
2692  {StandardHistoCode = "HFN";}
2693 
2694  if( UserHistoCode == "Mean correlations between samples" ||
2695  UserHistoCode == "MeanCorrelationsBetweenSamples" ||
2696  UserHistoCode == "Correlations between samples" ||
2697  UserHistoCode == "CorrelationsBetweenSamples" ||
2698  UserHistoCode == "Mean corss" || UserHistoCode == "MeanCorss" ||
2699  UserHistoCode == "Corss" || UserHistoCode == "corss" ||
2700  UserHistoCode == "Css" || UserHistoCode == "css" ||
2701  UserHistoCode == "mean correlations between samples" ||
2702  UserHistoCode == "mcs" || UserHistoCode == "MCs" )
2703  {StandardHistoCode = "MCs";}
2704 
2705  if( UserHistoCode == "Sigma of correlations between samples" ||
2706  UserHistoCode == "SigmaOfCorrelationsBetweenSamples" ||
2707  UserHistoCode == "Sigma corss" || UserHistoCode == "SigmaCorss" ||
2708  UserHistoCode == "SigCorss" || UserHistoCode == "sigcorss" ||
2709  UserHistoCode == "SCss" || UserHistoCode == "scss" ||
2710  UserHistoCode == "sigma of correlations between samples" ||
2711  UserHistoCode == "scs" || UserHistoCode == "SCs")
2712  {StandardHistoCode = "SCs";}
2713 
2714  if( UserHistoCode == "Sample mean" || UserHistoCode == "SampleMean" ||
2715  UserHistoCode == "Sample average" || UserHistoCode == "SampleAverage" ||
2716  UserHistoCode == "SampMean" || UserHistoCode == "SampAverage" ||
2717  UserHistoCode == "MSp" )
2718  {StandardHistoCode = "MSp";}
2719 
2720  if( UserHistoCode == "Sample sigma" || UserHistoCode == "SampleSigma" ||
2721  UserHistoCode == "Sigma of samples" || UserHistoCode == "SigmaOfSamples" ||
2722  UserHistoCode == "SampSigma" ||
2723  UserHistoCode == "SSp" )
2724  {StandardHistoCode = "SSp";}
2725 
2726  if( UserHistoCode == "date" || UserHistoCode == "Date" || UserHistoCode == "time" ||
2727  UserHistoCode == "Time" )
2728  {StandardHistoCode = "Time";}
2729 
2730  if( UserHistoCode == "ADC value" || UserHistoCode == "ADCValue" ||
2731  UserHistoCode == "Adc value" || UserHistoCode == "AdcValue" ||
2732  UserHistoCode == "Sample ADC" || UserHistoCode == "SampleAdc" ||
2733  UserHistoCode == "ADC" || UserHistoCode == "Adc" )
2734  {StandardHistoCode = "Adc";}
2735 
2736  //---------------------------------------------
2737  if( StandardHistoCode == "?" )
2738  {
2739  std::cout << "*TEcnaParHistos::BuildStandard1DHistoCodeXY(...)> UserHistoCode = " << UserHistoCode
2740  << " : code not found."
2741  << fTTBELL << std::endl;
2742 
2743  ListOfStandardCodes("1DHistoCodeXY");
2744  }
2745  return StandardHistoCode;
2746 }
2747 
2748 //----------------------- BuildStandardCovOrCorCode
2749 TString TEcnaParHistos::BuildStandardCovOrCorCode(const TString& CallingMethod, const TString& UserHistoCode)
2750 {
2751  //........................... user code -> standard code
2752  TString StandardHistoCode = "?";
2753  if( CallingMethod == "2D" )
2754  {
2755  //======================================== Correlation or covariance (CorOrCov)
2756  if( UserHistoCode == "Correlation" || UserHistoCode == "Correlations" ||
2757  UserHistoCode == "correlation" || UserHistoCode == "correlations" ||
2758  UserHistoCode == "Correl" || UserHistoCode == "correl" ||
2759  UserHistoCode == "cor" || UserHistoCode == "Cor" ||
2760  UserHistoCode == " " || UserHistoCode == "" ) // (default)
2761  {StandardHistoCode = "Cor";}
2762 
2763  if( UserHistoCode == "Covariance" || UserHistoCode == "Covariances" ||
2764  UserHistoCode == "covariance" || UserHistoCode == "covariances" ||
2765  UserHistoCode == "Covar" || UserHistoCode == "covar" ||
2766  UserHistoCode == "cov" || UserHistoCode == "Cov" )
2767  {StandardHistoCode = "Cov";}
2768  }
2769  //---------------------------------------------
2770  if( StandardHistoCode == "?" )
2771  {
2772  std::cout << "*TEcnaParHistos::BuildStandardCovOrCorCode(...)> UserHistoCode = " << UserHistoCode
2773  << " : code not found."
2774  << fTTBELL << std::endl;
2775 
2776  ListOfStandardCodes("CovOrCorCode");
2777  }
2778  return StandardHistoCode;
2779 }
2780 
2781 //----------------------- BuildStandardBetweenWhatCode
2782 TString TEcnaParHistos::BuildStandardBetweenWhatCode(const TString& CallingMethod, const TString& UserHistoCode)
2783 {
2784  //........................... user code -> standard code
2785  TString StandardHistoCode = "?";
2786  if( CallingMethod == "2D" )
2787  {
2788  //======================================== Quantity for correlations (BetweenWhat)
2789  if( UserHistoCode == "Samples" || UserHistoCode == "Between samples" ||
2790  UserHistoCode == "samples" || UserHistoCode == "between samples" ||
2791  UserHistoCode == "BetweenSamples" ||
2792  UserHistoCode == "Samp" || UserHistoCode == "samp" ||
2793  UserHistoCode == "ss" || UserHistoCode == "Mss" )
2794  {StandardHistoCode = "Mss";}
2795 
2796  if( UserHistoCode == "LF channels" || UserHistoCode == "LF between channels" ||
2797  UserHistoCode == "LFChannels" || UserHistoCode == "LFBetweenChannels" ||
2798  UserHistoCode == "LFChan" || UserHistoCode == "lfchan" ||
2799  UserHistoCode == "LFcc" || UserHistoCode == "lfcc" || UserHistoCode == "MccLF" )
2800  {StandardHistoCode = "MccLF";}
2801 
2802  if( UserHistoCode == "HF channels" || UserHistoCode == "HF between channels" ||
2803  UserHistoCode == "HFChannels" || UserHistoCode == "HFBetweenChannels" ||
2804  UserHistoCode == "HFChan" || UserHistoCode == "hfchan" ||
2805  UserHistoCode == "HFcc" || UserHistoCode == "hfcc" || UserHistoCode == "MccHF" )
2806  {StandardHistoCode = "MccHF";}
2807 
2808  if( UserHistoCode == "LF towers" || UserHistoCode == "LF between towers" ||
2809  UserHistoCode == "LFTowers" || UserHistoCode == "LFBetweenTowers" ||
2810  UserHistoCode == "LFTow" || UserHistoCode == "lftow" ||
2811  UserHistoCode == "LFtt" || UserHistoCode == "lftt" ||
2812  UserHistoCode == "LF SCs" || UserHistoCode == "LF between SCs" ||
2813  UserHistoCode == "LFSCs" || UserHistoCode == "LFBetweenSCs" ||
2814  UserHistoCode == "LFSuperXtals" || UserHistoCode == "lfsc" ||
2815  UserHistoCode == "LFSC" || UserHistoCode == "lfsx" ||
2816  UserHistoCode == "MttLF" )
2817  {StandardHistoCode = "MttLF";}
2818 
2819  if( UserHistoCode == "HF towers" || UserHistoCode == "HF between towers" ||
2820  UserHistoCode == "HFTowers" || UserHistoCode == "HFBetweenTowers" ||
2821  UserHistoCode == "HFTow" || UserHistoCode == "hftow" ||
2822  UserHistoCode == "HFtt" || UserHistoCode == "hftt" ||
2823  UserHistoCode == "HF SCs" || UserHistoCode == "HF between SCs" ||
2824  UserHistoCode == "HFSCs" || UserHistoCode == "HFBetweenSCs" ||
2825  UserHistoCode == "HFSuperXtals" || UserHistoCode == "hfsc" ||
2826  UserHistoCode == "HFSC" || UserHistoCode == "hfsx" ||
2827  UserHistoCode == "MttHF" )
2828  {StandardHistoCode = "MttHF";}
2829  }
2830 
2831  //---------------------------------------------
2832  if( StandardHistoCode == "?" )
2833  {
2834  std::cout << "*TEcnaParHistos::BuildStandardBetweenWhatCode(...)> UserHistoCode = " << UserHistoCode
2835  << " : code not found."
2836  << fTTBELL << std::endl;
2837 
2838  ListOfStandardCodes("BetweenWhatCode");
2839  }
2840  return StandardHistoCode;
2841 }
2842 
2843 //========================== ListOfStandardCodes ==========================
2844 
2845 void TEcnaParHistos::ListOfStandardCodes(const TString& TypeOfCode)
2846 {
2847  //------ Lists of Standard codes for Plot Histos methods
2848 
2849  if(TypeOfCode == "DetectorCode")
2850  {
2851  std::cout << "*--------------------------------------- Standard detector codes:" << std::endl;
2852  std::cout << " EB (ECAL Barrel) " << std::endl;
2853  std::cout << " EE (ECAL Endcap) " << std::endl;
2854  std::cout << " SM (Barrel Super Module) " << std::endl;
2855  std::cout << " Dee (Encap Dee) " << std::endl;
2856  std::cout << " Other codes are available" << std::endl;
2857  std::cout << " See source file: TEcnaParHistos::BuildStandardDetectorCode(...)." << std::endl;
2858  std::cout << "*----------------------------------------------------------------" << std::endl;
2859  }
2860 
2861  if(TypeOfCode == "PlotOption")
2862  {
2863  std::cout << "*--------------------------------------- Standard plot options:" << std::endl;
2864  std::cout << " All ROOT DRAW options and: " << std::endl;
2865  std::cout << " (nothing) " << std::endl;
2866  std::cout << " SAME n " << std::endl;
2867  std::cout << " ASCII " << std::endl;
2868  std::cout << " Other codes are available" << std::endl;
2869  std::cout << " See source file: TEcnaParHistos::BuildStandardPlotOption(...)." << std::endl;
2870  std::cout << "*--------------------------------------------------------------" << std::endl;
2871  }
2872 
2873  if(TypeOfCode == "1DHistoCodeX")
2874  {
2875  std::cout << "*---------------------- Standard 1D histo codes for X coordinate:" << std::endl;
2876  std::cout << " Tow (SM tower) " << std::endl;
2877  std::cout << " SC (Dee super crystal) " << std::endl;
2878  std::cout << " Xtal (crystal) " << std::endl;
2879  std::cout << " Smp (Adc sample) " << std::endl;
2880  std::cout << " Evt (event) " << std::endl;
2881  std::cout << " Other codes are available" << std::endl;
2882  std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeX(...)." << std::endl;
2883  std::cout << "*----------------------------------------------------------------" << std::endl;
2884  }
2885 
2886  if(TypeOfCode == "1DHistoCodeY")
2887  {
2888  std::cout << "*---------------------- Standard 1D histo codes for Y coordinate;" << std::endl;
2889  std::cout << " NOX (number of crystals) " << std::endl;
2890  std::cout << " NOS (number of samples) " << std::endl;
2891  std::cout << " NOR (number of runs) " << std::endl;
2892  std::cout << " Other codes are available" << std::endl;
2893  std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeY(...)." << std::endl;
2894  std::cout << "*----------------------------------------------------------------" << std::endl;
2895  }
2896 
2897  if(TypeOfCode == "1DHistoCodeXY")
2898  {
2899  std::cout << "*------------------ Standard 1D histo codes for X or Y coordinate;" << std::endl;
2900  std::cout << " NOE (number of events) " << std::endl;
2901  std::cout << " Ped (pedestal) " << std::endl;
2902  std::cout << " TNo (total noise) " << std::endl;
2903  std::cout << " LFN (low frequency noise) " << std::endl;
2904  std::cout << " HFN (high frequency noise) " << std::endl;
2905  std::cout << " MCs (mean correlation between samples) " << std::endl;
2906  std::cout << " SCs (sigma of correlations between samples) " << std::endl;
2907  std::cout << " MSp (sample mean) " << std::endl;
2908  std::cout << " SSp (sample sigma) " << std::endl;
2909  std::cout << " Time (time, date) " << std::endl;
2910  std::cout << " Adc (ADC sample value) " << std::endl;
2911  std::cout << " Other codes are available" << std::endl;
2912  std::cout << " See source file: TEcnaParHistos::BuildStandard1DHistoCodeXY(...)." << std::endl;
2913  std::cout << "*-----------------------------------------------------------------" << std::endl;
2914  }
2915 
2916  if(TypeOfCode == "CovOrCorCode")
2917  {
2918  std::cout << "*-------- Standard codes for matrix type (correlation or covariance);" << std::endl;
2919  std::cout << " Cor (correlation) " << std::endl;
2920  std::cout << " cov (covariance) " << std::endl;
2921  std::cout << " Other codes are available" << std::endl;
2922  std::cout << " See source file: TEcnaParHistos::BuildStandardCovOrCorCode(...)." << std::endl;
2923  std::cout << "*--------------------------------------------------------------------" << std::endl;
2924  }
2925 
2926  if(TypeOfCode == "BetweenWhatCode")
2927  {
2928  std::cout << "*-------- Standard codes for quantities in correlation or covariance;" << std::endl;
2929  std::cout << " Mss (between samples) " << std::endl;
2930  std::cout << " MccLF (low frequency between channels) " << std::endl;
2931  std::cout << " MccHF (high frequency between channels) " << std::endl;
2932  std::cout << " MttLF (low frequency between towers [if EB] or SC [if EE]) " << std::endl;
2933  std::cout << " MttLF (high frequency between towers [if EB] or SC [if EE]) " << std::endl;
2934  std::cout << " Other codes are available" << std::endl;
2935  std::cout << " See source file: TEcnaParHistos::BuildStandardBetweenWhatCode(...)." << std::endl;
2936  std::cout << "*--------------------------------------------------------------------" << std::endl;
2937  }
2938 }
2939 
2940 //========================== GetTechHistoCode ==========================
2941 
2942 TString TEcnaParHistos::GetTechHistoCode(const TString& StandardHistoCode)
2943 {
2944  TString TechHistoCode = "?";
2945 
2946  //.................... standard code -> technical code for ViewMatrix, ViewStex, ViewStas
2947  if( StandardHistoCode == "NOE" ){TechHistoCode = "D_NOE_ChNb";}
2948  if( StandardHistoCode == "Ped" ){TechHistoCode = "D_Ped_ChNb";}
2949  if( StandardHistoCode == "TNo" ){TechHistoCode = "D_TNo_ChNb";}
2950  if( StandardHistoCode == "LFN" ){TechHistoCode = "D_LFN_ChNb";}
2951  if( StandardHistoCode == "HFN" ){TechHistoCode = "D_HFN_ChNb";}
2952  if( StandardHistoCode == "MCs" ){TechHistoCode = "D_MCs_ChNb";}
2953  if( StandardHistoCode == "SCs" ){TechHistoCode = "D_SCs_ChNb";}
2954 
2955  if( TechHistoCode == "?" )
2956  {
2957  std::cout << "*TEcnaParHistos::GetTechHistoCode(...)> StandardHistoCode = " << StandardHistoCode
2958  << " : code not found " << fTTBELL << std::endl;
2959  }
2960  return TechHistoCode;
2961 }
2962 //.......................................................................................................
2963 TString TEcnaParHistos::GetTechHistoCode(const TString& X_Quantity, const TString& Y_Quantity)
2964 {
2965  //........................... (X,Y) standard codes -> technical code
2966  TString TechHistoCode = "?";
2967 
2968  //........................... Matrix or Histo type
2969  if ( X_Quantity == "XtalORStin" && Y_Quantity == "NOE" ){TechHistoCode = "D_NOE_ChNb";}
2970  if ( X_Quantity == "XtalORStin" && Y_Quantity == "Ped" ){TechHistoCode = "D_Ped_ChNb";}
2971  if ( X_Quantity == "XtalORStin" && Y_Quantity == "TNo" ){TechHistoCode = "D_TNo_ChNb";}
2972  if ( X_Quantity == "XtalORStin" && Y_Quantity == "LFN" ){TechHistoCode = "D_LFN_ChNb";}
2973  if ( X_Quantity == "XtalORStin" && Y_Quantity == "HFN" ){TechHistoCode = "D_HFN_ChNb";}
2974  if ( X_Quantity == "XtalORStin" && Y_Quantity == "MCs" ){TechHistoCode = "D_MCs_ChNb";}
2975  if ( X_Quantity == "XtalORStin" && Y_Quantity == "SCs" ){TechHistoCode = "D_SCs_ChNb";}
2976 
2977  if ( X_Quantity == "NOE" && Y_Quantity == "NOX" ){TechHistoCode = "D_NOE_ChDs";}
2978  if ( X_Quantity == "Ped" && Y_Quantity == "NOX" ){TechHistoCode = "D_Ped_ChDs";}
2979  if ( X_Quantity == "TNo" && Y_Quantity == "NOX" ){TechHistoCode = "D_TNo_ChDs";}
2980  if ( X_Quantity == "LFN" && Y_Quantity == "NOX" ){TechHistoCode = "D_LFN_ChDs";}
2981  if ( X_Quantity == "HFN" && Y_Quantity == "NOX" ){TechHistoCode = "D_HFN_ChDs";}
2982  if ( X_Quantity == "MCs" && Y_Quantity == "NOX" ){TechHistoCode = "D_MCs_ChDs";}
2983  if ( X_Quantity == "SCs" && Y_Quantity == "NOX" ){TechHistoCode = "D_SCs_ChDs";}
2984 
2985  if ( X_Quantity == "Smp" && Y_Quantity == "MSp" ){TechHistoCode = "D_MSp_SpNb";}
2986  if ( X_Quantity == "MSp" && Y_Quantity == "NOS" ){TechHistoCode = "D_MSp_SpDs";}
2987  if ( X_Quantity == "Smp" && Y_Quantity == "SSp" ){TechHistoCode = "D_SSp_SpNb";}
2988  if ( X_Quantity == "SSp" && Y_Quantity == "NOS" ){TechHistoCode = "D_SSp_SpDs";}
2989 
2990  if ( X_Quantity == "Evt" && Y_Quantity == "Adc" ){TechHistoCode = "D_Adc_EvNb";}
2991  if ( X_Quantity == "Adc" && Y_Quantity == "NOE" ){TechHistoCode = "D_Adc_EvDs";}
2992 
2993  //................................ Histime type
2994  if( X_Quantity == "Time" && Y_Quantity == "Ped" ){TechHistoCode = "H_Ped_Date";}
2995  if( X_Quantity == "Ped" && Y_Quantity == "NOR" ){TechHistoCode = "H_Ped_RuDs";}
2996 
2997  if( X_Quantity == "Time" && Y_Quantity == "TNo" ){TechHistoCode = "H_TNo_Date";}
2998  if( X_Quantity == "TNo" && Y_Quantity == "NOR" ){TechHistoCode = "H_TNo_RuDs";}
2999 
3000  if( X_Quantity == "Time" && Y_Quantity == "LFN" ){TechHistoCode = "H_LFN_Date";}
3001  if( X_Quantity == "LFN" && Y_Quantity == "NOR" ){TechHistoCode = "H_LFN_RuDs";}
3002 
3003  if( X_Quantity == "Time" && Y_Quantity == "HFN" ){TechHistoCode = "H_HFN_Date";}
3004  if( X_Quantity == "HFN" && Y_Quantity == "NOR" ){TechHistoCode = "H_HFN_RuDs";}
3005 
3006  if( X_Quantity == "Time" && Y_Quantity == "MCs" ){TechHistoCode = "H_MCs_Date";}
3007  if( X_Quantity == "MCs" && Y_Quantity == "NOR" ){TechHistoCode = "H_MCs_RuDs";}
3008 
3009  if( X_Quantity == "Time" && Y_Quantity == "SCs" ){TechHistoCode = "H_SCs_Date";}
3010  if( X_Quantity == "SCs" && Y_Quantity == "NOR" ){TechHistoCode = "H_SCs_RuDs";}
3011 
3012  if( TechHistoCode == "?" )
3013  {
3014  std::cout << "TEcnaParHistos::GetTechHistoCode(...)> HistoCode not found. X_Quantity = " << X_Quantity
3015  << ", Y_Quantity = "<< Y_Quantity << std::endl;
3016  }
3017  return TechHistoCode;
3018 }
3019 
3025 
3026 //================== 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
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 &)
auto const T2 &decltype(t1.eta()) t2
Definition: deltaR.h:16
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 &)
double const vmax[nValueType]
Definition: ValueAxis.h:69
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()
TString GetHistoType(const TString &)
TPaveText * SetPaveTower(const Int_t &)
double const vmin[nValueType]
Definition: ValueAxis.h:65
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 &)
Definition: adjgraph.h:12
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()
tuple cout
Definition: gather_cfg.py:145
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:161