LArSoft  v10_04_05
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 = OpticalPoint_t
 Type of points in the local GDML TPC frame. More...
 
using LocalVector_t = OpticalVector_t
 Type of displacement vectors in the local GDML TPC frame. More...
 

Public Member Functions

 OpDetGeo (TGeoNode const *node, TransformationMatrix &&trans)
 
OpDetID const & ID () const
 Returns the geometry ID of this optical detector. More...
 
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 (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 (Point_t const &point) const
 Get cos(angle) to normal of this detector - used for solid angle calcs. More...
 
double DistanceToPoint (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.

Point_t toWorldCoords (LocalPoint_t const &local) const
 Transform point from local optical detector frame to world frame. More...
 
Vector_t toWorldCoords (LocalVector_t const &local) const
 Transform direction vector from local to world. More...
 
LocalPoint_t toLocalCoords (Point_t const &world) const
 Transform point from world frame to local optical detector frame. More...
 
LocalVector_t toLocalCoords (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 = 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...
 
Point_t fCenter
 Stored geometric center of the optical detector. More...
 
OpDetID fID
 Identifier of this optical detector. More...
 

Detailed Description

Definition at line 41 of file OpDetGeo.h.

Member Typedef Documentation

Type of points in the local GDML TPC frame.

Definition at line 59 of file OpDetGeo.h.

Definition at line 213 of file OpDetGeo.h.

Type of displacement vectors in the local GDML TPC frame.

Definition at line 62 of file OpDetGeo.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file OpDetGeo.cxx.

References fCenter, and toWorldCoords().

26  : fTrans(std::move(trans)), fOpDetNode{node}, fCenter{toWorldCoords(origin<LocalPoint_t>())}
27  {}
Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local optical detector frame to world frame.
Definition: OpDetGeo.h:105
const TGeoNode * fOpDetNode
Pointer to theopdet node.
Definition: OpDetGeo.h:216
Point_t fCenter
Stored geometric center of the optical detector.
Definition: OpDetGeo.h:217
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:215

Member Function Documentation

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

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

Definition at line 228 of file OpDetGeo.h.

References Shape().

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

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

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

Definition at line 225 of file OpDetGeo.h.

References Shape().

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

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

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

Definition at line 222 of file OpDetGeo.h.

References Shape().

Referenced by RMax(), and RMin().

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

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

Definition at line 109 of file OpDetGeo.cxx.

References toLocalCoords().

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

110  {
111  auto const& local = toLocalCoords(point);
112  return local.Z() / local.R();
113  }
LocalPoint_t toLocalCoords(Point_t const &world) const
Transform point from world frame to local optical detector frame.
Definition: OpDetGeo.h:111
double geo::OpDetGeo::DistanceToPoint ( Point_t const &  point) const

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

Definition at line 94 of file OpDetGeo.cxx.

References GetCenter().

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

95  {
96  return (point - GetCenter()).R();
97  }
Point_t const & GetCenter() const
Definition: OpDetGeo.h:71
double geo::OpDetGeo::HalfH ( ) const

Definition at line 56 of file OpDetGeo.cxx.

References asBox().

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

57  {
58  TGeoBBox const* pBox = asBox();
59  return pBox ? pBox->GetDY() : 0.0;
60  }
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not box-derived.
Definition: OpDetGeo.h:228
double geo::OpDetGeo::HalfL ( ) const

Definition at line 40 of file OpDetGeo.cxx.

References asBox().

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

41  {
42  TGeoBBox const* pBox = asBox();
43  return pBox ? pBox->GetDZ() : 0.0;
44  }
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not box-derived.
Definition: OpDetGeo.h:228
double geo::OpDetGeo::HalfW ( ) const

Definition at line 48 of file OpDetGeo.cxx.

References asBox().

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

49  {
50  TGeoBBox const* pBox = asBox();
51  return pBox ? pBox->GetDX() : 0.0;
52  }
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not box-derived.
Definition: OpDetGeo.h:228
OpDetID const& geo::OpDetGeo::ID ( ) const
inline

Returns the geometry ID of this optical detector.

Definition at line 69 of file OpDetGeo.h.

References fID.

Referenced by PrintOpDetInfo().

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

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

Definition at line 167 of file OpDetGeo.h.

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

167 { 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 239 of file OpDetGeo.h.

References Shape().

Referenced by Shape().

240 {
241  static_assert(std::is_base_of_v<TGeoShape, std::decay_t<ShapeObj>>);
242 
243  // C++ understanding of the business instead of ROOT's (no strong reason)
244  TGeoShape const* shape = Shape(); // needed to convince Clang 7 I really mean it
245  return typeid(*shape) == typeid(std::decay_t<ShapeObj>);
246 }
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:126
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 250 of file OpDetGeo.h.

References Shape().

Referenced by Shape().

251 {
252  static_assert(std::is_base_of_v<TGeoShape, std::decay_t<ShapeObj>>);
253 
254  // C++ understanding of the business instead of ROOT's (no strong reason)
255  return dynamic_cast<std::decay_t<ShapeObj> const*>(Shape()) != nullptr;
256 }
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:126
bool geo::OpDetGeo::isSphere ( ) const
inline

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

Definition at line 170 of file OpDetGeo.h.

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

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

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

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

Definition at line 164 of file OpDetGeo.h.

Referenced by PrintOpDetInfo().

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

Definition at line 77 of file OpDetGeo.h.

References HalfL().

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

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

Returns the ROOT object describing the detector geometry.

Definition at line 119 of file OpDetGeo.h.

References fOpDetNode.

Referenced by Shape().

119 { return fOpDetNode; }
const TGeoNode * fOpDetNode
Pointer to theopdet node.
Definition: OpDetGeo.h:216
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 100 of file OpDetGeo.cxx.

References PrintOpDetInfo().

Referenced by isSphere().

102  {
103  std::ostringstream sstr;
104  PrintOpDetInfo(sstr, indent, verbosity);
105  return sstr.str();
106  }
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:260
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 260 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 geo::WireReadoutDumper::dumpCryostat(), isSphere(), OpDetInfo(), and geo::GeometryCore::Print().

264 {
265 
267 
268  //----------------------------------------------------------------------------
269  out << "optical detector " << ID() << " centered at " << GetCenter() << " cm";
270 
271  if (verbosity-- <= 0) return; // 0
272 
273  //----------------------------------------------------------------------------
274  if (isTube()) {
275  out << ", radius: " << RMax() << " cm";
276  if (cmp.nonZero(RMin())) out << " (inner: " << RMin() << " cm)";
277  out << ", length: " << Length() << " cm";
278  }
279  else if (isBar()) {
280  out << ", bar size " << Width() << " x " << Height() << " x " << Length() << " cm";
281  }
282  else if (TGeoSphere const* sphere = asSphere(); sphere) {
283  assert(isSphere());
284  auto const [th1, th2] = std::minmax({sphere->GetTheta1(), sphere->GetTheta2()});
285  out << ", ";
286  // some information out of the interface
287  if (cmp.zero(th1) && cmp.equal(th2, 180.0))
288  out << "spherical";
289  else if ((cmp.zero(th1) && cmp.equal(th2, 90.0)) ||
290  (cmp.equal(th1, 90.0) && cmp.equal(th2, 180.0))) {
291  out << "hemispherical";
292  }
293  else
294  out << "spherical portion (" << th1 << " -> " << th2 << " degree)";
295  out << " with external radius " << RMax() << " cm";
296  }
297  else
298  out << ", shape: '" << Shape()->IsA()->GetName() << "'";
299 
300  if (verbosity-- <= 0) return; // 1
301 
302  //----------------------------------------------------------------------------
303  out << ", theta(z): " << ThetaZ() << " rad";
304 
305  // if (verbosity-- <= 0) return; // 2
306 
307  //----------------------------------------------------------------------------
308 
309 } // geo::OpDetGeo::PrintOpDetInfo()
TGeoSphere const * asSphere() const
Returns the geometry object as TGeoSphere, nullptr if not a sphere.
Definition: OpDetGeo.h:225
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:164
Provides simple real number checks.
bool isBar() const
Returns whether the detector shape is a bar (TGeoBBox).
Definition: OpDetGeo.h:167
Point_t const & GetCenter() const
Definition: OpDetGeo.h:71
double RMin() const
Definition: OpDetGeo.cxx:64
bool isSphere() const
Returns whether the detector shape is a hemisphere (TGeoSphere).
Definition: OpDetGeo.h:170
double RMax() const
Definition: OpDetGeo.cxx:31
double Length() const
Definition: OpDetGeo.h:77
OpDetID const & ID() const
Returns the geometry ID of this optical detector.
Definition: OpDetGeo.h:69
double ThetaZ() const
Definition: OpDetGeo.cxx:72
double Width() const
Definition: OpDetGeo.h:78
Float_t e
Definition: plot.C:35
double Height() const
Definition: OpDetGeo.h:79
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:126
double geo::OpDetGeo::RMax ( ) const

Definition at line 31 of file OpDetGeo.cxx.

References asSphere(), and asTube().

Referenced by GetCenter(), and PrintOpDetInfo().

32  {
33  if (TGeoSphere const* sphere = asSphere(); sphere) { return sphere->GetRmax(); }
34  if (TGeoTube const* tube = asTube(); tube) { return tube->GetRmax(); }
35  throw std::bad_cast{};
36  }
TGeoSphere const * asSphere() const
Returns the geometry object as TGeoSphere, nullptr if not a sphere.
Definition: OpDetGeo.h:225
TGeoTube const * asTube() const
Returns the geometry object as TGeoTube, nullptr if not a tube.
Definition: OpDetGeo.h:222
double geo::OpDetGeo::RMin ( ) const

Definition at line 64 of file OpDetGeo.cxx.

References asSphere(), and asTube().

Referenced by GetCenter(), and PrintOpDetInfo().

65  {
66  if (TGeoSphere const* sphere = asSphere(); sphere) { return sphere->GetRmin(); }
67  if (TGeoTube const* tube = asTube(); tube) { return tube->GetRmin(); }
68  throw std::bad_cast{};
69  }
TGeoSphere const * asSphere() const
Returns the geometry object as TGeoSphere, nullptr if not a sphere.
Definition: OpDetGeo.h:225
TGeoTube const * asTube() const
Returns the geometry object as TGeoTube, nullptr if not a tube.
Definition: OpDetGeo.h:222
TGeoShape const* geo::OpDetGeo::Shape ( ) const
inline

Returns the geometry object as TGeoShape.

Definition at line 126 of file OpDetGeo.h.

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

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

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

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

Definition at line 72 of file OpDetGeo.cxx.

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

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

73  {
74  auto const& center = GetCenter();
75  auto const& end = toWorldCoords(LocalPoint_t{0.0, 0.0, HalfL()});
76 
77  // TODO change this into something generic
78  //either y or x will be 0, so adding both will always catch the right
79  //one
80  double angle = (end.Y() - center.Y() + end.X() - center.X()) /
81  std::abs(end.Y() - center.Y() + center.X() - end.X()) *
82  std::acos((end.Z() - center.Z()) / HalfL());
83  if (angle < 0) angle += util::pi();
84  return angle;
85  }
Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local optical detector frame to world frame.
Definition: OpDetGeo.h:105
Point_t const & GetCenter() const
Definition: OpDetGeo.h:71
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:40
OpticalPoint_t LocalPoint_t
Type of points in the local GDML TPC frame.
Definition: OpDetGeo.h:59
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 88 of file OpDetGeo.cxx.

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

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

Transform point from world frame to local optical detector frame.

Definition at line 111 of file OpDetGeo.h.

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

Referenced by CosThetaFromNormal().

111 { return fTrans.toLocalCoords(world); }
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:215
LocalVector_t geo::OpDetGeo::toLocalCoords ( Vector_t const &  world) const
inline

Transform direction vector from world to local.

Definition at line 114 of file OpDetGeo.h.

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

114 { return fTrans.toLocalCoords(world); }
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:215
Point_t geo::OpDetGeo::toWorldCoords ( LocalPoint_t const &  local) const
inline

Transform point from local optical detector frame to world frame.

Definition at line 105 of file OpDetGeo.h.

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

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

Transform direction vector from local to world.

Definition at line 108 of file OpDetGeo.h.

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

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

Performs all updates after cryostat has sorted the optical detectors.

Definition at line 116 of file OpDetGeo.cxx.

References fID.

Referenced by isSphere().

117  {
118  fID = opdetid;
119  }
OpDetID fID
Identifier of this optical detector.
Definition: OpDetGeo.h:219
double geo::OpDetGeo::Width ( ) const
inline

Definition at line 78 of file OpDetGeo.h.

References HalfW().

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

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

Member Data Documentation

Point_t geo::OpDetGeo::fCenter
private

Stored geometric center of the optical detector.

Definition at line 217 of file OpDetGeo.h.

Referenced by GetCenter(), and OpDetGeo().

OpDetID geo::OpDetGeo::fID
private

Identifier of this optical detector.

Definition at line 219 of file OpDetGeo.h.

Referenced by ID(), and UpdateAfterSorting().

const TGeoNode* geo::OpDetGeo::fOpDetNode
private

Pointer to theopdet node.

Definition at line 216 of file OpDetGeo.h.

Referenced by Node().

LocalTransformation_t geo::OpDetGeo::fTrans
private

Optical-detector-to-world transformation.

Definition at line 215 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 209 of file OpDetGeo.h.

Referenced by geo::WireReadoutDumper::dumpCryostat(), and geo::GeometryCore::Print().


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