Changeset 3195 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/16/04 14:20:26 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
2 edited

Legend:

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

    r3194 r3195  
    117117    }
    118118
     119    const MPedestalPix &ped   = (*fPedestals)[fPINDiodeIdx];
     120
     121    if (&ped)
     122      {
     123        fPedestal = ped.GetPedestal();
     124        fPedRms   = ped.GetPedestalRms();
     125      }
     126    else
     127      {
     128        *fLog << err << " Cannot find MPedestalPix of the PIN Diode (idx="
     129              << fPINDiodeIdx << ")" << endl;
     130        return kFALSE;
     131      }
     132
    119133    return kTRUE;
    120134}
     
    163177               sum, sum2, sat, max);
    164178   
    165     const MPedestalPix &ped   = (*fPedestals)[fPINDiodeIdx];
    166 
    167     Float_t pedes  = -999.;
    168     Float_t pedrms = -999.;
    169 
    170     if (&ped)
    171       {
    172         pedes  = ped.GetPedestal();
    173         pedrms = ped.GetPedestalRms();
    174       }
    175     else
    176       {
    177         *fLog << warn << " Cannot find MPedestalPix of the PIN Diode (idx="
    178               << fPINDiodeIdx << ")" << endl;
    179 
    180       }
    181179
    182180    const Float_t var = ((Float_t)sum2 - (Float_t)sum*sum/fNumSamples)/(fNumSamples-1);
     
    186184    // FIXME: The following formulae have to be revised!!
    187185    //
    188     fPINDiode->SetExtractedSignal(sum - pedes*fNumSamples, pedrms*fSqrtSamples);
     186    fPINDiode->SetExtractedSignal(sum - fPedestal*fNumSamples, fPedRms*fSqrtSamples);
    189187    fPINDiode->SetExtractedRms   (rms, rms/2./fSqrtSamples);
    190188    fPINDiode->SetExtractedTime  (max, rms/fSqrtSamples);
  • trunk/MagicSoft/Mars/mcalib/MExtractPINDiode.h

    r3193 r3195  
    4141  Byte_t  fSaturationLimit;
    4242  UInt_t  fPINDiodeIdx;
     43
     44  Float_t fPedestal;
     45  Float_t fPedRms;
    4346 
    4447  void   FindSignal(Byte_t *ptr, Int_t size, UInt_t &sum, UInt_t &sum2, UInt_t &sat, UInt_t &max) const;
Note: See TracChangeset for help on using the changeset viewer.