20 SigProc::PerChannelResponse::~PerChannelResponse()
27 cfg[
"filename"] = m_filename;
33 m_filename =
get(
cfg,
"filename", m_filename);
34 if (m_filename.empty()) {
39 const double tick = top[
"tick"].asFloat();
40 const double t0 = top[
"t0"].asFloat();
41 auto jchannels = top[
"channels"];
42 if (jchannels.isNull()) {
46 for (
auto jchresp : jchannels) {
47 const int ch = jchresp[0].asInt();
48 auto jresp = jchresp[1];
49 const int nsamp = jresp.size();
54 for (
int ind=0; ind<nsamp; ++ind) {
55 resp[ind] = jresp[ind].asFloat();
58 if (!m_bins.nbins()) {
59 m_bins =
Binning(nsamp, t0, t0+nsamp*tick);
68 const auto& it = m_cr.find(channel_ident);
69 if (it == m_cr.end()) {
75 Binning SigProc::PerChannelResponse::channel_response_binning()
const code to link reconstructed objects back to the MC truth information
WIRECELL_FACTORY(PerChannelResponse, WireCell::SigProc::PerChannelResponse, WireCell::IChannelResponse, WireCell::IConfigurable) using namespace WireCell
boost::error_info< struct tag_errmsg, std::string > errmsg
Thrown when a wrong value has been encountered.
Json::Value Configuration
def channel_ident(G, wire)
Thrown when a wrong key or has been encountered.
def load(filename, jpath="depos")