Changeset 2052 for trunk/MagicSoft/Mars/mimage
- Timestamp:
- 05/02/03 08:56:31 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mimage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
r2040 r2052 285 285 // 286 286 MImgCleanStd::MImgCleanStd(const Float_t lvl1, const Float_t lvl2, 287 const char *name, const char *title)287 const char *name, const char *title) 288 288 : fSgb(NULL), fCleaningMethod(kStandard), fCleanLvl1(lvl1), 289 289 fCleanLvl2(lvl2), fCleanRings(1) … … 324 324 MCerPhotPix &pix = (*fEvt)[i]; 325 325 326 const Float_t entry = pix.GetNumPhotons();327 const Float_t noise = pix.GetErrorPhot();328 329 326 const Int_t id = pix.GetPixId(); 327 328 const Float_t entry = pix.GetNumPhotons(); 329 const Float_t noise = pix.GetErrorPhot(); 330 330 const Double_t ratio = TMath::Sqrt(fCam->GetPixRatio(id)); 331 331 332 332 // COBB: '<=' to skip entry=noise=0 333 if (entry <= fCleanLvl1 * noise / ratio)333 if (entry * ratio <= fCleanLvl1 * noise) 334 334 pix.SetPixelUnused(); 335 335 … … 366 366 MCerPhotPix &pix = (*fEvt)[i]; 367 367 368 const Float_t entry = pix.GetNumPhotons();369 370 368 const Int_t id = pix.GetPixId(); 371 369 370 const Float_t entry = pix.GetNumPhotons(); 372 371 const Double_t ratio = fCam->GetPixRatio(id); 373 372 374 373 // COBB: '<=' to skip entry=noise=0 375 if (entry <= fCleanLvl1 * fInnerNoise / ratio)374 if (entry * ratio <= fCleanLvl1 * fInnerNoise) 376 375 pix.SetPixelUnused(); 377 376 … … 451 450 const Int_t id2 = gpix.GetNeighbor(j); 452 451 453 // when you find an used 452 // when you find an used neighbor, break the loop 454 453 if (ispixused[id2] == 1) 455 454 { 456 hasNeighbor = kTRUE 455 hasNeighbor = kTRUE; 457 456 break; 458 457 } … … 460 459 461 460 if (hasNeighbor == kFALSE) 462 461 pix.SetPixelUnused(); 463 462 } 464 463 … … 493 492 // check the num of photons against the noise level 494 493 // 495 const Float_t entry = pix.GetNumPhotons(); 496 const Float_t noise = pix.GetErrorPhot(); 497 494 const Float_t entry = pix.GetNumPhotons(); 495 const Float_t noise = pix.GetErrorPhot(); 498 496 const Double_t ratio = TMath::Sqrt(fCam->GetPixRatio(id)); 499 497 500 return (entry <= fCleanLvl2 * noise / ratio);498 return (entry * ratio <= fCleanLvl2 * noise); 501 499 } 502 500 … … 517 515 // check the num of photons against the noise level 518 516 // 519 const Float_t entry = pix.GetNumPhotons(); 520 517 const Float_t entry = pix.GetNumPhotons(); 521 518 const Double_t ratio = fCam->GetPixRatio(id); 522 519 523 return (entry <= fCleanLvl2 * fInnerNoise / ratio);520 return (entry * ratio <= fCleanLvl2 * fInnerNoise); 524 521 } 525 522 … … 583 580 584 581 pix.SetRing(r); 585 582 break; 586 583 } 587 584 } … … 819 816 } 820 817 out << ");" << endl; 821 } 818 819 if (fCleaningMethod!=kDemocratic) 820 return; 821 822 out << " " << GetUniqueName() << ".SetMethod(MImgCleanStd::kDemocratic);" << endl; 823 824 if (fCleanRings==1) 825 return; 826 827 out << " " << GetUniqueName() << ".SetCleanRings(" << fCleanRings << ");" << endl; 828 } -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.h
r2038 r2052 62 62 UShort_t GetCleanRings() const { return fCleanRings;} 63 63 64 void SetCleanRings(UShort_t r) { fCleanRings=r; }64 void SetCleanRings(UShort_t r) { if(r==0) r=1; fCleanRings=r; } 65 65 void SetMethod(CleaningMethod_t m) { fCleaningMethod = m; } 66 66
Note:
See TracChangeset
for help on using the changeset viewer.