Changeset 7152 for trunk/MagicSoft


Ignore:
Timestamp:
06/13/05 10:33:55 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 added
6 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7148 r7152  
    3333     - improved output
    3434     - added plotting other spectras
     35 
     36   * Makefile:
     37     - added new directory mjoptim
     38
     39   * manalysis/MEnergyEstimate.[h,cc]:
     40     - derives now from a new more genral class MParameterCalc
     41
     42   * manalysis/Makefile, manalysis/AnalysisLinkDef.h:
     43     - added new class MParamterCalc
     44
     45   * manalysis/MParameterCalc.[h,cc]:
     46     - added new class MParamterCalc
     47
     48   * mbase/MLog.cc:
     49     - do not display 'underline' if fIsNull output
     50
     51   * mhbase/MBinning.cc:
     52     - removed some obsolete comments fixed old stylish SetBinningCos
     53
     54   * mhflux/MAlphaFitter.[h,cc]:
     55     - background fit can now be switched off
     56     - removed some obsolete comments
     57     - adapted Print output
     58     - added new option to change signal function type
     59     - adde new Strategy option: kGaussSigma
     60
     61   * mhflux/MHAlpha.[h,cc]:
     62     - output the gauss sigma to the parameter list
     63
     64   * mhflux/MHThetaSq.h:
     65     - mase InitMapping public (used in MJOptimizeDisp)
     66
     67   * mjobs/JobsLinkDef.h, mjobs/Makefile:
     68     - removed MJOptimize*
     69
     70   * mjobs/MJOptimize.[h,cc]:
     71     - allow minimization of something else than MinimizationValue
     72
     73   * mjobs/MJOptimizeEnergy.[h,cc]:
     74     - added class description with example
     75     - added weighting task to RunEnergy (untested)
     76
     77   * mtools/MChisqEval.[h,cc]:
     78     - added comments
     79     - print result in Postprocess
     80     - allow to give a different name to the result
     81
     82   * mjobs/MJOptimize*:
     83     - finally moved to new dir mjoptim
     84     - new class MJOptimizeDisp
    3585
    3686
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r7151 r7152  
    380380    return rc;
    381381}
    382 
     382/*
    383383Bool_t MAlphaFitter::FitTime(const TH3D &hon, UInt_t bin, Bool_t paint)
    384384{
     
    395395    return rc;
    396396}
    397 
     397*/
    398398Bool_t MAlphaFitter::FitAlpha(const TH3D &hon, Bool_t paint)
    399399{
  • trunk/MagicSoft/Mars/mjobs/Makefile

    r7121 r7152  
    3535           MJStar.cc \
    3636           MJCut.cc \
    37            MJOptimize.cc \
    38            MJOptimizeCuts.cc \
    39            MJOptimizeEnergy.cc \
    4037           MJSpectrum.cc
    4138
  • trunk/MagicSoft/Mars/mtools/MChisqEval.cc

    r2744 r7152  
    2525/////////////////////////////////////////////////////////////////////////////
    2626//
     27// MChisqEval
     28//
     29// Evaluates a chisq from one or two MParameterD calculated in an eventloop.
    2730//
    2831/////////////////////////////////////////////////////////////////////////////
     
    3033
    3134#include <fstream>
     35
     36#include "MLog.h"
     37#include "MLogManip.h"
    3238
    3339#include "MDataChain.h"
     
    4046using namespace std;
    4147
    42 void MChisqEval::StreamPrimitive(ofstream &out) const
    43 {
    44     out << "   MChisqEval " << GetUniqueName() << ";";
    45     if (fData0)
    46         out << "   " << GetUniqueName() << ".SetY1(\"" << fData0->GetRule() << "\");" << endl;
    47     if (fData1)
    48         out << "   " << GetUniqueName() << ".SetY1(\"" << fData1->GetRule() << "\");" << endl;
    49 }
     48const TString MChisqEval::gsDefName  = "MChisqEval";
     49const TString MChisqEval::gsDefTitle = "Evaluate a chisq";
    5050
    51 MChisqEval::MChisqEval(const char *name, const char *title) : fData0(NULL), fData1(NULL)// : fMatrix(mat), fColumn(col), fEvalE(evale)
     51MChisqEval::MChisqEval(const char *name, const char *title) : fData0(NULL), fData1(NULL), fNameResult("MinimizationValue")
    5252{
    5353    fName  = name  ? name  : gsDefName.Data();
     
    5555}
    5656
    57 MChisqEval::MChisqEval(MData *y1, const char *name, const char *title) : fData0(NULL), fData1(NULL)// : fMatrix(mat), fColumn(col), fEvalE(evale)
     57MChisqEval::MChisqEval(MData *y1, const char *name, const char *title) : fData0(NULL), fData1(NULL), fNameResult("MinimizationValue")
    5858{
    5959    fName  = name  ? name  : gsDefName.Data();
     
    6262}
    6363
    64 MChisqEval::MChisqEval(MData *y1, MData *y2, const char *name, const char *title) : fData0(NULL), fData1(NULL)// : fMatrix(mat), fColumn(col), fEvalE(evale)
     64MChisqEval::MChisqEval(MData *y1, MData *y2, const char *name, const char *title) : fData0(NULL), fData1(NULL), fNameResult("MinimizationValue")
    6565{
    6666    fName  = name  ? name  : gsDefName.Data();
     
    123123            return kFALSE;
    124124
    125     fResult = (MParameterD*)plist->FindCreateObj("MParameterD", "MFitResult");
     125    fResult = (MParameterD*)plist->FindCreateObj("MParameterD", fNameResult);
    126126    if (!fResult)
    127127        return kFALSE;
     
    136136
    137137    const Double_t dy  = y2-y1;
    138     const Double_t err = fData1 ? y1*y1 : 1;
     138    const Double_t err = fData1 ? y1*y2 : 1;
    139139
    140140    fChisq += dy*dy/err;
     
    144144Int_t MChisqEval::PostProcess()
    145145{
    146     fChisq /= GetNumExecutions();
     146    if (GetNumExecutions()>0)
     147        fChisq /= GetNumExecutions();
    147148
    148149    fResult->SetVal(fChisq);
     150
     151    *fLog << inf << GetDescriptor() << ": Result=" << fChisq << endl;
    149152
    150153    return kTRUE;
    151154}
    152155
    153 const TString MChisqEval::gsDefName  = "MChisqEval";
    154 const TString MChisqEval::gsDefTitle = "Evaluate a chisq";
     156void MChisqEval::StreamPrimitive(ofstream &out) const
     157{
     158    out << "   MChisqEval " << GetUniqueName() << ";";
     159    if (fData0)
     160        out << "   " << GetUniqueName() << ".SetY1(\"" << fData0->GetRule() << "\");" << endl;
     161    if (fData1)
     162        out << "   " << GetUniqueName() << ".SetY1(\"" << fData1->GetRule() << "\");" << endl;
     163}
    155164
  • trunk/MagicSoft/Mars/mtools/MChisqEval.h

    r2744 r7152  
    2121    MData   *fData1; // Data Member two (measured data)
    2222
    23     // --------------------------------------------------------------------------
    24     //
    25     // Implementation of SavePrimitive. Used to write the call to a constructor
    26     // to a macro. In the original root implementation it is used to write
    27     // gui elements to a macro-file.
    28     //
     23    TString fNameResult;
     24
    2925    void StreamPrimitive(ofstream &out) const;
    3026
Note: See TracChangeset for help on using the changeset viewer.