#include <DetectorDescription/Core/interface/DDExpandedNode.h>
Public Member Functions | |
bool | operator() (const DDExpandedNode &n1, const DDExpandedNode &n2) |
compares (for STL usage) two DDExpandedNodes for
Definition at line 64 of file DDExpandedNode.h.
bool DDExpandedNodeLess::operator() | ( | const DDExpandedNode & | n1, | |
const DDExpandedNode & | n2 | |||
) | [inline] |
Definition at line 67 of file DDExpandedNode.h.
References DDExpandedNode::absTranslation(), DDBase< N, C >::ddname(), DDExpandedNode::logicalPart(), HLT_VtxMuL3::result, and DDExpandedNode::siblingno().
00068 { 00069 const DDTranslation & t1 = n1.absTranslation(); 00070 const DDTranslation & t2 = n2.absTranslation(); 00071 00072 bool result = false; 00073 00074 // 'alphabetical ordering' according to absolute position 00075 00076 if (t1.z() < t2.z()) 00077 { 00078 result=true; 00079 } 00080 else if ( (t1.z()==t2.z()) && (t1.y() < t2.y())) 00081 { 00082 result=true; 00083 } 00084 else if ( (t1.z()==t2.z()) && (t1.y()==t2.y()) && (t1.x()<t2.x())) 00085 { 00086 result=true; 00087 } 00088 else if (n1.siblingno() < n2.siblingno()) 00089 { 00090 result=true; 00091 } 00092 else if (n1.logicalPart().ddname() < n2.logicalPart().ddname()) 00093 { 00094 result=true; 00095 } 00096 00097 return result; 00098 }