#include <BinnedDiffusion.h>
Public Types | |
enum | ImpactDataCalculationStrategy { constant =1, linear =2 } |
Useful to client code to mark a calculation strategy. More... | |
Public Member Functions | |
BinnedDiffusion (const Pimpos &pimpos, const Binning &tbins, double nsigma=3.0, IRandom::pointer fluctuate=nullptr, ImpactDataCalculationStrategy calcstrat=linear) | |
const Pimpos & | pimpos () const |
const Binning & | tbins () const |
bool | add (IDepo::pointer deposition, double sigma_time, double sigma_pitch) |
void | add (std::shared_ptr< GaussianDiffusion > gd, int impact_index) |
void | erase (int begin_impact_index, int end_impact_index) |
ImpactData::pointer | impact_data (int bin) const |
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 Pimpos & | m_pimpos |
const Binning & | m_tbins |
double | m_nsigma |
IRandom::pointer | m_fluctuate |
ImpactDataCalculationStrategy | m_calcstrat |
std::pair< int, int > | m_window |
std::map< int, ImpactData::mutable_pointer > | m_impacts |
std::set< std::shared_ptr< GaussianDiffusion > > | m_diffs |
int | m_outside_pitch |
int | m_outside_time |
A BinnedDiffusion 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 23 of file BinnedDiffusion.h.
Useful to client code to mark a calculation strategy.
Create a BinnedDiffusion.
Arguments are:
Enumerator | |
---|---|
constant | |
linear |
Definition at line 47 of file BinnedDiffusion.h.
Gen::BinnedDiffusion::BinnedDiffusion | ( | const Pimpos & | pimpos, |
const Binning & | tbins, | ||
double | nsigma = 3.0 , |
||
IRandom::pointer | fluctuate = nullptr , |
||
ImpactDataCalculationStrategy | calcstrat = linear |
||
) |
Definition at line 11 of file BinnedDiffusion.cxx.
bool Gen::BinnedDiffusion::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 25 of file BinnedDiffusion.cxx.
void Gen::BinnedDiffusion::add | ( | std::shared_ptr< GaussianDiffusion > | gd, |
int | impact_index | ||
) |
Unconditionally associate an already built GaussianDiffusion to one impact.
Definition at line 84 of file BinnedDiffusion.cxx.
void Gen::BinnedDiffusion::erase | ( | int | begin_impact_index, |
int | end_impact_index | ||
) |
Drop any stored ImpactData within the half open impact index range.
Definition at line 108 of file BinnedDiffusion.cxx.
|
inline |
Definition at line 96 of file BinnedDiffusion.h.
std::pair< int, int > Gen::BinnedDiffusion::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 170 of file BinnedDiffusion.cxx.
Gen::ImpactData::pointer Gen::BinnedDiffusion::impact_data | ( | int | bin | ) | const |
Return the data in the given impact bin. Note, this bin represents drifted charge between two impact positions. Take care when using BinnedDiffusion and field responses because epsilon above or below the impact position exactly in the middle of two wires drastically different response.
Definition at line 116 of file BinnedDiffusion.cxx.
|
inline |
Definition at line 53 of file BinnedDiffusion.h.
std::pair< double, double > Gen::BinnedDiffusion::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 161 of file BinnedDiffusion.cxx.
|
inline |
Definition at line 54 of file BinnedDiffusion.h.
std::pair< int, int > Gen::BinnedDiffusion::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 187 of file BinnedDiffusion.cxx.
std::pair< double, double > Gen::BinnedDiffusion::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 178 of file BinnedDiffusion.cxx.
|
private |
Definition at line 105 of file BinnedDiffusion.h.
|
private |
Definition at line 113 of file BinnedDiffusion.h.
|
private |
Definition at line 104 of file BinnedDiffusion.h.
|
private |
Definition at line 110 of file BinnedDiffusion.h.
|
private |
Definition at line 103 of file BinnedDiffusion.h.
|
private |
Definition at line 115 of file BinnedDiffusion.h.
|
private |
Definition at line 116 of file BinnedDiffusion.h.
|
private |
Definition at line 96 of file BinnedDiffusion.h.
|
private |
Definition at line 101 of file BinnedDiffusion.h.
|
private |
Definition at line 108 of file BinnedDiffusion.h.