CMS 3D CMS Logo

List of all members | Public Member Functions
DDScopeClassification Struct Reference

Classification of scope describe by A towards B. More...

#include <DDScope.h>

Public Member Functions

dd_scope_class operator() (const DDGeoHistory &, const DDGeoHistory &) const
 

Detailed Description

Classification of scope describe by A towards B.

The leaf-node of A defines the root of a subtree in the DDExpandedView, so does the leaf-node of B.

Definition at line 19 of file DDScope.h.

Member Function Documentation

◆ operator()()

dd_scope_class DDScopeClassification::operator() ( const DDGeoHistory left,
const DDGeoHistory right 
) const

Definition at line 5 of file DDScope.cc.

References different_branch, mps_fire::result, subtree, and supertree.

5  {
7  DDGeoHistory::const_iterator lit = left.begin(); // left-iterator
8  DDGeoHistory::const_iterator rit = right.begin(); // right-iterator
9 
10  while (lit != left.end() && rit != right.end()) {
11  if (lit->siblingno() != rit->siblingno()) {
13  break;
14  }
15  ++lit;
16  ++rit;
17  }
18 
19  if (result != different_branch) {
20  if (lit == left.end()) { // left history leaf node marks the root of a subtree which contains
21  result = supertree; // the leaf node of the right history or both roots are the same ...
22  } else {
23  result = subtree;
24  }
25  }
26  return result;
27 }
dd_scope_class
Definition: DDScope.h:9
Definition: DDScope.h:9