LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
geo::OpDetGeo Class Reference

#include "OpDetGeo.h"

Public Types

Types for geometry-local reference vectors.

These types represents points and displacement vectors in the reference frame defined in the optical detector 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::OpDetGeo have the same type but are not compatible.

using LocalPoint_t = geo::OpticalPoint_t
 Type of points in the local GDML TPC frame. More...
 
using LocalVector_t = geo::OpticalVector_t
 Type of displacement vectors in the local GDML TPC frame. More...
 

Public Member Functions

 OpDetGeo (TGeoNode const &node, geo::TransformationMatrix &&trans)
 
geo::OpDetID const & ID () const
 Returns the geometry ID of this optical detector. More...
 
geo::Point_t const & GetCenter () const
 
double RMin () const
 
double RMax () const
 
double HalfL () const
 
double HalfW () const
 
double HalfH () const
 
double Length () const
 
double Width () const
 
double Height () const
 
double ThetaZ () const
 
double ThetaZ (bool degrees) const
 
const TGeoNode * Node () const
 Returns the ROOT object describing the detector geometry. More...
 
void UpdateAfterSorting (geo::OpDetID opdetid)
 Performs all updates after cryostat has sorted the optical detectors. More...
 
template<typename Stream >
void PrintOpDetInfo (Stream &&out, std::string indent="", unsigned int verbosity=0) const
 Prints information about this optical detector. More...
 
std::string OpDetInfo (std::string indent="", unsigned int verbosity=0) const
 Returns a string with optical detector information. More...
 
double CosThetaFromNormal (geo::Point_t const &point) const
 Get cos(angle) to normal of this detector - used for solid angle calcs. More...
 
double DistanceToPoint (geo::Point_t const &point) const
 Returns the distance of the specified point from detector center [cm]. More...
 
Coordinate transformation

Local points and displacement vectors are described by the types geo::OpDetGeo::LocalPoint_t and geo::OpDetGeo::LocalVector_t, respectively.

geo::Point_t toWorldCoords (LocalPoint_t const &local) const
 Transform point from local optical detector frame to world frame. More...
 
geo::Vector_t toWorldCoords (LocalVector_t const &local) const
 Transform direction vector from local to world. More...
 
LocalPoint_t toLocalCoords (geo::Point_t const &world) const
 Transform point from world frame to local optical detector frame. More...
 
LocalVector_t toLocalCoords (geo::Vector_t const &world) const
 Transform direction vector from world to local. More...
 
Detector shape
TGeoShape const * Shape () const
 Returns the geometry object as TGeoShape. More...
 
template<typename ShapeObj >
bool isShape () const
 Returns whether the detector has the specified shape. More...
 
template<typename ShapeObj >
bool isShapeLike () const
 Returns whether the detector inherits from the specified shape. More...
 
bool isTube () const
 Returns whether the detector shape is a cylinder (TGeoTube). More...
 
bool isBar () const
 Returns whether the detector shape is a bar (TGeoBBox). More...
 
bool isSphere () const
 Returns whether the detector shape is a hemisphere (TGeoSphere). More...
 

Static Public Attributes

static constexpr unsigned int MaxVerbosity = 2
 Maximum verbosity supported by PrintOpDetInfo(). More...
 

Private Types

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

Private Member Functions

TGeoTube const * asTube () const
 Returns the geometry object as TGeoTube, nullptr if not a tube. More...
 
TGeoSphere const * asSphere () const
 Returns the geometry object as TGeoSphere, nullptr if not a sphere. More...
 
TGeoBBox const * asBox () const
 Returns the geometry object as TGeoBBox, nullptr if not box-derived. More...
 

Private Attributes

LocalTransformation_t fTrans
 Optical-detector-to-world transformation. More...
 
const TGeoNode * fOpDetNode
 Pointer to theopdet node. More...
 
geo::Point_t fCenter
 Stored geometric center of the optical detector. More...
 
geo::OpDetID fID
 Identifier of this optical detector. More...
 

Detailed Description

Definition at line 42 of file OpDetGeo.h.

Member Typedef Documentation

Type of points in the local GDML TPC frame.

Definition at line 60 of file OpDetGeo.h.

Definition at line 226 of file OpDetGeo.h.

Type of displacement vectors in the local GDML TPC frame.

