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

Pitch-Impact-Position. More...

#include <Pimpos.h>

Public Member Functions

 Pimpos (int nwires, double minwirepitch, double maxwirepitch, const Vector &wire=Vector(0, 1, 0), const Vector &pitch=Vector(0, 0, 1), const Point &origin=Point(0, 0, 0), int nimpact_bins_per_wire_region=10)
 
int nimpbins_per_wire () const
 Trivial accessor. More...
 
const Pointorigin () const
 Return given 3-point origin for plane pitch. More...
 
const Vectoraxis (int i) const
 
Vector relative (const Point &pt) const
 Return the vector from the origin to the given point. More...
 
double distance (const Point &pt, int axis=2) const
 
Point transform (const Point &pt) const
 
const Binningregion_binning () const
 
const Binningimpact_binning () const
 
std::pair< int, int > closest (double pitch) const
 
int wire_impact (int wireind) const
 Return the impact position index coincident with the wire index. More...
 
std::pair< int, int > wire_impacts (int wireind) const
 
int reflect (int wireind, int impind) const
 

Detailed Description

Pitch-Impact-Position.

A Pimpos object encapsulates information and methods related to geometry and binning of a plane of parallel and equidistant wires and a further uniform sub division along their pitch directions.

A wire region or wire bin is the locus *centered* on a wire
and which extends +/- 1/2 pitch from the wire position.

An impact region or impact bin is the smaller locus of pitch
formed by uniformly splitting a wire region.  It is *bound* by
two (not centered on one) impact positions.

Impact positions are "in phase" with wires" such that there is
one impact position coincident with a wire position.

For 3D "lab" to "plane" coordinate transformations there is a
plane coordinate system which has these three orthogonal axes:

axis0) anti nominal drift direction (normal to the wire plane) and axis1) along the wire direction such that, axis2) the pitch direction is the cross product of axis0 X axis1.

Definition at line 36 of file Pimpos.h.

Constructor & Destructor Documentation

◆ Pimpos()

Pimpos::Pimpos ( int  nwires,
double  minwirepitch,
double  maxwirepitch,
const Vector wire = Vector(0,1,0),
const Vector pitch = Vector(0,0,1),
const Point origin = Point(0,0,0),
int  nimpact_bins_per_wire_region = 10 
)

Create a Pimpos object for a particular plane.

\param nwires is the number of wires in the plane.

\param minwirepitch is the location in the pitch
coordinate of the first (zero index) wire.

\param maxwirepitch is the location in the pitch
coordinate of the last wire (ie, index=nwires-1).
Parameters
wireis a Vector which sets the direction of the wires in the plane. If the underlying wires are not exactly parallel, this should be some representative average wire direction.
pitchis a Vector which sets the direction and of the pitch of the wires in the plane. The pitch should be such that the cross product, wire (x) pitch, points in the anti-drift direction for the region this plane services. If the underlying wires are not exactly parallel, this pitcvector should be some representative average pitch direction.
originis a Point which sets an origin for all transforms. In particular, the projection of this origin point along the drift direction to the plane of wires sets the origin for the pitch coordinate.
nbinsgives the number of of impact bins covering one wire region.

The pitch extents and the origin vector must be expressed in the WCT system of (length) units.

Definition at line 5 of file Pimpos.cxx.

Here is the call graph for this function:

Member Function Documentation

◆ axis()

const Vector& WireCell::Pimpos::axis ( int  i) const
inline

Return an axis of the plan. 0=normal to plane (aka anti-drift), 1=wire direction, 2=pitch direction.

Definition at line 89 of file Pimpos.h.

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

◆ closest()

std::pair< int, int > Pimpos::closest ( double  pitch) const

Return a pair of indices. The first is the index of the wire closest to the given pitch. The second is the relative index of the impact closest impact position (index=0 means the impact position coincident with the wire).

Definition at line 34 of file Pimpos.cxx.

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

◆ distance()

double Pimpos::distance ( const Point pt,
int  axis = 2 
) const

Return the distance from origin to point along the given axis. Default is pitch distance.

Definition at line 71 of file Pimpos.cxx.

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

◆ impact_binning()

const Binning& WireCell::Pimpos::impact_binning ( ) const
inline

Return impact position binning. Bin edges are at impact positions and are in-phase with wire centers.

Definition at line 113 of file Pimpos.h.

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

◆ nimpbins_per_wire()

int WireCell::Pimpos::nimpbins_per_wire ( ) const
inline

Trivial accessor.

Definition at line 79 of file Pimpos.h.

◆ origin()

const Point& WireCell::Pimpos::origin ( ) const
inline

Return given 3-point origin for plane pitch.

Definition at line 85 of file Pimpos.h.

◆ reflect()

int Pimpos::reflect ( int  wireind,
int  impind 
) const

Return the impact position index which is the reflection of the given impact position index through the given wire index.

Definition at line 56 of file Pimpos.cxx.

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

◆ region_binning()

const Binning& WireCell::Pimpos::region_binning ( ) const
inline

Return wire region binning. Each bin is centered on the wire. Bin edges extend a distance of 1/2 pitch between neighboring wires.

Definition at line 109 of file Pimpos.h.

Here is the caller graph for this function:

◆ relative()

Vector Pimpos::relative ( const Point pt) const

Return the vector from the origin to the given point.

Definition at line 66 of file Pimpos.cxx.

Here is the caller graph for this function:

◆ transform()

Point Pimpos::transform ( const Point pt) const

Transform the given point into the Pimpos coordinate system.

Definition at line 76 of file Pimpos.cxx.

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

◆ wire_impact()

int Pimpos::wire_impact ( int  wireind) const

Return the impact position index coincident with the wire index.

Definition at line 43 of file Pimpos.cxx.

Here is the caller graph for this function:

◆ wire_impacts()

std::pair< int, int > Pimpos::wire_impacts ( int  wireind) const

Return the impact position indices (bin edges) at either extreme of the wire region. The smaller index for this wire is the larger index of wireind-1's values and vice versa.

Definition at line 48 of file Pimpos.cxx.

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

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