GeoModel - GeoModelCore
Public Member Functions | Private Attributes | List of all members
GeoCutVolAction Class Reference

Geo Volume action providing a mechanism for Cutoff implementation. More...

#include <GeoCutVolAction.h>

Inheritance diagram for GeoCutVolAction:
GeoVolumeAction

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 }
 

Detailed Description

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

  1. A shape to be cut off the mother volume and all its children
  2. A transformation of the cutoff shape with respect to the coordinate frame of the mother shape

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.


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