Definition at line 63 of file OpDetGeo.h.

Constructor & Destructor Documentation

geo::OpDetGeo::OpDetGeo ( TGeoNode const &  node,
geo::TransformationMatrix &&  trans 
)

Definition at line 26 of file OpDetGeo.cxx.

References fCenter, fOpDetNode, and toWorldCoords().

27  : fTrans(std::move(trans))
28  {
29  fOpDetNode = &node;
30  fCenter = toWorldCoords(geo::origin<LocalPoint_t>());
31  }
const TGeoNode * fOpDetNode
Pointer to theopdet node.
Definition: OpDetGeo.h:229
geo::Point_t fCenter
Stored geometric center of the optical detector.
Definition: OpDetGeo.h:230
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local optical detector frame to world frame.
Definition: OpDetGeo.h:106
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:228

Member Function Documentation

TGeoBBox const* geo::OpDetGeo::asBox ( ) const
inlineprivate

Returns the geometry object as TGeoBBox, nullptr if not box-derived.

Definition at line 241 of file OpDetGeo.h.

References Shape().

Referenced by HalfH(), HalfL(), and HalfW().

241 { return dynamic_cast<TGeoBBox const*>(Shape()); }
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:139
TGeoSphere const* geo::OpDetGeo::asSphere ( ) const
inlineprivate

Returns the geometry object as TGeoSphere, nullptr if not a sphere.

Definition at line 238 of file OpDetGeo.h.

References Shape().

Referenced by PrintOpDetInfo(), RMax(), and RMin().

238 { return dynamic_cast<TGeoSphere const*>(Shape()); }
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:139
TGeoTube const* geo::OpDetGeo::asTube ( ) const
inlineprivate

Returns the geometry object as TGeoTube, nullptr if not a tube.

Definition at line 235 of file OpDetGeo.h.

References Shape().

Referenced by RMax(), and RMin().

235 { return dynamic_cast<TGeoTube const*>(Shape()); }
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:139
double geo::OpDetGeo::CosThetaFromNormal ( geo::Point_t const &  point) const

Get cos(angle) to normal of this detector - used for solid angle calcs.

Definition at line 113 of file OpDetGeo.cxx.

References toLocalCoords().

Referenced by Height(), and phot::PhotonVisibilityService::SolidAngleFactorImpl().

114  {
115  auto const& local = toLocalCoords(point);
116  return local.Z() / local.R();
117  }
LocalPoint_t toLocalCoords(geo::Point_t const &world) const
Transform point from world frame to local optical detector frame.
Definition: OpDetGeo.h:118
double geo::OpDetGeo::DistanceToPoint ( geo::Point_t const &  point) const

Returns the distance of the specified point from detector center [cm].

Definition at line 98 of file OpDetGeo.cxx.

References GetCenter().

Referenced by phot::CreateHybridLibrary::CreateHybridLibrary(), phot::PhotonVisibilityService::DistanceToOpDetImpl(), geo::CryostatGeo::GetClosestOpDet(), phot::PhotonLibraryHybrid::GetCount(), and Height().

99  {
100  return (point - GetCenter()).R();
101  }
geo::Point_t const & GetCenter() const
Definition: OpDetGeo.h:72
double geo::OpDetGeo::HalfH ( ) const

Definition at line 60 of file OpDetGeo.cxx.

References asBox().

Referenced by evdb_tool::OpHit3DDrawer::Draw(), evdb_tool::DrawSimPhoton3D::Draw(), evdb_tool::OpFlash3DDrawer::Draw(), GetCenter(), and Height().

61  {
62  TGeoBBox const* pBox = asBox();
63  return pBox ? pBox->GetDY() : 0.0;
64  }
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not box-derived.
Definition: OpDetGeo.h:241
double geo::OpDetGeo::HalfL ( ) const

Definition at line 44 of file OpDetGeo.cxx.

References asBox().

Referenced by GetCenter(), Length(), and ThetaZ().

45  {
46  TGeoBBox const* pBox = asBox();
47  return pBox ? pBox->GetDZ() : 0.0;
48  }
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not box-derived.
Definition: OpDetGeo.h:241
double geo::OpDetGeo::HalfW ( ) const

Definition at line 52 of file OpDetGeo.cxx.

References asBox().

