Changeset 6489 for trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
- Timestamp:
- 02/15/05 16:18:28 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
r5690 r6489 339 339 const char *name, const char *title) 340 340 : fCleaningMethod(kStandard), fCleanLvl1(lvl1), 341 fCleanLvl2(lvl2), fCleanRings(1), f NamePedPhotCam(gsNamePedPhotCam),342 fName GeomCam(gsNameGeomCam), fNameCerPhotEvt(gsNameCerPhotEvt)343 341 fCleanLvl2(lvl2), fCleanRings(1), fKeepSinglePixels(kFALSE), 342 fNamePedPhotCam(gsNamePedPhotCam), fNameGeomCam(gsNameGeomCam), 343 fNameCerPhotEvt(gsNameCerPhotEvt) 344 344 { 345 345 fName = name ? name : gsDefName.Data(); … … 386 386 // 387 387 // Check if the survived pixel have a neighbor, that also 388 // survived, otherwise set pixel to unused (removes pixels without 389 // neighbors). 390 // 391 void MImgCleanStd::CleanStep2() 392 { 388 // survived. Set all single pixels Unused if !fKeepSinglePixels. Now we 389 // declare all pixels that survived previous CleanSteps as CorePixels. 390 // Return number of single pixels, and there cumulative size in size. 391 // 392 Short_t MImgCleanStd::CleanStep2(Float_t &size) 393 { 394 Short_t n=0; 395 size = 0; 396 393 397 MCerPhotPix *pix; 394 398 … … 420 424 } 421 425 422 if (hasNeighbor == kFALSE) 423 pix->SetPixelUnused(); 424 } 425 426 // 427 // now we declare all pixels that survive as CorePixels 428 // 426 if (hasNeighbor == kFALSE) 427 { 428 if (!fKeepSinglePixels) 429 pix->SetPixelUnused(); 430 size += pix->GetNumPhotons(); 431 n++; 432 } 433 } 429 434 430 435 Next.Reset(); … … 434 439 pix->SetPixelCore(); 435 440 } 441 442 return n; 436 443 } 437 444 … … 613 620 *fLog << all << "CleanStep 2" << endl; 614 621 #endif 615 CleanStep2(); 622 Float_t size; 623 const Short_t n = CleanStep2(size); 624 fEvt->SetSinglePixels(n, size); 616 625 617 626 // For speed reasons skip the rest of the cleaning if no … … 812 821 if (gsNameCerPhotEvt!=fNameCerPhotEvt) 813 822 out << " " << GetUniqueName() << ".SetNameCerPhotEvt(\"" << fNameCerPhotEvt << "\");" << endl; 823 if (fKeepSinglePixels) 824 out << " " << GetUniqueName() << ".SetKeepSinglePixels();" << endl; 825 814 826 } 815 827 … … 821 833 // MImgCleanStd.CleanMethod: Standard, Scaled, Democratic, Probability, Absolute 822 834 // MImgCleanStd.CleanRings: 1 835 // MImgCleanStd.KeepSinglePixels: yes, no 823 836 // 824 837 Int_t MImgCleanStd::ReadEnv(const TEnv &env, TString prefix, Bool_t print) … … 839 852 rc = kTRUE; 840 853 fCleanLvl2 = GetEnvValue(env, prefix, "CleanLevel2", fCleanLvl2); 854 } 855 if (IsEnvDefined(env, prefix, "KeepSinglePixels", print)) 856 { 857 rc = kTRUE; 858 fKeepSinglePixels = GetEnvValue(env, prefix, "KeepSinglePixels", fKeepSinglePixels); 841 859 } 842 860
Note:
See TracChangeset
for help on using the changeset viewer.