Line | |
---|
1 | #ifndef MARS_MJTrainSeparation
|
---|
2 | #define MARS_MJTrainSeparation
|
---|
3 |
|
---|
4 | #ifndef MARS_MJTrainRanForest
|
---|
5 | #include "MJTrainRanForest.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MDataSet
|
---|
9 | #include "MDataSet.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | class MH3;
|
---|
13 |
|
---|
14 | class MJTrainSeparation : public MJTrainRanForest
|
---|
15 | {
|
---|
16 | private:
|
---|
17 | MDataSet fDataSetTest;
|
---|
18 | MDataSet fDataSetTrain;
|
---|
19 |
|
---|
20 | UInt_t fNumTrainOn;
|
---|
21 | UInt_t fNumTrainOff;
|
---|
22 |
|
---|
23 | UInt_t fNumTestOn;
|
---|
24 | UInt_t fNumTestOff;
|
---|
25 |
|
---|
26 | Bool_t fAutoTrain;
|
---|
27 |
|
---|
28 | void DisplayResult(MH3 &h31, MH3 &h32);
|
---|
29 |
|
---|
30 | Bool_t GetEventsProduced(MDataSet &set, Double_t &num, Double_t &min, Double_t &max) const;
|
---|
31 | Double_t GetDataRate(MDataSet &set) const;
|
---|
32 | Bool_t AutoTrain();
|
---|
33 |
|
---|
34 | public:
|
---|
35 | MJTrainSeparation() :
|
---|
36 | fNumTrainOn((UInt_t)-1), fNumTrainOff((UInt_t)-1),
|
---|
37 | fNumTestOn((UInt_t)-1), fNumTestOff((UInt_t)-1),
|
---|
38 | fAutoTrain(kFALSE)
|
---|
39 | { }
|
---|
40 |
|
---|
41 | void SetDataSetTrain(const MDataSet &ds, UInt_t non=(UInt_t)-1, UInt_t noff=(UInt_t)-1)
|
---|
42 | {
|
---|
43 | ds.Copy(fDataSetTrain);
|
---|
44 | fNumTrainOn = non;
|
---|
45 | fNumTrainOff = noff;
|
---|
46 | }
|
---|
47 | void SetDataSetTest(const MDataSet &ds, UInt_t non=(UInt_t)-1, UInt_t noff=(UInt_t)-1)
|
---|
48 | {
|
---|
49 | ds.Copy(fDataSetTest);
|
---|
50 | fNumTestOn = non;
|
---|
51 | fNumTestOff = noff;
|
---|
52 | }
|
---|
53 |
|
---|
54 | void EnableAutoTrain(Bool_t b=kTRUE) { fAutoTrain = b; }
|
---|
55 |
|
---|
56 | Bool_t Train(const char *out);
|
---|
57 |
|
---|
58 | ClassDef(MJTrainSeparation, 0)//Class to train Random Forest gamma-/background-separation
|
---|
59 | };
|
---|
60 |
|
---|
61 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.