#include "MImgCleanStd.h" #include "MLog.h" #include "MLogManip.h" #include "MParList.h" #include "MGeomCam.h" #include "MCerPhotPix.h" #include "MCerPhotEvt.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 i=0; iGetNumPixels(); for (Int_t i=0; iIsPixelUsed(id2)) cnt++; } // // check if no next neighbor has the state 'used' // set this pixel to 'unused', too. // if (cnt==0) pix.SetPixelUnused(); } // // now we declare all pixels that survive as CorePixels // for (Int_t i=0; iGetNumPixels(); for (Int_t i=0; iIsPixelCore(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 // fCam = (MGeomCam*)pList->FindObject("MGeomCam"); if (!fCam) { *fLog << dbginf << "MGeomCam not found (no geometry information available)... aborting." << endl; return kFALSE; } fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt"); if (!fEvt) { *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl; return kFALSE; } return kTRUE; } Bool_t MImgCleanStd::Process() { CleanLevel1(); CleanLevel2(); CleanLevel3(); return kTRUE; }