Changeset 7130 for trunk/MagicSoft/Mars/mbadpixels
- Timestamp:
- 06/03/05 18:02:36 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc
r7126 r7130 139 139 Bool_t MBadPixelsCalc::CheckPedestalRms(MBadPixelsPix::UnsuitableType_t type) const 140 140 { 141 if (!fGeomCam || !fPedPhotCam || !fBadPixels) 142 { 143 *fLog << err << "MBadPixelsCalc::CheckPedestalRms: ERROR - One of the necessary container are not initialized..." << endl; 144 return kFALSE; 145 } 146 147 const Bool_t checklo = fPedestalLevelVarianceLo>0; 148 const Bool_t checkhi = fPedestalLevelVarianceHi>0; 141 const Bool_t checklo = fPedestalLevelVarianceLo>0; 142 const Bool_t checkhi = fPedestalLevelVarianceHi>0; 149 143 150 144 if (fPedestalLevel<=0 && !checklo && !checkhi) 151 145 return kTRUE; 152 146 147 if (!fGeomCam || !fPedPhotCam || !fBadPixels) 148 { 149 *fLog << err << "MBadPixelsCalc::CheckPedestalRms: ERROR - One of the necessary container are not initialized..." << endl; 150 return kFALSE; 151 } 152 153 153 const Int_t entries = fPedPhotCam->GetSize(); 154 154 … … 175 175 176 176 //if no pixel has a minimum signal, return 177 Int_t counter=0; 177 178 for (int i=0; i<na; i++) 178 179 { 179 if (npix[i]==0 || meanrms[i]==0) 180 { 181 //fErrors[1]++; //no valid Pedestals Rms182 return kFALSE;180 if (npix[i]==0 || meanrms[i]==0) //no valid Pedestals Rms 181 { 182 counter++; 183 continue; 183 184 } 184 185 185 186 meanrms[i] /= npix[i]; 186 187 npix[i]=0; 188 } 189 190 if (counter==na) 191 { 192 *fLog << err << "MBadPixelsCalc::CheckPedestalRms: ERROR - No pixel seems to contain a valid pedestal RMS..." << endl; 193 return kFALSE; 187 194 } 188 195 … … 209 216 MArrayD lolim1(na), lolim2(na); // Precalcualtion of limits 210 217 MArrayD uplim1(na), uplim2(na); // for speeed reasons 218 counter = 0; 211 219 for (int i=0; i<na; i++) 212 220 { 213 221 if (npix[i]==0 || meanrms2[i]==0) 214 222 { 215 //fErrors[1]++; //no valid Pedestals Rms216 return kFALSE;223 counter++; 224 continue; 217 225 } 218 226 … … 233 241 uplim2[i] = meanrms2[i]+fPedestalLevelVarianceHi*varrms2[i]; 234 242 } 243 } 244 245 if (counter==na) 246 { 247 *fLog << err << "MBadPixelsCalc::CheckPedestalRms: ERROR - No pixel seems to contain a valid pedestal RMS anymore..." << endl; 248 return kFALSE; 235 249 } 236 250
Note:
See TracChangeset
for help on using the changeset viewer.