Changeset 2237 for trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
- Timestamp:
- 06/26/03 17:00:06 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
r2233 r2237 263 263 264 264 #include "MParList.h" 265 #include "MSigmabar.h" 266 265 267 #include "MGeomPix.h" 266 268 #include "MGeomCam.h" 269 267 270 #include "MCerPhotPix.h" 268 271 #include "MCerPhotEvt.h" 269 #include "MSigmabar.h" 272 273 #include "MPedestalPix.h" 274 #include "MPedestalCam.h" 270 275 271 276 #include "MGGroupFrame.h" // MGGroupFrame … … 328 333 MCerPhotPix &pix = (*fEvt)[i]; 329 334 330 const Int_t id = pix.GetPixId();331 332 const Float_t 333 const Float_t noise = pix.GetErrorPhot();334 335 335 const Int_t idx = pix.GetPixId(); 336 337 const Float_t entry = pix.GetNumPhotons(); 338 const Float_t noise = (*fPed)[idx].GetSigma(); 339 340 // 336 341 // We calculate a correction factor which accounts for the 337 342 // fact that pixels have different size (see TDAS 02-14). 338 343 // 339 const Double_t factor = TMath::Sqrt(fCam->GetPixRatio(id ));344 const Double_t factor = TMath::Sqrt(fCam->GetPixRatio(idx)); 340 345 341 346 // COBB: '<=' to skip entry=noise=0 … … 485 490 // get pixel id of this entry 486 491 // 487 const Int_t id = pix.GetPixId();492 const Int_t idx = pix.GetPixId(); 488 493 489 494 // 490 495 // check the num of photons against the noise level 491 496 // 492 const Float_t 493 const Float_t noise = pix.GetErrorPhot();497 const Float_t entry = pix.GetNumPhotons(); 498 const Float_t noise = (*fPed)[idx].GetSigma(); 494 499 495 500 // … … 497 502 // fact that pixels have different size (see TDAS 02-14). 498 503 // 499 const Double_t factor = TMath::Sqrt(fCam->GetPixRatio(id ));504 const Double_t factor = TMath::Sqrt(fCam->GetPixRatio(idx)); 500 505 501 506 return (entry * factor <= fCleanLvl2 * noise); … … 653 658 } 654 659 655 if (fCleaningMethod != kDemocratic) 656 return kTRUE; 657 658 fSgb = (MSigmabar*)pList->FindObject("MSigmabar"); 659 if (!fSgb) 660 { 661 *fLog << dbginf << "MSigmabar not found... aborting." << endl; 662 return kFALSE; 660 if (fCleaningMethod == kDemocratic) 661 { 662 fSgb = (MSigmabar*)pList->FindObject("MSigmabar"); 663 if (!fSgb) 664 { 665 *fLog << dbginf << "MSigmabar not found... aborting." << endl; 666 return kFALSE; 667 } 668 } 669 else 670 { 671 fPed = (MPedestalCam*)pList->FindObject("MPedestalCam"); 672 if (!fPed) 673 { 674 *fLog << dbginf << "MPedestalCam not found... aborting." << endl; 675 return kFALSE; 676 } 663 677 } 664 678 … … 674 688 if (fSgb) 675 689 fInnerNoise = fSgb->GetSigmabarInner(); 676 690 #ifdef DEBUG 691 *fLog << all << "CleanStep 1" << endl; 692 #endif 677 693 CleanStep1(); 694 #ifdef DEBUG 695 *fLog << all << "CleanStep 2" << endl; 696 #endif 678 697 CleanStep2(); 698 #ifdef DEBUG 699 *fLog << all << "CleanStep 3" << endl; 700 #endif 679 701 CleanStep3(); 702 #ifdef DEBUG 703 *fLog << all << "Done." << endl; 704 #endif 680 705 681 706 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.