LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "AuxDetGeo.h"
Classes | |
struct | AuxDetGeoCoordinatesTag |
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< AuxDetGeoCoordinatesTag > |
Type of points in the local GDML auxiliary detector frame. More... | |
using | LocalVector_t = geo::Vector3DBase_t< AuxDetGeoCoordinatesTag > |
Type of displacement vectors in the local GDML auxiliary detector frame. More... | |
Public Member Functions | |
AuxDetGeo (std::vector< const TGeoNode * > &path, int depth) | |
~AuxDetGeo () | |
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 |
Fills the unit normal vector to the detector. More... | |
std::string | Name () const |
AuxDetSensitiveGeo const & | SensitiveVolume (size_t sv) const |
size_t | NSensitiveVolume () const |
void | SortSubVolumes (geo::GeoObjectSorter const &sorter) |
template<typename Stream > | |
void | PrintAuxDetInfo (Stream &&out, std::string indent="", unsigned int verbosity=1) const |
Prints information about this auxiliary detector. More... | |
Box geometry | |
double | Length () const |
Returns the distance of point from the center of the detector. More... | |
double | HalfWidth1 () const |
Returns the distance of point from the center of the detector. More... | |
double | HalfWidth2 () const |
Returns the distance of point from the center of the detector. More... | |
double | HalfHeight () const |
Returns the distance of point from the center of the detector. More... | |
const TGeoVolume * | TotalVolume () const |
Returns the distance of point from the center of the 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... | |
Access to the sensitive volumes in the detector | |
std::size_t | FindSensitiveVolume (geo::Point_t const &point) const |
std::size_t | FindSensitiveVolume (double const worldLoc[3]) const |
AuxDetSensitiveGeo const & | PositionToSensitiveVolume (geo::Point_t const &point, size_t &sv) const |
AuxDetSensitiveGeo const & | PositionToSensitiveVolume (double const worldLoc[3], size_t &sv) const |
Static Public Attributes | |
static constexpr unsigned int | MaxVerbosity = 4 |
Maximum verbosity supported by PrintAuxDetInfo() . More... | |
Private Types | |
using | LocalTransformation_t = geo::LocalTransformationGeo< TGeoHMatrix, LocalPoint_t, LocalVector_t > |
Private Member Functions | |
void | FindAuxDetSensitive (std::vector< const TGeoNode * > &path, unsigned int depth) |
void | MakeAuxDetSensitive (std::vector< const TGeoNode * > &path, int depth) |
void | InitShapeSize () |
Extracts the size of the detector from the geometry information. More... | |
Private Attributes | |
const TGeoVolume * | fTotalVolume |
Total volume of AuxDet, called vol*. More... | |
LocalTransformation_t | fTrans |
Auxiliary detector-to-world transformation. 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... | |
std::vector< AuxDetSensitiveGeo * > | fSensitive |
sensitive volumes in the detector More... | |
Definition at line 31 of file AuxDetGeo.h.
Type of points in the local GDML auxiliary detector frame.
Definition at line 53 of file AuxDetGeo.h.
|
private |
Definition at line 199 of file AuxDetGeo.h.
Type of displacement vectors in the local GDML auxiliary detector frame.
Definition at line 56 of file AuxDetGeo.h.
geo::AuxDetGeo::AuxDetGeo | ( | std::vector< const TGeoNode * > & | path, |
int | depth | ||
) |
Definition at line 28 of file AuxDetGeo.cxx.
References FindAuxDetSensitive(), fSensitive, fTotalVolume, fTrans, InitShapeSize(), LOG_DEBUG, and geo::LocalTransformation< StoredMatrix >::Matrix().
geo::AuxDetGeo::~AuxDetGeo | ( | ) |
Definition at line 56 of file AuxDetGeo.cxx.
References fSensitive.
|
inline |
Returns the distance of point
from the center of the detector.
Definition at line 99 of file AuxDetGeo.h.
Referenced by DistanceToPoint(), and TotalVolume().
geo::Length_t geo::AuxDetGeo::DistanceToPoint | ( | double const * | point | ) | const |
Returns the distance of point
from the center of the detector.
Definition at line 122 of file AuxDetGeo.cxx.
References DistanceToPoint(), and geo::vect::makePointFromCoords().
|
private |
Definition at line 62 of file AuxDetGeo.cxx.
References MakeAuxDetSensitive().
Referenced by AuxDetGeo().
std::size_t geo::AuxDetGeo::FindSensitiveVolume | ( | geo::Point_t const & | point | ) | const |
geo::Point_t
argument instead Definition at line 126 of file AuxDetGeo.cxx.
References fSensitive, max, and SensitiveVolume().
Referenced by FindSensitiveVolume(), Name(), and PositionToSensitiveVolume().
std::size_t geo::AuxDetGeo::FindSensitiveVolume | ( | double const | worldLoc[3] | ) | const |
geo::Point_t
argument instead Definition at line 156 of file AuxDetGeo.cxx.
References FindSensitiveVolume(), geo::vect::makePointFromCoords(), and PositionToSensitiveVolume().
void geo::AuxDetGeo::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 97 of file AuxDetGeo.cxx.
Referenced by PrintAuxDetInfo(), and TotalVolume().
geo::Point_t geo::AuxDetGeo::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 93 of file AuxDetGeo.cxx.
References toWorldCoords().
geo::Vector_t geo::AuxDetGeo::GetNormalVector | ( | ) | const |
Returns the unit normal vector to the detector.
Definition at line 107 of file AuxDetGeo.cxx.
References toWorldCoords().
Referenced by GetNormalVector(), and PrintAuxDetInfo().
void geo::AuxDetGeo::GetNormalVector | ( | double * | xyzDir | ) | const |
Fills the unit normal vector to the detector.
Definition at line 113 of file AuxDetGeo.cxx.
References GetNormalVector(), and norm.
|
inline |
Returns the distance of point
from the center of the detector.
Definition at line 93 of file AuxDetGeo.h.
References fHalfHeight.
Referenced by PrintAuxDetInfo().
|
inline |
Returns the distance of point
from the center of the detector.
Definition at line 91 of file AuxDetGeo.h.
References fHalfWidth1.
Referenced by PrintAuxDetInfo().
|
inline |
Returns the distance of point
from the center of the detector.
Definition at line 92 of file AuxDetGeo.h.
References fHalfWidth2.
Referenced by PrintAuxDetInfo().
|
private |
Extracts the size of the detector from the geometry information.
Definition at line 186 of file AuxDetGeo.cxx.
References fHalfHeight, fHalfWidth1, fHalfWidth2, fLength, and fTotalVolume.
Referenced by AuxDetGeo().
|
inline |
Returns the distance of point
from the center of the detector.
Definition at line 90 of file AuxDetGeo.h.
References fLength.
Referenced by PrintAuxDetInfo().
|
inline |
Transform point from local auxiliary detector frame to world frame.
Definition at line 108 of file AuxDetGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::LocalToWorld().
|
inline |
Transform direction vector from local to world.
Definition at line 116 of file AuxDetGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::LocalToWorldVect().
|
private |
Definition at line 87 of file AuxDetGeo.cxx.
References fSensitive.
Referenced by FindAuxDetSensitive().
|
inline |
Definition at line 142 of file AuxDetGeo.h.
References FindSensitiveVolume(), fTotalVolume, and PositionToSensitiveVolume().
Referenced by PrintAuxDetInfo().
|
inline |
Definition at line 160 of file AuxDetGeo.h.
References fSensitive, art::detail::indent(), PrintAuxDetInfo(), and SortSubVolumes().
Referenced by geo::AuxDetChannelMapAlg::NearestSensitiveAuxDet(), geo::ChannelMapAlg::NearestSensitiveAuxDet(), geo::GeometryCore::Print(), PrintAuxDetInfo(), and larg4::LArG4::produce().
AuxDetSensitiveGeo const & geo::AuxDetGeo::PositionToSensitiveVolume | ( | geo::Point_t const & | point, |
size_t & | sv | ||
) | const |
geo::Point_t
argument instead Definition at line 162 of file AuxDetGeo.cxx.
References FindSensitiveVolume(), max, and SensitiveVolume().
Referenced by FindSensitiveVolume(), Name(), and PositionToSensitiveVolume().
AuxDetSensitiveGeo const & geo::AuxDetGeo::PositionToSensitiveVolume | ( | double const | worldLoc[3], |
size_t & | sv | ||
) | const |
geo::Point_t
argument instead Definition at line 174 of file AuxDetGeo.cxx.
References geo::vect::makePointFromCoords(), and PositionToSensitiveVolume().
void geo::AuxDetGeo::PrintAuxDetInfo | ( | Stream && | out, |
std::string | indent = "" , |
||
unsigned int | verbosity = 1 |
||
) | const |
Prints information about this auxiliary 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 225 of file AuxDetGeo.h.
References e, GetCenter(), GetNormalVector(), HalfHeight(), HalfWidth1(), HalfWidth2(), Length(), Name(), lar::util::RealComparisons< RealType >::nonEqual(), and NSensitiveVolume().
Referenced by NSensitiveVolume(), and geo::GeometryCore::Print().
|
inline |
Definition at line 159 of file AuxDetGeo.h.
References fSensitive.
Referenced by geo::AuxDetGeometryCore::ChannelToAuxDetSensitive(), geo::GeometryCore::ChannelToAuxDetSensitive(), FindSensitiveVolume(), geo::AuxDetChannelMapAlg::NearestSensitiveAuxDet(), geo::ChannelMapAlg::NearestSensitiveAuxDet(), geo::AuxDetGeometryCore::PositionToAuxDetSensitive(), geo::GeometryCore::PositionToAuxDetSensitive(), PositionToSensitiveVolume(), and geo::GeometryCore::Print().
void geo::AuxDetGeo::SortSubVolumes | ( | geo::GeoObjectSorter const & | sorter | ) |
Definition at line 178 of file AuxDetGeo.cxx.
References fSensitive, and geo::GeoObjectSorter::SortAuxDetSensitive().
Referenced by NSensitiveVolume().
|
inline |
Transform point from world frame to local auxiliary detector frame.
Definition at line 128 of file AuxDetGeo.h.
References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toLocalCoords().
|
inline |
Transform direction vector from world to local.
Definition at line 136 of file AuxDetGeo.h.
References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toLocalCoords().
|
inline |
Returns the distance of point
from the center of the detector.
Definition at line 94 of file AuxDetGeo.h.
References DistanceToPoint(), fTotalVolume, and GetCenter().
Referenced by geo::sortAuxDetStandard().
|
inline |
Transform point from local auxiliary detector frame to world frame.
Definition at line 112 of file AuxDetGeo.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 120 of file AuxDetGeo.h.
References fTrans, and geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toWorldCoords().
|
inline |
Transform point from world frame to local auxiliary detector frame.
Definition at line 124 of file AuxDetGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::WorldToLocal().
|
inline |
Transform direction vector from world to local.
Definition at line 132 of file AuxDetGeo.h.
References fTrans, and geo::LocalTransformation< StoredMatrix >::WorldToLocalVect().
|
private |
half height of volume
Definition at line 212 of file AuxDetGeo.h.
Referenced by HalfHeight(), and InitShapeSize().
|
private |
1st half width of volume, at -z/2 in local coordinates
Definition at line 210 of file AuxDetGeo.h.
Referenced by HalfWidth1(), and InitShapeSize().
|
private |
2nd half width (width1==width2 for boxes), at +z/2
Definition at line 211 of file AuxDetGeo.h.
Referenced by HalfWidth2(), and InitShapeSize().
|
private |
length of volume, along z direction in local
Definition at line 209 of file AuxDetGeo.h.
Referenced by InitShapeSize(), and Length().
|
private |
sensitive volumes in the detector
Definition at line 213 of file AuxDetGeo.h.
Referenced by AuxDetGeo(), FindSensitiveVolume(), MakeAuxDetSensitive(), NSensitiveVolume(), SensitiveVolume(), SortSubVolumes(), and ~AuxDetGeo().
|
private |
Total volume of AuxDet, called vol*.
Definition at line 207 of file AuxDetGeo.h.
Referenced by AuxDetGeo(), InitShapeSize(), Name(), and TotalVolume().
|
private |
Auxiliary detector-to-world transformation.
Definition at line 208 of file AuxDetGeo.h.
Referenced by AuxDetGeo(), LocalToWorld(), LocalToWorldVect(), toLocalCoords(), toWorldCoords(), WorldToLocal(), and WorldToLocalVect().
|
static |
Maximum verbosity supported by PrintAuxDetInfo()
.
Definition at line 193 of file AuxDetGeo.h.
Referenced by geo::GeometryCore::Print().