|
GeoModel - GeoModelCore
|
Geo Volume action providing a mechanism for Cutoff implementation. More...
#include <GeoCutVolAction.h>
Public Member Functions | |
| GeoCutVolAction (const GeoShape &Shape, const GeoTrf::Transform3D &Transform) | |
| virtual void | handleVPhysVol (const GeoVPhysVol *) |
| GeoPhysVol * | getPV () |
Public Member Functions inherited from GeoVolumeAction | |
| GeoVolumeAction (Type type=TOP_DOWN) | |
| void | terminate () |
| bool | shouldTerminate () const |
| const GeoTraversalState * | getState () const |
| GeoTraversalState * | getState () |
| GeoVolumeAction::Type | getType () const |
Private Attributes | |
| GeoPhysVol * | m_physVol |
| const GeoShape & | m_shape |
| GeoTrf::Transform3D | m_transform |
| std::stack< GeoPhysVol * > * | m_copyStack |
Additional Inherited Members | |
Public Types inherited from GeoVolumeAction | |
| enum | Type { TOP_DOWN, BOTTOM_UP } |
Geo Volume action providing a mechanism for Cutoff implementation.
The cutoff is applied to the mother Physical Volume and then it is propagated down to all of child volumes.
GeoCutVolAction object navigates the input Physical Volume (PV) tree. For each original PV in the tree it creates and a new PV with the same characteristics - material, LV name, PV name, ID, transform in parents coordinate frame - except for shape. The new PV hierarchy is kept by the GeoCutVolAction internally and can be obtained after the action is done by calling getPV() method.
When the cut action is finished users have to use the new PV tree obtained with getPV(). The original PV can be dereferenced and the action object destroyed.
In order to implement a cutoff, one needs to provide two input arguments to the constructor of GeoCutVolAction
Here is an example of GeoCutVolAction usage:
|-----------------------------------------------------------------------—| | ... First construct a physical volume origPhysVol and add all daughter |
| volumes to it |
|---|
| GeoCutVolAction action(shape,transform); |
| pPhysVol->apply(&action); |
| GeoPhysVol* cutPhysVol = action.getPV(); |
| pPhysVol->unref(); |
| ... Use cutPhysVol afterwards (atach to the upper level volumes) |
| -----------------------------------------------------------------------— |
Definition at line 55 of file GeoCutVolAction.h.
1.8.11