17 #include "test/Geometry/geometry_unit_test_base.h" 77 if (++iParam < argc) config.SetConfigurationPath(argv[iParam]);
81 if (++iParam < argc) config.SetGeometryParameterSetPath(argv[iParam]);
94 for (
auto const& cryo: geom.IterateCryostats()) {
97 <<
"Partition for cryostat " << cryo.ID() <<
":";
111 <<
" not assigned to any TPC!";
114 else if (where->ID() !=
TPC.ID()) {
118 <<
" assigned to TPC " << where->ID() <<
":\n";
119 where->PrintTPCInfo(log,
" ", 5);
126 constexpr
int nXsteps = 5, nYsteps = 5, nZsteps = 5;
127 const double xstep =
TPC.HalfSizeX() / (nXsteps + 1);
128 const double ystep =
TPC.HalfSizeY() / (nYsteps + 1);
129 const double zstep =
TPC.HalfSizeZ() / (nZsteps + 1);
130 for (
int xs = -nXsteps; xs <= nXsteps; ++xs) {
131 double const x =
center.X() + xs * xstep;
132 for (
int ys = -nYsteps;
ys <= nYsteps; ++
ys) {
133 double const y =
center.Y() +
ys * ystep;
134 for (
int zs = -nZsteps;
zs <= nZsteps; ++
zs) {
135 double const z =
center.Z() +
zs * zstep;
141 <<
TPC.ID() <<
" (" << xs <<
"," <<
ys <<
"," <<
zs 142 <<
") not assigned to any TPC!";
145 else if (where->ID() !=
TPC.ID()) {
149 <<
TPC.ID() <<
" (" << xs <<
"," <<
ys <<
"," <<
zs 150 <<
") assigned to TPC " << where->ID() <<
":\n";
151 where->PrintTPCInfo(log,
" ", 5);
165 mf::LogError(
"geometry_test") << nErrors <<
" errors detected!";
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
Data structures and algorithms to partition a cryostat volume.
auto vector3D(Vector3D const &v)
Returns a manipulator which will print the specified vector.
Geometry information for a single TPC.
DriftPartitions buildDriftVolumes(geo::CryostatGeo const &cryo)
Creates a DriftPartitions object from the TPCs in a cryostat.
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
MaybeLogger_< ELseverityLevel::ELsev_error, true > LogProblem
Environment for a geometry test.
Description of geometry of one entire detector.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Class holding a configuration for a test environment.
testing::TesterEnvironment< testing::BasicEnvironmentConfiguration > TestEnvironment
int main(int argc, char const **argv)
Runs the test.
testing::GeometryTesterEnvironment< StandardGeometryConfiguration > StandardGeometryTestEnvironment
static constexpr double zs
Access the description of detector geometry.
static constexpr double ys