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

#include <BinnedDiffusion_transform.h>

Public Types

enum  ImpactDataCalculationStrategy { constant =1, linear =2 }
 Useful to client code to mark a calculation strategy. More...
 

Public Member Functions

 BinnedDiffusion_transform (const Pimpos &pimpos, const Binning &tbins, double nsigma=3.0, IRandom::pointer fluctuate=nullptr, ImpactDataCalculationStrategy calcstrat=linear)
 
const Pimpospimpos () const
 
const Binningtbins () const
 
bool add (IDepo::pointer deposition, double sigma_time, double sigma_pitch)
 
void get_charge_vec (std::vector< std::vector< std::tuple< int, int, double > > > &vec_vec_charge, std::vector< int > &vec_impact)
 
void get_charge_matrix (std::vector< Eigen::SparseMatrix< float > * > &vec_spmatrix, std::vector< int > &vec_impact)
 
std::pair< double, double > pitch_range (double nsigma=0.0) const
 
std::pair< int, int > impact_bin_range (double nsigma=0.0) const
 
std::pair< double, double > time_range (double nsigma=0.0) const
 
std::pair< int, int > time_bin_range (double nsigma=0.0) const
 
double get_nsigma () const
 

Private Attributes

const Pimposm_pimpos
 
const Binningm_tbins
 
double m_nsigma
 
IRandom::pointer m_fluctuate
 
ImpactDataCalculationStrategy m_calcstrat
 
std::pair< int, int > m_window
 
std::map< int, ImpactData::mutable_pointerm_impacts
 
std::set< std::shared_ptr< GaussianDiffusion > > m_diffs
 
int m_outside_pitch
 
int m_outside_time
 

Detailed Description

A BinnedDiffusion_transform maintains an association between impact positions along the pitch direction of a wire plane and the diffused depositions that drift to them.

It covers a fixed and discretely sampled time and pitch domain.

Definition at line 27 of file BinnedDiffusion_transform.h.

Member Enumeration Documentation

Useful to client code to mark a calculation strategy.

Create a BinnedDiffusion_transform.

Arguments are:

  • pimpos :: a Pimpos instance defining the wire and impact binning.
  • tbins :: a Binning instance defining the time sampling binning.
  • nsigma :: number of sigma the 2D (transverse X longitudinal) Gaussian extends.
  • fluctuate :: set to an IRandom if charge-preserving Poisson fluctuations are to be applied.
  • calcstrat :: set a calculation strategy that gives how the microscopic distribution of charge between two impacts will be interpolated toward either edge.
Enumerator
constant 
linear 

Definition at line 51 of file BinnedDiffusion_transform.h.

Constructor & Destructor Documentation

Gen::BinnedDiffusion_transform::BinnedDiffusion_transform ( const Pimpos pimpos,
const Binning tbins,
double  nsigma = 3.0,
IRandom::pointer  fluctuate = nullptr,
ImpactDataCalculationStrategy  calcstrat = linear 
)

Member Function Documentation

bool Gen::BinnedDiffusion_transform::add ( IDepo::pointer  deposition,
double  sigma_time,
double  sigma_pitch 
)

Add a deposition and its associated diffusion sigmas. Return false if no activity falls within the domain.

Definition at line 37 of file BinnedDiffusion_transform.cxx.

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 }
std::set< std::shared_ptr< GaussianDiffusion > > m_diffs
double distance(const Point &pt, int axis=2) const
Definition: Pimpos.cxx:71
double max() const
Definition: Binning.h:52
const Binning & impact_binning() const
Definition: Pimpos.h:113
double min() const
Definition: Binning.h:47
void Gen::BinnedDiffusion_transform::get_charge_matrix ( std::vector< Eigen::SparseMatrix< float > * > &  vec_spmatrix,
std::vector< int > &  vec_impact 
)

Definition at line 128 of file BinnedDiffusion_transform.cxx.

128  {
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 }
std::set< std::shared_ptr< GaussianDiffusion > > m_diffs
const Binning & region_binning() const
Definition: Pimpos.h:109
const Binning & impact_binning() const
Definition: Pimpos.h:113
int wire_impact(int wireind) const
Return the impact position index coincident with the wire index.
Definition: Pimpos.cxx:43
std::pair< int, int > wire_impacts(int wireind) const
Definition: Pimpos.cxx:48
weight
Definition: test.py:257
void Gen::BinnedDiffusion_transform::get_charge_vec ( std::vector< std::vector< std::tuple< int, int, double > > > &  vec_vec_charge,
std::vector< int > &  vec_impact 
)

