99{
102
104 const std::vector<G4Nucleon>& nucleons=the3DNucleus->
GetNucleons();
108 do {
110 }
while (index < 0 || index >=
static_cast<G4int>(nucleons.size()));
111
113
118 if(resZ)
119 {
122 }
123 else {
126 }
127 #ifdef debug_scatter
128 G4cout<<
"G4QElChan::Scatter: neutron - proton? A ="<<
A<<
", Z="<<Z<<
", projName="
130 #endif
131
133 G4double residualNucleusEnergy=std::sqrt(
sqr(residualNucleusMass) +
135 pNucleon.
setE(targetNucleusMass-residualNucleusEnergy);
137
138 std::pair<G4LorentzVector,G4LorentzVector> result;
139
144 if (result.first.e() > 0.)
145 scatteredHadron4Mom=result.second;
146 else {
147
148
152 }
153
154#ifdef debug_scatter
156 - result.first - result.second;
157 if ( (EpConservation.
vect().
mag2() > .01*MeV*MeV )
158 || (std::abs(EpConservation.
e()) > 0.1 * MeV ) )
159 {
160 G4cout <<
"Warning - G4QuasiElasticChannel::Scatter E-p non conservation : "
161 << EpConservation <<
G4endl;
162 }
163#endif
164
168 ktv->push_back(sPrim);
169 if (result.first.e() > 0.)
170 {
172 ktv->push_back(sNuc);
173 }
174 if(resZ || resA==1)
175 {
178 ktv->push_back(rNuc);
179 }
180 else
181 {
182 residualNucleus4Mom/=resA;
183 for(
G4int in=0; in<resA; in++)
184 {
187 ktv->push_back(rNuc);
188 }
189 }
190#ifdef debug_scatter
191 G4cout<<
"G4QElC::Scat: Nucleon: "<<result.first <<
" mass "<<result.first.mag() <<
G4endl;
192 G4cout<<
"G4QElC::Scat: Project: "<<result.second<<
" mass "<<result.second.mag()<<
G4endl;
193#endif
194 return ktv;
195}
double A(double temperature)
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
G4LorentzVector Get4Momentum() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4Neutron * Neutron()
G4double GetPDGMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
std::pair< G4LorentzVector, G4LorentzVector > Scatter(G4int NPDG, G4LorentzVector N4M, G4int pPDG, G4LorentzVector p4M)
virtual void Init(G4int theA, G4int theZ)=0
virtual G4double GetMass()=0
virtual const std::vector< G4Nucleon > & GetNucleons()=0