Geant4  10.02.p03
G4AdjointTrackingAction Class Reference

#include <G4AdjointTrackingAction.hh>

Inheritance diagram for G4AdjointTrackingAction:
Collaboration diagram for G4AdjointTrackingAction:

Public Member Functions

 G4AdjointTrackingAction (G4AdjointSteppingAction *anAction)
 
virtual ~G4AdjointTrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
void RegisterAtEndOfAdjointTrack ()
 
void SetUserForwardTrackingAction (G4UserTrackingAction *anAction)
 
G4ThreeVector GetPositionAtEndOfLastAdjointTrack ()
 
G4ThreeVector GetDirectionAtEndOfLastAdjointTrack ()
 
G4double GetEkinAtEndOfLastAdjointTrack ()
 
G4double GetEkinNucAtEndOfLastAdjointTrack ()
 
G4double GetWeightAtEndOfLastAdjointTrack ()
 
G4double GetCosthAtEndOfLastAdjointTrack ()
 
const G4StringGetFwdParticleNameAtEndOfLastAdjointTrack ()
 
G4int GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack ()
 
G4bool GetIsAdjointTrackingMode ()
 
G4int GetLastFwdParticleIndex ()
 
void SetListOfPrimaryFwdParticles (std::vector< G4ParticleDefinition *> *aListOfParticles)
 
- Public Member Functions inherited from G4UserTrackingAction
 G4UserTrackingAction ()
 
virtual ~G4UserTrackingAction ()
 
void SetTrackingManagerPointer (G4TrackingManager *pValue)
 

Private Attributes

G4AdjointSteppingActiontheAdjointSteppingAction
 
G4UserTrackingActiontheUserFwdTrackingAction
 
G4bool is_adjoint_tracking_mode
 
G4ThreeVector last_pos
 
G4ThreeVector last_direction
 
G4double last_ekin
 
G4double last_ekin_nuc
 
G4double last_cos_th
 
G4String last_fwd_part_name
 
G4int last_fwd_part_PDGEncoding
 
G4double last_weight
 
G4int last_fwd_part_index
 
std::vector< G4ParticleDefinition * > * pListOfPrimaryFwdParticles
 

Additional Inherited Members

- Protected Attributes inherited from G4UserTrackingAction
G4TrackingManagerfpTrackingManager
 

Detailed Description

Definition at line 52 of file G4AdjointTrackingAction.hh.

Constructor & Destructor Documentation

◆ G4AdjointTrackingAction()

G4AdjointTrackingAction::G4AdjointTrackingAction ( G4AdjointSteppingAction anAction)

Definition at line 43 of file G4AdjointTrackingAction.cc.

46 {;}
G4AdjointSteppingAction * theAdjointSteppingAction
G4UserTrackingAction * theUserFwdTrackingAction

◆ ~G4AdjointTrackingAction()

G4AdjointTrackingAction::~G4AdjointTrackingAction ( )
virtual

Definition at line 48 of file G4AdjointTrackingAction.cc.

50 {;}

Member Function Documentation

◆ GetCosthAtEndOfLastAdjointTrack()

G4double G4AdjointTrackingAction::GetCosthAtEndOfLastAdjointTrack ( )
inline

Definition at line 77 of file G4AdjointTrackingAction.hh.

Here is the caller graph for this function:

◆ GetDirectionAtEndOfLastAdjointTrack()

G4ThreeVector G4AdjointTrackingAction::GetDirectionAtEndOfLastAdjointTrack ( )
inline

Definition at line 73 of file G4AdjointTrackingAction.hh.

73 { return last_direction;}
Here is the caller graph for this function:

◆ GetEkinAtEndOfLastAdjointTrack()

G4double G4AdjointTrackingAction::GetEkinAtEndOfLastAdjointTrack ( )
inline

Definition at line 74 of file G4AdjointTrackingAction.hh.

Here is the caller graph for this function:

◆ GetEkinNucAtEndOfLastAdjointTrack()

G4double G4AdjointTrackingAction::GetEkinNucAtEndOfLastAdjointTrack ( )
inline

Definition at line 75 of file G4AdjointTrackingAction.hh.

Here is the caller graph for this function:

◆ GetFwdParticleNameAtEndOfLastAdjointTrack()

const G4String& G4AdjointTrackingAction::GetFwdParticleNameAtEndOfLastAdjointTrack ( )
inline

Definition at line 78 of file G4AdjointTrackingAction.hh.

Here is the caller graph for this function:

◆ GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack()

G4int G4AdjointTrackingAction::GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack ( )
inline

Definition at line 79 of file G4AdjointTrackingAction.hh.

Here is the caller graph for this function:

◆ GetIsAdjointTrackingMode()

G4bool G4AdjointTrackingAction::GetIsAdjointTrackingMode ( )
inline

Definition at line 80 of file G4AdjointTrackingAction.hh.

Here is the caller graph for this function:

◆ GetLastFwdParticleIndex()

G4int G4AdjointTrackingAction::GetLastFwdParticleIndex ( )
inline

Definition at line 81 of file G4AdjointTrackingAction.hh.

Here is the caller graph for this function:

◆ GetPositionAtEndOfLastAdjointTrack()

G4ThreeVector G4AdjointTrackingAction::GetPositionAtEndOfLastAdjointTrack ( )
inline

Definition at line 72 of file G4AdjointTrackingAction.hh.

72 { return last_pos;}
Here is the caller graph for this function:

◆ GetWeightAtEndOfLastAdjointTrack()

G4double G4AdjointTrackingAction::GetWeightAtEndOfLastAdjointTrack ( )
inline

Definition at line 76 of file G4AdjointTrackingAction.hh.

