8 #ifndef LARCOREALG_GEOMETRY_CRYOSTATGEO_H 9 #define LARCOREALG_GEOMETRY_CRYOSTATGEO_H 24 #include "Math/GenVector/DisplacementVector3D.h" 25 #include "Math/GenVector/PositionVector3D.h" 26 #include "Math/GenVector/Transform3D.h" 27 #include "TGeoVolume.h" 38 class GeoObjectSorter;
156 template <
typename Stream>
190 bool HasTPC(
unsigned int itpc)
const {
return itpc <
NTPC(); }
209 const TPCGeo&
TPC(
unsigned int itpc)
const;
221 {
return TPC(tpcid.
TPC); }
224 {
return TPC(tpcid); }
308 (
double const worldLoc[3],
double const wiggle)
const;
334 (
double const worldLoc[3],
double wiggle)
const 397 template <
typename Po
int>
398 [[deprecated(
"use toWorldCoords() instead")]]
425 template <
typename Po
int>
426 [[deprecated(
"use toLocalCoords() instead")]]
455 void FindTPC(std::vector<const TGeoNode*>& path,
457 void MakeTPC(std::vector<const TGeoNode*>& path,
460 void FindOpDet(std::vector<const TGeoNode*>& path,
462 void MakeOpDet(std::vector<const TGeoNode*>& path,
488 template <
typename Stream>
492 unsigned int verbosity
498 if (verbosity-- <= 0)
return;
505 if (verbosity-- <= 0)
return;
509 out <<
"\n" << indent
510 <<
"hosts " <<
NTPC() <<
" TPCs (largest number of planes: " <<
MaxPlanes()
511 <<
", of wires: " <<
MaxWires() <<
") and " 512 <<
NOpDet() <<
" optical detectors" 515 if (verbosity-- <= 0)
return;
520 out <<
"\n" << indent
521 <<
"bounding box: " << box.
Min() <<
" -- " << box.
Max();
532 #endif // LARCOREALG_GEOMETRY_CRYOSTATGEO_H
LocalPoint_t toLocalCoords(geo::Point_t const &world) const
Transform point from world frame to local cryostat frame.
void InitCryoBoundaries()
Fill the boundary information of the cryostat.
unsigned int GetClosestOpDet(geo::Point_t const &point) const
Utilities to extend the interface of geometry vectors.
geo::Point_t GetCenter() const
Returns the geometrical center of the cryostat.
double HalfLength() const
Half height of the cryostat [cm].
std::vector< geo::OpDetGeo > OpDetList_t
Type used internally to store the optical detectors.
TPCGeo const * TPCPtr(TPCID const &tpcid) const
Returns the TPC in tpcid from this cryostat.
geo::Vector_t toWorldCoords(LocalVector_t const &local) const
Transform direction vector from local to world.
unsigned int MaxPlanes() const
Returns the largest number of planes among the TPCs in this cryostat.
double Mass() const
Mass of the cryostat.
TGeoVolume * fVolume
Total volume of cryostat, called volCryostat in GDML file.
LocalVector_t toLocalCoords(geo::Vector_t const &world) const
Transform direction vector from world to local.
Geometry information for a single TPC.
ElementIteratorBox IterateTPCs() const
Returns an object suitable for iterating through all TPCs.
std::vector< geo::TPCGeo > TPCList_t
Type used internally to store the TPCs.
OpDetList_t fOpDets
List of opdets in this cryostat.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
CryostatGeo(TGeoNode const &node, geo::TransformationMatrix &&trans, TPCList_t &&TPCs, OpDetList_t &&OpDets)
Construct a representation of a single cryostat of the detector.
Geometry information for a single cryostat.
geo::BoxBoundedGeo const & BoundingBox() const
Returns the bounding box of this cryostat.
GENVECTOR_CONSTEXPR::geo::Point_t makePointFromCoords(Coords &&coords)
Creates a geo::Point_t from its coordinates (see makeFromCoords()).
geo::TPCGeo const * PositionToTPCptr(geo::Point_t const &point, double wiggle) const
Returns a pointer to the TPC at specified location.
Point LocalToWorld(Point const &local) const
TPCGeo const * GetElementPtr(TPCID const &tpcid) const
Alias for TPCPtr().
std::string fOpDetGeoName
Name of opdet geometry elements in gdml.
void SortSubVolumes(geo::GeoObjectSorter const &sorter)
Method to sort TPCGeo objects.
std::string OpDetGeoName() const
Get name of opdet geometry element.
Tag for vectors in the "local" GDML coordinate frame of the cryostat.
bool HasElement(unsigned int itpc) const
Alias for HasTPC().
void PrintCryostatInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this cryostat.
geo::OpDetGeo const * GetClosestOpDetPtr(geo::Point_t const &point) const
const TGeoVolume * Volume() const
Pointer to ROOT's volume descriptor.
const OpDetGeo & OpDet(unsigned int iopdet) const
Return the iopdet'th optical detector in the cryostat.
double Height() const
Full height of the cryostat [cm].
geo::Point3DBase_t< CryostatGeoCoordinatesTag > LocalPoint_t
Type of points in the local GDML cryostat frame.
double HalfWidth() const
Half width of the cryostat [cm].
unsigned int NElements() const
Alias for NTPC().
double Width() const
Full width of the cryostat [cm].
TPCGeo const * TPCPtr(unsigned int itpc) const
Returns the TPC number itpc from this cryostat.
unsigned int NTPC() const
Number of TPCs in this cryostat.
geo::CryostatID fID
ID of this cryostat.
geo::Point_t Min() const
Returns the corner point with the smallest coordinates.
void WorldToLocal(const double *world, double *cryo) const
Transform point from world frame to local cryostat frame.
The data type to uniquely identify a TPC.
void FindOpDet(std::vector< const TGeoNode * > &path, unsigned int depth)
Definition of data types for geometry description.
unsigned int MaxWires() const
Returns the largest number of wires among the TPCs in this cryostat.
void UpdateAfterSorting(geo::CryostatID cryoid)
Performs all needed updates after geometry has sorted the cryostats.
Provides a base class aware of world box coordinates.
Encapsulate the geometry of a wire.
double HalfHeight() const
Half height of the cryostat [cm].
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
TPCList_t const & ElementIteratorBox
Type returned by IterateElements().
Encapsulate the geometry of an optical detector.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintCryostatInfo().
std::string CryostatInfo(std::string indent="", unsigned int verbosity=1) const
Returns a string with cryostat information.
geo::TPCID::TPCID_t FindTPCAtPosition(double const worldLoc[3], double const wiggle) const
Returns the index of the TPC at specified location.
void LocalToWorld(const double *cryo, double *world) const
Transform point from local cryostat frame to world frame.
auto const & TPCs() const
Returns an object suitable for iterating through all TPCs.
void FindTPC(std::vector< const TGeoNode * > &path, unsigned int depth)
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
unsigned int TPCID_t
Type for the ID number.
std::vector< TGeoNode const * > GeoNodePath_t
TPCList_t fTPCs
List of tpcs in this cryostat.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc'th TPC in the cryostat.
unsigned int NOpDet() const
Number of optical detectors in this TPC.
void MakeOpDet(std::vector< const TGeoNode * > &path, int depth)
geo::Vector3DBase_t< CryostatGeoCoordinatesTag > LocalVector_t
Type of displacement vectors in the local GDML cryostat frame.
bool HasElement(geo::TPCID const &tpcid) const
Alias for HasTPC(geo::TPCID const&)
const TPCGeo & TPC(TPCID const &tpcid) const
Returns the TPC in tpcid from this cryostat.
bool HasTPC(geo::TPCID const &tpcid) const
Returns whether the TPC in tpcid is present in this cryostat.
LocalTransformation_t fTrans
Cryostat-to-world transformation.
GenPoint3DBase_t< double, C > Point3DBase_t
Type of 3D point with representation in double precision.
Definitions of geometry vector data types.
geo::BoxBoundedGeo const & Boundaries() const
Returns boundaries of the cryostat (in centimetres).
GenVector3DBase_t< double, C > Vector3DBase_t
void LocalToWorldVect(const double *cryo, double *world) const
Transform direction vector from local to world.
bool HasTPC(unsigned int itpc) const
Returns whether a TPC with index itpc is present in this cryostat.
geo::WireGeo::GeoNodePath_t GeoNodePath_t
TPCGeo const & PositionToTPC(geo::Point_t const &point, double wiggle) const
Returns the ID of the TPC at specified location.
void WorldToLocalVect(const double *world, double *cryo) const
Transform direction vector from world to local.
TPCID_t TPC
Index of the TPC within its cryostat.
void MakeTPC(std::vector< const TGeoNode * > &path, int depth)
LArSoft geometry interface.
geo::Point_t Max() const
Returns the corner point with the largest coordinates.
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local cryostat frame to world frame.
geo::TPCID PositionToTPCID(geo::Point_t const &point, double wiggle) const
Returns the ID of the TPC at specified location.
ROOT::Math::Transform3D TransformationMatrix
Type of transformation matrix used in geometry.
double Length() const
Length of the cryostat [cm].
Encapsulate the construction of a single detector plane.
Point WorldToLocal(Point const &world) const
The data type to uniquely identify a cryostat.
const TPCGeo & GetElement(TPCID const &tpcid) const
Alias for TPC().
geo::Point_t Center() const
Returns the center point of the box.
geo::CryostatID const & ID() const
Returns the identifier of this cryostat.
ElementIteratorBox IterateElements() const
Returns an object suitable for iterating through all TPCs.