source: trunk/Mars/mhist/MHCamEvent.h@ 13369

Last change on this file since 13369 was 13002, checked in by tbretz, 13 years ago
Propagate the weight and allow to calculate the difference of two camera.
File size: 2.6 KB
Line 
1#ifndef MARS_MHCamEvent
2#define MARS_MHCamEvent
3
4#ifndef MARS_MH
5#include "MH.h"
6#endif
7
8class MHCamera;
9class MCamEvent;
10
11class MHCamEvent : public MH
12{
13private:
14 static const TString gsDefName;
15 static const TString gsDefTitle;
16
17protected:
18 MHCamera *fSum; // storing the sum
19 MHCamera *fErr; //! storing the err
20 MCamEvent *fEvt; //! the current event
21 MCamEvent *fSub; //! the event to be subtracted
22
23 TString fNameEvt; // Name of MCamEvent to fill into histogram
24 TString fNameSub; // Name of MCamEvent to fill into histogram
25 TString fNameGeom; // Name of geometry container
26
27 Int_t fType; // Type to used for calling GetPixelContent
28 Bool_t fErrorSpread; // kFALSE==mean, kTRUE==spread
29 Bool_t fErrorRelative; // Display relative error?
30
31 Float_t fThreshold; // Count pixel above/below this threshold
32 Char_t fUseThreshold; // Use a threshold? Which direction has it?
33
34 Int_t fNumReInit; //!
35
36 TString Format(const char *ext) const;
37
38 void Init(const char *name, const char *title);
39 Bool_t InitGeom(const MParList &plist);
40
41 Bool_t SetupFill(const MParList *pList);
42 Bool_t ReInit(MParList *plist);
43 Int_t Fill(const MParContainer *par, const Stat_t w=1);
44
45public:
46 enum { kIsLowerBound=1, kIsUpperBound=-1, kNoBound=0, kCollectMin=-2, kCollectMax=2, kMedianShift=3, kMeanShift=4 };
47
48 MHCamEvent(const char *name=NULL, const char *title=NULL);
49 MHCamEvent(Int_t type, const char *name=NULL, const char *title=NULL);
50 ~MHCamEvent();
51
52 void SetNameEvt(const TString name) { fNameEvt = name; }
53 void SetNameSub(const TString name) { fNameSub = name; }
54 void SetNameGeom(const TString name) { fNameGeom = name; }
55 void SetType(Int_t type) { fType = type; }
56
57 void SetHist(const MHCamera &cam);
58 MHCamera *GetHist() { return fSum; }
59 const MHCamera *GetHist() const { return fSum; }
60
61 TH1 *GetHistByName(const TString name="") const;
62
63 void Paint(Option_t *o="");
64 void Draw(Option_t *o=""); //*MENU*
65
66 void PrintOutliers(Float_t s) const;
67
68 void SetThreshold(Float_t f=0, Char_t direction=kIsLowerBound) { fThreshold = f; fUseThreshold=direction; }
69 void SetCollectMin() { fUseThreshold=kCollectMin; }
70 void SetCollectMax() { fUseThreshold=kCollectMax; }
71 void SetMedianShift() { fUseThreshold=kMedianShift; }
72 void SetMeanShift() { fUseThreshold=kMeanShift; }
73 void SetErrorSpread(Bool_t b=kTRUE) { fErrorSpread = b; }
74 void SetErrorRelative(Bool_t b=kTRUE) { fErrorRelative = b; }
75
76 void RecursiveRemove(TObject *obj);
77
78 ClassDef(MHCamEvent, 3) // Histogram to sum camera events
79};
80
81#endif
Note: See TracBrowser for help on using the repository browser.