Unconditionally associate an already built GaussianDiffusion to one impact. Drop any stored ImpactData within the half open impact index range. Return the data in the given impact bin. Note, this bin represents drifted charge between two impact positions. Take care when using BinnedDiffusion_transform and field responses because epsilon above or below the impact position exactly in the middle of two wires drastically different response.

Definition at line 223 of file BinnedDiffusion_transform.cxx.

223  {
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 }
std::set< std::shared_ptr< GaussianDiffusion > > m_diffs
const Binning & region_binning() const
Definition: Pimpos.h:109
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
int wire_impact(int wireind) const
Return the impact position index coincident with the wire index.
Definition: Pimpos.cxx:43
std::pair< int, int > wire_impacts(int wireind) const
Definition: Pimpos.cxx:48
weight
Definition: test.py:257
double WireCell::Gen::BinnedDiffusion_transform::get_nsigma ( ) const
inline
std::pair< int, int > Gen::BinnedDiffusion_transform::impact_bin_range ( double  nsigma = 0.0) const

Return the half open bin range of impact bins, constrained so that either number is in [0,nimpacts].

Definition at line 439 of file BinnedDiffusion_transform.cxx.

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 }
std::pair< double, double > pitch_range(double nsigma=0.0) const
const Binning & impact_binning() const
Definition: Pimpos.h:113
static int max(int a, int b)
static const double mm
Definition: Units.h:73
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
const Pimpos& WireCell::Gen::BinnedDiffusion_transform::pimpos ( ) const
inline

Definition at line 57 of file BinnedDiffusion_transform.h.

std::pair< double, double > Gen::BinnedDiffusion_transform::pitch_range ( double  nsigma = 0.0) const

Return the range of pitch containing depos out to given nsigma and without bounds checking.

Definition at line 430 of file BinnedDiffusion_transform.cxx.

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 }
std::set< std::shared_ptr< GaussianDiffusion > > m_diffs
static std::pair< double, double > gausdesc_range(const std::vector< Gen::GausDesc > gds, double nsigma)
const Binning& WireCell::Gen::BinnedDiffusion_transform::tbins ( ) const
inline

Definition at line 58 of file BinnedDiffusion_transform.h.

std::pair< int, int > Gen::BinnedDiffusion_transform::time_bin_range ( double  nsigma = 0.0) const

Return the half open bin range for time bins constrained so that either number is in [0,nticks].

Definition at line 456 of file BinnedDiffusion_transform.cxx.

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 }
int bin(double val) const
Definition: Binning.h:80
static int max(int a, int b)
static const double mm
Definition: Units.h:73
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
int nbins() const
Definition: Binning.h:42
std::pair< double, double > time_range(double nsigma=0.0) const
std::pair< double, double > Gen::BinnedDiffusion_transform::time_range ( double  nsigma = 0.0) const

Return the range of time containing depos out to given nsigma and without bounds checking.

Definition at line 447 of file BinnedDiffusion_transform.cxx.

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 }
std::set< std::shared_ptr< GaussianDiffusion > > m_diffs
static std::pair< double, double > gausdesc_range(const std::vector< Gen::GausDesc > gds, double nsigma)

Member Data Documentation

ImpactDataCalculationStrategy WireCell::Gen::BinnedDiffusion_transform::m_calcstrat
private

Definition at line 110 of file BinnedDiffusion_transform.h.

std::set<std::shared_ptr<GaussianDiffusion> > WireCell::Gen::BinnedDiffusion_transform::m_diffs
private

Definition at line 118 of file BinnedDiffusion_transform.h.

IRandom::pointer WireCell::Gen::BinnedDiffusion_transform::m_fluctuate
private

Definition at line 109 of file BinnedDiffusion_transform.h.

std::map<int, ImpactData::mutable_pointer> WireCell::Gen::BinnedDiffusion_transform::m_impacts
private

Definition at line 115 of file BinnedDiffusion_transform.h.

double WireCell::Gen::BinnedDiffusion_transform::m_nsigma
private

Definition at line 108 of file BinnedDiffusion_transform.h.

int WireCell::Gen::BinnedDiffusion_transform::m_outside_pitch
private

Definition at line 120 of file BinnedDiffusion_transform.h.

int WireCell::Gen::BinnedDiffusion_transform::m_outside_time
private

Definition at line 121 of file BinnedDiffusion_transform.h.

const Pimpos& WireCell::Gen::BinnedDiffusion_transform::m_pimpos
private

Definition at line 101 of file BinnedDiffusion_transform.h.

const Binning& WireCell::Gen::BinnedDiffusion_transform::m_tbins
private

Definition at line 106 of file BinnedDiffusion_transform.h.

std::pair<int,int> WireCell::Gen::BinnedDiffusion_transform::m_window
private

Definition at line 113 of file BinnedDiffusion_transform.h.


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