LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "OpDetGeo.h"
Classes | |
struct | OpDetGeoCoordinatesTag |
Tag for vectors in the "local" GDML coordinate frame of the TPC. More... | |
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, Remember the | |
using | LocalPoint_t = geo::Point3DBase_t< OpDetGeoCoordinatesTag > |
Type of points in the local GDML TPC frame. More... | |
using | LocalVector_t = geo::Vector3DBase_t< OpDetGeoCoordinatesTag > |
Type of displacement vectors in the local GDML TPC frame. More... | |
Public Member Functions | |
OpDetGeo (std::vector< const TGeoNode * > &path, int depth) | |
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 | Length () const |
double | ThetaZ () const |
double | ThetaZ (bool degrees) const |
const TGeoNode * | Node () const |
template<typename Stream > | |
void | PrintOpDetInfo (Stream &&out, std::string indent="", unsigned int verbosity=0) const |
Prints information about this optical detector. 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 |
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... | |
double | DistanceToPoint (double const *xyz) 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 | |
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... | |
Static Public Attributes | |
static constexpr unsigned int | MaxVerbosity = 2 |
Maximum verbosity supported by PrintOpDetInfo() . More... | |
Private Types | |
using | LocalTransformation_t = geo::LocalTransformationGeo< TGeoHMatrix, LocalPoint_t, LocalVector_t > |
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... | |
Definition at line 30 of file OpDetGeo.h.
Type of points in the local GDML TPC frame.
Definition at line 52 of file OpDetGeo.h.
|
private |
Definition at line 160 of file OpDetGeo.h.
Type of displacement vectors in the local GDML TPC frame.
Definition at line 55 of file OpDetGeo.h.
geo::OpDetGeo::OpDetGeo | ( | std::vector< const TGeoNode * > & | path, |
int | depth | ||
) |
Definition at line 32 of file OpDetGeo.cxx.
References fCenter, fOpDetNode, and toWorldCoords().
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 104 of file OpDetGeo.cxx.
References toLocalCoords().
Referenced by CosThetaFromNormal(), Length(), and phot::PhotonVisibilityService::SolidAngleFactor().
double geo::OpDetGeo::CosThetaFromNormal | ( | double const * | xyz | ) | const |
Get cos(angle) to normal of this detector - used for solid angle calcs.
Definition at line 108 of file OpDetGeo.cxx.
References CosThetaFromNormal().
double geo::OpDetGeo::DistanceToPoint | ( | geo::Point_t const & | point | ) | const |
Returns the distance of the specified point from detector center [cm].
Definition at line 97 of file OpDetGeo.cxx.
References GetCenter().
Referenced by phot::CreateHybridLibrary::CreateHybridLibrary(), phot::PhotonVisibilityService::DistanceToOpDet(), DistanceToPoint(), geo::CryostatGeo::GetClosestOpDet(), phot::PhotonLibraryHybrid::GetCount(), and Length().
double geo::OpDetGeo::DistanceToPoint | ( | double const * | xyz | ) | const |
Returns the distance of the specified point from detector center [cm].
Definition at line 99 of file OpDetGeo.cxx.
References DistanceToPoint().
void geo::OpDetGeo::GetCenter | ( | double * | xyz, |
double | localz = 0.0 |
||
) | const |
Return the center position of an opdet
xyz | : 3-D array. The returned location. |
localz | : Distance along the length of the volume (cm). Default is center of wire |
Definition at line 47 of file OpDetGeo.cxx.
References LocalToWorld().
Referenced by phot::CreateHybridLibrary::CreateHybridLibrary(), cosmic::BeamFlashTrackMatchTaggerAlg::FillFlashProperties(), opdet::FlashHypothesisAnaAlg::FillOpDetPositions(), larg4::OpDetLookup::FindClosestOpDet(), and larg4::OpFastScintillation::RecordPhotonsProduced().
|
inline |
Definition at line 63 of file OpDetGeo.h.
References fCenter, HalfL(), RMax(), and RMin().
Referenced by DistanceToPoint(), PrintOpDetInfo(), and ThetaZ().
double geo::OpDetGeo::HalfL | ( | ) | const |
Definition at line 62 of file OpDetGeo.cxx.
References fOpDetNode.
Referenced by GetCenter(), Length(), and ThetaZ().
|
inline |
Definition at line 67 of file OpDetGeo.h.
References CosThetaFromNormal(), DistanceToPoint(), fTrans, HalfL(), geo::LocalTransformation< StoredMatrix >::LocalToWorld(), LocalToWorld(), and ThetaZ().
Referenced by PrintOpDetInfo().
|
inline |
Transform point from local optical detector frame to world frame.
Definition at line 96 of file OpDetGeo.h.
Referenced by geo::DUNE_opdet_sort(), GetCenter(), Length(), and geo::opdet_sort().
|
inline |
Transform direction vector from local to world.
Definition at line 104 of file OpDetGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::LocalToWorldVect().
|
inline |
Definition at line 130 of file OpDetGeo.h.
References fOpDetNode, art::detail::indent(), and PrintOpDetInfo().
void geo::OpDetGeo::PrintOpDetInfo | ( | Stream && | out, |
std::string | indent = "" , |
||
unsigned int | verbosity = 0 |
||
) | const |
Prints information about this optical detector.
Stream | type of output stream to use |
out | stream to send the information to |
indent | prepend each line with this string |
verbosity | amount of information printed |
Note that the first line out the output is not indented.
The constant MaxVerbosity
is set to the highest supported verbosity level.
Definition at line 175 of file OpDetGeo.h.
References GetCenter(), Length(), RMax(), RMin(), and ThetaZ().
Referenced by Node(), and geo::GeometryCore::Print().
double geo::OpDetGeo::RMax | ( | ) | const |
Definition at line 55 of file OpDetGeo.cxx.
References fOpDetNode.
Referenced by GetCenter(), and PrintOpDetInfo().
double geo::OpDetGeo::RMin | ( | ) | const |
Definition at line 69 of file OpDetGeo.cxx.
References fOpDetNode.
Referenced by GetCenter(), and PrintOpDetInfo().
double geo::OpDetGeo::ThetaZ | ( | ) | const |
returns angle of detector with respect to z axis in the Y-Z plane, in radians
Definition at line 75 of file OpDetGeo.cxx.
References evd::details::end(), GetCenter(), HalfL(), util::pi(), and toWorldCoords().
Referenced by Length(), PrintOpDetInfo(), and ThetaZ().
double geo::OpDetGeo::ThetaZ | ( | bool | degrees | ) | const |
returns angle of detector with respect to z axis in the Y-Z plane
Definition at line 91 of file OpDetGeo.cxx.
References util::RadiansToDegrees(), and ThetaZ().
|
inline |
Transform point from world frame to local optical detector frame.
Definition at line 116 of file OpDetGeo.h.
References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toLocalCoords().
Referenced by CosThetaFromNormal().
|
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().
|
inline |
Transform point from local optical detector frame to world frame.
Definition at line 100 of file OpDetGeo.h.
References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toWorldCoords().
Referenced by OpDetGeo(), and ThetaZ().
|
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().
|
inline |
Transform point from world frame to local optical detector frame.
Definition at line 112 of file OpDetGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::WorldToLocal().
|
inline |
Transform direction vector from world to local.
Definition at line 120 of file OpDetGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::WorldToLocalVect().
|
private |
Stored geometric center of the optical detector.
Definition at line 164 of file OpDetGeo.h.
Referenced by GetCenter(), and OpDetGeo().
|
private |
Pointer to theopdet node.
Definition at line 163 of file OpDetGeo.h.
Referenced by HalfL(), Node(), OpDetGeo(), RMax(), and RMin().
|
private |
Optical-detector-to-world transformation.
Definition at line 162 of file OpDetGeo.h.
Referenced by Length(), LocalToWorldVect(), toLocalCoords(), toWorldCoords(), WorldToLocal(), and WorldToLocalVect().
|
static |
Maximum verbosity supported by PrintOpDetInfo()
.
Definition at line 156 of file OpDetGeo.h.
Referenced by geo::GeometryCore::Print().