45 :theAdjointSteppingAction(anAction),theUserFwdTrackingAction(0)
56 is_adjoint_tracking_mode =
true;
60 is_adjoint_tracking_mode =
false;
61 if (theUserFwdTrackingAction)
72 last_ekin = theAdjointSteppingAction->
GetLastEkin();
75 if(!is_adjoint_tracking_mode){
76 if (theUserFwdTrackingAction)
82 last_direction /=last_direction.
mag();
83 last_cos_th = last_direction.
z();
86 last_fwd_part_name.
remove(0,4);
89 last_ekin = theAdjointSteppingAction->
GetLastEkin();
90 last_ekin_nuc = last_ekin;
93 last_ekin_nuc /=nb_nuc;
96 last_fwd_part_index=-1;
98 while(i< pListOfPrimaryFwdParticles->size() && last_fwd_part_index<0) {
99 if ((*pListOfPrimaryFwdParticles)[i]->GetParticleName() == last_fwd_part_name)
100 last_fwd_part_index=i;
104 last_pos_vec.push_back(last_pos);
105 last_direction_vec.push_back(last_direction);
106 last_ekin_vec.push_back(last_ekin);
107 last_ekin_nuc_vec.push_back(last_ekin_nuc);
108 last_cos_th_vec.push_back(last_cos_th);
109 last_weight_vec.push_back(last_weight);
111 last_fwd_part_PDGEncoding_vec.push_back(last_fwd_part_PDGEncoding);
112 last_fwd_part_index_vec.push_back(last_fwd_part_index);
120 { last_pos_vec.clear();
121 last_direction_vec.clear();
122 last_ekin_vec.clear();
123 last_ekin_nuc_vec.clear();
124 last_cos_th_vec.clear();
125 last_weight_vec.clear();
126 last_fwd_part_PDGEncoding_vec.clear();
127 last_fwd_part_index_vec.clear();
G4ThreeVector GetLastPosition()
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void SetAdjointTrackingMode(G4bool aBool)
G4String & remove(str_size)
G4int GetPDGEncoding() const
G4AdjointTrackingAction(G4AdjointSteppingAction *anAction)
G4bool GetDidAdjParticleReachTheExtSource()
const G4String & GetParticleName() const
virtual void PreUserTrackingAction(const G4Track *)
void ClearEndOfAdjointTrackInfoVectors()
const G4ParticleDefinition * GetParticleDefinition() const
const G4String & GetParticleType() const
void SetPrimWeight(G4double weight)
G4ParticleDefinition * GetLastPartDef()
G4bool contains(const std::string &) const
static G4ParticleTable * GetParticleTable()
virtual void PostUserTrackingAction(const G4Track *)
G4double GetWeight() const
virtual void PostUserTrackingAction(const G4Track *)
G4ThreeVector GetLastMomentum()
virtual void PreUserTrackingAction(const G4Track *)
virtual ~G4AdjointTrackingAction()
G4int GetBaryonNumber() const