36{
37
39
40
41
42
43 G4int iZ = aTarg.GetZ_asInt();
44 G4int iA = aTarg.GetA_asInt();
46 if ( aTarg.GetIsotope() != NULL ) {
47 iM = aTarg.GetIsotope()->Getm();
48 }
49
51
54
58
61
63
65 if ( products != NULL )
66 {
67
69
70 for (
G4int j = 0; j < int( products->size() ); j++ )
71 {
72 G4int jZ = (*products)[j].Z;
73 G4int jA = (*products)[j].A;
74
75
76
77
78
79
80
81
82 if ( jZ == iZ + ipZ && jA == iA + ipA ) needResidual = false;
83
84 G4ThreeVector dp((*products)[j].px,(*products)[j].py,(*products)[j].pz);
85 p += dp;
86
88
89 if ( jA == 1 && jZ == 1 ) {
91 totN += 1;
92 }
93 else if ( jA == 1 && jZ == 0 )
94 {
96 totN += 1;
97 }
98 else if ( jZ > 0 ) {
99 if ( jA != 0 )
100 {
102 totN += jA;
103 }
104 else
105 {
107 }
108 }
109 else {
111 }
112
114
115
116
117
118
119
120
121
123 }
124 }
125 else
126 {
127
128
129
130
131
132
133
138 G4FragmentVector::iterator it;
139
140 for (it = products_from_PE->begin(); it != products_from_PE->end(); it++)
141 {
142 if ( (*it)->GetZ_asInt() == iZ + ipZ && (*it)->GetA_asInt() == iA + ipA ) needResidual = false;
144 if ( (*it)->GetParticleDefinition() != NULL ) {
145
148 } else {
149
152 }
154 }
155 delete products_from_PE;
156 }
157
158
159 if ( needResidual ) {
164 }
165
166 delete products;
167
169
170 return theResult;
171
172}
std::vector< G4Fragment * > G4FragmentVector
CLHEP::Hep3Vector G4ThreeVector
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void Set4Momentum(const G4LorentzVector &momentum)
void SetMomentum(const G4ThreeVector &momentum)
std::vector< G4GIDI_Product > * getCaptureFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4HadFinalState theParticleChange
static G4IonTable * GetIonTable()
G4int GetNucleusEncoding(G4int iZ, G4int iA, G4int iM)
G4LENDManager * lend_manager
G4HadFinalState * returnUnchanged(const G4HadProjectile &aTrack, G4HadFinalState *theResult)
G4GIDI_target * get_target_from_map(G4int nuclear_code)
G4double GetTemperature() const
static G4Neutron * Neutron()
G4int GetAtomicNumber() const
G4int GetAtomicMass() const
virtual void SetICM(G4bool)
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
static G4Proton * Proton()