- Timestamp:
- 08/18/04 10:20:23 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbadpixels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc
r4678 r4679 201 201 // -------------------------------------------------------------------------- 202 202 // 203 // Counts the number of neighbors matching NOT UnsuitableType type 204 // 205 Short_t MBadPixelsCam::GetNumSuitableNeighbors(MBadPixelsPix::UnsuitableType_t type, const MGeomPix &pix) const 206 { 207 const Int_t n2 = pix.GetNumNeighbors(); 208 209 Int_t cnt=0; 210 for (int j=0; j<n2; j++) 211 { 212 const Int_t id2 = pix.GetNeighbor(j); 213 if (!(*this)[id2].IsUnsuitable(type)) 214 cnt++; 215 } 216 217 return cnt; 218 } 219 220 // -------------------------------------------------------------------------- 221 // 203 222 // Calculate the number of pixels which are - under no circumstances - 204 223 // interpolatable, called isolated. This means that a pixel (its own status … … 227 246 continue; 228 247 229 const Int_t n2 = pix.GetNumNeighbors(); 230 231 Int_t cnt=0; 232 for (int j=0; j<n2; j++) 233 { 234 const Int_t id2 = pix.GetNeighbor(j); 235 if (!(*this)[id2].IsUnsuitable(type)) 236 cnt++; 237 } 238 239 if (cnt<2) 248 if (GetNumSuitableNeighbors(type, pix)<2) 240 249 rc++; 241 250 } … … 262 271 return 0; 263 272 264 if ( !(*this)[idx].IsUnsuitable(type))273 if (GetNumSuitableNeighbors(type, *pix)>1) 265 274 return 0; 266 275 -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.h
r4678 r4679 9 9 #endif 10 10 11 class MGeomPix; 11 12 class TClonesArray; 12 13 … … 16 17 TClonesArray *fArray; //-> 17 18 19 Short_t GetNumSuitableNeighbors(MBadPixelsPix::UnsuitableType_t type, const MGeomPix &pix) const; 18 20 Short_t GetNumMaxCluster(MBadPixelsPix::UnsuitableType_t type, TObjArray &list, Int_t idx, Int_t aidx) const; 19 21
Note:
See TracChangeset
for help on using the changeset viewer.