Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
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...
 
void GetCenter (double *xyz, double localz=0.0) const
 
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 CosThetaFromNormal (double const *xyz) const
 
double DistanceToPoint (geo::Point_t const &point) const
 Returns the distance of the specified point from detector center [cm]. More...
 
double DistanceToPoint (double const *xyz) const
 
Coordinate transformation

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

void LocalToWorld (const double *opdet, double *world) const
 Transform point from local optical detector frame to world frame. More...
 
geo::Point_t toWorldCoords (LocalPoint_t const &local) const
 Transform point from local optical detector frame to world frame. More...
 
void LocalToWorldVect (const double *opdet, double *world) const
 Transform direction vector from local to world. More...
 
geo::Vector_t toWorldCoords (LocalVector_t const &local) const
 Transform direction vector from local to world. More...
 
void WorldToLocal (const double *world, double *opdet) const
 Transform point from world frame to local optical detector frame. More...
 
LocalPoint_t toLocalCoords (geo::Point_t const &world) const
 Transform point from world frame to local optical detector frame. More...
 
void WorldToLocalVect (const double *world, double *opdet) const
 Transform direction vector from world to local. 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 43 of file OpDetGeo.h.

Member Typedef Documentation

Type of points in the local GDML TPC frame.

Definition at line 62 of file OpDetGeo.h.

Definition at line 244 of file OpDetGeo.h.

Type of displacement vectors in the local GDML TPC frame.

Definition at line 65 of file OpDetGeo.h.

Constructor & Destructor Documentation

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

Definition at line 26 of file OpDetGeo.cxx.

27  : fTrans(std::move(trans))
28  {
29  fOpDetNode = &node;
30 
31  fCenter = toWorldCoords(geo::origin<LocalPoint_t>());
32  }
const TGeoNode * fOpDetNode
Pointer to theopdet node.
Definition: OpDetGeo.h:247
def move(depos, offset)
Definition: depos.py:107
geo::Point_t fCenter
Stored geometric center of the optical detector.
Definition: OpDetGeo.h:248
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local optical detector frame to world frame.
Definition: OpDetGeo.h:116
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:246

Member Function Documentation

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

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

Definition at line 261 of file OpDetGeo.h.

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

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

Definition at line 257 of file OpDetGeo.h.

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

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

Definition at line 253 of file OpDetGeo.h.

254  { return dynamic_cast<TGeoTube const*>(Shape()); }
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:154
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 138 of file OpDetGeo.cxx.

138  {
139  auto const& local = toLocalCoords(point);
140  return local.Z() / local.R();
141  }
LocalPoint_t toLocalCoords(geo::Point_t const &world) const
Transform point from world frame to local optical detector frame.
Definition: OpDetGeo.h:132
double geo::OpDetGeo::CosThetaFromNormal ( double const *  xyz) const

Definition at line 142 of file OpDetGeo.cxx.

143  { return CosThetaFromNormal(geo::vect::makeFromCoords<geo::Point_t>(xyz)); }
double CosThetaFromNormal(geo::Point_t const &point) const
Get cos(angle) to normal of this detector - used for solid angle calcs.
Definition: OpDetGeo.cxx:138
double geo::OpDetGeo::DistanceToPoint ( geo::Point_t const &  point) const

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

Definition at line 123 of file OpDetGeo.cxx.

124  { return (point - GetCenter()).R(); }
geo::Point_t const & GetCenter() const
Definition: OpDetGeo.h:75
double geo::OpDetGeo::DistanceToPoint ( double const *  xyz) const

Definition at line 125 of file OpDetGeo.cxx.

126  { return DistanceToPoint(geo::vect::makeFromCoords<geo::Point_t>(xyz)); }
double DistanceToPoint(geo::Point_t const &point) const
Returns the distance of the specified point from detector center [cm].
Definition: OpDetGeo.cxx:123
void geo::OpDetGeo::GetCenter ( double *  xyz,
double  localz = 0.0 
) const

Return the center position of an opdet

Parameters
xyz: 3-D array. The returned location.
localz: Distance along the length of the volume (cm). Default is center of wire

Definition at line 40 of file OpDetGeo.cxx.

