Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4RTSteppingAction Class Reference

#include <G4RTSteppingAction.hh>

Inheritance diagram for G4RTSteppingAction:
Collaboration diagram for G4RTSteppingAction:

Public Member Functions

 G4RTSteppingAction ()
 
virtual ~G4RTSteppingAction ()
 
virtual void UserSteppingAction (const G4Step *)
 
- Public Member Functions inherited from G4UserSteppingAction
 G4UserSteppingAction ()
 
virtual ~G4UserSteppingAction ()
 
virtual void SetSteppingManagerPointer (G4SteppingManager *pValue)
 

Static Public Member Functions

static void SetIgnoreTransparency (G4bool val)
 
static G4bool GetIgnoreTransparency ()
 

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager
 

Detailed Description

Definition at line 52 of file G4RTSteppingAction.hh.

Constructor & Destructor Documentation

G4RTSteppingAction::G4RTSteppingAction ( )

Definition at line 45 of file G4RTSteppingAction.cc.

46 {}
virtual G4RTSteppingAction::~G4RTSteppingAction ( )
inlinevirtual

Definition at line 56 of file G4RTSteppingAction.hh.

56 {;}

Member Function Documentation

G4bool G4RTSteppingAction::GetIgnoreTransparency ( )
static

Definition at line 84 of file G4RTSteppingAction.cc.

85 { return ignoreTransparency; }

Here is the caller graph for this function:

void G4RTSteppingAction::SetIgnoreTransparency ( G4bool  val)
static

Definition at line 82 of file G4RTSteppingAction.cc.

83 { ignoreTransparency = val; }

Here is the caller graph for this function:

void G4RTSteppingAction::UserSteppingAction ( const G4Step aStep)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 48 of file G4RTSteppingAction.cc.

49 {
50  // Stop the ray particle if it reaches to the coloured volume with its alpha = 1
51  // or coloured volume and the user request to ignore transparency
52 
53  G4StepPoint* fpStepPoint = aStep -> GetPostStepPoint();
54  G4VPhysicalVolume* postVolume_phys=fpStepPoint->GetPhysicalVolume();
55 
56  if(!postVolume_phys) return; // Reach to out of the world
57 
58  const G4LogicalVolume* postVolume_log = postVolume_phys->GetLogicalVolume();
59  const G4VisAttributes* postVisAtt = postVolume_log -> GetVisAttributes();
61  if(visManager) {
62  G4VViewer* viewer = visManager->GetCurrentViewer();
63  if (viewer) {
64  postVisAtt = viewer->GetApplicableVisAttributes(postVisAtt);
65  }
66  }
67  if((!postVisAtt) || (!(postVisAtt->IsVisible()))) return; // Invisible volume, continue tracking
68 
69  if((postVisAtt->IsForceDrawingStyle())
70  &&(postVisAtt->GetForcedDrawingStyle()==G4VisAttributes::wireframe)) return;
71  // Wire frame volume, continue tracking
72 
73  G4double postAlpha=(postVisAtt->GetColour()).GetAlpha();
74 
75  if(postAlpha==1.0 || ignoreTransparency) // Stop stepping
76  {
77  G4Track* currentTrack = aStep -> GetTrack();
78  currentTrack -> SetTrackStatus(fStopAndKill);
79  }
80 }
G4bool IsVisible() const
const G4Colour & GetColour() const
G4VPhysicalVolume * GetPhysicalVolume() const
static G4VisManager * GetInstance()
const G4VisAttributes * GetApplicableVisAttributes(const G4VisAttributes *) const
G4LogicalVolume * GetLogicalVolume() const
G4bool IsForceDrawingStyle() const
G4VViewer * GetCurrentViewer() const
double G4double
Definition: G4Types.hh:76
ForcedDrawingStyle GetForcedDrawingStyle() const

Here is the call graph for this function:


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