Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
geo::TPCGeo Class Reference

Geometry information for a single TPC. More...

#include <TPCGeo.h>

Inheritance diagram for geo::TPCGeo:
geo::BoxBoundedGeo

Classes

struct  TPCGeoCoordinatesTag
 Tag for vectors in the "local" GDML coordinate frame of the TPC. More...
 

Public Types

using PlaneCollection_t = std::vector< geo::PlaneGeo >
 
using GeoNodePath_t = geo::WireGeo::GeoNodePath_t
 
using ElementIteratorBox = PlaneCollection_t const &
 Type returned by IterateElements(). More...
 
using Projection_t = geo::PlaneGeo::WidthDepthProjection_t
 Type of 2D vector projection on a plane. More...
 
using DecomposedVector_t = geo::PlaneGeo::WDDecomposedVector_t
 Data structure with plane and drift projections of a 3D vector. More...
 
Types for geometry-local reference vectors.

These types represents points and displacement vectors in the reference frame defined in the TPC geometry box from the GDML geometry description.

No alias is explicitly defined for the LArSoft global vector types, geo::Point_t and geo::Vector_t.

Remember the LocalPoint_t and LocalVector_t vectors from different instances of geo::TPCGeo have the same type but are not compatible.

using LocalPoint_t = geo::Point3DBase_t< TPCGeoCoordinatesTag >
 Type of points in the local GDML TPC frame. More...
 
using LocalVector_t = geo::Vector3DBase_t< TPCGeoCoordinatesTag >
 Type of displacement vectors in the local GDML TPC frame. More...
 
- Public Types inherited from geo::BoxBoundedGeo
using Coords_t = geo::Point_t
 Type of the coordinate triplet. More...
 
using Coord_t = Coords_t::Scalar
 Type of the coordinate. More...
 

Public Member Functions

 TPCGeo (TGeoNode const &node, geo::TransformationMatrix &&trans, PlaneCollection_t &&planes)
 
PlaneGeo const & Plane (geo::View_t view) const
 Return the plane in the tpc with View_t view. More...
 
PlaneGeo const & Plane (unsigned int iplane) const
 
PlaneGeo const * PlanePtr (unsigned int iplane) const
 Returns the plane number iplane from this TPC. More...
 
geo::PlaneGeo const & SmallestPlane () const
 Returns the wire plane with the smallest surface. More...
 
geo::PlaneGeo const & FirstPlane () const
 Returns the first wire plane (the closest to TPC center). More...
 
geo::PlaneGeo const & LastPlane () const
 Returns the last wire plane (the farther from TPC center). More...
 
unsigned int MaxWires () const
 Returns the largest number of wires among the planes in this TPC. More...
 
std::set< geo::View_tViews () const
 Returns a set of all views covered in this TPC. More...
 
short int DetectDriftDirection () const
 Returns the expected drift direction based on geometry. More...
 
void SortSubVolumes (geo::GeoObjectSorter const &sorter)
 Apply sorting to the PlaneGeo objects. More...
 
void UpdateAfterSorting (geo::TPCID tpcid)
 Performs all updates after cryostat has sorted TPCs. More...
 
template<typename Stream >
void PrintTPCInfo (Stream &&out, std::string indent="", unsigned int verbosity=1) const
 Prints information about this TPC. More...
 
std::string TPCInfo (std::string indent="", unsigned int verbosity=1) const
 Returns a string with information about this TPC. More...
 
TPC properties
double ActiveHalfWidth () const
 Half width (associated with x coordinate) of active TPC volume [cm]. More...
 
double ActiveWidth () const
 Width (associated with x coordinate) of active TPC volume [cm]. More...
 
double ActiveHalfHeight () const
 Half height (associated with y coordinate) of active TPC volume [cm]. More...
 
double ActiveHeight () const
 Height (associated with y coordinate) of active TPC volume [cm]. More...
 
double ActiveLength () const
 Length (associated with z coordinate) of active TPC volume [cm]. More...
 
double ActiveHalfLength () const
 Length (associated with z coordinate) of active TPC volume [cm]. More...
 
double HalfWidth () const
 Width is associated with x coordinate [cm]. More...
 
double Width () const
 Width is associated with x coordinate [cm]. More...
 
double HalfHeight () const
 Height is associated with y coordinate [cm]. More...
 
double Height () const
 Height is associated with y coordinate [cm]. More...
 
double Length () const
 Length is associated with z coordinate [cm]. More...
 
double HalfLength () const
 Length is associated with z coordinate [cm]. More...
 
double ActiveMass () const
 
const TGeoVolume * ActiveVolume () const
 
const TGeoVolume * TotalVolume () const
 
template<typename Vector >
decltype(auto) WidthDir () const
 Returns the direction Width() is measured on. More...
 
decltype(auto) WidthDir () const
 Returns the direction Width() is measured on. More...
 
template<typename Vector >
decltype(auto) HeightDir () const
 Returns the direction Height() is measured on. More...
 
decltype(auto) HeightDir () const
 Returns the direction Height() is measured on. More...
 
template<typename Vector >
decltype(auto) LengthDir () const
 Returns the direction Length() is measured on. More...
 
decltype(auto) LengthDir () const
 Returns the direction Length() is measured on. More...
 
DriftDirection_t DriftDirection () const
 Returns an enumerator value describing the drift direction. More...
 
template<typename Vector >
Vector DriftDir () const
 Returns the direction of the drift (vector pointing toward the planes). More...
 
DefaultVector_t DriftDir () const
 Returns the direction of the drift (vector pointing toward the planes). More...
 
double DriftDistance () const
 
Plane access
unsigned int Nplanes () const
 Number of planes in this tpc. More...
 
unsigned int NElements () const
 
bool HasPlane (unsigned int iplane) const
 Returns whether a plane with index iplane is present in this TPC. More...
 
bool HasElement (unsigned int iplane) const
 
bool HasPlane (geo::PlaneID const &planeid) const
 Returns whether the plane in planeid is present in this TPC. More...
 
bool HasElement (geo::PlaneID const &planeid) const
 
const PlaneGeoPlane (PlaneID const &planeid) const
 Returns the plane in planeid from this TPC. More...
 
const PlaneGeoGetElement (PlaneID const &planeid) const
 
PlaneGeo const * PlanePtr (PlaneID const &planeid) const
 Returns the plane in planeid from this TPC. More...
 
PlaneGeo const * GetElementPtr (PlaneID const &planeid) const
 
ElementIteratorBox IterateElements () const
 Returns an object for iterating through all geo::PlaneGeo. More...
 
ElementIteratorBox IteratePlanes () const
 
TPC geometry properties
template<typename Point >
Point GetCenter () const
 Returns the center of the TPC volume in world coordinates [cm]. More...
 
DefaultPoint_t GetCenter () const
 Returns the center of the TPC volume in world coordinates [cm]. More...
 
template<typename Point >
Point GetActiveVolumeCenter () const
 Returns the center of the TPC active volume in world coordinates [cm]. More...
 
DefaultPoint_t GetActiveVolumeCenter () const
 Returns the center of the TPC active volume in world coordinates [cm]. More...
 
template<typename Point >
Point GetCathodeCenter () const
 
DefaultPoint_t GetCathodeCenter () const
 
template<typename Point >
Point GetFrontFaceCenter () const
 Returns the center of the active TPC volume side facing negative z. More...
 
geo::Point_t GetFrontFaceCenter () const
 Returns the center of the active TPC volume side facing negative z. More...
 
geo::BoxBoundedGeo const & BoundingBox () const
 Returns the bounding box of this TPC. More...
 
geo::BoxBoundedGeo const & ActiveBoundingBox () const
 Returns the box of the active volume of this TPC. More...
 
const double * PlaneLocation (unsigned int p) const
 
double Plane0Pitch (unsigned int p) const
 
double PlanePitch (unsigned int p1=0, unsigned int p2=1) const
 
double WirePitch (unsigned plane=0) const
 
geo::TPCID const & ID () const
 Returns the identifier of this TPC. More...
 
Projection on a wire plane

These methods deal with projection of points and vectors on a plane, using a geometric reference base which is not dependent on the wire direction. Technically, the objects are projected on the reference plane, that happens to be the first wire plane. In practice, the important bit is that all entities are consistently decomposed into a drift component and a remaining component. If which plane the projection happens on should matter, then geo::PlaneGeo can be used directly (but note that geo::PlaneGeo defines two different frames, and the names of the frame equivalent to the one used here are different).

geo::PlaneGeo const & ReferencePlane () const
 Returns the plane used for reference by projection methods. More...
 
geo::PlaneID const & ReferencePlaneID () const
 Returns the ID of the plane used for reference by projection methods. More...
 
template<typename Vector >
Vector RefWidthDir () const
 Return the direction of reference plane width. More...
 
DefaultPoint_t RefWidthDir () const
 
template<typename Vector >
Vector RefDepthDir () const
 Return the direction of reference plane depth. More...
 
DefaultPoint_t RefDepthDir () const
 
double DistanceFromReferencePlane (geo::Point_t const &point) const
 Returns the distance of the specified point from reference plane. More...
 
double DistanceFromReferencePlane (TVector3 const &point) const
 
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
 
DecomposedVector_t DecomposePoint (geo::Point_t const &point) const
 Decomposes a 3D point in two components. More...
 
DecomposedVector_t DecomposePoint (TVector3 const &point) const
 
template<typename Point >
Point ProjectionReferencePoint () const
 Returns the reference point used by PointProjection(). More...
 
DefaultPoint_t ProjectionReferencePoint () const
 
Projection_t Projection (geo::Point_t const &point) const
 Returns the projection of the specified point on the plane. More...
 
Projection_t PointProjection (geo::Point_t const &point) const
 
Projection_t PointProjection (TVector3 const &point) const
 
Projection_t Projection (geo::Vector_t const &v) const
 Returns the projection of the specified vector on the plane. More...
 
Projection_t VectorProjection (geo::Vector_t const &v) const
 
Projection_t VectorProjection (TVector3 const &v) const
 
template<typename Point >
Point ComposePoint (DecomposedVector_t const &decomp) const
 Returns the 3D vector from composition of projection and distance. More...
 
DefaultPoint_t ComposePoint (DecomposedVector_t const &decomp) const
 
template<typename Point >
Point ComposePoint (double distance, Projection_t const &proj) const
 Returns the 3D point from composition of projection and distance. More...
 
DefaultPoint_t ComposePoint (double distance, Projection_t const &proj) const
 
Coordinate transformation
void LocalToWorld (const double *tpc, double *world) const
 Transform point from local TPC frame to world frame. More...
 
TVector3 LocalToWorld (const TVector3 &local) const
 Transform point from local TPC frame to world frame. More...
 
geo::Point_t toWorldCoords (LocalPoint_t const &local) const
 Transform point from local TPC frame to world frame. More...
 
void LocalToWorldVect (const double *tpc, 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 *tpc) const
 Transform point from world frame to local TPC frame. More...
 
TVector3 WorldToLocal (TVector3 const &world) const
 Transform point from world frame to local TPC frame. More...
 
LocalPoint_t toLocalCoords (geo::Point_t const &world) const
 Transform point from world frame to local TPC frame. More...
 
void WorldToLocalVect (const double *world, double *tpc) 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...
 
- Public Member Functions inherited from geo::BoxBoundedGeo
 BoxBoundedGeo ()=default
 Default constructor: sets an empty volume. More...
 
 BoxBoundedGeo (Coord_t x_min, Coord_t x_max, Coord_t y_min, Coord_t y_max, Coord_t z_min, Coord_t z_max)
 Constructor: sets the boundaries in world coordinates as specified. More...
 
 BoxBoundedGeo (Coords_t lower, Coords_t upper)
 Constructor: sets the boundaries in world coordinates as specified. More...
 
double MinX () const
 Returns the world x coordinate of the start of the box. More...
 
double MaxX () const
 Returns the world x coordinate of the end of the box. More...
 
double CenterX () const
 Returns the world x coordinate of the center of the box. More...
 
double SizeX () const
 Returns the full size in the X dimension. More...
 
double HalfSizeX () const
 Returns the size from the center to the border on X dimension. More...
 
double MinY () const
 Returns the world y coordinate of the start of the box. More...
 
double MaxY () const
 Returns the world y coordinate of the end of the box. More...
 
double CenterY () const
 Returns the world y coordinate of the center of the box. More...
 
double SizeY () const
 Returns the full size in the Y dimension. More...
 
double HalfSizeY () const
 Returns the size from the center to the border on Y dimension. More...
 
double MinZ () const
 Returns the world z coordinate of the start of the box. More...
 
double MaxZ () const
 Returns the world z coordinate of the end of the box. More...
 
double CenterZ () const
 Returns the world z coordinate of the center of the box. More...
 
double SizeZ () const
 Returns the full size in the Z dimension. More...
 
double HalfSizeZ () const
 Returns the size from the center to the border on Z dimension. More...
 
geo::Point_t Min () const
 Returns the corner point with the smallest coordinates. More...
 
geo::Point_t Max () const
 Returns the corner point with the largest coordinates. More...
 
geo::Point_t Center () const
 Returns the center point of the box. More...
 
bool ContainsX (double x, double const wiggle=1) const
 Returns whether this TPC contains the specified world x coordinate. More...
 
bool ContainsY (double y, double const wiggle=1) const
 Returns whether this TPC contains the specified world y coordinate. More...
 
bool ContainsZ (double z, double const wiggle=1) const
 Returns whether this TPC contains the specified world z coordinate. More...
 
bool ContainsYZ (double y, double z, double const wiggle=1) const
 Returns if TPC contains the specified world y and z coordinates. More...
 
bool ContainsPosition (geo::Point_t const &point, double wiggle=1.0) const
 Returns whether this volume contains the specified point. More...
 
bool ContainsPosition (TVector3 const &point, double wiggle=1.0) const
 
bool ContainsPosition (double const *point, double wiggle=1.0) const
 
bool InFiducialX (double x, double neg_margin, double pos_margin) const
 Returns whether TPC fiducial volume contains world x coordinate. More...
 
bool InFiducialX (double x, double margin) const
 Returns whether TPC fiducial volume contains world x coordinate. More...
 
bool InFiducialY (double y, double neg_margin, double pos_margin) const
 Returns whether TPC fiducial volume contains world y coordinate. More...
 
bool InFiducialY (double y, double margin) const
 Returns whether TPC fiducial volume contains world y coordinate. More...
 
bool InFiducialZ (double z, double neg_margin, double pos_margin) const
 Returns whether TPC fiducial volume contains world z coordinate. More...
 
bool InFiducialZ (double z, double margin) const
 Returns whether TPC fiducial volume contains world z coordinate. More...
 
bool OverlapsX (geo::BoxBoundedGeo const &other) const
 Returns if the x coordinates covered by this and other box overlap. More...
 
bool OverlapsY (geo::BoxBoundedGeo const &other) const
 Returns if the y coordinates covered by this and other box overlap. More...
 
bool OverlapsZ (geo::BoxBoundedGeo const &other) const
 Returns if the z coordinates covered by this and other box overlap. More...
 
bool Overlaps (geo::BoxBoundedGeo const &other) const
 Returns if this and other box overlap. More...
 
void SetBoundaries (Coord_t x_min, Coord_t x_max, Coord_t y_min, Coord_t y_max, Coord_t z_min, Coord_t z_max)
 Sets the boundaries in world coordinates as specified. More...
 
void SetBoundaries (Coords_t lower, Coords_t upper)
 Sets the boundaries in world coordinates as specified. More...
 
void ExtendToInclude (Coord_t x, Coord_t y, Coord_t z)
 Extends the current box to also include the specified point. More...
 
void ExtendToInclude (geo::Point_t const &point)
 Extends the current box to also include the specified point. More...
 
void ExtendToInclude (BoxBoundedGeo const &box)
 Extends the current box to also include the specified one. More...
 
std::vector< TVector3 > GetIntersections (TVector3 const &TrajectoryStart, TVector3 const &TrajectoryDirect) const
 Calculates the entry and exit points of a trajectory on the box surface. More...
 
std::vector< geo::Point_tGetIntersections (geo::Point_t const &TrajectoryStart, geo::Vector_t const &TrajectoryDirect) const
 

Static Public Member Functions

static bool CoordinateContained (double c, double min, double max, double wiggle=1.)
 Returns whether the specified coordinate is in a range. More...
 
static bool CoordinateContained (double c, double const *range, double wiggle=1.)
 
- Static Public Member Functions inherited from geo::BoxBoundedGeo
static bool CoordinateContained (double c, double min, double max, double wiggle=1.)
 Returns whether the specified coordinate is in a range. More...
 
static bool CoordinateContained (double c, double const *range, double wiggle=1.)
 Returns whether the specified coordinate is in a range. More...
 
static void set_min (Coord_t &var, Coord_t value)
 Sets var to value if value is smaller than the current var value. More...
 
static void set_max (Coord_t &var, Coord_t value)
 Sets var to value if value is larger than the current var value. More...
 
static void set_min (Coords_t &var, geo::Point_t const &value)
 Sets each coordinate of var to the one in value if the latter is smaller. More...
 
static void set_max (Coords_t &var, geo::Point_t const &value)
 Sets each coordinate of var to the one in value if the latter is larger. More...
 

Static Public Attributes

static constexpr unsigned int MaxVerbosity = 6
 Maximum verbosity supported by PrintTPCInfo(). More...
 

Private Types

using DefaultVector_t = TVector3
 
using DefaultPoint_t = TVector3
 
using LocalTransformation_t = geo::LocalTransformationGeo< ROOT::Math::Transform3D, LocalPoint_t, LocalVector_t >
 

Private Member Functions

void FindPlane (GeoNodePath_t &path, size_t depth)
 
void MakePlane (GeoNodePath_t &path, size_t depth)
 
void ResetDriftDirection ()
 Recomputes the drift direction; needs planes to have been initialised. More...
 
double ComputeDriftDistance () const
 
void UpdatePlaneViewCache ()
 Refills the plane vs. view cache of the TPC. More...
 
void UpdatePlaneCache ()
 Updates plane cached information. More...
 
void InitTPCBoundaries ()
 Recomputes the TPC boundary. More...
 
void SortPlanes (std::vector< geo::PlaneGeo > &) const
 Sorts (in place) the specified PlaneGeo objects by drift distance. More...
 
geo::Point_t GetFrontFaceCenterImpl () const
 
geo::Point_t GetCathodeCenterImpl () const
 

Private Attributes

LocalTransformation_t fTrans
 TPC-to-world transformation. More...
 
PlaneCollection_t fPlanes
 List of planes in this plane. More...
 
TGeoVolume * fActiveVolume
 Active volume of LAr, called volTPCActive in GDML file. More...
 
TGeoVolume * fTotalVolume
 Total volume of TPC, called volTPC in GDML file. More...
 
DriftDirection_t fDriftDirection
 Direction of the electron drift in the TPC. More...
 
std::vector< double > fPlane0Pitch
 Pitch between planes. More...
 
std::vector< std::vector< double > > fPlaneLocation
 xyz locations of planes in the TPC. More...
 
geo::Point_t fActiveCenter
 Center of the active volume, in world coordinates [cm]. More...
 
double fActiveHalfWidth
 Half width of active volume. More...
 
double fActiveHalfHeight
 Half height of active volume. More...
 
double fActiveLength
 Length of active volume. More...
 
double fHalfWidth
 Half width of total volume. More...
 
double fHalfHeight
 Half height of total volume. More...
 
double fLength
 Length of total volume. More...
 
geo::Vector_t fWidthDir
 Direction width refers to. More...
 
geo::Vector_t fHeightDir
 Direction height refers to. More...
 
geo::Vector_t fLengthDir
 Direction length refers to. More...
 
geo::Vector_t fDriftDir
 Direction electrons drift along. More...
 
geo::BoxBoundedGeo fActiveBox
 Box of the active volume. More...
 
geo::TPCID fID
 ID of this TPC. More...
 
std::vector< geo::PlaneID::PlaneID_tfViewToPlaneNumber
 Index of the plane for each view (InvalidID if none). More...
 

Detailed Description

Geometry information for a single TPC.

Definition at line 38 of file TPCGeo.h.

Member Typedef Documentation

Data structure with plane and drift projections of a 3D vector.

Definition at line 81 of file TPCGeo.h.

using geo::TPCGeo::DefaultPoint_t = TVector3
private

Definition at line 41 of file TPCGeo.h.

using geo::TPCGeo::DefaultVector_t = TVector3
private

Definition at line 40 of file TPCGeo.h.

Type returned by IterateElements().

Definition at line 49 of file TPCGeo.h.

Definition at line 46 of file TPCGeo.h.

Type of points in the local GDML TPC frame.

Definition at line 70 of file TPCGeo.h.

Definition at line 711 of file TPCGeo.h.

Type of displacement vectors in the local GDML TPC frame.

Definition at line 73 of file TPCGeo.h.

Definition at line 45 of file TPCGeo.h.

Type of 2D vector projection on a plane.

Definition at line 78 of file TPCGeo.h.

Constructor & Destructor Documentation

geo::TPCGeo::TPCGeo ( TGeoNode const &  node,
geo::TransformationMatrix &&  trans,
PlaneCollection_t &&  planes 
)

Definition at line 40 of file TPCGeo.cxx.

45  : BoxBoundedGeo() // we initialize boundaries at the end of construction
46  , fTrans(std::move(trans))
47  , fPlanes(std::move(planes))
48  , fActiveVolume(0)
49  , fTotalVolume(0)
51  , fWidthDir (geo::Xaxis())
54  , fDriftDir() // null until known
55  {
56 
57  // all planes are going to be contained in the volume named volTPC
58  // now get the total volume of the TPC
59  TGeoVolume *vc = node.GetVolume();
60  if(!vc){
61  throw cet::exception("Geometry") << "cannot find detector outline volume - bail ungracefully\n";
62  }
63 
64  fTotalVolume = vc;
65 
66  // loop over the daughters of this node and look for the active volume
67  int nd = vc->GetNdaughters();
68  TGeoNode const* pActiveVolNode = nullptr;
69  for(int i = 0; i < nd; ++i){
70  if(strncmp(vc->GetNode(i)->GetName(), "volTPCActive", 12) != 0) continue;
71 
72  pActiveVolNode = vc->GetNode(i);
73  TGeoVolume *vca = pActiveVolNode->GetVolume();
74  if(vca) fActiveVolume = vca;
75  break;
76 
77  }// end loop over daughters of the volume
78 
80 
81  MF_LOG_DEBUG("Geometry") << "detector total volume is " << fTotalVolume->GetName()
82  << "\ndetector active volume is " << fActiveVolume->GetName();
83 
84  // compute the active volume transformation too
85  auto ActiveHMatrix(fTrans.Matrix());
86  if (pActiveVolNode) {
87  ActiveHMatrix
88  *= geo::makeTransformationMatrix(*(pActiveVolNode->GetMatrix()));
89  }
90  // we don't keep the active volume information... just store its center:
93 
94 
95  // set the width, height, and lengths
96  fActiveHalfWidth = ((TGeoBBox*)fActiveVolume->GetShape())->GetDX();
97  fActiveHalfHeight = ((TGeoBBox*)fActiveVolume->GetShape())->GetDY();
98  fActiveLength = 2.0*((TGeoBBox*)fActiveVolume->GetShape())->GetDZ();
99 
100  fHalfWidth = ((TGeoBBox*)fTotalVolume->GetShape())->GetDX();
101  fHalfHeight = ((TGeoBBox*)fTotalVolume->GetShape())->GetDY();
102  fLength = 2.0*((TGeoBBox*)fTotalVolume->GetShape())->GetDZ();
103 
104  // check that the rotation matrix to the world is the identity, if not
105  // we need to change the width, height and length values;
106  // the correspondence of these to x, y and z are not guaranteed to be
107  // trivial, so we store the two independently (cartesian dimensions in the
108  // bounding boxes, the sizes in data members directly);
109  // TODO: there must be a more general way to do this...
110  double Rxx, Rxy, Rxz, Ryx, Ryy, Ryz, Rzx, Rzy, Rzz;
111  fTrans.Matrix().Rotation().GetComponents
112  (Rxx, Rxy, Rxz, Ryx, Ryy, Ryz, Rzx, Rzy, Rzz);
113  if(Rxx != 1) {
114  if(std::abs(Rxz) == 1) {
115  fActiveHalfWidth = ((TGeoBBox*)fActiveVolume->GetShape())->GetDZ();
116  fHalfWidth = ((TGeoBBox*)fTotalVolume->GetShape())->GetDZ();
117  fWidthDir = Zaxis();
118  }
119  if(std::abs(Rxy) == 1) {
120  fActiveHalfWidth = ((TGeoBBox*)fActiveVolume->GetShape())->GetDY();
121  fHalfWidth = ((TGeoBBox*)fTotalVolume->GetShape())->GetDY();
122  fWidthDir = Yaxis();
123  }
124  }
125  if(Ryy != 1) {
126  if(std::abs(Rxy) == 1) {
127  fActiveHalfHeight = ((TGeoBBox*)fActiveVolume->GetShape())->GetDX();
128  fHalfHeight = ((TGeoBBox*)fTotalVolume->GetShape())->GetDX();
129  fHeightDir = Xaxis();
130  }
131  if(std::abs(Rzy) == 1) {
132  fActiveHalfHeight = ((TGeoBBox*)fActiveVolume->GetShape())->GetDZ();
133  fHalfHeight = ((TGeoBBox*)fTotalVolume->GetShape())->GetDZ();
134  fHeightDir = Zaxis();
135  }
136  }
137  if(Rzz != 1) {
138  if(std::abs(Rzx) == 1) {
139  fActiveLength = 2.*((TGeoBBox*)fActiveVolume->GetShape())->GetDX();
140  fLength = 2.*((TGeoBBox*)fTotalVolume->GetShape())->GetDX();
141  fLengthDir = Xaxis();
142  }
143  if(std::abs(Ryz) == 1) {
144  fActiveLength = 2.*((TGeoBBox*)fActiveVolume->GetShape())->GetDY();
145  fLength = 2.*((TGeoBBox*)fTotalVolume->GetShape())->GetDY();
146  fLengthDir = Yaxis();
147  }
148  }
149 
152 
153  } // TPCGeo::TPCGeo()
void InitTPCBoundaries()
Recomputes the TPC boundary.
Definition: TPCGeo.cxx:464
Drift direction is unknown.
Definition: geo_types.h:158
double fLength
Length of total volume.
Definition: TPCGeo.h:728
double fActiveHalfWidth
Half width of active volume.
Definition: TPCGeo.h:723
TransformationMatrix_t const & Matrix() const
Direct access to the transformation matrix.
constexpr Vector Yaxis()
Returns a y axis vector of the specified type.
Definition: geo_vectors.h:219
BoxBoundedGeo()=default
Default constructor: sets an empty volume.
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
geo::Vector_t fHeightDir
Direction height refers to.
Definition: TPCGeo.h:731
T abs(T value)
geo::Vector_t fWidthDir
Direction width refers to.
Definition: TPCGeo.h:730
double fHalfWidth
Half width of total volume.
Definition: TPCGeo.h:726
double fActiveLength
Length of active volume.
Definition: TPCGeo.h:725
std::tuple< double, double, const reco::ClusterHit3D * > Point
Definitions used by the VoronoiDiagram algorithm.
Definition: DCEL.h:44
def move(depos, offset)
Definition: depos.py:107
constexpr Vector Xaxis()
Returns a x axis vector of the specified type.
Definition: geo_vectors.h:215
decltype(auto) makeTransformationMatrix(Trans &&trans)
Converts a transformation matrix into a geo::TransformationMatrix.
TGeoVolume * fTotalVolume
Total volume of TPC, called volTPC in GDML file.
Definition: TPCGeo.h:717
DriftDirection_t fDriftDirection
Direction of the electron drift in the TPC.
Definition: TPCGeo.h:718
constexpr Vector Zaxis()
Returns a z axis vector of the specified type.
Definition: geo_vectors.h:223
TGeoVolume * fActiveVolume
Active volume of LAr, called volTPCActive in GDML file.
Definition: TPCGeo.h:716
geo::Vector_t fLengthDir
Direction length refers to.
Definition: TPCGeo.h:732
#define MF_LOG_DEBUG(id)
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
void ResetDriftDirection()
Recomputes the drift direction; needs planes to have been initialised.
Definition: TPCGeo.cxx:402
geo::Vector_t fDriftDir
Direction electrons drift along.
Definition: TPCGeo.h:733
geo::Point_t fActiveCenter
Center of the active volume, in world coordinates [cm].
Definition: TPCGeo.h:721
double fHalfHeight
Half height of total volume.
Definition: TPCGeo.h:727
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
double fActiveHalfHeight
Half height of active volume.
Definition: TPCGeo.h:724

Member Function Documentation

geo::BoxBoundedGeo const& geo::TPCGeo::ActiveBoundingBox ( ) const
inline

Returns the box of the active volume of this TPC.

Definition at line 320 of file TPCGeo.h.

321  { return fActiveBox; }
geo::BoxBoundedGeo fActiveBox
Box of the active volume.
Definition: TPCGeo.h:735
double geo::TPCGeo::ActiveHalfHeight ( ) const
inline

Half height (associated with y coordinate) of active TPC volume [cm].

Definition at line 99 of file TPCGeo.h.

99 { return fActiveHalfHeight; }
double fActiveHalfHeight
Half height of active volume.
Definition: TPCGeo.h:724
double geo::TPCGeo::ActiveHalfLength ( ) const
inline

Length (associated with z coordinate) of active TPC volume [cm].

Definition at line 105 of file TPCGeo.h.

105 { return fActiveLength / 2.0; }
double fActiveLength
Length of active volume.
Definition: TPCGeo.h:725
double geo::TPCGeo::ActiveHalfWidth ( ) const
inline

Half width (associated with x coordinate) of active TPC volume [cm].

Definition at line 95 of file TPCGeo.h.

95 { return fActiveHalfWidth; }
double fActiveHalfWidth
Half width of active volume.
Definition: TPCGeo.h:723
double geo::TPCGeo::ActiveHeight ( ) const
inline

Height (associated with y coordinate) of active TPC volume [cm].

Definition at line 101 of file TPCGeo.h.

