GeoModel - GeoModelCore
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GeoFullPhysVol Class Referencefinal

This class represent a physical volume whose absolute default and aligned positions are known and held in cache. More...

#include <GeoFullPhysVol.h>

Inheritance diagram for GeoFullPhysVol:
GeoVFullPhysVol GeoVPhysVol GeoGraphNode RCBase

Public Member Functions

 GeoFullPhysVol (const GeoLogVol *LogVol)
 
void add (GeoGraphNode *graphNode)
 Adds a Graph Node to the Geometry Graph.
 
virtual unsigned int getNChildVols () const override
 Returns the number of child physical volumes.
 
virtual PVConstLink getChildVol (unsigned int index) const override
 Returns the ith child volume.
 
virtual GeoTrf::Transform3D getXToChildVol (unsigned int index, const GeoVAlignmentStore *store=nullptr) const override
 Returns the transform to the ith volume.
 
virtual GeoTrf::Transform3D getDefXToChildVol (unsigned int index, const GeoVAlignmentStore *store=nullptr) const override
 Returns the default transform to the ith volume.
 
virtual void exec (GeoNodeAction *action) const override
 Executes a GeoNodeAction.
 
virtual std::string getNameOfChildVol (unsigned int i) const override
 Returns the name of the child.
 
virtual Query< int > getIdOfChildVol (unsigned int i) const override
 Returns the id of the child.
 
virtual unsigned int getNChildVolAndST () const override
 Returns the number of child physical volumes and Serial Transformers.
 
GeoFullPhysVol * clone (bool attached=true)
 
const GeoFullPhysVol * cloneOrigin () const
 
void clear ()
 
virtual GeoTrf::Transform3D getX (const GeoVAlignmentStore *store=nullptr) const override
 
virtual GeoTrf::Transform3D getDefX (const GeoVAlignmentStore *store=nullptr) const override
 
virtual unsigned int getNChildNodes () const override
 
virtual const GeoGraphNode *const * getChildNode (unsigned int i) const override
 
virtual const GeoGraphNode *const * findChildNode (const GeoGraphNode *n) const override
 
- Public Member Functions inherited from GeoVFullPhysVol
 GeoVFullPhysVol (const GeoLogVol *logVol)
 
 GeoVFullPhysVol (const GeoVFullPhysVol &right)=delete
 
GeoVFullPhysVol & operator= (const GeoVFullPhysVol &right)=delete
 
const GeoTrf::Transform3D & getAbsoluteTransform (GeoVAlignmentStore *store=nullptr) const
 Returns the absolute transform of the volume.
 
void clearPositionInfo () const
 
const GeoTrf::Transform3D & getDefAbsoluteTransform (GeoVAlignmentStore *store=nullptr) const
 Returns the default absolute transform of the volume.
 
const std::string & getAbsoluteName ()
 Returns the absolute name of this node.
 
unsigned int getId () const
 Returns the identification bits.
 
- Public Member Functions inherited from GeoVPhysVol
 GeoVPhysVol (const GeoLogVol *LogVol)
 
 GeoVPhysVol (const GeoVPhysVol &right)=delete
 
GeoVPhysVol & operator= (const GeoVPhysVol &right)=delete
 
bool isShared () const
 
Query< unsigned int > indexOf (PVConstLink daughter) const
 
PVConstLink getParent () const
 Gets the parent, if the parent is unique, and otherwise returns a nullptr pointer.
 
const GeoLogVol * getLogVol () const
 Returns the logical volume.
 
void apply (GeoVolumeAction *action) const
 
virtual void dockTo (GeoVPhysVol *parent)
 
- Public Member Functions inherited from RCBase
void ref () const
 
void unref () const
 
unsigned int refCount () const
 

Private Member Functions

 GeoFullPhysVol (const GeoFullPhysVol &right)
 
GeoFullPhysVol & operator= (const GeoFullPhysVol &right)
 

Private Attributes

std::vector< const GeoGraphNode * > m_daughters
 Hold the list of children.
 
const GeoFullPhysVol * m_cloneOrigin
 

Detailed Description

This class represent a physical volume whose absolute default and aligned positions are known and held in cache.

These pieces should not be part of a subtree which is used as a shared instance. For if it is, then of course the absolute position of the piece is an absurdity. The run time error will result as soon as the absolute position is requested.

These elements may be declared to readout geometry. See the class ReadoutElement.

Definition at line 30 of file GeoFullPhysVol.h.

Member Function Documentation

void GeoFullPhysVol::clear ( )

The following method breaks consistency of cloned volumes! Use it only in Simulation jobs and don't call it until geometry has been completely translated to G4

Breaks the consistency of cloned volumes! Use it only in Simulation jobs and Don't call it until geometry has been completely translated to G4

Definition at line 160 of file GeoFullPhysVol.cxx.

161 {
162  for(size_t i=0; i<m_daughters.size(); i++)
163  m_daughters[i]->unref();
164  m_daughters.clear();
165 }
std::vector< const GeoGraphNode * > m_daughters
Hold the list of children.
GeoFullPhysVol * GeoFullPhysVol::clone ( bool  attached = true)

Meaning of the input parameter 'attached' TRUE: all cloned volumes are meant to stay identical to their clone origin for the lifetime further changes are permitted neither in the origin nor in the clone results

FALSE: use this value if you expect further changes in either clone origing or its clone results which don't need to be syncronized. The clone origin and its clone are identical ONLY by the time of cloning, further identity is not guaranteed

Definition at line 133 of file GeoFullPhysVol.cxx.

134 {
136  for(unsigned int ind = 0; ind < this->m_daughters.size(); ind++) {
137  GeoGraphNode* daughter =(GeoGraphNode*) m_daughters[ind];
138  clone->add(daughter);
139  }
140 
141  if(attached) {
142  if(this->m_cloneOrigin==0) {
143  this->m_cloneOrigin = this;
144  }
145  clone->m_cloneOrigin = this->m_cloneOrigin;
146  this->m_cloneOrigin->ref();
147  }
148 
149  return clone;
150 }
GeoFullPhysVol * clone(bool attached=true)
This class represent a physical volume whose absolute default and aligned positions are known and hel...
std::vector< const GeoGraphNode * > m_daughters
Hold the list of children.
const GeoLogVol * getLogVol() const
Returns the logical volume.
Definition: GeoVPhysVol.cxx:39
Represents Nodes that can be assembled together to make a graph. Subclasses (for now): ...
Definition: GeoGraphNode.h:28
void add(GeoGraphNode *graphNode)
Adds a Graph Node to the Geometry Graph.

The documentation for this class was generated from the following files: