CMS 3D CMS Logo

DDExpandedNode.h
Go to the documentation of this file.
1 #ifndef DDExpandedNode_h
2 #define DDExpandedNode_h
3 
4 #include <iosfwd>
5 #include <vector>
6 
11 
12 class DDExpandedView;
13 struct DDPosData;
14 
17  friend class DDExpandedView;
18 
19 public:
21  const DDLogicalPart &lp, const DDPosData *pd, const DDTranslation &t, const DDRotationMatrix &r, int siblingno);
22 
24 
25  bool operator==(const DDExpandedNode &n) const;
26 
28  const DDLogicalPart &logicalPart() const { return logp_; }
29 
31  const DDTranslation &absTranslation() const { return trans_; }
32 
34  const DDRotationMatrix &absRotation() const { return rot_; }
35 
37  int copyno() const;
38 
40  int siblingno() const { return siblingno_; }
41 
42  const DDPosData *posdata() const { return posd_; }
43 
44 private:
45  DDLogicalPart logp_; // logicalpart to provide access to solid & material information
46  const DDPosData *posd_;
47  DDTranslation trans_; // absolute translation
48  DDRotationMatrix rot_; // absolute rotation
49  int siblingno_; // internal sibling-numbering from 0 to max-sibling
50 };
51 
53 
57  bool operator()(const DDExpandedNode &n1, const DDExpandedNode &n2) {
58  const DDTranslation &t1 = n1.absTranslation();
59  const DDTranslation &t2 = n2.absTranslation();
60 
61  bool result = false;
62 
63  // 'alphabetical ordering' according to absolute position
64 
65  if (t1.z() < t2.z()) {
66  result = true;
67  } else if ((t1.z() == t2.z()) && (t1.y() < t2.y())) {
68  result = true;
69  } else if ((t1.z() == t2.z()) && (t1.y() == t2.y()) && (t1.x() < t2.x())) {
70  result = true;
71  } else if (n1.siblingno() < n2.siblingno()) {
72  result = true;
73  } else if (n1.logicalPart().ddname() < n2.logicalPart().ddname()) {
74  result = true;
75  }
76 
77  return result;
78  }
79 };
80 
82 typedef std::vector<DDExpandedNode> DDGeoHistory;
83 
84 std::ostream &operator<<(std::ostream &, const DDExpandedNode &);
85 std::ostream &operator<<(std::ostream &, const DDGeoHistory &);
86 #endif
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
DDGeoHistory
std::vector< DDExpandedNode > DDGeoHistory
Geometrical 'path' of the current node up to the root-node.
Definition: DDExpandedNode.h:82
DDTransform.h
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
DDExpandedNode::rot_
DDRotationMatrix rot_
Definition: DDExpandedNode.h:48
DDExpandedNode::logp_
DDLogicalPart logp_
Definition: DDExpandedNode.h:45
DDExpandedNodeLess
function object to compare to ExpandedNodes
Definition: DDExpandedNode.h:56
DDExpandedNode::trans_
DDTranslation trans_
Definition: DDExpandedNode.h:47
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDExpandedNode::siblingno_
int siblingno_
Definition: DDExpandedNode.h:49
DDExpandedNode::siblingno
int siblingno() const
sibling number of this node
Definition: DDExpandedNode.h:40
DDExpandedNode::DDExpandedNode
DDExpandedNode(const DDLogicalPart &lp, const DDPosData *pd, const DDTranslation &t, const DDRotationMatrix &r, int siblingno)
Definition: DDExpandedNode.cc:10
callgraph.n2
n2
Definition: callgraph.py:50
DDExpandedView
Provides an exploded view of the detector (tree-view)
Definition: DDExpandedView.h:41
DDPosData
Relative position of a child-volume inside a parent-volume.
Definition: DDPosData.h:13
DDBase::ddname
const N & ddname() const
Definition: DDBase.h:61
DDLogicalPart
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Definition: DDLogicalPart.h:93
DDExpandedNode::~DDExpandedNode
~DDExpandedNode()
Definition: DDExpandedNode.cc:14
DDTranslation.h
DDExpandedNode::posdata
const DDPosData * posdata() const
Definition: DDExpandedNode.h:42
DDExpandedNode::absRotation
const DDRotationMatrix & absRotation() const
absolute rotation of this node
Definition: DDExpandedNode.h:34
DDExpandedNode::logicalPart
const DDLogicalPart & logicalPart() const
the LogicalPart describing this node
Definition: DDExpandedNode.h:28
DDLogicalPart.h
alignCSCRings.r
r
Definition: alignCSCRings.py:93
operator<<
std::ostream & operator<<(std::ostream &, const DDExpandedNode &)
Definition: DDExpandedNode.cc:25
DDExpandedNodeLess::operator()
bool operator()(const DDExpandedNode &n1, const DDExpandedNode &n2)
Definition: DDExpandedNode.h:57
DDExpandedNode::posd_
const DDPosData * posd_
Definition: DDExpandedNode.h:46
DDRotationMatrix
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
Definition: DDRotationMatrix.h:8
DDExpandedNode::absTranslation
const DDTranslation & absTranslation() const
absolute translation of this node
Definition: DDExpandedNode.h:31
DDRotationMatrix.h
DDExpandedNode
represents one node in the DDExpandedView
Definition: DDExpandedNode.h:16
mps_fire.result
result
Definition: mps_fire.py:311
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
DDExpandedNode::copyno
int copyno() const
copy number of this node
Definition: DDExpandedNode.cc:20
DDExpandedNode::operator==
bool operator==(const DDExpandedNode &n) const
Definition: DDExpandedNode.cc:16