source: trunk/MagicSoft/Mars/mjtrain/MJTrainSeparation.h@ 7589

Last change on this file since 7589 was 7539, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 1.4 KB
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
12class MH3;
13
14class MJTrainSeparation : public MJTrainRanForest
15{
16private:
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
34public:
35 MJTrainSeparation() :
36 fNumTrainOn((UInt_t)-1), fNumTrainOff((UInt_t)-1), fNumTestOn((UInt_t)-1), fNumTestOff((UInt_t)-1)
37 { }
38
39 void SetDataSetTrain(const MDataSet &ds, UInt_t non=(UInt_t)-1, UInt_t noff=(UInt_t)-1)
40 {
41 ds.Copy(fDataSetTrain);
42 fNumTrainOn = non;
43 fNumTrainOff = noff;
44 }
45 void SetDataSetTest(const MDataSet &ds, UInt_t non=(UInt_t)-1, UInt_t noff=(UInt_t)-1)
46 {
47 ds.Copy(fDataSetTest);
48 fNumTestOn = non;
49 fNumTestOff = noff;
50 }
51
52 void EnableAutoTrain(Bool_t b=kTRUE) { fAutoTrain = kTRUE; }
53
54 Bool_t Train(const char *out);
55
56 ClassDef(MJTrainSeparation, 0)//Class to train Random Forest gamma-/background-separation
57};
58
59#endif
Note: See TracBrowser for help on using the repository browser.