![]() |
![]() |
#include <DetectorDescription/Core/interface/DDScope.h>
Public Member Functions | |
dd_scope_class | operator() (const DDGeoHistory &, const DDGeoHistory &) const |
The leaf-node of A defines the root of a subtree in the DDExpandedView, so does the leaf-node of B.
Definition at line 17 of file DDScope.h.
dd_scope_class DDScopeClassification::operator() | ( | const DDGeoHistory & | left, | |
const DDGeoHistory & | right | |||
) | const |
Definition at line 5 of file DDScope.cc.
References different_branch, HLT_VtxMuL3::result, subtree, and supertree.
00007 { 00008 00009 dd_scope_class result = subtree; 00010 DDGeoHistory::const_iterator lit = left.begin(); // left-iterator 00011 DDGeoHistory::const_iterator rit = right.begin(); // right-iterator 00012 //DDGeoHistory::size_type depth = 0; 00013 while(lit != left.end() && rit!=right.end()) { 00014 //DCOUT('s', " classify: a=" << *lit << std::endl << " : b=" << *rit ); 00015 if (lit->siblingno() != rit->siblingno()) { 00016 result = different_branch; 00017 break; 00018 } 00019 //++depth; 00020 ++lit; 00021 ++rit; 00022 } 00023 00024 if (result != different_branch) { 00025 if(lit==left.end()) { // left history leaf node marks the root of a subtree which contains 00026 result=supertree; // the leaf node of the right history or both roots are the same ... 00027 } 00028 else { 00029 result=subtree; 00030 } 00031 } 00032 return result; 00033 00034 }