BinnedDiffusion_transform.cxx
Go to the documentation of this file.
3 #include "WireCellUtil/Units.h"
4 
5 #include <iostream> // debug
6 #include <unordered_map>
7 using namespace std;
8 
9 using namespace WireCell;
10 
11 // bool Gen::GausDiffTimeCompare::operator()(const std::shared_ptr<Gen::GaussianDiffusion>& lhs, const std::shared_ptr<Gen::GaussianDiffusion>& rhs) const
12 // {
13 // if (lhs->depo_time() == rhs->depo_time()) {
14 // if (lhs->depo_x() == lhs->depo_x()) {
15 // return lhs.get() < rhs.get(); // break tie by pointer
16 // }
17 // return lhs->depo_x() < lhs->depo_x();
18 // }
19 // return lhs->depo_time() < rhs->depo_time();
20 // }
21 
22 
23 Gen::BinnedDiffusion_transform::BinnedDiffusion_transform(const Pimpos& pimpos, const Binning& tbins,
24  double nsigma, IRandom::pointer fluctuate,
26  : m_pimpos(pimpos)
27  , m_tbins(tbins)
28  , m_nsigma(nsigma)
29  , m_fluctuate(fluctuate)
30  , m_calcstrat(calcstrat)
31  , m_window(0,0)
32  , m_outside_pitch(0)
33  , m_outside_time(0)
34 {
35 }
36 
37 bool Gen::BinnedDiffusion_transform::add(IDepo::pointer depo, double sigma_time, double sigma_pitch)
38 {
39 
40  const double center_time = depo->time();
41  const double center_pitch = m_pimpos.distance(depo->pos());
42 
43  Gen::GausDesc time_desc(center_time, sigma_time);
44  {
45  double nmin_sigma = time_desc.distance(m_tbins.min());
46  double nmax_sigma = time_desc.distance(m_tbins.max());
47 
48  double eff_nsigma = sigma_time>0?m_nsigma:0;
49  if (nmin_sigma > eff_nsigma || nmax_sigma < -eff_nsigma) {
50  // std::cerr << "BinnedDiffusion_transform: depo too far away in time sigma:"
51  // << " t_depo=" << center_time/units::ms << "ms not in:"
52  // << " t_bounds=[" << m_tbins.min()/units::ms << ","
53  // << m_tbins.max()/units::ms << "]ms"
54  // << " in Nsigma: [" << nmin_sigma << "," << nmax_sigma << "]\n";
56  return false;
57  }
58  }
59 
60  auto ibins = m_pimpos.impact_binning();
61 
62  Gen::GausDesc pitch_desc(center_pitch, sigma_pitch);
63  {
64  double nmin_sigma = pitch_desc.distance(ibins.min());
65  double nmax_sigma = pitch_desc.distance(ibins.max());
66 
67  double eff_nsigma = sigma_pitch>0?m_nsigma:0;
68  if (nmin_sigma > eff_nsigma || nmax_sigma < -eff_nsigma) {
69  // std::cerr << "BinnedDiffusion_transform: depo too far away in pitch sigma: "
70  // << " p_depo=" << center_pitch/units::cm << "cm not in:"
71  // << " p_bounds=[" << ibins.min()/units::cm << ","
72  // << ibins.max()/units::cm << "]cm"
73  // << " in Nsigma:[" << nmin_sigma << "," << nmax_sigma << "]\n";
75  return false;
76  }
77  }
78 
79  // make GD and add to all covered impacts
80  // int bin_beg = std::max(ibins.bin(center_pitch - sigma_pitch*m_nsigma), 0);
81  // int bin_end = std::min(ibins.bin(center_pitch + sigma_pitch*m_nsigma)+1, ibins.nbins());
82  // debug
83  //int bin_center = ibins.bin(center_pitch);
84  //cerr << "DEBUG center_pitch: "<<center_pitch/units::cm<<endl;
85  //cerr << "DEBUG bin_center: "<<bin_center<<endl;
86 
87  auto gd = std::make_shared<GaussianDiffusion>(depo, time_desc, pitch_desc);
88  // for (int bin = bin_beg; bin < bin_end; ++bin) {
89  // // if (bin == bin_beg) m_diffs.insert(gd);
90  // this->add(gd, bin);
91  // }
92  m_diffs.insert(gd);
93  return true;
94 }
95 
96 // void Gen::BinnedDiffusion_transform::add(std::shared_ptr<GaussianDiffusion> gd, int bin)
97 // {
98 // ImpactData::mutable_pointer idptr = nullptr;
99 // auto it = m_impacts.find(bin);
100 // if (it == m_impacts.end()) {
101 // idptr = std::make_shared<ImpactData>(bin);
102 // m_impacts[bin] = idptr;
103 // }
104 // else {
105 // idptr = it->second;
106 // }
107 // idptr->add(gd);
108 // if (false) { // debug
109 // auto mm = idptr->span();
110 // cerr << "Gen::BinnedDiffusion_transform: add: "
111 // << " poffoset="<<gd->poffset_bin()
112 // << " toffoset="<<gd->toffset_bin()
113 // << " charge=" << gd->depo()->charge()/units::eplus << " eles"
114 // <<", for bin " << bin << " t=[" << mm.first/units::us << "," << mm.second/units::us << "]us\n";
115 // }
116 // m_diffs.insert(gd);
117 // //m_diffs.push_back(gd);
118 // }
119 
120 // void Gen::BinnedDiffusion_transform::erase(int begin_impact_number, int end_impact_number)
121 // {
122 // for (int bin=begin_impact_number; bin<end_impact_number; ++bin) {
123 // m_impacts.erase(bin);
124 // }
125 // }
126 
127 
128 void Gen::BinnedDiffusion_transform::get_charge_matrix(std::vector<Eigen::SparseMatrix<float>* >& vec_spmatrix, std::vector<int>& vec_impact){
129  const auto ib = m_pimpos.impact_binning();
130 
131  // map between reduced impact # to array #
132  std::map<int,int> map_redimp_vec;
133  for (size_t i =0; i!= vec_impact.size(); i++){
134  map_redimp_vec[vec_impact[i]] = int(i);
135  }
136 
137  const auto rb = m_pimpos.region_binning();
138  // map between impact # to channel #
139  std::map<int, int> map_imp_ch;
140  // map between impact # to reduced impact #
141  std::map<int, int> map_imp_redimp;
142 
143  //std::cout << ib.nbins() << " " << rb.nbins() << std::endl;
144  for (int wireind=0;wireind!=rb.nbins();wireind++){
145  int wire_imp_no = m_pimpos.wire_impact(wireind);
146  std::pair<int,int> imps_range = m_pimpos.wire_impacts(wireind);
147  for (int imp_no = imps_range.first; imp_no != imps_range.second; imp_no ++){
148  map_imp_ch[imp_no] = wireind;
149  map_imp_redimp[imp_no] = imp_no - wire_imp_no;
150 
151  // std::cout << imp_no << " " << wireind << " " << wire_imp_no << " " << ib.center(imp_no) << " " << rb.center(wireind) << " " << ib.center(imp_no) - rb.center(wireind) << std::endl;
152  // std::cout << imp_no << " " << map_imp_ch[imp_no] << " " << map_imp_redimp[imp_no] << std::endl;
153  }
154  }
155 
156  int min_imp = 0;
157  int max_imp = ib.nbins();
158 
159 
160  for (auto diff : m_diffs){
161  // std::cout << diff->depo()->time() << std::endl
162  //diff->set_sampling(m_tbins, ib, m_nsigma, 0, m_calcstrat);
163  diff->set_sampling(m_tbins, ib, m_nsigma, m_fluctuate, m_calcstrat);
164  //counter ++;
165 
166  const auto patch = diff->patch();
167  const auto qweight = diff->weights();
168 
169  const int poffset_bin = diff->poffset_bin();
170  const int toffset_bin = diff->toffset_bin();
171 
172  const int np = patch.rows();
173  const int nt = patch.cols();
174 
175  for (int pbin = 0; pbin != np; pbin++){
176  int abs_pbin = pbin + poffset_bin;
177  if (abs_pbin < min_imp || abs_pbin >= max_imp) continue;
178  double weight = qweight[pbin];
179 
180  for (int tbin = 0; tbin!= nt; tbin++){
181  int abs_tbin = tbin + toffset_bin;
182  double charge = patch(pbin, tbin);
183 
184  // std::cout << map_redimp_vec[map_imp_redimp[abs_pbin] ] << " " << map_redimp_vec[map_imp_redimp[abs_pbin]+1] << " " << abs_tbin << " " << map_imp_ch[abs_pbin] << std::endl;
185 
186  vec_spmatrix.at(map_redimp_vec[map_imp_redimp[abs_pbin] ])->coeffRef(abs_tbin,map_imp_ch[abs_pbin]) += charge * weight;
187  vec_spmatrix.at(map_redimp_vec[map_imp_redimp[abs_pbin]+1])->coeffRef(abs_tbin,map_imp_ch[abs_pbin]) += charge*(1-weight);
188 
189  // if (map_tuple_pos.find(std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]],map_imp_ch[abs_pbin],abs_tbin))==map_tuple_pos.end()){
190  // map_tuple_pos[std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]],map_imp_ch[abs_pbin],abs_tbin)] = vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin] ]).size();
191  // vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin] ]).push_back(std::make_tuple(map_imp_ch[abs_pbin],abs_tbin,charge*weight));
192  // }else{
193  // std::get<2>(vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin] ]).at(map_tuple_pos[std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]],map_imp_ch[abs_pbin],abs_tbin)])) += charge * weight;
194  // }
195 
196  // if (map_tuple_pos.find(std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]+1],map_imp_ch[abs_pbin],abs_tbin))==map_tuple_pos.end()){
197  // map_tuple_pos[std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]+1],map_imp_ch[abs_pbin],abs_tbin)] = vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin]+1]).size();
198  // vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin]+1]).push_back(std::make_tuple(map_imp_ch[abs_pbin],abs_tbin,charge*(1-weight)));
199  // }else{
200  // std::get<2>(vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin]+1]).at(map_tuple_pos[std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]+1],map_imp_ch[abs_pbin],abs_tbin)]) ) += charge*(1-weight);
201  // }
202 
203 
204  }
205  }
206 
207 
208 
209 
210  diff->clear_sampling();
211  // need to figure out wire #, time #, charge, and weight ...
212  }
213 
214  for (auto it = vec_spmatrix.begin(); it!=vec_spmatrix.end(); it++){
215  (*it)->makeCompressed();
216  }
217 
218 
219 
220 }
221 
222 // a new function to generate the result for the entire frame ...
223 void Gen::BinnedDiffusion_transform::get_charge_vec(std::vector<std::vector<std::tuple<int,int, double> > >& vec_vec_charge, std::vector<int>& vec_impact){
224  const auto ib = m_pimpos.impact_binning();
225 
226  // map between reduced impact # to array #
227 
228  std::map<int,int> map_redimp_vec;
229  std::vector<std::unordered_map<long int, int> > vec_map_pair_pos;
230  for (size_t i =0; i!= vec_impact.size(); i++){
231  map_redimp_vec[vec_impact[i]] = int(i);
232  std::unordered_map<long int, int> map_pair_pos;
233  vec_map_pair_pos.push_back(map_pair_pos);
234  }
235 
236  const auto rb = m_pimpos.region_binning();
237  // map between impact # to channel #
238  std::map<int, int> map_imp_ch;
239  // map between impact # to reduced impact #
240  std::map<int, int> map_imp_redimp;
241 
242 
243  //std::cout << ib.nbins() << " " << rb.nbins() << std::endl;
244  for (int wireind=0;wireind!=rb.nbins();wireind++){
245  int wire_imp_no = m_pimpos.wire_impact(wireind);
246  std::pair<int,int> imps_range = m_pimpos.wire_impacts(wireind);
247  for (int imp_no = imps_range.first; imp_no != imps_range.second; imp_no ++){
248  map_imp_ch[imp_no] = wireind;
249  map_imp_redimp[imp_no] = imp_no - wire_imp_no;
250 
251  // std::cout << imp_no << " " << wireind << " " << wire_imp_no << " " << ib.center(imp_no) << " " << rb.center(wireind) << " " << ib.center(imp_no) - rb.center(wireind) << std::endl;
252  // std::cout << imp_no << " " << map_imp_ch[imp_no] << " " << map_imp_redimp[imp_no] << std::endl;
253  }
254  }
255 
256  // std::unordered_map<stgsd::tuple<int,int,int>, int> map_tuple_pos;
257 
258 
259 
260  // int min_redimp = m_pimpos.wire_impacts(2).first - m_pimpos.wire_impact(2);
261  // int max_redimp = m_pimpos.wire_impacts(2).second - 1 - m_pimpos.wire_impact(2);
262  int min_imp = 0;
263  int max_imp = ib.nbins();
264 
265  // std::cout << min_redimp << " " << max_redimp << " " << max_imp << std::endl;
266 
267  int counter = 0;
268 
269  // std::set<std::shared_ptr<GaussianDiffusion>, GausDiffTimeCompare> m_diffs1;
270  // for (auto diff : m_diffs){
271  // diff->set_sampling(m_tbins, ib, m_nsigma, m_fluctuate, m_calcstrat);
272  // m_diffs1.insert(diff);
273  // }
274 
275 
276  for (auto diff : m_diffs){
277  // std::cout << diff->depo()->time() << std::endl
278  //diff->set_sampling(m_tbins, ib, m_nsigma, 0, m_calcstrat);
279  diff->set_sampling(m_tbins, ib, m_nsigma, m_fluctuate, m_calcstrat);
280  counter ++;
281 
282  const auto patch = diff->patch();
283  const auto qweight = diff->weights();
284 
285  const int poffset_bin = diff->poffset_bin();
286  const int toffset_bin = diff->toffset_bin();
287 
288  const int np = patch.rows();
289  const int nt = patch.cols();
290 
291  // std::cout << np << " " << nt << std::endl;
292 
293  for (int pbin = 0; pbin != np; pbin++){
294  int abs_pbin = pbin + poffset_bin;
295  if (abs_pbin < min_imp || abs_pbin >= max_imp) continue;
296  double weight = qweight[pbin];
297  auto const channel = map_imp_ch[abs_pbin];
298  auto const redimp = map_imp_redimp[abs_pbin];
299  auto const array_num_redimp = map_redimp_vec[redimp];
300  auto const next_array_num_redimp = map_redimp_vec[redimp+1];
301 
302  auto& map_pair_pos = vec_map_pair_pos.at(array_num_redimp);
303  auto& next_map_pair_pos = vec_map_pair_pos.at(next_array_num_redimp);
304 
305  auto& vec_charge = vec_vec_charge.at(array_num_redimp);
306  auto& next_vec_charge = vec_vec_charge.at(next_array_num_redimp);
307 
308  for (int tbin = 0; tbin!= nt; tbin++){
309  int abs_tbin = tbin + toffset_bin;
310  double charge = patch(pbin, tbin);
311 
312  // if (map_imp_ch[abs_pbin]==1459){
313  // std::cout << pbin+poffset_bin << " " << pbin << " " << tbin << " " << charge << " " << std::endl;
314  // }
315  // std::cout << pbin << " " << tbin << " " << patch(pbin,tbin) << std::endl;
316  // figure out how to convert the abs_pbin to fine position
317  // figure out how to use the weight given the above ???
318  // the other side
319  // if (map_imp_redimp[abs_pbin]==max_redimp){
320  // vec_vec_charge.at(map_redimp_vec[min_redimp]).push_back(std::make_tuple(map_imp_ch[abs_pbin]+1,abs_tbin,charge*(1-weight)));
321  //}else{
322  //}
323 
324  long int index1 = channel*100000 + abs_tbin;
325  auto it = map_pair_pos.find(index1);
326  if (it == map_pair_pos.end()){
327  map_pair_pos[index1] = vec_charge.size();
328  vec_charge.emplace_back(channel, abs_tbin, charge*weight);
329  }else{
330  std::get<2>(vec_charge.at(it->second)) += charge * weight;
331  }
332 
333  auto it1 = next_map_pair_pos.find(index1);
334  if (it1 == next_map_pair_pos.end()){
335  next_map_pair_pos[index1] = next_vec_charge.size();
336  next_vec_charge.emplace_back(channel, abs_tbin, charge*(1-weight));
337  }else{
338  std::get<2>(next_vec_charge.at(it1->second)) += charge*(1-weight);
339  }
340 
341  // if (map_tuple_pos.find(std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]],map_imp_ch[abs_pbin],abs_tbin))==map_tuple_pos.end()){
342  // map_tuple_pos[std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]],map_imp_ch[abs_pbin],abs_tbin)] = vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin] ]).size();
343  // vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin] ]).push_back(std::make_tuple(map_imp_ch[abs_pbin],abs_tbin,charge*weight));
344  // }else{
345  // std::get<2>(vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin] ]).at(map_tuple_pos[std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]],map_imp_ch[abs_pbin],abs_tbin)])) += charge * weight;
346  // }
347 
348  // if (map_tuple_pos.find(std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]+1],map_imp_ch[abs_pbin],abs_tbin))==map_tuple_pos.end()){
349  // map_tuple_pos[std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]+1],map_imp_ch[abs_pbin],abs_tbin)] = vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin]+1]).size();
350  // vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin]+1]).push_back(std::make_tuple(map_imp_ch[abs_pbin],abs_tbin,charge*(1-weight)));
351  // }else{
352  // std::get<2>(vec_vec_charge.at(map_redimp_vec[map_imp_redimp[abs_pbin]+1]).at(map_tuple_pos[std::make_tuple(map_redimp_vec[map_imp_redimp[abs_pbin]+1],map_imp_ch[abs_pbin],abs_tbin)]) ) += charge*(1-weight);
353  // }
354 
355 
356  }
357  }
358 
359  if (counter % 5000==0){
360  // std::vector<std::tuple<int,int,int> > del_keys;
361  // for (auto it = map_tuple_pos.begin(); it!=map_tuple_pos.end(); it++){
362  // if (get<2>(it->first) < toffset_bin - 60){
363  // del_keys.push_back(it->first);
364  // }
365  // }
366  // for (auto it = del_keys.begin(); it!=del_keys.end(); it++){
367  // map_tuple_pos.erase(*it);
368  // }
369  // map_tuple_pos.clear();
370  for (auto it = vec_map_pair_pos.begin(); it != vec_map_pair_pos.end(); it++){
371  it->clear();
372  }
373  }
374 
375 
376  diff->clear_sampling();
377  // need to figure out wire #, time #, charge, and weight ...
378  }
379 
380  //
381 
382 }
383 
384 
385 // Gen::ImpactData::pointer Gen::BinnedDiffusion_transform::impact_data(int bin) const
386 // {
387 // const auto ib = m_pimpos.impact_binning();
388 // if (! ib.inbounds(bin)) {
389 // return nullptr;
390 // }
391 
392 // auto it = m_impacts.find(bin);
393 // if (it == m_impacts.end()) {
394 // return nullptr;
395 // }
396 // auto idptr = it->second;
397 
398 // // make sure all diffusions have been sampled
399 // for (auto diff : idptr->diffusions()) {
400 // diff->set_sampling(m_tbins, ib, m_nsigma, m_fluctuate, m_calcstrat);
401 // //diff->set_sampling(m_tbins, ib, m_nsigma, 0, m_calcstrat);
402 // }
403 
404 // idptr->calculate(m_tbins.nbins());
405 // return idptr;
406 // }
407 
408 
409 static
410 std::pair<double,double> gausdesc_range(const std::vector<Gen::GausDesc> gds, double nsigma)
411 {
412  int ncount = -1;
413  double vmin=0, vmax=0;
414  for (auto gd : gds) {
415  ++ncount;
416 
417  const double lvmin = gd.center - gd.sigma*nsigma;
418  const double lvmax = gd.center + gd.sigma*nsigma;
419  if (!ncount) {
420  vmin = lvmin;
421  vmax = lvmax;
422  continue;
423  }
424  vmin = std::min(vmin, lvmin);
425  vmax = std::max(vmax, lvmax);
426  }
427  return std::make_pair(vmin,vmax);
428 }
429 
430 std::pair<double,double> Gen::BinnedDiffusion_transform::pitch_range(double nsigma) const
431 {
432  std::vector<Gen::GausDesc> gds;
433  for (auto diff : m_diffs) {
434  gds.push_back(diff->pitch_desc());
435  }
436  return gausdesc_range(gds, nsigma);
437 }
438 
439 std::pair<int,int> Gen::BinnedDiffusion_transform::impact_bin_range(double nsigma) const
440 {
441  const auto ibins = m_pimpos.impact_binning();
442  auto mm = pitch_range(nsigma);
443  return std::make_pair(std::max(ibins.bin(mm.first), 0),
444  std::min(ibins.bin(mm.second)+1, ibins.nbins()));
445 }
446 
447 std::pair<double,double> Gen::BinnedDiffusion_transform::time_range(double nsigma) const
448 {
449  std::vector<Gen::GausDesc> gds;
450  for (auto diff : m_diffs) {
451  gds.push_back(diff->time_desc());
452  }
453  return gausdesc_range(gds, nsigma);
454 }
455 
456 std::pair<int,int> Gen::BinnedDiffusion_transform::time_bin_range(double nsigma) const
457 {
458  auto mm = time_range(nsigma);
459  return std::make_pair(std::max(m_tbins.bin(mm.first),0),
460  std::min(m_tbins.bin(mm.second)+1, m_tbins.nbins()));
461 }
std::shared_ptr< const IDepo > pointer
Definition: IData.h:19
double distance(double x)
Return the distance in number of sigma that x is from the center.
std::set< std::shared_ptr< GaussianDiffusion > > m_diffs
std::pair< int, int > time_bin_range(double nsigma=0.0) const
std::pair< double, double > pitch_range(double nsigma=0.0) const
void get_charge_matrix(std::vector< Eigen::SparseMatrix< float > * > &vec_spmatrix, std::vector< int > &vec_impact)
const Binning & region_binning() const
Definition: Pimpos.h:109
struct vector vector
double distance(const Point &pt, int axis=2) const
Definition: Pimpos.cxx:71
STL namespace.
bool add(IDepo::pointer deposition, double sigma_time, double sigma_pitch)
double max() const
Definition: Binning.h:52
Binning tbins(nticks, t0, t0+readout_time)
const Binning & impact_binning() const
Definition: Pimpos.h:113
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
Definition: counter.h:285
static std::pair< double, double > gausdesc_range(const std::vector< Gen::GausDesc > gds, double nsigma)
int bin(double val) const
Definition: Binning.h:80
double min() const
Definition: Binning.h:47
std::shared_ptr< Interface > pointer
Definition: Interface.h:16
static int max(int a, int b)
static const double mm
Definition: Units.h:73
Definition: Main.h:22
int wire_impact(int wireind) const
Return the impact position index coincident with the wire index.
Definition: Pimpos.cxx:43
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
Pimpos pimpos(nwires, min_wire_pitch, max_wire_pitch)
std::pair< int, int > wire_impacts(int wireind) const
Definition: Pimpos.cxx:48
Pitch-Impact-Position.
Definition: Pimpos.h:36
weight
Definition: test.py:257
void get_charge_vec(std::vector< std::vector< std::tuple< int, int, double > > > &vec_vec_charge, std::vector< int > &vec_impact)
std::pair< int, int > impact_bin_range(double nsigma=0.0) const
int nbins() const
Definition: Binning.h:42
std::pair< double, double > time_range(double nsigma=0.0) const
ImpactDataCalculationStrategy
Useful to client code to mark a calculation strategy.