Ignore:
Timestamp:
01/21/04 22:43:20 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc

    r2843 r2878  
    106106        return kFALSE;
    107107
     108    fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainFirst+fNumHiGainSamples-1,
     109                                fLoGainFirst, fLoGainFirst+fNumLoGainSamples-1);
     110
    108111    fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam");
    109112    if (!fPedestals)
     
    135138    //        (Have to think about the mean size of both solutions)
    136139    fSignals->InitSize(cam->GetNumPixels());   
    137 
    138     fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainFirst+fNumHiGainSamples-1,
    139                                 fLoGainFirst, fLoGainFirst+fNumLoGainSamples-1);
    140140
    141141    return kTRUE;
  • trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc

    r2851 r2878  
    179179       
    180180        fSumx[idx]  += msum;
    181         fSumx2[idx] += sqr;
     181        //
     182        // The old version:
     183        //
     184        //      fSumx2[idx] += msqr;
     185        //
     186        // The new version:
     187        //
     188        fSumx2[idx] += msum*msum;
    182189    }
    183190   
    184191    fPedestals->SetReadyToSave();
    185     fNumSamplesTot+=fNumHiGainSamples;
     192    fNumSamplesTot += fNumHiGainSamples;
    186193   
    187194    return kTRUE;
     
    195202{
    196203  // Compute pedestals and rms from the whole run
    197   const Int_t n  = fNumSamplesTot;
    198  
     204  const ULong_t n     = fNumSamplesTot;
     205  const ULong_t nevts = GetNumExecutions();
     206
    199207  MRawEvtPixelIter pixel(fRawEvt);
    200208 
     
    207215     
    208216      const Float_t higainped = sum/n;
    209       const Float_t higainrms = TMath::Sqrt((sum2-sum*sum/n)/(n-1.));
     217      //
     218      // The old version:
     219      //
     220      //      const Float_t higainrms = TMath::Sqrt((sum2-sum*sum/n)/(n-1.));
     221      //
     222      // The new version:
     223      //
     224      const Float_t higainrms = TMath::Sqrt((sum2-sum*sum/nevts)/(nevts-1.)/(Float_t)fNumHiGainSamples);
    210225     
    211226      (*fPedestals)[pixid].Set(higainped, higainrms);
  • trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h

    r2821 r2878  
    2323    Byte_t   fNumHiGainSamples;
    2424    UShort_t fNumPixels;
    25     ULong_t   fNumSamplesTot;
     25    ULong_t  fNumSamplesTot;
    2626
    2727    MRawEvtData  *fRawEvt;     // raw event data (time slices)
Note: See TracChangeset for help on using the changeset viewer.