source: branches/MarsMoreSimulationTruth/mfit/MTFitLoop.h@ 19875

Last change on this file since 19875 was 4358, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.3 KB
Line 
1#ifndef MARS_MTFitLoop
2#define MARS_MTFitLoop
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8#ifndef ROOT_TArrayC
9#include <TArrayC.h>
10#endif
11
12class MEvtLoop;
13
14class MTFitLoop : public MParContainer
15{
16private:
17 Int_t fDebug; // -1 no output, 0 MTFitLoop output, 1 PrintStatistics output
18 Int_t fNumEvents;
19
20 static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
21 virtual Double_t Fcn(Int_t &npar, Double_t *gin, Double_t *par, Int_t iflag);
22
23 MEvtLoop *fEvtLoop;
24
25 TString fParametersName;
26 TString fFitParameter;
27
28 TArrayC fFixedParams;
29
30 Int_t fNum;
31 Int_t fMaxIterations;
32
33public:
34 MTFitLoop(const Int_t num=0);
35
36 void Optimize(MEvtLoop &loop, TArrayD &pars);
37
38 void SetNameParameters(const char *parm) { fParametersName = parm; }
39 void SetFitParameter(const char *parm) { fFitParameter = parm; }
40
41 void SetFixedParameters(const TArrayC &c) { fFixedParams = c; }
42 void SetMaxIterations(Int_t maxiter=500) {fMaxIterations = maxiter;} // for debugging
43
44 void SetDebug(Int_t n) { fDebug = n; }
45 void SetNumEvents(Int_t n) { fNumEvents = n; }
46
47 ClassDef(MTFitLoop, 0) // Class which can optimize a value (chi^2, significance, etc) calculated in an eventloop
48};
49
50#endif
Note: See TracBrowser for help on using the repository browser.