Public Member Functions | List of all members
WireCell::Response::Generator Class Referenceabstract

#include <Response.h>

Inheritance diagram for WireCell::Response::Generator:
WireCell::Response::ColdElec WireCell::Response::HfFilter WireCell::Response::LfFilter WireCell::Response::SimpleRC WireCell::Response::SysResp

Public Member Functions

virtual ~Generator ()
 
virtual double operator() (double time) const =0
 
WireCell::Waveform::realseq_t generate (const WireCell::Waveform::Domain &domain, int nsamples)
 FIXME: eradicate Domain in favor of Binning. More...
 
WireCell::Waveform::realseq_t generate (const WireCell::Binning &tbins)
 Lay down the function into a binned waveform. More...
 

Detailed Description

Definition at line 153 of file Response.h.

Constructor & Destructor Documentation

Response::Generator::~Generator ( )
virtual

Definition at line 296 of file Response.cxx.

297 {
298 
299 
300 }

Member Function Documentation

WireCell::Waveform::realseq_t Response::Generator::generate ( const WireCell::Waveform::Domain domain,
int  nsamples 
)

FIXME: eradicate Domain in favor of Binning.

Definition at line 303 of file Response.cxx.

304 {
305  WireCell::Waveform::realseq_t ret(nsamples);
306  const double tick = (domain.second-domain.first)/nsamples;
307  for (int ind=0; ind < nsamples; ++ind) {
308  double t = domain.first + ind*tick;
309  ret[ind] = (*this)(t);
310  }
311  return ret;
312 }
Sequence< real_t > realseq_t
Definition: Waveform.h:31
const double tick
WireCell::Waveform::realseq_t Response::Generator::generate ( const WireCell::Binning tbins)

Lay down the function into a binned waveform.

Definition at line 313 of file Response.cxx.

314 {
315  const int nsamples = tbins.nbins();
316  WireCell::Waveform::realseq_t ret(nsamples, 0.0);
317  for (int ind=0; ind<nsamples; ++ind) {
318  const double time = tbins.center(ind);
319  ret[ind] = (*this)(time);
320  }
321  return ret;
322 }
Sequence< real_t > realseq_t
Definition: Waveform.h:31
double center(int ind) const
Definition: Binning.h:86
int nbins() const
Definition: Binning.h:42
virtual double WireCell::Response::Generator::operator() ( double  time) const
pure virtual

The documentation for this class was generated from the following files: