22 Gen::DepoSplat::~DepoSplat()
32 std::unordered_map<int, std::vector<float> > chch;
36 m_start_time+m_readout_time);
39 for (
auto plane : face->planes()) {
48 auto& wires = plane->wires();
57 for (
auto depo : depos) {
59 const double pwid = m_nsigma * depo->extent_tran();
60 const double pcen = pimpos->
distance(depo->pos());
62 const double twid = m_nsigma*depo->extent_long();
63 const double tcen = depo->time();
66 const int pend =
std::min(wbins.
bin(pcen+pwid)+1, (
int)wires.size());
67 const int tbeg = tbins.
bin(tcen-twid);
68 const int tend = tbins.
bin(tcen+twid)+1;
77 for (
int ip = pbeg; ip < pend; ++ip) {
78 auto iwire = wires[ip];
79 auto& charge = chch[iwire->channel()];
80 if ((
int)charge.size() < tend) {
81 charge.resize(tend, 0.0);
83 for (
int it = tbeg; it < tend; ++it) {
84 charge[it] +=
std::abs(depo->charge());
93 for (
auto& chchit : chch) {
94 const int chid = chchit.first;
95 auto& chv = chchit.second;
96 auto trace = std::make_shared<SimpleTrace>(chid, 0, chv);
97 traces.push_back(
trace);
const Binning & region_binning() const
double distance(const Point &pt, int axis=2) const
std::vector< pointer > vector
Binning tbins(nticks, t0, t0+readout_time)
int bin(double val) const
std::shared_ptr< Interface > pointer
WIRECELL_FACTORY(DepoSplat, WireCell::Gen::DepoSplat, WireCell::IDuctor, WireCell::IConfigurable) using namespace WireCell
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Pimpos pimpos(nwires, min_wire_pitch, max_wire_pitch)