#include "MImgCleanStd.h" #include "MLog.h" #include "MLogManip.h" #include "MParList.h" #include "MCerPhotPix.h" #include "MCerPhotEvt.h" #include "MCamNeighbor.h" ClassImp(MImgCleanStd) MImgCleanStd::MImgCleanStd(const char *name, const char *title) { // // the default constructor // *fName = name ? name : "MImgCleanStd"; *fTitle = name ? name : "Task which does a standard image cleaning"; } void MImgCleanStd::CleanLevel1() { // // This method looks for all pixels with an entry (photons) // that is three times bigger than the noise of the pixel // const Int_t entries = fEvt->GetNumPixels(); // // check the number of all pixels against the noise level and // set them to 'unused' state if necessary // for (Int_t il=0; ilGetNumPixels(); for (Int_t il=0; ilIsPixelUsed(id2)) itest++ ; } // // check if no next neighbor has the state 'used' // set this pixel to 'unused', too. // if (itest==0) pix.SetPixelUnused(); } // // now we declare all pixels that survive as CorePixels // for (Int_t il=0; ilGetNumPixels(); for (Int_t il=0; ilIsPixelCore(id2)) continue; pix.SetPixelUsed(); break ; } } } Bool_t MImgCleanStd::PreProcess (MParList *pList) { // // check if MEvtHeader exists in the Parameter list already. // if not create one and add them to the list // fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt"); if (fEvt) return kTRUE; *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl; return kFALSE; } Bool_t MImgCleanStd::Process() { CleanLevel1(); CleanLevel2(); CleanLevel3(); return kTRUE; }