CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParHistos.cc

Go to the documentation of this file.
00001 //---------Author's Name: B.Fabbro DSM/IRFU/SPP CEA-Saclay
00002 //----------Copyright: Those valid for CEA sofware
00003 //----------Modified:17/03/2010
00004 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParHistos.h"
00005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaNumbering.h"
00006 
00007 ClassImp(TEcnaParHistos)
00008 //______________________________________________________________________________
00009 //
00010 // TEcnaParHistos.
00011 //
00012 //    Values of different parameters for plots in the framework of TEcnaHistos
00013 //    (see description of this class)
00014 //
00015 //    Examples of parameters:  ymin and ymax values for histos, title sizes,
00016 //                             margins for plots, etc...
00017 //                             
00018 //
00019 //-------------------------------------------------------------------------
00020 //
00021 //        For more details on other classes of the CNA package:
00022 //
00023 //                 https://www.cern.ch/cms-fabbro/cna
00024 //
00025 //-------------------------------------------------------------------------
00026 //
00027 
00028 //---------------------- TEcnaParHistos.cc -------------------------------
00029 //  
00030 //   Creation (first version): 19 May 2005
00031 //
00032 //   For questions or comments, please send e-mail to Bernard Fabbro:
00033 //             
00034 //   fabbro@hep.saclay.cea.fr 
00035 //
00036 //------------------------------------------------------------------------
00037 
00038   TEcnaParHistos::~TEcnaParHistos()
00039 {
00040   //destructor
00041   
00042   //if (fEcalNumbering != 0){delete  fEcalNumbering; fCdelete++;}
00043   //if (fEcal          != 0){delete  fEcal;          fCdelete++;}
00044   
00045   //cout << "[Info Management] CLASS: TEcnaParHistos.     DESTROY OBJECT: this = " << this << endl;
00046 }
00047 
00048 //===================================================================
00049 //
00050 //                   Constructors
00051 //
00052 //===================================================================
00053 TEcnaParHistos::TEcnaParHistos()
00054 {
00055 // Constructor without argument
00056 
00057   //cout << "[Info Management] CLASS: TEcnaParHistos.     CREATE OBJECT: this = " << this << endl;
00058 
00059   Init();
00060 }
00061 
00062 TEcnaParHistos::TEcnaParHistos(const TString SubDet,
00063                              const TEcnaParEcal* pEcal,
00064                              const TEcnaNumbering*  pEcalNumbering)
00065 {
00066 // Constructor with argument
00067 
00068   //cout << "[Info Management] CLASS: TEcnaParHistos.     CREATE OBJECT: this = " << this << endl;
00069 
00070   Init();
00071   SetEcalSubDetector(SubDet.Data(), pEcal, pEcalNumbering);
00072 }
00073 
00074 void  TEcnaParHistos::Init()
00075 {
00076   fgMaxCar = (Int_t)512;              // max number of characters in TStrings
00077 
00078   fTTBELL = '\007';
00079 
00080   //................ Init CNA Command and error numbering
00081   fCnaCommand = 0;
00082   fCnaError   = 0;
00083 
00084   //........................................................................................
00085 
00086   fMaxColorNumber     = (Int_t)4;       // number_of_colors - 1 for histos in option SAME
00087 
00088   fMarginAutoMinMax   = (Double_t)0.05; // factor for automatic margin plots:
00089                                         // plot min = min - (max-min)*fMarginAutoMinMax
00090                                         // plot max = max + (max-min)*fMarginAutoMinMax
00091 
00092   fNbOfRunsDisplayed  = (Int_t)20;      // Nb of run numbers displayed on the top of the plot
00093                                         // in stability/evolution plots, option ONLYONE
00094 
00095   fMaxNbOfRunsInLists = (Int_t)5000;    // Maximum number of runs in the ListOfRun files
00096                                         // used for the stability/evolution plots.
00097 
00098 }// end of Init()
00099 
00100 void TEcnaParHistos::SetEcalSubDetector(const TString SubDet,
00101                                        const TEcnaParEcal* pEcal,
00102                                        const TEcnaNumbering*  pEcalNumbering)
00103 {
00104  // Set Subdetector (EB or EE)
00105 
00106   fEcal = 0;
00107   if( pEcal == 0 )
00108     {fEcal = new TEcnaParEcal(SubDet.Data());     /*fCnew++*/ ;}
00109   else
00110     {fEcal = (TEcnaParEcal*)pEcal;}
00111 
00112   Int_t MaxCar = fgMaxCar;
00113   fFlagSubDet.Resize(MaxCar);
00114   fFlagSubDet = fEcal->GetEcalSubDetector();
00115 
00116   fEcalNumbering = 0;
00117   if( pEcalNumbering == 0 )
00118     {fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal);     /*fCnew++*/ ;}
00119   else
00120     {fEcalNumbering = (TEcnaNumbering*)pEcalNumbering;}
00121 }
00122 
00123 Int_t TEcnaParHistos::MaxNbOfRunsInLists(){return fMaxNbOfRunsInLists;}
00124 
00125 //===========================================================================
00126 //
00127 //    SetCanvasWidth, SetCanvasHeight,
00128 //    CanvasFormatW, CanvasFormatH,
00129 //
00130 //===========================================================================
00131 // *  1 H1NbOfEvtsGlobal     D_NOE_ChNb    NOE = Number Of Events
00132 // *  2 H1NbOfEvtsProj       D_NOE_ChDs    
00133 // *  3 H1EvEvGlobal         D_Ped_ChNb    Ped = Pedestal
00134 // *  4 H1EvEvProj           D_Ped_ChDs
00135 // *  5 H1EvSigGlobal        D_TNo_ChNb    TNo = Total Noise
00136 // *  6 H1EvSigProj          D_TNo_ChDs
00137 // *  7 H1SigEvGlobal        D_LFN_ChNb    LFN = Low Frequency noise
00138 // *  8 H1SigEvProj          D_LFN_ChDs
00139 // *  9 H1SigSigGlobal       D_HFN_ChNb    HFN = High Frequency noise
00140 // * 10 H1SigSigProj         D_HFN_ChDs
00141 // * 11 H1EvCorssGlobal      D_MCs_ChNb    MCs = Mean of the correlations between samples
00142 // * 12 H1EvCorssProj        D_MCs_ChDs
00143 // * 13 H1SigCorssGlobal     D_SCs_ChNb    Scs = Sigma of the correlations between samples
00144 // * 14 H1SigCorssProj       D_SCs_ChDs
00145 // * 15 Ev                   D_MSp_Samp    MSp = Mean of the samples
00146 // * 16 Sigma                D_SSp_Samp    SSp = Sigma of the samples
00147 // * 17 SampTime             D_Adc_EvNb    Adc = ADC count as a function of Event number
00148 // * 18 AdcProj              D_Adc_EvDs    EvDs = Event distribution
00149 // * 19 EvolEvEv             H_Ped_Date    Date = date in format YYMMJJ hhmmss
00150 // * 20 EvolEvEvProj         H_Ped_RuDs    RuDs = Run distribution
00151 // * 21 EvolEvSig            H_TNo_Date
00152 // * 22 EvolEvSigProj        H_TNo_RuDs   
00153 // * 23 EvolSigEv            H_LFN_Date 
00154 // * 24 EvolSigEvProj        H_LFN_RuDs 
00155 // * 25 EvolSigSig           H_HFN_Date 
00156 // * 26 EvolSigSigProj       H_HFN_RuDs 
00157 // * 27 EvolEvCorss          H_MCs_Date   
00158 // * 28 EvolEvCorssProj      H_MCs_RuDs   
00159 // * 29 EvolSigCorss         H_SCs_Date   
00160 // * 30 EvolSigCorssProj     H_SCs_RuDs   
00161 
00162 UInt_t TEcnaParHistos::SetCanvasWidth(const TString HistoCode, const TString opt_plot)
00163 {
00164 //........................................ Taille/format canvas
00165   
00166   UInt_t canv_w = CanvasFormatW("petit");
00167 
00168   if( HistoCode == "D_Adc_EvNb" || HistoCode == "D_NOE_ChNb" ||
00169       HistoCode == "D_Ped_ChNb" || HistoCode == "D_LFN_ChNb" ||
00170       HistoCode == "D_TNo_ChNb" || HistoCode == "D_HFN_ChNb" ||
00171       HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" ||
00172       HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" ||
00173       HistoCode == "H_MCs_Date" || HistoCode == "H_LFN_Date" ||
00174       HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" ||
00175       (HistoCode == "D_MSp_Samp" && opt_plot != "ONLYONE")   || 
00176       (HistoCode == "D_SSp_Samp" && opt_plot != "ONLYONE") )
00177     {        
00178       canv_w = CanvasFormatH("moyen");    // format 29.7*21 ( = 21*29.7 en paysage)
00179     }
00180   
00181   if( (HistoCode == "D_Adc_EvDs" || HistoCode == "D_NOE_ChDs" ||
00182        HistoCode == "D_Ped_ChDs" || HistoCode == "D_LFN_ChDs" ||
00183        HistoCode == "D_TNo_ChDs" || HistoCode == "D_HFN_ChDs" ||
00184        HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" ||
00185        HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" ||
00186        HistoCode == "H_MCs_RuDs" || HistoCode == "H_LFN_RuDs" ||
00187        HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs") && opt_plot != "ONLYONE" )
00188     {        
00189       canv_w = CanvasFormatH("moyen");    // format 29.7*21 ( = 21*29.7 en paysage)
00190     }
00191 
00192   return canv_w;
00193 }
00194 
00195 UInt_t TEcnaParHistos::SetCanvasHeight(const TString HistoCode, const TString opt_plot)
00196 {
00197 //........................................ Taille/format canvas
00198   
00199   UInt_t canv_h = CanvasFormatH("petit");
00200 
00201   if( HistoCode == "D_Adc_EvNb" || HistoCode == "D_NOE_ChNb" ||
00202       HistoCode == "D_Ped_ChNb" || HistoCode == "D_LFN_ChNb" ||
00203       HistoCode == "D_TNo_ChNb" || HistoCode == "D_HFN_ChNb" ||
00204       HistoCode == "D_MCs_ChNb" || HistoCode == "D_SCs_ChNb" ||
00205       HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" ||
00206       HistoCode == "H_MCs_Date" || HistoCode == "H_LFN_Date" ||
00207       HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" ||
00208       (HistoCode == "D_MSp_Samp" && opt_plot != "ONLYONE")   ||
00209       (HistoCode == "D_SSp_Samp" && opt_plot != "ONLYONE") )
00210     {
00211       canv_h = CanvasFormatW("moyen");    // format 29.7*21 ( = 21*29.7 en paysage)
00212     }
00213 
00214   if( (HistoCode == "D_Adc_EvDs" || HistoCode == "D_NOE_ChDs" ||
00215        HistoCode == "D_Ped_ChDs" || HistoCode == "D_LFN_ChDs" ||
00216        HistoCode == "D_TNo_ChDs" || HistoCode == "D_HFN_ChDs" ||
00217        HistoCode == "D_MCs_ChDs" || HistoCode == "D_SCs_ChDs" ||
00218        HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" ||
00219        HistoCode == "H_MCs_RuDs" || HistoCode == "H_LFN_RuDs" ||
00220        HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs") && opt_plot != "ONLYONE" )
00221     {        
00222       canv_h = CanvasFormatW("moyen");    // format 29.7*21 ( = 21*29.7 en paysage)
00223     }
00224 
00225   return canv_h;
00226 }
00227 
00228 UInt_t TEcnaParHistos::CanvasFormatW(const TString chformat)
00229 {
00230 //Set Canvas width
00231 
00232   UInt_t canv_w = 375;         // default = "petit"
00233 
00234   if ( chformat == "petit"    ){canv_w = 375;} // 21x29.7 portrait
00235   if ( chformat == "moyen"    ){canv_w = 450;} // 21x29.7 portrait
00236   if ( chformat == "grand"    ){canv_w = 572;} // 21x29.7 portrait
00237 
00238   if ( chformat == "etaphiSM" ){canv_w = 760;} // landscape etroit en hauteur pour plot SM
00239   if ( chformat == "phietaEB" ){canv_w = 636;} // landscape pour plot EB (32 SMs)
00240 
00241   if ( chformat == "IXIYDee"  ){canv_w = 320;} // portrait etroit en largeur pour plot Dee
00242   if ( chformat == "IYIXEE"   ){canv_w = 636;} // landscape pour plot EE (4 dees)
00243   return canv_w;
00244 }
00245 //......................................................................
00246 UInt_t TEcnaParHistos::CanvasFormatH(const TString chformat)
00247 {
00248 //Set Canvas height
00249 
00250   UInt_t canv_h = 530;         // default = "petit"
00251 
00252   if ( chformat == "petit"    ){canv_h = 530;} // 21x29.7 portrait
00253   if ( chformat == "moyen"    ){canv_h = 636;} // 21x29.7 portrait
00254   if ( chformat == "grand"    ){canv_h = 810;} // 21x29.7 portrait
00255 
00256   if ( chformat == "etaphiSM" ){canv_h = 306;} // landscape etroit en hauteur pour plot SM
00257   if ( chformat == "phietaEB" ){canv_h = 450;} // landscape pour plot EB (32 SMs)
00258 
00259   if ( chformat == "IXIYDee"  ){canv_h = 720;} // portrait etroit en largeur pour plot Dee
00260   if ( chformat == "IYIXEE"   ){canv_h = 450;} // landscape pour plot EE (4 dees)
00261   return canv_h;
00262 }
00263 
00264 //===========================================================================
00265 //
00266 //          BoxLeftX, BoxRightX, BoxBottomY, BoxTopY
00267 //
00268 //===========================================================================
00269 Double_t TEcnaParHistos::BoxLeftX(const TString chtype)
00270 {
00271 //Set the x left coordinate of the box
00272 
00273   Double_t value = 0.4;
00274 
00275   if ( chtype == "general_comment"      ) {value = 0.015;}
00276 
00277   if ( chtype == "top_left_box_SM"      ) {value = 0.015;}
00278   if ( chtype == "top_left_box_EB"      ) {value = 0.015;}
00279   if ( chtype == "top_mid_box_EB"       ) {value = 0.350;}
00280   if ( chtype == "top_right_box_EB"     ) {value = 0.630;}
00281 
00282   if ( chtype == "top_left_box_Dee"     ) {value = 0.015;}
00283   if ( chtype == "top_left_box_EE"      ) {value = 0.015;}
00284   if ( chtype == "top_mid_box_EE"       ) {value = 0.240;}
00285   if ( chtype == "top_right_box_EE"     ) {value = 0.610;}
00286 
00287   if ( chtype == "bottom_left_box"      ) {value = 0.015;}
00288   if ( chtype == "bottom_left_box_evol" ) {value = 0.015;}
00289   if ( chtype == "bottom_mid_box"       ) {value = 0.250;}
00290   if ( chtype == "bottom_right_box"     ) {value = 0.455;}
00291   if ( chtype == "bottom_right_box_evol") {value = 0.620;}
00292   if ( chtype == "bottom_right_box_evpr") {value = 0.580;}
00293 
00294   if ( chtype == "several_plots_box"    ) {value = 0.015;}
00295   if ( chtype == "several_evol_box"     ) {value = 0.015;}
00296   if ( chtype == "several_evpr_box"     ) {value = 0.015;}
00297 
00298  return value;
00299 }
00300 //.................................................................
00301 Double_t TEcnaParHistos::BoxRightX(const TString chtype)
00302 {
00303 //Set the x right coordinate of the box
00304   
00305   Double_t value = 0.6;
00306   
00307   if ( chtype == "general_comment"      ) {value = 0.680;}
00308 
00309   if ( chtype == "top_left_box_SM"      ) {value = 0.125;}
00310   if ( chtype == "top_left_box_EB"      ) {value = 0.349;}
00311   if ( chtype == "top_mid_box_EB"       ) {value = 0.629;}
00312   if ( chtype == "top_right_box_EB"     ) {value = 0.985;}
00313 
00314   if ( chtype == "top_left_box_Dee"     ) {value = 0.425;}
00315   if ( chtype == "top_left_box_EE"      ) {value = 0.260;}
00316   if ( chtype == "top_mid_box_EE"       ) {value = 0.609;}
00317   if ( chtype == "top_right_box_EE"     ) {value = 0.985;}
00318 
00319   if ( chtype == "bottom_left_box"      ) {value = 0.445;}
00320   if ( chtype == "bottom_left_box_evol" ) {value = 0.450;} // ex 370
00321   if ( chtype == "bottom_mid_box"       ) {value = 0.750;}
00322   if ( chtype == "bottom_right_box"     ) {value = 0.985;}
00323   if ( chtype == "bottom_right_box_evol") {value = 0.985;}
00324   if ( chtype == "bottom_right_box_evpr") {value = 0.985;}
00325 
00326   if ( chtype == "several_plots_box"    ) {value = 0.985;}
00327   if ( chtype == "several_evol_box"     ) {value = 0.615;}
00328   if ( chtype == "several_evpr_box"     ) {value = 0.615;}
00329   
00330  return value;
00331 }
00332 //.................................................................
00333 Double_t TEcnaParHistos::BoxBottomY(const TString chtype)
00334 {
00335 //Set the y bottom coordinate of the box
00336 
00337   Double_t value = 0.8;
00338   
00339   if ( chtype == "general_comment"      ) {value = 0.960;}
00340 
00341   if ( chtype == "top_left_box_SM"      ) {value = 0.880;}
00342   if ( chtype == "top_left_box_EB"      ) {value = 0.880;}
00343   if ( chtype == "top_mid_box_EB"       ) {value = 0.880;}
00344   if ( chtype == "top_right_box_EB"     ) {value = 0.880;}
00345 
00346   if ( chtype == "top_left_box_Dee"     ) {value = 0.925;}
00347   if ( chtype == "top_left_box_EE"      ) {value = 0.880;}
00348   if ( chtype == "top_mid_box_EE"       ) {value = 0.880;}
00349   if ( chtype == "top_right_box_EE"     ) {value = 0.880;}
00350 
00351   if ( chtype == "bottom_left_box"      ) {value = 0.010;}
00352   if ( chtype == "bottom_left_box_evol" ) {value = 0.010;}
00353   if ( chtype == "bottom_right_box"     ) {value = 0.010;}
00354   if ( chtype == "bottom_right_box_evol") {value = 0.010;}
00355   if ( chtype == "bottom_right_box_evpr") {value = 0.010;}
00356   if ( chtype == "several_plots_box"    ) {value = 0.010;}
00357   if ( chtype == "several_evol_box"     ) {value = 0.010;}
00358   if ( chtype == "several_evpr_box"     ) {value = 0.010;}
00359 
00360  return value;
00361 }
00362 //.................................................................
00363 Double_t TEcnaParHistos::BoxTopY(const TString chtype)
00364 {
00365 //Set the y top coordinate of the box
00366 
00367   Double_t value = 0.9;
00368   
00369   if ( chtype == "general_comment"      ) {value = 0.999;}
00370 
00371   if ( chtype == "top_left_box_SM"      ) {value = 0.955;}
00372   if ( chtype == "top_left_box_EB"      ) {value = 0.955;}
00373   if ( chtype == "top_mid_box_EB"       ) {value = 0.955;}
00374   if ( chtype == "top_right_box_EB"     ) {value = 0.955;}
00375 
00376   if ( chtype == "top_left_box_Dee"     ) {value = 0.969;}
00377   if ( chtype == "top_left_box_EE"      ) {value = 0.955;}
00378   if ( chtype == "top_mid_box_EE"       ) {value = 0.955;}
00379   if ( chtype == "top_right_box_EE"     ) {value = 0.955;}
00380   
00381   if ( chtype == "bottom_left_box"      ) {value = 0.120;}  
00382   if ( chtype == "bottom_left_box_evol" ) {value = 0.120;}
00383   if ( chtype == "bottom_right_box"     ) {value = 0.120;}
00384   if ( chtype == "bottom_right_box_Dee" ) {value = 0.100;}
00385 
00386   if ( chtype == "bottom_right_box_evol") {value = 0.120;}
00387   if ( chtype == "bottom_right_box_evpr") {value = 0.120;}
00388   if ( chtype == "several_plots_box"    ) {value = 0.200;}
00389   if ( chtype == "several_evol_box"     ) {value = 0.200;}
00390   if ( chtype == "several_evpr_box"     ) {value = 0.200;}
00391 
00392  return value;
00393 }
00394 
00395 //===========================================================================
00396 //
00397 //       SetColorPalette, ColorTab, ColorDefinition 
00398 //
00399 //===========================================================================
00400 
00401 void TEcnaParHistos::SetColorPalette(const TString user_color_palette)
00402 {
00403   //Set color number for palette
00404 
00405   fMaxColorNumber = 4;         // default: 4 ==> Black/Red/Blue/Green/Braun
00406 
00407   if (!(user_color_palette == "Rainbow" || user_color_palette == "rainbow") ){fMaxColorNumber = 5;}
00408   if (  user_color_palette == "Rainbow" || user_color_palette == "rainbow"  ){fMaxColorNumber = 6;}
00409 }
00410 //...........................................................................
00411 Color_t TEcnaParHistos::ColorTab(const Int_t& user_color_number)
00412 {
00413   //Set color from user color number
00414 
00415   //=========> Color definition: see ROOT User's guide p.151
00416 
00417   TColor* my_color = new TColor();
00418 
00419   Color_t couleur = ColorDefinition("noir");        // default = "noir"
00420 
00421   if ( fMaxColorNumber  != 6 )
00422     {
00423       //................... Standard: 6 colors (fMaxColorNumber = 5)
00424       if(user_color_number == 0){couleur = ColorDefinition("noir");}                  //    noir        black    1
00425       if(user_color_number == 1){couleur = ColorDefinition("rouge");}                 //    rouge       red      2
00426       if(user_color_number == 2){couleur = ColorDefinition("bleu");}                  //    bleu        blue     9
00427       if(user_color_number == 3){couleur = (Color_t)my_color->GetColor("#009900");}   //    vert        green
00428       if(user_color_number == 4){couleur = ColorDefinition("marron28");}              //    marron 28   braun   28
00429       if(user_color_number == 5){couleur = (Color_t)my_color->GetColor("#9900BB");}   //    violet      purple
00430 
00431     }
00432   if ( fMaxColorNumber  == 6 )
00433     {
00434       //................... Rainbow:7  colors (fMaxColorNumber = 6)
00435       if(user_color_number == 0){couleur = (Color_t)my_color->GetColor("#EE0000");}  //   rouge
00436       if(user_color_number == 1){couleur = (Color_t)my_color->GetColor("#FF6611");}  //   orange
00437       if(user_color_number == 2){couleur = (Color_t)my_color->GetColor("#FFCC00");}  //   jaune
00438       if(user_color_number == 3){couleur = (Color_t)my_color->GetColor("#009900");}  //   vert
00439       if(user_color_number == 4){couleur = (Color_t)my_color->GetColor("#0044EE");}  //   bleu
00440       if(user_color_number == 5){couleur = (Color_t)my_color->GetColor("#6633BB");}  //   indigo
00441       if(user_color_number == 6){couleur = (Color_t)my_color->GetColor("#9900BB");}  //   violet
00442     }
00443 
00444   if( user_color_number < 0 || user_color_number > fMaxColorNumber ){couleur = 0;}
00445 
00446   return couleur;
00447 }
00448 // end of ColorTab
00449 
00450 Color_t TEcnaParHistos::ColorDefinition(const TString chcolor)
00451 {
00452   //Set color from color name
00453 
00454   //=========> Color definition: see ROOT User's guide p.151
00455 
00456   Color_t couleur = 1;        // default = "noir"
00457 
00458   if ( chcolor == "noir"       ) {couleur =  1;}
00459   if ( chcolor == "rouge"      ) {couleur =  2;}
00460   if ( chcolor == "vert_fonce" ) {couleur =  3;}
00461   if ( chcolor == "bleu_fonce" ) {couleur =  4;}
00462   if ( chcolor == "jaune"      ) {couleur =  5;}
00463   if ( chcolor == "rose"       ) {couleur =  6;}
00464   if ( chcolor == "bleu_clair" ) {couleur =  7;}
00465   if ( chcolor == "vert"       ) {couleur =  8;}
00466   if ( chcolor == "bleu"       ) {couleur =  9;}
00467   if ( chcolor == "blanc"      ) {couleur = 10;}
00468 
00469   if ( chcolor == "marron23"   ) {couleur = 23;}
00470   if ( chcolor == "marron24"   ) {couleur = 24;}
00471   if ( chcolor == "marron25"   ) {couleur = 24;}
00472   if ( chcolor == "marron27"   ) {couleur = 27;}
00473   if ( chcolor == "marron28"   ) {couleur = 28;}
00474 
00475   if ( chcolor == "bleu33"     ) {couleur = 33;}
00476   if ( chcolor == "bleu36"     ) {couleur = 36;}
00477   if ( chcolor == "bleu38"     ) {couleur = 38;}
00478   if ( chcolor == "bleu39"     ) {couleur = 39;}
00479 
00480   if ( chcolor == "orange41"   ) {couleur = 41;}
00481   if ( chcolor == "orange42"   ) {couleur = 42;}
00482 
00483   if ( chcolor == "rouge44"    ) {couleur = 44;}
00484   if ( chcolor == "rouge46"    ) {couleur = 46;}
00485   if ( chcolor == "rouge47"    ) {couleur = 47;}
00486   if ( chcolor == "rouge48"    ) {couleur = 48;}
00487   if ( chcolor == "rouge49"    ) {couleur = 49;}
00488   if ( chcolor == "rouge50"    ) {couleur = 50;}
00489 
00490   if ( chcolor == "vert31"     ) {couleur = 31;}
00491   if ( chcolor == "vert32"     ) {couleur = 32;}
00492   if ( chcolor == "vert36"     ) {couleur = 36;}
00493   if ( chcolor == "vert37"     ) {couleur = 37;}
00494 
00495   if ( chcolor == "violet"     ) {couleur = 49;}
00496 
00497   if ( chcolor == "turquoise29") {couleur = 29;}
00498 
00499   if ( chcolor == "gris12"     ) {couleur = 12;}
00500   if ( chcolor == "gris13"     ) {couleur = 13;}
00501   if ( chcolor == "gris14"     ) {couleur = 14;}
00502   if ( chcolor == "gris15"     ) {couleur = 15;}
00503   if ( chcolor == "gris16"     ) {couleur = 16;}
00504   if ( chcolor == "gris17"     ) {couleur = 17;}
00505   if ( chcolor == "gris18"     ) {couleur = 18;}
00506 
00507   return couleur;
00508 }
00509 // end of ColorDefinition
00510 
00511 //===========================================================================
00512 //       GetMaxNbOfColors, GetMarginAutoMinMax, GetNbOfRunsDisplayed
00513 //===========================================================================
00514 Int_t TEcnaParHistos::GetMaxNbOfColors(){return fMaxColorNumber;}
00515 Int_t TEcnaParHistos::GetNbOfRunsDisplayed(){return fNbOfRunsDisplayed;}
00516 Double_t TEcnaParHistos::GetMarginAutoMinMax(){return fMarginAutoMinMax;}
00517 
00518 //===========================================================================
00519 //
00520 //      SetViewHistoStyle, SetViewHistoPadMargins
00521 //
00522 //===========================================================================
00523 void TEcnaParHistos::SetViewHistoStyle(const TString HistoType)
00524 {
00525 // Set style parameters for histo view
00526 
00527   //......................... Palette
00528   gStyle->SetPalette(1,0);  // default: rainbow spectrum
00529 
00530   //............................... Date
00531   gStyle->SetOptDate(0);
00532 
00533   //............................... Histo title size
00534   gStyle->SetTitleW(0.5); gStyle->SetTitleH(0.075);     // default
00535 
00536   if( HistoType == "colz"  || HistoType == "lego"  ||
00537       HistoType == "surf"  || HistoType == "Stin" )
00538     {gStyle->SetTitleW(0.8); gStyle->SetTitleH(0.075);}
00539 
00540   if( (HistoType == "H1Basic") || (HistoType == "Evol") )
00541     {gStyle->SetTitleW(0.5); gStyle->SetTitleH(0.075);}
00542 
00543   if( HistoType == "Stex2DEB" )
00544     {gStyle->SetTitleW(0.2); gStyle->SetTitleH(0.095);}
00545 
00546   if( HistoType == "Stex2DEE" )
00547     {gStyle->SetTitleW(0.45); gStyle->SetTitleH(0.08);}
00548 
00549   if( HistoType == "Stex2DEENb" )
00550     {gStyle->SetTitleW(0.85); gStyle->SetTitleH(0.08);}
00551 
00552   if( HistoType == "Stas2DEB" || HistoType == "Stas2DEE" )
00553     {gStyle->SetTitleW(0.225); gStyle->SetTitleH(0.095);}
00554 
00555   if(HistoType == "Global" || HistoType == "Proj" || HistoType == "SampProj" || HistoType == "EvolProj")
00556     {gStyle->SetTitleW(0.5); gStyle->SetTitleH(0.08);}
00557 
00558   //............................. Statistics box style
00559      gStyle->SetOptStat(1110); 
00560 
00561   //............................. Statistics box size
00562   if( HistoType == "colz"  || HistoType == "lego"  ||
00563       HistoType == "surf"  || HistoType == "Stin" )
00564     {
00565       gStyle->SetStatW(0.55);  gStyle->SetStatH(0.2);
00566       gStyle->SetStatY(1);
00567     }
00568 
00569   if( HistoType == "Global" )
00570     {
00571       gStyle->SetStatW(0.375);  gStyle->SetStatH(0.180);
00572       gStyle->SetStatY(0.9875);
00573     }
00574   if( HistoType == "Proj" || HistoType == "SampProj" || HistoType == "EvolProj" )
00575     {
00576       gStyle->SetStatW(0.375);  gStyle->SetStatH(0.180);
00577       gStyle->SetStatY(0.9875);
00578     }
00579 
00580   if( (HistoType == "H1Basic") || (HistoType == "Evol") )
00581     {
00582       gStyle->SetStatW(0.375);   gStyle->SetStatH(0.180);
00583       gStyle->SetStatY(0.9875);
00584     }
00585 
00586   //....... Marker and line style
00587 
00588   gStyle->SetMarkerStyle(1);
00589   if( HistoType == "Global" ){gStyle->SetMarkerStyle(20);}
00590 
00591 
00592 }
00593 //------- (end of SetViewHistoStyle) ----------------
00594 
00595 void TEcnaParHistos::SetViewHistoPadMargins(const TString HistoType, const TString opt_plot)
00596 {
00597 // Set active pad margins for histo view
00598 
00599 //.......... default
00600   gStyle->SetPadBottomMargin(0.125);              
00601   gStyle->SetPadTopMargin(0.125);
00602   gStyle->SetPadLeftMargin(0.125);
00603   gStyle->SetPadRightMargin(0.125);
00604   
00605   if(HistoType == "colz"  || HistoType == "lego"  ||
00606      HistoType == "surf"  || HistoType == "Stin")  
00607     {
00608       gStyle->SetPadBottomMargin(0.125);                  
00609       gStyle->SetPadTopMargin(0.135);
00610       gStyle->SetPadLeftMargin(0.135);
00611       gStyle->SetPadRightMargin(0.135); 
00612     }
00613   
00614   if( HistoType == "Stex2DEB" )
00615     {
00616       gStyle->SetPadBottomMargin(0.145);                  
00617       gStyle->SetPadTopMargin(0.135);
00618       gStyle->SetPadLeftMargin(0.125);
00619       gStyle->SetPadRightMargin(0.125); 
00620     }
00621 
00622   if( HistoType == "Stex2DEE" || HistoType == "Stex2DEENb")
00623     {
00624       gStyle->SetPadBottomMargin(0.120);                  
00625       gStyle->SetPadTopMargin(0.110);
00626       gStyle->SetPadLeftMargin(0.130);
00627       gStyle->SetPadRightMargin(0.130); 
00628     }
00629   if( HistoType == "Stas2DEB" )
00630     {
00631       gStyle->SetPadBottomMargin(0.145);                  
00632       gStyle->SetPadTopMargin(0.135);
00633       gStyle->SetPadLeftMargin(0.125);
00634       gStyle->SetPadRightMargin(0.125); 
00635     }
00636 
00637   if( HistoType == "Stas2DEE")
00638     {
00639       gStyle->SetPadBottomMargin(0.145);                  
00640       gStyle->SetPadTopMargin(0.135);
00641       gStyle->SetPadLeftMargin(0.105);
00642       gStyle->SetPadRightMargin(0.115); 
00643     }
00644   if(HistoType == "Global")
00645     {
00646       gStyle->SetPadBottomMargin((Float_t)0.125);                 
00647       gStyle->SetPadTopMargin((Float_t)0.175);
00648       gStyle->SetPadLeftMargin((Float_t)0.115);
00649       gStyle->SetPadRightMargin((Float_t)0.05);
00650     }
00651 
00652   if(HistoType == "Proj" || HistoType == "SampProj")
00653     {
00654       gStyle->SetPadBottomMargin(0.115);
00655       gStyle->SetPadTopMargin(0.155);
00656       gStyle->SetPadLeftMargin(0.15);
00657       gStyle->SetPadRightMargin(0.05);
00658     }
00659 
00660   if( HistoType == "H1Basic" )
00661     {
00662       gStyle->SetPadBottomMargin(0.1275);                 
00663       gStyle->SetPadTopMargin(0.165);
00664       gStyle->SetPadLeftMargin(0.15);
00665       gStyle->SetPadRightMargin(0.05);
00666     }
00667 
00668   if( HistoType == "Evol" && opt_plot == "ONLYONE")
00669     {
00670       gStyle->SetPadBottomMargin(0.110);                  
00671       gStyle->SetPadTopMargin(0.2);
00672       gStyle->SetPadLeftMargin(0.115);
00673       gStyle->SetPadRightMargin(0.035);
00674     }
00675   if( HistoType == "Evol" && opt_plot == "SAME")
00676     {
00677       gStyle->SetPadBottomMargin(0.110);                  
00678       gStyle->SetPadTopMargin(0.185);
00679       gStyle->SetPadLeftMargin(0.115);
00680       gStyle->SetPadRightMargin(0.035);   
00681     }
00682   if( HistoType == "Evol" && opt_plot == "SAME n")
00683     {
00684       gStyle->SetPadBottomMargin(0.110);                  
00685       gStyle->SetPadTopMargin(0.1);
00686       gStyle->SetPadLeftMargin(0.115);
00687       gStyle->SetPadRightMargin(0.035);   
00688     }
00689 
00690   if( HistoType == "EvolProj" && opt_plot == "ONLYONE")
00691     {
00692       gStyle->SetPadBottomMargin(0.1275);                 
00693       gStyle->SetPadTopMargin(0.165);
00694       gStyle->SetPadLeftMargin(0.15);
00695       gStyle->SetPadRightMargin(0.05);
00696     }
00697   if( HistoType == "EvolProj" && opt_plot == "SAME")
00698     {
00699       gStyle->SetPadBottomMargin(0.110);                  
00700       gStyle->SetPadTopMargin(0.185);
00701       gStyle->SetPadLeftMargin(0.115);
00702       gStyle->SetPadRightMargin(0.035);   
00703     }
00704   if( HistoType == "EvolProj" && opt_plot == "SAME n")
00705     {
00706       gStyle->SetPadBottomMargin(0.110);                  
00707       gStyle->SetPadTopMargin(0.1);
00708       gStyle->SetPadLeftMargin(0.115);
00709       gStyle->SetPadRightMargin(0.035);   
00710     }
00711 }
00712 //------- (end of SetViewHistoPadMargins) ----------------
00713 
00714 //===========================================================================
00715 //
00716 //      SetViewHistoStats, SetViewHistoOffsets,
00717 //      AxisTitleOffset, AxisTitleSize, AxisLabelOffset,
00718 //      AxisLabelSize, AxisTickSize, DeeOffsetX, DeeNameOffsetX,
00719 //      SetViewGraphOffsets
00720 //      
00721 //===========================================================================
00722 void TEcnaParHistos::SetViewHistoStats(TH1D* histo, const TString HistoType)
00723 {
00724   // Set stats box for histo view
00725 
00726   Bool_t b_true  = kTRUE;
00727   Bool_t b_false = kFALSE;
00728 
00729   histo->SetStats(b_false);
00730               
00731   if(HistoType == "Global"){histo->SetStats(b_false);}
00732   if(HistoType == "Proj" || HistoType == "SampProj" ){histo->SetStats(b_true);}
00733 }
00734 
00735 void TEcnaParHistos::SetViewHistoOffsets(TH1D* histo, const TString HistoType, const TString opt_plot)
00736 {
00737 // Set offsets of labels, title axis, etc... for histo view
00738   
00739   if(HistoType == "Global")
00740     {
00741       //....................... x axis
00742       histo->GetXaxis()->SetTitleOffset((Float_t)1.05);
00743       histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00744 
00745       histo->GetXaxis()->SetLabelOffset((Float_t)0.006);
00746       histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00747 
00748       histo->GetXaxis()->SetTickLength((Float_t)0.03);
00749       histo->GetXaxis()->SetNdivisions((Int_t)510);
00750 
00751       //....................... y axis
00752       histo->GetYaxis()->SetTitleOffset((Float_t)1.5);
00753       histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00754 
00755       histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00756       histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00757 
00758       histo->GetYaxis()->SetTickLength((Float_t)0.03);
00759       histo->GetYaxis()->SetNdivisions((Int_t)510);
00760     }
00761   
00762   if(HistoType == "Proj" || HistoType == "SampGlobal" || HistoType == "SampProj" )
00763     {
00764       //....................... x axis
00765       histo->GetXaxis()->SetTitleOffset((Float_t)1.05);
00766       histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00767 
00768       histo->GetXaxis()->SetLabelOffset((Float_t)0.006);
00769       histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00770 
00771       histo->GetXaxis()->SetTickLength((Float_t)0.03);
00772       histo->GetXaxis()->SetNdivisions((Int_t)510);
00773 
00774       //....................... y axis
00775       histo->GetYaxis()->SetTitleOffset((Float_t)1.75);
00776       histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00777 
00778       histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00779       histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00780 
00781       histo->GetYaxis()->SetTickLength((Float_t)0.03);
00782       histo->GetYaxis()->SetNdivisions((Int_t)510);
00783     }
00784   
00785   if( HistoType == "H1Basic" || HistoType == "Evol" ||
00786       ( HistoType == "EvolProj" && !(opt_plot == "SAME" || opt_plot == "SAME n") ) )
00787     {
00788       //....................... x axis
00789       histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
00790       histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00791 
00792       histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
00793       histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00794 
00795       histo->GetXaxis()->SetTickLength((Float_t)0.03);
00796       histo->GetXaxis()->SetNdivisions((Int_t)510);
00797 
00798       //....................... y axis
00799       histo->GetYaxis()->SetTitleOffset((Float_t)1.75);
00800       histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00801       
00802       histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00803       histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00804       
00805       histo->GetYaxis()->SetTickLength((Float_t)0.03);
00806       histo->GetYaxis()->SetNdivisions((Int_t)510);
00807     }
00808   
00809   if( HistoType == "EvolProj" && (opt_plot == "SAME" || opt_plot == "SAME n") )
00810     {
00811       //....................... x axis
00812       histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
00813       histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00814       
00815       histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
00816       histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00817 
00818       histo->GetXaxis()->SetTickLength((Float_t)0.03);
00819       histo->GetXaxis()->SetNdivisions((Int_t)510);
00820 
00821       //....................... y axis
00822       histo->GetYaxis()->SetTitleOffset((Float_t)1.25);
00823       histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00824 
00825       histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00826       histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00827 
00828       histo->GetYaxis()->SetTickLength((Float_t)0.03);
00829       histo->GetYaxis()->SetNdivisions((Int_t)510);
00830     }
00831   
00832   if(HistoType == "colz")
00833     {
00834       //....................... x axis
00835       histo->GetXaxis()->SetTitleOffset((Float_t)1.25);
00836       histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00837 
00838       histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
00839       histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00840 
00841       histo->GetXaxis()->SetTickLength((Float_t)0.03);
00842       histo->GetXaxis()->SetNdivisions((Int_t)510);
00843 
00844       //....................... y axis
00845       histo->GetYaxis()->SetTitleOffset((Float_t)1.45);
00846       histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00847 
00848       histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00849       histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00850 
00851       histo->GetYaxis()->SetTickLength((Float_t)0.03);
00852       histo->GetYaxis()->SetNdivisions((Int_t)510);
00853     }
00854 
00855   if(HistoType == "lego" || HistoType == "surf" )
00856     {
00857       //....................... x axis
00858       histo->GetXaxis()->SetTitleOffset((Float_t)1.7);
00859       histo->GetXaxis()->SetTitleSize((Float_t)0.04);
00860 
00861       histo->GetXaxis()->SetLabelOffset((Float_t)0.005);
00862       histo->GetXaxis()->SetLabelSize((Float_t)0.04);
00863 
00864       histo->GetXaxis()->SetTickLength((Float_t)0.03);
00865       histo->GetXaxis()->SetNdivisions((Int_t)510);
00866 
00867       //....................... y axis
00868       histo->GetYaxis()->SetTitleOffset((Float_t)1.85);
00869       histo->GetYaxis()->SetTitleSize((Float_t)0.04);
00870 
00871       histo->GetYaxis()->SetLabelOffset((Float_t)0.01);
00872       histo->GetYaxis()->SetLabelSize((Float_t)0.04);
00873 
00874       histo->GetYaxis()->SetTickLength((Float_t)0.03);
00875       histo->GetYaxis()->SetNdivisions((Int_t)510);
00876     }
00877 
00878   if(HistoType == "Stin")
00879     {
00880       //.......... x axis (remove labels and ticks)
00881       histo->GetXaxis()->SetTitleOffset((Float_t)9999.);
00882       histo->GetXaxis()->SetTitleSize((Float_t)0.05); 
00883  
00884       histo->GetXaxis()->SetLabelOffset((Float_t)9999.);
00885       histo->GetXaxis()->SetLabelSize((Float_t)0.);
00886 
00887       histo->GetXaxis()->SetNdivisions((Int_t)1);
00888       histo->GetXaxis()->SetTickLength((Float_t)0.);
00889 
00890       //.......... y axis (remove labels and ticks)
00891       histo->GetYaxis()->SetTitleOffset((Float_t)9999.);
00892       histo->GetYaxis()->SetTitleSize((Float_t)0.05);
00893      
00894       histo->GetYaxis()->SetLabelOffset((Float_t)9999.);
00895       histo->GetYaxis()->SetLabelSize((Float_t)0.);
00896 
00897       histo->GetYaxis()->SetNdivisions((Int_t)1);
00898       histo->GetYaxis()->SetTickLength((Float_t)0.);
00899     }
00900 
00901   if( HistoType == "Stex2DEB" || HistoType == "Stex2DEE" || HistoType == "Stex2DEENb" ||
00902       HistoType == "Stas2DEB" || HistoType == "Stas2DEE" )
00903     {
00904       //.......... x axis (remove labels and ticks)
00905       histo->GetXaxis()->SetTitleOffset((Float_t)9999.);
00906       histo->GetXaxis()->SetTitleSize((Float_t)0.075); 
00907  
00908       histo->GetXaxis()->SetLabelOffset((Float_t)9999.);
00909       histo->GetXaxis()->SetLabelSize((Float_t)0.);
00910 
00911       histo->GetXaxis()->SetNdivisions((Int_t)1);
00912       histo->GetXaxis()->SetTickLength((Float_t)0.);
00913 
00914       //.......... y axis (remove labels and ticks)
00915       histo->GetYaxis()->SetTitleOffset((Float_t)9999.);
00916       histo->GetYaxis()->SetTitleSize((Float_t)0.075);
00917      
00918       histo->GetYaxis()->SetLabelOffset((Float_t)9999.);
00919       histo->GetYaxis()->SetLabelSize((Float_t)0.);
00920 
00921       histo->GetYaxis()->SetNdivisions((Int_t)1);
00922       histo->GetYaxis()->SetTickLength((Float_t)0.);
00923     }
00924 }
00925 
00926 //----------------------------------------------
00927 Float_t TEcnaParHistos::AxisTitleOffset()
00928 {
00929  return AxisTitleOffset("");
00930 }
00931 Float_t TEcnaParHistos::AxisTitleOffset(const TString opt)
00932 {
00933   Float_t tit_off = 1.;
00934 
00935   if( opt == ""        ){tit_off = 0.055;}
00936   if( opt == "Towx"    ){tit_off = 1.15;}
00937   if( opt == "Towy"    ){tit_off = 1.15;}
00938   if( opt == "SMx"     ){tit_off = 1.15;}
00939   if( opt == "SMy"     ){tit_off = 0.5;}
00940   if( opt == "SMyInEB" ){tit_off = 0.7;}
00941   if( opt == "EBy"     ){tit_off = 1.;}
00942   if( opt == "EBx"     ){tit_off = 1.3;}
00943 
00944   if( opt == "SCx" ){tit_off = 1.15;}
00945   if( opt == "SCy" ){tit_off = 1.15;}
00946   if( opt == "Deex"){tit_off = 0.75;}
00947   if( opt == "Deey"){tit_off = 1.2;}
00948   if( opt == "EEx" ){tit_off = 1.2;}
00949   if( opt == "EEy" ){tit_off = 1.;}
00950 
00951   return tit_off;
00952 }
00953 //............................................
00954 Float_t TEcnaParHistos::AxisTitleSize()
00955 {
00956  return AxisTitleSize("");
00957 }
00958 Float_t  TEcnaParHistos::AxisTitleSize(const TString opt)
00959 {
00960   Float_t tit_siz = 0.045;
00961   if( opt == ""  ){tit_siz = 0.045;}
00962   return tit_siz;
00963 }
00964 //............................................
00965 Float_t  TEcnaParHistos::AxisLabelOffset()
00966 {
00967  return AxisLabelOffset("");
00968 }
00969 Float_t TEcnaParHistos::AxisLabelOffset(const TString opt)
00970 {
00971   Float_t lab_off = 0.02;
00972   if( opt == ""    ){lab_off = 0.02;}
00973 
00974   if( opt == "Towx"){lab_off = 0.01;}
00975   if( opt == "Towy"){lab_off = 0.03;}
00976   if( opt == "SMx" ){lab_off = 0.01;}
00977   if( opt == "SMy" ){lab_off = 0.015;}
00978   if( opt == "EBx" ){lab_off = 0.03;}
00979   if( opt == "EBy" ){lab_off = 0.015;}
00980 
00981   if( opt == "SCx" ){lab_off = 0.01;}
00982   if( opt == "SCy" ){lab_off = 0.03;}
00983   if( opt == "Deex"){lab_off = 0.002;}
00984   if( opt == "Deey"){lab_off = 0.03;}
00985   if( opt == "EEx" ){lab_off = 0.015;}
00986   if( opt == "EEy" ){lab_off = 0.02;}
00987 
00988   return lab_off;
00989 }
00990 //............................................
00991 Float_t TEcnaParHistos::AxisLabelSize()
00992 {
00993  return AxisLabelSize("");
00994 }
00995 Float_t  TEcnaParHistos::AxisLabelSize(const TString opt)
00996 {
00997   Float_t lab_siz = 0.035;
00998   if( opt == "SMx"  ){lab_siz = 0.05;}
00999   if( opt == "SMy"  ){lab_siz = 0.05;}
01000   if( opt == "EBx"  ){lab_siz = 0.04;}
01001   if( opt == "EBy"  ){lab_siz = 0.04;}
01002   return lab_siz;
01003 }
01004 //............................................
01005 Float_t TEcnaParHistos::AxisTickSize()
01006 {
01007  return AxisTickSize("");
01008 }
01009 Float_t TEcnaParHistos::AxisTickSize(const TString opt)
01010 {
01011 //.......... works only with option "S" in TGaxis
01012   Float_t tic_siz = 0.;  
01013   if( opt == "Dee"  ){tic_siz = 0.;}
01014   if( opt == "Deex" ){tic_siz = 0.01;}
01015   if( opt == "Deey" ){tic_siz = 0.02;}
01016   if( opt == "SMx"  ){tic_siz = 0.03;}
01017   if( opt == "SMy"  ){tic_siz = 0.0075;}
01018   if( opt == "EEx"  ){tic_siz = 0.06;}
01019   if( opt == "EEy"  ){tic_siz = 0.005;}
01020 
01021   return tic_siz;
01022 }
01023 //-----------------------------------------------
01024 
01025 void TEcnaParHistos::SetViewGraphOffsets(TGraph* graph, const TString HistoType)
01026 {
01027 // Set offsets of labels, title axis, etc... for histo view
01028 
01029   if( (HistoType == "H1Basic") || (HistoType == "Evol") )
01030     {
01031       //....................... x axis
01032       graph->GetXaxis()->SetTitleOffset((Float_t)1.10);
01033       graph->GetXaxis()->SetTitleSize((Float_t)0.04);
01034 
01035       graph->GetXaxis()->SetLabelOffset((Float_t)0.015);
01036       graph->GetXaxis()->SetLabelSize((Float_t)0.04);
01037 
01038       graph->GetXaxis()->SetTickLength((Float_t)0.02);
01039       graph->GetXaxis()->SetNdivisions((Int_t)510);
01040 
01041       //....................... y axis
01042       graph->GetYaxis()->SetTitleOffset((Float_t)1.25);
01043       graph->GetYaxis()->SetTitleSize((Float_t)0.04);
01044 
01045       graph->GetYaxis()->SetLabelOffset((Float_t)0.01);
01046       graph->GetYaxis()->SetLabelSize((Float_t)0.04);
01047 
01048       graph->GetYaxis()->SetTickLength((Float_t)0.03);
01049       graph->GetYaxis()->SetNdivisions((Int_t)510);
01050     }
01051 }
01052 //-----------------------------------------------
01053 Float_t TEcnaParHistos::DeeOffsetX(const TString opt_plot, const Int_t& DeeNumber)
01054 {
01055   Float_t offset = 0;
01056   if( opt_plot == "Dee" ){offset = 0;}
01057   if( opt_plot == "EE"  )
01058     {
01059       Double_t vertic_empty_strip_1 = 1.;
01060       if( DeeNumber == 1 ){offset = vertic_empty_strip_1
01061                              + fEcal->MaxStinHocoInStex()+ 2*fEcal->MaxStinHocoInStex() + 1.;}
01062       if( DeeNumber == 2 ){offset = vertic_empty_strip_1 + 2*fEcal->MaxStinHocoInStex() + 1.;}
01063       if( DeeNumber == 3 ){offset = vertic_empty_strip_1 + fEcal->MaxStinHocoInStex();}
01064       if( DeeNumber == 4 ){offset = vertic_empty_strip_1 + 0.;}
01065     }
01066   return offset;
01067 }
01068 
01069 //-----------------------------------------------
01070 Float_t TEcnaParHistos::DeeNameOffsetX(const Int_t& DeeNumber)
01071 {
01072   Float_t offset = 0;
01073 
01074   if( DeeNumber == 1 ){offset = 6.9;}
01075   if( DeeNumber == 2 ){offset = 0.;}
01076   if( DeeNumber == 3 ){offset = 7.6;}
01077   if( DeeNumber == 4 ){offset = 0.5;}
01078   
01079   return offset;
01080 }
01081 //-----------------------------------------------
01082 Float_t TEcnaParHistos::DeeNumberOffsetX(const TString opt_plot, const Int_t& DeeNumber)
01083 {
01084   Float_t offset = 0;
01085 
01086   if( opt_plot == "Dee"  )
01087     {
01088       if( DeeNumber == 1 ){offset = 2.5;}
01089       if( DeeNumber == 2 ){offset = 41.5;}
01090       if( DeeNumber == 3 ){offset = 2.5;}
01091       if( DeeNumber == 4 ){offset = 41.5;}
01092     }
01093   if( opt_plot == "EE"  )
01094     {
01095       if( DeeNumber == 1 ){offset = 0.42;}
01096       if( DeeNumber == 2 ){offset = 8.15;}
01097       if( DeeNumber == 3 ){offset = 0.42;}
01098       if( DeeNumber == 4 ){offset = 8.15;}
01099     }
01100   return offset;
01101 }
01102 //===========================================================================
01103 //
01104 //     SetPaveGeneralComment,
01105 //     SetPaveAnalysisRun, SetPaveNbOfEvts,
01106 //     SetPaveEvolNbOfEvtsAna, SetPaveEvolRuns,
01107 //     SetOptionSamePaveBorder
01108 //
01109 //
01110 //                           W A R N I N G
01111 //
01112 //     ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
01113 //
01114 //     WARNING => Paves for plot option "SEVERAL" and "SAMEONE" are treated
01115 //                in TEcnaHistos
01116 //
01117 //     ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
01118 //
01119 //===========================================================================
01120 
01121 TPaveText* TEcnaParHistos::SetPaveGeneralComment(const TString comment)
01122 {
01123 // General comment
01124  
01125   TPaveText* title_g1;
01126  
01127   if( comment != "" )
01128     {
01129       char* f_in = new char[fgMaxCar];                           fCnew++;
01130       
01131       Double_t pav_gen_xgauche = BoxLeftX("general_comment");
01132       Double_t pav_gen_xdroite = BoxRightX("general_comment");
01133       Double_t pav_gen_ybas    = BoxBottomY("general_comment");
01134       Double_t pav_gen_yhaut   = BoxTopY("general_comment");
01135 
01136       title_g1 =
01137         new TPaveText(pav_gen_xgauche, pav_gen_ybas,
01138                       pav_gen_xdroite, pav_gen_yhaut);       fCnewRoot++;
01139 
01140       Option_t* opt_pav = "arc";  title_g1->SetOption(opt_pav);  // <= NE MARCHE PAS
01141       
01142       TString tit_gen = comment.Data();
01143       
01144       sprintf( f_in, tit_gen);
01145       title_g1->AddText(f_in);
01146 
01147       //   1 = left adjusted, 2 = vertically centered      
01148       Int_t    cTextPaveAlign   = 12;    title_g1->SetTextAlign(cTextPaveAlign);
01149       // 10*10 = 10*(ID10 = Courier New) // 10*4  = 10*(ID4  = Arial)      
01150       Int_t    cTextPaveFont    = 40;    title_g1->SetTextFont(cTextPaveFont);
01151       // 0.95 = 95% of the pave size      
01152       Float_t  cTextPaveSize    = 0.04;  title_g1->SetTextSize(cTextPaveSize);
01153       Int_t    cTextBorderSize  = 0;     title_g1->SetBorderSize(cTextBorderSize);
01154       Double_t cTextPaveRadius  = 5.;    title_g1->SetCornerRadius(cTextPaveRadius); // <= NE MARCHE PAS
01155       // Int_t cTextPaveShadCol = 0; title_g1->SetShadowColor(cTextPaveShadCol);  // <= methode non reconnue   
01156 
01157       delete [] f_in;                                                 fCdelete++;
01158     }
01159   else
01160     {
01161       title_g1 = new TPaveText( 0, 0, 0, 0);  title_g1=0;  fCnewRoot++;
01162     }
01163   return title_g1;
01164 }
01165 
01166 TPaveText* TEcnaParHistos::SetPaveAnalysisRun(const TString ana_type,  const Int_t&  nb_of_samples,
01167                                              const Int_t& run_number, const TString run_type,
01168                                              const Int_t& first_evt,  const Int_t&  last_evt, const TString nb_col)
01169 {
01170 // Analysis name + Nb of samples + run number comment
01171 
01172   char* f_in = new char[fgMaxCar];                           fCnew++;
01173   
01174   //...................... Pave Analysis name/run number (bottom_left_box)
01175   Double_t pav_bot_left_xgauche = BoxLeftX("bottom_left_box");
01176   Double_t pav_bot_left_xdroite = BoxRightX("bottom_left_box");
01177   Double_t pav_bot_left_ybas    = BoxBottomY("bottom_left_box");
01178   Double_t pav_bot_left_yhaut   = BoxTopY("bottom_left_box");
01179 
01180   TPaveText *com_bot_left =
01181     new TPaveText(pav_bot_left_xgauche, pav_bot_left_ybas,
01182                   pav_bot_left_xdroite, pav_bot_left_yhaut);  fCnewRoot++;
01183 
01184   // (1 = left adjusted, 2 = centered adjusted, 3 = left adjusted), 2 = vertically centered
01185   Int_t   cTextPaveAlign   = 12;    com_bot_left->SetTextAlign(cTextPaveAlign);
01186   // 10*10 = 10*(ID10 = Courier New) // 10*4  = 10*(ID4  = Arial)
01187   Int_t   cTextPaveFont    = 100;    com_bot_left->SetTextFont(cTextPaveFont); 
01188   // 0.95 = 95% of the pave size         
01189   Float_t cTextPaveSize    = 0.025;  com_bot_left->SetTextSize(cTextPaveSize);
01190   // Int_t   cTextPaveShadCol = 0;     com_bot_left->SetShadowColor(cTextPaveShadCol);
01191   Int_t   cTextBorderSize = 1;      com_bot_left->SetBorderSize(cTextBorderSize);
01192 
01193   if( nb_col == "TwoCol")
01194     {
01195       cTextPaveSize = 0.035; com_bot_left->SetTextSize(cTextPaveSize);
01196       sprintf(f_in, "Run:  %d                  Samples:   1 - %d", run_number, nb_of_samples);   
01197       com_bot_left->AddText(f_in);
01198       cTextPaveSize = 0.035; com_bot_left->SetTextSize(cTextPaveSize);
01199       sprintf(f_in, "Type: %-20s", run_type.Data());  
01200       com_bot_left->AddText(f_in);
01201       sprintf(f_in, "Analysis: %-10s         Evts range: %d - %d ", ana_type.Data(), first_evt, last_evt);
01202       com_bot_left->AddText(f_in);   
01203     }
01204   else
01205     {
01206       cTextPaveSize    = 0.0225;  com_bot_left->SetTextSize(cTextPaveSize);
01207       sprintf(f_in, "Run:  %d ", run_number);  
01208       com_bot_left->AddText(f_in);
01209       sprintf(f_in, "Type: %-20s", run_type.Data());  
01210       com_bot_left->AddText(f_in);
01211       sprintf(f_in, "Analysis: %-10s ", ana_type.Data());
01212       com_bot_left->AddText(f_in);
01213       Int_t un = 1; 
01214       sprintf(f_in, "Samples:    %d - %d", un, nb_of_samples);
01215       com_bot_left->AddText(f_in);
01216       sprintf(f_in, "Evts range: %d - %d", first_evt, last_evt);
01217       com_bot_left->AddText(f_in);
01218     }
01219 
01220   delete [] f_in;                                           fCdelete++;
01221   
01222   return com_bot_left;
01223 }
01224 
01225 TPaveText* TEcnaParHistos::SetPaveNbOfEvts(const Int_t& nb_of_evts,
01226                                           const TString start_date, const TString stop_date,
01227                                           const TString nb_col)
01228 {
01229 // Number of events box
01230 
01231   char* f_in = new char[fgMaxCar];                           fCnew++;
01232   
01233   //...................... Pave number of events (bottom_right_box)
01234 
01235   Double_t pav_bot_right_xgauche = BoxLeftX("bottom_right_box");
01236   Double_t pav_bot_right_xdroite = BoxRightX("bottom_right_box");
01237   Double_t pav_bot_right_ybas    = BoxBottomY("bottom_right_box");
01238   Double_t pav_bot_right_yhaut   = BoxTopY("bottom_right_box");
01239   TPaveText *com_bot_right =
01240     new TPaveText(pav_bot_right_xgauche, pav_bot_right_ybas,
01241                   pav_bot_right_xdroite, pav_bot_right_yhaut);      fCnewRoot++;
01242 
01243   // 1 = left adjusted, 2 = vertically centered
01244   Int_t   cTextPaveAlign   = 12;     com_bot_right->SetTextAlign(cTextPaveAlign);
01245   // 10*4 = 10*(ID4 = Arial)   // 10*10 = 10*(ID10 = Courier New)          
01246   Int_t   cTextPaveFont    = 100;    com_bot_right->SetTextFont(cTextPaveFont);         
01247   // 0.05 = 5% of the pave size        
01248   Float_t cTextPaveSize    = 0.025;  com_bot_right->SetTextSize(cTextPaveSize);
01249   //Int_t   cTextPaveShadCol = 0;     com_bot_right->SetShadowColor(cTextPaveShadCol);
01250   Int_t   cTextBorderSize = 1;       com_bot_right->SetBorderSize(cTextBorderSize);
01251 
01252   if( nb_col == "TwoCol")
01253     {
01254       cTextPaveSize = 0.0325; com_bot_right->SetTextSize(cTextPaveSize);
01255       sprintf(f_in, "First evt: %s              %8d events ", start_date.Data(), nb_of_evts);
01256       com_bot_right->AddText(f_in);  
01257       sprintf(f_in, "Last  evt: %s ",  stop_date.Data());
01258       com_bot_right->AddText(f_in);
01259     }
01260   else
01261     {
01262       cTextPaveSize = 0.0225; com_bot_right->SetTextSize(cTextPaveSize);
01263       sprintf(f_in, "%d events", nb_of_evts);
01264       com_bot_right->AddText(f_in);     
01265       sprintf(f_in, "First evt: %s ", start_date.Data());
01266       com_bot_right->AddText(f_in);      
01267       sprintf(f_in, "Last  evt: %s ",  stop_date.Data());
01268       com_bot_right->AddText(f_in);
01269     }
01270   
01271   delete [] f_in;                                           fCdelete++;
01272   
01273   return com_bot_right;
01274 }
01275 
01276 TPaveText* TEcnaParHistos::SetPaveEvolNbOfEvtsAna(const TString ana_type,      const Int_t& nb_of_samples,
01277                                                  const Int_t&  first_req_evt, const Int_t& last_req_evt,
01278                                                  const TString HistoType)
01279 {
01280 // Analysis name + run number comment
01281 
01282   char* f_in = new char[fgMaxCar];                           fCnew++;
01283   
01284   //...................... Pave Analysis name/run number (bottom_left_box)
01285   Double_t pav_bot_left_xgauche = BoxLeftX("bottom_left_box");
01286   Double_t pav_bot_left_xdroite = BoxRightX("bottom_left_box");
01287   Double_t pav_bot_left_ybas    = BoxBottomY("bottom_left_box");
01288   Double_t pav_bot_left_yhaut   = BoxTopY("bottom_left_box");
01289 
01290   if( HistoType == "EvolProj" )
01291     {
01292       pav_bot_left_xgauche = BoxLeftX("bottom_left_box_evol");
01293       pav_bot_left_xdroite = BoxRightX("bottom_left_box_evol");
01294       pav_bot_left_ybas    = BoxBottomY("bottom_left_box_evol");
01295       pav_bot_left_yhaut   = BoxTopY("bottom_left_box_evol");
01296     }
01297 
01298   TPaveText *com_bot_left =
01299     new TPaveText(pav_bot_left_xgauche, pav_bot_left_ybas,
01300                   pav_bot_left_xdroite, pav_bot_left_yhaut);  fCnewRoot++;
01301   
01302   // 1 = left adjusted, 2 = vertically centered
01303   Int_t   cTextPaveAlign = 12;    com_bot_left->SetTextAlign(cTextPaveAlign);
01304   // 10*10 = 10*(ID10 = Courier New)    // 10*4 = 10*(ID4 = Arial)        
01305   Int_t   cTextPaveFont  = 100;   com_bot_left->SetTextFont(cTextPaveFont);      
01306   // 0.95 = 95% of the pave size   
01307   Float_t cTextPaveSize  = 0.03;  com_bot_left->SetTextSize(cTextPaveSize);
01308   Int_t   cTextBorderSize = 1;    com_bot_left->SetBorderSize(cTextBorderSize);
01309 
01310   TString analysis_name    = ana_type.Data();
01311 
01312   sprintf(f_in, "Analysis:   %s", analysis_name.Data());
01313   com_bot_left->AddText(f_in);
01314   sprintf(f_in, "Samples:    1 - %d", nb_of_samples);
01315   com_bot_left->AddText(f_in);
01316   sprintf(f_in, "Evts range: %d - %d ", first_req_evt, last_req_evt);
01317   com_bot_left->AddText(f_in);
01318 
01319   delete [] f_in;                                           fCdelete++;
01320   
01321   return com_bot_left;
01322 }
01323 
01324 TPaveText* TEcnaParHistos::SetPaveEvolRuns(const Int_t&  start_evol_run, const TString start_evol_date,
01325                                           const Int_t&  stop_evol_run,  const TString stop_evol_date,
01326                                           const TString opt_plot,       const TString HistoType)
01327 {
01328 // First and last run of the list of runs
01329 
01330   char* f_in = new char[fgMaxCar];                           fCnew++;
01331 
01332   //...................... Pave first and last runs (bottom_right_box)
01333   Double_t pav_border_xgauche = BoxLeftX("bottom_right_box_evol");
01334   Double_t pav_border_xdroite = BoxRightX("bottom_right_box_evol");
01335   Double_t pav_border_ybas    = BoxBottomY("bottom_right_box_evol");
01336   Double_t pav_border_yhaut   = BoxTopY("bottom_right_box_evol");
01337 
01338   if( opt_plot == "SAME n" )
01339     {
01340       pav_border_xgauche = BoxLeftX("bottom_right_box_evpr");
01341       pav_border_xdroite = BoxRightX("bottom_right_box_evpr");
01342       pav_border_ybas    = BoxBottomY("top_right_box_EB");
01343       pav_border_yhaut   = BoxTopY("top_right_box_EB");
01344     }
01345 
01346   TPaveText *pav_evol_runs =
01347     new TPaveText(pav_border_xgauche, pav_border_ybas,
01348                   pav_border_xdroite, pav_border_yhaut);      fCnewRoot++;
01349 
01350   // 1 = left adjusted, 2 = vertically centered
01351   Int_t   cTextPaveAlign = 12; pav_evol_runs->SetTextAlign(cTextPaveAlign);
01352   // 10*4 = 10*(ID4 = Courier helvetica-medium-r-normal = Arial)
01353   // 10*10 = 10*(ID10 = Courier bold-r-normal = Courier New)          
01354   Int_t   cTextPaveFont  = 100; pav_evol_runs->SetTextFont(cTextPaveFont);
01355   // 0.03 = 3% of the pave height           
01356   Float_t cTextPaveSize  = 0.025;
01357   if( HistoType == "Evol" || HistoType == "EvolProj"){cTextPaveSize  = 0.0225;}
01358 
01359   pav_evol_runs->SetTextSize(cTextPaveSize);
01360   Int_t   cTextBorderSize = 1; pav_evol_runs->SetBorderSize(cTextBorderSize);
01361 
01362   if( !( (HistoType == "Evol"     && opt_plot == "SAME n") ||
01363          (HistoType == "EvolProj" && opt_plot == "SAME n") ) )
01364     {
01365       sprintf(f_in, "First run: %d", start_evol_run);
01366       pav_evol_runs->AddText(f_in);
01367       sprintf(f_in, "(%s) ", start_evol_date.Data());
01368       pav_evol_runs->AddText(f_in);
01369       sprintf(f_in, "Last run:  %d", stop_evol_run);
01370       pav_evol_runs->AddText(f_in);
01371       sprintf(f_in, "(%s) ", stop_evol_date.Data());
01372       pav_evol_runs->AddText(f_in);
01373     }
01374 
01375   if( (HistoType == "Evol"     && opt_plot == "SAME n") ||
01376       (HistoType == "EvolProj" && opt_plot == "SAME n") )
01377     {
01378       sprintf(f_in, "First run: %d (%s) ", start_evol_run, start_evol_date.Data());
01379       pav_evol_runs->AddText(f_in);
01380       sprintf(f_in, "Last run:  %d (%s)", stop_evol_run, stop_evol_date.Data());
01381       pav_evol_runs->AddText(f_in);
01382     }
01383 
01384   delete [] f_in;                                           fCdelete++;
01385   
01386   return pav_evol_runs;
01387 }
01388 
01389 TPaveText* TEcnaParHistos::SetOptionSamePaveBorder(const TString chopt, const TString HistoType)
01390 {
01391 // Pave for plots with option SAME and SAME n.
01392 // Gives just the size/border and return the pointer to the Pave. No text.
01393 // The Pave text is drawn in TEcnaHistos.cc
01394   
01395   //.................................. DEFAULT OPTION: "several"
01396   
01397   Double_t pav_left_xgauche = BoxLeftX("several_plots_box");
01398   Double_t pav_left_xdroite = BoxRightX("several_plots_box");
01399   Double_t pav_left_ybas    = BoxBottomY("several_plots_box");
01400   Double_t pav_left_yhaut   = BoxTopY("several_plots_box");
01401 
01402   if(chopt == "sevevol")
01403     {    
01404       pav_left_xgauche = BoxLeftX("several_evol_box");
01405       pav_left_xdroite = BoxRightX("several_evol_box");
01406       pav_left_ybas    = BoxBottomY("several_evol_box");
01407       pav_left_yhaut   = BoxTopY("several_evol_box");
01408 
01409       if( HistoType == "EvolProj" )
01410         {
01411           pav_left_xgauche = BoxLeftX("several_evpr_box");
01412           pav_left_xdroite = BoxRightX("several_evpr_box");
01413           pav_left_ybas    = BoxBottomY("several_evpr_box");
01414           pav_left_yhaut   = BoxTopY("several_evpr_box");
01415         }
01416     }
01417 
01418   TPaveText *com_several =
01419     new TPaveText(pav_left_xgauche, pav_left_ybas,
01420                   pav_left_xdroite, pav_left_yhaut);  fCnewRoot++;
01421 
01422   return com_several;
01423 }
01424 //.... end of SetOptionSamePaveBorder
01425 //===========================================================================
01426 //
01427 //     SetPaveSM, SetPaveTower, SetPaveTowersXY,
01428 //     SetPaveEBCrystal, SetPaveEBCrystalSample,
01429 //     SetPaveLVRB, SetColorsForNumbers
01430 //
01431 //===========================================================================
01432 TPaveText* TEcnaParHistos::SetPaveStas()
01433 {
01434   char* f_in = new char[fgMaxCar];                           fCnew++;
01435   //.................................. DEFAULT OPTION: "standard"   
01436   Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
01437   Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
01438   Double_t pav_top_left_ybas    = BoxBottomY("top_left_box_SM");
01439   Double_t pav_top_left_yhaut   = BoxTopY("top_left_box_SM");
01440 
01441   TPaveText *com_top_left =
01442     new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
01443                   pav_top_left_xdroite, pav_top_left_yhaut);  fCnewRoot++;
01444  
01445   // 1 = left adjusted, 2 = vertically centered
01446   Int_t   cTextPaveAlign  = 12;   com_top_left->SetTextAlign(cTextPaveAlign);
01447   // 10*10 = 10*(ID10 = Courier New)          
01448   Int_t   cTextPaveFont   = 100;  com_top_left->SetTextFont(cTextPaveFont);
01449   // 0.95 = 95% of the pave size         
01450   Float_t cTextPaveSize   = 0.04; com_top_left->SetTextSize(cTextPaveSize);
01451   Int_t   cTextBorderSize = 1;    com_top_left->SetBorderSize(cTextBorderSize);
01452 
01453   if ( fFlagSubDet == "EB"){sprintf(f_in, "EB");}
01454   if ( fFlagSubDet == "EE"){sprintf(f_in, "EE");}
01455 
01456   com_top_left->AddText(f_in);
01457   
01458   delete [] f_in;                                           fCdelete++;
01459   
01460   return com_top_left;
01461 }
01462 
01463 TPaveText* TEcnaParHistos::SetPaveSM(const TString chopt, const Int_t& SM_number,
01464                                     const TString EB_type)
01465 {
01466 // Pave for Super-module plots
01467   
01468   char* f_in = new char[fgMaxCar];                           fCnew++;
01469 
01470   //.................................. DEFAULT OPTION: "standard"   
01471   Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
01472   Double_t pav_top_left_xdroite = BoxRightX("top_left_box_SM");
01473   Double_t pav_top_left_ybas    = BoxBottomY("top_left_box_SM");
01474   Double_t pav_top_left_yhaut   = BoxTopY("top_left_box_SM");
01475 
01476   if( chopt == "standard" || (chopt == "standGH" && EB_type == "EB-") )
01477     {  
01478       pav_top_left_xgauche = BoxLeftX("top_left_box_EB");
01479       pav_top_left_xdroite = BoxRightX("top_left_box_EB");
01480       pav_top_left_ybas    = BoxBottomY("top_left_box_EB");
01481       pav_top_left_yhaut   = BoxTopY("top_left_box_EB");
01482     }
01483 
01484   if( chopt == "standSM" || chopt == "standStex" || (chopt == "standGH" && EB_type == "EB+") )
01485     {  
01486       pav_top_left_xgauche = BoxLeftX("top_left_box_SM");
01487       pav_top_left_xdroite = BoxRightX("top_left_box_SM");
01488       pav_top_left_ybas    = BoxBottomY("top_left_box_SM");
01489       pav_top_left_yhaut   = BoxTopY("top_left_box_SM");
01490     }
01491 
01492   if( chopt == "several" )
01493     {    
01494       pav_top_left_xgauche = BoxLeftX("several_plots_box");
01495       pav_top_left_xdroite = BoxRightX("several_plots_box");
01496       pav_top_left_ybas    = BoxBottomY("several_plots_box");
01497       pav_top_left_yhaut   = BoxTopY("several_plots_box");
01498     }
01499 
01500   if( chopt == "sevevol" )
01501     {    
01502       pav_top_left_xgauche = BoxLeftX("several_evol_box");
01503       pav_top_left_xdroite = BoxRightX("several_evol_box");
01504       pav_top_left_ybas    = BoxBottomY("several_evol_box");
01505       pav_top_left_yhaut   = BoxTopY("several_evol_box");
01506     }
01507 
01508   TPaveText *com_top_left =
01509     new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
01510                   pav_top_left_xdroite, pav_top_left_yhaut);  fCnewRoot++;
01511  
01512   // 1 = left adjusted, 2 = vertically centered
01513   Int_t   cTextPaveAlign  = 12;   com_top_left->SetTextAlign(cTextPaveAlign);
01514   // 10*10 = 10*(ID10 = Courier New)          
01515   Int_t   cTextPaveFont   = 100;  com_top_left->SetTextFont(cTextPaveFont);
01516   // 0.95 = 95% of the pave size         
01517   Float_t cTextPaveSize   = 0.04; com_top_left->SetTextSize(cTextPaveSize);
01518   Int_t   cTextBorderSize = 1;    com_top_left->SetBorderSize(cTextBorderSize);
01519  
01520   if( chopt == "standard" || chopt == "standSM" || chopt == "standStex" || chopt == "standGH")
01521     {
01522       Int_t sm_nb = SM_number;
01523       if( EB_type == "EB+" ){sprintf(f_in, "EB+%d", sm_nb);}
01524       if( EB_type == "EB-" )
01525         {sm_nb = -SM_number+fEcal->MaxSMInEB()/2;
01526         sprintf(f_in, "EB%d (SM%d)", sm_nb, SM_number);}
01527       com_top_left->AddText(f_in);
01528     }
01529 
01530   delete [] f_in;                                           fCdelete++;
01531   
01532   return com_top_left;
01533 }
01534 
01535 TPaveText* TEcnaParHistos::SetPaveTower(const Int_t& SMtower_X)
01536 {
01537 // Tower comment
01538 
01539   char* f_in = new char[fgMaxCar];                           fCnew++;
01540   //...................... Pave tower/crystal(channel)/sample (top_right_box)
01541   Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
01542   Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
01543   Double_t pav_top_mid_ybas    = BoxBottomY("top_mid_box_EB");
01544   Double_t pav_top_mid_yhaut   = BoxTopY("top_mid_box_EB");
01545   TPaveText *com_top_mid =
01546     new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
01547                   pav_top_mid_xdroite, pav_top_mid_yhaut);  fCnewRoot++;
01548 
01549   // 1 = left adjusted, 2 = vertically centered
01550   Int_t   cTextPaveAlign = 12;    com_top_mid->SetTextAlign(cTextPaveAlign);
01551   // 10*10 = 10*(ID10 = Courier New)          
01552   Int_t   cTextPaveFont  = 100;   com_top_mid->SetTextFont(cTextPaveFont);   
01553   // 0.95 = 95% of the pave size     
01554   Float_t cTextPaveSize  = 0.03;  com_top_mid->SetTextSize(cTextPaveSize);
01555   Int_t   cTextBorderSize = 1;    com_top_mid->SetBorderSize(cTextBorderSize);
01556           
01557   sprintf(f_in, " Tower: %d ", SMtower_X);
01558   com_top_mid->AddText(f_in);
01559   
01560   delete [] f_in;                                           fCdelete++;
01561 
01562   return com_top_mid;
01563 }
01564 
01565 TPaveText* TEcnaParHistos::SetPaveTowersXY(const Int_t& SMtower_X, const Int_t& SMtower_Y)
01566 {
01567 // Towers X and Y for (TowEcha,TowEcha) cov or cor matrix
01568 
01569   char* f_in = new char[fgMaxCar];                           fCnew++;
01570   //...................... Pave tower/TowEcha(channel)/sample (top_right_box)
01571   Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EB");
01572   Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EB");
01573   Double_t pav_top_mid_ybas    = BoxBottomY("top_mid_box_EB");
01574   Double_t pav_top_mid_yhaut   = BoxTopY("top_mid_box_EB");
01575   TPaveText *com_top_mid =
01576     new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
01577                   pav_top_mid_xdroite, pav_top_mid_yhaut);  fCnewRoot++;
01578   
01579   // 1 = left adjusted, 2 = vertically centered
01580   Int_t   cTextPaveAlign = 12;   com_top_mid->SetTextAlign(cTextPaveAlign);
01581   // 10*10 = 10*(ID10 = Courier New)          
01582   Int_t   cTextPaveFont  = 100;  com_top_mid->SetTextFont(cTextPaveFont);
01583   // 0.95 = 95% of the pave size            
01584   Float_t cTextPaveSize  = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
01585   Int_t   cTextBorderSize = 1;   com_top_mid->SetBorderSize(cTextBorderSize);
01586                   
01587   sprintf(f_in, " Tower X: %d ", SMtower_X);
01588   com_top_mid->AddText(f_in);
01589   sprintf(f_in, " Tower Y: %d ", SMtower_Y);
01590   com_top_mid->AddText(f_in);  
01591 
01592   delete [] f_in;                                           fCdelete++;
01593 
01594   return com_top_mid;
01595 }
01596 
01597 TPaveText* TEcnaParHistos::SetPaveCrystal(const Int_t& StexCrys, const Int_t& StexStinA, const Int_t& StinEcha)
01598 {
01599 // Tower + StinEcha comment. StexCrys range: [1,max]
01600 
01601   char* f_in = new char[fgMaxCar];                           fCnew++;
01602   //...................... Pave tower/StinEcha(channel)/sample (top_right_box)
01603 
01604   Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
01605   Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
01606   Double_t pav_top_right_ybas    = BoxBottomY("top_right_box_EB");
01607   Double_t pav_top_right_yhaut   = BoxTopY("top_right_box_EB");
01608   if( fFlagSubDet == "EE" )
01609     {
01610       pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
01611       pav_top_right_xdroite = BoxRightX("top_right_box_EE");
01612       pav_top_right_ybas    = BoxBottomY("top_right_box_EE");
01613       pav_top_right_yhaut   = BoxTopY("top_right_box_EE");
01614     }
01615 
01616   TPaveText *com_top_right =
01617     new TPaveText(pav_top_right_xgauche, pav_top_right_ybas,
01618                   pav_top_right_xdroite, pav_top_right_yhaut);  fCnewRoot++;
01619 
01620   // 1 = left adjusted, 2 = vertically centered
01621   Int_t   cTextPaveAlign = 12;   com_top_right->SetTextAlign(cTextPaveAlign);
01622   // 10*10 = 10*(ID10 = Courier New)           
01623   Int_t   cTextPaveFont  = 100;  com_top_right->SetTextFont(cTextPaveFont);   
01624   // 0.95 = 95% of the pave size      
01625   Float_t cTextPaveSize  = 0.03; com_top_right->SetTextSize(cTextPaveSize);
01626   Int_t   cTextBorderSize = 1;   com_top_right->SetBorderSize(cTextBorderSize);
01627 
01628   if( fFlagSubDet == "EB" )
01629     {
01630       sprintf(f_in, "Channel: %d ", StinEcha);
01631       com_top_right->AddText(f_in); 
01632       sprintf(f_in, "Crystal in SM: %d ", StexCrys);
01633       com_top_right->AddText(f_in);
01634     }
01635 
01636   if( fFlagSubDet == "EE" )
01637     {
01638       sprintf(f_in, "Crystal in SC: %d ", StinEcha+1);     // EE => range = [1,25]
01639       com_top_right->AddText(f_in);
01640       Int_t IX_Dee_crys = StexCrys/fEcal->MaxCrysIYInDee() + 1;
01641       Int_t IY_Dee_crys = StexCrys%fEcal->MaxCrysIYInDee();
01642       if( IY_Dee_crys == 0 ){IX_Dee_crys--; IY_Dee_crys = fEcal->MaxCrysIYInDee();}     
01643       sprintf(f_in, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
01644       com_top_right->AddText(f_in);
01645     }
01646 
01647   delete [] f_in;                                           fCdelete++;
01648 
01649   return com_top_right; 
01650 }
01651 
01652 TPaveText* TEcnaParHistos::SetPaveCrystalSample(const Int_t& StexCrys, const Int_t& StexStinA,
01653                                                const Int_t& StinEcha, const Int_t& iSample)
01654 {
01655 // Tower + StinEcha + sample comment
01656 
01657   char* f_in = new char[fgMaxCar];                           fCnew++;
01658   //...................... Pave tower/StinEcha(channel)/sample (top_right_box)
01659   Double_t pav_top_right_xgauche = BoxLeftX("top_right_box_EB");
01660   Double_t pav_top_right_xdroite = BoxRightX("top_right_box_EB");
01661   Double_t pav_top_right_ybas    = BoxBottomY("top_right_box_EB");
01662   Double_t pav_top_right_yhaut   = BoxTopY("top_right_box_EB");
01663   if( fFlagSubDet == "EE" )
01664     {
01665       pav_top_right_xgauche = BoxLeftX("top_right_box_EE");
01666       pav_top_right_xdroite = BoxRightX("top_right_box_EE");
01667       pav_top_right_ybas    = BoxBottomY("top_right_box_EE");
01668       pav_top_right_yhaut   = BoxTopY("top_right_box_EE");
01669     }
01670 
01671   TPaveText *com_top_right =
01672     new TPaveText(pav_top_right_xgauche, pav_top_right_ybas,
01673                   pav_top_right_xdroite, pav_top_right_yhaut);  fCnewRoot++;
01674   
01675   // 1 = left adjusted, 2 = vertically centered
01676   Int_t   cTextPaveAlign = 12;   com_top_right->SetTextAlign(cTextPaveAlign);
01677   // 10*10 = 10*(ID10 = Courier New)            
01678   Int_t   cTextPaveFont  = 100;  com_top_right->SetTextFont(cTextPaveFont);
01679   // 0.95 = 95% of the pave size    
01680   Float_t cTextPaveSize  = 0.03; com_top_right->SetTextSize(cTextPaveSize);
01681   Int_t   cTextBorderSize = 1;   com_top_right->SetBorderSize(cTextBorderSize);
01682 
01683 
01684   if( fFlagSubDet == "EB" )
01685     {
01686       sprintf(f_in, " Channel: %d ", StinEcha);
01687       com_top_right->AddText(f_in); 
01688       sprintf(f_in, " Crystal in SM: %d ", StexCrys);
01689       com_top_right->AddText(f_in);
01690     }
01691 
01692   if( fFlagSubDet == "EE" )
01693     {
01694       sprintf(f_in, " Channel: %d ", StinEcha+1);    // EE => range = [1,25]
01695       com_top_right->AddText(f_in); 
01696       Int_t IX_Dee_crys = StexCrys/fEcal->MaxCrysIYInDee() + 1;
01697       Int_t IY_Dee_crys = StexCrys%fEcal->MaxCrysIYInDee();
01698       if( IY_Dee_crys == 0 ){IX_Dee_crys--; IY_Dee_crys = fEcal->MaxCrysIYInDee();}
01699       sprintf(f_in, "(IX,IY)[Xtal]=(%d,%d)", IX_Dee_crys, IY_Dee_crys);
01700       com_top_right->AddText(f_in);
01701     }
01702 
01703   sprintf(f_in, " Sample: %d ", iSample+1);
01704   com_top_right->AddText(f_in);
01705 
01706   delete [] f_in;                                           fCdelete++;
01707 
01708   return com_top_right;
01709 }
01710 
01711 TPaveText* TEcnaParHistos::SetPaveLVRB(const Int_t& SMNumber, const Int_t& SMtower)
01712 {
01713 // LVRB at the top or at the bottom comment
01714 
01715   //....................... GRAND pave "LVRB"
01716   Double_t pav_bot_xgauche = BoxLeftX("bottom_left_box");
01717   Double_t pav_bot_xdroite = BoxRightX("bottom_right_box");
01718   Double_t pav_bot_ybas    = BoxBottomY("bottom_left_box");
01719   Double_t pav_bot_yhaut   = BoxTopY("bottom_left_box");
01720   TPaveText *com_bot_mid =
01721     new TPaveText(pav_bot_xgauche, pav_bot_ybas,
01722                   pav_bot_xdroite, pav_bot_yhaut);    fCnewRoot++;
01723 
01724   Color_t couleur_noir       = ColorDefinition("noir");
01725   Color_t couleur_rouge      = SetColorsForNumbers("lvrb_top");
01726   Color_t couleur_bleu_fonce = SetColorsForNumbers("lvrb_bottom");
01727 
01728   if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
01729     {
01730       TText *t1 = com_bot_mid->AddText("   <= IP (#eta = 0)       (#eta = +85) =>   ");
01731       t1->SetTextColor(couleur_noir);
01732     }
01733 
01734   if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
01735     {
01736       TText *t2 = com_bot_mid->AddText("   <= (#eta = -85)       IP (#eta = 0) =>   ");
01737       t2->SetTextColor(couleur_noir);
01738     }
01739 
01740   if(fEcalNumbering->GetTowerLvrbType(SMtower) == "top")
01741     {
01742       TText *t3 = 0;
01743       if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
01744         {t3 =  com_bot_mid->AddText("       <=== LVRB       ");}
01745       if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
01746         {t3 =  com_bot_mid->AddText("       LVRB ===>       ");}
01747       t3->SetTextColor(couleur_rouge);
01748     }
01749   
01750   if(fEcalNumbering->GetTowerLvrbType(SMtower) == "bottom")
01751     {
01752       TText *t4 = 0;
01753       if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB+")
01754         {t4 = com_bot_mid->AddText("        LVRB ===>       ");}
01755       if(fEcalNumbering->GetSMHalfBarrel(SMNumber) == "EB-")
01756         {t4 = com_bot_mid->AddText("        <=== LVRB       ");}
01757       t4->SetTextColor(couleur_bleu_fonce);
01758     }
01759   return com_bot_mid;
01760 
01761 }//  end of SetPaveLVRB
01762 
01763 Color_t TEcnaParHistos::SetColorsForNumbers(const TString chtype_number)
01764 {
01765  //Set color of the numbers for SuperModule- or Tower-  numbering plots
01766 
01767   Color_t couleur = ColorDefinition("noir");        // default = "noir"
01768 
01769   if ( chtype_number == "crystal"     ){couleur = ColorDefinition("noir");}
01770   if ( chtype_number == "lvrb_top"    ){couleur = ColorDefinition("rouge");}
01771   if ( chtype_number == "lvrb_bottom" ){couleur = ColorDefinition("bleu_fonce");}
01772 
01773   return couleur;
01774 }
01775 
01776 //===========================================================================
01777 //
01778 //     SetPaveDee, SetPaveSC, SetPaveSCsXY,
01779 //     SetPaveEECrystal
01780 //
01781 //===========================================================================
01782 
01783 TPaveText* TEcnaParHistos::SetPaveDee(const TString chopt,   const Int_t&  DeeNumber,
01784                                      const TString DeeType)
01785 {
01786 // Dee pav. Called only once.
01787   
01788   char* f_in = new char[fgMaxCar];                           fCnew++;
01789 
01790   //.................................. DEFAULT OPTION: "standard"   
01791   Double_t pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
01792   Double_t pav_top_left_xdroite = BoxRightX("top_left_box_EE");
01793   Double_t pav_top_left_ybas    = BoxBottomY("top_left_box_EE");
01794   Double_t pav_top_left_yhaut   = BoxTopY("top_left_box_EE");
01795   
01796   if(chopt == "standard" || chopt == "standGH")
01797     {  
01798       pav_top_left_xgauche = BoxLeftX("top_left_box_EE");
01799       pav_top_left_xdroite = BoxRightX("top_left_box_EE");
01800       pav_top_left_ybas    = BoxBottomY("top_left_box_EE");
01801       pav_top_left_yhaut   = BoxTopY("top_left_box_EE");
01802     }
01803 
01804   if( chopt == "standDee" || chopt == "standStex" )
01805     {  
01806       pav_top_left_xgauche = BoxLeftX("top_left_box_Dee");
01807       pav_top_left_xdroite = BoxRightX("top_left_box_Dee");
01808       pav_top_left_ybas    = BoxBottomY("top_left_box_Dee");
01809       pav_top_left_yhaut   = BoxTopY("top_left_box_Dee");
01810     }
01811 
01812   if(chopt == "several")
01813     {    
01814       pav_top_left_xgauche = BoxLeftX("several_plots_box");
01815       pav_top_left_xdroite = BoxRightX("several_plots_box");
01816       pav_top_left_ybas    = BoxBottomY("several_plots_box");
01817       pav_top_left_yhaut   = BoxTopY("several_plots_box");
01818     }
01819   if(chopt == "sevevol")
01820     {    
01821       pav_top_left_xgauche = BoxLeftX("several_evol_box");
01822       pav_top_left_xdroite = BoxRightX("several_evol_box");
01823       pav_top_left_ybas    = BoxBottomY("several_evol_box");
01824       pav_top_left_yhaut   = BoxTopY("several_evol_box");
01825     }
01826   
01827   TPaveText *com_top_left =
01828     new TPaveText(pav_top_left_xgauche, pav_top_left_ybas,
01829                   pav_top_left_xdroite, pav_top_left_yhaut);  fCnewRoot++;
01830   
01831   // 1 = left adjusted, 2 = vertically centered
01832   Int_t   cTextPaveAlign = 12;    com_top_left->SetTextAlign(cTextPaveAlign);
01833   // 10*10 = 10*(ID10 = Courier New)            
01834   Int_t   cTextPaveFont  = 100;   com_top_left->SetTextFont(cTextPaveFont);
01835   // 0.95 = 95% of the pave size            
01836   Float_t cTextPaveSize  = 0.04;  com_top_left->SetTextSize(cTextPaveSize);
01837   Int_t   cTextBorderSize = 1;    com_top_left->SetBorderSize(cTextBorderSize);
01838   
01839   if( chopt == "standard" )
01840     {
01841       sprintf(f_in, " Dee: %d", DeeNumber);
01842       com_top_left->AddText(f_in);
01843       sprintf(f_in, " (%s)", DeeType.Data());
01844       com_top_left->AddText(f_in);
01845     }
01846   
01847   if( chopt == "standDee" || chopt == "standStex" || chopt == "standGH" )
01848     {
01849       sprintf(f_in, " Dee: %d  (%s) ", DeeNumber, DeeType.Data());
01850       com_top_left->AddText(f_in);
01851     }
01852   
01853   delete [] f_in;                                           fCdelete++;
01854   
01855   return com_top_left;
01856 }
01857 
01858 TPaveText* TEcnaParHistos::SetPaveSC(const Int_t& DeeSC_X, const Int_t& DeeNumber)
01859 {
01860 // SC comment
01861   
01862   char* f_in = new char[fgMaxCar];                     fCnew++;
01863   //...................... Pave SC/crystal(channel)/sample (top_right_box)
01864   Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
01865   Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
01866   Double_t pav_top_mid_ybas    = BoxBottomY("top_mid_box_EE");
01867   Double_t pav_top_mid_yhaut   = BoxTopY("top_mid_box_EE");
01868   TPaveText *com_top_mid =
01869     new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
01870                   pav_top_mid_xdroite, pav_top_mid_yhaut);  fCnewRoot++;
01871   
01872   // 1 = left adjusted, 2 = vertically centered
01873   Int_t   cTextPaveAlign = 12;    com_top_mid->SetTextAlign(cTextPaveAlign);        
01874   // 10*10 = 10*(ID10 = Courier New)
01875   Int_t   cTextPaveFont  = 100;   com_top_mid->SetTextFont(cTextPaveFont);     
01876   // 0.95 = 95% of the pave size
01877   Float_t cTextPaveSize  = 0.03;  com_top_mid->SetTextSize(cTextPaveSize);
01878   Int_t   cTextBorderSize = 1;    com_top_mid->SetBorderSize(cTextBorderSize);
01879 
01880   sprintf(f_in, "Sector: S%d, SC: %d",
01881           fEcalNumbering->GetDSFrom1DeeSCEcna(DeeNumber, DeeSC_X),
01882           fEcalNumbering->GetDSSCFrom1DeeSCEcna(DeeNumber, DeeSC_X));
01883   com_top_mid->AddText(f_in);
01884   sprintf(f_in, "SC for const.: %d",
01885           fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(DeeNumber,DeeSC_X));
01886   com_top_mid->AddText(f_in); 
01887   sprintf(f_in, "Quadrant: %s",
01888     fEcalNumbering->GetSCQuadFrom1DeeSCEcna(DeeSC_X).Data());
01889    com_top_mid->AddText(f_in); 
01890   delete [] f_in;                                     fCdelete++;
01891 
01892   return com_top_mid;
01893 }
01894 
01895 TPaveText* TEcnaParHistos::SetPaveSCsXY(const Int_t& DeeSC_X, const Int_t& DeeSC_Y)
01896 {
01897 // SCs X and Y for (SCEcha,SCEcha) cov or cor matrix
01898 
01899   char* f_in = new char[fgMaxCar];                           fCnew++;
01900   //...................... Pave SC/SCEcha(channel)/sample (top_right_box)
01901   Double_t pav_top_mid_xgauche = BoxLeftX("top_mid_box_EE");
01902   Double_t pav_top_mid_xdroite = BoxRightX("top_mid_box_EE");
01903   Double_t pav_top_mid_ybas    = BoxBottomY("top_mid_box_EE");
01904   Double_t pav_top_mid_yhaut   = BoxTopY("top_mid_box_EE");
01905   TPaveText *com_top_mid =
01906     new TPaveText(pav_top_mid_xgauche, pav_top_mid_ybas,
01907                   pav_top_mid_xdroite, pav_top_mid_yhaut);  fCnewRoot++;
01908   
01909   // 1 = left adjusted, 2 = vertically centered
01910   Int_t   cTextPaveAlign = 12;   com_top_mid->SetTextAlign(cTextPaveAlign);
01911   // 10*10 = 10*(ID10 = Courier New)
01912   Int_t   cTextPaveFont  = 100;  com_top_mid->SetTextFont(cTextPaveFont);
01913   // 0.95 = 95% of the pave size
01914   Float_t cTextPaveSize  = 0.03; com_top_mid->SetTextSize(cTextPaveSize);
01915   Int_t   cTextBorderSize = 1;   com_top_mid->SetBorderSize(cTextBorderSize);
01916 
01917   sprintf(f_in, "SC X: %d", DeeSC_X);
01918   com_top_mid->AddText(f_in);
01919   sprintf(f_in, "SC Y: %d", DeeSC_Y);
01920   com_top_mid->AddText(f_in);  
01921 
01922   delete [] f_in;                                           fCdelete++;
01923 
01924   return com_top_mid;
01925 }
01926 
01927 TPaveText* TEcnaParHistos::SetPaveCxyz(const Int_t& DeeNumber)
01928 {
01929 // Cxyz at the top or at the bottom comment
01930 
01931   //....................... GRAND pave "Cxyz"
01932   Double_t pav_bot_xgauche = BoxRightX("bottom_mid_box");
01933   Double_t pav_bot_xdroite = BoxLeftX("bottom_mid_box");
01934   Double_t pav_bot_ybas    = BoxBottomY("bottom_left_box");
01935   Double_t pav_bot_yhaut   = BoxTopY("bottom_left_box");
01936   TPaveText *com_bot_mid =
01937     new TPaveText(pav_bot_xgauche, pav_bot_ybas,
01938                   pav_bot_xdroite, pav_bot_yhaut);    fCnewRoot++;
01939 
01940   //com_bot_mid->SetOption("arc");
01941   //com_bot_mid->SetCornerRadius((Double_t)0.5);
01942   //Int_t   cTextPaveFont  = 100;  com_bot_mid->SetTextFont(cTextPaveFont);
01943 
01944   com_bot_mid->SetTextSize(0.0325);
01945   //........................................... (SetPaveCxyz)
01946   if( DeeNumber == 1 )
01947     {
01948       com_bot_mid->AddText("        y ");
01949       com_bot_mid->AddText("        #uparrow ");
01950       com_bot_mid->AddText(" (Near)    x #leftarrow #otimes z     (Far) " );
01951     }
01952   if( DeeNumber == 2 )
01953     {
01954       com_bot_mid->AddText("        y ");
01955       com_bot_mid->AddText("        #uparrow ");
01956       com_bot_mid->AddText(" (Near)    x #leftarrow #otimes z     (Far) " );
01957     }
01958   if( DeeNumber == 3 )
01959     {
01960       com_bot_mid->AddText(" y           ");
01961       com_bot_mid->AddText(" #uparrow          ");
01962       com_bot_mid->AddText(" (Far)      z (#bullet) #rightarrow x     (Near) " );
01963     }
01964   if( DeeNumber == 4 )
01965     {
01966       com_bot_mid->AddText(" y           ");
01967       com_bot_mid->AddText(" #uparrow          ");
01968       com_bot_mid->AddText(" (Far)      z (#bullet) #rightarrow x     (Near) " );
01969     }
01970 
01971   // com_bot_mid->AddText(" (from IP) " );
01972   return com_bot_mid;
01973 } 
01974 //===========================================================================
01975 //
01976 //            SetPaveStex,  SetPaveStin
01977 //
01978 //===========================================================================
01979 
01980 TPaveText* TEcnaParHistos::SetPaveStex(const TString chopt, const Int_t& StexNumber)
01981 {
01982   TPaveText* pav_text = 0;
01983 
01984   if( StexNumber > 0 )
01985     {
01986       if ( fFlagSubDet == "EB" )
01987         {
01988           TString EB_type = fEcalNumbering->GetSMHalfBarrel(StexNumber);
01989           pav_text = SetPaveSM(chopt, StexNumber, EB_type);
01990         }
01991       if ( fFlagSubDet == "EE" )
01992         {
01993           TString dee_type = fEcalNumbering->GetEEDeeType(StexNumber);
01994           pav_text = SetPaveDee(chopt, StexNumber, dee_type);
01995         }
01996     }
01997   if( StexNumber == 0 ){pav_text = SetPaveStas();}
01998 
01999   return pav_text;
02000 }
02001 
02002 TPaveText* TEcnaParHistos::SetPaveStin(const Int_t& StinNumber, const Int_t& StexNumber)
02003 {
02004   TPaveText* pav_text = 0;
02005   if ( fFlagSubDet == "EB"){pav_text = SetPaveTower(StinNumber);}
02006   if ( fFlagSubDet == "EE"){pav_text = SetPaveSC(StinNumber, StexNumber);}
02007   return pav_text;
02008 }
02009 
02010 TPaveText* TEcnaParHistos::SetPaveStinsXY(const Int_t& StexStin_X, const Int_t& StexStin_Y) 
02011 {
02012   TPaveText* pav_text = 0;
02013   if ( fFlagSubDet == "EB"){pav_text = SetPaveTowersXY(StexStin_X, StexStin_Y);}
02014   if ( fFlagSubDet == "EE"){pav_text = SetPaveSCsXY(StexStin_X, StexStin_Y);}
02015   return pav_text;
02016 }
02017 
02018 //===========================================================================
02019 //
02020 //               GetHistoType, GetQuantityName
02021 //
02022 //===========================================================================
02023 
02024 TString TEcnaParHistos::GetHistoType(const TString HistoCode)
02025 {
02026 // Type of the quantity as a function of the quantity code
02027 // Histo type <=> Variable in X coordinate
02028 
02029   TString HistoType;
02030   Int_t MaxCar = fgMaxCar;
02031   HistoType.Resize(MaxCar);
02032   HistoType = "(no quantity type info)";
02033 
02034   //.(1a)............................ Global
02035   if ( HistoCode == "D_NOE_ChNb" || HistoCode == "D_Ped_ChNb" ||
02036        HistoCode == "D_TNo_ChNb" || HistoCode == "D_MCs_ChNb" ||
02037        HistoCode == "D_LFN_ChNb" || HistoCode == "D_HFN_ChNb" || 
02038        HistoCode == "D_SCs_ChNb" )
02039     {HistoType = "Global";}   // X coordinate = Xtals for SM or Dee
02040                               //                Tower for EB
02041                               //                SC    for EE
02042   //.(1b)............................ Proj  
02043   if ( HistoCode == "D_NOE_ChDs" || HistoCode == "D_Ped_ChDs" ||
02044        HistoCode == "D_TNo_ChDs" || HistoCode == "D_MCs_ChDs" ||
02045        HistoCode == "D_LFN_ChDs" || HistoCode == "D_HFN_ChDs" || 
02046        HistoCode == "D_SCs_ChDs" )
02047     {HistoType = "Proj";}    // X coordinate = bin number
02048   
02049   //.(2)............................ H1Basic
02050   if ( HistoCode == "D_MSp_Samp" || HistoCode == "D_SSp_Samp" )
02051     {HistoType = "H1Basic";}  // X coordinate = sample number
02052 
02053   //.(3a)............................ SampGlobal
02054   if ( HistoCode == "D_Adc_EvNb" ){HistoType = "SampGlobal";}  // X coordinate = event number
02055   //.(3b)............................ SampProj
02056   if ( HistoCode == "D_Adc_EvDs"  ){HistoType = "SampProj";}    // X coordinate = bin number
02057 
02058   //.(4a)............................ Evol
02059   if ( HistoCode == "H_Ped_Date" || HistoCode == "H_TNo_Date" || HistoCode == "H_MCs_Date" ||
02060        HistoCode == "H_LFN_Date" || HistoCode == "H_HFN_Date" || HistoCode == "H_SCs_Date" )
02061     {HistoType = "Evol";}   // X coordinate = date
02062 
02063   //.(4b)............................ EvolProj
02064   if ( HistoCode == "H_Ped_RuDs" || HistoCode == "H_TNo_RuDs" || HistoCode == "H_MCs_RuDs" ||
02065        HistoCode == "H_LFN_RuDs" || HistoCode == "H_HFN_RuDs" || HistoCode == "H_SCs_RuDs" )
02066     {HistoType = "EvolProj";}   // X coordinate = bin number
02067 
02068   return HistoType;
02069 }// end of GetHistoType(...)
02070 
02071 TString TEcnaParHistos::GetXVarHisto(const TString HistoCode, const TString SubDet, const Int_t& StexNumber)
02072 {
02073 // Type of the quantity as a function of the quantity code
02074 // Histo type <=> Variable in X coordinate
02075 
02076   TString HistoType = GetHistoType(HistoCode.Data());
02077 
02078   TString XVarHisto;
02079   Int_t MaxCar = fgMaxCar;
02080   XVarHisto.Resize(MaxCar);
02081   XVarHisto = "(no X variable info)";
02082 
02083   if( HistoType == "Global" )
02084     {
02085       if( StexNumber == 0 && SubDet == "EB" ){XVarHisto = "Tower number";}
02086       if( StexNumber == 0 && SubDet == "EE" ){XVarHisto = "SC number";}
02087       if( StexNumber != 0){XVarHisto = "Xtal number";}
02088     }
02089   if( HistoType == "Proj" ){XVarHisto = "Bin number";}
02090 
02091   if( HistoType == "H1Basic"){XVarHisto = "Sample number";}
02092 
02093   if( HistoType == "SampGlobal" ){XVarHisto = "Event number";}
02094 
02095   if( HistoType == "SampProj" ){XVarHisto = "ADC count";}
02096 
02097   if( HistoType == "Evol" ){XVarHisto = "Date";}
02098 
02099   if( HistoType == "EvolProj" ){XVarHisto = "Bin number";}
02100 
02101   return XVarHisto;
02102 
02103 }// end of GetXVarHisto(...)
02104 
02105 TString TEcnaParHistos::GetYVarHisto(const TString HistoCode, const TString SubDet, const Int_t& StexNumber)
02106 {
02107 // Type of the quantity as a function of the quantity code
02108 // Histo type <=> Variable in Y coordinate
02109 
02110   TString HistoType = GetHistoType(HistoCode.Data());
02111 
02112   TString YVarHisto;
02113   Int_t MaxCar = fgMaxCar;
02114   YVarHisto.Resize(MaxCar);
02115   YVarHisto = "(no Y variable info)";
02116 
02117   if( HistoType == "Global" )
02118     {
02119       if( HistoCode == "D_NOE_ChNb" ){YVarHisto = "Nb of events";}
02120       if( HistoCode == "D_Ped_ChNb" ){YVarHisto = "Pedestal";}
02121       if( HistoCode == "D_TNo_ChNb" ){YVarHisto = "Total Noise";}
02122       if( HistoCode == "D_MCs_ChNb" ){YVarHisto = "Mean Cor(s,s')";}
02123       if( HistoCode == "D_LFN_ChNb" ){YVarHisto = "Low Freq. Noise";}
02124       if( HistoCode == "D_HFN_ChNb" ){YVarHisto = "High Freq. Noise";}
02125       if( HistoCode == "D_SCs_ChNb" ){YVarHisto = "Sigma Cor(s,s')";}
02126     }
02127 
02128   if( HistoType == "Proj" )
02129     {
02130       if( StexNumber == 0 && SubDet == "EB" ){YVarHisto = "Number of towers";}
02131       if( StexNumber == 0 && SubDet == "EE" ){YVarHisto = "Number of SCs";}
02132       if( StexNumber != 0){YVarHisto = "Number of Xtals";}
02133     }
02134 
02135   if( HistoType == "H1Basic"){YVarHisto = "ADC count";}
02136 
02137   if( HistoType == "SampGlobal" ){YVarHisto = "ADC count";}
02138 
02139   if( HistoType == "SampProj" ){YVarHisto = "Number of events";}
02140 
02141   if( HistoType == "EvolProj" ){YVarHisto = "Number of runs";}
02142 
02143   if( HistoType == "Evol" )
02144     {
02145       if( HistoCode == "H_Ped_Date" ){YVarHisto = "Pedestal";}
02146       if( HistoCode == "H_TNo_Date" ){YVarHisto = "Total Noise";}
02147       if( HistoCode == "H_MCs_Date" ){YVarHisto = "Mean Cor(s,s')";}
02148       if( HistoCode == "H_LFN_Date" ){YVarHisto = "Low Freq. Noise";}
02149       if( HistoCode == "H_HFN_Date" ){YVarHisto = "High Freq. Noise";}
02150       if( HistoCode == "H_SCs_Date" ){YVarHisto = "Sigma Cor(s,s')";}
02151     }
02152 
02153 //  cout << endl << "*TEcnaParHistos::GetYVarHisto(...)> HistoType = " << HistoType
02154 //       << ", HistoCode = " << HistoCode
02155 //       << ", StexNumber = " << StexNumber
02156 //       << ", YVarHisto = " << YVarHisto << endl;
02157 
02158   return YVarHisto;
02159 
02160 }// end of GetYVarHisto(...)
02161 
02162 TString TEcnaParHistos::GetQuantityName(const TString chqcode)
02163 {
02164 // Name of the quantity as a function of the histo code
02165 
02166   TString chqname;
02167   Int_t MaxCar = fgMaxCar;
02168   chqname.Resize(MaxCar);
02169   chqname = "(no quantity name info)";
02170 
02171   if(chqcode == "D_NOE_ChNb"){chqname = "Number of events";}
02172   if(chqcode == "D_NOE_ChDs"){chqname = "Nb of events";}
02173   if(chqcode == "D_Ped_ChNb"){chqname = "Pedestal";}
02174   if(chqcode == "D_Ped_ChDs"){chqname = "Pedestal";}
02175   if(chqcode == "D_TNo_ChNb"){chqname = "Total Noise";}
02176   if(chqcode == "D_TNo_ChDs"){chqname = "Total Noise";}
02177   if(chqcode == "D_MCs_ChNb"){chqname = "Mean Cor(s,s')";}
02178   if(chqcode == "D_MCs_ChDs"){chqname = "Mean Cor(s,s')";}
02179   if(chqcode == "D_LFN_ChNb"){chqname = "Low Freq. Noise";}
02180   if(chqcode == "D_LFN_ChDs"){chqname = "Low Freq. Noise";}
02181   if(chqcode == "D_HFN_ChNb"){chqname = "High Freq. Noise";}
02182   if(chqcode == "D_HFN_ChDs"){chqname = "High Freq. Noise";}
02183   if(chqcode == "D_SCs_ChNb"){chqname = "Sigma Cor(s,s')";}
02184   if(chqcode == "D_SCs_ChDs"){chqname = "Sigma Cor(s,s')";}
02185   if(chqcode == "D_MSp_Samp"){chqname = "Sample means";}
02186   if(chqcode == "D_SSp_Samp"){chqname = "Sample sigmas";}
02187   if(chqcode == "D_Adc_EvDs"){chqname = "Sample ADC distribution";}
02188   if(chqcode == "D_Adc_EvNb"){chqname = "Sample ADC";}
02189   if(chqcode == "H_Ped_Date"){chqname = "Pedestal";}
02190   if(chqcode == "H_TNo_Date"){chqname = "Total Noise";}
02191   if(chqcode == "H_MCs_Date"){chqname = "Mean Cor(s,s')";}
02192   if(chqcode == "H_LFN_Date"){chqname = "Low Freq. Noise";}
02193   if(chqcode == "H_HFN_Date"){chqname = "High Freq. Noise";}
02194   if(chqcode == "H_SCs_Date"){chqname = "Sigma Cor(s,s')";}
02195   if(chqcode == "H_Ped_RuDs"){chqname = "Pedestal";}
02196   if(chqcode == "H_TNo_RuDs"){chqname = "Total Noise";}
02197   if(chqcode == "H_MCs_RuDs"){chqname = "Mean Cor(s,s')";}
02198   if(chqcode == "H_LFN_RuDs"){chqname = "Low Freq. Noise";}
02199   if(chqcode == "H_HFN_RuDs"){chqname = "High Freq. Noise";}
02200   if(chqcode == "H_SCs_RuDs"){chqname = "Sigma Cor(s,s')";}
02201   return chqname;
02202 }
02203 
02204 Double_t TEcnaParHistos::GetYminDefaultValue(const TString chqcode)
02205 {
02206   Double_t vmin = (Double_t)0.;
02207 
02208   if(chqcode == "H2LFccMosMatrix"){vmin = (Double_t)-1.;}
02209   if(chqcode == "H2HFccMosMatrix"){vmin = (Double_t)-1.;}
02210   if(chqcode == "H2CorccInStins" ){vmin = (Double_t)-1.;}
02211 
02212   if(chqcode == "D_NOE_ChNb"){vmin = (Double_t)0.;}
02213   if(chqcode == "D_Ped_ChNb"){vmin = (Double_t)0.;}
02214   if(chqcode == "D_TNo_ChNb"){vmin = (Double_t)0.;}
02215   if(chqcode == "D_MCs_ChNb"){vmin = (Double_t)-1.;}
02216   if(chqcode == "D_LFN_ChNb"){vmin = (Double_t)0.;}
02217   if(chqcode == "D_HFN_ChNb"){vmin = (Double_t)0.;}
02218   if(chqcode == "D_SCs_ChNb"){vmin = (Double_t)-1.;}
02219 
02220   if(chqcode == "D_NOE_ChDs"){vmin = (Double_t)0.1;}
02221   if(chqcode == "D_Ped_ChDs"){vmin = (Double_t)0.1;}
02222   if(chqcode == "D_TNo_ChDs"){vmin = (Double_t)0.1;}
02223   if(chqcode == "D_MCs_ChDs"){vmin = (Double_t)0.1;}
02224   if(chqcode == "D_LFN_ChDs"){vmin = (Double_t)0.1;}
02225   if(chqcode == "D_HFN_ChDs"){vmin = (Double_t)0.1;}
02226   if(chqcode == "D_SCs_ChDs"){vmin = (Double_t)0.1;}
02227 
02228   if(chqcode == "D_MSp_Samp"){vmin = (Double_t)0.;}
02229   if(chqcode == "D_SSp_Samp"){vmin = (Double_t)0.;}
02230 
02231   if(chqcode == "D_Adc_EvNb"){vmin = (Double_t)0.;}
02232   if(chqcode == "D_Adc_EvDs"){vmin = (Double_t)0.;}
02233 
02234   if(chqcode == "H_Ped_Date"){vmin = (Double_t)0.;}
02235   if(chqcode == "H_TNo_Date"){vmin = (Double_t)0.;}
02236   if(chqcode == "H_MCs_Date"){vmin = (Double_t)-1.;}
02237   if(chqcode == "H_LFN_Date"){vmin = (Double_t)0.;}
02238   if(chqcode == "H_HFN_Date"){vmin = (Double_t)0.;}
02239   if(chqcode == "H_SCs_Date"){vmin = (Double_t)0.;}
02240 
02241   if(chqcode == "H_Ped_RuDs"){vmin = (Double_t)0.1;}
02242   if(chqcode == "H_TNo_RuDs"){vmin = (Double_t)0.1;}
02243   if(chqcode == "H_MCs_RuDs"){vmin = (Double_t)0.1;}
02244   if(chqcode == "H_LFN_RuDs"){vmin = (Double_t)0.1;}
02245   if(chqcode == "H_HFN_RuDs"){vmin = (Double_t)0.1;}
02246   if(chqcode == "H_SCs_RuDs"){vmin = (Double_t)0.1;}
02247 
02248   return vmin;
02249 }
02250 
02251 Double_t TEcnaParHistos::GetYmaxDefaultValue(const TString chqcode)
02252 {
02253   Double_t vmax = (Double_t)0.;
02254 
02255   if( fFlagSubDet == "EB" )
02256     {
02257       if(chqcode == "H2LFccMosMatrix" ){vmax = (Double_t)1.;}
02258       if(chqcode == "H2HFccMosMatrix" ){vmax = (Double_t)1.;}
02259       if(chqcode == "H2CorccInStins"  ){vmax = (Double_t)1.;}
02260 
02261       if(chqcode == "D_NOE_ChNb"){vmax = (Double_t)500.;}
02262       if(chqcode == "D_Ped_ChNb"){vmax = (Double_t)500.;}
02263       if(chqcode == "D_TNo_ChNb"){vmax = (Double_t)2.5;}
02264       if(chqcode == "D_LFN_ChNb"){vmax = (Double_t)2.5;}
02265       if(chqcode == "D_HFN_ChNb"){vmax = (Double_t)2.5;}
02266       if(chqcode == "D_MCs_ChNb"){vmax = (Double_t)1.;}
02267       if(chqcode == "D_SCs_ChNb"){vmax = (Double_t)1.5;}
02268       
02269       if(chqcode == "D_NOE_ChDs"){vmax = (Double_t)5000.;}
02270       if(chqcode == "D_Ped_ChDs"){vmax = (Double_t)5000.;}
02271       if(chqcode == "D_TNo_ChDs"){vmax = (Double_t)5000.;}
02272       if(chqcode == "D_LFN_ChDs"){vmax = (Double_t)5000.;}
02273       if(chqcode == "D_HFN_ChDs"){vmax = (Double_t)5000.;}
02274       if(chqcode == "D_MCs_ChDs"){vmax = (Double_t)5000.;}
02275       if(chqcode == "D_SCs_ChDs"){vmax = (Double_t)5000.;}
02276       
02277       if(chqcode == "D_MSp_Samp"){vmax = (Double_t)500.;}
02278       if(chqcode == "D_SSp_Samp"){vmax = (Double_t)5.;}
02279      
02280       if(chqcode == "D_Adc_EvNb"){vmax = (Double_t)500.;}
02281       if(chqcode == "D_Adc_EvDs"){vmax = (Double_t)500.;}
02282 
02283       if(chqcode == "H_Ped_Date"){vmax = (Double_t)500.;}
02284       if(chqcode == "H_TNo_Date"){vmax = (Double_t)5.;}
02285       if(chqcode == "H_LFN_Date"){vmax = (Double_t)5.;}
02286       if(chqcode == "H_HFN_Date"){vmax = (Double_t)5.;}
02287       if(chqcode == "H_MCs_Date"){vmax = (Double_t)1.;}
02288       if(chqcode == "H_SCs_Date"){vmax = (Double_t)0.5;}
02289 
02290       if(chqcode == "H_Ped_RuDs"){vmax = (Double_t)1000.;}
02291       if(chqcode == "H_TNo_RuDs"){vmax = (Double_t)1000.;}
02292       if(chqcode == "H_LFN_RuDs"){vmax = (Double_t)1000.;}
02293       if(chqcode == "H_HFN_RuDs"){vmax = (Double_t)1000.;}
02294       if(chqcode == "H_MCs_RuDs"){vmax = (Double_t)1000.;}
02295       if(chqcode == "H_SCs_RuDs"){vmax = (Double_t)1000.;}
02296     }
02297 
02298   if( fFlagSubDet == "EE" )
02299     {
02300       if(chqcode == "H2LFccMosMatrix"){vmax = (Double_t)1.;}
02301       if(chqcode == "H2HFccMosMatrix"){vmax = (Double_t)1.;}
02302       if(chqcode == "H2CorccInStins" ){vmax = (Double_t)0.05;}
02303       
02304       if(chqcode == "D_NOE_ChNb"){vmax = (Double_t)500.;}
02305       if(chqcode == "D_Ped_ChNb"){vmax = (Double_t)500.;}
02306       if(chqcode == "D_TNo_ChNb"){vmax = (Double_t)5.;}
02307       if(chqcode == "D_LFN_ChNb"){vmax = (Double_t)5.;}
02308       if(chqcode == "D_HFN_ChNb"){vmax = (Double_t)5.;}
02309       if(chqcode == "D_MCs_ChNb"){vmax = (Double_t)1.;}
02310       if(chqcode == "D_SCs_ChNb"){vmax = (Double_t)2.5;}
02311 
02312       if(chqcode == "D_NOE_ChDs"){vmax = (Double_t)1000.;}
02313       if(chqcode == "D_Ped_ChDs"){vmax = (Double_t)1000.;}
02314       if(chqcode == "D_TNo_ChDs"){vmax = (Double_t)1000.;}
02315       if(chqcode == "D_LFN_ChDs"){vmax = (Double_t)1000.;}
02316       if(chqcode == "D_HFN_ChDs"){vmax = (Double_t)1000.;}
02317       if(chqcode == "D_MCs_ChDs"){vmax = (Double_t)1000.;}
02318       if(chqcode == "D_SCs_ChDs"){vmax = (Double_t)1000.;}
02319 
02320       if(chqcode == "D_MSp_Samp"){vmax = (Double_t)500.;}
02321       if(chqcode == "D_SSp_Samp"){vmax = (Double_t)5.;}
02322       
02323       if(chqcode == "D_Adc_EvNb"){vmax = (Double_t)500.;}
02324       if(chqcode == "D_Adc_EvDs"){vmax = (Double_t)500.;}
02325 
02326       if(chqcode == "H_Ped_Date"){vmax = (Double_t)500.;}
02327       if(chqcode == "H_TNo_Date"){vmax = (Double_t)5.;}
02328       if(chqcode == "H_LFN_Date"){vmax = (Double_t)5.;}
02329       if(chqcode == "H_HFN_Date"){vmax = (Double_t)5.;}
02330       if(chqcode == "H_MCs_Date"){vmax = (Double_t)1.;}
02331       if(chqcode == "H_SCs_Date"){vmax = (Double_t)0.5;}
02332 
02333       if(chqcode == "H_Ped_RuDs"){vmax = (Double_t)1000.;}
02334       if(chqcode == "H_TNo_RuDs"){vmax = (Double_t)1000.;}
02335       if(chqcode == "H_LFN_RuDs"){vmax = (Double_t)1000.;}
02336       if(chqcode == "H_HFN_RuDs"){vmax = (Double_t)1000.;}
02337       if(chqcode == "H_MCs_RuDs"){vmax = (Double_t)1000.;}
02338       if(chqcode == "H_SCs_RuDs"){vmax = (Double_t)1000.;}
02339     }
02340   return vmax;
02341 }
02342 //================== End of TEcnaParHistos.cc ========================