15 #include "Math/GenVector/Rotation3D.h"
20 std::cout <<
"*********FIRST BY firstChild, firstChild, nextSibling, nextSibling*********" << std::endl;
22 <<
":" << rhs.
copyno() << std::endl;
26 <<
":" << rhs.
copyno() << std::endl;
30 <<
":" << rhs.
copyno() << std::endl;
34 <<
":" << rhs.
copyno() << std::endl;
38 <<
":" << rhs.
copyno() << std::endl;
41 std::cout <<
"*********THEN BY next, next, next, next*********" << std::endl;
45 <<
":" << rhs.
copyno() << std::endl;
49 <<
":" << rhs.
copyno() << std::endl;
53 <<
":" << rhs.
copyno() << std::endl;
59 <<
":" << rhs.
copyno() << std::endl;
79 while (git1 != gend1 && git2 != gend2 && ret) {
86 }
else if (!git1->empty() && !git2->empty()) {
87 auto cit1 = git1->begin();
88 auto cend1 = git1->end();
89 auto cit2 = git2->begin();
90 auto cend2 = git2->end();
92 while (cit1 != cend1 && cit2 != cend2) {
102 if (
p1->copyno() !=
p2->copyno() || !
DDCompareLP(ddcurLP1, ddcurLP2, ddco)) {
104 <<
p1->copyno() <<
" 2: " << ddcurLP2.
name().
fullname() <<
":" <<
p2->copyno() << std::endl;
108 std::cout <<
"Failed to match translation " << std::endl;
112 std::cout <<
"Failed to match rotation " << std::endl;
119 }
else if (git1->size() != git2->size()) {
121 std::cout <<
"DDCompactViews are different because number of children do not match" << std::endl;
122 std::cout <<
"graph1 size of edge_list: " << git1->size() <<
" and graph2 size of edge_list: " << git2->size()
149 switch (lhs.
shape()) {
174 <<
" even though their names match " << std::endl;
178 <<
" even though their names and shape type match." << std::endl;
198 bool DDCompareDBLVEC(
const std::vector<double>& lhs,
const std::vector<double>& rhs,
double tol) {
200 std::ios_base::fmtflags originalFlags =
std::cout.flags();
201 int originalPrecision =
std::cout.precision();
202 if (lhs.size() != rhs.size()) {
204 std::cout <<
"Size of vectors do not match." << std::endl;
206 for (
size_t i = 0;
i < lhs.size(); ++
i) {
207 if (std::fabs(lhs[
i] - rhs[
i]) > tol) {
209 std::cout <<
"Vector content at index " << i <<
" does not match ";
210 std::cout << std::setw(12) << std::fixed << std::setprecision(4) << lhs[
i] <<
" != " << rhs[
i] << std::endl;
225 std::cout <<
"BooleanSolid names do not match ";
228 std::cout <<
"BooleanSolid shape types do not match ";
231 std::cout <<
"BooleanSolid parameters do not match ";
234 std::cout <<
"BooleanSolid SolidA solids do not match ";
237 std::cout <<
"BooleanSolid SolidB solids do not match ";
240 std::cout <<
"BooleanSolid Translations do not match ";
243 std::cout <<
"BooleanSolid Rotations do not match ";
254 if (std::fabs(lhs.x() - rhs.x()) > tol || std::fabs(lhs.y() - rhs.y()) > tol || std::fabs(lhs.z() - rhs.z()) > tol) {
282 double dist = Distance(lhs, rhs);
283 if (std::fabs(dist) > tol) {
284 std::cout <<
"Rotation matrices do not match." << std::endl;
288 lhs.GetComponents(x, y, z);
289 std::cout << std::setw(12) << std::fixed << std::setprecision(4) << x.X();
290 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.X();
291 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.X();
292 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Y();
293 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Y();
294 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Y();
295 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Z();
296 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Z();
297 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Z() << std::endl;
299 rhs.GetComponents(x, y, z);
300 std::cout << std::setw(12) << std::fixed << std::setprecision(4) << x.X();
301 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.X();
302 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.X();
303 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Y();
304 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Y();
305 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Y();
306 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Z();
307 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Z();
308 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Z() << std::endl;
bool next()
set current node to the next node in the expanded tree
math::Graph< DDLogicalPart, DDPosData * > Graph
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
tuple ret
prodAgent to be discontinued
bool parent()
set the current node to the parent node ...
Relative position of a child-volume inside a parent-volume.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >> DD3Vector
std::vector< double >::size_type index_type
DDTranslation translation(void) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Compact representation of the geometrical detector hierarchy.
A DDSolid represents the shape of a part.
DDSolid solidB(void) const
Represents a uniquely identifyable rotation matrix.
DDRotation rotation(void) const
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
int depth() const
depth of the scope. 0 means unrestricted depth.
const std::string fullname() const
uint16_t const *__restrict__ x
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
DDSolidShape shape(void) const
The type of the solid.
Graph::const_adj_iterator adjl_iterator
DDSolid solidA(void) const
const Graph & graph() const
Provides read-only access to the data structure of the compact-view.
DDComparators need to know if names of DDRotation matter.
int copyno() const
Copy number associated with the current node.
bool firstChild()
set the current node to the first child ...
bool nextSibling()
set the current node to the next sibling ...
const DDRotationMatrix & rotation() const
Returns the read-only rotation-matrix.
adj_list::const_iterator const_adj_iterator
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the expanded-view.
Provides an exploded view of the detector (tree-view)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
const std::string & name() const
Returns the name.