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

Last change on this file since 6215 was 5464, checked in by gaug, 20 years ago
*** empty log message ***
File size: 1.7 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 Float_t fPedestal; // mean value of pedestal (PMT offset)
12 Float_t fPedestalRms; // root mean square / sigma / standard deviation of pedestal
13 Float_t fPedestalABoffset; // the difference between odd slice pedestal mean and total mean
14 UInt_t fNumEvents; // number of times, the Process was executed (to estimate the error of pedestal)
15
16public:
17 MPedestalPix();
18
19 void Clear(Option_t *o="");
20 void Copy(TObject &object) const;
21
22 // Using histograms
23 void InitUseHists();
24
25 // Setters
26 void SetPedestal(const Float_t f) { fPedestal = f; }
27 void SetPedestalRms(const Float_t f) { fPedestalRms = f; }
28 void SetPedestalABoffset(const Float_t f) { fPedestalABoffset = f; }
29 void SetNumEvents(const UInt_t n) { fNumEvents = n; }
30
31 void Set(const Float_t m, const Float_t r, const Float_t offs=0, const UInt_t n=0);
32
33 // Getters
34 Float_t GetPedestal() const { return fPedestal; }
35 Float_t GetPedestalRms() const { return fPedestalRms; }
36 Float_t GetPedestalABoffset() const { return fPedestalABoffset; }
37 Float_t GetPedestalError() const { return fNumEvents>0 ? fPedestalRms/TMath::Sqrt((Float_t)fNumEvents) : 0; }
38 Float_t GetPedestalRmsError() const { return fNumEvents>0 ? fPedestalRms/TMath::Sqrt((Float_t)fNumEvents*2) : 0; }
39
40 UInt_t GetNumEvents() const { return fNumEvents; }
41
42 Bool_t IsValid() const;
43
44 ClassDef(MPedestalPix, 3) // Storage Container for Pedestal information of one pixel
45};
46
47#endif
Note: See TracBrowser for help on using the repository browser.