41  {
42  double xyzLocal[3] = {0.,0.,localz};
43  this->LocalToWorld(xyzLocal, xyz);
44  }
void LocalToWorld(const double *opdet, double *world) const
Transform point from local optical detector frame to world frame.
Definition: OpDetGeo.h:112
geo::Point_t const& geo::OpDetGeo::GetCenter ( ) const
inline

Definition at line 75 of file OpDetGeo.h.

75 { return fCenter; }
geo::Point_t fCenter
Stored geometric center of the optical detector.
Definition: OpDetGeo.h:248
double geo::OpDetGeo::HalfH ( ) const

Definition at line 79 of file OpDetGeo.cxx.

80  {
81  TGeoBBox const* pBox = asBox();
82  return pBox? pBox->GetDY(): 0.0;
83  }
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not box-derived.
Definition: OpDetGeo.h:261
double geo::OpDetGeo::HalfL ( ) const

Definition at line 63 of file OpDetGeo.cxx.

64  {
65  TGeoBBox const* pBox = asBox();
66  return pBox? pBox->GetDZ(): 0.0;
67  }
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not box-derived.
Definition: OpDetGeo.h:261
double geo::OpDetGeo::HalfW ( ) const

Definition at line 71 of file OpDetGeo.cxx.

72  {
73  TGeoBBox const* pBox = asBox();
74  return pBox? pBox->GetDX(): 0.0;
75  }
TGeoBBox const * asBox() const
Returns the geometry object as TGeoBBox, nullptr if not box-derived.
Definition: OpDetGeo.h:261
double geo::OpDetGeo::Height ( ) const
inline

Definition at line 83 of file OpDetGeo.h.

83 { return 2.0 * HalfH(); }
double HalfH() const
Definition: OpDetGeo.cxx:79
geo::OpDetID const& geo::OpDetGeo::ID ( ) const
inline

Returns the geometry ID of this optical detector.

Definition at line 72 of file OpDetGeo.h.

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

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

Definition at line 195 of file OpDetGeo.h.

195 { 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 274 of file OpDetGeo.h.

274  {
275  static_assert(std::is_base_of_v<TGeoShape, std::decay_t<ShapeObj>>);
276 
277  // C++ understanding of the business instead of ROOT's (no strong reason)
278  TGeoShape const* shape = Shape(); // needed to convince Clang 7 I really mean it
279  return typeid(*shape) == typeid(std::decay_t<ShapeObj>);
280 
281 } // geo::OpDetGeo::isShape()
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:154
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 285 of file OpDetGeo.h.

285  {
286  static_assert(std::is_base_of_v<TGeoShape, std::decay_t<ShapeObj>>);
287 
288  // C++ understanding of the business instead of ROOT's (no strong reason)
289  return dynamic_cast<std::decay_t<ShapeObj> const*>(Shape()) != nullptr;
290 
291 } // geo::OpDetGeo::isShapeLike()
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:154
bool geo::OpDetGeo::isSphere ( ) const
inline

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

Definition at line 198 of file OpDetGeo.h.

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

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

Definition at line 192 of file OpDetGeo.h.

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

Definition at line 81 of file OpDetGeo.h.

81 { return 2.0 * HalfL(); }
double HalfL() const
Definition: OpDetGeo.cxx:63
void geo::OpDetGeo::LocalToWorld ( const double *  opdet,
double *  world 
) const
inline

Transform point from local optical detector frame to world frame.

Definition at line 112 of file OpDetGeo.h.

113  { fTrans.LocalToWorld(opdet, world); }
void LocalToWorld(double const *local, double *world) const
Transforms a point from local frame to world frame.
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:246
void geo::OpDetGeo::LocalToWorldVect ( const double *  opdet,
double *  world 
) const
inline

Transform direction vector from local to world.

Definition at line 120 of file OpDetGeo.h.

121  { fTrans.LocalToWorldVect(opdet, world); }
void LocalToWorldVect(double const *local, double *world) const
Transforms a vector from local frame to world frame.
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:246
const TGeoNode* geo::OpDetGeo::Node ( ) const
inline

Returns the ROOT object describing the detector geometry.

Definition at line 146 of file OpDetGeo.h.

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

131  {
132  std::ostringstream sstr;
133  PrintOpDetInfo(sstr, indent, verbosity);
134  return sstr.str();
135  } // OpDetGeo::OpDetInfo()
void PrintOpDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=0) const
Prints information about this optical detector.
Definition: OpDetGeo.h:296
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 296 of file OpDetGeo.h.

