/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/daq/include/RAT/WaveformPrep.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/daq/include/RAT/WaveformPrep.hh Source File
Ratpac-two
WaveformPrep.hh
1 #ifndef __RAT_WaveformPrep__
20 #define __RAT_WaveformPrep__
21 
22 #include <TObject.h>
23 
24 #include <RAT/DB.hh>
25 #include <RAT/DS/DigitPMT.hh>
26 #include <RAT/Digitizer.hh>
27 #include <RAT/Processor.hh>
28 #include <vector>
29 
30 namespace RAT {
31 
32 class WaveformPrep : public Processor {
33  public:
34  WaveformPrep();
35  WaveformPrep(std::string analyzer_name);
36  virtual ~WaveformPrep(){};
37 
38  void Configure(const std::string &analyzer_name);
39  void RunAnalysis(DS::DigitPMT *digitpmt, int pmtID, Digitizer *fDigitizer, double timeOffset = 0.0);
40  void RunAnalysis(DS::DigitPMT *digitpmt, int pmtID, DS::Digit *dsdigit, double timeOffset = 0.0);
41 
42  double RunAnalysisOnTrigger(int pmtID, Digitizer *fDigitizer);
43 
44  void ZeroSuppress(DS::EV *ev, DS::DigitPMT *digitpmt, int pmtID);
45 
46  virtual Processor::Result Event(DS::Root *ds, DS::EV *ev);
47  virtual void SetS(std::string param, std::string value);
48  virtual void SetD(std::string param, double value);
49  virtual void SetI(std::string param, int value);
50 
51  protected:
52  // Digitizer settings
53  DBLinkPtr fDigit;
54  double fTimeStep;
55  double fVoltageRes;
56  double fTermOhms;
57 
58  // Analysis constants
59  int fPedWindowLow;
60  int fPedWindowHigh;
61  double fLookback;
62  int fIntWindowLow;
63  int fIntWindowHigh;
64  double fConstFrac;
65  int fLowIntWindow;
66  int fHighIntWindow;
67  double fVoltageCrossing;
68  double fThreshold;
69  int fSlidingWindow;
70  double fChargeThresh;
71 
72  // Use Cable offsets specified in channel status?
73  int fApplyCableOffset;
74  int fZeroSuppress;
75 
76  void DoAnalysis(DS::DigitPMT *pmt, const std::vector<UShort_t> &DigitWfm, double timeOffset);
77 };
78 
79 } // namespace RAT
80 
81 #endif
Definition: DigitPMT.hh:23
Definition: Digit.hh:22
Definition: EV.hh:33
Definition: Root.hh:39
Digitizer.
Definition: Digitizer.hh:29
Definition: Processor.hh:36
Result
Definition: Processor.hh:59
Process the digitized waveforms.
Definition: WaveformPrep.hh:32
virtual void SetD(std::string param, double value)
Definition: WaveformPrep.cc:59
virtual void SetI(std::string param, int value)
Definition: WaveformPrep.cc:45
virtual Processor::Result Event(DS::Root *ds, DS::EV *ev)
Definition: WaveformPrep.cc:176
virtual void SetS(std::string param, std::string value)
Definition: WaveformPrep.cc:37
Definition: CCCrossSecMessenger.hh:29