LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
Geometry information for a single wire plane.The plane is represented in the geometry by a solid which contains wires. Currently, only box solids are well supported. The box which is representation of the plane has some thickness, and it should not be assumed that the wires are in the median section of it, that is, the center of the box may not lie on the plane defined by the wires. More...
#include "PlaneGeo.h"
Classes | |
struct | PlaneGeoCoordinatesTag |
Tag for vectors in the "local" GDML coordinate frame of the plane. More... | |
struct | RectSpecs |
struct | WidthDepthReferenceTag |
Tag for plane frame base vectors. More... | |
struct | WireCoordinateReferenceTag |
Tag for wire base vectors. More... | |
Public Types | |
using | GeoNodePath_t = std::vector< TGeoNode const * > |
using | Rect = lar::util::simple_geo::Rectangle< double > |
Type for description of rectangles. More... | |
Types for geometry-local reference vectors. | |
These types represents points and displacement vectors in the reference frame defined in the plane geometry box from the GDML geometry description. No alias is explicitly defined for the LArSoft global vector types, Remember the | |
using | LocalPoint_t = geo::Point3DBase_t< PlaneGeoCoordinatesTag > |
Type of points in the local GDML wire plane frame. More... | |
using | LocalVector_t = geo::Vector3DBase_t< PlaneGeoCoordinatesTag > |
Type of displacement vectors in the local GDML wire plane frame. More... | |
Types for vectors in the wire coordinate frame. | |
using | WireCoordProjection_t = ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double >, WireCoordinateReferenceTag > |
Type for projections in the wire base representation. More... | |
using | WireDecomposer_t = geo::Decomposer< geo::Vector_t, geo::Point_t, WireCoordProjection_t > |
Type used for plane decompositions on wire base. More... | |
using | WireDecomposedVector_t = WireDecomposer_t::DecomposedVector_t |
Type describing a 3D point or vector decomposed on a plane on wire base. More... | |
Types for vectors in the width/depth coordinate frame. | |
using | WidthDepthProjection_t = ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double >, WidthDepthReferenceTag > |
using | WidthDepthDisplacement_t = ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double >, WidthDepthReferenceTag > |
Type for vector projections in the plane frame base representation. More... | |
using | WidthDepthDecomposer_t = geo::Decomposer< geo::Vector_t, geo::Point_t, WidthDepthProjection_t > |
Type used for plane decompositions on plane frame (width/depth). More... | |
using | WDDecomposedVector_t = WidthDepthDecomposer_t::DecomposedVector_t |
Public Member Functions | |
PlaneGeo (GeoNodePath_t &path, size_t depth) | |
Construct a representation of a single plane of the detector. More... | |
WireGeo const & | Wire (unsigned int iwire) const |
WireGeo const * | WirePtr (unsigned int iwire) const |
Returns the wire number iwire from this plane. More... | |
const WireGeo & | FirstWire () const |
Return the first wire in the plane. More... | |
const WireGeo & | MiddleWire () const |
Return the middle wire in the plane. More... | |
const WireGeo & | LastWire () const |
Return the last wire in the plane. More... | |
auto | IterateWires () const |
Allows range-for iteration on all wires in this plane. More... | |
geo::WireGeo const & | NearestWire (geo::Point_t const &pos) const |
Returns the wire closest to the specified position. More... | |
geo::WireID | ClosestWireID (geo::WireID::WireID_t wireNo) const |
Returns the closest valid wire ID to the specified wire. More... | |
geo::WireID | ClosestWireID (geo::WireID const &wireid) const |
Returns the closest valid wire ID to the specified wire. More... | |
Rect const & | ActiveArea () const |
Returns an area covered by the wires in the plane. More... | |
lar::util::simple_geo::Volume | Coverage () const |
Returns a volume including all the wires in the plane. More... | |
template<typename Stream > | |
void | PrintPlaneInfo (Stream &&out, std::string indent="", unsigned int verbosity=1) const |
Prints information about this plane. More... | |
template<typename Point = DefaultPoint_t> | |
double | WireCoordinate (Point const &point) const |
Returns the coordinate of the point on the plane, in wire units. More... | |
template<typename Point = DefaultPoint_t> | |
Point | ProjectionReferencePoint () const |
Returns the reference point used by PointProjection() . More... | |
template<typename Point = DefaultPoint_t> | |
Point | ComposePoint (WireDecomposedVector_t const &decomp) const |
Returns the 3D vector from composition of projection and distance. More... | |
template<typename Point = DefaultPoint_t> | |
Point | ComposePoint (double distance, WireCoordProjection_t const &proj) const |
Returns the 3D point from composition of projection and distance. More... | |
WidthDepthProjection_t | DeltaFromPlane (WidthDepthProjection_t const &proj, double wMargin, double dMargin) const |
Returns a projection vector that, added to the argument, gives a projection inside (or at the border of) the plane. More... | |
WidthDepthProjection_t | DeltaFromPlane (WidthDepthProjection_t const &proj, double margin=0.0) const |
Returns a projection vector that, added to the argument, gives a projection inside (or at the border of) the area of plane. More... | |
WidthDepthProjection_t | DeltaFromActivePlane (WidthDepthProjection_t const &proj, double wMargin, double dMargin) const |
Returns a projection vector that, added to the argument, gives a projection inside (or at the border of) the active area of plane. More... | |
WidthDepthProjection_t | DeltaFromActivePlane (WidthDepthProjection_t const &proj, double margin=0.0) const |
Returns a projection vector that, added to the argument, gives a projection inside (or at the border of) the active area of plane. More... | |
WidthDepthProjection_t | MoveProjectionToPlane (WidthDepthProjection_t const &proj) const |
Returns the projection, moved onto the plane if necessary. More... | |
template<typename Point = DefaultPoint_t> | |
Point | ComposePoint (WDDecomposedVector_t const &decomp) const |
Returns the 3D vector from composition of projection and distance. More... | |
template<typename Point = DefaultPoint_t> | |
Point | ComposePoint (double distance, WidthDepthProjection_t const &proj) const |
Returns the 3D point from composition of projection and distance. More... | |
void | SortWires (geo::GeoObjectSorter const &sorter) |
Apply sorting to WireGeo objects. More... | |
void | UpdateAfterSorting (geo::PlaneID planeid, geo::BoxBoundedGeo const &TPCbox) |
Performs all needed updates after the TPC has sorted the planes. More... | |
Plane properties | |
View_t | View () const |
Which coordinate does this plane measure. More... | |
Orient_t | Orientation () const |
What is the orientation of the plane. More... | |
double | ThetaZ () const |
Angle of the wires from positive z axis; . More... | |
double | PhiZ () const |
Angle from positive z axis of the wire coordinate axis, in radians. More... | |
double | SinPhiZ () const |
Sine of PhiZ() More... | |
double | CosPhiZ () const |
Cosine of PhiZ() More... | |
geo::PlaneID const & | ID () const |
Returns the identifier of this plane. More... | |
Plane size and coordinates | |
template<typename Vector = DefaultVector_t> | |
Vector | WidthDir () const |
Return the direction of plane width. More... | |
template<typename Vector = DefaultVector_t> | |
Vector | DepthDir () const |
Return the direction of plane depth. More... | |
double | Width () const |
Return the width of the plane. More... | |
double | Depth () const |
Return the depth of the plane. More... | |
geo::BoxBoundedGeo | BoundingBox () const |
Wire access | |
unsigned int | Nwires () const |
Number of wires in this plane. More... | |
unsigned int | NElements () const |
Number of wires in this plane. More... | |
bool | HasWire (unsigned int iwire) const |
Returns whether a wire with index iwire is present in this plane. More... | |
bool | HasElement (unsigned int iwire) const |
Returns whether a wire with index iwire is present in this plane. More... | |
bool | HasWire (geo::WireID const &wireid) const |
Returns whether the wire in wireid is present in this plane. More... | |
bool | HasElement (geo::WireID const &wireid) const |
Returns whether the wire in wireid is present in this plane. More... | |
WireGeo const & | Wire (WireID const &wireid) const |
Returns the wire in wireid from this plane. More... | |
WireGeo const & | GetElement (WireID const &wireid) const |
Returns the wire in wireid from this plane. More... | |
WireGeo const * | WirePtr (WireID const &wireid) const |
Returns the wire in wireid from this plane. More... | |
WireGeo const * | GetElementPtr (WireID const &wireid) const |
Returns the wire in wireid from this plane. More... | |
Plane geometry properties | |
double | WirePitch () const |
Return the wire pitch (in centimeters). It is assumed constant. More... | |
bool | WireIDincreasesWithZ () const |
Returns whether the higher z wires have higher wire ID. More... | |
template<typename Vector = DefaultVector_t> | |
Vector | GetNormalDirection () const |
Returns the direction normal to the plane. More... | |
template<typename Vector = DefaultVector_t> | |
Vector | GetIncreasingWireDirection () const |
Returns the direction of increasing wires. More... | |
template<typename Point = DefaultPoint_t> | |
Point | GetCenter () const |
Returns the centre of the wire plane in world coordinates [cm]. More... | |
template<typename Point = DefaultPoint_t> | |
Point | GetBoxCenter () const |
Returns the centre of the box representing the plane. More... | |
template<typename Vector = DefaultVector_t> | |
Vector | GetWireDirection () const |
Returns the direction of the wires. More... | |
geo::WireID | NearestWireID (geo::Point_t const &pos) const |
Returns the ID of wire closest to the specified position. More... | |
geo::WireID | NearestWireID (TVector3 const &pos) const |
Return the wire pitch (in centimeters). It is assumed constant. More... | |
double | DistanceFromPlane (geo::Point_t const &point) const |
Returns the distance of the specified point from the wire plane. More... | |
double | DistanceFromPlane (TVector3 const &point) const |
Returns the distance of the specified point from the wire plane. More... | |
void | DriftPoint (geo::Point_t &position, double distance) const |
Shifts the position of an electron drifted by a distance. More... | |
void | DriftPoint (TVector3 &position, double distance) const |
Shifts the position of an electron drifted by a distance. More... | |
void | DriftPoint (geo::Point_t &position) const |
Shifts the position along drift direction to fall on the plane. More... | |
void | DriftPoint (TVector3 &position) const |
Shifts the position along drift direction to fall on the plane. More... | |
Projections on wire length/wire coordinate direction base | |
These methods deal with projection of points and vectors on the plane, using a geometric reference base which is dependent on the wire direction. This is useful for plane reconstruction. | |
double | PlaneCoordinateFrom (geo::Point_t const &point, geo::WireGeo const &refWire) const |
Returns the coordinate of point on the plane respect to a wire. More... | |
double | PlaneCoordinateFrom (TVector3 const &point, geo::WireGeo const &refWire) const |
Returns the coordinate of point on the plane respect to a wire. More... | |
double | PlaneCoordinate (geo::Point_t const &point) const |
Returns the coordinate of the point on the plane. More... | |
double | PlaneCoordinate (TVector3 const &point) const |
Returns the coordinate of the point on the plane. More... | |
WireDecomposedVector_t | DecomposePoint (geo::Point_t const &point) const |
Decomposes a 3D point in two components. More... | |
WireDecomposedVector_t | DecomposePoint (TVector3 const &point) const |
Decomposes a 3D point in two components. More... | |
WireCoordProjection_t | Projection (geo::Point_t const &point) const |
Returns the projection of the specified point on the plane. More... | |
WireCoordProjection_t | PointProjection (geo::Point_t const &point) const |
Returns the projection of the specified point on the plane. More... | |
WireCoordProjection_t | PointProjection (TVector3 const &point) const |
Returns the projection of the specified point on the plane. More... | |
WireCoordProjection_t | Projection (geo::Vector_t const &v) const |
Returns the projection of the specified vector on the plane. More... | |
WireCoordProjection_t | VectorProjection (geo::Vector_t const &v) const |
Returns the projection of the specified vector on the plane. More... | |
WireCoordProjection_t | VectorProjection (TVector3 const &v) const |
Returns the projection of the specified vector on the plane. More... | |
Projection on width/depth plane | |
These methods deal with projection of points and vectors on the plane, using a geometric reference base which is not dependent on the wire direction. This is more useful when comparing with the TPC or other planes. | |
WDDecomposedVector_t | DecomposePointWidthDepth (geo::Point_t const &point) const |
Decomposes a 3D point in two components. More... | |
WDDecomposedVector_t | DecomposePointWidthDepth (TVector3 const &point) const |
Decomposes a 3D point in two components. More... | |
WidthDepthProjection_t | PointWidthDepthProjection (geo::Point_t const &point) const |
Returns the projection of the specified point on the plane. More... | |
WidthDepthProjection_t | PointWidthDepthProjection (TVector3 const &point) const |
Returns the projection of the specified point on the plane. More... | |
WidthDepthProjection_t | VectorWidthDepthProjection (geo::Vector_t const &v) const |
Returns the projection of the specified vector on the plane. More... | |
WidthDepthProjection_t | VectorWidthDepthProjection (TVector3 const &v) const |
Returns the projection of the specified vector on the plane. More... | |
bool | isProjectionOnPlane (geo::Point_t const &point) const |
Returns if the projection of specified point is within the plane. More... | |
bool | isProjectionOnPlane (TVector3 const &point) const |
Returns if the projection of specified point is within the plane. More... | |
geo::Point_t | MovePointOverPlane (geo::Point_t const &point) const |
Returns the point, moved so that its projection is over the plane. More... | |
TVector3 | MovePointOverPlane (TVector3 const &point) const |
Returns the point, moved so that its projection is over the plane. More... | |
Coordinate transformation | |
Local points and displacement vectors are described by the types | |
void | LocalToWorld (const double *plane, double *world) const |
Transform point from local plane frame to world frame. More... | |
TVector3 | LocalToWorld (const TVector3 &local) const |
Transform point from local plane frame to world frame. More... | |
geo::Point_t | toWorldCoords (LocalPoint_t const &local) const |
Transform point from local plane frame to world frame. More... | |
void | LocalToWorldVect (const double *plane, double *world) const |
Transform direction vector from local to world. More... | |
TVector3 | LocalToWorldVect (const TVector3 &local) const |
Transform direction vector from local to world. More... | |
geo::Vector_t | toWorldCoords (LocalVector_t const &local) const |
Transform direction vector from local to world. More... | |
void | WorldToLocal (const double *world, double *plane) const |
Transform point from world frame to local plane frame. More... | |
TVector3 | WorldToLocal (TVector3 const &world) const |
Transform point from world frame to local plane frame. More... | |
LocalPoint_t | toLocalCoords (geo::Point_t const &world) const |
Transform point from world frame to local plane frame. More... | |
void | WorldToLocalVect (const double *world, double *plane) const |
Transform direction vector from world to local. More... | |
TVector3 | WorldToLocalVect (TVector3 const &world) const |
Transform direction vector from world to local. More... | |
LocalVector_t | toLocalCoords (geo::Vector_t const &world) const |
Transform direction vector from world to local. More... | |
Setters | |
void | SetView (geo::View_t view) |
Set the signal view (for TPCGeo). More... | |
Static Public Member Functions | |
static std::string | ViewName (geo::View_t view) |
Returns the name of the specified view. More... | |
static std::string | OrientationName (geo::Orient_t orientation) |
Returns the name of the specified orientation. More... | |
Static Public Attributes | |
static constexpr unsigned int | MaxVerbosity = 6 |
Maximum value for print verbosity. More... | |
Private Types | |
using | DefaultVector_t = TVector3 |
using | DefaultPoint_t = TVector3 |
using | WireCollection_t = std::vector< geo::WireGeo > |
using | LocalTransformation_t = geo::LocalTransformationGeo< TGeoHMatrix, LocalPoint_t, LocalVector_t > |
Private Member Functions | |
void | FindWire (GeoNodePath_t &path, size_t depth) |
void | MakeWire (GeoNodePath_t &path, size_t depth) |
void | DetectGeometryDirections () |
Sets the geometry directions. More... | |
geo::Vector_t | GetNormalAxis () const |
Returns a direction normal to the plane (pointing is not defined). More... | |
void | UpdatePlaneNormal (geo::BoxBoundedGeo const &TPCbox) |
Updates the cached normal to plane versor; needs the TPC box coordinates. More... | |
void | UpdateWidthDepthDir () |
Updates the cached depth and width direction. More... | |
void | UpdateIncreasingWireDir () |
Updates the cached direction to increasing wires. More... | |
void | UpdateWireDir () |
Updates the cached direction to wire. More... | |
void | UpdateOrientation () |
Updates plane orientation. More... | |
void | UpdateWirePitch () |
Updates the stored wire pitch. More... | |
void | UpdateWirePlaneCenter () |
Updates the stored wire plane center. More... | |
void | UpdatePhiZ () |
Updates the stored . More... | |
void | UpdateView () |
Updates the stored view. More... | |
void | UpdateWirePitchSlow () |
Updates the stored wire pitch with a slower, more robust algorithm. More... | |
void | UpdateDecompWireOrigin () |
Updates the position of the wire coordinate decomposition. More... | |
void | UpdateActiveArea () |
Updates the internally used active area. More... | |
bool | shouldFlipWire (geo::WireGeo const &wire) const |
Whether the specified wire should have start and end swapped. More... | |
Static Private Member Functions | |
template<typename T > | |
static T | boundedValue (T v, T min, T max) |
Returns min if v < min , max if v > max , v otherwise. More... | |
Private Attributes | |
LocalTransformation_t | fTrans |
Plane to world transform. More... | |
TGeoVolume const * | fVolume |
Plane volume description. More... | |
View_t | fView |
Does this plane measure U, V, or W? More... | |
Orient_t | fOrientation |
Is the plane vertical or horizontal? More... | |
WireCollection_t | fWire |
List of wires in this plane. More... | |
double | fWirePitch |
Pitch of wires in this plane. More... | |
double | fSinPhiZ |
Sine of . More... | |
double | fCosPhiZ |
Cosine of . More... | |
geo::Vector_t | fNormal |
WireDecomposer_t | fDecompWire |
WidthDepthDecomposer_t | fDecompFrame |
RectSpecs | fFrameSize |
Rect | fActiveArea |
Area covered by wires in frame base. More... | |
geo::Point_t | fCenter |
Center of the plane, lying on the wire plane. More... | |
geo::PlaneID | fID |
ID of this plane. More... | |
Friends | |
struct | details::ActiveAreaCalculator |
Geometry information for a single wire plane.
The plane is represented in the geometry by a solid which contains wires. Currently, only box solids are well supported. The box which is representation of the plane has some thickness, and it should not be assumed that the wires are in the median section of it, that is, the center of the box may not lie on the plane defined by the wires.
The plane defines two local reference frames. The first, depending on wire directions and therefore called "wire base", is defined by the normal to the plane (pointing toward the center of the TPC), the direction of the wires, and the direction that the wires measure. This is a positive orthogonal base. Note that for this base to be correctly defined, the Geometry service has to provide external information (for example, where the center of the TPC is).
The second, depending only on the shape of the plane and called "frame base", is defined by the normal (the same as for the previous one), and two orthogonal axes, "width" and "depth", aligned with the sides of the plane. If the plane has not the shape of a box, this reference frame is not available. This coordinate system is also positive defined. These components are all measured in centimeters.
Definition at line 78 of file PlaneGeo.h.
|
private |
Definition at line 81 of file PlaneGeo.h.
|
private |
Definition at line 80 of file PlaneGeo.h.
using geo::PlaneGeo::GeoNodePath_t = std::vector<TGeoNode const*> |
Definition at line 85 of file PlaneGeo.h.
Type of points in the local GDML wire plane frame.
Definition at line 106 of file PlaneGeo.h.
|
private |
Definition at line 1251 of file PlaneGeo.h.
Type of displacement vectors in the local GDML wire plane frame.
Definition at line 109 of file PlaneGeo.h.
using geo::PlaneGeo::Rect = lar::util::simple_geo::Rectangle<double> |
Type for description of rectangles.
Definition at line 160 of file PlaneGeo.h.
Type describing a 3D point or vector decomposed on a plane with plane frame base (width and depth).
Definition at line 154 of file PlaneGeo.h.
using geo::PlaneGeo::WidthDepthDecomposer_t = geo::Decomposer <geo::Vector_t, geo::Point_t, WidthDepthProjection_t> |
Type used for plane decompositions on plane frame (width/depth).
Definition at line 150 of file PlaneGeo.h.
using geo::PlaneGeo::WidthDepthDisplacement_t = ROOT::Math::DisplacementVector2D <ROOT::Math::Cartesian2D<double>, WidthDepthReferenceTag> |
Type for vector projections in the plane frame base representation.
Definition at line 146 of file PlaneGeo.h.
using geo::PlaneGeo::WidthDepthProjection_t = ROOT::Math::DisplacementVector2D <ROOT::Math::Cartesian2D<double>, WidthDepthReferenceTag> |
Type for projections in the plane frame base representation.
Definition at line 142 of file PlaneGeo.h.
|
private |
Definition at line 1248 of file PlaneGeo.h.
using geo::PlaneGeo::WireCoordProjection_t = ROOT::Math::DisplacementVector2D <ROOT::Math::Cartesian2D<double>, WireCoordinateReferenceTag> |
Type for projections in the wire base representation.
Definition at line 121 of file PlaneGeo.h.
Type describing a 3D point or vector decomposed on a plane on wire base.
Definition at line 128 of file PlaneGeo.h.
using geo::PlaneGeo::WireDecomposer_t = geo::Decomposer <geo::Vector_t, geo::Point_t, WireCoordProjection_t> |
Type used for plane decompositions on wire base.
Definition at line 125 of file PlaneGeo.h.
geo::PlaneGeo::PlaneGeo | ( | GeoNodePath_t & | path, |
size_t | depth | ||
) |
Construct a representation of a single plane of the detector.
Definition at line 435 of file PlaneGeo.cxx.
References DetectGeometryDirections(), FindWire(), fVolume, and UpdateWirePitchSlow().
|
inline |
Returns an area covered by the wires in the plane.
The returned value is conceptually akin of a projection of Coverage()
volume. Yet, the precise definition of the area is not specified, therefore this area should not be uses for physics.
The current implementation is documented in details::ActiveAreaCalculator
.
Definition at line 613 of file PlaneGeo.h.
References art::detail::indent().
|
inlinestaticprivate |
geo::BoxBoundedGeo geo::PlaneGeo::BoundingBox | ( | ) | const |
Returns the world coordinates of the box containing the plane.
Definition at line 469 of file PlaneGeo.cxx.
References geo::BoxBoundedGeo::ExtendToInclude(), fVolume, geo::BoxBoundedGeo::SetBoundaries(), and toWorldCoords().
|
inline |
Returns the closest valid wire ID to the specified wire.
wireNo | number of the wire on this plane |
If the wire number described a wire present on this plane, its complete wire ID is returned, valid. Otherwise, a valid wire ID is returned which points to the existing wire closest to the specified wire number: the first wire if the wire number is negative, or the last wire if the wire number is larger than the actual wires.
Note that the argument geo::WireID::WireID_t
type is an integral type, and if a floating point value is specified for it, it's subject to truncation.
Definition at line 1305 of file PlaneGeo.h.
Referenced by boundedValue(), and NearestWire().
|
inline |
Returns the closest valid wire ID to the specified wire.
wireid | the wire ID (must be on this plane) |
ClosestWireID(geo::WireID::WireID_t)
If wireid
is not on this plane, it is returned but marked as invalid. Otherwise, the returned ID is the same as in ClosestWireID(geo::WireID::WireID_t)
.
Definition at line 1310 of file PlaneGeo.h.
References geo::PlaneID::asPlaneID(), geo::CryostatID::markInvalid(), and geo::WireID::Wire.
|
inline |
Returns the 3D vector from composition of projection and distance.
Point | the type of point to return (current default: TVector3 ) |
decomp | decomposed point |
See ComposePoint(double, WireCoordProjection_t const&)
for details.
Definition at line 818 of file PlaneGeo.h.
Referenced by geo::TPCGeo::ComposePoint(), and larg4::LArVoxelReadout::RecoverOffPlaneDeposit().
|
inline |
Returns the 3D point from composition of projection and distance.
Point | the type of point to return (current default: TVector3 ) |
distance | distance of the target point from the wire plane |
proj | projection of the target point on the wire plane |
The returned point is the reference point of the frame system (that is, the plane center), translated by two 3D vectors:
PointProjection()
gives the input projectionThe choice of the projection reference point embodies the same convention used in PointProjection()
and DecomposePoint()
. In fact, the strict definition of the result of this method is a 3D point whose decomposition on the plane frame base matches the method arguments.
Note that currently no equivalent facility is available to compose vectors instead of points, that is, entities ignoring the reference point.
Definition at line 847 of file PlaneGeo.h.
|
inline |
Returns the 3D vector from composition of projection and distance.
Point | type of point to be produced (current default is TVector3 ) |
decomp | decomposed point |
See ComposePointWidthDepth(double, DecomposedVector_t::Projection_t const&)
for details.
Definition at line 1083 of file PlaneGeo.h.
|
inline |
Returns the 3D point from composition of projection and distance.
Point | type of point to be produced (current default is TVector3 ) |
distance | distance of the target point from the wire plane |
proj | projection of the target point on the wire plane |
The returned vector is the sum of two 3D vectors:
PointWidthDepthProjection()
gives the input projectionGiven the arbitrary definition of the projection reference, it is assumed that the same convention is used as in PointWidthDepthProjection() and DecomposePointWidthDepth().
Definition at line 1107 of file PlaneGeo.h.
|
inline |
lar::util::simple_geo::Volume geo::PlaneGeo::Coverage | ( | ) | const |
Returns a volume including all the wires in the plane.
Definition at line 566 of file PlaneGeo.cxx.
References B, DeltaFromPlane(), FirstWire(), geo::WireGeo::GetEnd(), geo::WireGeo::GetStart(), and LastWire().
|
inline |
Decomposes a 3D point in two components.
point | the point to be decomposed |
The point is decomposed in:
The distance is obtained as by DistanceFromPlane(). The projection on the plane is obtained following the same convention as PointProjection().
Definition at line 744 of file PlaneGeo.h.
|
inline |
Decomposes a 3D point in two components.
point | the point to be decomposed |
The point is decomposed in:
The distance is obtained as by DistanceFromPlane(). The projection on the plane is obtained following the same convention as PointProjection().
Definition at line 746 of file PlaneGeo.h.
References geo::vect::toPoint().
|
inline |
Decomposes a 3D point in two components.
point | the point to be decomposed |
The point is decomposed in:
The distance is obtained as by DistanceFromPlane(). The projection on the plane is obtained following the same convention as PointWidthDepthProjection().
Definition at line 878 of file PlaneGeo.h.
Referenced by geo::TPCGeo::DecomposePoint().
|
inline |
Decomposes a 3D point in two components.
point | the point to be decomposed |
The point is decomposed in:
The distance is obtained as by DistanceFromPlane(). The projection on the plane is obtained following the same convention as PointWidthDepthProjection().
Definition at line 880 of file PlaneGeo.h.
References geo::vect::toPoint().
PlaneGeo::WidthDepthProjection_t geo::PlaneGeo::DeltaFromActivePlane | ( | WidthDepthProjection_t const & | proj, |
double | wMargin, | ||
double | dMargin | ||
) | const |
Returns a projection vector that, added to the argument, gives a projection inside (or at the border of) the active area of plane.
proj | starting projection |
wMargin | the point is brought this amount inside the active area |
dMargin | the point is brought this amount inside the active area |
DeltaFromPlane()
The "active" area of the plane is the rectangular area which includes all the wires. The area is obtained as the smallest rectangle including the projection of both ends of all wires in the plane, less half a pitch. This defines a "fiducial" area away from the borders of the plane. The projection is in the frame reference (PointWidthDepthProjection()
). The area is reduced on each side by the specified margins. If for example wMargin
is 1.0
, the active area lower border on the width direction will be increased by 1 cm, and the upper border will be decreased by 1 cm effectively making the active area 2 cm narrowed on the width direction. The same independently applies to the depth direction with dMargin
. The main purpose of the margins is to accommodate for rounding errors. A version of this method with default margins of 0 is also available.
If the projection is already on the active area of the plane, the returned displacement is null. Otherwise, the displacement, added to proj, will bring it on the active plane area (in fact, on its border).
Definition at line 593 of file PlaneGeo.cxx.
References lar::util::simple_geo::Range< Data >::delta(), lar::util::simple_geo::Rectangle< Data >::depth, fActiveArea, and lar::util::simple_geo::Rectangle< Data >::width.
Referenced by DeltaFromPlane(), and larg4::LArVoxelReadout::RecoverOffPlaneDeposit().
|
inline |
Returns a projection vector that, added to the argument, gives a projection inside (or at the border of) the active area of plane.
proj | starting projection |
margin | the point is brought this amount inside the active area _(default: 0)_ |
DeltaFromActivePlane(WidthDepthProjection_t const&, double, double)
This is the implementation with default values for margins of DeltaFromActivePlane()
. The depth and width margins are the same, and 0 by default.
Definition at line 1032 of file PlaneGeo.h.
PlaneGeo::WidthDepthProjection_t geo::PlaneGeo::DeltaFromPlane | ( | WidthDepthProjection_t const & | proj, |
double | wMargin, | ||
double | dMargin | ||
) | const |
Returns a projection vector that, added to the argument, gives a projection inside (or at the border of) the plane.
proj | starting projection |
wMargin | the point is brought this amount inside the target area |
dMargin | the point is brought this amount inside the target area |
DeltaFromActivePlane()
The returned projection vector is guaranteed, when added to proj
, to yield a projection on or within the border of the plane (the "target
area"), as defined by the GDML geometry.
The target plane area is reduced on each side by the specified margins. If for example wMargin
is 1.0
, the area lower border on the width direction will be increased by 1 cm, and the upper border will be decreased by 1 cm effectively making the area 2 cm narrowed on the width direction. The same independently applies to the depth direction with dMargin
. The main purpose of the margins is to accommodate for rounding errors. A version of this method with default margins of 0 is also available.
If the projection is already on the target area, the returned displacement is null.
Definition at line 580 of file PlaneGeo.cxx.
References DeltaFromActivePlane(), fFrameSize, geo::PlaneGeo::RectSpecs::HalfDepth(), and geo::PlaneGeo::RectSpecs::HalfWidth().
Referenced by Coverage(), isProjectionOnPlane(), MovePointOverPlane(), and MoveProjectionToPlane().
|
inline |
Returns a projection vector that, added to the argument, gives a projection inside (or at the border of) the area of plane.
proj | starting projection |
margin | the point is brought this amount inside the plane area _(default: 0)_ |
DeltaFromPlane(WidthDepthProjection_t const&, double, double)
This is the implementation with default values for margins of DeltaFromPlane()
. The depth and width margins are the same, and 0 by default.
Definition at line 984 of file PlaneGeo.h.
|
inline |
Return the depth of the plane.
The precise definition is arbitrary (see DepthDir()
).
Definition at line 235 of file PlaneGeo.h.
|
inline |
Return the direction of plane depth.
Vector | the type of vector to return (current default: TVector3 ) |
The precise definition of the sides is arbitrary, but they are defined to lie on the wire plane and so that WidthDir(), DepthDir() and GetNormalDirection() make a orthonormal base. That base (width, depth, normal) is guaranteed to be positive defined.
Definition at line 219 of file PlaneGeo.h.
Referenced by MovePointOverPlane(), geo::TPCGeo::RefDepthDir(), and UpdateWidthDepthDir().
|
private |
Sets the geometry directions.
Definition at line 790 of file PlaneGeo.cxx.
References dir, e, fDecompFrame, fFrameSize, fVolume, geo::PlaneGeo::RectSpecs::halfDepth, geo::PlaneGeo::RectSpecs::halfWidth, geo::origin(), geo::vect::rounded01(), geo::Decomposer< Vector, Point, ProjVector >::SetMainDir(), geo::Decomposer< Vector, Point, ProjVector >::SetOrigin(), geo::Decomposer< Vector, Point, ProjVector >::SetSecondaryDir(), toWorldCoords(), and Z.
Referenced by PlaneGeo().
|
inline |
Returns the distance of the specified point from the wire plane.
point | a point in world coordinates [cm] |
The distance is defined positive if the point lies in the side the normal vector (GetNormalDirection()) points to.
The distance is defined from the geometric plane where the wires lie, and it may not match the distance from the center of the geometry box representing the plane. It should always match the drift distance from this wire plane, and the result of DriftPoint(point, DistanceFromPlane(point))
will bring the point to the plane.
Definition at line 557 of file PlaneGeo.h.
Referenced by geo::TPCGeo::ComputeDriftDistance(), geo::TPCGeo::DistanceFromReferencePlane(), larg4::LArVoxelReadout::RecoverOffPlaneDeposit(), and UpdateWirePlaneCenter().
|
inline |
Returns the distance of the specified point from the wire plane.
point | a point in world coordinates [cm] |
The distance is defined positive if the point lies in the side the normal vector (GetNormalDirection()) points to.
The distance is defined from the geometric plane where the wires lie, and it may not match the distance from the center of the geometry box representing the plane. It should always match the drift distance from this wire plane, and the result of DriftPoint(point, DistanceFromPlane(point))
will bring the point to the plane.
Definition at line 559 of file PlaneGeo.h.
References geo::vect::toPoint().
|
inline |
Shifts the position of an electron drifted by a distance.
position | _(modified)_ the position of the electron |
distance | drift distance to shift the electron by [cm] |
This is a pure geometry computation: the position is shifted by the drift distance in the direction opposite to the normal to the plane (as returned by GetNormalDirection()
), no matter where the position is relative to the plane. The wording about "electron position" is just meant to remind that the drift shift is taken with opposite sign: since the point is assumed to be an electron, a positive drift normally moves its position toward the wire plane.
Definition at line 579 of file PlaneGeo.h.
Referenced by geo::TPCGeo::DriftPoint(), and UpdateWirePlaneCenter().
|
inline |
Shifts the position of an electron drifted by a distance.
position | _(modified)_ the position of the electron |
distance | drift distance to shift the electron by [cm] |
This is a pure geometry computation: the position is shifted by the drift distance in the direction opposite to the normal to the plane (as returned by GetNormalDirection()
), no matter where the position is relative to the plane. The wording about "electron position" is just meant to remind that the drift shift is taken with opposite sign: since the point is assumed to be an electron, a positive drift normally moves its position toward the wire plane.
Definition at line 581 of file PlaneGeo.h.
|
inline |
Shifts the position along drift direction to fall on the plane.
position | _(modified)_ the position to be shifted |
This is a pure geometry computation: the position is shifted by the drift distance in the direction opposite to the normal to the plane (as returned by GetNormalDirection()
), no matter where the position is relative to the plane.
Definition at line 595 of file PlaneGeo.h.
|
inline |
Shifts the position along drift direction to fall on the plane.
position | _(modified)_ the position to be shifted |
This is a pure geometry computation: the position is shifted by the drift distance in the direction opposite to the normal to the plane (as returned by GetNormalDirection()
), no matter where the position is relative to the plane.
Definition at line 597 of file PlaneGeo.h.
|
private |
Definition at line 517 of file PlaneGeo.cxx.
References MakeWire().
Referenced by PlaneGeo().
|
inline |
Return the first wire in the plane.
Definition at line 325 of file PlaneGeo.h.
Referenced by Coverage(), geo::details::ActiveAreaCalculator::initializeWireEnds(), ThetaZ(), UpdateDecompWireOrigin(), and UpdateWireDir().
|
inline |
Returns the centre of the box representing the plane.
Point | type of point to be returned (current default: TVector3 ) |
This is the centre of the box representing the plane in the geometry description, in world coordinates. This is rarely of any use, as most of the times GetCenter()
delivers the proper information, e.g. for simulation and reconstruction.
Definition at line 441 of file PlaneGeo.h.
Referenced by geo::TPCGeo::DetectDriftDirection(), geo::TPCGeo::ResetDriftDirection(), and UpdatePlaneNormal().
|
inline |
Returns the centre of the wire plane in world coordinates [cm].
The center of the plane is defined so that it has width and depth coordinates in the middle of the plane box (that is, the geometrical representation of the plane in the geometry description), and the other coordinate set at drift distance 0.
Note that this does not necessarily match the center of the box, if the geometry does not place the wires, which define the drift distance, in the plane in the middle of the box.
Definition at line 426 of file PlaneGeo.h.
Referenced by geo::DriftPartitions::computeCoverage(), geo::TPCGeo::ProjectionReferencePoint(), UpdateDecompWireOrigin(), and UpdateIncreasingWireDir().
Returns the wire in wireid from this plane.
wireid | full wire ID |
cet::exception | (category "WireOutOfRange") if no such wire |
The cryostat, TPC and plane numbers in wireid are ignored, as it is ignored whether wireid is invalid.
Definition at line 296 of file PlaneGeo.h.
Returns the wire in wireid from this plane.
wireid | full wire ID |
The cryostat, TPC and plane numbers in wireid are ignored, as it is ignored whether wireid is invalid.
Definition at line 319 of file PlaneGeo.h.
|
inline |
Returns the direction of increasing wires.
Vector | the type of vector to return (current default: TVector3 ) |
The versor is orthogonal to the wires (assumed parallel), lies on the plane and its direction goes toward increasing wire IDs.
Definition at line 408 of file PlaneGeo.h.
Referenced by geo::details::ActiveAreaCalculator::adjustCorners(), shouldFlipWire(), UpdatePhiZ(), and WireIDincreasesWithZ().
|
private |
Returns a direction normal to the plane (pointing is not defined).
Definition at line 873 of file PlaneGeo.cxx.
References geo::WireGeo::Direction(), e, geo::WireGeo::GetCenter(), Nwires(), geo::vect::rounded01(), and Wire().
Referenced by UpdatePlaneNormal().
|
inline |
Returns the direction normal to the plane.
Vector | the type of vector to return (current default: TVector3 ) |
The versor is orthogonal to the plane. The direction is defined so that the semi-space pointed to contains the TPC center.
Definition at line 397 of file PlaneGeo.h.
Referenced by shouldFlipWire(), and UpdateWidthDepthDir().
|
inline |
Returns the direction of the wires.
Vector | the type of vector to return (current default: TVector3 ) |
All wires in the plane are assumed parallel.
Definition at line 452 of file PlaneGeo.h.
|
inline |
Returns whether a wire with index iwire is present in this plane.
iwire | index of wire in this plane |
Definition at line 261 of file PlaneGeo.h.
|
inline |
Returns whether the wire in wireid is present in this plane.
wireid | full wire ID |
The cryostat, TPC and plane numbers in wireid are ignored, as it is ignored whether wireid is invalid.
Definition at line 275 of file PlaneGeo.h.
|
inline |
Returns whether a wire with index iwire is present in this plane.
iwire | index of wire in this plane |
Definition at line 260 of file PlaneGeo.h.
Referenced by geo::GeometryCore::HasWire().
|
inline |
Returns whether the wire in wireid is present in this plane.
wireid | full wire ID |
The cryostat, TPC and plane numbers in wireid are ignored, as it is ignored whether wireid is invalid.
Definition at line 273 of file PlaneGeo.h.
References geo::WireID::Wire.
|
inline |
Returns the identifier of this plane.
Definition at line 190 of file PlaneGeo.h.
Referenced by NearestWire(), NearestWireID(), geo::GeometryCore::Print(), and geo::TPCGeo::ReferencePlaneID().
bool geo::PlaneGeo::isProjectionOnPlane | ( | geo::Point_t const & | point | ) | const |
Returns if the projection of specified point is within the plane.
point | world coordinate of the point to test [cm] |
The method extracts the projection of the specified point on the plane, as in PointWidthDepthProjection()
, and then verifies that the projection falls within the wire plane area, as defined by the dimensions from the geometry description.
Definition at line 605 of file PlaneGeo.cxx.
References DeltaFromPlane(), MoveProjectionToPlane(), and PointWidthDepthProjection().
|
inline |
Returns if the projection of specified point is within the plane.
point | world coordinate of the point to test [cm] |
The method extracts the projection of the specified point on the plane, as in PointWidthDepthProjection()
, and then verifies that the projection falls within the wire plane area, as defined by the dimensions from the geometry description.
Definition at line 937 of file PlaneGeo.h.
References geo::vect::toPoint().
|
inline |
Allows range-for iteration on all wires in this plane.
This example uses geometry to iterate on all planes in an outer loop, and then iterates on all wires in the plane in the inner loop:
(note that all data types here can be replaced with auto
).
Definition at line 357 of file PlaneGeo.h.
|
inline |
Return the last wire in the plane.
Definition at line 331 of file PlaneGeo.h.
Referenced by Coverage(), and geo::details::ActiveAreaCalculator::initializeWireEnds().
|
inline |
Transform point from local plane frame to world frame.
Definition at line 1124 of file PlaneGeo.h.
Referenced by hit::GausHitFinderAna::analyze(), evd::RecoBaseDrawer::DrawTrack2D(), evd::TWQMultiTPCProjectionView::FindEndPoint(), evd::TWQProjectionView::FindEndPoint(), evd::TWQMultiTPCProjectionView::FindLineLength(), evd::TWQProjectionView::FindLineLength(), util::GeometryUtilities::Get2DPointProjection(), util::GeometryUtilities::GetProjectedPoint(), util::GeometryUtilities::GetTimeTicks(), util::GeometryUtilities::GetXYZ(), cluster::ClusterCheater::produce(), shwf::ShowerReco::produce(), detsim::SimWire::SetFieldResponse(), detsim::SimWireT962::SetFieldResponse(), and geo::sortPlaneStandard().
|
inline |
Transform point from local plane frame to world frame.
Definition at line 1128 of file PlaneGeo.h.
|
inline |
Transform direction vector from local to world.
Definition at line 1136 of file PlaneGeo.h.
|
inline |
Transform direction vector from local to world.
Definition at line 1140 of file PlaneGeo.h.
|
private |
|
inline |
Return the middle wire in the plane.
Definition at line 328 of file PlaneGeo.h.
geo::Point_t geo::PlaneGeo::MovePointOverPlane | ( | geo::Point_t const & | point | ) | const |
Returns the point, moved so that its projection is over the plane.
point | point to be checked and moved |
If the projection of the point on the plane falls outside it, the returned point is translated so that its projection is now on the border of the plane. The translation happens along the directions of the plane frame, as described in MoveProjectionToPlane().
Definition at line 657 of file PlaneGeo.cxx.
References DeltaFromPlane(), and PointWidthDepthProjection().
TVector3 geo::PlaneGeo::MovePointOverPlane | ( | TVector3 const & | point | ) | const |
Returns the point, moved so that its projection is over the plane.
point | point to be checked and moved |
If the projection of the point on the plane falls outside it, the returned point is translated so that its projection is now on the border of the plane. The translation happens along the directions of the plane frame, as described in MoveProjectionToPlane().
Definition at line 643 of file PlaneGeo.cxx.
References DeltaFromPlane(), DepthDir(), PointWidthDepthProjection(), and WidthDir().
PlaneGeo::WidthDepthProjection_t geo::PlaneGeo::MoveProjectionToPlane | ( | WidthDepthProjection_t const & | proj | ) | const |
Returns the projection, moved onto the plane if necessary.
proj | projection to be checked and moved |
The projection proj is defined as in the output of PointWidthDepthProjection()
. The method caps width and depth of the projection so that it stays on the plane. A new capped value is returned. Since the reference point of the frame is defined as the center of the plane, this action is equivalent to force the width component in range and the depth component into , with and the width and depth of the wire plane.
Definition at line 617 of file PlaneGeo.cxx.
References DeltaFromPlane(), fFrameSize, geo::PlaneGeo::RectSpecs::HalfDepth(), and geo::PlaneGeo::RectSpecs::HalfWidth().
Referenced by isProjectionOnPlane().
geo::WireGeo const & geo::PlaneGeo::NearestWire | ( | geo::Point_t const & | pos | ) | const |
Returns the wire closest to the specified position.
pos | world coordinates of the point [cm] |
InvalidWireError | (category: "Geometry" ) if out of range |
The position is projected on the wire plane, and the nearest wire to the projected point is returned.
If the wire is father than half a wire pitch from the point, an exception is thrown that contains both the wire that would be the closest one (badWireID()
), and also the wire that is actually the closest one (betterWireID()
). When this happens, the specified position was outside the wire plane.
Note that the caller should check for containment: this function may or may not report the position being outside the plane, depending on where it is. In the current implementation, the wires are considered infinitely long, and if the position projection is closer than half the wire pitch from any of these extrapolated wires, the method will not report error.
Definition at line 705 of file PlaneGeo.cxx.
References ClosestWireID(), ID(), NearestWireID(), Wire(), and geo::WireID::Wire.
geo::WireID geo::PlaneGeo::NearestWireID | ( | geo::Point_t const & | pos | ) | const |
Returns the ID of wire closest to the specified position.
pos | world coordinates of the point [cm] |
InvalidWireError | (category: "Geometry" ) if out of range |
The position is projected on the wire plane, and the ID of the nearest wire to the projected point is returned.
If the wire does not exist, an exception is thrown that contains both the wire that would be the closest one (badWireID()
), and also the wire that is actually the closest one (betterWireID()
). When this happens, the specified position was outside the wire plane.
Note that the caller should check for containment: this function may or may not report the position being outside the plane, depending on where it is. In the current implementation, the wires are considered infinitely long, and if the position projection is closer than half the wire pitch from any of these extrapolated wires, the method will not report error.
pos
. Definition at line 673 of file PlaneGeo.cxx.
References ID(), Nwires(), and WireCoordinate().
Referenced by NearestWire(), and geo::GeometryCore::NearestWireID().
|
inline |
Return the wire pitch (in centimeters). It is assumed constant.
Definition at line 481 of file PlaneGeo.h.
References geo::vect::toPoint().
|
inline |
Number of wires in this plane.
Definition at line 251 of file PlaneGeo.h.
Referenced by geo::GeometryCore::Nwires().
|
inline |
Number of wires in this plane.
Definition at line 250 of file PlaneGeo.h.
Referenced by hit::DisambigCheater::DisambigCheater(), cluster::EndPointAlg::EndPoint(), cluster::HoughBaseAlg::FastTransform(), GetNormalAxis(), geo::ChannelMapStandardAlg::Initialize(), NearestWireID(), geo::GeometryCore::Print(), vertex::HarrisVertexFinder::produce(), evd::RecoBaseDrawer::RecoBaseDrawer(), cluster::HoughBaseAlg::Transform(), and UpdateIncreasingWireDir().
|
inline |
What is the orientation of the plane.
Definition at line 174 of file PlaneGeo.h.
Referenced by trkf::SpacePointAlg::update().
|
static |
Returns the name of the specified orientation.
Definition at line 780 of file PlaneGeo.cxx.
References geo::kHorizontal, and geo::kVertical.
|
inline |
Angle from positive z axis of the wire coordinate axis, in radians.
Definition at line 180 of file PlaneGeo.h.
Referenced by geo::GeometryCore::ThirdPlane_dTdW(), and geo::GeometryCore::ThirdPlaneSlope().
|
inline |
Returns the coordinate of the point on the plane.
point | world coordinate of the point to get the coordinate of [cm] |
The method returns the coordinate of the point in the direction measured by the wires on this plane starting on the first wire, in world units (that is, centimeters). A point on the first wire will have coordinate 0.0, one on the next wire will have coordinate equal to a single wire pitch, etc.
The point does not need to be on the plane, and the projection of the point to the plane is considered.
Definition at line 704 of file PlaneGeo.h.
Referenced by pma::GetProjectionToPlane(), and pma::Node3D::UpdateProj2D().
|
inline |
Returns the coordinate of the point on the plane.
point | world coordinate of the point to get the coordinate of [cm] |
The method returns the coordinate of the point in the direction measured by the wires on this plane starting on the first wire, in world units (that is, centimeters). A point on the first wire will have coordinate 0.0, one on the next wire will have coordinate equal to a single wire pitch, etc.
The point does not need to be on the plane, and the projection of the point to the plane is considered.
Definition at line 706 of file PlaneGeo.h.
References geo::vect::toPoint().
|
inline |
Returns the coordinate of point on the plane respect to a wire.
point | world coordinate of the point to get the coordinate of [cm] |
refWire | reference wire |
The method returns the coordinate of the point in the direction measured by the wires on this plane starting from the specified reference wire, in world units (that is, centimeters).
The point does not need to be on the plane, and the projection of the point to the plane is considered. The reference wire, instead, must belong to this plane. This assumption is not checked, and if violated the results are undefined (in the current implementation, they are just wrong).
Definition at line 677 of file PlaneGeo.h.
References geo::WireGeo::GetCenter(), and geo::vect::toPoint().
|
inline |
Returns the coordinate of point on the plane respect to a wire.
point | world coordinate of the point to get the coordinate of [cm] |
refWire | reference wire |
The method returns the coordinate of the point in the direction measured by the wires on this plane starting from the specified reference wire, in world units (that is, centimeters).
The point does not need to be on the plane, and the projection of the point to the plane is considered. The reference wire, instead, must belong to this plane. This assumption is not checked, and if violated the results are undefined (in the current implementation, they are just wrong).
Definition at line 683 of file PlaneGeo.h.
References geo::vect::toPoint().
|
inline |
Returns the projection of the specified point on the plane.
point | the 3D point to be projected, in world coordinates |
The returned vector is a 2D vector expressing the projection of the point (from world coordinates) on the wire plane. The vector is expressed as . The component is measured on the direction of the first wire (see WireGeo::Direction()
), using its center (see WireGeo::GetCenter()
) as reference point. The component is defined on the wire coordinate direction (see GetIncreasingWireDirection()
), relative to the first wire, as it is returned by PlaneCoordinate().
The reference point is also returned by ProjectionReferencePoint().
Definition at line 781 of file PlaneGeo.h.
|
inline |
Returns the projection of the specified point on the plane.
point | the 3D point to be projected, in world coordinates |
The returned vector is a 2D vector expressing the projection of the point (from world coordinates) on the wire plane. The vector is expressed as . The component is measured on the direction of the first wire (see WireGeo::Direction()
), using its center (see WireGeo::GetCenter()
) as reference point. The component is defined on the wire coordinate direction (see GetIncreasingWireDirection()
), relative to the first wire, as it is returned by PlaneCoordinate().
The reference point is also returned by ProjectionReferencePoint().
Definition at line 783 of file PlaneGeo.h.
References geo::vect::toPoint().
|
inline |
Returns the projection of the specified point on the plane.
point | the 3D point to be projected, in world coordinates |
The returned vector is a 2D vector expressing the projection of the point (from world coordinates) on the wire plane. The vector is expressed as , components following the width direction (WidthDir()
) and the depth direction (DepthDir()
) respectively. The origin point is the center of the plane.
Definition at line 897 of file PlaneGeo.h.
Referenced by geo::details::ActiveAreaCalculator::initializeWireEnds(), isProjectionOnPlane(), MovePointOverPlane(), geo::TPCGeo::Projection(), and larg4::LArVoxelReadout::RecoverOffPlaneDeposit().
|
inline |
Returns the projection of the specified point on the plane.
point | the 3D point to be projected, in world coordinates |
The returned vector is a 2D vector expressing the projection of the point (from world coordinates) on the wire plane. The vector is expressed as , components following the width direction (WidthDir()
) and the depth direction (DepthDir()
) respectively. The origin point is the center of the plane.
Definition at line 900 of file PlaneGeo.h.
References geo::vect::toPoint().
void geo::PlaneGeo::PrintPlaneInfo | ( | Stream && | out, |
std::string | indent = "" , |
||
unsigned int | verbosity = 1 |
||
) | const |
Prints information about this plane.
Stream | type of output stream to use |
out | stream to send the information to |
indent | prepend each line with this string |
verbosity | amount of information printed |
Information on single wires is not printed. Note that the first line out the output is not indented.
Definition at line 1324 of file PlaneGeo.h.
Referenced by geo::GeometryCore::Print().
|
inline |
Returns the projection of the specified point on the plane.
point | the 3D point to be projected, in world coordinates |
The returned vector is a 2D vector expressing the projection of the point (from world coordinates) on the wire plane. The vector is expressed as . The component is measured on the direction of the first wire (see WireGeo::Direction()
), using its center (see WireGeo::GetCenter()
) as reference point. The component is defined on the wire coordinate direction (see GetIncreasingWireDirection()
), relative to the first wire, as it is returned by PlaneCoordinate().
The reference point is also returned by ProjectionReferencePoint().
Definition at line 779 of file PlaneGeo.h.
|
inline |
Returns the projection of the specified vector on the plane.
v | the 3D vector to be projected, in world units |
The returned vector is a 2D vector expressing the projection of the vector (from world units) on the wire plane. The vector is expressed as . The component is measured on the direction of the first wire (see WireGeo::Direction()
). The component is defined on the wire coordinate direction (see GetIncreasingWireDirection()
).
Definition at line 800 of file PlaneGeo.h.
|
inline |
Returns the reference point used by PointProjection()
.
Point | the type of point to return (current default: TVector3 ) |
The returned point is such that its decomposition results in a null projection and a 0 distance from the plane.
Definition at line 759 of file PlaneGeo.h.
|
inline |
Set the signal view (for TPCGeo).
Definition at line 1179 of file PlaneGeo.h.
Referenced by UpdateView().
|
private |
Whether the specified wire should have start and end swapped.
Definition at line 1205 of file PlaneGeo.cxx.
References geo::WireGeo::Direction(), GetIncreasingWireDirection(), and GetNormalDirection().
Referenced by UpdateAfterSorting().
|
inline |
void geo::PlaneGeo::SortWires | ( | geo::GeoObjectSorter const & | sorter | ) |
Apply sorting to WireGeo objects.
Definition at line 550 of file PlaneGeo.cxx.
References fWire, util::SortByPointers(), and geo::GeoObjectSorter::SortWires().
double geo::PlaneGeo::ThetaZ | ( | ) | const |
Angle of the wires from positive z axis; .
Definition at line 728 of file PlaneGeo.cxx.
References FirstWire(), geo::WireGeo::ThetaZ(), and UpdateAfterSorting().
Referenced by tca::FilldEdx(), calo::Calorimetry::GetPitch(), and geo::GeometryCore::WireAngleToVertical().
|
inline |
Transform point from world frame to local plane frame.
Definition at line 1156 of file PlaneGeo.h.
|
inline |
Transform direction vector from world to local.
Definition at line 1168 of file PlaneGeo.h.
|
inline |
Transform point from local plane frame to world frame.
Definition at line 1132 of file PlaneGeo.h.
Referenced by BoundingBox(), and DetectGeometryDirections().
|
inline |
Transform direction vector from local to world.
Definition at line 1144 of file PlaneGeo.h.
|
private |
Updates the internally used active area.
Definition at line 1162 of file PlaneGeo.cxx.
References fActiveArea.
Referenced by UpdateAfterSorting().
void geo::PlaneGeo::UpdateAfterSorting | ( | geo::PlaneID | planeid, |
geo::BoxBoundedGeo const & | TPCbox | ||
) |
Performs all needed updates after the TPC has sorted the planes.
Definition at line 733 of file PlaneGeo.cxx.
References fID, fWire, shouldFlipWire(), UpdateActiveArea(), UpdateDecompWireOrigin(), UpdateIncreasingWireDir(), UpdateOrientation(), UpdatePhiZ(), UpdatePlaneNormal(), UpdateView(), UpdateWidthDepthDir(), UpdateWireDir(), UpdateWirePitch(), and UpdateWirePlaneCenter().
Referenced by ThetaZ().
|
private |
Updates the position of the wire coordinate decomposition.
Definition at line 1152 of file PlaneGeo.cxx.
References fDecompWire, FirstWire(), GetCenter(), geo::Decomposer< Vector, Point, ProjVector >::SetOrigin(), and geo::vect::toPoint().
Referenced by UpdateAfterSorting().
|
private |
Updates the cached direction to increasing wires.
Definition at line 1082 of file PlaneGeo.cxx.
References e, fDecompWire, GetCenter(), Nwires(), geo::vect::rounded01(), geo::Decomposer< Vector, Point, ProjVector >::SetSecondaryDir(), geo::vect::toVector(), and Wire().
Referenced by UpdateAfterSorting().
|
private |
Updates plane orientation.
Definition at line 893 of file PlaneGeo.cxx.
References e, fOrientation, fWire, geo::kHorizontal, and geo::kVertical.
Referenced by UpdateAfterSorting().
|
private |
Updates the stored .
Definition at line 930 of file PlaneGeo.cxx.
References fCosPhiZ, fSinPhiZ, and GetIncreasingWireDirection().
Referenced by UpdateAfterSorting().
|
private |
Updates the cached normal to plane versor; needs the TPC box coordinates.
Definition at line 1041 of file PlaneGeo.cxx.
References geo::BoxBoundedGeo::Center(), e, fNormal, GetBoxCenter(), GetNormalAxis(), and geo::vect::round01().
Referenced by UpdateAfterSorting().
|
private |
Updates the stored view.
Definition at line 945 of file PlaneGeo.cxx.
References geo::vect::dot(), e, geo::kU, geo::kV, geo::kX, geo::kY, geo::kZ, geo::vect::mixedProduct(), SetView(), geo::Xaxis(), geo::Yaxis(), and geo::Zaxis().
Referenced by UpdateAfterSorting().
|
private |
Updates the cached depth and width direction.
Definition at line 1062 of file PlaneGeo.cxx.
References DepthDir(), e, fDecompFrame, GetNormalDirection(), geo::vect::rounded01(), geo::Decomposer< Vector, Point, ProjVector >::SecondaryDir(), geo::Decomposer< Vector, Point, ProjVector >::SetSecondaryDir(), and WidthDir().
Referenced by UpdateAfterSorting().
|
private |
Updates the cached direction to wire.
Definition at line 1116 of file PlaneGeo.cxx.
References e, fDecompWire, FirstWire(), lar::util::makeVector3DComparison(), geo::Decomposer< Vector, Point, ProjVector >::NormalDir(), geo::vect::rounded01(), geo::Decomposer< Vector, Point, ProjVector >::SetMainDir(), and geo::vect::toVector().
Referenced by UpdateAfterSorting().
|
private |
Updates the stored wire pitch.
Definition at line 925 of file PlaneGeo.cxx.
References fWirePitch, Wire(), and geo::WireGeo::WirePitch().
Referenced by UpdateAfterSorting().
|
private |
Updates the stored wire pitch with a slower, more robust algorithm.
Definition at line 1130 of file PlaneGeo.cxx.
References e, fWire, fWirePitch, and geo::WireGeo::WirePitch().
Referenced by PlaneGeo().
|
private |
Updates the stored wire plane center.
Definition at line 1178 of file PlaneGeo.cxx.
References DistanceFromPlane(), DriftPoint(), fCenter, fDecompFrame, and geo::Decomposer< Vector, Point, ProjVector >::SetOrigin().
Referenced by UpdateAfterSorting().
|
inline |
Returns the projection of the specified vector on the plane.
v | the 3D vector to be projected, in world units |
The returned vector is a 2D vector expressing the projection of the vector (from world units) on the wire plane. The vector is expressed as . The component is measured on the direction of the first wire (see WireGeo::Direction()
). The component is defined on the wire coordinate direction (see GetIncreasingWireDirection()
).
Definition at line 802 of file PlaneGeo.h.
|
inline |
Returns the projection of the specified vector on the plane.
v | the 3D vector to be projected, in world units |
The returned vector is a 2D vector expressing the projection of the vector (from world units) on the wire plane. The vector is expressed as . The component is measured on the direction of the first wire (see WireGeo::Direction()
). The component is defined on the wire coordinate direction (see GetIncreasingWireDirection()
).
Definition at line 804 of file PlaneGeo.h.
References geo::vect::toVector().
|
inline |
Returns the projection of the specified vector on the plane.
v | the 3D vector to be projected, in world units |
The returned vector is a 2D vector expressing the projection of the vector (from world units) on the wire plane. The vector is expressed as , components following the width direction (WidthDir()
) and the depth direction (DepthDir()
) respectively.
Definition at line 917 of file PlaneGeo.h.
Referenced by geo::details::ActiveAreaCalculator::adjustCorners(), and geo::TPCGeo::Projection().
|
inline |
Returns the projection of the specified vector on the plane.
v | the 3D vector to be projected, in world units |
The returned vector is a 2D vector expressing the projection of the vector (from world units) on the wire plane. The vector is expressed as , components following the width direction (WidthDir()
) and the depth direction (DepthDir()
) respectively.
Definition at line 920 of file PlaneGeo.h.
References geo::vect::toVector().
|
inline |
Which coordinate does this plane measure.
Definition at line 171 of file PlaneGeo.h.
Referenced by cluster::ClusterAna::analyze(), pfpf::PFPAna::analyze(), cluster::DBclusterAna::analyze(), cluster::ClusterMergeHelper::AppendResult(), util::GeometryUtilities::CalculatePitch(), util::GeometryUtilities::CalculatePitchPolar(), util::DetectorPropertiesServiceArgoNeuT::CalculateXTicksParams(), detinfo::DetectorPropertiesStandard::CalculateXTicksParams(), evd::RecoBaseDrawer::Cluster2D(), hit::DisambigCheater::DisambigCheater(), evd::RecoBaseDrawer::DrawTrackVertexAssns2D(), evd::RecoBaseDrawer::EndPoint2D(), evd::RecoBaseDrawer::Event2D(), filter::MuonFilter::filter(), util::GeometryUtilities::Get2DangleFrom3D(), corner::CornerFinderAlg::get_feature_points_fast(), trkf::BezierTrack::GetTrackPitch(), lar_pandora::LArPandoraGeometry::LoadGeometry(), shower::EMShowerAlg::MakeShower(), util::GeometryUtilities::PitchInView(), cluster::SimpleClusterMerger::produce(), cluster::FuzzyClusterMerger::produce(), cluster::SmallClusterFinder::produce(), calo::Calorimetry::produce(), evd::GraphCluster::produce(), evd::RecoBaseDrawer::Prong2D(), trkf::SpacePointAlg::update(), geo::GeometryCore::View(), geo::TPCGeo::Views(), and geo::GeometryCore::WireAngleToVertical().
|
static |
Returns the name of the specified view.
Definition at line 765 of file PlaneGeo.cxx.
References geo::k3D, geo::kU, geo::kUnknown, geo::kV, geo::kX, geo::kY, geo::kZ, and util::flags::to_string().
Referenced by trkf::SeedFinderAlgorithm::GetCenterAndDirection(), and geo::GeometryCore::WireAngleToVertical().
|
inline |
Return the width of the plane.
The precise definition is arbitrary (see WidthDir()
).
Definition at line 227 of file PlaneGeo.h.
|
inline |
Return the direction of plane width.
Vector | the type of vector to return (current default: TVector3 ) |
The precise definition of the sides is arbitrary, but they are defined to lie on the wire plane and so that WidthDir(), DepthDir() and GetNormalDirection() make a orthonormal base. That base (width, depth, normal) is guaranteed to be positive defined.
Definition at line 207 of file PlaneGeo.h.
Referenced by MovePointOverPlane(), geo::TPCGeo::RefWidthDir(), and UpdateWidthDepthDir().
geo::WireGeo const & geo::PlaneGeo::Wire | ( | unsigned int | iwire | ) | const |
Return the iwire'th wire in the plane.
cet::exception | (category "WireOutOfRange") if no such wire |
Definition at line 506 of file PlaneGeo.cxx.
References WirePtr().
Referenced by hit::MagDriftAna::analyze(), lar_pandora::LArPandoraInput::CreatePandoraHits2D(), lar_pandora::LArPandoraInput::CreatePandoraReadoutGaps(), hit::DisambigCheater::DisambigCheater(), trkf::Track3DKalmanSPS::dQdxCalc(), evd::RecoBaseDrawer::DrawTrack2D(), GetNormalAxis(), lar_pandora::PFParticleHitDumper::GetUVW(), geo::ChannelMapStandardAlg::Initialize(), trkf::SpacePointAlg::makeSpacePoints(), NearestWire(), geo::GeometryCore::Print(), trkf::SpacePts::produce(), trkf::Track3Dreco::produce(), vertex::VertexFinder2D::produce(), util::GeometryUtilities::Reconfigure(), trkf::SpacePointAlg::update(), UpdateIncreasingWireDir(), and UpdateWirePitch().
Returns the wire in wireid from this plane.
wireid | full wire ID |
cet::exception | (category "WireOutOfRange") if no such wire |
The cryostat, TPC and plane numbers in wireid are ignored, as it is ignored whether wireid is invalid.
Definition at line 294 of file PlaneGeo.h.
References geo::WireID::Wire.
|
inline |
Returns the coordinate of the point on the plane, in wire units.
point | world coordinate of the point to get the coordinate of |
The method returns the coordinate of the point in the direction measured by the wires on this plane starting on the first wire, in wire units (that is, wire pitches). A point on the first wire will have coordinate 0.0, one on the next wire will have coordinate 1.0, etc.
The point does not need to be on the plane, and the projection of the point to the plane is considered.
Definition at line 725 of file PlaneGeo.h.
Referenced by lar_cluster3d::StandardHit3DBuilder::NearestWireID(), NearestWireID(), and geo::GeometryCore::WireCoordinate().
bool geo::PlaneGeo::WireIDincreasesWithZ | ( | ) | const |
Returns whether the higher z wires have higher wire ID.
This method is related to GetIncreasingWireDirection() (it might be expressed as "GetIncreasingWireDirection()[2] > 0"), but it is implemented in a faster and independent way.
Definition at line 560 of file PlaneGeo.cxx.
References GetIncreasingWireDirection().
|
inline |
Return the wire pitch (in centimeters). It is assumed constant.
Definition at line 367 of file PlaneGeo.h.
Referenced by geo::details::ActiveAreaCalculator::adjustCorners(), pma::CmToWireDrift(), pma::ProjectionMatchingAlg::GetCloseHits(), geo::GeometryCore::ThirdPlane_dTdW(), pma::ProjectionMatchingAlg::validate(), pma::ProjectionMatchingAlg::validate_on_adc_test(), pma::WireDriftToCm(), geo::TPCGeo::WirePitch(), and geo::GeometryCore::WirePitch().
|
inline |
Returns the wire number iwire from this plane.
iwire | the number of local wire |
Definition at line 305 of file PlaneGeo.h.
Referenced by Wire(), and geo::GeometryCore::WirePtr().
Returns the wire in wireid from this plane.
wireid | full wire ID |
The cryostat, TPC and plane numbers in wireid are ignored, as it is ignored whether wireid is invalid.
Definition at line 317 of file PlaneGeo.h.
References geo::WireID::Wire.
|
inline |
Transform point from world frame to local plane frame.
Definition at line 1148 of file PlaneGeo.h.
|
inline |
Transform point from world frame to local plane frame.
Definition at line 1152 of file PlaneGeo.h.
|
inline |
Transform direction vector from world to local.
Definition at line 1160 of file PlaneGeo.h.
|
inline |
Transform direction vector from world to local.
Definition at line 1164 of file PlaneGeo.h.
|
friend |
Definition at line 1289 of file PlaneGeo.h.
|
private |
Area covered by wires in frame base.
Definition at line 1283 of file PlaneGeo.h.
Referenced by DeltaFromActivePlane(), and UpdateActiveArea().
|
private |
Center of the plane, lying on the wire plane.
Definition at line 1285 of file PlaneGeo.h.
Referenced by UpdateWirePlaneCenter().
|
private |
|
private |
Decomposition on frame coordinates; the main direction is a "width", the secondary one is just orthogonal to it ("depth"). Normal can differ in sign from the plane one.
Definition at line 1280 of file PlaneGeo.h.
Referenced by DetectGeometryDirections(), UpdateWidthDepthDir(), and UpdateWirePlaneCenter().
|
private |
Decomposition on wire coordinates; the main direction is along the wire, the secondary one is the one measured by the wire, the normal matches the plane's normal.
Definition at line 1276 of file PlaneGeo.h.
Referenced by UpdateDecompWireOrigin(), UpdateIncreasingWireDir(), and UpdateWireDir().
|
private |
Size of the frame of the plane.
Definition at line 1281 of file PlaneGeo.h.
Referenced by DeltaFromPlane(), DetectGeometryDirections(), and MoveProjectionToPlane().
|
private |
|
private |
Normal to the plane, inward in TPC.
Definition at line 1272 of file PlaneGeo.h.
Referenced by UpdatePlaneNormal().
|
private |
Is the plane vertical or horizontal?
Definition at line 1266 of file PlaneGeo.h.
Referenced by UpdateOrientation().
|
private |
|
private |
Plane to world transform.
Definition at line 1263 of file PlaneGeo.h.
|
private |
Does this plane measure U, V, or W?
Definition at line 1265 of file PlaneGeo.h.
|
private |
Plane volume description.
Definition at line 1264 of file PlaneGeo.h.
Referenced by BoundingBox(), DetectGeometryDirections(), and PlaneGeo().
|
private |
List of wires in this plane.
Definition at line 1267 of file PlaneGeo.h.
Referenced by MakeWire(), SortWires(), UpdateAfterSorting(), UpdateOrientation(), and UpdateWirePitchSlow().
|
private |
Pitch of wires in this plane.
Definition at line 1268 of file PlaneGeo.h.
Referenced by UpdateWirePitch(), and UpdateWirePitchSlow().
|
static |
Maximum value for print verbosity.
Definition at line 645 of file PlaneGeo.h.
Referenced by geo::GeometryCore::Print().