LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "AuxDetSensitiveGeo.h"
Classes | |
struct | AuxDetSensitiveGeoCoordinatesTag |
Public Types | |
Types for geometry-local reference vectors. | |
These types represents points and displacement vectors in the reference frame defined in the auxiliary 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< AuxDetSensitiveGeoCoordinatesTag > |
Type of points in the local GDML auxiliary detector frame. More... | |
using | LocalVector_t = geo::Vector3DBase_t< AuxDetSensitiveGeoCoordinatesTag > |
Type of displacement vectors in the local GDML auxiliary detector frame. More... | |
Public Member Functions | |
AuxDetSensitiveGeo (std::vector< const TGeoNode * > const &path, int depth) | |
AuxDetSensitiveGeo (const TGeoVolume *volume, TGeoHMatrix const &rotation) | |
AuxDetSensitiveGeo (const TGeoVolume *volume, TGeoHMatrix &&rotation) | |
void | GetCenter (double *xyz, double localz=0.0) const |
Return the center position of an AuxDet. More... | |
geo::Point_t | GetCenter (double localz=0.0) const |
Returns the geometric center of the sensitive volume. More... | |
geo::Vector_t | GetNormalVector () const |
Returns the unit normal vector to the detector. More... | |
void | GetNormalVector (double *xyzDir) const |
double | Length () const |
double | HalfLength () const |
double | HalfWidth1 () const |
double | HalfWidth2 () const |
double | HalfCenterWidth () const |
double | HalfHeight () const |
const TGeoVolume * | TotalVolume () const |
template<typename Stream > | |
void | PrintAuxDetInfo (Stream &&out, std::string indent="", unsigned int verbosity=0) const |
Prints information about this auxiliary sensitive detector. More... | |
geo::Length_t | DistanceToPoint (geo::Point_t const &point) const |
Returns the distance of point from the center of the detector. More... | |
geo::Length_t | DistanceToPoint (double const *point) const |
Returns the distance of point from the center of the detector. More... | |
Coordinate transformation | |
void | LocalToWorld (const double *auxdet, double *world) const |
Transform point from local auxiliary detector frame to world frame. More... | |
geo::Point_t | toWorldCoords (LocalPoint_t const &local) const |
Transform point from local auxiliary detector frame to world frame. More... | |
void | LocalToWorldVect (const double *auxdet, 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 *auxdet) const |
Transform point from world frame to local auxiliary detector frame. More... | |
LocalPoint_t | toLocalCoords (geo::Point_t const &world) const |
Transform point from world frame to local auxiliary detector frame. More... | |
void | WorldToLocalVect (const double *world, double *auxdet) 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 PrintAuxDetInfo() . More... | |
Private Types | |
using | LocalTransformation_t = geo::LocalTransformationGeo< TGeoHMatrix, LocalPoint_t, LocalVector_t > |
Private Member Functions | |
void | InitShapeSize () |
Extracts the size of the detector from the geometry information. More... | |
Private Attributes | |
LocalTransformation_t | fTrans |
Auxiliary detector-to-world transformation. More... | |
const TGeoVolume * | fTotalVolume |
Total volume of AuxDet, called vol*. More... | |
double | fLength |
length of volume, along z direction in local More... | |
double | fHalfWidth1 |
1st half width of volume, at -z/2 in local coordinates More... | |
double | fHalfWidth2 |
2nd half width (width1==width2 for boxes), at +z/2 More... | |
double | fHalfHeight |
half height of volume More... | |
Definition at line 30 of file AuxDetSensitiveGeo.h.
Type of points in the local GDML auxiliary detector frame.
Definition at line 53 of file AuxDetSensitiveGeo.h.
|
private |
Definition at line 172 of file AuxDetSensitiveGeo.h.
using geo::AuxDetSensitiveGeo::LocalVector_t = geo::Vector3DBase_t<AuxDetSensitiveGeoCoordinatesTag> |
Type of displacement vectors in the local GDML auxiliary detector frame.
Definition at line 56 of file AuxDetSensitiveGeo.h.
geo::AuxDetSensitiveGeo::AuxDetSensitiveGeo | ( | std::vector< const TGeoNode * > const & | path, |
int | depth | ||
) |
Definition at line 26 of file AuxDetSensitiveGeo.cxx.
References fTotalVolume, InitShapeSize(), and LOG_DEBUG.
geo::AuxDetSensitiveGeo::AuxDetSensitiveGeo | ( | const TGeoVolume * | volume, |
TGeoHMatrix const & | rotation | ||
) |
Definition at line 42 of file AuxDetSensitiveGeo.cxx.
References fTotalVolume, InitShapeSize(), and LOG_DEBUG.
geo::AuxDetSensitiveGeo::AuxDetSensitiveGeo | ( | const TGeoVolume * | volume, |
TGeoHMatrix && | rotation | ||
) |
Definition at line 55 of file AuxDetSensitiveGeo.cxx.
References fTotalVolume, InitShapeSize(), and LOG_DEBUG.
|
inline |
Returns the distance of point
from the center of the detector.
Definition at line 100 of file AuxDetSensitiveGeo.h.
Referenced by DistanceToPoint(), and TotalVolume().
geo::Length_t geo::AuxDetSensitiveGeo::DistanceToPoint | ( | double const * | point | ) | const |
Returns the distance of point
from the center of the detector.
Definition at line 97 of file AuxDetSensitiveGeo.cxx.
References DistanceToPoint(), and geo::vect::makePointFromCoords().
void geo::AuxDetSensitiveGeo::GetCenter | ( | double * | xyz, |
double | localz = 0.0 |
||
) | const |
Return the center position of an AuxDet.
xyz | _(output)_ the returned location: { x, y, z } [cm] |
localz | (default: 0 ) distance along the length of the volume (z) [cm] |
Definition at line 72 of file AuxDetSensitiveGeo.cxx.
Referenced by PrintAuxDetInfo(), and TotalVolume().
geo::Point_t geo::AuxDetSensitiveGeo::GetCenter | ( | double | localz = 0.0 | ) | const |
Returns the geometric center of the sensitive volume.
localz | (default: 0 ) distance from the center along the length of the volume (z) [cm] |
Definition at line 68 of file AuxDetSensitiveGeo.cxx.
References toWorldCoords().
geo::Vector_t geo::AuxDetSensitiveGeo::GetNormalVector | ( | ) | const |
Returns the unit normal vector to the detector.
Definition at line 82 of file AuxDetSensitiveGeo.cxx.
References toWorldCoords().
Referenced by GetNormalVector(), and PrintAuxDetInfo().
void geo::AuxDetSensitiveGeo::GetNormalVector | ( | double * | xyzDir | ) | const |
Fills the unit normal vector to the detector.
Definition at line 88 of file AuxDetSensitiveGeo.cxx.
References GetNormalVector(), and norm.
|
inline |
|
inline |
Definition at line 95 of file AuxDetSensitiveGeo.h.
References fHalfHeight.
Referenced by geo::AuxDetChannelMapAlg::NearestSensitiveAuxDet(), geo::ChannelMapAlg::NearestSensitiveAuxDet(), and PrintAuxDetInfo().
|
inline |
|
inline |
Definition at line 92 of file AuxDetSensitiveGeo.h.
References fHalfWidth1.
Referenced by HalfCenterWidth(), geo::AuxDetChannelMapAlg::NearestSensitiveAuxDet(), geo::ChannelMapAlg::NearestSensitiveAuxDet(), and PrintAuxDetInfo().
|
inline |
Definition at line 93 of file AuxDetSensitiveGeo.h.
References fHalfWidth2.
Referenced by HalfCenterWidth(), geo::AuxDetChannelMapAlg::NearestSensitiveAuxDet(), geo::ChannelMapAlg::NearestSensitiveAuxDet(), and PrintAuxDetInfo().
|
private |
Extracts the size of the detector from the geometry information.
Definition at line 102 of file AuxDetSensitiveGeo.cxx.
References fHalfHeight, fHalfWidth1, fHalfWidth2, fLength, and fTotalVolume.
Referenced by AuxDetSensitiveGeo().
|
inline |
Definition at line 90 of file AuxDetSensitiveGeo.h.
References fLength.
Referenced by HalfLength(), geo::AuxDetChannelMapAlg::NearestSensitiveAuxDet(), geo::ChannelMapAlg::NearestSensitiveAuxDet(), and PrintAuxDetInfo().
|
inline |
Transform point from local auxiliary detector frame to world frame.
Definition at line 109 of file AuxDetSensitiveGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::LocalToWorld().
|
inline |
Transform direction vector from local to world.
Definition at line 117 of file AuxDetSensitiveGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::LocalToWorldVect().
void geo::AuxDetSensitiveGeo::PrintAuxDetInfo | ( | Stream && | out, |
std::string | indent = "" , |
||
unsigned int | verbosity = 0 |
||
) | const |
Prints information about this auxiliary sensitive 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 193 of file AuxDetSensitiveGeo.h.
References e, GetCenter(), GetNormalVector(), HalfHeight(), HalfWidth1(), HalfWidth2(), Length(), and lar::util::RealComparisons< RealType >::nonEqual().
Referenced by geo::GeometryCore::Print(), and toLocalCoords().
|
inline |
Transform point from world frame to local auxiliary detector frame.
Definition at line 129 of file AuxDetSensitiveGeo.h.
References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toLocalCoords().
|
inline |
Transform direction vector from world to local.
Definition at line 137 of file AuxDetSensitiveGeo.h.
References fTrans, art::detail::indent(), PrintAuxDetInfo(), and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toLocalCoords().
|
inline |
Definition at line 96 of file AuxDetSensitiveGeo.h.
References DistanceToPoint(), fTotalVolume, and GetCenter().
Referenced by geo::sortAuxDetSensitiveStandard().
|
inline |
Transform point from local auxiliary detector frame to world frame.
Definition at line 113 of file AuxDetSensitiveGeo.h.
References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toWorldCoords().
Referenced by GetCenter(), and GetNormalVector().
|
inline |
Transform direction vector from local to world.
Definition at line 121 of file AuxDetSensitiveGeo.h.
References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toWorldCoords().
|
inline |
Transform point from world frame to local auxiliary detector frame.
Definition at line 125 of file AuxDetSensitiveGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::WorldToLocal().
Referenced by geo::AuxDetChannelMapAlg::NearestSensitiveAuxDet(), and geo::ChannelMapAlg::NearestSensitiveAuxDet().
|
inline |
Transform direction vector from world to local.
Definition at line 133 of file AuxDetSensitiveGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::WorldToLocalVect().
|
private |
half height of volume
Definition at line 179 of file AuxDetSensitiveGeo.h.
Referenced by HalfHeight(), and InitShapeSize().
|
private |
1st half width of volume, at -z/2 in local coordinates
Definition at line 177 of file AuxDetSensitiveGeo.h.
Referenced by HalfWidth1(), and InitShapeSize().
|
private |
2nd half width (width1==width2 for boxes), at +z/2
Definition at line 178 of file AuxDetSensitiveGeo.h.
Referenced by HalfWidth2(), and InitShapeSize().
|
private |
length of volume, along z direction in local
Definition at line 176 of file AuxDetSensitiveGeo.h.
Referenced by InitShapeSize(), and Length().
|
private |
Total volume of AuxDet, called vol*.
Definition at line 175 of file AuxDetSensitiveGeo.h.
Referenced by AuxDetSensitiveGeo(), InitShapeSize(), and TotalVolume().
|
private |
Auxiliary detector-to-world transformation.
Definition at line 174 of file AuxDetSensitiveGeo.h.
Referenced by LocalToWorld(), LocalToWorldVect(), toLocalCoords(), toWorldCoords(), WorldToLocal(), and WorldToLocalVect().
|
static |
Maximum verbosity supported by PrintAuxDetInfo()
.
Definition at line 167 of file AuxDetSensitiveGeo.h.
Referenced by geo::GeometryCore::Print().