#include <Diffuser.h>
Public Types | |
typedef std::pair< double, double > | bounds_type |
Public Types inherited from WireCell::IQueuedoutNode< IDepo, IDiffusion > | |
typedef std::shared_ptr< IQueuedoutNodeBase > | pointer |
typedef IDepo | input_type |
typedef IDiffusion | output_type |
typedef std::shared_ptr< const IDepo > | input_pointer |
typedef std::shared_ptr< const IDiffusion > | output_pointer |
typedef std::deque< output_pointer > | output_queue |
Public Types inherited from WireCell::IQueuedoutNodeBase | |
typedef std::shared_ptr< IQueuedoutNodeBase > | pointer |
typedef std::deque< boost::any > | queuedany |
Public Types inherited from WireCell::INode | |
enum | NodeCategory { unknown, sourceNode, sinkNode, functionNode, queuedoutNode, joinNode, splitNode, faninNode, fanoutNode, multioutNode, hydraNode } |
Public Types inherited from WireCell::IComponent< INode > | |
typedef std::shared_ptr< INode > | pointer |
Access subclass facet by pointer. More... | |
typedef std::vector< pointer > | vector |
Vector of shared pointers. More... | |
Public Types inherited from WireCell::Interface | |
typedef std::shared_ptr< Interface > | pointer |
Public Types inherited from WireCell::IComponent< IConfigurable > | |
typedef std::shared_ptr< IConfigurable > | pointer |
Access subclass facet by pointer. More... | |
typedef std::vector< pointer > | vector |
Vector of shared pointers. More... | |
Public Member Functions | |
Diffuser (const Ray &pitch=Ray(Point(0.0, 0.0, 0.0), Point(0.0, 0.0, 5 *units::millimeter)), double binsize_l=2.0 *units::millimeter, double time_offset=0.0 *units::microsecond, double origin_l=0.0 *units::microsecond, double DL=5.3 *units::centimeter2/units::second, double DT=12.8 *units::centimeter2/units::second, double drift_velocity=1.6 *units::millimeter/units::microsecond, double max_sigma_l=5 *units::microsecond, double nsigma=3.0) | |
virtual | ~Diffuser () |
virtual void | configure (const WireCell::Configuration &config) |
Accept a configuration. More... | |
virtual WireCell::Configuration | default_configuration () const |
Optional, override to return a hard-coded default configuration. More... | |
virtual void | reset () |
virtual bool | operator() (const input_pointer &depo, output_queue &outq) |
The calling signature: More... | |
IDiffusion::pointer | diffuse (double mean_l, double mean_t, double sigma_l, double sigma_t, double weight=1.0, IDepo::pointer depo=nullptr) |
bounds_type | bounds (double mean, double sigma, double binsize, double origin=0.0) |
std::vector< double > | oned (double mean, double sigma, double binsize, const Diffuser::bounds_type &bounds) |
Public Member Functions inherited from WireCell::IDiffuser | |
virtual | ~IDiffuser () |
virtual std::string | signature () |
Public Member Functions inherited from WireCell::IQueuedoutNode< IDepo, IDiffusion > | |
virtual | ~IQueuedoutNode () |
virtual bool | operator() (const boost::any &anyin, queuedany &outanyq) |
The calling signature: More... | |
virtual std::vector< std::string > | input_types () |
virtual std::vector< std::string > | output_types () |
Public Member Functions inherited from WireCell::IQueuedoutNodeBase | |
virtual | ~IQueuedoutNodeBase () |
virtual NodeCategory | category () |
Return the behavior category type. More... | |
virtual int | concurrency () |
By default assume all subclasses maintain state. More... | |
Public Member Functions inherited from WireCell::INode | |
virtual | ~INode () |
Public Member Functions inherited from WireCell::IComponent< INode > | |
virtual | ~IComponent () |
Public Member Functions inherited from WireCell::Interface | |
virtual | ~Interface () |
Public Member Functions inherited from WireCell::IConfigurable | |
virtual | ~IConfigurable () |
Public Member Functions inherited from WireCell::IComponent< IConfigurable > | |
virtual | ~IComponent () |
Private Member Functions | |
void | dump (const std::string &msg) |
Private Attributes | |
Point | m_pitch_origin |
Vector | m_pitch_direction |
double | m_time_offset |
double | m_origin_l |
double | m_origin_t |
double | m_binsize_l |
double | m_binsize_t |
double | m_DL |
double | m_DT |
double | m_drift_velocity |
double | m_max_sigma_l |
double | m_nsigma |
IDiffusionSet | m_input |
bool | m_eos |
Model longitudinal and transverse diffusion of drifted charge.
WireCell::IDepo objects are inserted and WireCell::IDiffusion objects are extracted. An internal buffer is kept in order to assure the output is time ordered by the leading edge of the diffusion "patch". Depositions are diffused in place so are assumed to be drifted to whatever location they are wanted. The IDepo::prior() method is used to find the total drift distance.
FIXME: this action is really a compound as it does three things:
1) Projects a deposition position onto wire pitch. 2) Applies arbitrary time offset. 3) Diffuses the deposition.
Definition at line 31 of file Diffuser.h.
typedef std::pair<double,double> WireCell::Diffuser::bounds_type |
Definition at line 34 of file Diffuser.h.
Diffuser::Diffuser | ( | const Ray & | pitch = Ray(Point(0.0,0.0,0.0),Point(0.0,0.0,5*units::millimeter)) , |
double | binsize_l = 2.0*units::millimeter , |
||
double | time_offset = 0.0*units::microsecond , |
||
double | origin_l = 0.0*units::microsecond , |
||
double | DL = 5.3*units::centimeter2/units::second , |
||
double | DT = 12.8*units::centimeter2/units::second , |
||
double | drift_velocity = 1.6*units::millimeter/units::microsecond , |
||
double | max_sigma_l = 5*units::microsecond , |
||
double | nsigma = 3.0 |
||
) |
Create a diffuser.
pitch | gives the wire coordinate system. |
lbinsize | defines the grid spacing in the longitudinal direction. |
tbinsize | defines the grid spacing in the transverse direction. |
lorigin | defines a grid line in the longitudinal direction. |
torigin | defines a grid line in the transverse direction. |
DL | is the longitudinal diffusion coefficient. |
DT | is the transverse diffusion coefficient. |
drift_velocity | is what it sounds like. |
max_sigma_l | is the largest possible longitudinal diffusion. |
nsigma | defines the number of sigma at which to truncate the Gaussian. |
Definition at line 20 of file Diffuser.cxx.
|
virtual |
Definition at line 46 of file Diffuser.cxx.
Diffuser::bounds_type Diffuser::bounds | ( | double | mean, |
double | sigma, | ||
double | binsize, | ||
double | origin = 0.0 |
||
) |
Definition at line 195 of file Diffuser.cxx.
|
virtual |
Accept a configuration.
Implements WireCell::IConfigurable.
Definition at line 70 of file Diffuser.cxx.
|
virtual |
Optional, override to return a hard-coded default configuration.
Reimplemented from WireCell::IConfigurable.
Definition at line 50 of file Diffuser.cxx.
IDiffusion::pointer Diffuser::diffuse | ( | double | mean_l, |
double | mean_t, | ||
double | sigma_l, | ||
double | sigma_t, | ||
double | weight = 1.0 , |
||
IDepo::pointer | depo = nullptr |
||
) |
Diffuse a point charge.
mean_l | is the position in the longitudinal direction. |
mean_t | is the position in the transverse direction. |
sigma_l | is the Gaussian sigma in the longitudinal direction. |
sigma_t | is the Gaussian sigma in the transverse direction. |
weight | is the normalization (eg, amount of charge) |
This is a mostly internal method. It does not directly fill or drain any internal buffers so can be used to test diffusion directly.
Definition at line 204 of file Diffuser.cxx.
|
private |
Definition at line 98 of file Diffuser.cxx.
std::vector< double > Diffuser::oned | ( | double | mean, |
double | sigma, | ||
double | binsize, | ||
const Diffuser::bounds_type & | bounds | ||
) |
fragment between bin_edge_{low,high}
Definition at line 173 of file Diffuser.cxx.
|
virtual |
The calling signature:
Implements WireCell::IQueuedoutNode< IDepo, IDiffusion >.
Definition at line 117 of file Diffuser.cxx.
|
virtual |
Optional hook to be implemented in order to reset after an end of stream is encountered. Fixme: this should be removed.
Reimplemented from WireCell::INode.
Definition at line 93 of file Diffuser.cxx.
|
private |
Definition at line 109 of file Diffuser.h.
|
private |
Definition at line 110 of file Diffuser.h.
|
private |
Definition at line 111 of file Diffuser.h.
|
private |
Definition at line 112 of file Diffuser.h.
|
private |
Definition at line 111 of file Diffuser.h.
|
private |
Definition at line 118 of file Diffuser.h.
|
private |
Definition at line 116 of file Diffuser.h.
|
private |
Definition at line 113 of file Diffuser.h.
|
private |
Definition at line 114 of file Diffuser.h.
|
private |
Definition at line 107 of file Diffuser.h.
|
private |
Definition at line 108 of file Diffuser.h.
|
private |
Definition at line 105 of file Diffuser.h.
|
private |
Definition at line 104 of file Diffuser.h.
|
private |
Definition at line 106 of file Diffuser.h.