Changeset 8535 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
05/22/07 14:36:08 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8534 r8535  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2007/05/22 Thomas Bretz
     22
     23   * mmuon/MMuonSearchPar.cc:
     24     - tiny speed improvement in the fit function
     25
     26
    2027
    2128 2007/05/22 Daniela Dorner
  • trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.cc

    r7369 r8535  
    125125    for (Int_t i=0; i<entries; i++ )
    126126    {
    127         Double_t tmp = TMath::Hypot(fX[i]-par[0], fY[i]-par[1]);
     127        const Double_t dx = fX[i]-par[0];
     128        const Double_t dy = fY[i]-par[1];
     129
     130        const Double_t sq = dx*dx + dy*dy;
    128131
    129132        sums  += fSignal[i];
    130         meanr += fSignal[i] * tmp;
    131         devr  += fSignal[i] * tmp*tmp;
     133        meanr += fSignal[i] * TMath::Sqrt(sq);
     134        devr  += fSignal[i] * sq;
    132135    }
    133136
Note: See TracChangeset for help on using the changeset viewer.