1 | #ifndef MARS_MDrsCalibApply
|
---|
2 | #define MARS_MDrsCalibApply
|
---|
3 |
|
---|
4 | #ifndef MARS_MTask
|
---|
5 | #include "MTask.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_DrsCalib
|
---|
9 | #include "DrsCalib.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #include <deque>
|
---|
13 |
|
---|
14 | class MRawRunHeader;
|
---|
15 | class MRawEvtData;
|
---|
16 | class MPedestalSubtractedEvt;
|
---|
17 | class MDrsCalibration;
|
---|
18 |
|
---|
19 | class MDrsCalibResult: public MParContainer
|
---|
20 | {
|
---|
21 | friend class MDrsCalibApply;
|
---|
22 |
|
---|
23 | public:
|
---|
24 | std::vector<DrsCalibrate::Step> fData;
|
---|
25 |
|
---|
26 | MDrsCalibResult()
|
---|
27 | {
|
---|
28 | fName = "MDrsCalibResult";
|
---|
29 | }
|
---|
30 |
|
---|
31 | const std::vector<DrsCalibrate::Step> &GetData() const { return fData; }
|
---|
32 |
|
---|
33 | ClassDef(MDrsCalibResult, 0)
|
---|
34 | };
|
---|
35 |
|
---|
36 | class MDrsCalibApply : public MTask
|
---|
37 | {
|
---|
38 | private:
|
---|
39 | MRawRunHeader *fRunHeader; //! Run Header
|
---|
40 | MRawEvtData *fRawEvt; //! Input Raw data
|
---|
41 | MDrsCalibration *fDrsCalib; //! DRS4 calibration data
|
---|
42 | MPedestalSubtractedEvt *fSignal; //! Output container
|
---|
43 | MDrsCalibResult *fResult; //! Output container
|
---|
44 |
|
---|
45 | std::deque<std::vector<Short_t>> fPrevStart; //! History for start cells of previous events
|
---|
46 |
|
---|
47 | UShort_t fMaxNumPrevEvents;
|
---|
48 | UShort_t fRemoveSpikes;
|
---|
49 | UShort_t fSlidingAverage;
|
---|
50 |
|
---|
51 | Int_t PreProcess(MParList *pList);
|
---|
52 | Bool_t ReInit(MParList *pList);
|
---|
53 | Int_t Process();
|
---|
54 |
|
---|
55 | public:
|
---|
56 | MDrsCalibApply(const char *name=NULL, const char *title=NULL);
|
---|
57 |
|
---|
58 | void SetMaxNumPrevEvents(UShort_t n) { fMaxNumPrevEvents = n; }
|
---|
59 | void SetRemoveSpikes(int typ=1) { fRemoveSpikes = typ; }
|
---|
60 | void SetSlidingAverage(UShort_t w) { fSlidingAverage = w; }
|
---|
61 |
|
---|
62 | ClassDef(MDrsCalibApply, 0) // Class to subtract pedestal including AB-noise
|
---|
63 | };
|
---|
64 |
|
---|
65 | #endif
|
---|