Referenced by evdb_tool::OpHit3DDrawer::Draw(), evdb_tool::DrawSimPhoton3D::Draw(), evdb_tool::OpFlash3DDrawer::Draw(), GetCenter(), and Width().

53  {
54  TGeoBBox const* pBox = asBox();
55  return pBox ? pBox->GetDX() : 0.0;
56  }
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not box-derived.
Definition: OpDetGeo.h:241
geo::OpDetID const& geo::OpDetGeo::ID ( ) const
inline

Returns the geometry ID of this optical detector.

Definition at line 70 of file OpDetGeo.h.

References fID.

Referenced by geo::DumpChannelMap::beginRun(), and PrintOpDetInfo().

70 { return fID; }
geo::OpDetID fID
Identifier of this optical detector.
Definition: OpDetGeo.h:232
bool geo::OpDetGeo::isBar ( ) const
inline

Returns whether the detector shape is a bar (TGeoBBox).

Definition at line 180 of file OpDetGeo.h.

Referenced by phot::PropagationTimeModel::opDetOrientations(), larg4::OpFastScintillation::OpFastScintillation(), phot::SemiAnalyticalModel::opticalDetectors(), and PrintOpDetInfo().

180 { return isShape<TGeoBBox>(); }
template<typename ShapeObj >
bool geo::OpDetGeo::isShape ( ) const

Returns whether the detector has the specified shape.

Template Parameters
ShapeObjtype of ROOT geometry object representing the shape
Returns
whether this detector has the specified shape
See also
isShapeLike(), isBox(), isSphere(), isTube()

Example:

bool const isSphere = opDet.isShape<TGeoSphere>();
bool const isBox = opDet.isShape<TGeoBBox>();

will have isSphere true only if the shape of this object is a sphere (TGeoSphere), and isBox true only if the shape of this object is a box (TGeoBBox).

Definition at line 252 of file OpDetGeo.h.

References Shape().

Referenced by Shape().

253 {
254  static_assert(std::is_base_of_v<TGeoShape, std::decay_t<ShapeObj>>);
255 
256  // C++ understanding of the business instead of ROOT's (no strong reason)
257  TGeoShape const* shape = Shape(); // needed to convince Clang 7 I really mean it
258  return typeid(*shape) == typeid(std::decay_t<ShapeObj>);
259 
260 } // geo::OpDetGeo::isShape()
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:139
template<typename ShapeObj >
bool geo::OpDetGeo::isShapeLike ( ) const

Returns whether the detector inherits from the specified shape.

Template Parameters
ShapeObjtype of ROOT geometry object representing the shape
Returns
whether this detector has a shape derived from the specified one
See also
isShape(), isBox(), isSphere(), isTube()

Example:

bool const isTubeLike = opDet.isShapeLike<TGeoTube>();

isTubeLike will be true if its shape is either a box (TGeoTube) or any other whose shape object is derived from TGeoTube (including for example a C-shape, half-cylinder).

Definition at line 264 of file OpDetGeo.h.

References Shape().

Referenced by Shape().

265 {
266  static_assert(std::is_base_of_v<TGeoShape, std::decay_t<ShapeObj>>);
267 
268  // C++ understanding of the business instead of ROOT's (no strong reason)
269  return dynamic_cast<std::decay_t<ShapeObj> const*>(Shape()) != nullptr;
270 
271 } // geo::OpDetGeo::isShapeLike()
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:139
bool geo::OpDetGeo::isSphere ( ) const
inline

Returns whether the detector shape is a hemisphere (TGeoSphere).

Definition at line 183 of file OpDetGeo.h.

References art::detail::indent(), OpDetInfo(), PrintOpDetInfo(), and UpdateAfterSorting().

Referenced by phot::PropagationTimeModel::opDetOrientations(), phot::SemiAnalyticalModel::opticalDetectors(), and PrintOpDetInfo().

183 { return isShape<TGeoSphere>(); }
bool geo::OpDetGeo::isTube ( ) const
inline

Returns whether the detector shape is a cylinder (TGeoTube).

Definition at line 177 of file OpDetGeo.h.

Referenced by PrintOpDetInfo().

177 { return isShapeLike<TGeoTube>(); }
double geo::OpDetGeo::Length ( ) const
inline

Definition at line 78 of file OpDetGeo.h.

