Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:45

0001 //################## EcnaHistosExample2.cc ####################
0002 // B. Fabbro      04/07/2011
0003 //
0004 //   Drawing Histos with and without TEcnaRead and calls to ViewHisto(...)
0005 
0006 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaHistos.h"
0007 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h"
0008 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParEcal.h"
0009 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h"
0010 
0011 #include "Riostream.h"
0012 #include "TROOT.h"
0013 #include "TApplication.h"
0014 #include "TGClient.h"
0015 #include "TRint.h"
0016 #include <cstdlib>
0017 
0018 //extern void InitGui();
0019 //VoidFuncPtr_t initfuncs[] = { InitGui, 0 };
0020 //TROOT root("GUI","GUI test environnement", initfuncs);
0021 
0022 #include <stdlib.h>
0023 #include <string>
0024 #include "TSystem.h"
0025 #include "TObject.h"
0026 
0027 using namespace std;
0028 
0029 int main(int argc, char** argv) {
0030   //--------------------------------------------------------------------
0031   //                      Init
0032   //--------------------------------------------------------------------
0033 
0034   std::cout << "*EcalCorrelatedNoiseExampleHistos> Starting ROOT session" << std::endl;
0035   TRint theApp("App", &argc, argv);
0036 
0037   TString fTTBELL = "\007";
0038 
0039   //.............. Default values
0040   TString fKeyAnaType = "StdPeg12";  // Analysis name
0041   Int_t fKeyNbOfSamples = 10;        // Number of required samples
0042   Int_t fKeyRunNumber = 136098;      // Run number
0043   Int_t fKeyFirstEvt = 1;            // First required event number
0044   Int_t fKeyLastEvt = 0;             // Last required event number
0045   Int_t fKeyNbOfEvts = 150;          // Required number of events
0046   Int_t fKeySuMoNumber = 11;         // Super-module number (EB)
0047   Int_t fKeyDeeNumber = 1;           // Dee number (EE)
0048 
0049   Int_t xAlreadyRead = 1;
0050 
0051   //========================================================================
0052 
0053   TEcnaObject* myTEcnaManagerEB = new TEcnaObject();
0054   TEcnaParPaths* fEcnaParPathsEB = new TEcnaParPaths(myTEcnaManagerEB);
0055 
0056   TEcnaObject* myTEcnaManagerEE = new TEcnaObject();
0057   TEcnaParPaths* fEcnaParPathsEE = new TEcnaParPaths(myTEcnaManagerEE);
0058 
0059   if (fEcnaParPathsEB->GetPaths() == kTRUE && fEcnaParPathsEE->GetPaths() == kTRUE) {
0060     //=====================================================================
0061     //
0062     //                TEST TEcnaRead and TEcnaHistos for EB
0063     //
0064     //=====================================================================
0065     Int_t SMtower = 1;
0066     Int_t TowEcha = 0;
0067     Int_t n1Sample = 4;
0068 
0069     //  Int_t DeeSC   = 1;
0070     //  Int_t SCEcha  = 0;
0071 
0072     fKeyAnaType = "StdPeg12";
0073     fKeyNbOfSamples = 10;
0074     fKeyRunNumber = 136098;
0075     fKeyFirstEvt = 1;
0076     fKeyLastEvt = 0;
0077     fKeyNbOfEvts = 150;
0078     fKeySuMoNumber = 32;
0079 
0080     TEcnaParEcal* fEcalParEB = new TEcnaParEcal(myTEcnaManagerEB, "EB");
0081     TEcnaRead* fMyRootFileEB = new TEcnaRead(myTEcnaManagerEB, "EB");
0082 
0083     TEcnaHistos* MyHistosEB = new TEcnaHistos(myTEcnaManagerEB, "EB");
0084 
0085 #define HGLO
0086 #ifdef HGLO
0087     //==================================================== Test Plot1DHisto SM
0088     fMyRootFileEB->PrintNoComment();
0089     fMyRootFileEB->FileParameters(fKeyAnaType,
0090                                   fKeyNbOfSamples,
0091                                   fKeyRunNumber,
0092                                   fKeyFirstEvt,
0093                                   fKeyLastEvt,
0094                                   fKeyNbOfEvts,
0095                                   fKeySuMoNumber,
0096                                   fEcnaParPathsEB->ResultsRootFilePath().Data());
0097 
0098     if (fMyRootFileEB->LookAtRootFile() == kTRUE) {
0099       MyHistosEB->FileParameters(fMyRootFileEB);
0100       MyHistosEB->GeneralTitle("EcnaHistosExample2");
0101       TVectorD read_h_tno(fEcalParEB->MaxCrysInSM());
0102       TVectorD read_h_lfn(fEcalParEB->MaxCrysInSM());
0103       TVectorD read_h_hfn(fEcalParEB->MaxCrysInSM());
0104 
0105       read_h_tno = fMyRootFileEB->Read1DHisto(fEcalParEB->MaxCrysInSM(), "TotalNoise", "SuperModule");
0106       read_h_lfn = fMyRootFileEB->Read1DHisto(fEcalParEB->MaxCrysInSM(), "lfn", "SM");
0107       read_h_hfn = fMyRootFileEB->Read1DHisto(fEcalParEB->MaxCrysInSM(), "high frequency noise", "SM");
0108 
0109       MyHistosEB->FileParameters(fMyRootFileEB);
0110 
0111       MyHistosEB->SetHistoMax(3.5);
0112       MyHistosEB->SetHistoScaleY("LOG");
0113       MyHistosEB->NewCanvas("SAME n");
0114       MyHistosEB->Plot1DHisto(read_h_tno, "TNo", "NbOfXtals", "SM", "SAME n");
0115       MyHistosEB->Plot1DHisto(read_h_lfn, "LFN", "NOX", "SM", "SAME n");
0116       MyHistosEB->Plot1DHisto(read_h_hfn, "HFN", "NOX", "SM", "SAME n");
0117     } else {
0118       std::cout << "!EcnaHistosExample2> *ERROR* =====> "
0119                 << " ROOT file not found" << fTTBELL << std::endl;
0120     }
0121 
0122 #endif  //  HGLO
0123 
0124     MyHistosEB->SetHistoScaleY("LIN");
0125 
0126 #define HBAE
0127 #ifdef HBAE
0128     fKeyAnaType = "AdcPeg12";
0129     fMyRootFileEB->FileParameters(fKeyAnaType,
0130                                   fKeyNbOfSamples,
0131                                   fKeyRunNumber,
0132                                   fKeyFirstEvt,
0133                                   fKeyLastEvt,
0134                                   fKeyNbOfEvts,
0135                                   fKeySuMoNumber,
0136                                   fEcnaParPathsEB->ResultsRootFilePath().Data());
0137 
0138     if (fMyRootFileEB->LookAtRootFile() == kTRUE) {
0139       TVectorD read_histo(fKeyNbOfEvts);
0140       read_histo = fMyRootFileEB->Read1DHisto(fKeyNbOfEvts, "AdcValue", SMtower, TowEcha, n1Sample);
0141       MyHistosEB->FileParameters(fMyRootFileEB);
0142       MyHistosEB->SetHistoMin(125.);
0143       MyHistosEB->Plot1DHisto(read_histo, "Event", "ADC", SMtower, TowEcha, n1Sample);
0144       MyHistosEB->Plot1DHisto(read_histo, "Adc", "NbOfEvts", SMtower, TowEcha, n1Sample);
0145     } else {
0146       std::cout << "!EcnaHistosExample2> *ERROR* =====> "
0147                 << " ROOT file not found" << fTTBELL << std::endl;
0148     }
0149 #endif  // HBAE
0150 
0151 #define PMCC
0152 #ifdef PMCC
0153     fKeyAnaType = "SccPeg12";
0154     fKeyRunNumber = 136098;
0155     fKeySuMoNumber = 1;
0156     fMyRootFileEB->FileParameters(fKeyAnaType,
0157                                   fKeyNbOfSamples,
0158                                   fKeyRunNumber,
0159                                   fKeyFirstEvt,
0160                                   fKeyLastEvt,
0161                                   fKeyNbOfEvts,
0162                                   fKeySuMoNumber,
0163                                   fEcnaParPathsEB->ResultsRootFilePath().Data());
0164 
0165     if (fMyRootFileEB->LookAtRootFile() == kTRUE) {
0166       TMatrixD read_matrix(fEcalParEB->MaxTowInSM(), fEcalParEB->MaxTowInSM());
0167       read_matrix = fMyRootFileEB->ReadMatrix(fEcalParEB->MaxTowInSM(), "Cor", "HFBetweenTowers");
0168       MyHistosEB->FileParameters(fMyRootFileEB);
0169       MyHistosEB->PlotMatrix(read_matrix, "Cor", "HFBetweenTowers");
0170     } else {
0171       std::cout << "!EcnaHistosExample2> *ERROR* =====> "
0172                 << " ROOT file not found" << fTTBELL << std::endl;
0173     }
0174 #endif  // PMCC
0175 
0176     fKeyAnaType = "StdPeg12";
0177 
0178 #define HBAS
0179 #ifdef HBAS
0180 
0181     fKeyRunNumber = 136098;
0182     //==================================================== Test Plot1DHisto samples
0183     fMyRootFileEB->FileParameters(fKeyAnaType,
0184                                   fKeyNbOfSamples,
0185                                   fKeyRunNumber,
0186                                   fKeyFirstEvt,
0187                                   fKeyLastEvt,
0188                                   fKeyNbOfEvts,
0189                                   fKeySuMoNumber,
0190                                   fEcnaParPathsEB->ResultsRootFilePath().Data());
0191 
0192     if (fMyRootFileEB->LookAtRootFile() == kTRUE) {
0193       TVectorD read_histo_2(fEcalParEB->MaxCrysInTow() * fEcalParEB->MaxSampADC());
0194       TVectorD read_histo_samps(fEcalParEB->MaxSampADC());
0195 
0196       MyHistosEB->FileParameters(fMyRootFileEB);
0197 
0198       std::cout << "EcnahistosExample2> *************** Plot1DHisto 1 crystal ONLYONE  ******************" << std::endl;
0199       TowEcha = 12;
0200       read_histo_2 =
0201           fMyRootFileEB->Read1DHisto(fEcalParEB->MaxCrysInTow() * fEcalParEB->MaxSampADC(), "SigmaOfSamples", SMtower);
0202 
0203       std::cout << "*EcnaHistosExample2> channel " << std::setw(2) << TowEcha << ": ";
0204       for (Int_t i0_samp = 0; i0_samp < fEcalParEB->MaxSampADC(); i0_samp++) {
0205         read_histo_samps(i0_samp) = read_histo_2(TowEcha * fEcalParEB->MaxSampADC() + i0_samp);
0206         std::cout << std::setprecision(4) << std::setw(8) << read_histo_samps(i0_samp) << ", ";
0207       }
0208       std::cout << std::endl;
0209 
0210       MyHistosEB->Plot1DHisto(read_histo_samps, "Sample", "SSp", SMtower, TowEcha);
0211 
0212       std::cout << "EcnahistosExample2> ***************** Plot1DHisto 1 crystal ONLYONE  ****************" << std::endl;
0213       MyHistosEB->Plot1DHisto("Sample", "SSp", SMtower, TowEcha);
0214 
0215       std::cout << "EcnahistosExample2> ******************** All Xtals Plot1DHisto **********************" << std::endl;
0216       SMtower = 59;
0217       read_histo_2 =
0218           fMyRootFileEB->Read1DHisto(fEcalParEB->MaxCrysInTow() * fEcalParEB->MaxSampADC(), "SampleMean", SMtower);
0219 
0220       // => BUG SCRAM? (pas vu a la compilation si methode Plot1DHisto absente avec ces arguments; plantage a l'execution
0221       MyHistosEB->SetHistoMin(180.);
0222       MyHistosEB->SetHistoMax(220.);
0223       MyHistosEB->Plot1DHisto(read_histo_2, "Sample#", "SampleMean", SMtower);
0224 
0225       std::cout << "EcnahistosExample2> ****************** Plot1DHisto 1 crystal SAME *******************" << std::endl;
0226 
0227       TowEcha = 13;
0228       std::cout << "*EcnaHistosExample2> channel " << std::setw(2) << TowEcha << ": ";
0229       for (Int_t i0_samp = 0; i0_samp < fEcalParEB->MaxSampADC(); i0_samp++) {
0230         read_histo_samps(i0_samp) = read_histo_2(TowEcha * fEcalParEB->MaxSampADC() + i0_samp);
0231         std::cout << std::setprecision(4) << std::setw(8) << read_histo_samps(i0_samp) << ", ";
0232       }
0233       std::cout << std::endl;
0234       MyHistosEB->SetHistoMin(180.);
0235       MyHistosEB->SetHistoMax(220.);
0236       MyHistosEB->Plot1DHisto(read_histo_samps, "Sample", "SampleMean", SMtower, TowEcha, "SAME");
0237 
0238       TowEcha = 14;
0239       std::cout << "*EcnaHistosExample2> channel " << std::setw(2) << TowEcha << ": ";
0240       for (Int_t i0_samp = 0; i0_samp < fEcalParEB->MaxSampADC(); i0_samp++) {
0241         read_histo_samps(i0_samp) = read_histo_2(TowEcha * fEcalParEB->MaxSampADC() + i0_samp);
0242         std::cout << std::setprecision(4) << std::setw(8) << read_histo_samps(i0_samp) << ", ";
0243       }
0244       std::cout << std::endl;
0245       MyHistosEB->Plot1DHisto(read_histo_samps, "SampleNumber", "SampleMean", SMtower, TowEcha, "SAME");
0246 
0247       TowEcha = 15;
0248       std::cout << "*EcnaHistosExample2> channel " << std::setw(2) << TowEcha << ": ";
0249       for (Int_t i0_samp = 0; i0_samp < fEcalParEB->MaxSampADC(); i0_samp++) {
0250         read_histo_samps(i0_samp) = read_histo_2(TowEcha * fEcalParEB->MaxSampADC() + i0_samp);
0251         std::cout << std::setprecision(4) << std::setw(8) << read_histo_samps(i0_samp) << ", ";
0252       }
0253       std::cout << std::endl;
0254       MyHistosEB->Plot1DHisto(read_histo_samps, "Sample#", "SampleMean", SMtower, TowEcha, "SAME");
0255 
0256       std::cout << "EcnahistosExample2> ******************** Plot1DHisto 1 crystal ONLYONE **************" << std::endl;
0257       MyHistosEB->SetHistoMin(180.);
0258       MyHistosEB->SetHistoMax(220.);
0259       MyHistosEB->Plot1DHisto(read_histo_samps, "Sample", "SampMean", SMtower, TowEcha);
0260     } else {
0261       std::cout << "!EcnaHistosExample2> *ERROR* =====> "
0262                 << " ROOT file not found" << fTTBELL << std::endl;
0263     }
0264 
0265 #endif  // NODR
0266 
0267 #define VMAT
0268 #ifdef VMAT
0269     //==================================================== Test PlotMatrix, ViewMatrix
0270 
0271     SMtower = 22;
0272     TowEcha = 15;
0273 
0274     xAlreadyRead = 1;
0275     if (xAlreadyRead == 1) {
0276       fMyRootFileEB->FileParameters(fKeyAnaType,
0277                                     fKeyNbOfSamples,
0278                                     fKeyRunNumber,
0279                                     fKeyFirstEvt,
0280                                     fKeyLastEvt,
0281                                     fKeyNbOfEvts,
0282                                     fKeySuMoNumber,
0283                                     fEcnaParPathsEB->ResultsRootFilePath().Data());
0284 
0285       if (fMyRootFileEB->LookAtRootFile() == kTRUE) {
0286         TMatrixD read_matrix_sample(fEcalParEB->MaxSampADC(), fEcalParEB->MaxSampADC());
0287         read_matrix_sample = fMyRootFileEB->ReadMatrix(fEcalParEB->MaxSampADC(), "cor", "samples", SMtower, TowEcha);
0288 
0289         MyHistosEB->FileParameters(fMyRootFileEB);
0290 
0291         MyHistosEB->PlotMatrix(read_matrix_sample, "Cor", "Mss", SMtower, TowEcha);
0292         MyHistosEB->PlotMatrix(read_matrix_sample, "Cor", "Mss", SMtower, TowEcha, "SURF1Z");
0293       } else {
0294         std::cout << "!EcnaHistosExample2> *ERROR* =====> "
0295                   << " ROOT file not found" << fTTBELL << std::endl;
0296       }
0297     }
0298 
0299     SMtower = 51;
0300     TowEcha = 9;
0301 
0302     xAlreadyRead = 0;
0303     if (xAlreadyRead == 0) {
0304       MyHistosEB->FileParameters(
0305           fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstEvt, fKeyLastEvt, fKeyNbOfEvts, fKeySuMoNumber);
0306       MyHistosEB->PlotMatrix("Cor", "Mss", SMtower, TowEcha, "SURF4");
0307       MyHistosEB->PlotMatrix("Cor", "Mss", SMtower, TowEcha, "LEGO2Z");
0308     }
0309 #endif  // VMAT
0310 
0311 #define VSTX
0312 #ifdef VSTX
0313     //==================================================== Test PlotDetector, ViewStex
0314 
0315     xAlreadyRead = 1;
0316     if (xAlreadyRead == 1) {
0317       fKeySuMoNumber = 18;
0318       fMyRootFileEB->FileParameters(fKeyAnaType,
0319                                     fKeyNbOfSamples,
0320                                     fKeyRunNumber,
0321                                     fKeyFirstEvt,
0322                                     fKeyLastEvt,
0323                                     fKeyNbOfEvts,
0324                                     fKeySuMoNumber,
0325                                     fEcnaParPathsEB->ResultsRootFilePath().Data());
0326 
0327       if (fMyRootFileEB->LookAtRootFile() == kTRUE) {
0328         MyHistosEB->FileParameters(fMyRootFileEB);
0329         MyHistosEB->PlotDetector(fMyRootFileEB->ReadLowFrequencyNoise(fEcalParEB->MaxCrysInSM()), "LFN", "SM");
0330       } else {
0331         std::cout << "!EcnaHistosExample2> *ERROR* =====> "
0332                   << " ROOT file not found" << fTTBELL << std::endl;
0333       }
0334     }
0335 
0336     xAlreadyRead = 0;
0337     if (xAlreadyRead == 0) {
0338       fKeySuMoNumber = 18;
0339       MyHistosEB->FileParameters(
0340           fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstEvt, fKeyLastEvt, fKeyNbOfEvts, fKeySuMoNumber);
0341 
0342       MyHistosEB->PlotDetector("HFN", "SM");
0343     }
0344 #endif  // VSTX
0345 
0346 #define VSTS
0347 #ifdef VSTS
0348     //==================================================== Test PlotDetector, ViewStas
0349 
0350     xAlreadyRead = 1;
0351     if (xAlreadyRead == 1) {
0352       fMyRootFileEB->FileParameters(fKeyAnaType,
0353                                     fKeyNbOfSamples,
0354                                     fKeyRunNumber,
0355                                     fKeyFirstEvt,
0356                                     fKeyLastEvt,
0357                                     fKeyNbOfEvts,
0358                                     fKeySuMoNumber,
0359                                     fEcnaParPathsEB->ResultsRootFilePath().Data());
0360 
0361       if (fMyRootFileEB->LookAtRootFile() == kTRUE) {
0362         TVectorD read_eb_histo(fEcalParEB->MaxTowInEB());
0363         MyHistosEB->FileParameters(fMyRootFileEB);
0364 
0365         MyHistosEB->SetHistoMax(3.5);
0366         MyHistosEB->SetHistoScaleY("LIN");
0367         MyHistosEB->NewCanvas("SAME n");
0368         read_eb_histo = fMyRootFileEB->Read1DHisto(fEcalParEB->MaxTowInEB(), "TNo", "EB");
0369         MyHistosEB->Plot1DHisto(read_eb_histo, "Tow", "TNo", "EB", "SAME n");
0370         read_eb_histo = fMyRootFileEB->Read1DHisto(fEcalParEB->MaxTowInEB(), "LFN", "EB");
0371         MyHistosEB->Plot1DHisto(read_eb_histo, "Tow", "LFN", "EB", "SAME n");
0372         read_eb_histo = fMyRootFileEB->Read1DHisto(fEcalParEB->MaxTowInEB(), "HFN", "EB");
0373         MyHistosEB->Plot1DHisto(read_eb_histo, "Tow", "HFN", "EB", "SAME n");
0374       } else {
0375         std::cout << "!EcnaHistosExample2> *ERROR* =====> "
0376                   << " ROOT file not found" << fTTBELL << std::endl;
0377       }
0378     }
0379 
0380     xAlreadyRead = 0;
0381     if (xAlreadyRead == 0) {
0382       MyHistosEB->FileParameters(
0383           fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstEvt, fKeyLastEvt, fKeyNbOfEvts, fKeySuMoNumber);
0384 
0385       MyHistosEB->Plot1DHisto("Tow", "TNo", "EB");
0386     }
0387 #endif  // VSTS
0388 
0389     //=====================================================================
0390     //
0391     //                TEST TEcnaHistos for EE
0392     //
0393     //=====================================================================
0394 
0395     TEcnaParEcal* fEcalParEE = new TEcnaParEcal(myTEcnaManagerEE, "EE");
0396     TEcnaRead* fMyRootFileEE = new TEcnaRead(myTEcnaManagerEE, "EE");
0397 
0398     TEcnaHistos* MyHistosEE = new TEcnaHistos(myTEcnaManagerEE, "EE");
0399 
0400     fKeyDeeNumber = 1;
0401     fKeyRunNumber = 161311;
0402 
0403     xAlreadyRead = 1;
0404     if (xAlreadyRead == 1) {
0405       fMyRootFileEE->FileParameters(fKeyAnaType,
0406                                     fKeyNbOfSamples,
0407                                     fKeyRunNumber,
0408                                     fKeyFirstEvt,
0409                                     fKeyLastEvt,
0410                                     fKeyNbOfEvts,
0411                                     fKeyDeeNumber,
0412                                     fEcnaParPathsEE->ResultsRootFilePath().Data());
0413 
0414       if (fMyRootFileEE->LookAtRootFile() == kTRUE) {
0415         TVectorD read_ee_histo(fEcalParEE->MaxSCInEE());
0416         MyHistosEE->FileParameters(fMyRootFileEE);
0417 
0418         MyHistosEE->SetHistoMax(3.5);
0419         MyHistosEE->SetHistoScaleY("LIN");
0420 #define HSAA
0421 #ifdef HSAA
0422         MyHistosEE->NewCanvas("SAME n");
0423         read_ee_histo = fMyRootFileEE->Read1DHisto(fEcalParEE->MaxSCInEE(), "TNo", "EE");
0424         MyHistosEE->Plot1DHisto(read_ee_histo, "SC", "TNo", "EE", "SAME n");
0425         read_ee_histo = fMyRootFileEE->Read1DHisto(fEcalParEE->MaxSCInEE(), "LFN", "EE");
0426         MyHistosEE->Plot1DHisto(read_ee_histo, "SC", "LFN", "EE", "SAME n");
0427         read_ee_histo = fMyRootFileEE->Read1DHisto(fEcalParEE->MaxSCInEE(), "HFN", "EE");
0428         MyHistosEE->Plot1DHisto(read_ee_histo, "SC", "HFN", "EE", "SAME n");
0429 #endif  // HSAA
0430         read_ee_histo = fMyRootFileEE->Read1DHisto(fEcalParEE->MaxSCInEE(), "TNo", "EE");
0431         MyHistosEE->StartStopDate(fMyRootFileEE->GetStartDate(), fMyRootFileEE->GetStopDate());
0432         MyHistosEE->Plot1DHisto(read_ee_histo, "SC", "TNo", "EE");
0433         MyHistosEE->PlotDetector(read_ee_histo, "TotalNoise", "EE");
0434       } else {
0435         std::cout << "!EcnaHistosExample2> *ERROR* =====> "
0436                   << " ROOT file not found" << fTTBELL << std::endl;
0437       }
0438     }
0439 
0440     xAlreadyRead = 0;
0441     if (xAlreadyRead == 0) {
0442       MyHistosEE->FileParameters(
0443           fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber, fKeyFirstEvt, fKeyLastEvt, fKeyNbOfEvts, fKeyDeeNumber);
0444 
0445       MyHistosEE->SetHistoMax(3.5);
0446       MyHistosEE->SetHistoScaleY("LIN");
0447 
0448 #define HSAB
0449 #ifdef HSAB
0450       MyHistosEE->NewCanvas("SAME n");
0451       MyHistosEE->Plot1DHisto("SC", "TNo", "EE", "SAME n");
0452       MyHistosEE->Plot1DHisto("SC", "LFN", "EE", "SAME n");
0453       MyHistosEE->Plot1DHisto("SC", "HFN", "EE", "SAME n");
0454 #endif  // HSAB
0455 
0456       MyHistosEE->Plot1DHisto("SC", "TNo", "EE");
0457       MyHistosEE->PlotDetector("TotalNoise", "EE");
0458     }
0459 
0460     //=====================================================================
0461     //
0462     //                            END OF  TEST
0463     //
0464     //=====================================================================
0465 
0466     std::cout << "*H4Cna(main)> End of the example. You can quit ROOT (.q)" << std::endl;
0467 
0468     Bool_t retVal = kTRUE;
0469     theApp.Run(retVal);
0470     std::cout << std::endl << "*EcalCorrelatedNoiseExampleHistos> Terminating ROOT session." << std::endl;
0471     theApp.Terminate(0);
0472     std::cout << "*EcalCorrelatedNoiseExampleHistos> Exiting main program." << std::endl;
0473     exit(0);
0474 
0475     delete MyHistosEB;  // always after exit(0) (because of TEcnaHistos::DoCanvasClosed())
0476     delete MyHistosEE;  // always after exit(0) (because of TEcnaHistos::DoCanvasClosed())
0477   }
0478 }