5 #include "GeoModelKernel/GeoCutVolAction.h" 6 #include "GeoModelKernel/GeoPhysVol.h" 7 #include "GeoModelKernel/GeoIdentifierTag.h" 8 #include "GeoModelKernel/GeoNameTag.h" 9 #include "GeoModelKernel/GeoTransform.h" 10 #include "GeoModelKernel/GeoShapeShift.h" 11 #include "GeoModelKernel/GeoShapeSubtraction.h" 13 GeoCutVolAction::GeoCutVolAction(
const GeoShape& Shape,
14 const GeoTrf::Transform3D& Transform)
18 , m_transform(Transform)
23 GeoCutVolAction::~GeoCutVolAction()
25 while(m_copyStack->size()>0)
30 void GeoCutVolAction::handleVPhysVol(
const GeoVPhysVol *pv)
35 unsigned int pathLen = this->getState()->getPath()->getLength();
39 const std::string& lvNameOriginal = lvOriginal->getName();
40 const GeoMaterial* lvMatOriginal = lvOriginal->getMaterial();
41 const GeoShape* lvShapeOriginal = lvOriginal->getShape();
46 const GeoShape& cutShape = (*lvShapeOriginal).subtract(m_shape << m_transform);
52 m_copyStack->push(m_physVol);
57 while(m_copyStack->size()>pathLen)
62 GeoTrf::Transform3D cutTransform = (this->getState()->getAbsoluteTransform()).inverse()*m_transform;
65 const GeoShape& cutShape = (*lvShapeOriginal).subtract(m_shape << cutTransform);
70 std::string pvName = this->getState()->getName();
74 const Query<int> pvId = this->getState()->getId();
79 copyParent->add(pvNew);
82 m_copyStack->push(pvNew);
A Logical Volume, or agglomeration of shape and material. The logical volume increases the reference ...
This type of action sees and traverses a simpler tree of positioned volumes. It does not descend into...
This class gives an integral identifer to the following physical volume.
const GeoLogVol * getLogVol() const
Returns the logical volume.
A GeoPhysVol is a physical volume for normal recursive access only. This means, normally, that it represents a piece of detector that nobody cares about except for tracing engines like GEANT. More specifically:
This class describes a Shape. Shapes will be able to do the following things:
This class represents materials. A material is a collection of elements. In addition it has a density...