References HalfL().

Referenced by larg4::OpFastScintillation::OpFastScintillation(), phot::SemiAnalyticalModel::opticalDetectors(), and PrintOpDetInfo().

78 { return 2.0 * HalfL(); }
double HalfL() const
Definition: OpDetGeo.cxx:44
const TGeoNode* geo::OpDetGeo::Node ( ) const
inline

Returns the ROOT object describing the detector geometry.

Definition at line 132 of file OpDetGeo.h.

References fOpDetNode.

Referenced by Shape().

132 { return fOpDetNode; }
const TGeoNode * fOpDetNode
Pointer to theopdet node.
Definition: OpDetGeo.h:229
std::string geo::OpDetGeo::OpDetInfo ( std::string  indent = "",
unsigned int  verbosity = 0 
) const

Returns a string with optical detector information.

See also
PrintOpDetInfo()

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

Definition at line 104 of file OpDetGeo.cxx.

References PrintOpDetInfo().

Referenced by isSphere().

106  {
107  std::ostringstream sstr;
108  PrintOpDetInfo(sstr, indent, verbosity);
109  return sstr.str();
110  }
std::string indent(std::size_t const i)
void PrintOpDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=0) const
Prints information about this optical detector.
Definition: OpDetGeo.h:275
template<typename Stream >
void geo::OpDetGeo::PrintOpDetInfo ( Stream &&  out,
std::string  indent = "",
unsigned int  verbosity = 0 
) const

Prints information about this optical detector.

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 _(default)_: only center
  • 1: also size
  • 2: also angle from z axis

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

Definition at line 275 of file OpDetGeo.h.

References asSphere(), e, lar::util::RealComparisons< RealType >::equal(), GetCenter(), Height(), ID(), isBar(), isSphere(), isTube(), Length(), lar_content::minmax(), lar::util::RealComparisons< RealType >::nonZero(), RMax(), RMin(), Shape(), ThetaZ(), Width(), and lar::util::RealComparisons< RealType >::zero().

Referenced by isSphere(), OpDetInfo(), and geo::GeometryCore::Print().

279 {
280 
282 
283  //----------------------------------------------------------------------------
284  out << "optical detector " << ID() << " centered at " << GetCenter() << " cm";
285 
286  if (verbosity-- <= 0) return; // 0
287 
288  //----------------------------------------------------------------------------
289  if (isTube()) {
290  out << ", radius: " << RMax() << " cm";
291  if (cmp.nonZero(RMin())) out << " (inner: " << RMin() << " cm)";
292  out << ", length: " << Length() << " cm";
293  }
294  else if (isBar()) {
295  out << ", bar size " << Width() << " x " << Height() << " x " << Length() << " cm";
296  }
297  else if (TGeoSphere const* sphere = asSphere(); sphere) {
298  assert(isSphere());
299  auto const [th1, th2] = std::minmax({sphere->GetTheta1(), sphere->GetTheta2()});
300  out << ", ";
301  // some information out of the interface
302  if (cmp.zero(th1) && cmp.equal(th2, 180.0))
303  out << "spherical";
304  else if ((cmp.zero(th1) && cmp.equal(th2, 90.0)) ||
305  (cmp.equal(th1, 90.0) && cmp.equal(th2, 180.0))) {
306  out << "hemispherical";
307  }
308  else
309  out << "spherical portion (" << th1 << " -> " << th2 << " degree)";
310  out << " with external radius " << RMax() << " cm";
311  }
312  else
313  out << ", shape: '" << Shape()->IsA()->GetName() << "'";
314 
315  if (verbosity-- <= 0) return; // 1
316 
317  //----------------------------------------------------------------------------
318  out << ", theta(z): " << ThetaZ() << " rad";
319 
320  // if (verbosity-- <= 0) return; // 2
321 
322  //----------------------------------------------------------------------------
323 
324 } // geo::OpDetGeo::PrintOpDetInfo()
TGeoSphere const * asSphere() const
Returns the geometry object as TGeoSphere, nullptr if not a sphere.
Definition: OpDetGeo.h:238
std::pair< float, float > minmax(const float a, const float b)
minmax
bool isTube() const
Returns whether the detector shape is a cylinder (TGeoTube).
Definition: OpDetGeo.h:177
Provides simple real number checks.
bool isBar() const
Returns whether the detector shape is a bar (TGeoBBox).
Definition: OpDetGeo.h:180
double RMin() const
Definition: OpDetGeo.cxx:68
bool isSphere() const
Returns whether the detector shape is a hemisphere (TGeoSphere).
Definition: OpDetGeo.h:183
double RMax() const
Definition: OpDetGeo.cxx:35
double Length() const
Definition: OpDetGeo.h:78
geo::Point_t const & GetCenter() const
Definition: OpDetGeo.h:72
double ThetaZ() const
Definition: OpDetGeo.cxx:76
geo::OpDetID const & ID() const
Returns the geometry ID of this optical detector.
Definition: OpDetGeo.h:70
double Width() const
Definition: OpDetGeo.h:79
Float_t e
Definition: plot.C:35
double Height() const
Definition: OpDetGeo.h:80
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:139
double geo::OpDetGeo::RMax ( ) const

Definition at line 35 of file OpDetGeo.cxx.

References asSphere(), and asTube().

Referenced by GetCenter(), and PrintOpDetInfo().

36  {
37  if (TGeoSphere const* sphere = asSphere(); sphere) { return sphere->GetRmax(); }
38  if (TGeoTube const* tube = asTube(); tube) { return tube->GetRmax(); }
39  throw std::bad_cast{};
40  }
TGeoSphere const * asSphere() const
Returns the geometry object as TGeoSphere, nullptr if not a sphere.
Definition: OpDetGeo.h:238
TGeoTube const * asTube() const
Returns the geometry object as TGeoTube, nullptr if not a tube.
Definition: OpDetGeo.h:235
double geo::OpDetGeo::RMin ( ) const

Definition at line 68 of file OpDetGeo.cxx.

References asSphere(), and asTube().

Referenced by GetCenter(), and PrintOpDetInfo().

69  {
70  if (TGeoSphere const* sphere = asSphere(); sphere) { return sphere->GetRmin(); }
71  if (TGeoTube const* tube = asTube(); tube) { return tube->GetRmin(); }
72  throw std::bad_cast{};
73  }
TGeoSphere const * asSphere() const
Returns the geometry object as TGeoSphere, nullptr if not a sphere.
Definition: OpDetGeo.h:238
TGeoTube const * asTube() const
Returns the geometry object as TGeoTube, nullptr if not a tube.
Definition: OpDetGeo.h:235
TGeoShape const* geo::OpDetGeo::Shape ( ) const
inline

Returns the geometry object as TGeoShape.

Definition at line 139 of file OpDetGeo.h.

References isShape(), isShapeLike(), and Node().

Referenced by asBox(), asSphere(), asTube(), isShape(), isShapeLike(), larg4::OpFastScintillation::OpFastScintillation(), and PrintOpDetInfo().

139 { return Node()->GetVolume()->GetShape(); }
const TGeoNode * Node() const
Returns the ROOT object describing the detector geometry.
Definition: OpDetGeo.h:132
double geo::OpDetGeo::ThetaZ ( ) const

returns angle of detector with respect to z axis in the Y-Z plane, in radians

Definition at line 76 of file OpDetGeo.cxx.

References util::abs(), util::end(), GetCenter(), HalfL(), util::pi(), and toWorldCoords().

Referenced by Height(), PrintOpDetInfo(), and ThetaZ().

77  {
78  auto const& center = GetCenter();
79  auto const& end = toWorldCoords(LocalPoint_t{0.0, 0.0, HalfL()});
80 
81  // TODO change this into something generic
82  //either y or x will be 0, so adding both will always catch the right
83  //one
84  double angle = (end.Y() - center.Y() + end.X() - center.X()) /
85  std::abs(end.Y() - center.Y() + center.X() - end.X()) *
86  std::acos((end.Z() - center.Z()) / HalfL());
87  if (angle < 0) angle += util::pi();
88  return angle;
89  }
constexpr auto abs(T v)
Returns the absolute value of the argument.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
double HalfL() const
Definition: OpDetGeo.cxx:44
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local optical detector frame to world frame.
Definition: OpDetGeo.h:106
geo::Point_t const & GetCenter() const
Definition: OpDetGeo.h:72
geo::OpticalPoint_t LocalPoint_t
Type of points in the local GDML TPC frame.
Definition: OpDetGeo.h:60
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
double geo::OpDetGeo::ThetaZ ( bool  degrees) const

