16 #include "TGeoManager.h" 26 inline T
sqr(T v) {
return v*v; }
49 double xyzLocal[3] = {0.,0.,localz};
57 return asTube()->GetRmax();
64 TGeoBBox
const* pBox =
asBox();
65 return pBox? pBox->GetDZ(): 0.0;
72 TGeoBBox
const* pBox =
asBox();
73 return pBox? pBox->GetDX(): 0.0;
80 TGeoBBox
const* pBox =
asBox();
81 return pBox? pBox->GetDY(): 0.0;
88 return asTube()->GetRmin();
100 double angle = (
end.Y()-center.Y()+
end.X()-center.X()) /
101 std::abs(
end.Y()-center.Y()+center.X()-
end.X()) *
102 std::acos((
end.Z() - center.Z())/
HalfL());
117 {
return DistanceToPoint(geo::vect::makeFromCoords<geo::Point_t>(xyz)); }
123 return local.Z() / local.R();
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.
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not a tube.
geo::Point_t fCenter
Stored geometric center of the optical detector.
Utilities to extend the interface of geometry vectors.
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local optical detector frame to world frame.
Encapsulate the geometry of an optical detector.
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].
TGeoTube const * asTube() const
Returns the geometry object as TGeoTube, nullptr if not a tube.
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
constexpr T RadiansToDegrees(T angle)
Converts the argument angle from radians into degrees ( )
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
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 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.