76{
77
78
80 last_ekin = theAdjointSteppingAction->
GetLastEkin();
81
82 if(!is_adjoint_tracking_mode)
83 {
84 if (theUserFwdTrackingAction != nullptr)
85 {
87 }
88 }
90 {
93 last_direction /=last_direction.
mag();
94 last_cos_th = last_direction.
z();
97 last_fwd_part_name.erase(0,4);
100 last_ekin = theAdjointSteppingAction->
GetLastEkin();
101 last_ekin_nuc = last_ekin;
103 {
105 last_ekin_nuc /= nb_nuc;
106 }
107
108 last_fwd_part_index = -1;
109 std::size_t i = 0;
110 while(i< pListOfPrimaryFwdParticles->size() && last_fwd_part_index<0)
111 {
112 if ((*pListOfPrimaryFwdParticles)[i]->GetParticleName()
113 == last_fwd_part_name)
114 {
115 last_fwd_part_index=(
G4int)i;
116 }
117 ++i;
118 }
119
120
121
122 last_pos_vec.push_back(last_pos);
123 last_direction_vec.push_back(last_direction);
124 last_ekin_vec.push_back(last_ekin);
125 last_ekin_nuc_vec.push_back(last_ekin_nuc);
126 last_cos_th_vec.push_back(last_cos_th);
127 last_weight_vec.push_back(last_weight);
128 last_fwd_part_PDGEncoding_vec.push_back(last_fwd_part_PDGEncoding);
129 last_fwd_part_index_vec.push_back(last_fwd_part_index);
130 }
131 else
132 {
133 }
134}
G4ParticleDefinition * GetLastPartDef()
G4bool GetDidAdjParticleReachTheExtSource()
G4ThreeVector GetLastMomentum()
G4ThreeVector GetLastPosition()
const G4String & GetParticleType() const
G4int GetPDGEncoding() const
G4int GetBaryonNumber() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
virtual void PostUserTrackingAction(const G4Track *)