300  {
301 
303 
304  //----------------------------------------------------------------------------
305  out << "optical detector " << ID() << " centered at " << GetCenter() << " cm";
306 
307  if (verbosity-- <= 0) return; // 0
308 
309  //----------------------------------------------------------------------------
310  if (isTube()) {
311  out << ", radius: " << RMax() << " cm";
312  if (cmp.nonZero(RMin())) out << " (inner: " << RMin() << " cm)";
313  out << ", length: " << Length() << " cm";
314  }
315  else if (isBar()) {
316  out << ", bar size " << Width() << " x " << Height() << " x " << Length()
317  << " cm";
318  }
319  else if (TGeoSphere const* sphere = asSphere(); sphere) {
320  assert(isSphere());
321  auto const [ th1, th2 ]
322  = std::minmax({ sphere->GetTheta1(), sphere->GetTheta2() });
323  out << ", ";
324  // some information out of the interface
325  if (cmp.zero(th1) && cmp.equal(th2, 180.0)) out << "spherical";
326  else if ((cmp.zero(th1) && cmp.equal(th2, 90.0))
327  || (cmp.equal(th1, 90.0) && cmp.equal(th2, 180.0)))
328  {
329  out << "hemispherical";
330  }
331  else out << "spherical portion (" << th1 << " -> " << th2 << " degree)";
332  out << " with external radius " << RMax() << " cm";
333  }
334  else out << ", shape: '" << Shape()->IsA()->GetName() << "'";
335 
336  if (verbosity-- <= 0) return; // 1
337 
338  //----------------------------------------------------------------------------
339  out << ", theta(z): " << ThetaZ() << " rad";
340 
341 // if (verbosity-- <= 0) return; // 2
342 
343  //----------------------------------------------------------------------------
344 
345 } // geo::OpDetGeo::PrintOpDetInfo()
TGeoSphere const * asSphere() const
Returns the geometry object as TGeoSphere, nullptr if not a sphere.
Definition: OpDetGeo.h:257
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:192
Provides simple real number checks.
bool isBar() const
Returns whether the detector shape is a bar (TGeoBBox).
Definition: OpDetGeo.h:195
double RMin() const
Definition: OpDetGeo.cxx:87
bool isSphere() const
Returns whether the detector shape is a hemisphere (TGeoSphere).
Definition: OpDetGeo.h:198
double RMax() const
Definition: OpDetGeo.cxx:48
const double e
double Length() const
Definition: OpDetGeo.h:81
geo::Point_t const & GetCenter() const
Definition: OpDetGeo.h:75
double ThetaZ() const
Definition: OpDetGeo.cxx:101
geo::OpDetID const & ID() const
Returns the geometry ID of this optical detector.
Definition: OpDetGeo.h:72
double Width() const
Definition: OpDetGeo.h:82
double Height() const
Definition: OpDetGeo.h:83
TGeoShape const * Shape() const
Returns the geometry object as TGeoShape.
Definition: OpDetGeo.h:154
double geo::OpDetGeo::RMax ( ) const

Definition at line 48 of file OpDetGeo.cxx.

49  {
50  if (TGeoSphere const* sphere = asSphere(); sphere) {
51  return sphere->GetRmax();
52  }
53  else if (TGeoTube const* tube = asTube(); tube) {
54  return tube->GetRmax();
55  }
56  else {
57  throw std::bad_cast{};
58  }
59  }
TGeoSphere const * asSphere() const
Returns the geometry object as TGeoSphere, nullptr if not a sphere.
Definition: OpDetGeo.h:257
TGeoTube const * asTube() const
Returns the geometry object as TGeoTube, nullptr if not a tube.
Definition: OpDetGeo.h:253
double geo::OpDetGeo::RMin ( ) const

Definition at line 87 of file OpDetGeo.cxx.

88  {
89  if (TGeoSphere const* sphere = asSphere(); sphere) {
90  return sphere->GetRmin();
91  }
92  else if (TGeoTube const* tube = asTube(); tube) {
93  return tube->GetRmin();
94  }
95  else {
96  throw std::bad_cast{};
97  }
98  }
TGeoSphere const * asSphere() const
Returns the geometry object as TGeoSphere, nullptr if not a sphere.
Definition: OpDetGeo.h:257
TGeoTube const * asTube() const
Returns the geometry object as TGeoTube, nullptr if not a tube.
Definition: OpDetGeo.h:253
TGeoShape const* geo::OpDetGeo::Shape ( ) const
inline

