source: trunk/Mars/melectronics/MAnalogSignal.h@ 19713

Last change on this file since 19713 was 19697, checked in by tbretz, 5 years ago
Added a function to shift the signal.
File size: 1.2 KB
Line 
1#ifndef MARS_MAnalogSignal
2#define MARS_MAnalogSignal
3
4#ifndef MARS_MArrayF
5#include "MArrayF.h"
6#endif
7
8class TF1;
9class MSpline3;
10
11class MAnalogSignal : public MArrayF/*TObject*/
12{
13private:
14 MArrayF fDer1; //! Buffer for the derivatives of the corresponding spline
15 MArrayF fDer2; //! Buffer for the derivatives of the corresponding spline
16
17public:
18 MAnalogSignal(UInt_t n) { Set(n); }
19
20 void Set(UInt_t n);
21 Bool_t AddPulse(const MSpline3 &spline, Float_t t, Float_t f=1);
22 Bool_t AddPulse(const TF1 &f1, Float_t t, Float_t f=1);
23 void AddSignal(const MAnalogSignal &s, Int_t delay=0,Float_t dampingFact=1.0);
24 void CopySignal(const MAnalogSignal &s);
25 void ShiftSignal(Double_t s);
26
27 // Deprecated. Use MSimRandomPhotons instead
28 void AddRandomPulses(const MSpline3 &spline, Float_t num);
29
30 void AddGaussianNoise(Float_t amplitude=1, Float_t offset=0);
31
32 TObjArray *Discriminate(Float_t threshold, Double_t start, Double_t end, Float_t len=-1) const;
33 TObjArray *Discriminate(Float_t threshold, Float_t len=-1) const { return Discriminate(threshold, 0, fN-1, len); }
34
35 ClassDef(MAnalogSignal, 1) // Storage class for an analog signal
36};
37
38#endif
Note: See TracBrowser for help on using the repository browser.