#include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TCnaViewEB.h"
#include "TGaxis.h"
#include "TRootCanvas.h"
#include "TH2D.h"
#include "TF1.h"
#include "TStyle.h"
Go to the source code of this file.
Defines | |
#define | DEUP |
#define | DIRN |
#define | SENB |
Functions | |
ClassImp (TCnaViewEB) TCnaViewEB |
#define DEUP |
#define DIRN |
#define SENB |
ClassImp | ( | TCnaViewEB | ) |
Definition at line 13 of file TCnaViewEB.cc.
00020 : 00021 // 1D, 2D and 3D histograms for different quantities (pedestals, noises, 00022 // correlations, .etc..). The data are read from files which has been 00023 // previously written by using the class TCnaRunEB (.root result files). 00024 // The reading is performed by appropriate methods of the class TCnaReadEB. 00025 // 00026 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00027 // 00028 // Class TCnaViewEB: Example of use: 00029 // 00030 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00031 // 00032 // TCnaViewEB* MyView = = new TCnaViewEB(); 00033 // 00034 // //--> Gives the file parameters 00035 // 00036 // TString AnalysisName = "TB2006_1"; 00037 // Int_t RunNumber = 16467; 00038 // Int_t FirstTakenEvt = 0; 00039 // Int_t NbOfTakenEvts = 150; 00040 // Int_t SMNumber = 6; 00041 // 00042 // MyView->GetPathForResultsRootFiles("my_cna_config.cfg"); 00043 // or: MyView->GetPathForResultsRootFiles(); // (see explanations after this example) 00044 // 00045 // //--> Specify the file which has to be read (previously written by TCnaRunEB) 00046 // 00047 // MyView->SetFile(AnalysisName, RunNumber, FirstTakenEvt, NbOfTakenEvts, SMNumber); 00048 // 00049 // //--> Plot covariance matrix between crystals of towers 10 and 33 00050 // // (mean over samples) 00051 // 00052 // Int_t SMtower_X = 10; 00053 // Int_t SMtower_Y = 33; 00054 // 00055 // MyView->CovariancesBetweenCrystals(SMtower_X, SMtower_Y, "LEGO2Z"); 00056 // 00057 // //--> Plot correlation matrices between samples 00058 // // for channel 21 (electronic channel number in tower) 00059 // // and for the two towers 10 and 33 00060 // 00061 // Int_t TowEcha = 21; 00062 // 00063 // MyView->CorrelationsBetweenSamples(SMtower_X, TowEcha, "SURF1Z"); 00064 // MyView->CorrelationsBetweenSamples(SMtower_Y, TowEcha, "SURF1Z"); 00065 // 00066 // //--> Plot histogram of the mean sigmas for tower 38 and channel 12 00067 // (electronic channel number in tower) as a function of time 00068 // 00069 // MyView->GetPathForListOfRunFiles(); // (see explanations after this example) 00070 // 00071 // Int_t SMtower = 38; 00072 // Int_t TowEcha = 12; 00073 // TString run_par_file_name = "CnP_SM6_evol_burst1.ascii"; 00074 // MyView->HistimeCrystalMeanSigmas(run_par_file_name, SMtower, TowEcha, "SEVERAL"); 00075 // 00076 // // the .ascii file "CnP_SM6_evol_burst1.ascii" must contain a list of 00077 // // the different runs with mention of their parameters (see below). 00078 // 00079 // etc... 00080 // 00081 //------------------------------------------------------------------------------------------ 00082 // Explanations for the methods GetPathForResultsRootFiles(const TString), 00083 // GetPathForResultsAsciiFiles(const TString) and GetPathForListOfRunFiles(const TString) 00084 // 00085 // //.......... method GetPathForResultsRootFiles(const TString) 00086 // 00087 // If the argument is specified, it is the name of a "cna-configuration" file. 00088 // This file must be present in the user's HOME directory and must have one line 00089 // which contains the path (without slash at the end) of the directory 00090 // where the .root result files (previously written with a program calling TCnaRunEB) 00091 // are located. 00092 // 00093 // If no argument is specified (DEFAULT), the name of the configuration file is considered 00094 // to be: "cna_results_root.cfg" and the file must be created in the user's HOME directory. 00095 // 00096 // EXAMPLE of configuration file content (1 line): $HOME/scratch0/cna/results_root 00097 // (without slash at the end !) 00098 // The .root result files are located in the directory $HOME/scratch0/cna/results_root 00099 // 00100 // //.......... method GetPathForResultsRootFiles(const TString) 00101 // 00102 // Same as GetPathForResultsRootFiles(const TString). The name of the DEFAULT configuration 00103 // file is considered to be: "cna_results_ascii.cfg" and the file must be created in the 00104 // user's HOME directory. 00105 // 00106 // EXAMPLE of configuration file content (1 line): $HOME/scratch0/cna/results_ascii 00107 // (without slash at the end !) 00108 // The .ascii result files are located in the directory $HOME/scratch0/cna/results_ascii 00109 // 00110 // //.......... method GetPathForListOfRunFiles(const TString) 00111 // The name of the DEFAULT configuration file is considered to be: "cna_stability.cfg" 00112 // and the file must be created in the user's HOME directory. 00113 // 00114 // EXAMPLE of configuration file content (1 line): $HOME/scratch0/cna/runlist_time_evol 00115 // (without slash at the end !) 00116 // The .ascii "list of runs" files are located in the directory $HOME/scratch0/cna/runlist_time_evol 00117 // 00118 // 00119 // //.......... SYNTAX OF THE FILE "CnP_SM6_evol_burst1.ascii" ("list of runs" file): 00120 // 00121 // CnP_SM6_evol_burst1.ascii <- 1rst line: comment (name of the file, for example) 00122 // 5 <- 2nd line: nb of lines after this one 00123 // ped 73677 0 150 10 <- 3rd line and others: run parameters 00124 // ped 73688 0 150 10 (Analysis name, run number, first taken event, 00125 // ped 73689 0 150 10 number of taken events, SM number) 00126 // ped 73690 0 150 10 00127 // ped 73692 0 150 10 00128 // 00129 //--------------------------------------------------------------------------------------- 00130 // 00131 //---------------------------------- LIST OF METHODS ------------------------------------ 00132 // 00133 // //................. (Eta,Phi) SM plots 00134 // 00135 // void EtaPhiSuperModuleFoundEvents(); 00136 // void EtaPhiSuperModuleMeanPedestals(); 00137 // void EtaPhiSuperModuleMeanOfSampleSigmas(); 00138 // void EtaPhiSuperModuleMeanOfCorss(); 00139 // void EtaPhiSuperModuleSigmaPedestals(); 00140 // void EtaPhiSuperModuleSigmaOfSampleSigmas(); 00141 // void EtaPhiSuperModuleSigmaOfCorss(); 00142 // void EtaPhiSuperModuleCorccMeanOverSamples(); 00143 // 00144 // //................. Correlation and covariances matrices 00145 // 00146 // draw_option = ROOT options for 2D histos: "COLZ", "LEGO2Z", "SURF1Z", "SURF4" 00147 // 00148 // void CorrelationsBetweenTowers(const TString draw_option); 00149 // void CovariancesBetweenTowers (const TString draw_option)); 00150 // void CorrelationsBetweenCrystals(const Int_t& towerX, const Int_t& towerY, const TString draw_option); 00151 // void CovariancesBetweenCrystals (const Int_t& towerX, const Int_t& towerY, const TString draw_option); 00152 // void CorrelationsBetweenSamples (const Int_t& tower, const Int_t& TowEcha, const TString draw_option); 00153 // void CovariancesBetweenSamples (const Int_t& tower, const Int_t& TowEcha, const TString draw_option); 00154 // 00155 // void CorrelationsBetweenSamples(const Int_t& SMtower); 00156 // void CovariancesBetweenSamples (const Int_t& SMtower); 00157 // 00158 // //................. Channel and tower numbering plots 00159 // 00160 // void TowerCrystalNumbering(const Int_t& SM_number, const Int_t& SMtower); 00161 // void SuperModuleTowerNumbering(const Int_t& SM_number); 00162 // 00163 // //................. Histograms 00164 // 00165 // plot_option: "ONLYONE": only one plot, 00166 // "SEVERAL": superimposed plots (same as the option "SAME" in ROOT) 00167 // 00168 // void HistoSuperModuleFoundEventsOfCrystals(const TString plot_option); 00169 // void HistoSuperModuleFoundEventsDistribution(const TString plot_option); 00170 // void HistoSuperModuleMeanPedestalsOfCrystals(const TString plot_option); 00171 // void HistoSuperModuleMeanPedestalsDistribution(const TString plot_option); 00172 // 00173 // "OfCrystal": X axis = crystal number 00174 // void HistoSuperModuleMeanOfSampleSigmasOfCrystals(const TString plot_option); 00175 // void HistoSuperModuleMeanOfCorssOfCrystals(const TString plot_option); 00176 // void HistoSuperModuleSigmaPedestalsOfCrystals(const TString plot_option); 00177 // void HistoSuperModuleSigmaOfSampleSigmasOfCrystals(const TString plot_option); 00178 // void HistoSuperModuleSigmaOfCorssOfCrystals(const TString plot_option); 00179 // 00180 // "Distribution": projection on Y axis 00181 // void HistoSuperModuleMeanOfSampleSigmasDistribution(const TString plot_option); 00182 // void HistoSuperModuleMeanOfCorssDistribution(const TString plot_option); 00183 // void HistoSuperModuleSigmaPedestalsDistribution(const TString plot_option); 00184 // void HistoSuperModuleSigmaOfSampleSigmasDistribution(const TString plot_option); 00185 // void HistoSuperModuleSigmaOfCorssDistribution(const TString plot_option); 00186 // 00187 // void HistoCrystalExpectationValuesOfSamples 00188 // (const Int_t& Tower, const Int_t& TowEcha, const TString plot_option); 00189 // void HistoCrystalSigmasOfSamples 00190 // (const Int_t& Tower, const Int_t& TowEcha, const TString plot_option); 00191 // void HistoCrystalPedestalEventNumber 00192 // (const Int_t& Tower, const Int_t& TowEcha, const TString plot_option); 00193 // 00194 // void HistoSampleEventDistribution (const Int_t& SMower, const Int_t& TowEcha, 00195 // const Int_t& sample, const TString plot_option); 00196 // 00197 // 00198 // //............... Histograms for evolution, stability 00199 // 00200 // For these histograms, a "cna-configuration file" must be used (see the example above). 00201 // 00202 // HistimeCrystalMeanPedestals(const TString file_name, const Int_t& SMtower, 00203 // const Int_t& TowEcha, const TString plot_option) 00204 // HistimeCrystalMeanSigmas(const TString file_name, const Int_t& SMtower, 00205 // const Int_t& TowEcha, const TString plot_option) 00206 // HistimeCrystalMeanCorss(const TString file_name, const Int_t& SMtower, 00207 // const Int_t& TowEcha, const TString plot_option) 00208 // 00209 // 00210 //------------------------------------------------------------------------- 00211 // 00212 // For more details on other classes of the CNA package: 00213 // 00214 // https://www.cern.ch/cms-fabbro/cna 00215 // 00216 //------------------------------------------------------------------------- 00217 // 00218 00219 //------------------------------ TCnaViewEB.cxx ----------------------------- 00220 // 00221 // Creation (first version): 18 April 2005 00222 // 00223 // For questions or comments, please send e-mail to Bernard Fabbro: 00224 // 00225 // fabbro@hep.saclay.cea.fr 00226 // 00227 //------------------------------------------------------------------------ 00228 00229 00230 //---------------> message de rappel pour l'auteur: 00231 // 00232 //======= A T T E N T I O N ========= A T T E N T I O N ========= A T T E N T I O N ==============!!!! 00233 // A EVITER ABSOLUMENT CAR LE cin >> BLOQUE EXCEED quand on est sous TCnaDialogEB 00234 // puisqu'on n'a pas la main dans la fenetre de compte-rendu de la CNA 00235 // {Int_t cintoto; cout << "taper 0 pour continuer" << endl; cin >> cintoto;} 00236 // *=============================================* 00237 // | | 00238 //+++++++++++++++++++++++++| A T T E N T I O N: PAS DE cintoto ici! |++++++++++++++++++++++++!!!! 00239 // | | 00240 // *=============================================* 00241 00242 // 00243 00244 TCnaViewEB::~TCnaViewEB() 00245 { 00246 //destructor 00247 00248 if (fT1DAnaType != 0){delete [] fT1DAnaType; fCdelete++;} 00249 if (fT1DRunNumber != 0){delete [] fT1DRunNumber; fCdelete++;} 00250 if (fT1DFirstEvt != 0){delete [] fT1DFirstEvt; fCdelete++;} 00251 if (fT1DNbOfEvts != 0){delete [] fT1DNbOfEvts; fCdelete++;} 00252 if (fT1DSuMoNumber != 0){delete [] fT1DSuMoNumber; fCdelete++;} 00253 if (fT1DResultsRootFilePath != 0){delete [] fT1DResultsRootFilePath; fCdelete++;} 00254 if (fT1DListOfRunsFilePath != 0){delete [] fT1DListOfRunsFilePath; fCdelete++;} 00255 00256 if (fParameters != 0){delete fParameters; fCdelete++;} 00257 }