Ignore:
Timestamp:
05/04/04 16:53:25 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc

    r3956 r3960  
    264264  const UInt_t nareas   = fGeom->GetNumAreas();
    265265
    266   Float_t lowlim      [nareas];
    267   Float_t upplim      [nareas];
    268   Float_t areasum     [nareas];
    269   Float_t areasum2    [nareas];
    270   Int_t   numareavalid[nareas];
     266  Float_t lowlim       [nareas];
     267  Float_t upplim       [nareas];
     268  Float_t areasum      [nareas];
     269  Float_t areasum2     [nareas];
     270  Int_t   numareavalid [nareas];
     271  Int_t   useunreliable[nareas];
    271272
    272273  memset(lowlim        ,0, nareas   * sizeof(Float_t));
     
    275276  memset(areasum2      ,0, nareas   * sizeof(Float_t));
    276277  memset(numareavalid  ,0, nareas   * sizeof(Int_t  ));
    277 
     278  memset(useunreliable ,0, nareas   * sizeof(Int_t  ));
     279
     280  //
     281  // Apero loop: Count number of unreliable pixels:
     282  //     
     283  for (UInt_t i=0; i<npixels; i++)
     284    {
     285      MBadPixelsPix &bad = (*fBadPixels)[i];     
     286      const Int_t  aidx  = (*fGeom)[i].GetAidx();
     287
     288      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     289        continue;
     290
     291      if (bad.IsUnsuitable(MBadPixelsPix::kUnreliableRun))
     292        continue;
     293
     294      numareavalid[aidx] ++;
     295    }
     296 
     297  for (UInt_t aidx=0; aidx<nareas; aidx++)
     298    if (numareavalid[aidx] < 100)
     299      useunreliable[aidx] = 1;
     300
     301  memset(numareavalid  ,0, nareas   * sizeof(Int_t  ));
    278302  //
    279303  // First loop: Get mean time resolution the RMS
     
    292316        continue;
    293317
     318      const Int_t   aidx  = (*fGeom)[i].GetAidx();
     319
     320      if (!useunreliable[aidx])
     321        if (bad.IsUnsuitable(MBadPixelsPix::kUnreliableRun))
     322          continue;
     323
    294324      const Float_t res   = pix.GetTimePrecision();
    295       const Int_t   aidx  = (*fGeom)[i].GetAidx();
    296325
    297326      areasum     [aidx] += res;
     
    316345      lowlim  [aidx]  = areasum [aidx] - fRelTimeRelErrLimit*areasum2[aidx];
    317346      upplim  [aidx]  = areasum [aidx] + fRelTimeRelErrLimit*areasum2[aidx];
    318 
     347     
     348      *fLog << endl;
    319349      *fLog << inf << GetDescriptor() << ": Limits for acceptance of time resolution: ["
    320             << Form("%4.2f%s%4.2f",lowlim[aidx],",",upplim[aidx]) << "] in area index " << aidx << endl;
    321     }
    322  
     350            << Form("%4.2f%s%4.2f",lowlim[aidx],",",upplim[aidx]) << "] in area index " << aidx;
     351    }
     352  *fLog << endl; 
    323353
    324354
Note: See TracChangeset for help on using the changeset viewer.