00001
00002
00003
00004
00005 #include "Riostream.h"
00006 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEBParameters.h"
00007
00008 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TCnaHeaderEB.h"
00009
00010 ClassImp(TCnaHeaderEB)
00011
00012
00013 TCnaHeaderEB::TCnaHeaderEB(){
00014
00015
00016 Init();
00017 }
00018
00019 TCnaHeaderEB::TCnaHeaderEB(Text_t *name, Text_t *title,
00020 TString typ_ana, const Int_t& run_number,
00021 const Int_t& first_evt, const Int_t& nb_of_taken_evts,
00022 const Int_t& super_module, const Int_t& nentries
00023 ):TNamed(name,title) {
00024
00025
00026
00027
00028
00029
00030 Init();
00031
00032 fTypAna = typ_ana;
00033 fRunNumber = run_number;
00034 fFirstEvt = first_evt;
00035 fNbOfTakenEvts = nb_of_taken_evts;
00036 fSuperModule = super_module;
00037
00038 fNentries = nentries;
00039
00040 fNbBinsSampTime = fNbOfTakenEvts;
00041 }
00042
00043
00044 TCnaHeaderEB::TCnaHeaderEB(Text_t *name, Text_t *title,
00045 TString typ_ana, const Int_t& run_number,
00046 const Int_t& first_evt, const Int_t& nb_of_taken_evts,
00047 const Int_t& super_module):TNamed(name,title) {
00048
00049
00050
00051
00052
00053
00054 Init();
00055
00056 fTypAna = typ_ana;
00057 fRunNumber = run_number;
00058 fFirstEvt = first_evt;
00059 fNbOfTakenEvts = nb_of_taken_evts;
00060 fSuperModule = super_module;
00061
00062 fNbBinsSampTime = fNbOfTakenEvts;
00063 }
00064
00065 TCnaHeaderEB::~TCnaHeaderEB() {
00066
00067
00068 }
00069
00070 void TCnaHeaderEB::Init() {
00071
00072
00073
00074
00075
00076
00077 fTypAna = "!Analysis name> no info";
00078 fRunNumber = (Int_t)0;
00079 fFirstEvt = (Int_t)0;
00080 fNbOfTakenEvts = (Int_t)0;
00081 fSuperModule = (Int_t)0;
00082 fStartTime = (time_t)0;
00083 fStopTime = (time_t)0;
00084 fStartDate = "!Start date> no info";
00085 fStopDate = "!Stop date> no info";
00086 fNentries = (Int_t)0;
00087
00088
00089
00090 TEBParameters* MyEcal = new TEBParameters(); fCnew++;
00091
00092 fMaxTowEtaInSM = MyEcal->fMaxTowEtaInSM;
00093 fMaxTowPhiInSM = MyEcal->fMaxTowPhiInSM;
00094 fMaxTowInSM = MyEcal->fMaxTowInSM;
00095 fMaxCrysInTow = MyEcal->fMaxCrysInTow;
00096 fMaxSampADC = MyEcal->fMaxSampADC;
00097 fMaxCrysInSM = MyEcal->fMaxCrysInSM;
00098
00099
00100 fNbBinsADC = (Int_t)100;
00101 fNbBinsSampTime = MyEcal->fMaxEvtsInBurstPedRun;
00102
00103
00104 delete MyEcal; fCdelete++;
00105
00106
00107 fTowerNumbersCalc = 0;
00108 fLastEvtNumberCalc = 0;
00109 fEvtNbInLoopCalc = 0;
00110 fSampTimeCalc = 0;
00111 fEvCalc = 0;
00112 fVarCalc = 0;
00113 fEvtsCalc = 0;
00114 fCovCssCalc = 0;
00115 fCorCssCalc = 0;
00116 fCovSccCalc = 0;
00117 fCorSccCalc = 0;
00118 fCovSccMosCalc = 0;
00119 fCorSccMosCalc = 0;
00120 fCovMosccMotCalc = 0;
00121 fCorMosccMotCalc = 0;
00122 fEvEvCalc = 0;
00123 fEvSigCalc = 0;
00124 fEvCorCssCalc = 0;
00125 fSigEvCalc = 0;
00126 fSigSigCalc = 0;
00127 fSigCorCssCalc = 0;
00128
00129 fSvCorrecCovCssCalc = 0;
00130 fCovCorrecCovCssCalc = 0;
00131 fCorCorrecCovCssCalc = 0;
00132 }
00133
00134 void TCnaHeaderEB::Print() {
00135
00136 cout << endl;
00137 cout << " Header parameters " << endl;
00138 cout << endl;
00139 cout << "Run number : " << fRunNumber << endl;
00140 cout << "First taken event : " << fFirstEvt << endl;
00141 cout << "Nb of taken events : " << fNbOfTakenEvts << endl;
00142 cout << "Super-module number : " << fSuperModule << endl;
00143 cout << "Time first taken event : " << fStartTime << endl;
00144 cout << "Time last taken event : " << fStopTime << endl;
00145 cout << "Date first taken event : " << fStartDate ;
00146 cout << "Date last taken event : " << fStopDate ;
00147 cout << "Number of entries : " << fNentries << endl;
00148 cout << endl;
00149 cout << "Max nb of towers in SM : " << fMaxTowInSM << endl;
00150 cout << "Max nN of crystals in tower : " << fMaxCrysInTow << endl;
00151 cout << " ( => Max nb of crystals in SM = " << fMaxCrysInSM << " ) " << endl;
00152 cout << endl;
00153 cout << "Max nb of samples ADC : " << fMaxSampADC << endl;
00154 cout << "Nb of bins for ADC distribs : " << fNbBinsADC << endl;
00155
00156 cout << "Nb of bins for sample/evt : " << fNbBinsSampTime << endl;
00157 cout << endl;
00158
00159 cout << " Header counters " << endl;
00160 cout << endl;
00161 cout << "Tower Numbers : "
00162 << fTowerNumbersCalc << endl;
00163 cout << "Numbers of found evts : "
00164 << fLastEvtNumberCalc << endl;
00165 cout << "Event numbers in loop of the data reading : "
00166 << fEvtNbInLoopCalc << endl;
00167 cout << "Samples as a function of time histograms : "
00168 << fSampTimeCalc << endl;
00169 cout << "Expectation values histogram : "
00170 << fEvCalc << endl;
00171 cout << "Variances histogram : "
00172 << fVarCalc << endl;
00173 cout << "Nb of events histograms (ADC's values) : "
00174 << fEvtsCalc << endl;
00175 cout << "Nb of (sample,sample) covariance matrices : "
00176 << fCovCssCalc << endl;
00177 cout << "Nb of (sample,sample) correlation matrices : "
00178 << fCorCssCalc << endl;
00179 cout << "Nb of (channel,channel) covariance matrices : "
00180 << fCovSccCalc << endl;
00181 cout << "Nb of (channel,channel) correlation matrices : "
00182 << fCorSccCalc << endl;
00183 cout << "Nb of (channel,channel) cov mat mean on samp : "
00184 << fCovSccMosCalc << endl;
00185 cout << "Nb of (channel,channel) cor mat mean on samp : "
00186 << fCorSccMosCalc << endl;
00187 cout << "Nb of mean cov(c,c) mean on samp, all towers : "
00188 << fCovSccMosCalc << endl;
00189 cout << "Nb of mean cor(c,c) mean on samp, all towers : "
00190 << fCorSccMosCalc << endl;
00191
00192 cout << "Exp. val. of the exp. val. of the samples : "
00193 << fEvEvCalc << endl;
00194 cout << "Expect. val. of the sigmas of the samples : "
00195 << fEvSigCalc << endl;
00196 cout << "Expect. val. of the (samp,samp) correlations : "
00197 << fEvCorCssCalc << endl;
00198
00199 cout << "Sigmas of the exp. val. of the samples : "
00200 << fSigEvCalc << endl;
00201 cout << "Sigmas of the sigmas of the samples : "
00202 << fSigSigCalc << endl;
00203 cout << "Sigmas of the (samp,samp) correlations : "
00204 << fSigCorCssCalc << endl;
00205
00206 cout << "Corrections to the sample values : "
00207 << fSvCorrecCovCssCalc << endl;
00208 cout << "Corrections to the (samp,samp) covariances : "
00209 << fCovCorrecCovCssCalc << endl;
00210 cout << "Corrections to the (samp,samp) correlations : "
00211 << fCorCorrecCovCssCalc << endl;
00212 cout << endl;
00213 }