source: trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.h@ 5671

Last change on this file since 5671 was 5558, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.1 KB
Line 
1#ifndef MARS_MPedCalcFromLoGain
2#define MARS_MPedCalcFromLoGain
3
4#ifndef MARS_MExtractPedestal
5#include "MExtractPedestal.h"
6#endif
7
8#ifndef ROOT_TArrayI
9#include <TArrayI.h>
10#endif
11
12#ifndef ROOT_MArrayB
13#include "MArrayB.h"
14#endif
15
16class MRawEvtPixelIter;
17class MPedestalPix;
18
19class MPedCalcFromLoGain : public MExtractPedestal
20{
21private:
22 static const UShort_t fgCheckWinFirst; // First FADC slice to check for signal (currently set to: 0)
23 static const UShort_t fgCheckWinLast; // Last FADC slice to check for signal (currently set to: 29)
24 static const UShort_t fgMaxSignalVar; // The maximum difference between the highest and lowest slice
25 static const UShort_t fgExtractWinFirst; // First FADC slice to use for pedestal calculation (currently set to: 15)
26 static const UShort_t fgExtractWinSize; // number of successive slices used to calculate pedestal (currently set to: 6)
27
28 UShort_t fMaxSignalVar;
29 UShort_t fCheckWinFirst;
30 UShort_t fCheckWinLast;
31
32 TArrayI fNumEventsUsed; //! Number of events used for pedestal calc for each pixel
33 TArrayI fTotalCounter; //! Counter for dumping values to Pedestal Container
34
35 MArrayB fSlices; //! workaround to put hi- and lo-gain slices together
36
37 Bool_t ReInit(MParList *pList);
38 Int_t Process();
39 Int_t PostProcess();
40
41 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
42
43 //Helper function to extract slice values by slice number
44 void CalcExtractor(const MRawEvtPixelIter &pixel, Float_t &sum, MPedestalPix &ped);
45 void ResetArrays();
46
47 void CalcSectorResult();
48 void CalcAreaResult();
49
50public:
51
52 MPedCalcFromLoGain(const char *name=NULL, const char *title=NULL);
53
54 void Print(Option_t *o="") const;
55
56 // Setters
57 Bool_t SetCheckRange(UShort_t checkfirst=fgCheckWinFirst, UShort_t checklast=fgCheckWinLast);
58 void SetMaxSignalVar(UShort_t maxvar=40) { fMaxSignalVar = maxvar; }
59
60 // Getters
61 TArrayI *GetNumEventsUsed() { return &fNumEventsUsed; }
62
63 ClassDef(MPedCalcFromLoGain, 1) // Task to calculate pedestals from data runs
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.