//////////////////////////////////////////////////////////////////// /// \class RAT::TriggerSum /// /// \brief Simulate the trigger sums for any analog trigger /// /// \author Josh Klein /// /// REVISION HISTORY:\n /// 28 Apr 2010 : Josh Klein --- included realistic effects such as noise, /// baseline drift and CMOS dropout. /// 10 June 2016: Eric Marzec --- Made a subclass of AnalogSignal to allow // for TUBii/MTCA analog transforms to be done. /// /// \details The trigger sums are built out of trigger pulses /// (see TriggerPulse.hh). Functions such as GetHeight are used by MTCA /// objects to decide whether the sum crosses threshold, and work by simply /// adding up all trigger pulseheights at a given time. /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_TriggerSum__ #define __RAT_TriggerSum__ #include #include #include namespace RAT { class TriggerSum : public AnalogSignal { public: TriggerSum(); virtual ~TriggerSum(); virtual double GetHeight(double time); virtual double GetHeightByIndex(int i); void SetBaseline(float baseline){fBaseline=baseline;}; float GetBaseline(){return fBaseline;}; double GetNextTime(double time); int GetNext(double time); std::vector fPulse; protected: float fBaseline; }; } // namespace RAT #endif