#include <GaussianDiffusion.h>
Definition at line 68 of file GaussianDiffusion.h.
A patch is a 2D array of diffuse charge in (nimpacts X nticks) bins. patch[0] is drifted/diffused charge waveform at impact position 0 (relative to min pitch for the patch). patch[0][0] is charge at this impact position at time = 0 (relative to min time for the patch). See bin()
.
Definition at line 80 of file GaussianDiffusion.h.
GaussianDiffusion.
Create a diffused deposition.
Definition at line 113 of file GaussianDiffusion.cxx.
const GausDesc time_desc()
const GausDesc pitch_desc()
IDepo::pointer depo() const
Access deposition.
IDepo::pointer m_deposition
void Gen::GaussianDiffusion::clear_sampling |
( |
| ) |
|
double WireCell::Gen::GaussianDiffusion::depo_time |
( |
| ) |
const |
|
inline |
double WireCell::Gen::GaussianDiffusion::depo_x |
( |
| ) |
const |
|
inline |
const GausDesc WireCell::Gen::GaussianDiffusion::pitch_desc |
( |
| ) |
|
|
inline |
int WireCell::Gen::GaussianDiffusion::poffset_bin |
( |
| ) |
const |
|
inline |
Return the absolute impact bin in the binning corresponding to column 0 of the patch.
Definition at line 116 of file GaussianDiffusion.h.
void Gen::GaussianDiffusion::set_sampling |
( |
const Binning & |
tbin, |
|
|
const Binning & |
pbin, |
|
|
double |
nsigma = 3.0 , |
|
|
IRandom::pointer |
fluctuate = nullptr , |
|
|
unsigned int |
weightstrat = 1 |
|
) |
| |
This fills the patch once matching the given time and pitch binning. The patch is limited to the 2D sample points that cover the subdomain determined by the number of sigma. If there should be Poisson fluctuations applied pass in an IRandom. Total charge is charge is preserved. Each cell of the patch represents the 2D bin-centered sampling of the Gaussian.
Sample time dimension
Sample pitch dimension.
fixme: for hanyu.
Definition at line 124 of file GaussianDiffusion.cxx.
143 cerr <<
"Gen::GaussianDiffusion: no time bins for [" << tval_range.first/
units::us <<
"," << tval_range.second/
units::us <<
"] us\n";
149 auto pbin_range = pbin.
sample_bin_range(pval_range.first, pval_range.second);
150 const size_t npss = pbin_range.second - pbin_range.first;
157 cerr <<
"No impact bins [" << pval_range.first/
units::mm <<
"," << pval_range.second/
units::mm <<
"] mm\n";
165 if(weightstrat == 2){
169 if(weightstrat == 1){
174 patch_t ret = patch_t::Zero(npss, ntss);
178 for (
size_t ip = 0; ip < npss; ++ip) {
179 for (
size_t it = 0; it < ntss; ++it) {
180 const double val = pvec[ip]*tvec[it];
182 ret(ip,it) = (float)val;
189 const double charge_sign =
m_deposition->charge() < 0 ? -1 : 1;
193 double unfluc_sum = 0;
195 for (
size_t ip = 0; ip < npss; ++ip) {
196 for (
size_t it = 0; it < ntss; ++it) {
197 const float oldval = ret(ip,it);
198 unfluc_sum += oldval;
205 fluc_sum += charge_sign*number;
206 ret(ip,it) = charge_sign*number;
std::vector< double > binint(double start, double step, int nbins) const
std::vector< double > m_qweights
std::vector< double > weight(double start, double step, int nbins, std::vector< double > pvec) const
std::pair< double, double > sigma_range(double nsigma=3.0)
double edge(int ind) const
std::pair< int, int > sample_bin_range(double minval, double maxval) const
IDepo::pointer m_deposition
const GausDesc WireCell::Gen::GaussianDiffusion::time_desc |
( |
| ) |
|
|
inline |
int WireCell::Gen::GaussianDiffusion::toffset_bin |
( |
| ) |
const |
|
inline |
Return the absolute time bin in the binning corresponding to column 0 of the patch.
Definition at line 113 of file GaussianDiffusion.h.
const std::vector< double > Gen::GaussianDiffusion::weights |
( |
| ) |
const |
patch_t WireCell::Gen::GaussianDiffusion::m_patch |
|
private |
GausDesc WireCell::Gen::GaussianDiffusion::m_pitch_desc |
|
private |
int WireCell::Gen::GaussianDiffusion::m_poffset_bin |
|
private |
std::vector<double> WireCell::Gen::GaussianDiffusion::m_qweights |
|
private |
GausDesc WireCell::Gen::GaussianDiffusion::m_time_desc |
|
private |
int WireCell::Gen::GaussianDiffusion::m_toffset_bin |
|
private |
The documentation for this class was generated from the following files: