LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TPCGeo.h
Go to the documentation of this file.
1 #ifndef LARCOREALG_GEOMETRY_TPCGEO_H
9 #define LARCOREALG_GEOMETRY_TPCGEO_H
10 
11 // LArSoft libraries
18 #include "larcorealg/Geometry/geo_vectors_utils.h" // geo::vect
20 
21 // ROOT libraries
22 #include "TGeoMatrix.h"
23 #include "TGeoVolume.h"
24 
25 // C/C++ standard library
26 #include <set>
27 #include <vector>
28 
29 class TGeoNode;
30 
31 namespace geo {
32 
33  //......................................................................
36  class TPCGeo : public BoxBoundedGeo {
37  public:
38  using ID_t = TPCID;
39  using PlaneCollection_t = std::vector<geo::PlaneGeo>;
41 
44 
46 
60  struct TPCGeoCoordinatesTag {};
62 
65 
68 
70 
73 
76 
77  // Construct a representation of a single plane of the detector
78  TPCGeo(TGeoNode const& node, geo::TransformationMatrix&& trans, PlaneCollection_t&& planes);
79 
82 
84  double ActiveHalfWidth() const { return fActiveHalfWidth; }
86  double ActiveWidth() const { return 2.0 * ActiveHalfWidth(); }
88  double ActiveHalfHeight() const { return fActiveHalfHeight; }
90  double ActiveHeight() const { return 2.0 * ActiveHalfHeight(); }
92  double ActiveLength() const { return fActiveLength; }
94  double ActiveHalfLength() const { return fActiveLength / 2.0; }
96  double HalfWidth() const { return fHalfWidth; }
98  double Width() const { return 2.0 * HalfWidth(); }
100  double HalfHeight() const { return fHalfHeight; }
102  double Height() const { return 2.0 * HalfHeight(); }
104  double Length() const { return fLength; }
106  double HalfLength() const { return fLength / 2.0; }
107  double ActiveMass() const { return fActiveVolume->Weight(); }
108  const TGeoVolume* ActiveVolume() const { return fActiveVolume; }
109  const TGeoVolume* TotalVolume() const { return fTotalVolume; }
110 
112  decltype(auto) WidthDir() const { return fWidthDir; }
113 
115  decltype(auto) HeightDir() const { return fHeightDir; }
116 
118  decltype(auto) LengthDir() const { return fLengthDir; }
119 
122 
124  Vector_t DriftDir() const { return fDriftDir; }
125 
128  double DriftDistance() const { return ComputeDriftDistance(); }
129 
131 
134 
136  unsigned int Nplanes() const { return fPlanes.size(); }
138  unsigned int NElements() const { return fPlanes.size(); }
140 
142 
147  bool HasPlane(unsigned int iplane) const { return iplane < Nplanes(); }
148  bool HasElement(unsigned int iplane) const { return HasPlane(iplane); }
150 
152 
160  bool HasPlane(geo::PlaneID const& planeid) const { return HasPlane(planeid.Plane); }
161  bool HasElement(geo::PlaneID const& planeid) const { return HasPlane(planeid); }
163 
165  PlaneGeo const& Plane(geo::View_t view) const;
166 
169  PlaneGeo const& Plane(unsigned int iplane) const;
170 
172 
181  const PlaneGeo& Plane(PlaneID const& planeid) const { return Plane(planeid.Plane); }
182  const PlaneGeo& GetElement(PlaneID const& planeid) const { return Plane(planeid); }
184 
190  PlaneGeo const* PlanePtr(unsigned int iplane) const
191  {
192  return HasPlane(iplane) ? &(fPlanes[iplane]) : nullptr;
193  }
194 
196 
204  PlaneGeo const* PlanePtr(PlaneID const& planeid) const { return PlanePtr(planeid.Plane); }
205  PlaneGeo const* GetElementPtr(PlaneID const& planeid) const { return PlanePtr(planeid); }
207 
209  geo::PlaneGeo const& SmallestPlane() const;
210 
212  geo::PlaneGeo const& FirstPlane() const { return fPlanes[0]; }
213 
215  geo::PlaneGeo const& LastPlane() const { return fPlanes[Nplanes() - 1]; }
216 
218  unsigned int MaxWires() const;
219 
220  // @{
236  // @}
237 
239  std::set<geo::View_t> Views() const;
240 
242 
245 
248 
251 
255 
258 
260  geo::BoxBoundedGeo const& BoundingBox() const { return *this; }
261 
264 
265  double Plane0Pitch(unsigned int p) const;
266  double PlanePitch(unsigned int p1 = 0, unsigned int p2 = 1) const;
267  double WirePitch(unsigned plane = 0) const;
268 
270  geo::TPCID const& ID() const { return fID; }
271 
273 
288 
290  geo::PlaneGeo const& ReferencePlane() const { return FirstPlane(); }
291 
293  geo::PlaneID const& ReferencePlaneID() const { return ReferencePlane().ID(); }
294 
296 
306  Vector_t RefWidthDir() const { return ReferencePlane().WidthDir(); }
308 
310 
320  Vector_t RefDepthDir() const { return ReferencePlane().DepthDir(); }
322 
324 
334  double DistanceFromReferencePlane(geo::Point_t const& point) const
335  {
336  return ReferencePlane().DistanceFromPlane(point);
337  }
339 
341 
350  void DriftPoint(geo::Point_t& position, double distance) const
351  {
352  ReferencePlane().DriftPoint(position, distance);
353  }
355 
357 
374  {
376  }
378 
380 
389 
391 
405  {
407  }
408  Projection_t PointProjection(geo::Point_t const& point) const { return Projection(point); }
410 
412 
425  {
427  }
428  Projection_t VectorProjection(geo::Vector_t const& v) const { return Projection(v); }
430 
432 
446  {
447  return ReferencePlane().ComposePoint(decomp);
448  }
450 
452 
470  Point_t ComposePoint(double distance, Projection_t const& proj) const
471  {
472  return ReferencePlane().ComposePoint(distance, proj);
473  }
475 
477 
480 
483  {
484  return fTrans.toWorldCoords(local);
485  }
486 
489  {
490  return fTrans.toWorldCoords(local);
491  }
492 
495  {
496  return fTrans.toLocalCoords(world);
497  }
498 
501  {
502  return fTrans.toLocalCoords(world);
503  }
504 
506 
524  short int DetectDriftDirection() const;
525 
527  void SortSubVolumes(geo::GeoObjectSorter const& sorter);
528 
530  void UpdateAfterSorting(geo::TPCID tpcid);
531 
554  template <typename Stream>
555  void PrintTPCInfo(Stream&& out, std::string indent = "", unsigned int verbosity = 1) const;
556 
563  std::string TPCInfo(std::string indent = "", unsigned int verbosity = 1) const;
564 
566  static constexpr unsigned int MaxVerbosity = 6;
567 
579  static bool CoordinateContained(double c, double min, double max, double wiggle = 1.)
580  {
581  return (c >= (min > 0 ? min / wiggle : min * wiggle)) &&
582  (c <= (max < 0 ? max / wiggle : max * wiggle));
583  } // CoordinateContained()
584 
585  static bool CoordinateContained(double c, double const* range, double wiggle = 1.)
586  {
587  return CoordinateContained(c, range[0], range[1], wiggle);
588  }
589 
590  private:
591  void FindPlane(GeoNodePath_t& path, size_t depth);
592  void MakePlane(GeoNodePath_t& path, size_t depth);
593 
594  private:
595  using LocalTransformation_t =
597 
599 
601  TGeoVolume* fActiveVolume;
602  TGeoVolume* fTotalVolume;
604  std::vector<double> fPlane0Pitch;
605  std::vector<std::vector<double>> fPlaneLocation;
607 
610  double fActiveLength;
611  double fHalfWidth;
612  double fHalfHeight;
613  double fLength;
614 
619 
621 
623 
625  std::vector<geo::PlaneID::PlaneID_t> fViewToPlaneNumber;
626 
628  void ResetDriftDirection();
629 
632  double ComputeDriftDistance() const;
633 
635  void UpdatePlaneViewCache();
636 
638  void UpdatePlaneCache();
639 
641  void InitTPCBoundaries();
642 
644  void SortPlanes(std::vector<geo::PlaneGeo>&) const;
645 
648  };
649 }
650 
651 //------------------------------------------------------------------------------
652 //--- template implementation
653 //---
654 //------------------------------------------------------------------------------
655 template <typename Stream>
656 void geo::TPCGeo::PrintTPCInfo(Stream&& out,
657  std::string indent /* = "" */,
658  unsigned int verbosity /* = 1 */
659 ) const
660 {
661 
662  //----------------------------------------------------------------------------
663  out << "TPC " << std::string(ID());
664 
665  if (verbosity-- <= 0) return; // 0
666 
667  //----------------------------------------------------------------------------
668  out << " (" << Width() << " x " << Height() << " x " << Length() << ") cm^3 at " << GetCenter();
669 
670  if (verbosity-- <= 0) return; // 1
671 
672  //----------------------------------------------------------------------------
673 
674  out << "\n"
675  << indent << "drift direction " << DriftDir() << " from cathode around " << GetCathodeCenter()
676  << " through " << DriftDistance() << " cm toward " << Nplanes() << " wire planes";
677 
678  if (verbosity-- <= 0) return; // 2
679 
680  //----------------------------------------------------------------------------
681  out << "\n" << indent << "maximum wires on any plane: " << MaxWires();
682 
683  if (verbosity-- <= 0) return; // 3
684 
685  //----------------------------------------------------------------------------
686  out << "\n"
687  << indent << "active volume (" << ActiveWidth() << " x " << ActiveHeight() << " x "
688  << ActiveLength() << ") cm^3, front face at " << GetFrontFaceCenter() << " cm;"
689  << "\n"
690  << indent << "main directions:"
691  << " width " << WidthDir() << " height " << HeightDir() << " length " << LengthDir();
692 
693  if (verbosity-- <= 0) return; // 4
694 
695  //----------------------------------------------------------------------------
696  // print also the containing box
697  geo::BoxBoundedGeo const& box = BoundingBox();
698  out << "\n" << indent << "bounding box: " << box.Min() << " -- " << box.Max();
699 
700  //----------------------------------------------------------------------------
701  // print also the active box
702  geo::BoxBoundedGeo const& activeBox = ActiveBoundingBox();
703  out << "\n" << indent << "active volume box: " << activeBox.Min() << " -- " << activeBox.Max();
704 
705  //----------------------------------------------------------------------------
706 } // geo::TPCGeo::PrintTPCInfo()
707 
708 #endif // LARCOREALG_GEOMETRY_TPCGEO_H
709 
geo::TPCID const & ID() const
Returns the identifier of this TPC.
Definition: TPCGeo.h:270
void InitTPCBoundaries()
Recomputes the TPC boundary.
Definition: TPCGeo.cxx:435
geo::Point_t GetCathodeCenterImpl() const
Definition: TPCGeo.cxx:320
decltype(auto) LengthDir() const
Returns the direction Length() is measured on.
Definition: TPCGeo.h:118
PlaneGeo const * PlanePtr(PlaneID const &planeid) const
Returns the plane in planeid from this TPC.
Definition: TPCGeo.h:204
Point_t ComposePoint(DecomposedVector_t const &decomp) const
Returns the 3D vector from composition of projection and distance.
Definition: TPCGeo.h:445
decltype(auto) WidthDir() const
Returns the direction Width() is measured on.
Definition: TPCGeo.h:112
bool HasPlane(unsigned int iplane) const
Returns whether a plane with index iplane is present in this TPC.
Definition: TPCGeo.h:147
const PlaneGeo & Plane(PlaneID const &planeid) const
Returns the plane in planeid from this TPC.
Definition: TPCGeo.h:181
Point_t GetCathodeCenter() const
Definition: TPCGeo.h:254
geo::BoxBoundedGeo fActiveBox
Box of the active volume.
Definition: TPCGeo.h:620
std::vector< double > fPlane0Pitch
Pitch between planes.
Definition: TPCGeo.h:604
Point_t ComposePoint(WireDecomposedVector_t const &decomp) const
Returns the 3D point from composition of projection and distance.
Definition: PlaneGeo.h:924
double PlanePitch(unsigned int p1=0, unsigned int p2=1) const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.cxx:361
WidthDepthProjection_t VectorWidthDepthProjection(geo::Vector_t const &v) const
Returns the projection of the specified vector on the plane.
Definition: PlaneGeo.h:1018
void UpdatePlaneCache()
Updates plane cached information.
Definition: TPCGeo.cxx:476
void PrintTPCInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this TPC.
Definition: TPCGeo.h:656
void MakePlane(GeoNodePath_t &path, size_t depth)
std::vector< geo::PlaneGeo > PlaneCollection_t
Definition: TPCGeo.h:39
void FindPlane(GeoNodePath_t &path, size_t depth)
decltype(auto) HeightDir() const
Returns the direction Height() is measured on.
Definition: TPCGeo.h:115
geo::Vector_t toWorldCoords(LocalVector_t const &local) const
Transform direction vector from local to world.
Definition: TPCGeo.h:488
double DistanceFromReferencePlane(geo::Point_t const &point) const
Returns the distance of the specified point from reference plane.
Definition: TPCGeo.h:334
Projection_t VectorProjection(geo::Vector_t const &v) const
Returns the projection of the specified vector on the plane.
Definition: TPCGeo.h:428
Vector_t const & DepthDir() const
Return the direction of plane depth.
Definition: PlaneGeo.h:212
LocalVector_t toLocalCoords(geo::Vector_t const &world) const
Transform direction vector from world to local.
Definition: TPCGeo.h:500
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:160
Point_t const & GetCenter() const
Returns the centre of the wire plane in world coordinates [cm].
Definition: PlaneGeo.h:435
double fLength
Length of total volume.
Definition: TPCGeo.h:613
geo::Point3DBase_t< TPCGeoCoordinatesTag > LocalPoint_t
Type of points in the local GDML TPC frame.
Definition: TPCGeo.h:64
double ComputeDriftDistance() const
Definition: TPCGeo.cxx:421
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
double ActiveHalfHeight() const
Half height (associated with y coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:88
const TGeoVolume * TotalVolume() const
Half width (associated with x coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:109
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:137
double fActiveHalfWidth
Half width of active volume.
Definition: TPCGeo.h:608
geo::Point_t GetFrontFaceCenterImpl() const
Definition: TPCGeo.cxx:354
The data type to uniquely identify a Plane.
Definition: geo_types.h:463
Geometry information for a single TPC.
Definition: TPCGeo.h:36
geo::PlaneGeo const & FirstPlane() const
Returns the first wire plane (the closest to TPC center).
Definition: TPCGeo.h:212
LocalPoint_t toLocalCoords(GlobalPoint_t const &world) const
Transforms a point from world frame to local frame.
PlaneCollection_t fPlanes
List of planes in this plane.
Definition: TPCGeo.h:600
geo::BoxBoundedGeo const & ActiveBoundingBox() const
Returns the box of the active volume of this TPC.
Definition: TPCGeo.h:263
std::vector< geo::PlaneID::PlaneID_t > fViewToPlaneNumber
Index of the plane for each view (InvalidID if none).
Definition: TPCGeo.h:625
static bool CoordinateContained(double c, double const *range, double wiggle=1.)
Definition: TPCGeo.h:585
WidthDepthProjection_t PointWidthDepthProjection(geo::Point_t const &point) const
Returns the projection of the specified point on the plane.
Definition: PlaneGeo.h:1000
Vector_t RefDepthDir() const
Return the direction of reference plane depth.
Definition: TPCGeo.h:320
double ActiveMass() const
Half width (associated with x coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:107
geo::Vector3DBase_t< TPCGeoCoordinatesTag > LocalVector_t
Type of displacement vectors in the local GDML TPC frame.
Definition: TPCGeo.h:67
double HalfLength() const
Length is associated with z coordinate [cm].
Definition: TPCGeo.h:106
void UpdateAfterSorting(geo::TPCID tpcid)
Performs all updates after cryostat has sorted TPCs.
Definition: TPCGeo.cxx:209
Point_t ProjectionReferencePoint() const
Returns the reference point used by PointProjection().
Definition: TPCGeo.h:387
static bool CoordinateContained(double c, double min, double max, double wiggle=1.)
Returns whether the specified coordinate is in a range.
Definition: TPCGeo.h:579
void SortSubVolumes(geo::GeoObjectSorter const &sorter)
Apply sorting to the PlaneGeo objects.
Definition: TPCGeo.cxx:191
geo::Vector_t fHeightDir
Direction height refers to.
Definition: TPCGeo.h:616
geo::TPCID fID
ID of this TPC.
Definition: TPCGeo.h:622
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local TPC frame to world frame.
Definition: TPCGeo.h:482
double Width() const
Width is associated with x coordinate [cm].
Definition: TPCGeo.h:98
double Height() const
Height is associated with y coordinate [cm].
Definition: TPCGeo.h:102
void DriftPoint(geo::Point_t &position, double distance) const
Shifts the position of an electron drifted by a distance.
Definition: PlaneGeo.h:579
double Length() const
Length is associated with z coordinate [cm].
Definition: TPCGeo.h:104
Interface to algorithm class for sorting geo::XXXGeo objects.
TPCGeo(TGeoNode const &node, geo::TransformationMatrix &&trans, PlaneCollection_t &&planes)
Definition: TPCGeo.cxx:38
Point_t GetCenter() const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.h:247
Projection_t Projection(geo::Vector_t const &v) const
Returns the projection of the specified vector on the plane.
Definition: TPCGeo.h:424
geo::Vector_t fWidthDir
Direction width refers to.
Definition: TPCGeo.h:615
double ActiveHalfLength() const
Length (associated with z coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:94
double fHalfWidth
Half width of total volume.
Definition: TPCGeo.h:611
WidthDepthDecomposer_t::DecomposedVector_t WDDecomposedVector_t
Definition: PlaneGeo.h:152
geo::PlaneGeo const & SmallestPlane() const
Returns the wire plane with the smallest surface.
Definition: TPCGeo.cxx:263
enum geo::driftdir DriftDirection_t
Drift direction: positive or negative.
Local-to-world transformations with LArSoft geometry vectors.
double fActiveLength
Length of active volume.
Definition: TPCGeo.h:610
geo::PlaneGeo::WDDecomposedVector_t DecomposedVector_t
Data structure with plane and drift projections of a 3D vector.
Definition: TPCGeo.h:75
PlaneCollection_t const & ElementIteratorBox
Type returned by IterateElements().
Definition: TPCGeo.h:43
double ActiveHalfWidth() const
Half width (associated with x coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:84
ElementIteratorBox IterateElements() const
Returns an object for iterating through all geo::PlaneGeo.
Definition: TPCGeo.cxx:295
std::string indent(std::size_t const i)
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:78
Utilities to extend the interface of geometry vectors.
bool HasElement(geo::PlaneID const &planeid) const
Returns whether the plane in planeid is present in this TPC.
Definition: TPCGeo.h:161
geo::PlaneGeo::WidthDepthProjection_t Projection_t
Type of 2D vector projection on a plane.
Definition: TPCGeo.h:72
void UpdatePlaneViewCache()
Refills the plane vs. view cache of the TPC.
Definition: TPCGeo.cxx:459
bool HasPlane(geo::PlaneID const &planeid) const
Returns whether the plane in planeid is present in this TPC.
Definition: TPCGeo.h:160
bool HasElement(unsigned int iplane) const
Returns whether a plane with index iplane is present in this TPC.
Definition: TPCGeo.h:148
TGeoVolume * fTotalVolume
Total volume of TPC, called volTPC in GDML file.
Definition: TPCGeo.h:602
DriftDirection_t fDriftDirection
Direction of the electron drift in the TPC.
Definition: TPCGeo.h:603
const TGeoVolume * ActiveVolume() const
Half width (associated with x coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:108
double WirePitch(unsigned plane=0) const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.cxx:368
const PlaneGeo & GetElement(PlaneID const &planeid) const
Returns the plane in planeid from this TPC.
Definition: TPCGeo.h:182
double ActiveHeight() const
Height (associated with y coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:90
geo::Point_t Min() const
Returns the corner point with the smallest coordinates.
The data type to uniquely identify a TPC.
Definition: geo_types.h:381
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:481
unsigned int MaxWires() const
Returns the largest number of wires among the planes in this TPC.
Definition: TPCGeo.cxx:284
Point_t ComposePoint(double distance, Projection_t const &proj) const
Returns the 3D point from composition of projection and distance.
Definition: TPCGeo.h:470
Definition of data types for geometry description.
double Plane0Pitch(unsigned int p) const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.cxx:314
DriftDirection_t DriftDirection() const
Returns an enumerator value describing the drift direction.
Definition: TPCGeo.h:121
void SortPlanes(std::vector< geo::PlaneGeo > &) const
Sorts (in place) the specified PlaneGeo objects by drift distance.
Definition: TPCGeo.cxx:497
std::vector< std::vector< double > > fPlaneLocation
xyz locations of planes in the TPC.
Definition: TPCGeo.h:605
Point_t GetActiveVolumeCenter() const
Returns the center of the TPC active volume in world coordinates [cm].
Definition: TPCGeo.h:250
double ActiveLength() const
Length (associated with z coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:92
Provides a base class aware of world box coordinates.
Projection_t Projection(geo::Point_t const &point) const
Returns the projection of the specified point on the plane.
Definition: TPCGeo.h:404
Encapsulate the geometry of a wire.
ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double >, WidthDepthReferenceTag > WidthDepthProjection_t
Definition: PlaneGeo.h:140
Tag for vectors in the "local" GDML coordinate frame of the TPC.
Definition: TPCGeo.h:61
geo::PlaneGeo const & ReferencePlane() const
Returns the plane used for reference by projection methods.
Definition: TPCGeo.h:290
double HalfHeight() const
Height is associated with y coordinate [cm].
Definition: TPCGeo.h:100
std::string TPCInfo(std::string indent="", unsigned int verbosity=1) const
Returns a string with information about this TPC.
Definition: TPCGeo.cxx:232
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:180
TGeoVolume * fActiveVolume
Active volume of LAr, called volTPCActive in GDML file.
Definition: TPCGeo.h:601
double DriftDistance() const
Definition: TPCGeo.h:128
Selection of the type of transformation matrix used in geometry.
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
Definition: BoxBoundedGeo.h:33
std::vector< TGeoNode const * > GeoNodePath_t
Definition: WireGeo.h:117
Encapsulate the construction of a single detector plane.
double DistanceFromPlane(geo::Point_t const &point) const
Returns the distance of the specified point from the wire plane.
Definition: PlaneGeo.h:558
PlaneGeo const * PlanePtr(unsigned int iplane) const
Returns the plane number iplane from this TPC.
Definition: TPCGeo.h:190
PlaneGeo const * GetElementPtr(PlaneID const &planeid) const
Returns the plane in planeid from this TPC.
Definition: TPCGeo.h:205
short int DetectDriftDirection() const
Returns the expected drift direction based on geometry.
Definition: TPCGeo.cxx:149
double ActiveWidth() const
Width (associated with x coordinate) of active TPC volume [cm].
Definition: TPCGeo.h:86
geo::PlaneID const & ID() const
Returns the identifier of this plane.
Definition: PlaneGeo.h:184
Vector_t const & WidthDir() const
Return the direction of plane width.
Definition: PlaneGeo.h:200
geo::PlaneGeo const & LastPlane() const
Returns the last wire plane (the farther from TPC center).
Definition: TPCGeo.h:215
geo::Vector_t fLengthDir
Direction length refers to.
Definition: TPCGeo.h:617
Float_t proj
Definition: plot.C:35
geo::BoxBoundedGeo const & BoundingBox() const
Returns the bounding box of this TPC.
Definition: TPCGeo.h:260
unsigned int NElements() const
Number of planes in this tpc.
Definition: TPCGeo.h:138
LocalTransformation_t fTrans
TPC-to-world transformation.
Definition: TPCGeo.h:598
geo::WireGeo::GeoNodePath_t GeoNodePath_t
Definition: TPCGeo.h:40
void ResetDriftDirection()
Recomputes the drift direction; needs planes to have been initialised.
Definition: TPCGeo.cxx:374
DecomposedVector_t DecomposePoint(geo::Point_t const &point) const
Decomposes a 3D point in two components.
Definition: TPCGeo.h:373
WDDecomposedVector_t DecomposePointWidthDepth(geo::Point_t const &point) const
Decomposes a 3D point in two components.
Definition: PlaneGeo.h:982
geo::Vector_t fDriftDir
Direction electrons drift along.
Definition: TPCGeo.h:618
GenPoint3DBase_t< double, C > Point3DBase_t
Type of 3D point with representation in double precision.
Definition: geo_vectors.h:88
Vector_t RefWidthDir() const
Return the direction of reference plane width.
Definition: TPCGeo.h:306
GenVector3DBase_t< double, C > Vector3DBase_t
Definition: geo_vectors.h:83
IDparameter< geo::TPCID > TPCID
Member type of validated geo::TPCID parameter.
std::set< geo::View_t > Views() const
Returns a set of all views covered in this TPC.
Definition: TPCGeo.cxx:301
geo::PlaneID const & ReferencePlaneID() const
Returns the ID of the plane used for reference by projection methods.
Definition: TPCGeo.h:293
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:252
GlobalPoint_t toWorldCoords(LocalPoint_t const &local) const
Transforms a point from local frame to world frame.
ElementIteratorBox IteratePlanes() const
Returns an object for iterating through all geo::PlaneGeo.
Definition: TPCGeo.h:235
Vector_t DriftDir() const
Returns the direction of the drift (vector pointing toward the planes).
Definition: TPCGeo.h:124
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintTPCInfo().
Definition: TPCGeo.h:566
Namespace collecting geometry-related classes utilities.
Projection_t PointProjection(geo::Point_t const &point) const
Returns the projection of the specified point on the plane.
Definition: TPCGeo.h:408
geo::Point_t fActiveCenter
Center of the active volume, in world coordinates [cm].
Definition: TPCGeo.h:606
geo::Point_t Max() const
Returns the corner point with the largest coordinates.
LocalPoint_t toLocalCoords(geo::Point_t const &world) const
Transform point from world frame to local TPC frame.
Definition: TPCGeo.h:494
geo::Point_t GetFrontFaceCenter() const
Returns the center of the active TPC volume side facing negative z.
Definition: TPCGeo.h:257
double fHalfHeight
Half height of total volume.
Definition: TPCGeo.h:612
double HalfWidth() const
Width is associated with x coordinate [cm].
Definition: TPCGeo.h:96
ROOT::Math::Transform3D TransformationMatrix
Type of transformation matrix used in geometry.
double fActiveHalfHeight
Half height of active volume.
Definition: TPCGeo.h:609
void DriftPoint(geo::Point_t &position, double distance) const
Shifts the position of an electron drifted by a distance.
Definition: TPCGeo.h:350