101 { return 2.0 * ActiveHalfHeight(); }
double ActiveHalfHeight() const
Half height (associated with y coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:99
double geo::TPCGeo::ActiveLength ( ) const
inline

Length (associated with z coordinate) of active TPC volume [cm].

Definition at line 103 of file TPCGeo.h.

103 { return fActiveLength; }
double fActiveLength
Length of active volume.
Definition: TPCGeo.h:725
double geo::TPCGeo::ActiveMass ( ) const
inline

Definition at line 118 of file TPCGeo.h.

118 { return fActiveVolume->Weight(); }
TGeoVolume * fActiveVolume
Active volume of LAr, called volTPCActive in GDML file.
Definition: TPCGeo.h:716
const TGeoVolume* geo::TPCGeo::ActiveVolume ( ) const
inline

Definition at line 119 of file TPCGeo.h.

119 { return fActiveVolume; }
TGeoVolume * fActiveVolume
Active volume of LAr, called volTPCActive in GDML file.
Definition: TPCGeo.h:716
double geo::TPCGeo::ActiveWidth ( ) const
inline

Width (associated with x coordinate) of active TPC volume [cm].

Definition at line 97 of file TPCGeo.h.

97 { return 2.0 * ActiveHalfWidth(); }
double ActiveHalfWidth() const
Half width (associated with x coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:95
geo::BoxBoundedGeo const& geo::TPCGeo::BoundingBox ( ) const
inline

Returns the bounding box of this TPC.

Definition at line 316 of file TPCGeo.h.

317  { return *this; }
template<typename Point >
Point geo::TPCGeo::ComposePoint ( DecomposedVector_t const &  decomp) const
inline

Returns the 3D vector from composition of projection and distance.

Template Parameters
Pointtype of point to be returned
Parameters
decompdecomposed point
Returns
the 3D vector from composition of projection and distance
See also
DecomposePoint(), ComposePoint(double, Projection_t const&)

This is the "inverse" operation respect to DecomposePoint(). The argument stores the two components, orthogonal and parallel to the plane, and compose them into a 3D point which departs from the reference point (ProjectionReferencePoint()) by those components. See ComposePoint(double, Projection_t const&) for more details.

Definition at line 524 of file TPCGeo.h.

525  { return ReferencePlane().ComposePoint<Point>(decomp); }
Point ComposePoint(WireDecomposedVector_t const &decomp) const
Returns the 3D point from composition of projection and distance.
Definition: PlaneGeo.h:1024
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
DefaultPoint_t geo::TPCGeo::ComposePoint ( DecomposedVector_t const &  decomp) const
inline

Definition at line 526 of file TPCGeo.h.

527  { return ComposePoint<DefaultPoint_t>(decomp); }
template<typename Point >
Point geo::TPCGeo::ComposePoint ( double  distance,
Projection_t const &  proj 
) const
inline

Returns the 3D point from composition of projection and distance.

Template Parameters
Pointtype of point to be returned
Parameters
distancedistance of the target point from the reference plane
projprojection of the target point on the reference plane
Returns
the 3D point from composition of projection and distance
See also
DecomposePoint()

The returned point is the reference point, translated by two 3D vectors:

  1. a vector parallel to the plane normal, with norm the input distance
  2. a vector lying on the plane, whose projection via PointProjection() gives the input projection

The choice of the projection reference point embodies the same convention used in PointProjection() and DecomposePoint().

Definition at line 550 of file TPCGeo.h.

551  { return ReferencePlane().ComposePoint<Point>(distance, proj); }
Point ComposePoint(WireDecomposedVector_t const &decomp) const
Returns the 3D point from composition of projection and distance.
Definition: PlaneGeo.h:1024
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
DefaultPoint_t geo::TPCGeo::ComposePoint ( double  distance,
Projection_t const &  proj 
) const
inline

Definition at line 552 of file TPCGeo.h.

553  { return ComposePoint<DefaultPoint_t>(distance, proj); }
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
double geo::TPCGeo::ComputeDriftDistance ( ) const
private

Computes the distance between the cathode and the last wire plane (last respect to the sorting order).

Definition at line 450 of file TPCGeo.cxx.

450  {
451 
452  //
453  // 1. find the center of the face of the TPC opposite to the anode
454  // 2. compute the distance of it from the last wire plane
455  //
456 
457  geo::PlaneGeo const& plane = fPlanes.back();
459 
460  } // TPCGeo::ComputeDriftDistance()
Point GetCathodeCenter() const
Definition: TPCGeo.h:298
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
T abs(T value)
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:82
double DistanceFromPlane(geo::Point_t const &point) const
Returns the distance of the specified point from the wire plane.
Definition: PlaneGeo.h:621
static bool geo::TPCGeo::CoordinateContained ( double  c,
double  min,
double  max,
double  wiggle = 1. 
)
inlinestatic

Returns whether the specified coordinate is in a range.

Parameters
cthe coordinate
minlower boundary of the range
maxupper boundary of the range
wiggleexpansion factor for the range
Returns
whether the specified coordinate is in a range

If the wiggle is larger than 1, the range is expanded by the wiggle factor. If the wiggle is less than 1, the range is shrinked.

Definition at line 692 of file TPCGeo.h.

693  {
694  return (c >= (min > 0? min / wiggle: min * wiggle))
695  && (c <= (max < 0? max / wiggle: max * wiggle));
696  } // CoordinateContained()
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
static bool geo::TPCGeo::CoordinateContained ( double  c,
double const *  range,
double  wiggle = 1. 
)
inlinestatic

Definition at line 699 of file TPCGeo.h.

700  { return CoordinateContained(c, range[0], range[1], wiggle); }
static bool CoordinateContained(double c, double min, double max, double wiggle=1.)
Returns whether the specified coordinate is in a range.
Definition: TPCGeo.h:692
DecomposedVector_t geo::TPCGeo::DecomposePoint ( geo::Point_t const &  point) const
inline

Decomposes a 3D point in two components.

Parameters
pointthe point to be decomposed
Returns
the two components of point, on the plane and orthogonal to it

The point is decomposed in:

  1. a component orthogonal to the reference plane, expressed as a signed real number
  2. a component lying on the reference plane, expressed as a 2D vector

The distance is from the reference plane (DistanceFromReferencePlane()). The projection on the plane is obtained following the same convention as PointProjection().

Definition at line 445 of file TPCGeo.h.

446  { return ReferencePlane().DecomposePointWidthDepth(point); }
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
WDDecomposedVector_t DecomposePointWidthDepth(geo::Point_t const &point) const
Decomposes a 3D point in two components.
Definition: PlaneGeo.h:1088
DecomposedVector_t geo::TPCGeo::DecomposePoint ( TVector3 const &  point) const
inline

Definition at line 447 of file TPCGeo.h.

448  { return DecomposePoint(geo::vect::toPoint(point)); }
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
DecomposedVector_t DecomposePoint(geo::Point_t const &point) const
Decomposes a 3D point in two components.
Definition: TPCGeo.h:445
short int geo::TPCGeo::DetectDriftDirection ( ) const

Returns the expected drift direction based on geometry.

The return value is coded as follow:

  • +1: positive x
  • +2: positive y
  • +3: positive z
  • -1: negative x
  • -2: negative y
  • -3: negative z
  • 0: other (or algorithm failed)

The current implementation is based on the assumption that electrons in the middle of TPC will drift toward the wire planes, and it "never fails".

Definition at line 157 of file TPCGeo.cxx.

157  {
158 
159  //
160  // 1. determine the drift axis
161  // 2. determine the drift direction on it
162  //
163  // We assume that all the planes cover most of the TPC face; therefore,
164  // the centre of the plane and the one of the TPC should be very close
165  // to each other, when projected on the same drift plane.
166  // Here we find which is the largest coordinate difference.
167 
168  if (Nplanes() == 0) {
169  // chances are that we get this because stuff is not initialised yet,
170  // and then even the ID might be wrong
171  throw cet::exception("TPCGeo")
172  << "DetectDriftDirection(): no planes in TPC " << std::string(ID())
173  << "\n";
174  }
175 
176  auto const TPCcenter = GetCenter();
177  auto const PlaneCenter = Plane(0).GetBoxCenter(); // any will do
178 
179  auto const driftVector = PlaneCenter - TPCcenter; // approximation!
180 
181  if ((std::abs(driftVector.X()) > std::abs(driftVector.Y()))
182  && (std::abs(driftVector.X()) > std::abs(driftVector.Z())))
183  {
184  // x is the solution
185  return (driftVector.X() > 0)? +1: -1;
186  }
187  else if (std::abs(driftVector.Y()) > std::abs(driftVector.Z()))
188  {
189  // y is the man
190  return (driftVector.Y() > 0)? +2: -2;
191  }
192  else {
193  // z is the winner
194  return (driftVector.Z() > 0)? +3: -3;
195  }
196 
197  } // TPCGeo::DetectDriftDirection()
geo::TPCID const & ID() const
Returns the identifier of this TPC.
Definition: TPCGeo.h:333
std::string string
Definition: nybbler.cc:12
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
Point GetBoxCenter() const
Returns the centre of the box representing the plane.
Definition: PlaneGeo.h:498
T abs(T value)
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:263
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
Point GetCenter() const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.h:779
double geo::TPCGeo::DistanceFromReferencePlane ( geo::Point_t const &  point) const
inline

Returns the distance of the specified point from reference plane.

Parameters
pointa point in world coordinates [cm]
Returns
the signed distance from the plane

The distance is defined positive if the point lies in the inner side with respect to the reference plane.

It should match the drift distance from that plane.

Definition at line 404 of file TPCGeo.h.

405  { return ReferencePlane().DistanceFromPlane(point); }
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
double DistanceFromPlane(geo::Point_t const &point) const
Returns the distance of the specified point from the wire plane.
Definition: PlaneGeo.h:621
double geo::TPCGeo::DistanceFromReferencePlane ( TVector3 const &  point) const
inline

Definition at line 406 of file TPCGeo.h.

double DistanceFromReferencePlane(geo::Point_t const &point) const
Returns the distance of the specified point from reference plane.
Definition: TPCGeo.h:404
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
template<typename Vector >
Vector geo::TPCGeo::DriftDir ( ) const

Returns the direction of the drift (vector pointing toward the planes).

Definition at line 773 of file TPCGeo.h.

774  { return geo::vect::convertTo<Vector>(fDriftDir); }
geo::Vector_t fDriftDir
Direction electrons drift along.
Definition: TPCGeo.h:733
DefaultVector_t geo::TPCGeo::DriftDir ( ) const
inline

Returns the direction of the drift (vector pointing toward the planes).

Definition at line 151 of file TPCGeo.h.

151 { return DriftDir<DefaultVector_t>(); }
DriftDirection_t geo::TPCGeo::DriftDirection ( ) const
inline

Returns an enumerator value describing the drift direction.

Definition at line 144 of file TPCGeo.h.

144 { return fDriftDirection; }
DriftDirection_t fDriftDirection
Direction of the electron drift in the TPC.
Definition: TPCGeo.h:718
double geo::TPCGeo::DriftDistance ( ) const
inline

Drift distance is defined as the distance between the last anode plane and the opposite face of the TPC, in centimeters.

Definition at line 155 of file TPCGeo.h.

155 { return ComputeDriftDistance(); }
double ComputeDriftDistance() const
Definition: TPCGeo.cxx:450
void geo::TPCGeo::DriftPoint ( geo::Point_t position,
double  distance 
) const
inline

Shifts the position of an electron drifted by a distance.

Parameters
position_(modified)_ the position of the electron
distancedrift distance to shift the electron by [cm]
See also
geo::Plane::DriftPoint(), ReferencePlane()

This operation is delegated to the reference plane (see geo::Plane::DriftPoint()).

Definition at line 421 of file TPCGeo.h.

void DriftPoint(geo::Point_t &position, double distance) const
Shifts the position of an electron drifted by a distance.
Definition: PlaneGeo.h:643
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
void geo::TPCGeo::DriftPoint ( TVector3 &  position,
double  distance 
) const
inline

Definition at line 423 of file TPCGeo.h.

void DriftPoint(geo::Point_t &position, double distance) const
Shifts the position of an electron drifted by a distance.
Definition: PlaneGeo.h:643
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
void geo::TPCGeo::FindPlane ( GeoNodePath_t path,
size_t  depth 
)
private
geo::PlaneGeo const& geo::TPCGeo::FirstPlane ( ) const
inline

Returns the first wire plane (the closest to TPC center).

Definition at line 245 of file TPCGeo.h.

245 { return fPlanes[0]; }
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
template<typename Point >
Point geo::TPCGeo::GetActiveVolumeCenter ( ) const
inline

Returns the center of the TPC active volume in world coordinates [cm].

Definition at line 288 of file TPCGeo.h.

289  { return geo::vect::convertTo<Point>(fActiveCenter); }
geo::Point_t fActiveCenter
Center of the active volume, in world coordinates [cm].
Definition: TPCGeo.h:721
DefaultPoint_t geo::TPCGeo::GetActiveVolumeCenter ( ) const
inline

Returns the center of the TPC active volume in world coordinates [cm].

Definition at line 292 of file TPCGeo.h.

293  { return GetActiveVolumeCenter<DefaultPoint_t>(); }
template<typename Point >
Point geo::TPCGeo::GetCathodeCenter ( ) const
inline

Returns the center of the active volume face opposite to the wire planes [cm]

Definition at line 298 of file TPCGeo.h.

299  { return geo::vect::convertTo<Point>(GetCathodeCenterImpl()); }
geo::Point_t GetCathodeCenterImpl() const
Definition: TPCGeo.cxx:330
DefaultPoint_t geo::TPCGeo::GetCathodeCenter ( ) const
inline

Returns the center of the active volume face opposite to the wire planes [cm]

Definition at line 303 of file TPCGeo.h.

304  { return GetCathodeCenter<DefaultPoint_t>(); }
geo::Point_t geo::TPCGeo::GetCathodeCenterImpl ( ) const
private

Definition at line 330 of file TPCGeo.cxx.

330  {
331 
332  //
333  // 1. find the center of the face of the TPC opposite to the anode
334  // 2. compute the distance of it from the last wire plane
335  //
336 
337  //
338  // find the cathode center
339  //
340  geo::Point_t cathodeCenter = GetActiveVolumeCenter<geo::Point_t>();
341  switch (DetectDriftDirection()) {
342  case -1:
343  geo::vect::Xcoord(cathodeCenter) += ActiveHalfWidth();
344  // cathodeCenter.SetX(cathodeCenter.X() + ActiveHalfWidth());
345  break;
346  case +1:
347  cathodeCenter.SetX(cathodeCenter.X() - ActiveHalfWidth());
348  break;
349  case -2:
350  cathodeCenter.SetY(cathodeCenter.Y() + ActiveHalfHeight());
351  break;
352  case +2:
353  cathodeCenter.SetY(cathodeCenter.Y() - ActiveHalfHeight());
354  break;
355  case -3:
356  cathodeCenter.SetZ(cathodeCenter.Z() + ActiveLength() / 2.0);
357  break;
358  case +3:
359  cathodeCenter.SetZ(cathodeCenter.Z() - ActiveLength() / 2.0);
360  break;
361  case 0:
362  default:
363  // in this case, a better algorithm is probably needed
364  throw cet::exception("TPCGeo")
365  << "CathodeCenter(): Can't determine the cathode plane (code="
366  << DetectDriftDirection() << ")\n";
367  } // switch
368  return cathodeCenter;
369 
370  } // TPCGeo::GetCathodeCenterImpl()
double ActiveHalfHeight() const
Half height (associated with y coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:99
double ActiveHalfWidth() const
Half width (associated with x coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:95
double ActiveLength() const
Length (associated with z coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:103
auto Xcoord(Vector &v)
Returns an object to manage the coordinate X of the vector v.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
short int DetectDriftDirection() const
Returns the expected drift direction based on geometry.
Definition: TPCGeo.cxx:157
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<typename Point >
Point geo::TPCGeo::GetCenter ( ) const

Returns the center of the TPC volume in world coordinates [cm].

Definition at line 779 of file TPCGeo.h.

779  {
780 
781  // convert the origin (default constructed TVector)
782  return geo::vect::convertTo<Point>(toWorldCoords(LocalPoint_t{ 0.0, 0.0, 0.0 }));
783 
784 } // geo::TPCGeo::GetCenter()
geo::Point3DBase_t< TPCGeoCoordinatesTag > LocalPoint_t
Type of points in the local GDML TPC frame.
Definition: TPCGeo.h:70
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local TPC frame to world frame.
Definition: TPCGeo.h:571
DefaultPoint_t geo::TPCGeo::GetCenter ( ) const
inline

Returns the center of the TPC volume in world coordinates [cm].

Definition at line 284 of file TPCGeo.h.

284 { return GetCenter<DefaultPoint_t>(); }
const PlaneGeo& geo::TPCGeo::GetElement ( PlaneID const &  planeid) const
inline

Definition at line 214 of file TPCGeo.h.

215  { return Plane(planeid); }
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:263
PlaneGeo const* geo::TPCGeo::GetElementPtr ( PlaneID const &  planeid) const
inline

Definition at line 237 of file TPCGeo.h.

238  { return PlanePtr(planeid); }
PlaneGeo const * PlanePtr(unsigned int iplane) const
Returns the plane number iplane from this TPC.
Definition: TPCGeo.h:223
template<typename Point >
Point geo::TPCGeo::GetFrontFaceCenter ( ) const
inline

Returns the center of the active TPC volume side facing negative z.

Definition at line 308 of file TPCGeo.h.

309  { return geo::vect::convertTo<Point>(GetFrontFaceCenterImpl()); }
geo::Point_t GetFrontFaceCenterImpl() const
Definition: TPCGeo.cxx:374
geo::Point_t geo::TPCGeo::GetFrontFaceCenter ( ) const
inline

Returns the center of the active TPC volume side facing negative z.

Definition at line 312 of file TPCGeo.h.

313  { return GetFrontFaceCenter<geo::Point_t>(); }
geo::Point_t geo::TPCGeo::GetFrontFaceCenterImpl ( ) const
private

Definition at line 374 of file TPCGeo.cxx.

374  {
375  auto const& activeBox = ActiveBoundingBox();
376  return { activeBox.CenterX(), activeBox.CenterY(), activeBox.MinZ() };
377  } // TPCGeo::GetFrontFaceCenterImpl()
geo::BoxBoundedGeo const & ActiveBoundingBox() const
Returns the box of the active volume of this TPC.
Definition: TPCGeo.h:320
double geo::TPCGeo::HalfHeight ( ) const
inline

Height is associated with y coordinate [cm].

Definition at line 111 of file TPCGeo.h.

111 { return fHalfHeight; }
double fHalfHeight
Half height of total volume.
Definition: TPCGeo.h:727
double geo::TPCGeo::HalfLength ( ) const
inline

Length is associated with z coordinate [cm].

Definition at line 117 of file TPCGeo.h.

117 { return fLength / 2.0; }
double fLength
Length of total volume.
Definition: TPCGeo.h:728
double geo::TPCGeo::HalfWidth ( ) const
inline

Width is associated with x coordinate [cm].

Definition at line 107 of file TPCGeo.h.

107 { return fHalfWidth; }
double fHalfWidth
Half width of total volume.
Definition: TPCGeo.h:726
bool geo::TPCGeo::HasElement ( unsigned int  iplane) const
inline

Definition at line 176 of file TPCGeo.h.

176 { return HasPlane(iplane); }
bool HasPlane(unsigned int iplane) const
Returns whether a plane with index iplane is present in this TPC.
Definition: TPCGeo.h:175
bool geo::TPCGeo::HasElement ( geo::PlaneID const &  planeid) const
inline

Definition at line 190 of file TPCGeo.h.

191  { return HasPlane(planeid); }
bool HasPlane(unsigned int iplane) const
Returns whether a plane with index iplane is present in this TPC.
Definition: TPCGeo.h:175
bool geo::TPCGeo::HasPlane ( unsigned int  iplane) const
inline

Returns whether a plane with index iplane is present in this TPC.

Parameters
iplaneindex of plane in this TPC
Returns
whether the plane with index iplane is present in this TPC

Definition at line 175 of file TPCGeo.h.

175 { return iplane < Nplanes(); }
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
bool geo::TPCGeo::HasPlane ( geo::PlaneID const &  planeid) const
inline

Returns whether the plane in planeid is present in this TPC.

Parameters
planeidfull plane ID
Returns
whether the plane in planeid is present in this TPC

The cryostat and TPC numbers in planeid are ignored, as it is ignored whether planeid is invalid.

Definition at line 188 of file TPCGeo.h.

189  { return HasPlane(planeid.Plane); }
bool HasPlane(unsigned int iplane) const
Returns whether a plane with index iplane is present in this TPC.
Definition: TPCGeo.h:175
double geo::TPCGeo::Height ( ) const
inline

Height is associated with y coordinate [cm].

Definition at line 113 of file TPCGeo.h.

113 { return 2.0 * HalfHeight(); }
double HalfHeight() const
Height is associated with y coordinate [cm].
Definition: TPCGeo.h:111
template<typename Vector >
decltype(auto) geo::TPCGeo::HeightDir ( ) const
inline

Returns the direction Height() is measured on.

Definition at line 131 of file TPCGeo.h.

131 { return geo::vect::convertTo<Vector>(fHeightDir); }
geo::Vector_t fHeightDir
Direction height refers to.
Definition: TPCGeo.h:731
decltype(auto) geo::TPCGeo::HeightDir ( ) const
inline

Returns the direction Height() is measured on.

Definition at line 134 of file TPCGeo.h.

134 { return HeightDir<DefaultVector_t>(); }
geo::TPCID const& geo::TPCGeo::ID ( ) const
inline

Returns the identifier of this TPC.

Definition at line 333 of file TPCGeo.h.

333 { return fID; }
geo::TPCID fID
ID of this TPC.
Definition: TPCGeo.h:737
void geo::TPCGeo::InitTPCBoundaries ( )
private

Recomputes the TPC boundary.

Definition at line 464 of file TPCGeo.cxx.

464  {
465  // note that this assumes no rotations of the TPC
466  // (except for rotations of a flat angle around one of the three main axes);
467  // to avoid this, we should transform the six vertices
468  // rather than just the centre
469 
470  // we rely on the asumption that the center of TPC is at the local origin
474  );
475 
476  // the center of the active volume may be elsewhere than the local origin:
477  auto const& activeCenter = GetActiveVolumeCenter<geo::Point_t>();
479  activeCenter.X() - ActiveHalfWidth(), activeCenter.X() + ActiveHalfWidth(),
480  activeCenter.Y() - ActiveHalfHeight(), activeCenter.Y() + ActiveHalfHeight(),
481  activeCenter.Z() - ActiveHalfLength(), activeCenter.Z() + ActiveHalfLength()
482  );
483 
484 
485  } // CryostatGeo::InitTPCBoundaries()
geo::BoxBoundedGeo fActiveBox
Box of the active volume.
Definition: TPCGeo.h:735
geo::Point3DBase_t< TPCGeoCoordinatesTag > LocalPoint_t
Type of points in the local GDML TPC frame.
Definition: TPCGeo.h:70
double ActiveHalfHeight() const
Half height (associated with y coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:99
double HalfLength() const
Length is associated with z coordinate [cm].
Definition: TPCGeo.h:117
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local TPC frame to world frame.
Definition: TPCGeo.h:571
double ActiveHalfLength() const
Length (associated with z coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:105
double ActiveHalfWidth() const
Half width (associated with x coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:95
double HalfHeight() const
Height is associated with y coordinate [cm].
Definition: TPCGeo.h:111
void SetBoundaries(Coord_t x_min, Coord_t x_max, Coord_t y_min, Coord_t y_max, Coord_t z_min, Coord_t z_max)
Sets the boundaries in world coordinates as specified.
double HalfWidth() const
Width is associated with x coordinate [cm].
Definition: TPCGeo.h:107
auto geo::TPCGeo::IterateElements ( ) const

Returns an object for iterating through all geo::PlaneGeo.

Returns
an (undisclosed) object for iterating through all geo::PlaneGeo

For example, this snippet computes MaxWires() of TPC (a TPCGeo):

unsigned int maxWires = 0U;
for (geo::PlaneGeo const& plane: TPC.IteratePlanes())
maxWires = std::max(maxWires, plane.Nwires());

The resulting sequence exposes the planes within the TPC in their ID order, from plane 0 to Nplanes() - 1.

Definition at line 308 of file TPCGeo.cxx.

309  { return fPlanes; }
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
ElementIteratorBox geo::TPCGeo::IteratePlanes ( ) const
inline

Definition at line 268 of file TPCGeo.h.

268 { return IterateElements(); }
ElementIteratorBox IterateElements() const
Returns an object for iterating through all geo::PlaneGeo.
Definition: TPCGeo.cxx:308
geo::PlaneGeo const& geo::TPCGeo::LastPlane ( ) const
inline

Returns the last wire plane (the farther from TPC center).

Definition at line 248 of file TPCGeo.h.

248 { return fPlanes[Nplanes() - 1]; }
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
double geo::TPCGeo::Length ( ) const
inline

Length is associated with z coordinate [cm].

Definition at line 115 of file TPCGeo.h.

115 { return fLength; }
double fLength
Length of total volume.
Definition: TPCGeo.h:728
template<typename Vector >
decltype(auto) geo::TPCGeo::LengthDir ( ) const
inline

Returns the direction Length() is measured on.

Definition at line 138 of file TPCGeo.h.

138 { return geo::vect::convertTo<Vector>(fLengthDir); }
geo::Vector_t fLengthDir
Direction length refers to.
Definition: TPCGeo.h:732
decltype(auto) geo::TPCGeo::LengthDir ( ) const
inline

Returns the direction Length() is measured on.

Definition at line 141 of file TPCGeo.h.

141 { return LengthDir<DefaultVector_t>(); }
void geo::TPCGeo::LocalToWorld ( const double *  tpc,
double *  world 
) const
inline

Transform point from local TPC frame to world frame.

Definition at line 563 of file TPCGeo.h.

564  { fTrans.LocalToWorld(tpc, world); }
void LocalToWorld(double const *local, double *world) const
Transforms a point from local frame to world frame.
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
TVector3 geo::TPCGeo::LocalToWorld ( const TVector3 &  local) const
inline

Transform point from local TPC frame to world frame.

Definition at line 567 of file TPCGeo.h.

568  { return fTrans.LocalToWorld<TVector3>(local); }
void LocalToWorld(double const *local, double *world) const
Transforms a point from local frame to world frame.
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
void geo::TPCGeo::LocalToWorldVect ( const double *  tpc,
double *  world 
) const
inline

Transform direction vector from local to world.

Definition at line 575 of file TPCGeo.h.

576  { fTrans.LocalToWorldVect(tpc, world); }
void LocalToWorldVect(double const *local, double *world) const
Transforms a vector from local frame to world frame.
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
TVector3 geo::TPCGeo::LocalToWorldVect ( const TVector3 &  local) const
inline

Transform direction vector from local to world.

Definition at line 579 of file TPCGeo.h.

580  { return fTrans.LocalToWorldVect<TVector3>(local); }
void LocalToWorldVect(double const *local, double *world) const
Transforms a vector from local frame to world frame.
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
void geo::TPCGeo::MakePlane ( GeoNodePath_t path,
size_t  depth 
)
private
unsigned int geo::TPCGeo::MaxWires ( ) const

Returns the largest number of wires among the planes in this TPC.

Definition at line 297 of file TPCGeo.cxx.

297  {
298  unsigned int maxWires = 0;
299  for (geo::PlaneGeo const& plane: fPlanes) {
300  unsigned int maxWiresInPlane = plane.Nwires();
301  if (maxWiresInPlane > maxWires) maxWires = maxWiresInPlane;
302  } // for
303  return maxWires;
304  } // TPCGeo::MaxWires()
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:82
unsigned int geo::TPCGeo::NElements ( ) const
inline

Definition at line 166 of file TPCGeo.h.

166 { return fPlanes.size(); }
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
unsigned int geo::TPCGeo::Nplanes ( ) const
inline

Number of planes in this tpc.

Definition at line 165 of file TPCGeo.h.

165 { return fPlanes.size(); }
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
const PlaneGeo & geo::TPCGeo::Plane ( geo::View_t  view) const

Return the plane in the tpc with View_t view.

Definition at line 263 of file TPCGeo.cxx.

264  {
265  geo::PlaneID::PlaneID_t const p = fViewToPlaneNumber[size_t(view)];
266  if (p == geo::PlaneID::InvalidID) {
267  throw cet::exception("TPCGeo")
268  << "TPCGeo[" << ((void*) this) << "]::Plane(): no plane for view #"
269  << (size_t) view << "\n";
270  }
271  return fPlanes[p];
272  } // TPCGeo::Plane(geo::View_t)
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:473
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
std::vector< geo::PlaneID::PlaneID_t > fViewToPlaneNumber
Index of the plane for each view (InvalidID if none).
Definition: TPCGeo.h:740
p
Definition: test.py:223
static constexpr PlaneID_t InvalidID
Special code for an invalid ID.
Definition: geo_types.h:490
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
const PlaneGeo & geo::TPCGeo::Plane ( unsigned int  iplane) const

Return the iplane'th plane in the TPC.

Exceptions
cet::exception(category "PlaneOutOfRange") if no such plane

Definition at line 252 of file TPCGeo.cxx.

253  {
254  geo::PlaneGeo const* pPlane = PlanePtr(iplane);
255  if (!pPlane){
256  throw cet::exception("PlaneOutOfRange") << "Request for non-existant plane " << iplane << "\n";
257  }
258 
259  return *pPlane;
260  }
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:82
PlaneGeo const * PlanePtr(unsigned int iplane) const
Returns the plane number iplane from this TPC.
Definition: TPCGeo.h:223
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
const PlaneGeo& geo::TPCGeo::Plane ( PlaneID const &  planeid) const
inline

Returns the plane in planeid from this TPC.

Parameters
planeidfull plane ID
Returns
a constant reference to the plane in planeid
Exceptions
cet::exception(category "PlaneOutOfRange") if no such plane

The cryostat and TPC numbers in planeid are ignored, as it is ignored whether planeid is invalid.

Definition at line 212 of file TPCGeo.h.

213  { return Plane(planeid.Plane); }
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:263
double geo::TPCGeo::Plane0Pitch ( unsigned int  p) const

Definition at line 324 of file TPCGeo.cxx.

325  {
326  return fPlane0Pitch[p];
327  }
std::vector< double > fPlane0Pitch
Pitch between planes.
Definition: TPCGeo.h:719
p
Definition: test.py:223
const double * geo::TPCGeo::PlaneLocation ( unsigned int  p) const

Returns the coordinates of the center of the specified plane [cm]

Deprecated:
Use Plane(p).GetCenter() or equivalent.

Definition at line 382 of file TPCGeo.cxx.

383  {
384  return &fPlaneLocation[p][0];
385  }
p
Definition: test.py:223
std::vector< std::vector< double > > fPlaneLocation
xyz locations of planes in the TPC.
Definition: TPCGeo.h:720
double geo::TPCGeo::PlanePitch ( unsigned int  p1 = 0,
unsigned int  p2 = 1 
) const

Definition at line 388 of file TPCGeo.cxx.

390  {
391  return std::abs(fPlane0Pitch[p2] - fPlane0Pitch[p1]);
392  }
std::vector< double > fPlane0Pitch
Pitch between planes.
Definition: TPCGeo.h:719
T abs(T value)
PlaneGeo const* geo::TPCGeo::PlanePtr ( unsigned int  iplane) const
inline

Returns the plane number iplane from this TPC.

Parameters
iplanethe number of local plane
Returns
a constant pointer to the plane, or nullptr if it does not exist

Definition at line 223 of file TPCGeo.h.

224  { return HasPlane(iplane)? &(fPlanes[iplane]): nullptr; }
bool HasPlane(unsigned int iplane) const
Returns whether a plane with index iplane is present in this TPC.
Definition: TPCGeo.h:175
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
PlaneGeo const* geo::TPCGeo::PlanePtr ( PlaneID const &  planeid) const
inline

Returns the plane in planeid from this TPC.

Parameters
planeidfull plane ID
Returns
a constant pointer to the plane, or nullptr if it does not exist

The cryostat and TPC numbers in planeid are ignored, as it is ignored whether planeid is invalid.

Definition at line 235 of file TPCGeo.h.

236  { return PlanePtr(planeid.Plane); }
PlaneGeo const * PlanePtr(unsigned int iplane) const
Returns the plane number iplane from this TPC.
Definition: TPCGeo.h:223
Projection_t geo::TPCGeo::PointProjection ( geo::Point_t const &  point) const
inline

Definition at line 482 of file TPCGeo.h.

483  { return Projection(point); }
Projection_t Projection(geo::Point_t const &point) const
Returns the projection of the specified point on the plane.
Definition: TPCGeo.h:480
Projection_t geo::TPCGeo::PointProjection ( TVector3 const &  point) const
inline

Definition at line 484 of file TPCGeo.h.

485  { return Projection(geo::vect::toPoint(point)); }
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
Projection_t Projection(geo::Point_t const &point) const
Returns the projection of the specified point on the plane.
Definition: TPCGeo.h:480
template<typename Stream >
void geo::TPCGeo::PrintTPCInfo ( Stream &&  out,
std::string  indent = "",
unsigned int  verbosity = 1 
) const

Prints information about this TPC.

Template Parameters
Streamtype of output stream to use
Parameters
outstream to send the information to
indentprepend each line with this string
verbosityamount of information printed

Note that the first line out the output is not indented.

Verbosity levels

  • 0: only TPC ID
  • 1 _(default)_: also center and size
  • 2: also drift direction, cathode position and number of planes
  • 3: also maximum number of wires per plane
  • 4: also information on main direction
  • 5: also information on bounding box

The constant MaxVerbosity is set to the highest supported verbosity level.

Definition at line 789 of file TPCGeo.h.

793  {
794 
795  //----------------------------------------------------------------------------
796  out << "TPC " << std::string(ID());
797 
798  if (verbosity-- <= 0) return; // 0
799 
800  //----------------------------------------------------------------------------
801  out
802  << " (" << Width() << " x " << Height() << " x " << Length() << ") cm^3 at "
803  << GetCenter<geo::Point_t>();
804 
805  if (verbosity-- <= 0) return; // 1
806 
807  //----------------------------------------------------------------------------
808 
809  out << "\n" << indent
810  << "drift direction " << DriftDir<geo::Vector_t>()
811  << " from cathode around " << GetCathodeCenter<geo::Point_t>()
812  << " through " << DriftDistance() << " cm toward "
813  << Nplanes() << " wire planes"
814  ;
815 
816  if (verbosity-- <= 0) return; // 2
817 
818  //----------------------------------------------------------------------------
819  out << "\n" << indent
820  << "maximum wires on any plane: " << MaxWires();
821 
822  if (verbosity-- <= 0) return; // 3
823 
824  //----------------------------------------------------------------------------
825  out << "\n" << indent
826  << "active volume ("
827  << ActiveWidth() << " x " << ActiveHeight() << " x " << ActiveLength()
828  << ") cm^3, front face at " << GetFrontFaceCenter<geo::Point_t>()
829  << " cm;"
830  << "\n" << indent << "main directions:"
831  << " width " << WidthDir<geo::Vector_t>()
832  << " height " << HeightDir<geo::Vector_t>()
833  << " length " << LengthDir<geo::Vector_t>()
834  ;
835 
836  if (verbosity-- <= 0) return; // 4
837 
838  //----------------------------------------------------------------------------
839  // print also the containing box
840  geo::BoxBoundedGeo const& box = BoundingBox();
841  out << "\n" << indent
842  << "bounding box: " << box.Min() << " -- " << box.Max();
843 
844 // if (verbosity-- <= 0) return; // 5
845 
846  //----------------------------------------------------------------------------
847  // print also the active box
848  geo::BoxBoundedGeo const& activeBox = ActiveBoundingBox();
849  out << "\n" << indent
850  << "active volume box: " << activeBox.Min() << " -- " << activeBox.Max();
851 
852 // if (verbosity-- <= 0) return; // 6
853 
854  //----------------------------------------------------------------------------
855 } // geo::TPCGeo::PrintTPCInfo()
geo::TPCID const & ID() const
Returns the identifier of this TPC.
Definition: TPCGeo.h:333
std::string string
Definition: nybbler.cc:12
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
geo::BoxBoundedGeo const & ActiveBoundingBox() const
Returns the box of the active volume of this TPC.
Definition: TPCGeo.h:320
double Width() const
Width is associated with x coordinate [cm].
Definition: TPCGeo.h:109
double Height() const
Height is associated with y coordinate [cm].
Definition: TPCGeo.h:113
double Length() const
Length is associated with z coordinate [cm].
Definition: TPCGeo.h:115
double ActiveHeight() const
Height (associated with y coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:101
geo::Point_t Min() const
Returns the corner point with the smallest coordinates.
unsigned int MaxWires() const
Returns the largest number of wires among the planes in this TPC.
Definition: TPCGeo.cxx:297
double ActiveLength() const
Length (associated with z coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:103
double DriftDistance() const
Definition: TPCGeo.h:155
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
Definition: BoxBoundedGeo.h:33
double ActiveWidth() const
Width (associated with x coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:97
geo::BoxBoundedGeo const & BoundingBox() const
Returns the bounding box of this TPC.
Definition: TPCGeo.h:316
geo::Point_t Max() const
Returns the corner point with the largest coordinates.
Projection_t geo::TPCGeo::Projection ( geo::Point_t const &  point) const
inline

Returns the projection of the specified point on the plane.

Parameters
pointthe 3D point to be projected, in world coordinates
Returns
a 2D vector representing the projection of point on the plane

The returned vector is a 2D vector expressing the projection of the point (from world coordinates) on the reference plane. The vector is expressed as $ ( w, d ) $, components following the width direction (RefWidthDir()) and the depth direction (RefDepthDir()) respectively. The origin point is returned by ProjectionReferencePoint(). All coordinates are in centimeters.

Definition at line 480 of file TPCGeo.h.

481  { return ReferencePlane().PointWidthDepthProjection(point); }
WidthDepthProjection_t PointWidthDepthProjection(geo::Point_t const &point) const
Returns the projection of the specified point on the plane.
Definition: PlaneGeo.h:1107
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
Projection_t geo::TPCGeo::Projection ( geo::Vector_t const &  v) const
inline

Returns the projection of the specified vector on the plane.

Parameters
vthe 3D vector to be projected, in world units [cm]
Returns
a 2D vector representing the projection of v on the plane

The returned vector is a 2D vector expressing the projection of the vector (from world units) on the reference plane. The vector is expressed as $ ( w, d ) $, components following the width direction (RefWidthDir()) and the depth direction (RefDepthDir()) respectively. All coordinates are in centimeters.

Definition at line 501 of file TPCGeo.h.

WidthDepthProjection_t VectorWidthDepthProjection(geo::Vector_t const &v) const
Returns the projection of the specified vector on the plane.
Definition: PlaneGeo.h:1127
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
template<typename Point >
Point geo::TPCGeo::ProjectionReferencePoint ( ) const
inline

Returns the reference point used by PointProjection().

Template Parameters
Pointtype of point to be returned

The returned point is such that its decomposition results in a null projection and a 0 distance from the plane.

Definition at line 460 of file TPCGeo.h.

461  { return ReferencePlane().GetCenter<Point>(); }
Point GetCenter() const
Returns the centre of the wire plane in world coordinates [cm].
Definition: PlaneGeo.h:479
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
DefaultPoint_t geo::TPCGeo::ProjectionReferencePoint ( ) const
inline

Definition at line 462 of file TPCGeo.h.

463  { return ProjectionReferencePoint<DefaultPoint_t>(); }
template<typename Vector >
Vector geo::TPCGeo::RefDepthDir ( ) const
inline

Return the direction of reference plane depth.

Template Parameters
Vectortype of vector to return (current default: TVector3)
See also
RefWidthDir(), DriftDir()

The precise definition of the vector is arbitrary, but it is defined to lie on the wire plane and so that RefWidthDir(), RefDepthDir() and a vector opposite to DriftDir() make a orthonormal base. That base (width, depth, normal) is guaranteed to be positive defined.

Definition at line 388 of file TPCGeo.h.

388 { return ReferencePlane().DepthDir<Vector>(); }
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
Vector DepthDir() const
Return the direction of plane depth.
Definition: PlaneGeo.h:236
DefaultPoint_t geo::TPCGeo::RefDepthDir ( ) const
inline

Definition at line 389 of file TPCGeo.h.

389 { return RefDepthDir<DefaultPoint_t>(); }
geo::PlaneGeo const& geo::TPCGeo::ReferencePlane ( ) const
inline

Returns the plane used for reference by projection methods.

Definition at line 354 of file TPCGeo.h.

354 { return FirstPlane(); }
geo::PlaneGeo const & FirstPlane() const
Returns the first wire plane (the closest to TPC center).
Definition: TPCGeo.h:245
geo::PlaneID const& geo::TPCGeo::ReferencePlaneID ( ) const
inline

Returns the ID of the plane used for reference by projection methods.

Definition at line 357 of file TPCGeo.h.

358  { return ReferencePlane().ID(); }
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
geo::PlaneID const & ID() const
Returns the identifier of this plane.
Definition: PlaneGeo.h:203
template<typename Vector >
Vector geo::TPCGeo::RefWidthDir ( ) const
inline

Return the direction of reference plane width.

Template Parameters
Vectortype of vector to return (current default: TVector3)
See also
RefDepthDir(), DriftDir()

The precise definition of the vector is arbitrary, but it is defined to lie on the wire plane and so that RefWidthDir(), RefDepthDir() and a vector opposite to DriftDir() make a orthonormal base. That base (width, depth, normal) is guaranteed to be positive defined.

Definition at line 372 of file TPCGeo.h.

372 { return ReferencePlane().WidthDir<Vector>(); }
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:354
Vector WidthDir() const
Return the direction of plane width.
Definition: PlaneGeo.h:221
DefaultPoint_t geo::TPCGeo::RefWidthDir ( ) const
inline

Definition at line 373 of file TPCGeo.h.

373 { return RefWidthDir<DefaultPoint_t>(); }
void geo::TPCGeo::ResetDriftDirection ( )
private

Recomputes the drift direction; needs planes to have been initialised.

Definition at line 402 of file TPCGeo.cxx.

402  {
403 
404  auto const driftDirCode = DetectDriftDirection();
405  switch (driftDirCode) {
406  case +1:
407  fDriftDirection = geo::kPosX; // this is the same as kPos!
408  fDriftDir = geo::Xaxis();
409  break;
410  case -1:
411  fDriftDirection = geo::kNegX; // this is the same as kNeg!
412  fDriftDir = -geo::Xaxis();
413  break;
414  case +2:
415  fDriftDir = geo::Yaxis();
417  break;
418  case -2:
419  fDriftDir = -geo::Yaxis();
421  break;
422  case +3:
423  fDriftDir = geo::Zaxis();
425  break;
426  case -3:
427  fDriftDir = -geo::Zaxis();
429  break;
430  default:
431  // TPC ID is likely not yet set
433 
434  // we estimate the drift direction roughly from the geometry
436 
437  mf::LogError("TPCGeo")
438  << "Unable to detect drift direction (result: " << driftDirCode
439  << ", drift: ( " << fDriftDir.X() << " ; " << fDriftDir.Y() << " ; "
440  << fDriftDir.Z() << " )";
441  break;
442  } // switch
443 
445 
446  } // TPCGeo::ResetDriftDirection()
void round01(Vector &v, Scalar tol)
Returns a vector with all components rounded if close to 0, -1 or +1.
Drift direction is unknown.
Definition: geo_types.h:158
Drift towards positive values.
Definition: geo_types.h:159
constexpr Vector Yaxis()
Returns a y axis vector of the specified type.
Definition: geo_vectors.h:219
Point GetBoxCenter() const
Returns the centre of the box representing the plane.
Definition: PlaneGeo.h:498
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Drift towards negative X values.
Definition: geo_types.h:162
const double e
constexpr Vector Xaxis()
Returns a x axis vector of the specified type.
Definition: geo_vectors.h:215
DriftDirection_t fDriftDirection
Direction of the electron drift in the TPC.
Definition: TPCGeo.h:718
constexpr Vector Zaxis()
Returns a z axis vector of the specified type.
Definition: geo_vectors.h:223
Drift towards positive X values.
Definition: geo_types.h:161
short int DetectDriftDirection() const
Returns the expected drift direction based on geometry.
Definition: TPCGeo.cxx:157
Drift towards negative values.
Definition: geo_types.h:160
geo::Vector_t fDriftDir
Direction electrons drift along.
Definition: TPCGeo.h:733
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:263
Point GetCenter() const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.h:779
geo::PlaneGeo const & geo::TPCGeo::SmallestPlane ( ) const

Returns the wire plane with the smallest surface.

Definition at line 276 of file TPCGeo.cxx.

276  {
277 
278  //
279  // Returns the plane with the smallest width x depth. No nonsense here.
280  //
281 
282  auto iPlane = fPlanes.begin(), pend = fPlanes.end();
283  auto smallestPlane = iPlane;
284  double smallestSurface = smallestPlane->Width() * smallestPlane->Depth();
285  while (++iPlane != pend) {
286  double const surface = iPlane->Width() * iPlane->Depth();
287  if (surface > smallestSurface) continue;
288  smallestSurface = surface;
289  smallestPlane = iPlane;
290  } // while
291  return *smallestPlane;
292 
293  } // TPCGeo::SmallestPlane()
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
void geo::TPCGeo::SortPlanes ( std::vector< geo::PlaneGeo > &  planes) const
private

Sorts (in place) the specified PlaneGeo objects by drift distance.

Definition at line 529 of file TPCGeo.cxx.

529  {
530  //
531  // Sort planes by increasing drift distance.
532  //
533  // This function should work in bootstrap mode, relying on least things as
534  // possible. Therefore we compute here a proxy of the drift axis.
535  //
536 
537  //
538  // determine the drift axis (or close to): from TPC center to plane center
539  //
540 
541  // Instead of using the plane center, which might be not available yet,
542  // we use the plane box center, which only needs the geometry description
543  // to be available.
544  // We use the first plane -- it does not make any difference.
545  auto const TPCcenter = GetCenter();
546  auto const driftAxis
547  = geo::vect::normalize(planes[0].GetBoxCenter() - TPCcenter);
548 
549  auto by_distance = [&TPCcenter, &driftAxis](auto const& a,
550  auto const& b) {
551  return geo::vect::dot(a.GetBoxCenter() - TPCcenter, driftAxis) <
552  geo::vect::dot(b.GetBoxCenter() - TPCcenter, driftAxis);
553  };
554  cet::sort_all(planes, by_distance);
555 
556  } // TPCGeo::SortPlanes()
constexpr auto dot(Vector const &a, Vector const &b)
Return cross product of two vectors.
void sort_all(RandCont &)
const double a
static bool * b
Definition: config.cpp:1043
Vector normalize(Vector const &v)
Returns a vector parallel to v and with norm 1.
Point GetCenter() const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.h:779
void geo::TPCGeo::SortSubVolumes ( geo::GeoObjectSorter const &  sorter)

Apply sorting to the PlaneGeo objects.

Definition at line 201 of file TPCGeo.cxx.

202  {
204 
205  // the PlaneID_t cast convert InvalidID into a rvalue (non-reference);
206  // leaving it a reference would cause C++ to treat it as such,
207  // that can't be because InvalidID is a static member constant without an address
208  // (it is not defined in any translation unit, just declared in header)
209  fViewToPlaneNumber.resize
211  for(size_t p = 0; p < this->Nplanes(); ++p)
212  fViewToPlaneNumber[(size_t) fPlanes[p].View()] = p;
213 
214  for(size_t p = 0; p < fPlanes.size(); ++p) fPlanes[p].SortWires(sorter);
215 
216  }
Unknown view.
Definition: geo_types.h:136
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:473
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
std::vector< geo::PlaneID::PlaneID_t > fViewToPlaneNumber
Index of the plane for each view (InvalidID if none).
Definition: TPCGeo.h:740
p
Definition: test.py:223
void SortPlanes(std::vector< geo::PlaneGeo > &) const
Sorts (in place) the specified PlaneGeo objects by drift distance.
Definition: TPCGeo.cxx:529
static constexpr PlaneID_t InvalidID
Special code for an invalid ID.
Definition: geo_types.h:490
LocalPoint_t geo::TPCGeo::toLocalCoords ( geo::Point_t const &  world) const
inline

Transform point from world frame to local TPC frame.

Definition at line 595 of file TPCGeo.h.

596  { return fTrans.toLocalCoords(world); }
LocalPoint_t toLocalCoords(GlobalPoint_t const &world) const
Transforms a point from world frame to local frame.
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
LocalVector_t geo::TPCGeo::toLocalCoords ( geo::Vector_t const &  world) const
inline

Transform direction vector from world to local.

Definition at line 607 of file TPCGeo.h.

608  { return fTrans.toLocalCoords(world); }
LocalPoint_t toLocalCoords(GlobalPoint_t const &world) const
Transforms a point from world frame to local frame.
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
const TGeoVolume* geo::TPCGeo::TotalVolume ( ) const
inline

Definition at line 120 of file TPCGeo.h.

120 { return fTotalVolume; }
TGeoVolume * fTotalVolume
Total volume of TPC, called volTPC in GDML file.
Definition: TPCGeo.h:717
geo::Point_t geo::TPCGeo::toWorldCoords ( LocalPoint_t const &  local) const
inline

Transform point from local TPC frame to world frame.

Definition at line 571 of file TPCGeo.h.

572  { return fTrans.toWorldCoords(local); }
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
GlobalPoint_t toWorldCoords(LocalPoint_t const &local) const
Transforms a point from local frame to world frame.
geo::Vector_t geo::TPCGeo::toWorldCoords ( LocalVector_t const &  local) const
inline

Transform direction vector from local to world.

Definition at line 583 of file TPCGeo.h.

584  { return fTrans.toWorldCoords(local); }
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
GlobalPoint_t toWorldCoords(LocalPoint_t const &local) const
Transforms a point from local frame to world frame.
std::string geo::TPCGeo::TPCInfo ( std::string  indent = "",
unsigned int  verbosity = 1 
) const

Returns a string with information about this TPC.

See also
PrintTPCInfo()

Arguments and provided information are the same as in PrintTPCInfo().

Definition at line 244 of file TPCGeo.cxx.

245  {
246  std::ostringstream sstr;
247  PrintTPCInfo(sstr, indent, verbosity);
248  return sstr.str();
249  } // TPCGeo::TPCInfo()
void PrintTPCInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this TPC.
Definition: TPCGeo.h:789
void geo::TPCGeo::UpdateAfterSorting ( geo::TPCID  tpcid)

Performs all updates after cryostat has sorted TPCs.

Definition at line 220 of file TPCGeo.cxx.

220  {
221 
222  // reset the ID
223  fID = tpcid;
224 
225  // ask the planes to update; also check
226 
227  for (unsigned int plane = 0; plane < Nplanes(); ++plane) {
228  fPlanes[plane].UpdateAfterSorting(geo::PlaneID(fID, plane), *this);
229 
230  // check that the plane normal is opposite to the TPC drift direction
232  .equal(-(fPlanes[plane].GetNormalDirection()), DriftDir()));
233 
234  } // for
235 
238 
239  } // TPCGeo::UpdateAfterSorting()
Vector DriftDir() const
Returns the direction of the drift (vector pointing toward the planes).
Definition: TPCGeo.h:773
void UpdatePlaneCache()
Updates plane cached information.
Definition: TPCGeo.cxx:506
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
geo::TPCID fID
ID of this TPC.
Definition: TPCGeo.h:737
const double e
auto makeVector3DComparison(RealType threshold)
Creates a Vector3DComparison from a RealComparisons object.
void UpdatePlaneViewCache()
Refills the plane vs. view cache of the TPC.
Definition: TPCGeo.cxx:489
void geo::TPCGeo::UpdatePlaneCache ( )
private

Updates plane cached information.

Definition at line 506 of file TPCGeo.cxx.

506  {
507 
508  /*
509  * set the plane pitch for this TPC
510  */
511  fPlaneLocation.resize(fPlanes.size());
512  fPlane0Pitch.resize(Nplanes(), 0.);
513  geo::Point_t refPlaneCenter = fPlanes[0].GetCenter<geo::Point_t>();
514  for(size_t p = 0; p < Nplanes(); ++p){
515  geo::Point_t const& center = fPlanes[p].GetCenter<geo::Point_t>();
516  fPlane0Pitch[p] = (p == 0)
517  ? 0.0
518  : fPlane0Pitch[p-1] + std::abs(center.X()-refPlaneCenter.X())
519  ;
520  fPlaneLocation[p].resize(3);
522  refPlaneCenter = center;
523  } // for planes
524 
525  } // TPCGeo::UpdatePlaneViewCache()
std::vector< double > fPlane0Pitch
Pitch between planes.
Definition: TPCGeo.h:719
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
unsigned int fillCoords(Coords &dest, Vector const &src)
Fills a coordinate array with the coordinates of a vector.
T abs(T value)
p
Definition: test.py:223
std::vector< std::vector< double > > fPlaneLocation
xyz locations of planes in the TPC.
Definition: TPCGeo.h:720
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
def center(depos, point)
Definition: depos.py:117
void geo::TPCGeo::UpdatePlaneViewCache ( )
private

Refills the plane vs. view cache of the TPC.

Definition at line 489 of file TPCGeo.cxx.

489  {
490 
491  // the PlaneID_t cast convert InvalidID into a rvalue (non-reference);
492  // leaving it a reference would cause C++ to treat it as such,
493  // that can't be because InvalidID is a static member constant without an address
494  // (it is not defined in any translation unit, just declared in header)
495  fViewToPlaneNumber.clear();
496  fViewToPlaneNumber.resize
498  for(size_t p = 0; p < Nplanes(); ++p)
499  fViewToPlaneNumber[(size_t) fPlanes[p].View()] = p;
500 
501  } // TPCGeo::UpdatePlaneViewCache()
Unknown view.
Definition: geo_types.h:136
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:473
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
std::vector< geo::PlaneID::PlaneID_t > fViewToPlaneNumber
Index of the plane for each view (InvalidID if none).
Definition: TPCGeo.h:740
p
Definition: test.py:223
static constexpr PlaneID_t InvalidID
Special code for an invalid ID.
Definition: geo_types.h:490
Projection_t geo::TPCGeo::VectorProjection ( geo::Vector_t const &  v) const
inline

Definition at line 503 of file TPCGeo.h.

504  { return Projection(v); }
Projection_t Projection(geo::Point_t const &point) const
Returns the projection of the specified point on the plane.
Definition: TPCGeo.h:480
Projection_t geo::TPCGeo::VectorProjection ( TVector3 const &  v) const
inline

Definition at line 505 of file TPCGeo.h.

506  { return Projection(geo::vect::toVector(v)); }
::geo::Vector_t toVector(Vector const &v)
Convert the specified vector into a geo::Vector_t.
Projection_t Projection(geo::Point_t const &point) const
Returns the projection of the specified point on the plane.
Definition: TPCGeo.h:480
std::set< geo::View_t > geo::TPCGeo::Views ( ) const

Returns a set of all views covered in this TPC.

Definition at line 313 of file TPCGeo.cxx.

313  {
314  std::set<geo::View_t> views;
315  std::transform(fPlanes.cbegin(), fPlanes.cend(),
316  std::inserter(views, views.begin()), std::mem_fn(&geo::PlaneGeo::View));
317  return views;
318  } // TPCGeo::Views()
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:715
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:184
double geo::TPCGeo::Width ( ) const
inline

Width is associated with x coordinate [cm].

Definition at line 109 of file TPCGeo.h.

109 { return 2.0 * HalfWidth(); }
double HalfWidth() const
Width is associated with x coordinate [cm].
Definition: TPCGeo.h:107
template<typename Vector >
decltype(auto) geo::TPCGeo::WidthDir ( ) const
inline

Returns the direction Width() is measured on.

Definition at line 124 of file TPCGeo.h.

124 { return geo::vect::convertTo<Vector>(fWidthDir); }
geo::Vector_t fWidthDir
Direction width refers to.
Definition: TPCGeo.h:730
decltype(auto) geo::TPCGeo::WidthDir ( ) const
inline

Returns the direction Width() is measured on.

Definition at line 127 of file TPCGeo.h.

127 { return WidthDir<DefaultVector_t>(); }
double geo::TPCGeo::WirePitch ( unsigned  plane = 0) const

Definition at line 396 of file TPCGeo.cxx.

397  {
398  return this->Plane(plane).WirePitch();
399  }
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:263
double WirePitch() const
Return the wire pitch (in centimeters). It is assumed constant.
Definition: PlaneGeo.h:411
void geo::TPCGeo::WorldToLocal ( const double *  world,
double *  tpc 
) const
inline

Transform point from world frame to local TPC frame.

Definition at line 587 of file TPCGeo.h.

588  { fTrans.WorldToLocal(world, tpc); }
void WorldToLocal(double const *world, double *local) const
Transforms a point from world frame to local frame.
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
TVector3 geo::TPCGeo::WorldToLocal ( TVector3 const &  world) const
inline

Transform point from world frame to local TPC frame.

Definition at line 591 of file TPCGeo.h.

592  { return fTrans.WorldToLocal<TVector3>(world); }
void WorldToLocal(double const *world, double *local) const
Transforms a point from world frame to local frame.
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
void geo::TPCGeo::WorldToLocalVect ( const double *  world,
double *  tpc 
) const
inline

Transform direction vector from world to local.

Definition at line 599 of file TPCGeo.h.

600  { fTrans.WorldToLocalVect(world, tpc); }
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
void WorldToLocalVect(const double *world, double *local) const
Transforms a vector from world frame to local frame.
TVector3 geo::TPCGeo::WorldToLocalVect ( TVector3 const &  world) const
inline

Transform direction vector from world to local.

Definition at line 603 of file TPCGeo.h.

604  { return fTrans.WorldToLocalVect<TVector3>(world); }
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:713
void WorldToLocalVect(const double *world, double *local) const
Transforms a vector from world frame to local frame.

Member Data Documentation

geo::BoxBoundedGeo geo::TPCGeo::fActiveBox
private

Box of the active volume.

Definition at line 735 of file TPCGeo.h.

geo::Point_t geo::TPCGeo::fActiveCenter
private

Center of the active volume, in world coordinates [cm].

Definition at line 721 of file TPCGeo.h.

double geo::TPCGeo::fActiveHalfHeight
private

Half height of active volume.

Definition at line 724 of file TPCGeo.h.

double geo::TPCGeo::fActiveHalfWidth
private

Half width of active volume.

Definition at line 723 of file TPCGeo.h.

double geo::TPCGeo::fActiveLength
private

Length of active volume.

Definition at line 725 of file TPCGeo.h.

TGeoVolume* geo::TPCGeo::fActiveVolume
private

Active volume of LAr, called volTPCActive in GDML file.

Definition at line 716 of file TPCGeo.h.

geo::Vector_t geo::TPCGeo::fDriftDir
private

Direction electrons drift along.

Definition at line 733 of file TPCGeo.h.

DriftDirection_t geo::TPCGeo::fDriftDirection
private

Direction of the electron drift in the TPC.

Definition at line 718 of file TPCGeo.h.

double geo::TPCGeo::fHalfHeight
private

Half height of total volume.

Definition at line 727 of file TPCGeo.h.

double geo::TPCGeo::fHalfWidth
private

Half width of total volume.

Definition at line 726 of file TPCGeo.h.

geo::Vector_t geo::TPCGeo::fHeightDir
private

Direction height refers to.

Definition at line 731 of file TPCGeo.h.

geo::TPCID geo::TPCGeo::fID
private

ID of this TPC.

Definition at line 737 of file TPCGeo.h.

double geo::TPCGeo::fLength
private

Length of total volume.

Definition at line 728 of file TPCGeo.h.

geo::Vector_t geo::TPCGeo::fLengthDir
private

Direction length refers to.

Definition at line 732 of file TPCGeo.h.

std::vector<double> geo::TPCGeo::fPlane0Pitch
private

Pitch between planes.

Definition at line 719 of file TPCGeo.h.

std::vector< std::vector<double> > geo::TPCGeo::fPlaneLocation
private

xyz locations of planes in the TPC.

Definition at line 720 of file TPCGeo.h.

PlaneCollection_t geo::TPCGeo::fPlanes
private

List of planes in this plane.

Definition at line 715 of file TPCGeo.h.

TGeoVolume* geo::TPCGeo::fTotalVolume
private

Total volume of TPC, called volTPC in GDML file.

Definition at line 717 of file TPCGeo.h.

LocalTransformation_t geo::TPCGeo::fTrans
private

TPC-to-world transformation.

Definition at line 713 of file TPCGeo.h.

std::vector<geo::PlaneID::PlaneID_t> geo::TPCGeo::fViewToPlaneNumber
private

Index of the plane for each view (InvalidID if none).

Definition at line 740 of file TPCGeo.h.

geo::Vector_t geo::TPCGeo::fWidthDir
private

Direction width refers to.

Definition at line 730 of file TPCGeo.h.

constexpr unsigned int geo::TPCGeo::MaxVerbosity = 6
static

Maximum verbosity supported by PrintTPCInfo().

Definition at line 677 of file TPCGeo.h.


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