8 #ifndef LARCOREALG_GEOMETRY_AUXDETGEO_H 9 #define LARCOREALG_GEOMETRY_AUXDETGEO_H 21 #include "Math/GenVector/DisplacementVector3D.h" 22 #include "Math/GenVector/PositionVector3D.h" 23 #include "TGeoVolume.h" 28 #include <type_traits> 150 template <
typename Stream>
159 std::string
AuxDetInfo(std::string
indent =
"",
unsigned int verbosity = 1)
const;
180 static_assert(std::is_move_assignable_v<AuxDetGeo>);
181 static_assert(std::is_move_constructible_v<AuxDetGeo>);
188 template <
typename Stream>
191 unsigned int verbosity
195 out <<
"\"" <<
Name() <<
"\"";
197 if (verbosity-- <= 0)
return;
200 out <<
" centered at " <<
GetCenter() <<
" cm";
202 if (verbosity-- <= 0)
return;
210 if (verbosity-- <= 0)
return;
213 out <<
"\n" << indent <<
"with ";
215 case 0: out <<
"no sensitive volume";
break;
216 case 1: out <<
"1 sensitive volume";
break;
220 if (verbosity-- <= 0)
return;
229 #endif // LARCOREALG_GEOMETRY_AUXDETGEO_H Point3DBase_t< AuxDetGeoCoordinatesTag > LocalPoint_t
Type of points in the local GDML auxiliary detector frame.
std::string AuxDetInfo(std::string indent="", unsigned int verbosity=1) const
Returns a string with auxiliary detector information.
AuxDetGeo(TGeoNode const *node, TransformationMatrix &&trans, AuxDetSensitiveList_t &&sensitive)
Vector3DBase_t< AuxDetGeoCoordinatesTag > LocalVector_t
Type of displacement vectors in the local GDML auxiliary detector frame.
constexpr bool nonEqual(Value_t a, Value_t b) const
Returns whether a and b are farther than the threshold.
double Length_t
Type used for coordinates and distances. They are measured in centimeters.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Encapsulate the geometry of the sensitive portion of an auxiliary detector .
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
double fHalfWidth2
2nd half width (width1==width2 for boxes), at +z/2
Provides simple real number checks.
LocalTransformation_t fTrans
Auxiliary detector-to-world transformation.
std::vector< AuxDetSensitiveGeo > AuxDetSensitiveList_t
Type of list of sensitive volumes.
Length_t DistanceToPoint(Point_t const &point) const
Returns the distance of point from the center of the detector.
AuxDetSensitiveGeo const & PositionToSensitiveVolume(Point_t const &point, size_t &sv) const
double fHalfWidth1
1st half width of volume, at -z/2 in local coordinates
Tag for vectors in the "local" GDML coordinate frame of the auxiliary detector.
Point_t GetCenter(double localz=0.0) const
Returns the geometric center of the sensitive volume.
double fLength
length of volume, along z direction in local
TGeoVolume const * fTotalVolume
Total volume of AuxDet, called vol*.
Class for approximate comparisons.
double HalfWidth2() const
Returns the distance of point from the center of the detector.
double HalfHeight() const
Returns the distance of point from the center of the detector.
LocalPoint_t toLocalCoords(Point_t const &world) const
Transform point from world frame to local auxiliary detector frame.
Definitions of geometry vector data types.
std::string indent(std::size_t const i)
size_t NSensitiveVolume() const
Vector_t GetNormalVector() const
Returns the unit normal vector to the detector.
Point_t toWorldCoords(LocalPoint_t const &local) const
Transform point from local auxiliary detector frame to world frame.
LocalVector_t toLocalCoords(Vector_t const &world) const
Transform direction vector from world to local.
std::size_t FindSensitiveVolume(Point_t const &point) const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
double Length() const
Returns the distance of point from the center of the detector.
const TGeoVolume * TotalVolume() const
Returns the distance of point from the center of the detector.
void SortSubVolumes(AuxDetGeoObjectSorter &sorter)
Vector_t toWorldCoords(LocalVector_t const &local) const
Transform direction vector from local to world.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintAuxDetInfo().
GenPoint3DBase_t< double, C > Point3DBase_t
Type of 3D point with representation in double precision.
GenVector3DBase_t< double, C > Vector3DBase_t
double HalfWidth1() const
Returns the distance of point from the center of the detector.
double fHalfHeight
half height of volume
void InitShapeSize()
Extracts the size of the detector from the geometry information.
void PrintAuxDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this auxiliary detector.
ROOT::Math::Transform3D TransformationMatrix
Type of transformation matrix used in geometry.
std::vector< AuxDetSensitiveGeo > fSensitive
sensitive volumes in the detector