9 #ifndef LARCOREALG_GEOMETRY_OPDETGEO_H 10 #define LARCOREALG_GEOMETRY_OPDETGEO_H 17 #include "TGeoMatrix.h" 59 OpDetGeo(std::vector<const TGeoNode*>& path,
62 void GetCenter(
double* xyz,
double localz=0.0)
const;
69 double ThetaZ(
bool degrees)
const;
151 template <
typename Stream>
153 (Stream&& out, std::string
indent =
"",
unsigned int verbosity = 0)
const;
174 template <
typename Stream>
178 unsigned int verbosity
182 out <<
"centered at " <<
GetCenter() <<
" cm";
184 if (verbosity-- <= 0)
return;
187 out <<
", radius: " <<
RMax() <<
" cm";
188 if (
RMin() != 0.0) out <<
" (inner: " <<
RMin() <<
" cm)";
189 out <<
", length: " <<
Length() <<
" cm";
191 if (verbosity-- <= 0)
return;
194 out <<
", theta(z): " <<
ThetaZ() <<
" rad";
203 #endif // LARCOREALG_GEOMETRY_OPDETGEO_H const TGeoNode * Node() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Tag for vectors in the "local" GDML coordinate frame of the TPC.
double CosThetaFromNormal(geo::Point_t const &point) const
Get cos(angle) to normal of this detector - used for solid angle calcs.
OpDetGeo(std::vector< const TGeoNode * > &path, int depth)
const TGeoNode * fOpDetNode
Pointer to theopdet node.
LocalVector_t toLocalCoords(geo::Vector_t const &world) const
Transform direction vector from world to local.
geo::Vector_t toWorldCoords(LocalVector_t const &local) const
Transform direction vector from local to world.
Definitions of geometry vector data types.
std::string indent(std::size_t const i)
void WorldToLocal(const double *world, double *opdet) const
Transform point from world frame to local optical detector frame.
void PrintOpDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=0) const
Prints information about this optical detector.
geo::Point_t fCenter
Stored geometric center of the optical detector.
void LocalToWorldVect(const double *opdet, double *world) const
Transform direction vector from local to world.
geo::Vector3DBase_t< OpDetGeoCoordinatesTag > LocalVector_t
Type of displacement vectors in the local GDML TPC frame.
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local optical detector frame to world frame.
geo::Point_t const & GetCenter() const
double DistanceToPoint(geo::Point_t const &point) const
Returns the distance of the specified point from detector center [cm].
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintOpDetInfo().
GenPoint3DBase_t< double, C > Point3DBase_t
Type of 3D point with representation in double precision.
GenVector3DBase_t< double, C > Vector3DBase_t
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
geo::Point3DBase_t< OpDetGeoCoordinatesTag > LocalPoint_t
Type of points in the local GDML TPC frame.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Namespace collecting geometry-related classes utilities.
void WorldToLocalVect(const double *world, double *opdet) const
Transform direction vector from world to local.
void LocalToWorld(const double *opdet, double *world) const
Transform point from local optical detector frame to world frame.
LocalPoint_t toLocalCoords(geo::Point_t const &world) const
Transform point from world frame to local optical detector frame.