Changeset 4293 for trunk


Ignore:
Timestamp:
06/15/04 10:10:09 (20 years ago)
Author:
aliu
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtemp/mifae
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mifae/Changelog

    r4287 r4293  
    2525      islands
    2626
    27    * library/MIslands.[h,cc],MIslandCalc.cc
     27   * library/MIslands.[h,cc],MIslandCalc.[h,cc], MIslandCleaning.[h,cc]
    2828     - add a new island cleaning which consists in removing all the
    2929      islands except the larger one
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MIslandClean.cc

    r3976 r4293  
    2626//   islands are supposed to be eliminated.     
    2727//
     28// Other cleanings that are allowed in this code are:
     29//
     30//    - Resting only with the continent, i.e. the larger island
    2831//   
    2932//  Example:
     
    164167   
    165168  //
    166   //eliminates the island with a signal-to-noise
    167   //lower than a given limit
     169  //eliminates the island with a time spread
     170  //higher than a given limit
    168171  //
    169172  //else if( fIslandCleaningMethod == kTiming ){
     
    188191      }     
    189192  }
     193
     194  //
     195  //eliminates all the islands except the continent,
     196  //i.e. the larger island in the event
     197  //
     198  else if( fIslandCleaningMethod == 3 ){
     199    Int_t nisl = fIsl->GetIslNum();
     200
     201    Int_t max = -1000;   
     202    Int_t idMax;
     203
     204    for(Int_t isl = 0; isl<nisl ; isl++)
     205      {
     206        if (fIsl->GetPixNum(isl)>max)
     207         {
     208           max = fIsl->GetPixNum(isl);
     209           idMax = isl;
     210         }
     211      }     
     212
     213    for(Int_t isl = 0; isl<nisl ; isl++)
     214      {
     215        if (isl != idMax)
     216          {
     217            for(Int_t idx = 0;idx<577; idx++)
     218              {
     219                MCerPhotPix &pix  = (*fEvt)[idx];
     220               
     221                if (fIsl->GetIslId(idx) == isl)
     222                  pix.SetPixelUnused();
     223              }
     224          }
     225      }
     226  }
    190227 
    191228  fEvt->SetReadyToSave();
Note: See TracChangeset for help on using the changeset viewer.