source: trunk/MagicSoft/Mars/mtemp/mifae/library/MFindDisp.h@ 6949

Last change on this file since 6949 was 5904, checked in by domingo, 20 years ago
*** empty log message ***
File size: 3.2 KB
Line 
1#ifndef MARS_MFindDisp
2#define MARS_MFindDisp
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8#ifndef ROOT_TArrayD
9#include <TArrayD.h>
10#endif
11
12#ifndef ROOT_TArrayI
13#include <TArrayI.h>
14#endif
15
16class MHMatrix;
17class MDispCalc;
18class MHDisp;
19class MFDisp;
20class MFilter;
21class MH3;
22class MGeomCam;
23class MEvtLoop;
24
25class MFindDisp : public MParContainer
26{
27private:
28
29 TString fFilenameParam; // filename to store optimum Disp parameters
30
31 TString fFilenameTrain;
32 TString fFilenameTest;
33
34 Int_t fHowManyTrain; // number of events for training
35 Int_t fHowManyTest; // number of events for testing
36
37 MHMatrix *fMatrixTrainCalc; // training matrix with variables needed in MDispCalc
38 MHMatrix *fMatrixTrainHists; // training matrix with variables needed in MHDisp
39 MHMatrix *fMatrixTestCalc; // testing matrix with variables needed in MDispCalc
40 MHMatrix *fMatrixTestHists; // testing matrix with variables needed in MHDisp
41
42 MDispCalc *fDispCalcTrain;
43 MDispCalc *fDispCalcTest;
44
45 MHDisp *fHDispTrain;
46 MHDisp *fHDispTest;
47
48 MFDisp *fDispFilter; // filter to select an events sample
49
50 MGeomCam *fCam;
51
52 MEvtLoop *fObjectFit;
53
54 //--------------------------------------------
55 // To comunicate with MINUIT
56 //--------------------------------------------
57 // attention : dimensions must agree with those in
58 // MMinuitInterface::CallMinuit()
59 //char fParName [80][100];
60 TArrayD fVinit;
61 TArrayD fStep;
62 TArrayD fLimlo;
63 TArrayD fLimup;
64 TArrayI fFix;
65
66 UInt_t fNpar;
67
68 TString fMethod;
69
70 Double_t fMin, fEdm, fErrdef;
71 Int_t fNpari, fNparx, fIstat;
72 Int_t fErrMinimize;
73 //--------------------------------------------
74
75public:
76
77 MFindDisp(MFDisp *fdisp=NULL, const char *name=NULL, const char *title=NULL);
78 ~MFindDisp();
79
80 void SetFilenameParam(const TString &name) {fFilenameParam = name;}
81
82 void SetFilenameTraining(const TString &name, const Int_t howmany)
83 {fFilenameTrain = name; fHowManyTrain = howmany; }
84
85 void SetFilenameTest(const TString &name, const Int_t howmany)
86 {fFilenameTest = name; fHowManyTest = howmany; }
87
88 Bool_t DefineTrainMatrix(const TString &name, MH3 &href,
89 const Int_t howmany, const TString &filetrain,
90 Int_t iflag=0);
91
92 Bool_t DefineTestMatrix(const TString &name, MH3 &href,
93 const Int_t howmany, const TString &filetest,
94 Int_t iflag=0);
95
96 Bool_t DefineTrainTestMatrix(const TString &name, MH3 &href,
97 const Int_t howmanytrain, const Int_t howmanytest,
98 const TString &filetrain, const TString &filetest,
99 Int_t iflag=0);
100
101 MHMatrix *GetMatrixTrainCalc() { return fMatrixTrainCalc; }
102 MHMatrix *GetMatrixTrainHists() { return fMatrixTrainHists; }
103 MHMatrix *GetMatrixTestCalc() { return fMatrixTestCalc; }
104 MHMatrix *GetMatrixTestHists() { return fMatrixTestHists; }
105
106 Bool_t ReadMatrix( const TString &filetrain, const TString &filetest);
107
108 Bool_t FindParams(TString parSCinit, TArrayD &params, TArrayD &steps);
109
110 Bool_t TestParams();
111
112 ClassDef(MFindDisp, 1) // Class for optimizing Disp
113};
114
115#endif
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Note: See TracBrowser for help on using the repository browser.