1 | #ifndef MARS_MPedCalcFromLoGain
|
---|
2 | #define MARS_MPedCalcFromLoGain
|
---|
3 |
|
---|
4 | #ifndef MARS_MExtractPedestal
|
---|
5 | #include "MExtractPedestal.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TArrayD
|
---|
9 | #include <TArrayD.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef ROOT_TArrayI
|
---|
13 | #include <TArrayI.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | class MRawEvtPixelIter;
|
---|
17 | class MPedestalPix;
|
---|
18 | class MPedCalcFromLoGain : public MExtractPedestal
|
---|
19 | {
|
---|
20 |
|
---|
21 | static const UShort_t fgCheckWinFirst; // First FADC slice to check for signal (currently set to: 0)
|
---|
22 | static const UShort_t fgCheckWinLast; // Last FADC slice to check for signal (currently set to: 29)
|
---|
23 | static const UShort_t fgMaxSignalVar; // The maximum difference between the highest and lowest slice
|
---|
24 | static const UShort_t fgExtractWinFirst; // First FADC slice to use for pedestal calculation (currently set to: 15)
|
---|
25 | static const UShort_t fgExtractWinSize; // number of successive slices used to calculate pedestal (currently set to: 6)
|
---|
26 |
|
---|
27 | UShort_t fMaxSignalVar;
|
---|
28 | UShort_t fCheckWinFirst;
|
---|
29 | UShort_t fCheckWinLast;
|
---|
30 |
|
---|
31 | TArrayI fNumEventsUsed; // Number of events used for pedestal calc for each pixel
|
---|
32 | TArrayI fTotalCounter; // Counter for dumping values to Pedestal Container
|
---|
33 |
|
---|
34 | Bool_t ReInit (MParList *pList);
|
---|
35 | Int_t Process ();
|
---|
36 | Int_t PostProcess();
|
---|
37 |
|
---|
38 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
39 |
|
---|
40 | //Helper function to extract slice values by slice number
|
---|
41 | UShort_t GetSlice(MRawEvtPixelIter *pixel, UInt_t slice);
|
---|
42 | void CalcExtractor ( MRawEvtPixelIter *pixel, Float_t &sum, MPedestalPix &ped);
|
---|
43 | void ResetArrays();
|
---|
44 |
|
---|
45 | public:
|
---|
46 |
|
---|
47 | MPedCalcFromLoGain(const char *name=NULL, const char *title=NULL);
|
---|
48 |
|
---|
49 | void Print(Option_t *o="") const;
|
---|
50 |
|
---|
51 | // Setters
|
---|
52 | Bool_t SetCheckRange(UShort_t checkfirst=fgCheckWinFirst, UShort_t checklast=fgCheckWinLast);
|
---|
53 | void SetMaxSignalVar(UShort_t maxvar=40) { fMaxSignalVar = maxvar; }
|
---|
54 |
|
---|
55 | // Getters
|
---|
56 | TArrayI *GetNumEventsUsed() { return &fNumEventsUsed; }
|
---|
57 |
|
---|
58 | ClassDef(MPedCalcFromLoGain, 1) // Task to calculate pedestals from data runs
|
---|
59 | };
|
---|
60 |
|
---|
61 | #endif
|
---|