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

#include <G4AdjointStackingAction.hh>

Inheritance diagram for G4AdjointStackingAction:
Collaboration diagram for G4AdjointStackingAction:

Public Member Functions

 G4AdjointStackingAction (G4AdjointTrackingAction *anAction)
 
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)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserStackingAction
G4StackManagerstackManager
 

Detailed Description

Definition at line 66 of file G4AdjointStackingAction.hh.

Constructor & Destructor Documentation

G4AdjointStackingAction::G4AdjointStackingAction ( G4AdjointTrackingAction anAction)

Definition at line 44 of file G4AdjointStackingAction.cc.

45  : reclassification_stage (false)
46 {
47  theFwdStackingAction =0;
48  theUserAdjointStackingAction =0;
49  theAdjointTrackingAction = anAction;
50 }
G4AdjointStackingAction::~G4AdjointStackingAction ( )
virtual

Definition at line 53 of file G4AdjointStackingAction.cc.

54 {;}

Member Function Documentation

G4ClassificationOfNewTrack G4AdjointStackingAction::ClassifyNewTrack ( const G4Track aTrack)
virtual

Reimplemented from G4UserStackingAction.

Definition at line 57 of file G4AdjointStackingAction.cc.

58 {
59  G4ClassificationOfNewTrack classification = fUrgent;
60  G4String partType = aTrack->GetParticleDefinition()->GetParticleType();
61  adjoint_mode = partType.contains(G4String("adjoint"));
62  if (!adjoint_mode ){
63  if (!reclassification_stage) classification = fWaiting;
64  else { //need to check if forwrad tracking can be continued use of
65  if (theAdjointTrackingAction->GetNbOfAdointTracksReachingTheExternalSurface()>0) {
66  if (theFwdStackingAction) classification = theFwdStackingAction->ClassifyNewTrack(aTrack);
67  }
68  else classification = fKill;
69  }
70  }
71  else if (theUserAdjointStackingAction) classification = theUserAdjointStackingAction->ClassifyNewTrack(aTrack);
72  return classification;
73 }
const G4ParticleDefinition * GetParticleDefinition() const
const G4String & GetParticleType() const
size_t GetNbOfAdointTracksReachingTheExternalSurface()
G4bool contains(const std::string &) const
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)

Here is the call graph for this function:

void G4AdjointStackingAction::NewStage ( )
virtual

Reimplemented from G4UserStackingAction.

Definition at line 76 of file G4AdjointStackingAction.cc.

77 { reclassification_stage =true;
78  if (first_reclassification_stage){
79  if (theUserAdjointStackingAction) theUserAdjointStackingAction->NewStage();
81  }
82  else if (theFwdStackingAction) theFwdStackingAction->NewStage();
83  first_reclassification_stage =false;
84 }
G4StackManager * stackManager

Here is the call graph for this function:

void G4AdjointStackingAction::PrepareNewEvent ( )
virtual

Reimplemented from G4UserStackingAction.

Definition at line 87 of file G4AdjointStackingAction.cc.

88 { reclassification_stage =false;
89  first_reclassification_stage =true;
90  if (theUserAdjointStackingAction) theUserAdjointStackingAction->PrepareNewEvent();
91 }
virtual void PrepareNewEvent()

Here is the call graph for this function:

void G4AdjointStackingAction::SetAdjointMode ( G4bool  aBool)
inline

Definition at line 79 of file G4AdjointStackingAction.hh.

79 {adjoint_mode=aBool;}

Here is the caller graph for this function:

void G4AdjointStackingAction::SetKillTracks ( G4bool  aBool)
inline

Definition at line 78 of file G4AdjointStackingAction.hh.

78 {kill_tracks =aBool;}

Here is the caller graph for this function:

void G4AdjointStackingAction::SetUserAdjointStackingAction ( G4UserStackingAction anAction)
inline

Definition at line 77 of file G4AdjointStackingAction.hh.

77 {theUserAdjointStackingAction = anAction;}

Here is the caller graph for this function:

void G4AdjointStackingAction::SetUserFwdStackingAction ( G4UserStackingAction anAction)
inline

Definition at line 76 of file G4AdjointStackingAction.hh.

76 {theFwdStackingAction = anAction;}

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