102{
105
107 const std::vector<G4Nucleon>& nucleons=the3DNucleus->
GetNucleons();
111 do {
113 }
while (index < 0 || index >=
static_cast<G4int>(nucleons.size()));
114
116
121 if(resZ)
122 {
125 }
126 else {
129 }
130 #ifdef debug_scatter
131 G4cout<<
"G4QElChan::Scatter: neutron - proton? A ="<<
A<<
", Z="<<Z<<
", projName="
133 #endif
134
136 G4double residualNucleusEnergy=std::sqrt(
sqr(residualNucleusMass) +
138 pNucleon.
setE(targetNucleusMass-residualNucleusEnergy);
140
141 std::pair<G4LorentzVector,G4LorentzVector> result;
142
147 if (result.first.e() > 0.)
148 scatteredHadron4Mom=result.second;
149 else {
150
151
155 }
156
157#ifdef debug_scatter
159 - result.first - result.second;
160 if ( (EpConservation.
vect().
mag2() > .01*MeV*MeV )
161 || (std::abs(EpConservation.
e()) > 0.1 * MeV ) )
162 {
163 G4cout <<
"Warning - G4QuasiElasticChannel::Scatter E-p non conservation : "
164 << EpConservation <<
G4endl;
165 }
166#endif
167
172 ktv->push_back(sPrim);
173 if (result.first.e() > 0.)
174 {
177 ktv->push_back(sNuc);
178 }
179 if(resZ || resA==1)
180 {
184 ktv->push_back(rNuc);
185 }
186 else
187 {
188 residualNucleus4Mom/=resA;
189 for(
G4int in=0; in<resA; in++)
190 {
194 ktv->push_back(rNuc);
195 }
196 }
197#ifdef debug_scatter
198 G4cout<<
"G4QElC::Scat: Nucleon: "<<result.first <<
" mass "<<result.first.mag() <<
G4endl;
199 G4cout<<
"G4QElC::Scat: Project: "<<result.second<<
" mass "<<result.second.mag()<<
G4endl;
200#endif
201 return ktv;
202}
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
G4LorentzVector Get4Momentum() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
void SetCreatorModelID(G4int id)
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 G4double GetMass()=0
virtual void Init(G4int theA, G4int theZ, G4int numberOfLambdas=0)=0
virtual const std::vector< G4Nucleon > & GetNucleons()=0