52 std::cout <<
"*********FIRST BY firstChild, firstChild, nextSibling, nextSibling*********" << std::endl;
78 std::cout <<
"*********THEN BY next, next, next, next*********" << std::endl;
115 adjl_iterator git1 = g1.
begin();
116 adjl_iterator gend1 = g1.
end();
117 adjl_iterator git2 = g2.
begin();
118 adjl_iterator gend2 = g2.
end();
124 while ( git1 != gend1 && git2 != gend2 && ret ) {
131 }
else if (git1->size() && git2->size() ) {
132 DDCompactView::graph_type::edge_list::const_iterator cit1 = git1->begin();
133 DDCompactView::graph_type::edge_list::const_iterator cend1 = git1->end();
134 DDCompactView::graph_type::edge_list::const_iterator cit2 = git2->begin();
135 DDCompactView::graph_type::edge_list::const_iterator cend2 = git2->end();
137 while ( cit1 != cend1 && cit2 != cend2 ) {
152 if (
p1->copyno_ !=
p2->copyno_ ||
154 std::cout <<
"Failed to match node (fullname:copy_no): 1: "
160 std::cout <<
"Failed to match translation " << std::endl;
170 std::cout <<
"Failed to match rotation " << std::endl;
177 }
else if ( git1->size() != git2->size() ) {
179 std::cout <<
"DDCompactViews are different because number of children do not match" << std::endl;
180 std::cout <<
"graph1 size of edge_list: " << git1->size() <<
" and graph2 size of edge_list: " << git2->size() << std::endl;
214 switch ( lhs.
shape() ) {
241 <<
" even though their names match " << std::endl;
246 <<
" even though their names and shape type match." << std::endl;
266 std::cout <<
"Unreflected volumes of DDReflections do not match. Reflections are "
285 std::ios_base::fmtflags originalFlags =
std::cout.flags();
286 int originalPrecision =
std::cout.precision();
287 if( lhs.size() != rhs.size())
290 std::cout <<
"Size of vectors do not match." << std::endl;
294 for(
size_t i = 0;
i < lhs.size() ; ++
i )
296 if( std::fabs( lhs[
i] - rhs[
i] ) >
tol_ )
299 std::cout <<
"Vector content at index " << i <<
" does not match " ;
300 std::cout << std::setw(12) << std::fixed << std::setprecision(4) << lhs[
i] <<
" != " << rhs[
i] << std::endl;
307 std::cout.precision( originalPrecision );
318 std::cout <<
"BooleanSolid names do not match ";
321 std::cout <<
"BooleanSolid shape types do not match ";
324 std::cout <<
"BooleanSolid parameters do not match ";
327 std::cout <<
"BooleanSolid SolidA solids do not match ";
330 std::cout <<
"BooleanSolid SolidB solids do not match ";
333 std::cout <<
"BooleanSolid Translations do not match ";
336 std::cout <<
"BooleanSolid Rotations do not match ";
352 if ( std::fabs(lhs.x() - rhs.x()) >
tol_
353 || std::fabs(lhs.y() - rhs.y()) >
tol_
354 || std::fabs(lhs.z() - rhs.z()) >
tol_ ) {
368 std::cout <<
"DDRotation names do not match "
373 std::cout <<
"DDRotationMatrix values do not match "
391 double dist = Distance(lhs,rhs);
392 if ( std::fabs(dist) >
tol_ ) {
393 std::cout <<
"Rotation matrices do not match." << std::endl;
397 lhs.GetComponents(x,y,z);
398 std::cout << std::setw(12) << std::fixed << std::setprecision(4) << x.X();
399 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.X();
400 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.X();
401 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Y();
402 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Y();
403 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Y();
404 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Z();
405 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Z();
406 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Z() << std::endl;
408 rhs.GetComponents(x,y,z);
409 std::cout << std::setw(12) << std::fixed << std::setprecision(4) << x.X();
410 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.X();
411 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.X();
412 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Y();
413 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Y();
414 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Y();
415 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Z();
416 std::cout <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Z();
417 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
const DDRotationMatrix * rotation() const
Returns the read-only rotation-matrix.
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
bool parent()
set the current node to the parent node ...
Relative position of a child-volume inside a parent-volume.
bool operator()(const DDCompactView &lhs, const DDCompactView &rhs) const
const graph_type & graph() const
Provides read-only access to the data structure of the compact-view.
Needs to know about rotmat because of BooleanSolid.
const N & nodeData(const edge_type &) const
const E & edgeData(index_type i) const
DDTranslation translation(void) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
std::vector< double >::size_type index_type
type of data representation of DDCompactView
Needs to know because of Rotation Matrix of Boolean Relationship.
A DDSolid represents the shape of a part.
DDSolid solidB(void) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
bool operator()(const DDTranslation &lhs, const DDTranslation &rhs) const
Represents a uniquely identifyable rotation matrix.
DDSolid unreflected(void) const
DDRotation rotation(void) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
bool operator()(const DDLogicalPart &lhs, const DDLogicalPart &rhs) const
int depth() const
depth of the scope. 0 means unrestricted depth.
const std::string fullname() const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
DDSolidShape shape(void) const
The type of the solid.
bool operator()(const std::vector< double > &lhs, const std::vector< double > &rhs) const
bool operator()(DDExpandedView &lhs, DDExpandedView &rhs) const
bool operator()(const DDSolid &lhs, const DDSolid &rhs) const
bool operator()(const DDBooleanSolid &lhs, const DDBooleanSolid &rhs) const
DDSolid solidA(void) const
DDComparators need to know if names of DDRotation matter.
bool operator()(const DDRotationMatrix &lhs, const DDRotationMatrix &rhs) const
int copyno() const
Copy number associated with the current node.
bool firstChild()
set the current node to the first child ...
Allows to compare name or not. If not, compares only values of the rotation matrix.
bool nextSibling()
set the current node to the next sibling ...
adj_list::const_iterator const_adj_iterator
LogicalParts have solids which could be BooleanSolids.
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::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
bool operator()(const DDRotation &lhs, const DDRotation &rhs) const
const std::string & name() const
Returns the name.