Go to the documentation of this file.00001
00002
00003
00004
00005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaResultType.h"
00006 #include "Riostream.h"
00007
00008 ClassImp(TEcnaResultType)
00009
00010
00011
00012
00013
00014
00015
00016 TEcnaResultType::TEcnaResultType()
00017 {
00018
00019
00020
00021 fMatMat.ReSet(1,1);
00022 fMatHis.ReSet(1,1);
00023 }
00024
00025 #define CWAR
00026 #ifndef CWAR
00027
00028 TEcnaResultType::TEcnaResultType(CnaResultTyp typ, Int_t i,
00029 Int_t xArgNrowMat, Int_t xArgNcolMat,
00030 Int_t xArgNrowHis, Int_t xArgNcolHis)
00031 {
00032
00033
00034
00035
00036 fTypOfCnaResult = typ;
00037 fIthElement = i;
00038
00039 fMatMat.ReSet(1,1);
00040 fMatHis.ReSet(1,1);
00041
00042 if ( (xArgNrowMat>0) && (xArgNcolMat>0) )
00043 {
00044 fMatMat.ReSet(xArgNrowMat,xArgNcolMat);
00045 }
00046 else
00047 {
00048 fMatMat.ReSet(1,1);
00049 }
00050
00051 if ( (xArgNrowHis>0) && (xArgNcolHis>0) )
00052 {
00053 fMatHis.ReSet(xArgNrowHis,xArgNcolHis);
00054 }
00055 else
00056 {
00057 fMatHis.ReSet(1,1);
00058 }
00059 }
00060
00061 #endif // CWAR
00062
00063 TEcnaResultType::~TEcnaResultType() {
00064
00065
00066
00067 }
00068
00069 void TEcnaResultType::SetSizeMat(Int_t nrow, Int_t ncol) {
00070
00071 nrow = TMath::Abs(nrow);
00072 ncol = TMath::Abs(ncol);
00073 if ((nrow>0) && (ncol>0)) fMatMat.ReSet(nrow,ncol);
00074 else fMatMat.ReSet(1,1);
00075 }
00076
00077 void TEcnaResultType::SetSizeHis(Int_t nrow, Int_t ncol) {
00078
00079 nrow = TMath::Abs(nrow);
00080 ncol = TMath::Abs(ncol);
00081 if ((nrow>0) && (ncol>0)) fMatHis.ReSet(nrow,ncol);
00082 else fMatHis.ReSet(1,1);
00083 }
00084
00085 CnaResultTyp TEcnaResultType::GetTypOfEntry(Int_t kEntry)
00086 {
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 CnaResultTyp xResultType = cTypNumbers;
00122
00123 if (kEntry == 0 ) { xResultType = cTypNumbers;}
00124 if (kEntry == 1 ) { xResultType = cTypMSp;}
00125 if (kEntry == 2 ) { xResultType = cTypSSp;}
00126
00127 if (kEntry == 3 ) { xResultType = cTypAvTno;}
00128 if (kEntry == 4 ) { xResultType = cTypAvLfn;}
00129 if (kEntry == 5 ) { xResultType = cTypAvHfn;}
00130
00131 if (kEntry == 6 ) { xResultType = cTypHfCov;}
00132 if (kEntry == 7 ) { xResultType = cTypHfCor;}
00133
00134 if (kEntry == 8 ) { xResultType = cTypCovCss;}
00135 if (kEntry == 9 ) { xResultType = cTypCorCss;}
00136
00137 if (kEntry == 10 ) { xResultType = cTypMeanCorss;}
00138 if (kEntry == 11 ) { xResultType = cTypSigCorss;}
00139
00140 if (kEntry == 12 ) { xResultType = cTypAvPed;}
00141 if (kEntry == 13 ) { xResultType = cTypAvMeanCorss;}
00142 if (kEntry == 14 ) { xResultType = cTypAvSigCorss;}
00143
00144 if (kEntry == 15 ) { xResultType = cTypNbOfEvts;}
00145
00146 if (kEntry == 16 ) { xResultType = cTypPed;}
00147 if (kEntry == 17 ) { xResultType = cTypTno;}
00148 if (kEntry == 18 ) { xResultType = cTypLfn;}
00149 if (kEntry == 19 ) { xResultType = cTypHfn;}
00150
00151 if (kEntry == 20 ) { xResultType = cTypAdcEvt;}
00152
00153 if (kEntry == 21 ) { xResultType = cTypLfCov;}
00154 if (kEntry == 22 ) { xResultType = cTypLfCor;}
00155
00156 if (kEntry == 23 ) { xResultType = cTypLFccMoStins;}
00157 if (kEntry == 24 ) { xResultType = cTypHFccMoStins;}
00158
00159 if (kEntry == 25 ) { xResultType = cTypEvtNbInLoop;}
00160
00161 return xResultType;
00162 }