Public Member Functions | Private Attributes | List of all members
WireCell::Gen::RCResponse Class Reference

#include <RCResponse.h>

Inheritance diagram for WireCell::Gen::RCResponse:
WireCell::IWaveform WireCell::IConfigurable WireCell::IData< IWaveform > WireCell::IComponent< IConfigurable > WireCell::Interface

Public Member Functions

 RCResponse (int nticks=10000, double t0=0, double width=1.0 *units::ms, double tick=0.5 *units::us)
 
virtual void configure (const WireCell::Configuration &cfg)
 Accept a configuration. More...
 
virtual WireCell::Configuration default_configuration () const
 Optional, override to return a hard-coded default configuration. More...
 
virtual double waveform_start () const
 
virtual double waveform_period () const
 
virtual const sequence_typewaveform_samples () const
 
- Public Member Functions inherited from WireCell::IWaveform
virtual ~IWaveform ()
 
- Public Member Functions inherited from WireCell::IConfigurable
virtual ~IConfigurable ()
 
- Public Member Functions inherited from WireCell::IComponent< IConfigurable >
virtual ~IComponent ()
 
- Public Member Functions inherited from WireCell::Interface
virtual ~Interface ()
 

Private Attributes

Configuration m_cfg
 
sequence_type m_wave
 

Additional Inherited Members

- Public Types inherited from WireCell::IWaveform
typedef std::vector< float > sequence_type
 
- Public Types inherited from WireCell::IComponent< IConfigurable >
typedef std::shared_ptr< IConfigurablepointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 Vector of shared pointers. More...
 
- Public Types inherited from WireCell::Interface
typedef std::shared_ptr< Interfacepointer
 

Detailed Description

Definition at line 14 of file RCResponse.h.

Constructor & Destructor Documentation

Gen::RCResponse::RCResponse ( int  nticks = 10000,
double  t0 = 0,
double  width = 1.0*units::ms,
double  tick = 0.5*units::us 
)

Definition at line 12 of file RCResponse.cxx.

13 {
14  m_cfg["start"] = t0;
15  m_cfg["tick"] = tick;
16  m_cfg["nticks"] = nticks;
17  m_cfg["width"] = width;
18 }
const double tick
const int nticks
const double width
const double t0

Member Function Documentation

void Gen::RCResponse::configure ( const WireCell::Configuration config)
virtual

Accept a configuration.

Implements WireCell::IConfigurable.

Definition at line 23 of file RCResponse.cxx.

24 {
25  m_cfg = cfg;
26 
27  // fixme: why give SimpleRC tick twice? Once in ctor and once in
28  // generate()?
29  Response::SimpleRC rc(m_cfg["width"].asDouble(),
31  waveform_start());
32 
33  const int nbins = m_cfg["nticks"].asInt();
34  const double t0 = waveform_start();
35  const double tick = waveform_period();
36  Binning bins(nbins, t0, t0+nbins*tick);
37  m_wave = rc.generate(bins);
38 }
code to link reconstructed objects back to the MC truth information
cfg
Definition: dbjson.py:29
const double tick
sequence_type m_wave
Definition: RCResponse.h:35
virtual double waveform_start() const
Definition: RCResponse.cxx:40
virtual double waveform_period() const
Definition: RCResponse.cxx:45
WireCell::Configuration Gen::RCResponse::default_configuration ( ) const
virtual

Optional, override to return a hard-coded default configuration.

Reimplemented from WireCell::IConfigurable.

Definition at line 19 of file RCResponse.cxx.

20 {
21  return m_cfg;
22 }
double Gen::RCResponse::waveform_period ( ) const
virtual

Implements WireCell::IWaveform.

Definition at line 45 of file RCResponse.cxx.

46 {
47  return m_cfg["tick"].asDouble();
48 }
const IWaveform::sequence_type & Gen::RCResponse::waveform_samples ( ) const
virtual

Implements WireCell::IWaveform.

Definition at line 50 of file RCResponse.cxx.

51 {
52  return m_wave;
53 }
sequence_type m_wave
Definition: RCResponse.h:35
double Gen::RCResponse::waveform_start ( ) const
virtual

Implements WireCell::IWaveform.

Definition at line 40 of file RCResponse.cxx.

41 {
42  return m_cfg["start"].asDouble();
43 }

Member Data Documentation

Configuration WireCell::Gen::RCResponse::m_cfg
private

Definition at line 34 of file RCResponse.h.

sequence_type WireCell::Gen::RCResponse::m_wave
private

Definition at line 35 of file RCResponse.h.


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