| 1 | #ifndef MARS_MRanForestCalc
|
|---|
| 2 | #define MARS_MRanForestCalc
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MTask
|
|---|
| 5 | #include "MTask.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | #ifndef MARS_MHMatrix
|
|---|
| 9 | #include "MHMatrix.h"
|
|---|
| 10 | #endif
|
|---|
| 11 |
|
|---|
| 12 | class MParList;
|
|---|
| 13 | class MParameterD;
|
|---|
| 14 | class MDataArray;
|
|---|
| 15 | class MRanTree;
|
|---|
| 16 | class MRanForest;
|
|---|
| 17 |
|
|---|
| 18 | class MRanForestCalc : public MTask
|
|---|
| 19 | {
|
|---|
| 20 | private:
|
|---|
| 21 | Int_t fNum; // number of trees used to compute hadronness
|
|---|
| 22 |
|
|---|
| 23 | TString fHadronnessName; // Name of container storing hadronness
|
|---|
| 24 |
|
|---|
| 25 | MParameterD *fHadroness; //! Output container for calculated hadroness
|
|---|
| 26 | MDataArray *fData; //! Used to store the MDataChains to get the event values
|
|---|
| 27 | MRanForest *fRanForest;
|
|---|
| 28 | MRanTree *fRanTree;
|
|---|
| 29 |
|
|---|
| 30 | Int_t PreProcess(MParList *plist);
|
|---|
| 31 | Int_t Process();
|
|---|
| 32 |
|
|---|
| 33 | enum { kIsOwner = BIT(14) };
|
|---|
| 34 |
|
|---|
| 35 | Bool_t IsOwner() const { return TestBit(kIsOwner); }
|
|---|
| 36 | void SetOwner() { SetBit(kIsOwner); }
|
|---|
| 37 |
|
|---|
| 38 | public:
|
|---|
| 39 | MRanForestCalc(const char *name=NULL, const char *title=NULL);
|
|---|
| 40 | ~MRanForestCalc();
|
|---|
| 41 |
|
|---|
| 42 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
|---|
| 43 |
|
|---|
| 44 | void SetHadronnessName(const TString name) { fHadronnessName = name; }
|
|---|
| 45 | TString GetHadronnessName() const { return fHadronnessName; }
|
|---|
| 46 |
|
|---|
| 47 | void SetUseNumTrees(UShort_t n=100) { fNum = n; }
|
|---|
| 48 |
|
|---|
| 49 | Bool_t Grow(MHMatrix *matrixg,MHMatrix *matrixh,Int_t ntree,
|
|---|
| 50 | Int_t numtry,Int_t ndsize,const char* treefile=0,
|
|---|
| 51 | const char* treename=0,const char* contname=0,
|
|---|
| 52 | const char* hgininame=0);
|
|---|
| 53 |
|
|---|
| 54 | Bool_t Fill(Int_t ntree,const char* treefile=0,const char* treename=0);
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 | ClassDef(MRanForestCalc, 0) // Task
|
|---|
| 58 | };
|
|---|
| 59 |
|
|---|
| 60 | #endif
|
|---|