Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AdjointStackingAction Class Reference

#include <G4AdjointStackingAction.hh>

+ Inheritance diagram for G4AdjointStackingAction:

Public Member Functions

 G4AdjointStackingAction ()
 
virtual ~G4AdjointStackingAction ()
 
virtual G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *aTrack)
 
virtual void NewStage ()
 
virtual void PrepareNewEvent ()
 
void SetUserFwdStackingAction (G4UserStackingAction *anAction)
 
void SetUserAdjointStackingAction (G4UserStackingAction *anAction)
 
void SetKillTracks (G4bool aBool)
 
void SetAdjointMode (G4bool aBool)
 
- Public Member Functions inherited from G4UserStackingAction
 G4UserStackingAction ()
 
virtual ~G4UserStackingAction ()
 
void SetStackManager (G4StackManager *value)
 
virtual G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *aTrack)
 
virtual void NewStage ()
 
virtual void PrepareNewEvent ()
 

Additional Inherited Members

- Protected Attributes inherited from G4UserStackingAction
G4StackManagerstackManager
 

Detailed Description

Definition at line 65 of file G4AdjointStackingAction.hh.

Constructor & Destructor Documentation

◆ G4AdjointStackingAction()

G4AdjointStackingAction::G4AdjointStackingAction ( )

Definition at line 41 of file G4AdjointStackingAction.cc.

42 : kill_tracks(true), adjoint_mode(true)
43{
44 theFwdStackingAction =0;
45 theUserAdjointStackingAction =0;
46}

◆ ~G4AdjointStackingAction()

G4AdjointStackingAction::~G4AdjointStackingAction ( )
virtual

Definition at line 49 of file G4AdjointStackingAction.cc.

50{;}

Member Function Documentation

◆ ClassifyNewTrack()

G4ClassificationOfNewTrack G4AdjointStackingAction::ClassifyNewTrack ( const G4Track aTrack)
virtual

Reimplemented from G4UserStackingAction.

Definition at line 53 of file G4AdjointStackingAction.cc.

54{
55 G4ClassificationOfNewTrack classification = fUrgent;
56 if ( kill_tracks) classification=fKill;
57 else if (!adjoint_mode && theFwdStackingAction) classification = theFwdStackingAction->ClassifyNewTrack(aTrack);
58 else if (adjoint_mode && theUserAdjointStackingAction) classification = theUserAdjointStackingAction->ClassifyNewTrack(aTrack);
59 return classification;
60}
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)

◆ NewStage()

void G4AdjointStackingAction::NewStage ( )
virtual

Reimplemented from G4UserStackingAction.

Definition at line 63 of file G4AdjointStackingAction.cc.

64{
65 if ( !adjoint_mode && theFwdStackingAction) theFwdStackingAction->NewStage();
66 else if (adjoint_mode && theUserAdjointStackingAction) theUserAdjointStackingAction->NewStage();
67}

◆ PrepareNewEvent()

void G4AdjointStackingAction::PrepareNewEvent ( )
virtual

Reimplemented from G4UserStackingAction.

Definition at line 70 of file G4AdjointStackingAction.cc.

71{
72 if ( !adjoint_mode && theFwdStackingAction) theFwdStackingAction->PrepareNewEvent();
73 else if (adjoint_mode && theUserAdjointStackingAction) theUserAdjointStackingAction->PrepareNewEvent();
74}
virtual void PrepareNewEvent()

◆ SetAdjointMode()

void G4AdjointStackingAction::SetAdjointMode ( G4bool  aBool)
inline

Definition at line 79 of file G4AdjointStackingAction.hh.

79{adjoint_mode=aBool;}

Referenced by G4AdjointSimManager::SetAdjointTrackingMode().

◆ SetKillTracks()

void G4AdjointStackingAction::SetKillTracks ( G4bool  aBool)
inline

Definition at line 78 of file G4AdjointStackingAction.hh.

78{kill_tracks =aBool;}

Referenced by G4AdjointSimManager::SetAdjointTrackingMode().

◆ SetUserAdjointStackingAction()

void G4AdjointStackingAction::SetUserAdjointStackingAction ( G4UserStackingAction anAction)
inline

Definition at line 76 of file G4AdjointStackingAction.hh.

76{theUserAdjointStackingAction = anAction;}

Referenced by G4AdjointSimManager::SetAdjointStackingAction().

◆ SetUserFwdStackingAction()

void G4AdjointStackingAction::SetUserFwdStackingAction ( G4UserStackingAction anAction)
inline

Definition at line 75 of file G4AdjointStackingAction.hh.

75{theFwdStackingAction = anAction;}

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