WireCellToolkit
Wire Cell Simulation, Signal Process and Reconstruction Toolki for Liquid Argon Detectors
WireCell::Diffuser Class Reference

#include <Diffuser.h>

Inheritance diagram for WireCell::Diffuser:
Collaboration diagram for WireCell::Diffuser:

Public Types

typedef std::pair< double, double > bounds_type
 
- Public Types inherited from WireCell::IQueuedoutNode< IDepo, IDiffusion >
typedef std::shared_ptr< IQueuedoutNodeBasepointer
 
typedef IDepo input_type
 
typedef IDiffusion output_type
 
typedef std::shared_ptr< const IDepoinput_pointer
 
typedef std::shared_ptr< const IDiffusionoutput_pointer
 
typedef std::deque< output_pointeroutput_queue
 
- Public Types inherited from WireCell::IQueuedoutNodeBase
typedef std::shared_ptr< IQueuedoutNodeBasepointer
 
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< INodepointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 Vector of shared pointers. More...
 
- Public Types inherited from WireCell::Interface
typedef std::shared_ptr< Interfacepointer
 
- Public Types inherited from WireCell::IComponent< IConfigurable >
typedef std::shared_ptr< IConfigurablepointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 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)
 
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 bool operator() (const input_pointer &in, output_queue &outq)=0
 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 ()
 

Detailed Description

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.

Member Typedef Documentation

◆ bounds_type

typedef std::pair<double,double> WireCell::Diffuser::bounds_type

Definition at line 34 of file Diffuser.h.

Constructor & Destructor Documentation

◆ Diffuser()

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.

Parameters
pitchgives the wire coordinate system.
lbinsizedefines the grid spacing in the longitudinal direction.
tbinsizedefines the grid spacing in the transverse direction.
lorigindefines a grid line in the longitudinal direction.
torigindefines a grid line in the transverse direction.
DLis the longitudinal diffusion coefficient.
DTis the transverse diffusion coefficient.
drift_velocityis what it sounds like.
max_sigma_lis the largest possible longitudinal diffusion.
nsigmadefines the number of sigma at which to truncate the Gaussian.

Definition at line 20 of file Diffuser.cxx.

◆ ~Diffuser()

Diffuser::~Diffuser ( )
virtual

Definition at line 46 of file Diffuser.cxx.

Member Function Documentation

◆ bounds()

Diffuser::bounds_type Diffuser::bounds ( double  mean,
double  sigma,
double  binsize,
double  origin = 0.0 
)

Definition at line 195 of file Diffuser.cxx.

Here is the caller graph for this function:

◆ configure()

void Diffuser::configure ( const WireCell::Configuration config)
virtual

Accept a configuration.

Implements WireCell::IConfigurable.

Definition at line 70 of file Diffuser.cxx.

◆ default_configuration()

Configuration Diffuser::default_configuration ( ) const
virtual

Optional, override to return a hard-coded default configuration.

Reimplemented from WireCell::IConfigurable.

Definition at line 50 of file Diffuser.cxx.

Here is the call graph for this function:

◆ diffuse()

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.

Parameters
mean_lis the position in the longitudinal direction.
mean_tis the position in the transverse direction.
sigma_lis the Gaussian sigma in the longitudinal direction.
sigma_tis the Gaussian sigma in the transverse direction.
weightis 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ oned()

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.

Here is the caller graph for this function:

◆ operator()()

bool Diffuser::operator() ( const input_pointer depo,
output_queue outq 
)
virtual

Definition at line 117 of file Diffuser.cxx.

Here is the call graph for this function:

◆ reset()

void Diffuser::reset ( )
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.


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