| Line | |
|---|
| 1 | #ifndef MARS_MRFEnergyEst
|
|---|
| 2 | #define MARS_MRFEnergyEst
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MTask
|
|---|
| 5 | #include "MTask.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | #ifndef MARS_MDataArray
|
|---|
| 9 | #include "MDataArray.h"
|
|---|
| 10 | #endif
|
|---|
| 11 |
|
|---|
| 12 | #ifndef MARS_MEnergyEst
|
|---|
| 13 | #include "MEnergyEst.h"
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | #ifndef MARS_MHMatrix
|
|---|
| 17 | #include "MHMatrix.h"
|
|---|
| 18 | #endif
|
|---|
| 19 |
|
|---|
| 20 | #ifndef ROOT_TArrayF
|
|---|
| 21 | #include <TArrayF.h>
|
|---|
| 22 | #endif
|
|---|
| 23 |
|
|---|
| 24 | #ifndef ROOT_TArrayD
|
|---|
| 25 | #include <TArrayD.h>
|
|---|
| 26 | #endif
|
|---|
| 27 |
|
|---|
| 28 | #ifndef ROOT_TObjArray
|
|---|
| 29 | #include <TObjArray.h>
|
|---|
| 30 | #endif
|
|---|
| 31 |
|
|---|
| 32 | #ifndef ROOT_TRandom
|
|---|
| 33 | #include <TRandom.h>
|
|---|
| 34 | #endif
|
|---|
| 35 |
|
|---|
| 36 | //class MRanTree;
|
|---|
| 37 | //class MRanForest;
|
|---|
| 38 | //class MParList;
|
|---|
| 39 | //class MDataArray;
|
|---|
| 40 |
|
|---|
| 41 | class MRFEnergyEst : public MTask
|
|---|
| 42 | {
|
|---|
| 43 | private:
|
|---|
| 44 | // MRanTree *fRanTree;
|
|---|
| 45 | // MRanForest *fRanForest;
|
|---|
| 46 | // MDataArray *fData;
|
|---|
| 47 | Int_t fNumTrees;
|
|---|
| 48 | Int_t fNumTry;
|
|---|
| 49 | Int_t fNdSize;
|
|---|
| 50 |
|
|---|
| 51 | TString fRFfileName;
|
|---|
| 52 | MHMatrix *fMatrixTrain;
|
|---|
| 53 | MHMatrix *fMatrixTest;
|
|---|
| 54 | TArrayD fEnergyGrid;
|
|---|
| 55 |
|
|---|
| 56 | MDataArray *fData; //! Used to store the MDataChains to get the event values
|
|---|
| 57 | TObjArray fEForests;
|
|---|
| 58 |
|
|---|
| 59 | MEnergyEst *fEnergyEst;
|
|---|
| 60 |
|
|---|
| 61 | Int_t PreProcess(MParList *plist);
|
|---|
| 62 | Int_t Process();
|
|---|
| 63 | Int_t PostProcess();
|
|---|
| 64 |
|
|---|
| 65 | Int_t ReadForests(MParList *plist=NULL);
|
|---|
| 66 |
|
|---|
| 67 | public:
|
|---|
| 68 | MRFEnergyEst(const char *name=NULL, const char *title=NULL);
|
|---|
| 69 | ~MRFEnergyEst();
|
|---|
| 70 |
|
|---|
| 71 | void SetMatrixTrain(MHMatrix *mat) { fMatrixTrain = mat; }
|
|---|
| 72 | void SetMatrixTest( MHMatrix *mat) { fMatrixTest = mat; }
|
|---|
| 73 | void SetFile(TString str) { fRFfileName = str; }
|
|---|
| 74 |
|
|---|
| 75 | void SetLogEnergyGrid(TArrayD &egrid) { fEnergyGrid = egrid ; }
|
|---|
| 76 |
|
|---|
| 77 | void SetNumTrees(UShort_t n=100) { fNumTrees = n; }
|
|---|
| 78 | void SetNdSize(UShort_t n=1) { fNdSize = n; }
|
|---|
| 79 | void SetNumTry(UShort_t n) { fNumTry = n; }
|
|---|
| 80 |
|
|---|
| 81 | Int_t Train();
|
|---|
| 82 | Int_t Test();
|
|---|
| 83 |
|
|---|
| 84 | ClassDef(MRFEnergyEst, 0) // Task
|
|---|
| 85 | };
|
|---|
| 86 |
|
|---|
| 87 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.