24 #include "messagefacility/MessageLogger/MessageLogger.h"
67 int main(
int argc,
char const** argv) {
94 for (
auto const& cryo: geom.IterateCryostats()) {
96 mf::LogVerbatim(
"driftvolumes_test")
97 <<
"Partition for cryostat " << cryo.ID() <<
":";
98 partition.print(mf::LogVerbatim(
"driftvolumes_test"));
107 auto where = partition.TPCat(center);
109 mf::LogProblem(
"driftvolumes_test")
111 <<
" not assigned to any TPC!";
114 else if (where->ID() !=
TPC.ID()) {
115 mf::LogProblem log(
"driftvolumes_test");
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;
137 auto where = partition.TPCat({
x,
y, z});
139 mf::LogProblem(
"driftvolumes_test")
141 <<
TPC.ID() <<
" (" << xs <<
"," << ys <<
"," << zs
142 <<
") not assigned to any TPC!";
145 else if (where->ID() !=
TPC.ID()) {
146 mf::LogProblem log(
"driftvolumes_test");
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!";
Base class for objects initializing a geometry.
process_name opflash particleana ie ie ie z
Data structures and algorithms to partition a cryostat volume.
auto vector3D(Vector3D const &v)
Returns a manipulator which will print the specified vector.
Prov const * Provider() const
Return the specified provider (throws if not available)
process_name opflash particleana ie x
Geometry information for a single TPC.
DriftPartitions buildDriftVolumes(geo::CryostatGeo const &cryo)
Creates a DriftPartitions object from the TPCs in a cryostat.
Access the description of detector geometry.
void SetGeometryParameterSetPath(std::string path)
Sets the FHiCL path for the geometry configuration.
Utilities to dump objects into a stream.
process_name opflash particleana ie ie y
Description of geometry of one entire detector.
void SetConfigurationPath(std::string path)
Sets the path to the configuration file.
testing::TesterEnvironment< testing::BasicEnvironmentConfiguration > TestEnvironment
Interface to algorithm class for a specific detector channel mapping.
int main(int argc, char **argv)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.