Ignore:
Timestamp:
12/22/03 20:35:39 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.cc

    r2728 r2744  
    6060#include "MLog.h"
    6161#include "MLogManip.h"
     62#include "MParameters.h"
    6263
    6364ClassImp(MMcEnergyEst);
     
    7172static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
    7273{
    73   MEvtLoop *evtloop = (MEvtLoop*)gMinuit->GetObjectFit();
    74  
    75   MTaskList *tlist  = (MTaskList*)evtloop->GetParList()->FindObject("MTaskList"); // GetTaskList();
    76 
    77   MChisqEval      *eval = (MChisqEval*)     tlist->FindObject("MChisqEval");
    78   MEnergyEstParam *eest = (MEnergyEstParam*)tlist->FindObject("MEnergyEstParam");
    79 
    80   eest->SetCoeff(TArrayD(eest->GetNumCoeff(), par));
    81 
    82   evtloop->Eventloop();
    83 
    84   f = eval->GetChisq();
     74    MEvtLoop *evtloop = (MEvtLoop*)gMinuit->GetObjectFit();
     75
     76    MParList  *plist  = evtloop->GetParList();
     77    MTaskList *tlist  = evtloop->GetTaskList();
     78
     79    MParameterD     *eval = (MParameterD*)    plist->FindObject("MFitResult", "MParameterD");
     80    MEnergyEstParam *eest = (MEnergyEstParam*)tlist->FindObject("MEnergyEstParam");
     81
     82    eest->SetCoeff(TArrayD(eest->GetNumCoeff(), par));
     83
     84    evtloop->Eventloop();
     85
     86    f = eval->GetVal();
    8587}
    8688
     
    340342
    341343}
    342 
    343 
Note: See TracChangeset for help on using the changeset viewer.