Changeset 6965 for trunk


Ignore:
Timestamp:
04/20/05 15:20:03 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6964 r6965  
    3737     - use the sequence number'd directories in case of calibrated data
    3838       and image files instead of the date.
     39
     40   * mhflux/MAlphaFitter.cc:
     41     - copy also results in Copy()
     42
     43   * mjobs/MJOptimize.cc:
     44     - print result of optimization in case MAlphaFitter is used
     45     - store results back in initial MAlphaFitter
    3946
    4047
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r6958 r6965  
    306306    MAlphaFitter &f = static_cast<MAlphaFitter&>(o);
    307307
     308    // Setup
    308309    f.fSigInt       = fSigInt;
    309310    f.fSigMax       = fSigMax;
     
    319320    f.fCoefficients.Reset();
    320321
     322    // Result
     323    f.fSignificance     = fSignificance;
     324    f.fEventsExcess     = fEventsExcess;
     325    f.fEventsSignal     = fEventsSignal;
     326    f.fEventsBackground = fEventsBackground;
     327    f.fChiSqSignal      = fChiSqSignal;
     328    f.fChiSqBg          = fChiSqBg;
     329    f.fIntegralMax      = fIntegralMax;
     330    f.fScaleFactor      = fScaleFactor;
     331
     332    // Function
    321333    TF1 *fcn = f.fFunc;
    322334    f.fFunc = new TF1(*fFunc);
  • trunk/MagicSoft/Mars/mjobs/MJOptimize.cc

    r6949 r6965  
    866866    tasklist.AddToList(&fill);
    867867
     868    // Optimize with the tasklist in this parameterlist
    868869    if (!Optimize(parlist))
    869870        return kFALSE;
    870871
     872    // Copy the result back to be accessible by the user
     873    if (fit)
     874        hist.GetAlphaFitter().Copy(*fit);
     875    // Print the result
     876    hist.GetAlphaFitter().Print("result");
     877
     878    // Store result if requested
    871879    TObjArray cont;
    872880    cont.Add(&contin);
     
    956964    parlist.AddToList(&list);
    957965
     966    MFillH fillof(&histof, "", "FillHistOff");
    958967    MFillH fillon(&histon, "", "FillHistOn");
    959     MFillH fillof(&histof, "", "FillHistOff");
    960968
    961969    MF f0(Form("M[%d]<0.5", idxdatatype), "FilterOffData");
     
    975983    tasklist.AddToList(&fillon);
    976984
     985    // Optimize with the tasklist in this parameterlist
    977986    if (!Optimize(parlist))
    978987        return kFALSE;
    979988
     989    // Copy the result back to be accessible by the user
     990    if (fit)
     991        histon.GetAlphaFitter().Copy(*fit);
     992    // Print the result
     993    histon.GetAlphaFitter().Print("result");
     994
     995    // Store result if requested
    980996    TObjArray cont;
    981997    cont.Add(&contin);
     
    10441060    tasklist.AddToList(&fill);
    10451061
     1062    // Optimize with the tasklist in this parameterlist
    10461063    if (!Optimize(parlist))
    10471064        return kFALSE;
    10481065
     1066    // Print the result
    10491067    hist.Print();
    10501068
     1069    // Store result if requested
    10511070    TObjArray cont;
    10521071    cont.Add(&est);
Note: See TracChangeset for help on using the changeset viewer.