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

Last change on this file since 4601 was 4601, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1#ifndef MARS_MPedCalcFromLoGain
2#define MARS_MPedCalcFromLoGain
3
4#ifndef MARS_MExtractor
5#include "MExtractor.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
16class MGeomCam;
17class MBadPixelsCam;
18
19class MPedCalcFromLoGain : public MExtractor
20{
21 static const Byte_t fgHiGainFirst; // First FADC slice Hi-Gain (currently set to: 3)
22 static const Byte_t fgHiGainLast; // Last FADC slice Hi-Gain (currently set to: 14)
23 static const Byte_t fgLoGainFirst; // First FADC slice Lo-Gain (currently set to: 3)
24 static const Byte_t fgLoGainLast; // Last FADC slice Lo-Gain (currently set to: 14)
25 static const Byte_t fgHiGainWindowSize; // The extraction window Hi-Gain
26 static const Byte_t fgLoGainWindowSize; // The extraction window Lo-Gain
27 static const Byte_t fgMaxHiGainVar; // The maximum difference between the highest and lowest slice
28
29 Int_t fNumEventsDump; // Number of event after which MPedestalCam gets updated
30
31 Byte_t fMaxHiGainVar;
32 Byte_t fWindowSizeHiGain; // Number of Hi Gain slices in window
33 Byte_t fWindowSizeLoGain; // Number of Lo Gain slices in window
34
35 Bool_t fPedestalUpdate;
36
37 MGeomCam *fGeom; // Camera geometry
38 TString fPedContainerName; // name of the 'MPedestalCam' container
39
40 TArrayI fNumEventsUsed; // Number of events used for pedestal calc for each pixel
41 TArrayI fTotalCounter; // Counter for dumping values to Pedestal Container
42 TArrayD fSumx; // sum of values
43 TArrayD fSumx2; // sum of squared values
44 TArrayD fSumAB0; // sum of ABFlag=0 slices
45 TArrayD fSumAB1; // sum of ABFlag=1 slices
46
47 // MParContainer
48 Int_t PreProcess (MParList *pList);
49 Bool_t ReInit (MParList *pList);
50 Int_t Process ();
51 Int_t PostProcess();
52 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
53
54 // Calculation
55 void Calc(ULong_t n, UInt_t idx);
56
57public:
58 MPedCalcFromLoGain(const char *name=NULL, const char *title=NULL);
59
60 // TObject
61 void Clear(const Option_t *o="");
62
63 // Setter
64 void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);
65 void SetWindowSize(Byte_t windowh=0, Byte_t windowl=0);
66 void SetMaxHiGainVar(Byte_t maxvar=0);
67 void SetDumpEvents(UInt_t dumpevents = 0) {fNumEventsDump = dumpevents;}
68 void SetPedestalUpdate(Bool_t pedupdate) {fPedestalUpdate = pedupdate;}
69
70 void SetPedContainerName(const char *name) { fPedContainerName = name; }
71
72 // Getter
73 TArrayI *GetNumEventsUsed() { return &fNumEventsUsed; }
74
75 ClassDef(MPedCalcFromLoGain, 0) // Task to calculate pedestals from pedestal runs raw data
76};
77
78#endif
Note: See TracBrowser for help on using the repository browser.