source: trunk/Mars/mtools/MChisqEval.h@ 19847

Last change on this file since 19847 was 14447, checked in by tbretz, 12 years ago
Added some missing std::
File size: 1.4 KB
Line 
1#ifndef MARS_MChisqEval
2#define MARS_MChisqEval
3
4#ifndef ROOT_MTask
5#include "MTask.h"
6#endif
7
8class MData;
9class MParameterD;
10
11class MChisqEval : public MTask
12{
13private:
14 static const TString gsDefName;
15 static const TString gsDefTitle;
16
17 MData *fData0; // Data Member one (monte carlo data or chisq function)
18 MData *fData1; // Data Member two (measured data)
19
20 MParameterD *fWeight; //! Storage for weight
21 MParameterD *fResult; //! Storage for result
22
23 TString fNameResult;
24 TString fNameWeight;
25
26 Double_t fChisq; //! Evaluated chi square
27 Double_t fSumW; //! Sum of weights
28
29 void StreamPrimitive(std::ostream &out) const;
30
31 enum { kIsOwner = BIT(14) };
32
33 Int_t PreProcess(MParList *plist);
34 Int_t Process();
35 Int_t PostProcess();
36
37public:
38 MChisqEval(const char *name=NULL, const char *title=NULL);
39 MChisqEval(MData *y1, const char *name=NULL, const char *title=NULL);
40 MChisqEval(MData *y1, MData *y2, const char *name=NULL, const char *title=NULL);
41 ~MChisqEval();
42
43 void SetY1(MData *data);
44 void SetY2(MData *data);
45 void SetY1(const TString data);
46 void SetY2(const TString data);
47
48 void SetOwner(Bool_t o=kTRUE) { o ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
49 void SetNameWeight(TString w="MWeight") { fNameWeight=w; }
50
51 Double_t GetChisq() const { return fChisq; }
52
53 ClassDef(MChisqEval, 0)
54};
55
56#endif
Note: See TracBrowser for help on using the repository browser.