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

Last change on this file since 4609 was 4609, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.6 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
21 // Using histograms
22 void InitUseHists();
23
24 // Setters
25 void SetPedestal(const Float_t f) { fPedestal = f; }
26 void SetPedestalRms(const Float_t f) { fPedestalRms = f; }
27 void SetPedestalABoffset(const Float_t f) { fPedestalABoffset = f; }
28 void SetNumEvents(const UInt_t n) { fNumEvents = n; }
29
30 void Set(const Float_t m, const Float_t r, const Float_t offs=0, const UInt_t n=0);
31
32 // Getters
33 Float_t GetPedestal() const { return fPedestal; }
34 Float_t GetPedestalRms() const { return fPedestalRms; }
35 Float_t GetPedestalABoffset() const { return fPedestalABoffset; }
36 Float_t GetPedestalError() const { return fNumEvents>0 ? fPedestalRms/TMath::Sqrt((Float_t)fNumEvents) : 0; }
37 Float_t GetPedestalRmsError() const { return fNumEvents>0 ? fPedestalRms/TMath::Sqrt((Float_t)fNumEvents/2) : 0; }
38
39 UInt_t GetNumEvents() const { return fNumEvents; }
40
41 Bool_t IsValid() const;
42
43 ClassDef(MPedestalPix, 3) // Storage Container for Pedestal information of one pixel
44};
45
46#endif
Note: See TracBrowser for help on using the repository browser.