Changeset 1552


Ignore:
Timestamp:
10/19/02 08:55:39 (22 years ago)
Author:
bigongia
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1549 r1552  
    11                                                                  -*-*- END -*-*-
     2 2002/10/19: Abelardo Moralejo
     3
     4   * manalysis/MCerPhotCalc.cc
     5     -Added check of whether a pixel has all its FADC slices empty before
     6      subtracting pedestal.
     7
     8
    29 2002/10/18: Thomas Bretz
    310
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r1545 r1552  
    188188
    189189        // Mean pedestal:
    190         const Double_t mean = fEnableFix ? ped.GetMean()-0.5 : ped.GetMean();
     190        Double_t mean = fEnableFix ? ped.GetMean()-0.5 : ped.GetMean();
    191191
    192192        Byte_t *ptr = pixel.GetHiGainSamples();
    193193
    194194        Float_t nphot = 0.;
    195 
    196         for(Int_t i = 0; i<fWeight.GetSize(); i++)
     195        Float_t nphoterr = 0.;
     196
     197        // Calculate pixel signal unless it has all FADC slices empty:
     198
     199        if (pixel.GetSumHiGainSamples()>0)
    197200          {
    198             BinSignal[i] =  (Float_t) ptr[i] - mean;
    199             nphot       +=  BinSignal[i] * fWeight[i];
     201            for(Int_t i = 0; i<fWeight.GetSize(); i++)
     202              {
     203                BinSignal[i] =  (Float_t) ptr[i] - mean;
     204                nphot       +=  BinSignal[i] * fWeight[i];
     205              }
     206            nphoterr = ped.GetSigma()* fSumQuadWeights;
    200207          }
    201 
    202         Float_t nphoterr = ped.GetSigma()* fSumQuadWeights;
    203208
    204209        fCerPhotEvt->AddPixel(pixid, nphot, nphoterr);
Note: See TracChangeset for help on using the changeset viewer.