RCResponse.cxx
Go to the documentation of this file.
2 
5 
6 
9 
10 using namespace WireCell;
11 
12 Gen::RCResponse::RCResponse(int nticks, double t0, double width, double tick)
13 {
14  m_cfg["start"] = t0;
15  m_cfg["tick"] = tick;
16  m_cfg["nticks"] = nticks;
17  m_cfg["width"] = width;
18 }
19 WireCell::Configuration Gen::RCResponse::default_configuration() const
20 {
21  return m_cfg;
22 }
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(),
30  waveform_period(),
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 }
39 
40 double Gen::RCResponse::waveform_start() const
41 {
42  return m_cfg["start"].asDouble();
43 }
44 
45 double Gen::RCResponse::waveform_period() const
46 {
47  return m_cfg["tick"].asDouble();
48 }
49 
50 const IWaveform::sequence_type& Gen::RCResponse::waveform_samples() const
51 {
52  return m_wave;
53 }
54 
code to link reconstructed objects back to the MC truth information
WIRECELL_FACTORY(RCResponse, WireCell::Gen::RCResponse, WireCell::IWaveform, WireCell::IConfigurable) using namespace WireCell
cfg
Definition: dbjson.py:29
const double tick
const int nticks
const double width
std::vector< float > sequence_type
Definition: IWaveform.h:17
const double t0
def configure(cfg)
Definition: cuda.py:34
WireCell::Waveform::realseq_t generate(const WireCell::Waveform::Domain &domain, int nsamples)
FIXME: eradicate Domain in favor of Binning.
Definition: Response.cxx:303
Definition: Main.h:22
Json::Value Configuration
Definition: Configuration.h:50