Here is the caller graph for this function:

◆ PostUserTrackingAction()

void G4AdjointTrackingAction::PostUserTrackingAction ( const G4Track *  aTrack)
virtual

Reimplemented from G4UserTrackingAction.

Definition at line 67 of file G4AdjointTrackingAction.cc.

68 {
69 
70  //important to have it here !
73 
74 
78  }
91  if (aPartDef->GetParticleType() == "adjoint_nucleus") {
92  G4double nb_nuc=double(aPartDef->GetBaryonNumber());
93  last_ekin_nuc /=nb_nuc;
94  }
95 
97  size_t i=0;
98  while(i< pListOfPrimaryFwdParticles->size() && last_fwd_part_index<0) {
99  if ((*pListOfPrimaryFwdParticles)[i]->GetParticleName() == last_fwd_part_name)
101  i++;
102  }
103  }
104  else {
105 
106  }
107 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4String & remove(str_size)
std::vector< G4ParticleDefinition * > * pListOfPrimaryFwdParticles
const G4String & GetParticleType() const
G4AdjointSteppingAction * theAdjointSteppingAction
G4UserTrackingAction * theUserFwdTrackingAction
const G4String & GetParticleName() const
double mag() const
G4ParticleDefinition * GetLastPartDef()
static G4ParticleTable * GetParticleTable()
double z() const
virtual void PostUserTrackingAction(const G4Track *)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ PreUserTrackingAction()

void G4AdjointTrackingAction::PreUserTrackingAction ( const G4Track *  aTrack)
virtual

Reimplemented from G4UserTrackingAction.

Definition at line 52 of file G4AdjointTrackingAction.cc.

53 {
54  G4String partType = aTrack->GetParticleDefinition()->GetParticleType();
55  if (partType.contains(G4String("adjoint"))){
57  theAdjointSteppingAction->SetPrimWeight(aTrack->GetWeight());
58  }
59  else {
63  }
65 }
void SetAdjointTrackingMode(G4bool aBool)
G4AdjointSteppingAction * theAdjointSteppingAction
G4bool contains(const std::string &) const
G4UserTrackingAction * theUserFwdTrackingAction
void SetPrimWeight(G4double weight)
virtual void PreUserTrackingAction(const G4Track *)
Here is the call graph for this function:

◆ RegisterAtEndOfAdjointTrack()

void G4AdjointTrackingAction::RegisterAtEndOfAdjointTrack ( )

◆ SetListOfPrimaryFwdParticles()

void G4AdjointTrackingAction::SetListOfPrimaryFwdParticles ( std::vector< G4ParticleDefinition *> *  aListOfParticles)
inline

Definition at line 83 of file G4AdjointTrackingAction.hh.

84  {pListOfPrimaryFwdParticles=aListOfParticles;}
std::vector< G4ParticleDefinition * > * pListOfPrimaryFwdParticles
Here is the caller graph for this function:

◆ SetUserForwardTrackingAction()

void G4AdjointTrackingAction::SetUserForwardTrackingAction ( G4UserTrackingAction anAction)
inline

Definition at line 70 of file G4AdjointTrackingAction.hh.

70  {
71  theUserFwdTrackingAction = anAction;}
G4UserTrackingAction * theUserFwdTrackingAction
Here is the caller graph for this function:

Member Data Documentation

◆ is_adjoint_tracking_mode

G4bool G4AdjointTrackingAction::is_adjoint_tracking_mode
private

Definition at line 89 of file G4AdjointTrackingAction.hh.

◆ last_cos_th

G4double G4AdjointTrackingAction::last_cos_th
private

Definition at line 97 of file G4AdjointTrackingAction.hh.

◆ last_direction

G4ThreeVector G4AdjointTrackingAction::last_direction
private

Definition at line 95 of file G4AdjointTrackingAction.hh.

◆ last_ekin

G4double G4AdjointTrackingAction::last_ekin
private

Definition at line 96 of file G4AdjointTrackingAction.hh.

◆ last_ekin_nuc

G4double G4AdjointTrackingAction::last_ekin_nuc
private

Definition at line 96 of file G4AdjointTrackingAction.hh.

◆ last_fwd_part_index

G4int G4AdjointTrackingAction::last_fwd_part_index
private

Definition at line 101 of file G4AdjointTrackingAction.hh.

◆ last_fwd_part_name

G4String G4AdjointTrackingAction::last_fwd_part_name
private

Definition at line 98 of file G4AdjointTrackingAction.hh.

◆ last_fwd_part_PDGEncoding

G4int G4AdjointTrackingAction::last_fwd_part_PDGEncoding
private

Definition at line 99 of file G4AdjointTrackingAction.hh.

◆ last_pos

G4ThreeVector G4AdjointTrackingAction::last_pos
private

Definition at line 94 of file G4AdjointTrackingAction.hh.

◆ last_weight

G4double G4AdjointTrackingAction::last_weight
private

Definition at line 100 of file G4AdjointTrackingAction.hh.

◆ pListOfPrimaryFwdParticles

std::vector<G4ParticleDefinition*>* G4AdjointTrackingAction::pListOfPrimaryFwdParticles
private

Definition at line 102 of file G4AdjointTrackingAction.hh.

◆ theAdjointSteppingAction

G4AdjointSteppingAction* G4AdjointTrackingAction::theAdjointSteppingAction
private

Definition at line 87 of file G4AdjointTrackingAction.hh.

◆ theUserFwdTrackingAction

G4UserTrackingAction* G4AdjointTrackingAction::theUserFwdTrackingAction
private

Definition at line 88 of file G4AdjointTrackingAction.hh.


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