source: trunk/MagicSoft/Mars/mpedestal/MPedestalPix.h@ 4545

Last change on this file since 4545 was 4404, checked in by fgoebel, 20 years ago
*** empty log message ***
File size: 1.8 KB
Line 
1#ifndef MARS_MPedestalPix
2#define MARS_MPedestalPix
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MPedestalPix : public MParContainer
9{
10private:
11
12 Float_t fPedestal; // mean value of pedestal (PMT offset)
13 Float_t fPedestalRms; // root mean square / sigma / standard deviation of pedestal
14 Float_t fPedestalABoffset; // the difference between odd slice pedestal mean and the
15 // total pedestal mean (fPedestal). For even slices pedestal
16 // use -fPedestalABoffset.
17 UInt_t fNumEvents; // number of times, the Process was executed (to estimate the error of pedestal)
18 Bool_t fValid; // flag to set pixel valid
19
20public:
21 MPedestalPix();
22
23 void Clear(Option_t *o="");
24
25 // Using histograms
26 void InitUseHists();
27
28 // Setters
29 void SetPedestal(const Float_t f) { fPedestal = f; }
30 void SetPedestalRms(const Float_t f) { fPedestalRms = f; }
31 void SetPedestalABoffset(const Float_t f) { fPedestalABoffset = f; }
32 void SetNumEvents(const UInt_t n) { fNumEvents = n; }
33
34 void Set(const Float_t m, const Float_t r, const Float_t offs=0, const UInt_t n=0);
35 void SetValid(const Bool_t b=kTRUE) { fValid = b; }
36
37 // Getters
38 Float_t GetPedestal() const { return fPedestal; }
39 Float_t GetPedestalRms() const { return fPedestalRms; }
40 Float_t GetPedestalABoffset() const { return fPedestalABoffset; }
41 Float_t GetPedestalError() const { return fNumEvents>0 ? fPedestalRms/TMath::Sqrt((Float_t)fNumEvents) : 0; }
42 Float_t GetPedestalRmsError() const { return fNumEvents>0 ? fPedestalRms/TMath::Sqrt((Float_t)fNumEvents/2) : 0; }
43
44 Bool_t IsValid() const;
45
46 ClassDef(MPedestalPix, 2) // Storage Container for Pedestal information of one pixel
47};
48
49#endif
50
Note: See TracBrowser for help on using the repository browser.