LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Set of drift volumes. More...
#include "DriftPartitions.h"
Classes | |
struct | DriftVolume_t |
Data associated to a single drift volume. More... | |
Public Types | |
using | TPCPartition_t = geo::part::Partition< geo::TPCGeo const > |
Type of TPC collection for the partition of a single drift volume. More... | |
using | Range_t = lar::util::simple_geo::Range< double > |
Type for description of drift range. More... | |
using | Position_t = geo::Point_t |
Type representing a position in 3D space. More... | |
using | Direction_t = geo::Vector_t |
Type representing a direction in 3D space (norm is not constrained). More... | |
using | Projection_t = ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double >> |
Type representing a position in the 2D space. More... | |
using | DriftDir_t = Direction_t |
Type representing the drift direction (assumed to have norm 1). More... | |
using | Decomposer_t = geo::Decomposer< Direction_t, Position_t, Projection_t > |
Object used to compute projections on drift volume readout plane. More... | |
Public Member Functions | |
DriftPartitions (Decomposer_t const &decomp) | |
Constructor: no partition, but sets the main "drift" direction. More... | |
template<typename Stream > | |
void | print (Stream &&out) const |
Printout of the drift volume information. More... | |
void | addPartition (std::unique_ptr< TPCPartition_t > &&part) |
Adds the specified partition as a new drift volume. More... | |
Drift volume lookup. | |
double | driftCoord (Position_t const &pos) const |
Returns drift coordinate (in the drift-volume-specific frame) of pos . More... | |
DriftVolume_t const * | driftVolumeAt (Position_t const &pos) const |
DriftVolume_t const * | driftVolumeAt (double drift) const |
Returns which volume contains the specified drift (nullptr if none). More... | |
geo::TPCGeo const * | TPCat (Position_t const &pos) const |
Returns which TPC contains the specified position (nullptr if none). More... | |
Public Attributes | |
std::vector< DriftVolume_t > | volumes |
All drift volumes, sorted by position. More... | |
Decomposer_t | decomposer |
Decomposition on drift, width and depth axes. More... | |
Private Member Functions | |
std::vector< DriftVolume_t >::iterator | volumeAfter (double pos) |
Returns an iterator to the drift volume starting after pos . More... | |
std::vector< DriftVolume_t >::const_iterator | volumeAfter (double pos) const |
Returns an iterator to the drift volume starting after pos . More... | |
Range_t | computeCoverage (TPCPartition_t const &TPCpart) const |
Computes the coverage of the specified partition in the drift direction. More... | |
Set of drift volumes.
A drift volume is a set of TPCs whose readout planes lie on the same geometric plane.
Definition at line 87 of file DriftPartitions.h.
Object used to compute projections on drift volume readout plane.
Definition at line 132 of file DriftPartitions.h.
Type representing a direction in 3D space (norm is not constrained).
Definition at line 123 of file DriftPartitions.h.
Type representing the drift direction (assumed to have norm 1).
Definition at line 129 of file DriftPartitions.h.
Type representing a position in 3D space.
Definition at line 120 of file DriftPartitions.h.
using geo::DriftPartitions::Projection_t = ROOT::Math::DisplacementVector2D<ROOT::Math::Cartesian2D<double>> |
Type representing a position in the 2D space.
Definition at line 126 of file DriftPartitions.h.
using geo::DriftPartitions::Range_t = lar::util::simple_geo::Range<double> |
Type for description of drift range.
Definition at line 94 of file DriftPartitions.h.
using geo::DriftPartitions::TPCPartition_t = geo::part::Partition<geo::TPCGeo const> |
Type of TPC collection for the partition of a single drift volume.
Definition at line 91 of file DriftPartitions.h.
|
inlineexplicit |
Constructor: no partition, but sets the main "drift" direction.
Definition at line 139 of file DriftPartitions.h.
void geo::DriftPartitions::addPartition | ( | std::unique_ptr< TPCPartition_t > && | part | ) |
Adds the specified partition as a new drift volume.
Definition at line 97 of file DriftPartitions.cxx.
References computeCoverage(), part, volumeAfter(), and volumes.
Referenced by geo::buildDriftVolumes().
|
private |
Computes the coverage of the specified partition in the drift direction.
Definition at line 105 of file DriftPartitions.cxx.
References geo::part::Partition< Data >::data(), decomposer, driftCoord(), lar::util::simple_geo::Range< Data >::extendToInclude(), geo::TPCGeo::GetCathodeCenter(), geo::PlaneGeo::GetCenter(), geo::TPCGeo::LastPlane(), and geo::Decomposer< Vector, Point, ProjVector >::PointNormalComponent().
Referenced by addPartition().
|
inline |
Returns drift coordinate (in the drift-volume-specific frame) of pos
.
Definition at line 145 of file DriftPartitions.h.
References geo::Decomposer< Vector, Point, ProjVector >::PointNormalComponent().
Referenced by checkTPCcoords(), computeCoverage(), and sortTPCsByDriftCoord().
|
inline |
Returns which partition contains the specified position.
nullptr
if none) Definition at line 149 of file DriftPartitions.h.
References geo::buildDriftVolumes(), and part.
Referenced by TPCat().
geo::DriftPartitions::DriftVolume_t const * geo::DriftPartitions::driftVolumeAt | ( | double | drift | ) | const |
Returns which volume contains the specified drift (nullptr
if none).
Definition at line 78 of file DriftPartitions.cxx.
References volumeAfter(), and volumes.
void geo::DriftPartitions::print | ( | Stream && | out | ) | const |
Printout of the drift volume information.
Definition at line 280 of file DriftPartitions.h.
geo::TPCGeo const * geo::DriftPartitions::TPCat | ( | Position_t const & | pos | ) | const |
Returns which TPC contains the specified position (nullptr
if none).
Definition at line 87 of file DriftPartitions.cxx.
References geo::Decomposer< Vector, Point, ProjVector >::DecomposePoint(), decomposer, and driftVolumeAt().
|
inlineprivate |
Returns an iterator to the drift volume starting after pos
.
Definition at line 267 of file DriftPartitions.h.
Referenced by addPartition(), and driftVolumeAt().
|
inlineprivate |
Returns an iterator to the drift volume starting after pos
.
Definition at line 272 of file DriftPartitions.h.
Decomposer_t geo::DriftPartitions::decomposer |
Decomposition on drift, width and depth axes.
Definition at line 136 of file DriftPartitions.h.
Referenced by geo::buildDriftVolumes(), computeCoverage(), and TPCat().
std::vector<DriftVolume_t> geo::DriftPartitions::volumes |
All drift volumes, sorted by position.
Definition at line 135 of file DriftPartitions.h.
Referenced by addPartition(), and driftVolumeAt().