Ignore:
Timestamp:
11/18/05 16:55:22 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc

    r7174 r7408  
    6161//
    6262//
     63//  If using SetFormula you can specify formulas accepted by TF1, eg:
     64//      pow(X, -2.6)
     65//  (Rem: all capital (!) 'X' are replaced by the corresponding %s.fEnergy
     66//        automatically)
     67//
     68//
    6369//  Input Containers:
    6470//    MMcEvt
     
    218224TString MMcSpectrumWeight::GetFormulaSpecNew() const
    219225{
    220     return fFormula.IsNull() ? Form("pow(%s.fEnergy, %.3f)", fNameMcEvt.Data(), fNewSlope) : fFormula;
     226    TString str = fFormula.IsNull() ? Form("pow(%s.fEnergy, %.3f)", fNameMcEvt.Data(), fNewSlope) : fFormula;
     227    if (!fFormula.IsNull())
     228        str.ReplaceAll("X", Form("(%s.fEnergy)", fNameMcEvt.Data()));
     229
     230    return str;
    221231}
    222232
Note: See TracChangeset for help on using the changeset viewer.