Ignore:
Timestamp:
09/07/03 16:26:36 (22 years ago)
Author:
moralejo
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r2253 r2324  
    117117
    118118    // Calculate quadratic sum of weights:
    119     Double_t sum = 0;
    120 
    121119    fSumQuadWeights = 0;
    122120    for (Int_t i=0; i<fWeight.GetSize(); i++)
    123         sum += fWeight[i];
    124 
    125     for (Int_t i=0; i<fWeight.GetSize(); i++)
    126     {
    127         fWeight[i] /= sum;
    128         fSumQuadWeights += fWeight[i]*fWeight[i];
    129     }
     121      fSumQuadWeights += fWeight[i]*fWeight[i];
     122
     123    fSumQuadWeights = sqrt(fSumQuadWeights);
    130124
    131125    return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.