CMS 3D CMS Logo

DDExpandedNodeLess Struct Reference

function object to compare to ExpandedNodes More...

#include <DetectorDescription/Core/interface/DDExpandedNode.h>

List of all members.

Public Member Functions

bool operator() (const DDExpandedNode &n1, const DDExpandedNode &n2)


Detailed Description

function object to compare to ExpandedNodes

compares (for STL usage) two DDExpandedNodes for

Definition at line 64 of file DDExpandedNode.h.


Member Function Documentation

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   }


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:17:55 2009 for CMSSW by  doxygen 1.5.4