returns angle of detector with respect to z axis in the Y-Z plane

Definition at line 92 of file OpDetGeo.cxx.

References util::RadiansToDegrees(), and ThetaZ().

93  {
94  return degree ? util::RadiansToDegrees(ThetaZ()) : ThetaZ();
95  }
double ThetaZ() const
Definition: OpDetGeo.cxx:76
constexpr T RadiansToDegrees(T angle)
Converts the argument angle from radians into degrees ( )
LocalPoint_t geo::OpDetGeo::toLocalCoords ( geo::Point_t const &  world) const
inline

Transform point from world frame to local optical detector frame.

Definition at line 118 of file OpDetGeo.h.

References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toLocalCoords().

Referenced by CosThetaFromNormal().

119  {
120  return fTrans.toLocalCoords(world);
121  }
LocalPoint_t toLocalCoords(GlobalPoint_t const &world) const
Transforms a point from world frame to local frame.
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:228
LocalVector_t geo::OpDetGeo::toLocalCoords ( geo::Vector_t const &  world) const
inline

Transform direction vector from world to local.

Definition at line 124 of file OpDetGeo.h.

References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toLocalCoords().

125  {
126  return fTrans.toLocalCoords(world);
127  }
LocalPoint_t toLocalCoords(GlobalPoint_t const &world) const
Transforms a point from world frame to local frame.
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:228
geo::Point_t geo::OpDetGeo::toWorldCoords ( LocalPoint_t const &  local) const
inline

Transform point from local optical detector frame to world frame.

Definition at line 106 of file OpDetGeo.h.

Referenced by Height(), OpDetGeo(), and ThetaZ().

107  {
108  return fTrans.toWorldCoords(local);
109  }
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:228
GlobalPoint_t toWorldCoords(LocalPoint_t const &local) const
Transforms a point from local frame to world frame.
geo::Vector_t geo::OpDetGeo::toWorldCoords ( LocalVector_t const &  local) const
inline

Transform direction vector from local to world.

Definition at line 112 of file OpDetGeo.h.

References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toWorldCoords().

113  {
114  return fTrans.toWorldCoords(local);
115  }
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:228
GlobalPoint_t toWorldCoords(LocalPoint_t const &local) const
Transforms a point from local frame to world frame.
void geo::OpDetGeo::UpdateAfterSorting ( geo::OpDetID  opdetid)

Performs all updates after cryostat has sorted the optical detectors.

Definition at line 120 of file OpDetGeo.cxx.

References fID.

Referenced by isSphere().

121  {
122  fID = opdetid;
123  }
geo::OpDetID fID
Identifier of this optical detector.
Definition: OpDetGeo.h:232
double geo::OpDetGeo::Width ( ) const
inline

Definition at line 79 of file OpDetGeo.h.

References HalfW().

Referenced by phot::PropagationTimeModel::opDetOrientations(), phot::SemiAnalyticalModel::opticalDetectors(), and PrintOpDetInfo().

79 { return 2.0 * HalfW(); }
double HalfW() const
Definition: OpDetGeo.cxx:52

Member Data Documentation

geo::Point_t geo::OpDetGeo::fCenter
private

Stored geometric center of the optical detector.

Definition at line 230 of file OpDetGeo.h.

Referenced by GetCenter(), and OpDetGeo().

geo::OpDetID geo::OpDetGeo::fID
private

Identifier of this optical detector.

Definition at line 232 of file OpDetGeo.h.

Referenced by ID(), and UpdateAfterSorting().

const TGeoNode* geo::OpDetGeo::fOpDetNode
private

Pointer to theopdet node.

Definition at line 229 of file OpDetGeo.h.

Referenced by Node(), and OpDetGeo().

LocalTransformation_t geo::OpDetGeo::fTrans
private

Optical-detector-to-world transformation.

Definition at line 228 of file OpDetGeo.h.

Referenced by Height(), toLocalCoords(), and toWorldCoords().

constexpr unsigned int geo::OpDetGeo::MaxVerbosity = 2
static

Maximum verbosity supported by PrintOpDetInfo().

Definition at line 222 of file OpDetGeo.h.

Referenced by geo::GeometryCore::Print().


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