Ignore:
Timestamp:
08/19/07 22:40:04 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjoptim
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjoptim/MJOptimizeDisp.cc

    r8671 r8679  
    178178
    179179    MChisqEval eval;
    180     eval.SetY1("sqrt(ThetaSquared.fVal)");
     180    eval.SetY1(fUseThetaSq?"ThetaSquared.fVal":"sqrt(ThetaSquared.fVal)");
     181    if (weights)
     182        eval.SetNameWeight();
    181183
    182184    MMatrixLoop loop(&m);
  • trunk/MagicSoft/Mars/mjoptim/MJOptimizeDisp.h

    r7152 r8679  
    1010class MJOptimizeDisp : public MJOptimize
    1111{
     12private:
     13    Bool_t fUseThetaSq;
     14
    1215public:
    13     MJOptimizeDisp() : MJOptimize() { }
     16    MJOptimizeDisp() : MJOptimize(), fUseThetaSq(kFALSE) { }
     17
     18    void EnableThetaSq(Bool_t b=kTRUE) { fUseThetaSq=b; }
    1419
    1520    // Special optimizing routines
  • trunk/MagicSoft/Mars/mjoptim/MJOptimizeEnergy.cc

    r8671 r8679  
    6666// histograms
    6767#include "../mhflux/MHEnergyEst.h"
     68#include "../mtools/MChisqEval.h"
    6869
    6970// tasks
     
    108109    MHMatrix m("M");
    109110    AddRulesToMatrix(m);
     111    const Int_t map = m.AddColumn("MMcEvt.fEnergy");
    110112    parlist.AddToList(&m);
    111113
     
    136138        fill.SetWeight();
    137139
     140    MChisqEval eval;
     141    eval.SetY1(fOptimLog?Form("log10(MEnergyEst.fVal/M[%d])", map):Form("MEnergyEst.fVal-M[%d]", map));
     142    if (weights)
     143        eval.SetNameWeight();
     144
    138145    MMatrixLoop loop(&m);
    139146
     
    143150        tasklist.AddToList(weights);
    144151    tasklist.AddToList(&fill);
     152    tasklist.AddToList(&eval);
    145153
    146154    // Optimize with the tasklist in this parameterlist
  • trunk/MagicSoft/Mars/mjoptim/MJOptimizeEnergy.h

    r7152 r8679  
    1010class MJOptimizeEnergy : public MJOptimize
    1111{
     12private:
     13    Bool_t fOptimLog;
     14
    1215public:
    13     MJOptimizeEnergy() : MJOptimize() { }
     16    MJOptimizeEnergy() : MJOptimize(), fOptimLog(kFALSE) { }
     17
     18    void EnableOptimLog(Bool_t b=kTRUE) { fOptimLog=b; }
    1419
    1520    // Special optimizing routines
Note: See TracChangeset for help on using the changeset viewer.