10#ifndef ALGO_GeoVolume_h
11#define ALGO_GeoVolume_h 1
13#include <boost/serialization/access.hpp>
29 double lo{+std::numeric_limits<double>::max()};
30 double up{-std::numeric_limits<double>::max()};
41 lo = std::min(
lo, other.
lo);
42 up = std::max(
up, other.
up);
71 GeoVolume(
double xMin,
double xMax,
double yMin,
double yMax,
double zMin,
double zMax);
77 GeoVolume(std::pair<double, double>
x, std::pair<double, double>
y, std::pair<double, double> z);
85 bool IsValid()
const {
return fX.IsValid() &&
fY.IsValid() &&
fZ.IsValid(); }
133 template<
class Archive>
A representation of a geometrical volume of different tracking stations.
double GetSizeX() const
Gets size in x-direction [cm].
bool HasOverlapWith(const GeoVolume &other) const
Checks, if the volume overlaps with another volume.
double GetMaxZ() const
Gets upper bound in z-diretion [cm].
void serialize(Archive &ar, const unsigned int)
double GetSizeY() const
Gets size in y-direction [cm].
double GetCenterZ() const
Gets center in z-direction [cm].
double GetCenterY() const
Gets center in y-direction [cm].
double GetMaxX() const
Gets upper bound in x-direction [cm].
double GetMinX() const
Gets lower bound in x-direction [cm].
double GetMinZ() const
Gets lower bound in z-diretion [cm].
double GetCenterX() const
Gets center in x-direction [cm].
double GetMinY() const
Gets lower bound in y-direction [cm].
double GetMaxY() const
Gets upper bound in y-direction [cm].
GeoVolume & operator+=(const GeoVolume &other)
Compound assignment of another volume.
friend class boost::serialization::access
Serialization method.
std::string ToString() const
String representation of the class.
GeoVolume()=default
Default constructor.
bool IsValid() const
Checks validity of the volume.
double GetSizeZ() const
Gets size in z-direction [cm].
A volume dimension representation.
double lo
Lower bound of the dimension.
double up
Upper bound of the dimension.
double Center() const
Center of the dimension.
bool HasOverlapWith(const Dimension &other) const
Checks, if the dimension has an overlap with another dimension.
Dimension & operator+=(const Dimension &other)
Compound assignment of another dimension.
Dimension()=default
Default constructor.
double Size() const
Size of the dimension.
Dimension(double lo_, double up_)
Constructor.
bool IsValid() const
Checks, if the dimension is valid.