source: tags/Mars-V0.9/mpedestal/MPedCalcFromLoGain.h

Last change on this file was 5715, 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 fRandomCalculation;
38
39 Bool_t ReInit(MParList *pList);
40 Int_t Calc();
41 Int_t PostProcess();
42
43 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
44
45 //Helper function to extract slice values by slice number
46 void CalcExtractor(const MRawEvtPixelIter &pixel, Float_t &sum, MPedestalPix &ped);
47 void ResetArrays();
48
49 void CalcSectorResult();
50 void CalcAreaResult();
51
52public:
53 MPedCalcFromLoGain(const char *name=NULL, const char *title=NULL);
54
55 void Print(Option_t *o="") const;
56
57 // Setters
58 Bool_t SetCheckRange(UShort_t checkfirst=fgCheckWinFirst, UShort_t checklast=fgCheckWinLast);
59 void SetMaxSignalVar(UShort_t maxvar=40) { fMaxSignalVar = maxvar; }
60
61 // Getters
62 TArrayI *GetNumEventsUsed() { return &fNumEventsUsed; }
63
64 ClassDef(MPedCalcFromLoGain, 1) // Task to calculate pedestals from data runs
65};
66
67#endif
Note: See TracBrowser for help on using the repository browser.