Changeset 4150 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
05/24/04 17:16:02 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4148 r4150  
    3535     - introduce data members to store the average number of photons by
    3636       the three methods
     37
     38   * mcalib/MCalibrationChargeCalc.cc
     39     - calculate the limits for acceptance of number of photo-electrons
     40       for the calculation of the mean by normal mean instead of weighted
     41       mean. There were too many outliers still present in the weighted
     42       mean such to modify the result by a sizeable amount.
    3743
    3844   * mpedestals/MPedCalcPedRun.cc
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r4133 r4150  
    228228const Float_t MCalibrationChargeCalc::fgLambdaErrLimit         = 0.2;
    229229const Float_t MCalibrationChargeCalc::fgLambdaCheckLimit       = 0.2;
    230 const Float_t MCalibrationChargeCalc::fgPheErrLimit            = 8.;
     230const Float_t MCalibrationChargeCalc::fgPheErrLimit            = 3.;
    231231const Float_t MCalibrationChargeCalc::fgFFactorErrLimit        = 3.;
    232232// --------------------------------------------------------------------------
     
    932932     
    933933      const Float_t nphe  = pix.GetPheFFactorMethod();
    934       const Float_t nvar  = pix.GetPheFFactorMethodVar();
     934      const Float_t nvar  = pix.GetPheFFactorMethod()*pix.GetPheFFactorMethod();
    935935      const Int_t   aidx  = (*fGeom)[i].GetAidx();
    936936
    937       if (nvar > 0.)
    938         {
    939           areaphes    [aidx] += nphe;
    940           areavars    [aidx] += nvar;
    941           numareavalid[aidx] ++;
    942         }
     937      areaphes    [aidx] += nphe;
     938      areavars    [aidx] += nvar;
     939      numareavalid[aidx] ++;
    943940    }
    944941
     
    953950
    954951      areaphes[i] = areaphes[i] / numareavalid[i];
    955       areavars[i] = areavars[i] / numareavalid[i];
     952      areavars[i] = (areavars[i] - areaphes[i]*areaphes[i]/numareavalid[i]) / (numareavalid[i]-1.);
     953
     954      if (areavars[i] > 0.)
     955        areavars[i] = TMath::Sqrt(areavars[i]);
     956      else
     957        {
     958          *fLog << warn << GetDescriptor() << ": No pixels with valid variance of photo-electrons found "
     959                << "in area index: " << i << endl;
     960          continue;
     961        }
     962     
    956963      lowlim  [i] = areaphes[i] - fPheErrLimit*TMath::Sqrt(areavars[i]);
    957964      upplim  [i] = areaphes[i] + fPheErrLimit*TMath::Sqrt(areavars[i]);
     
    12161223  const UInt_t nareas   = fGeom->GetNumAreas();
    12171224
     1225  //
     1226  // Set the results in the MCalibrationChargeCam
     1227  //
     1228  fCam->SetNumPhotonsFFactorMethod   (avphotons);
     1229  if (avphotrelvar > 0.)
     1230    fCam->SetNumPhotonsFFactorMethodErr(TMath::Sqrt( avphotrelvar * avphotons * avphotons)); 
     1231
    12181232  Float_t lowlim           [nareas];
    12191233  Float_t upplim           [nareas];
Note: See TracChangeset for help on using the changeset viewer.