Returns the geometry object as TGeoShape.

Definition at line 154 of file OpDetGeo.h.

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

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

Definition at line 101 of file OpDetGeo.cxx.

102  {
103  auto const& center = GetCenter();
104  auto const& end = toWorldCoords(LocalPoint_t{ 0.0, 0.0, HalfL() });
105 
106  // TODO change this into something generic
107  //either y or x will be 0, so adding both will always catch the right
108  //one
109  double angle = (end.Y()-center.Y()+end.X()-center.X()) /
110  std::abs(end.Y()-center.Y()+center.X()-end.X()) *
111  std::acos((end.Z() - center.Z())/HalfL());
112  if (angle < 0) angle += util::pi();
113  return angle;
114  }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
T abs(T value)
double HalfL() const
Definition: OpDetGeo.cxx:63
geo::Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local optical detector frame to world frame.
Definition: OpDetGeo.h:116
geo::Point_t const & GetCenter() const
Definition: OpDetGeo.h:75
geo::OpticalPoint_t LocalPoint_t
Type of points in the local GDML TPC frame.
Definition: OpDetGeo.h:62
def center(depos, point)
Definition: depos.py:117
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 117 of file OpDetGeo.cxx.

118  { return degree? util::RadiansToDegrees(ThetaZ()): ThetaZ(); }
double ThetaZ() const
Definition: OpDetGeo.cxx:101
constexpr T RadiansToDegrees(T angle)
Converts the argument angle from radians into degrees ( )
static constexpr double degree
Definition: Units.h:161
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 132 of file OpDetGeo.h.

133  { 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:246
LocalVector_t geo::OpDetGeo::toLocalCoords ( geo::Vector_t const &  world) const
inline

Transform direction vector from world to local.

Definition at line 140 of file OpDetGeo.h.

141  { 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:246
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 116 of file OpDetGeo.h.

117  { return fTrans.toWorldCoords(local); }
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:246
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 124 of file OpDetGeo.h.

125  { return fTrans.toWorldCoords(local); }
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:246
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 146 of file OpDetGeo.cxx.

146  {
147 
148  fID = opdetid;
149 
150  } // OpDetGeo::UpdateAfterSorting()
geo::OpDetID fID
Identifier of this optical detector.
Definition: OpDetGeo.h:250
double geo::OpDetGeo::Width ( ) const
inline

Definition at line 82 of file OpDetGeo.h.

82 { return 2.0 * HalfW(); }
double HalfW() const
Definition: OpDetGeo.cxx:71
void geo::OpDetGeo::WorldToLocal ( const double *  world,
double *  opdet 
) const
inline

Transform point from world frame to local optical detector frame.

Definition at line 128 of file OpDetGeo.h.

129  { fTrans.WorldToLocal(world, opdet); }
void WorldToLocal(double const *world, double *local) const
Transforms a point from world frame to local frame.
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:246
void geo::OpDetGeo::WorldToLocalVect ( const double *  world,
double *  opdet 
) const
inline

Transform direction vector from world to local.

Definition at line 136 of file OpDetGeo.h.

137  { fTrans.WorldToLocalVect(world, opdet); }
LocalTransformation_t fTrans
Optical-detector-to-world transformation.
Definition: OpDetGeo.h:246
void WorldToLocalVect(const double *world, double *local) const
Transforms a vector from world frame to local frame.

Member Data Documentation

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

Stored geometric center of the optical detector.

Definition at line 248 of file OpDetGeo.h.

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

Identifier of this optical detector.

Definition at line 250 of file OpDetGeo.h.

const TGeoNode* geo::OpDetGeo::fOpDetNode
private

Pointer to theopdet node.

Definition at line 247 of file OpDetGeo.h.

LocalTransformation_t geo::OpDetGeo::fTrans
private

Optical-detector-to-world transformation.

Definition at line 246 of file OpDetGeo.h.

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

Maximum verbosity supported by PrintOpDetInfo().

Definition at line 240 of file OpDetGeo.h.


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