Geant4-11
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4ElementaryParticleCollider Class Reference

#include <G4ElementaryParticleCollider.hh>

Inheritance diagram for G4ElementaryParticleCollider:
G4CascadeColliderBase G4VCascadeCollider

Public Member Functions

void collide (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
 
 G4ElementaryParticleCollider ()
 
virtual void rescatter (G4InuclParticle *, G4KineticTrackVector *, G4V3DNucleus *, G4CollisionOutput &)
 
void setNucleusState (G4int a, G4int z)
 
virtual void setVerboseLevel (G4int verbose=0)
 
virtual ~G4ElementaryParticleCollider ()
 

Protected Member Functions

virtual G4bool inelasticInteractionPossible (G4InuclParticle *bullet, G4InuclParticle *target, G4double ekin) const
 
virtual void setName (const G4String &name)
 
virtual G4bool useEPCollider (G4InuclParticle *bullet, G4InuclParticle *target) const
 
virtual G4bool validateOutput (const G4Fragment &fragment, G4CollisionOutput &output)
 
virtual G4bool validateOutput (G4InuclParticle *bullet, G4InuclParticle *target, const std::vector< G4InuclElementaryParticle > &particles)
 
virtual G4bool validateOutput (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
 

Protected Attributes

G4CascadeCheckBalancebalance
 
G4InteractionCase interCase
 
G4String theName
 
G4int verboseLevel
 

Private Member Functions

void fillOutgoingMasses ()
 
 G4ElementaryParticleCollider (const G4ElementaryParticleCollider &)
 
G4int generateMultiplicity (G4int is, G4double ekin) const
 
void generateOutgoingPartTypes (G4int is, G4int mult, G4double ekin)
 
void generateSCMfinalState (G4double ekin, G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
 
void generateSCMmuonAbsorption (G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
 
void generateSCMpionAbsorption (G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
 
void generateSCMpionNAbsorption (G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
 
G4ElementaryParticleCollideroperator= (const G4ElementaryParticleCollider &)
 
G4bool pionNucleonAbsorption (G4double ekin) const
 

Private Attributes

G4CascadeFinalStateGenerator fsGenerator
 
std::vector< G4doublemasses
 
std::vector< G4doublemasses2
 
std::vector< G4doublemodules
 
G4int nucleusA
 
G4int nucleusZ
 
std::vector< G4intparticle_kinds
 
std::vector< G4InuclElementaryParticleparticles
 
std::vector< G4LorentzVectorscm_momentums
 

Detailed Description

Definition at line 73 of file G4ElementaryParticleCollider.hh.

Constructor & Destructor Documentation

◆ G4ElementaryParticleCollider() [1/2]

G4ElementaryParticleCollider::G4ElementaryParticleCollider ( )

Definition at line 137 of file G4ElementaryParticleCollider.cc.

138 : G4CascadeColliderBase("G4ElementaryParticleCollider"),
139 nucleusA(0), nucleusZ(0) {;}
G4CascadeColliderBase(const G4String &name, G4int verbose=0)

◆ ~G4ElementaryParticleCollider()

virtual G4ElementaryParticleCollider::~G4ElementaryParticleCollider ( )
inlinevirtual

Definition at line 76 of file G4ElementaryParticleCollider.hh.

76{};

◆ G4ElementaryParticleCollider() [2/2]

G4ElementaryParticleCollider::G4ElementaryParticleCollider ( const G4ElementaryParticleCollider )
private

Member Function Documentation

◆ collide()

void G4ElementaryParticleCollider::collide ( G4InuclParticle bullet,
G4InuclParticle target,
G4CollisionOutput output 
)
virtual

Implements G4VCascadeCollider.

Definition at line 143 of file G4ElementaryParticleCollider.cc.

146{
147 if (verboseLevel > 1)
148 G4cout << " >>> G4ElementaryParticleCollider::collide" << G4endl;
149
150 if (!useEPCollider(bullet,target)) { // Sanity check
151 G4cerr << " ElementaryParticleCollider -> can collide only particle with particle "
152 << G4endl;
153 return;
154 }
155
156#ifdef G4CASCADE_DEBUG_SAMPLER
157 static G4bool doPrintTables = true; // Once and only once per job
158 if (doPrintTables) {
160 doPrintTables = false;
161 }
162#endif
163
164 interCase.set(bullet, target); // To identify kind of collision
165
166 if (verboseLevel > 1) G4cout << *bullet << G4endl << *target << G4endl;
167
168 G4InuclElementaryParticle* particle1 =
169 dynamic_cast<G4InuclElementaryParticle*>(bullet);
170 G4InuclElementaryParticle* particle2 =
171 dynamic_cast<G4InuclElementaryParticle*>(target);
172
173 if (!particle1 || !particle2) { // Redundant with useEPCollider()
174 G4cerr << " ElementaryParticleCollider -> can only collide hadrons"
175 << G4endl;
176 return;
177 }
178
179 if (particle1->isNeutrino() || particle2->isNeutrino()) return;
180
181 // Check for available interaction, or pion+dibaryon special case
183 !particle1->quasi_deutron() && !particle2->quasi_deutron()) {
184 G4cerr << " ElementaryParticleCollider -> cannot collide "
185 << particle1->getDefinition()->GetParticleName() << " with "
186 << particle2->getDefinition()->GetParticleName() << G4endl;
187 return;
188 }
189
190 G4LorentzConvertor convertToSCM; // Utility to handle frame manipulation
191 if (particle2->nucleon() || particle2->quasi_deutron()) {
192 convertToSCM.setBullet(particle1);
193 convertToSCM.setTarget(particle2);
194 } else {
195 convertToSCM.setBullet(particle2);
196 convertToSCM.setTarget(particle1);
197 }
198
199 convertToSCM.setVerbose(verboseLevel);
200 convertToSCM.toTheCenterOfMass();
201
202 G4double etot_scm = convertToSCM.getTotalSCMEnergy();
203
204 // Generate any particle collision with nucleon
205 if (particle1->nucleon() || particle2->nucleon()) {
206 G4double ekin = convertToSCM.getKinEnergyInTheTRS();
207
208 // SPECIAL: Very low energy pions may be absorbed by a nucleon
209 if (pionNucleonAbsorption(ekin)) {
210 generateSCMpionNAbsorption(etot_scm, particle1, particle2);
211 } else {
212 generateSCMfinalState(ekin, etot_scm, particle1, particle2);
213 }
214 }
215
216 // Generate pion or photon collision with quasi-deuteron
217 if (particle1->quasi_deutron() || particle2->quasi_deutron()) {
218 if (!G4NucleiModel::useQuasiDeuteron(particle1->type(),particle2->type()) &&
219 !G4NucleiModel::useQuasiDeuteron(particle2->type(),particle1->type())) {
220 G4cerr << " ElementaryParticleCollider -> can only collide pi,mu,gamma with"
221 << " dibaryons " << G4endl;
222 return;
223 }
224
225 if (particle1->isMuon() || particle2->isMuon()) {
226 generateSCMmuonAbsorption(etot_scm, particle1, particle2);
227 } else { // Currently, pion absoprtion also handles gammas
228 generateSCMpionAbsorption(etot_scm, particle1, particle2);
229 }
230 }
231
232 if (particles.empty()) { // No final state possible, pass bullet through
233 if (verboseLevel) {
234 G4cerr << " ElementaryParticleCollider -> failed to collide "
235 << particle1->getMomModule() << " GeV/c "
236 << particle1->getDefinition()->GetParticleName() << " with "
237 << particle2->getDefinition()->GetParticleName() << G4endl;
238 }
239 return;
240 }
241
242 // Convert final state back to lab frame
243 G4LorentzVector mom; // Buffer to avoid memory churn
244 particleIterator ipart;
245 for(ipart = particles.begin(); ipart != particles.end(); ipart++) {
246 mom = convertToSCM.backToTheLab(ipart->getMomentum());
247 ipart->setMomentum(mom);
248 };
249
250 if (verboseLevel) {
251 // Check conservation in multibody final state
252 const G4ParticleDefinition* bDef = bullet->getDefinition();
253 const G4ParticleDefinition* tDef = target->getDefinition();
254
255 G4int initBaryonNumber = bDef->GetBaryonNumber() + tDef->GetBaryonNumber();
256 G4int initCharge = bullet->getCharge() + target->getCharge();
257 G4int initStrangeness = bDef->GetQuarkContent(3) - bDef->GetAntiQuarkContent(3) +
258 tDef->GetQuarkContent(3) - tDef->GetAntiQuarkContent(3);
259
260 G4int finalBaryonNumber = 0;
261 G4int finalCharge = 0;
262 G4int finalStrangeness = 0;
263
264 for (ipart = particles.begin(); ipart != particles.end(); ipart++) {
265 finalBaryonNumber += ipart->baryon();
266 finalCharge += ipart->getCharge();
267 finalStrangeness += ipart->getStrangeness();
268 }
269
270 G4int bnc = finalBaryonNumber - initBaryonNumber;
271 G4int cnc = finalCharge - initCharge;
272 G4int snc = finalStrangeness - initStrangeness;
273
274 if (bnc != 0 || cnc != 0 || snc != 0) {
275 G4cout << " G4ElementaryParticleCollider: quantum number non-conservation " << G4endl;
276 G4cout << " Baryon number: initial = " << initBaryonNumber << ", final = "
277 << finalBaryonNumber << G4endl;
278 G4cout << " Charge: initial = " << initCharge << ", final = "
279 << finalCharge << G4endl;
280 G4cout << " Strangeness: initial = " << initStrangeness << ", final = "
281 << finalStrangeness << G4endl;
282
283 G4cout << " bullet = " << bDef->GetParticleName() << G4endl;
284 G4cout << " target = " << tDef->GetParticleName() << G4endl;
285 G4cout << " secondaries = " ;
286 for (ipart = particles.begin(); ipart != particles.end(); ipart++) {
287 G4cout << ipart->getDefinition()->GetParticleName() << " " ;
288 }
289 G4cout << G4endl;
290 }
291 }
292
293 if (verboseLevel && !validateOutput(bullet, target, particles)) {
294 G4cout << " incoming particles: \n" << *particle1 << G4endl
295 << *particle2 << G4endl
296 << " outgoing particles: " << G4endl;
297 for(ipart = particles.begin(); ipart != particles.end(); ipart++)
298 G4cout << *ipart << G4endl;
299
300 G4cout << " <<< Non-conservation in G4ElementaryParticleCollider"
301 << G4endl;
302 }
303
304 std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
306}
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:64
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static void Print(std::ostream &os=G4cout)
static const G4CascadeChannel * GetTable(G4int initialState)
virtual G4bool useEPCollider(G4InuclParticle *bullet, G4InuclParticle *target) const
virtual G4bool validateOutput(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
void addOutgoingParticles(const std::vector< G4InuclElementaryParticle > &particles)
void generateSCMmuonAbsorption(G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
G4bool pionNucleonAbsorption(G4double ekin) const
void generateSCMpionAbsorption(G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
void generateSCMfinalState(G4double ekin, G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
void generateSCMpionNAbsorption(G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
std::vector< G4InuclElementaryParticle > particles
G4int hadrons() const
void set(G4InuclParticle *part1, G4InuclParticle *part2)
const G4ParticleDefinition * getDefinition() const
G4double getMomModule() const
G4double getCharge() const
G4double getTotalSCMEnergy() const
void setVerbose(G4int vb=0)
void setBullet(const G4InuclParticle *bullet)
G4LorentzVector backToTheLab(const G4LorentzVector &mom) const
G4double getKinEnergyInTheTRS() const
void setTarget(const G4InuclParticle *target)
static G4bool useQuasiDeuteron(G4int ptype, G4int qdtype=0)
G4int GetQuarkContent(G4int flavor) const
const G4String & GetParticleName() const
G4int GetAntiQuarkContent(G4int flavor) const

References G4CollisionOutput::addOutgoingParticles(), G4LorentzConvertor::backToTheLab(), G4cerr, G4cout, G4endl, generateSCMfinalState(), generateSCMmuonAbsorption(), generateSCMpionAbsorption(), generateSCMpionNAbsorption(), G4ParticleDefinition::GetAntiQuarkContent(), G4ParticleDefinition::GetBaryonNumber(), G4InuclParticle::getCharge(), G4InuclParticle::getDefinition(), G4LorentzConvertor::getKinEnergyInTheTRS(), G4InuclParticle::getMomModule(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetQuarkContent(), G4CascadeChannelTables::GetTable(), G4LorentzConvertor::getTotalSCMEnergy(), G4InteractionCase::hadrons(), G4CascadeColliderBase::interCase, G4InuclElementaryParticle::isMuon(), G4InuclElementaryParticle::isNeutrino(), G4InuclElementaryParticle::nucleon(), particles, pionNucleonAbsorption(), G4CascadeChannelTables::Print(), G4InuclElementaryParticle::quasi_deutron(), G4InteractionCase::set(), G4LorentzConvertor::setBullet(), G4LorentzConvertor::setTarget(), G4LorentzConvertor::setVerbose(), G4LorentzConvertor::toTheCenterOfMass(), G4InuclElementaryParticle::type(), G4CascadeColliderBase::useEPCollider(), G4NucleiModel::useQuasiDeuteron(), G4CascadeColliderBase::validateOutput(), and G4VCascadeCollider::verboseLevel.

Referenced by G4InuclCollider::collide(), G4LightTargetCollider::collide(), and G4NucleiModel::generateParticleFate().

◆ fillOutgoingMasses()

void G4ElementaryParticleCollider::fillOutgoingMasses ( )
private

Definition at line 425 of file G4ElementaryParticleCollider.cc.

425 {
426 G4int mult = particle_kinds.size();
427
428 masses.resize(mult,0.);
429 masses2.resize(mult,0.); // Allows direct [i] setting
430
431 for (G4int i = 0; i < mult; i++) {
433 masses2[i] = masses[i] * masses[i];
434 }
435}
static G4double getParticleMass(G4int type)

References G4InuclElementaryParticle::getParticleMass(), masses, masses2, and particle_kinds.

Referenced by generateSCMfinalState(), generateSCMmuonAbsorption(), generateSCMpionAbsorption(), and generateSCMpionNAbsorption().

◆ generateMultiplicity()

G4int G4ElementaryParticleCollider::generateMultiplicity ( G4int  is,
G4double  ekin 
) const
private

Definition at line 310 of file G4ElementaryParticleCollider.cc.

312{
313 G4int mul = 0;
314
316
317 if (xsecTable) mul = xsecTable->getMultiplicity(ekin);
318 else {
319 G4cerr << " G4ElementaryParticleCollider: Unknown interaction channel "
320 << is << " - multiplicity not generated " << G4endl;
321 }
322
323 if(verboseLevel > 3){
324 G4cout << " G4ElementaryParticleCollider::generateMultiplicity: "
325 << " multiplicity = " << mul << G4endl;
326 }
327
328 return mul;
329}
virtual G4int getMultiplicity(G4double ke) const =0

References G4cerr, G4cout, G4endl, G4CascadeChannel::getMultiplicity(), G4CascadeChannelTables::GetTable(), and G4VCascadeCollider::verboseLevel.

Referenced by generateSCMfinalState().

◆ generateOutgoingPartTypes()

void G4ElementaryParticleCollider::generateOutgoingPartTypes ( G4int  is,
G4int  mult,
G4double  ekin 
)
private

Definition at line 333 of file G4ElementaryParticleCollider.cc.

335{
336 particle_kinds.clear(); // Initialize buffer for generation
337
339
340 if (xsecTable)
341 xsecTable->getOutgoingParticleTypes(particle_kinds, mult, ekin);
342 else {
343 G4cerr << " G4ElementaryParticleCollider: Unknown interaction channel "
344 << is << " - outgoing kinds not generated " << G4endl;
345 }
346
347 return;
348}
virtual void getOutgoingParticleTypes(std::vector< G4int > &kinds, G4int mult, G4double ke) const =0

References G4cerr, G4endl, G4CascadeChannel::getOutgoingParticleTypes(), G4CascadeChannelTables::GetTable(), and particle_kinds.

Referenced by generateSCMfinalState().

◆ generateSCMfinalState()

void G4ElementaryParticleCollider::generateSCMfinalState ( G4double  ekin,
G4double  etot_scm,
G4InuclElementaryParticle particle1,
G4InuclElementaryParticle particle2 
)
private

Definition at line 352 of file G4ElementaryParticleCollider.cc.

355 {
356 if (verboseLevel > 2) {
357 G4cout << " >>> G4ElementaryParticleCollider::generateSCMfinalState"
358 << G4endl;
359 }
360
362
363 const G4int itry_max = 10;
364
365 G4int type1 = particle1->type();
366 G4int type2 = particle2->type();
367
368 G4int is = type1 * type2;
369
370 if (verboseLevel > 3) G4cout << " is " << is << G4endl;
371
372 G4int multiplicity = 0;
373 G4bool generate = true;
374
375 G4int itry = 0;
376 while (generate && itry++ < itry_max) { /* Loop checking 08.06.2015 MHK */
377 particles.clear(); // Initialize buffers for this event
378 particle_kinds.clear();
379
380 // Generate list of final-state particles
381 multiplicity = generateMultiplicity(is, ekin);
382
383 generateOutgoingPartTypes(is, multiplicity, ekin);
384 if (particle_kinds.empty()) {
385 if (verboseLevel > 3) {
386 G4cout << " generateOutgoingPartTypes failed mult " << multiplicity
387 << G4endl;
388 }
389 continue;
390 }
391
392 fillOutgoingMasses(); // Fill mass buffer from particle types
393
394 // Attempt to produce final state kinematics
395 fsGenerator.Configure(particle1, particle2, particle_kinds);
397 } // while (generate)
398
399 if (itry >= itry_max) { // Unable to generate valid final state
400 if (verboseLevel > 2)
401 G4cout << " generateSCMfinalState failed " << itry << " attempts"
402 << G4endl;
403 return;
404 }
405
406 // Store generated momenta into outgoing particles
407
408 particles.resize(multiplicity); // Preallocate buffer
409 for (G4int i=0; i<multiplicity; i++) {
412 }
413
414 if (verboseLevel > 3) {
415 G4cout << " <<< G4ElementaryParticleCollider::generateSCMfinalState"
416 << G4endl;
417 }
418
419 return; // Particles buffer filled
420}
void Configure(G4InuclElementaryParticle *bullet, G4InuclElementaryParticle *target, const std::vector< G4int > &particle_kinds)
G4int generateMultiplicity(G4int is, G4double ekin) const
G4CascadeFinalStateGenerator fsGenerator
void generateOutgoingPartTypes(G4int is, G4int mult, G4double ekin)
std::vector< G4LorentzVector > scm_momentums
void SetVerboseLevel(G4int verbose)
G4bool Generate(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)
void generate(const G4double sqrtS, ParticleList &particles)
Generate an event in the CM system.

References G4CascadeFinalStateGenerator::Configure(), G4InuclParticle::EPCollider, fillOutgoingMasses(), fsGenerator, G4cout, G4endl, G4INCL::PhaseSpaceGenerator::generate(), G4HadDecayGenerator::Generate(), generateMultiplicity(), generateOutgoingPartTypes(), masses, particle_kinds, particles, scm_momentums, G4HadDecayGenerator::SetVerboseLevel(), G4InuclElementaryParticle::type(), and G4VCascadeCollider::verboseLevel.

Referenced by collide().

◆ generateSCMmuonAbsorption()

void G4ElementaryParticleCollider::generateSCMmuonAbsorption ( G4double  etot_scm,
G4InuclElementaryParticle particle1,
G4InuclElementaryParticle particle2 
)
private

Definition at line 499 of file G4ElementaryParticleCollider.cc.

502{
503 if (verboseLevel > 3)
504 G4cout << " >>> G4ElementaryParticleCollider::generateSCMmuonAbsorption"
505 << G4endl;
506
507 particles.clear(); // Initialize buffers for this event
508 particles.resize(3);
509
510 scm_momentums.clear();
511 scm_momentums.resize(3);
512
513 particle_kinds.clear();
514
515 G4int typeProduct = particle1->type() * particle2->type();
516
517 if (typeProduct == G4int(mum)*G4int(diproton)) {
518 particle_kinds.push_back(pro);
519 particle_kinds.push_back(neu);
520 } else if (typeProduct == G4int(mum)*G4int(unboundPN)) {
521 particle_kinds.push_back(neu);
522 particle_kinds.push_back(neu);
523 } else {
524 G4cerr << " Illegal absorption: "
525 << particle1->getDefinition()->GetParticleName() << " + "
526 << particle2->getDefinition()->GetParticleName() << " -> ?"
527 << G4endl;
528 return;
529 }
530 particle_kinds.push_back(mnu);
531
533
534 // Phase space generator required for the 3-body final state
535 G4GDecay3 breakup(etot_scm, masses[0], masses[1], masses[2]);
536 std::vector<G4ThreeVector> theMomenta = breakup.GetThreeBodyMomenta();
537
538 if (theMomenta.empty()) {
539 G4cerr << " generateSCMmuonAbsorption: GetThreeBodyMomenta() failed"
540 << " for " << particle2->type() << " dibaryon" << G4endl;
541 particle_kinds.clear();
542 masses.clear();
543 particles.clear();
544 return;
545 }
546
547 for (size_t i=0; i<3; i++) {
548 scm_momentums[i].setVectM(theMomenta[i], masses[i]);
550 }
551}

References G4InuclParticleNames::diproton, G4InuclParticle::EPCollider, fillOutgoingMasses(), G4cerr, G4cout, G4endl, G4InuclParticle::getDefinition(), G4ParticleDefinition::GetParticleName(), G4GDecay3::GetThreeBodyMomenta(), masses, G4InuclParticleNames::mnu, G4InuclParticleNames::mum, G4InuclParticleNames::neu, particle_kinds, particles, G4InuclParticleNames::pro, scm_momentums, G4InuclElementaryParticle::type(), G4InuclParticleNames::unboundPN, and G4VCascadeCollider::verboseLevel.

Referenced by collide().

◆ generateSCMpionAbsorption()

void G4ElementaryParticleCollider::generateSCMpionAbsorption ( G4double  etot_scm,
G4InuclElementaryParticle particle1,
G4InuclElementaryParticle particle2 
)
private

Definition at line 442 of file G4ElementaryParticleCollider.cc.

445{
446 if (verboseLevel > 3)
447 G4cout << " >>> G4ElementaryParticleCollider::generateSCMpionAbsorption"
448 << G4endl;
449
450 particles.clear(); // Initialize buffers for this event
451 particles.resize(2);
452
453 particle_kinds.clear();
454
455 G4int typeProduct = particle1->type() * particle2->type();
456
457 if (typeProduct == G4int(pi0)*G4int(diproton) || typeProduct == G4int(pip)*G4int(unboundPN) ||
458 typeProduct == G4int(gam)*G4int(diproton)) {
459 particle_kinds.push_back(pro);
460 particle_kinds.push_back(pro);
461
462 } else if (typeProduct == G4int(pim)*G4int(diproton) || typeProduct == G4int(pip)*G4int(dineutron) ||
463 typeProduct == G4int(pi0)*G4int(unboundPN) || typeProduct == G4int(gam)*G4int(unboundPN)) {
464 particle_kinds.push_back(pro);
465 particle_kinds.push_back(neu);
466
467 } else if (typeProduct == G4int(pi0)*G4int(dineutron) || typeProduct == G4int(pim)*G4int(unboundPN) ||
468 typeProduct == G4int(gam)*G4int(dineutron)) {
469 particle_kinds.push_back(neu);
470 particle_kinds.push_back(neu);
471
472 } else {
473 G4cerr << " Illegal absorption: "
474 << particle1->getDefinition()->GetParticleName() << " + "
475 << particle2->getDefinition()->GetParticleName() << " -> ?"
476 << G4endl;
477 return;
478 }
479
481
482 G4double a = 0.5 * (etot_scm * etot_scm - masses2[0] - masses2[1]);
483
484 G4double pmod = std::sqrt((a*a - masses2[0]*masses2[1])
485 / (etot_scm*etot_scm) );
487 G4LorentzVector mom2;
488 mom2.setVectM(-mom1.vect(), masses[1]);
489
492}
void setVectM(const Hep3Vector &spatial, double mass)
Hep3Vector vect() const
G4LorentzVector generateWithRandomAngles(G4double p, G4double mass=0.)

References G4InuclParticleNames::dineutron, G4InuclParticleNames::diproton, G4InuclParticle::EPCollider, fillOutgoingMasses(), G4cerr, G4cout, G4endl, G4InuclParticleNames::gam, G4InuclSpecialFunctions::generateWithRandomAngles(), G4InuclParticle::getDefinition(), G4ParticleDefinition::GetParticleName(), masses, masses2, G4InuclParticleNames::neu, particle_kinds, particles, G4InuclParticleNames::pi0, G4InuclParticleNames::pim, G4InuclParticleNames::pip, G4InuclParticleNames::pro, CLHEP::HepLorentzVector::setVectM(), G4InuclElementaryParticle::type(), G4InuclParticleNames::unboundPN, CLHEP::HepLorentzVector::vect(), and G4VCascadeCollider::verboseLevel.

Referenced by collide().

◆ generateSCMpionNAbsorption()

void G4ElementaryParticleCollider::generateSCMpionNAbsorption ( G4double  etot_scm,
G4InuclElementaryParticle particle1,
G4InuclElementaryParticle particle2 
)
private

Definition at line 557 of file G4ElementaryParticleCollider.cc.

559 {
560 if (verboseLevel > 3)
561 G4cout << " >>> G4ElementaryParticleCollider::generateSCMpionNAbsorption"
562 << G4endl;
563
564 particles.clear(); // Initialize buffers for this event
565 particles.resize(1);
566
567 particle_kinds.clear();
568
569 G4int type1 = particle1->type();
570 G4int type2 = particle2->type();
571
572 // Ensure that single-nucleon absportion is valid (charge exchangeable)
573 if ((type1*type2 != pim*pro && type1*type2 != pip*neu)) {
574 G4cerr << " pion-nucleon absorption: "
575 << particle1->getDefinition()->GetParticleName() << " + "
576 << particle2->getDefinition()->GetParticleName() << " -> ?"
577 << G4endl;
578 return;
579 }
580
581 // Get outgoing nucleon type using charge exchange
582 // Proton code is 1, neutron code is 2, so 3-# swaps them
583 G4int ntype = (particle2->nucleon() ? type2 : type1);
584 G4int outType = 3 - ntype;
585 particle_kinds.push_back(outType);
586
588
589 // Get mass of residual nucleus (2-ntype = 1 for proton, 0 for neutron)
590 G4double mRecoil =
592 G4double mRecoil2 = mRecoil*mRecoil;
593
594 // Recompute Ecm to include nucleus (for recoil kinematics)
595 G4LorentzVector piN4 = particle1->getMomentum() + particle2->getMomentum();
596 G4LorentzVector vsum(0.,0.,0.,mRecoil);
597 vsum += piN4;
598
599 // Two-body kinematics (nucleon against nucleus) in overall CM system
600 G4double esq_scm = vsum.m2();
601 G4double a = 0.5 * (esq_scm - masses2[0] - mRecoil2);
602
603 G4double pmod = std::sqrt((a*a - masses2[0]*mRecoil2) / esq_scm );
605
606 if (verboseLevel > 3) {
607 G4cout << " outgoing type " << outType << " recoiling on nuclear mass "
608 << mRecoil << "\n a " << a << " p " << pmod << " Ekin "
609 << mom1.e()-masses[0] << G4endl;
610 }
611
612 mom1.boost(-piN4.boostVector()); // Boost into CM of pi-N collision
613
614 if (verboseLevel > 3) {
615 G4cout << " in original pi-N frame p(SCM) " << mom1.rho() << " Ekin "
616 << mom1.e()-masses[0] << G4endl;
617 }
618
619 // Fill only the ejected nucleon
621}
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
G4double getNucleiMass() const
G4LorentzVector getMomentum() const

References CLHEP::HepLorentzVector::boost(), CLHEP::HepLorentzVector::boostVector(), CLHEP::HepLorentzVector::e(), G4InuclParticle::EPCollider, fillOutgoingMasses(), G4cerr, G4cout, G4endl, G4InuclSpecialFunctions::generateWithRandomAngles(), G4InuclParticle::getDefinition(), G4InuclParticle::getMomentum(), G4InuclNuclei::getNucleiMass(), G4ParticleDefinition::GetParticleName(), CLHEP::HepLorentzVector::m2(), masses, masses2, G4InuclParticleNames::neu, G4InuclElementaryParticle::nucleon(), nucleusA, nucleusZ, particle_kinds, particles, G4InuclParticleNames::pim, G4InuclParticleNames::pip, G4InuclParticleNames::pro, CLHEP::HepLorentzVector::rho(), G4InuclElementaryParticle::type(), and G4VCascadeCollider::verboseLevel.

Referenced by collide().

◆ inelasticInteractionPossible()

G4bool G4CascadeColliderBase::inelasticInteractionPossible ( G4InuclParticle bullet,
G4InuclParticle target,
G4double  ekin 
) const
protectedvirtualinherited

Definition at line 85 of file G4CascadeColliderBase.cc.

87 {
88 if (verboseLevel) {
89 G4cout << " >>> " << theName << "::inelasticInteractionPossible" << G4endl;
90 }
91
92 // If hadron-hadron collision, defer to ElementaryParticleCollider
93 if (useEPCollider(bullet, target)) return true;
94
95 // See which one of the two (or both) is a nucleus, get properties
96 // FIXME: Should set a = baryon() for both, but that's not in base
97 G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet);
98 G4double ab = nuclei_bullet ? nuclei_bullet->getA() : 1; // FIXME
99 G4double zb = nuclei_bullet ? nuclei_bullet->getZ() : bullet->getCharge();
100
101 G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target);
102 G4double at = nuclei_target ? nuclei_target->getA() : 1; // FIXME
103 G4double zt = nuclei_target ? nuclei_target->getZ() : target->getCharge();
104
105 // VCOL (Coulomb barrier) used for testing if elastic collision necessary
106 const G4double coeff = 0.001 * 1.2;
107
108 G4double VCOL = coeff * zt * zb / (G4cbrt(at) + G4cbrt(ab));
109
110 G4bool possible = true; // Force inelastic; should be (ekin >= VCOL)
111
112 if (verboseLevel > 3) {
113 G4cout << " VCOL: " << VCOL << " ekin: " << ekin << " inelastic possible: "
114 << possible << G4endl;
115 }
116
117 return possible;
118}
static const G4double ab
G4int getZ() const
G4int getA() const

References ab, G4InuclSpecialFunctions::G4cbrt(), G4cout, G4endl, G4InuclNuclei::getA(), G4InuclParticle::getCharge(), G4InuclNuclei::getZ(), G4VCascadeCollider::theName, G4CascadeColliderBase::useEPCollider(), and G4VCascadeCollider::verboseLevel.

Referenced by G4InuclCollider::collide().

◆ operator=()

G4ElementaryParticleCollider & G4ElementaryParticleCollider::operator= ( const G4ElementaryParticleCollider )
private

◆ pionNucleonAbsorption()

G4bool G4ElementaryParticleCollider::pionNucleonAbsorption ( G4double  ekin) const
private

Definition at line 626 of file G4ElementaryParticleCollider.cc.

626 {
627 if (verboseLevel > 3)
628 G4cout << " >>> G4ElementaryParticleCollider::pionNucleonAbsorption ?"
629 << " ekin " << ekin << " is " << interCase.hadrons() << G4endl;
630
631 // Absorption occurs with specified probability
633
634 // Absorption occurs only for pi- p -> n, or pi+ n -> p
635 // Restrict to "very slow" pions, to allow for some normal scattering
636 return ((interCase.hadrons() == pim*pro ||
638 && (ekin < 0.05) // 50 MeV kinetic energy or less
639 && (G4UniformRand() < absProb)
640 );
641}
#define G4UniformRand()
Definition: Randomize.hh:52
static G4double piNAbsorption()

References G4cout, G4endl, G4UniformRand, G4InteractionCase::hadrons(), G4CascadeColliderBase::interCase, G4InuclParticleNames::neu, G4InuclParticleNames::pim, G4CascadeParameters::piNAbsorption(), G4InuclParticleNames::pip, G4InuclParticleNames::pro, and G4VCascadeCollider::verboseLevel.

Referenced by collide().

◆ rescatter()

virtual void G4CascadeColliderBase::rescatter ( G4InuclParticle ,
G4KineticTrackVector ,
G4V3DNucleus ,
G4CollisionOutput  
)
inlinevirtualinherited

Reimplemented in G4IntraNucleiCascader, and G4InuclCollider.

Definition at line 68 of file G4CascadeColliderBase.hh.

71 { ; }

◆ setName()

virtual void G4VCascadeCollider::setName ( const G4String name)
inlineprotectedvirtualinherited

Definition at line 55 of file G4VCascadeCollider.hh.

55{ theName = name; }
const char * name(G4int ptype)

References G4InuclParticleNames::name(), and G4VCascadeCollider::theName.

Referenced by G4CascadeCheckBalance::setOwner().

◆ setNucleusState()

void G4ElementaryParticleCollider::setNucleusState ( G4int  a,
G4int  z 
)
inline

Definition at line 81 of file G4ElementaryParticleCollider.hh.

81 { // Nucleus to use for recoil
82 nucleusA = a; nucleusZ = z;
83 }

References nucleusA, and nucleusZ.

Referenced by G4NucleiModel::generateParticleFate().

◆ setVerboseLevel()

void G4CascadeColliderBase::setVerboseLevel ( G4int  verbose = 0)
virtualinherited

◆ useEPCollider()

G4bool G4CascadeColliderBase::useEPCollider ( G4InuclParticle bullet,
G4InuclParticle target 
) const
protectedvirtualinherited

Definition at line 75 of file G4CascadeColliderBase.cc.

76 {
77 return (dynamic_cast<G4InuclElementaryParticle*>(bullet) &&
78 dynamic_cast<G4InuclElementaryParticle*>(target));
79}

Referenced by G4InuclCollider::collide(), collide(), and G4CascadeColliderBase::inelasticInteractionPossible().

◆ validateOutput() [1/3]

G4bool G4CascadeColliderBase::validateOutput ( const G4Fragment fragment,
G4CollisionOutput output 
)
protectedvirtualinherited

Definition at line 139 of file G4CascadeColliderBase.cc.

140 {
141 if (!balance) return true; // Skip checks unless requested
142
143 if (verboseLevel > 1)
144 G4cout << " >>> " << theName << "::validateOutput" << G4endl;
145
147 balance->collide(fragment, output);
148 return balance->okay(); // Returns false if violations
149}
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)

References G4CascadeColliderBase::balance, G4CascadeCheckBalance::collide(), G4cout, G4endl, G4CascadeCheckBalance::okay(), G4VCascadeCollider::setVerboseLevel(), G4VCascadeCollider::theName, and G4VCascadeCollider::verboseLevel.

◆ validateOutput() [2/3]

G4bool G4CascadeColliderBase::validateOutput ( G4InuclParticle bullet,
G4InuclParticle target,
const std::vector< G4InuclElementaryParticle > &  particles 
)
protectedvirtualinherited

Definition at line 151 of file G4CascadeColliderBase.cc.

153 {
154 if (!balance) return true; // Skip checks unless requested
155
156 if (verboseLevel > 1)
157 G4cout << " >>> " << theName << "::validateOutput" << G4endl;
158
160 balance->collide(bullet, target, particles);
161 return balance->okay(); // Returns false if violations
162}

References G4CascadeColliderBase::balance, G4CascadeCheckBalance::collide(), G4cout, G4endl, G4CascadeCheckBalance::okay(), G4VCascadeCollider::setVerboseLevel(), G4VCascadeCollider::theName, and G4VCascadeCollider::verboseLevel.

◆ validateOutput() [3/3]

G4bool G4CascadeColliderBase::validateOutput ( G4InuclParticle bullet,
G4InuclParticle target,
G4CollisionOutput output 
)
protectedvirtualinherited

Definition at line 123 of file G4CascadeColliderBase.cc.

125 {
126 if (!balance) return true; // Skip checks unless requested
127
128 if (verboseLevel > 1)
129 G4cout << " >>> " << theName << "::validateOutput" << G4endl;
130
131 // Show final state particles
132 if (verboseLevel > 2) output.printCollisionOutput();
133
135 balance->collide(bullet, target, output);
136 return balance->okay(); // Returns false if violations
137}
void printCollisionOutput(std::ostream &os=G4cout) const

References G4CascadeColliderBase::balance, G4CascadeCheckBalance::collide(), G4cout, G4endl, G4CascadeCheckBalance::okay(), G4CollisionOutput::printCollisionOutput(), G4VCascadeCollider::setVerboseLevel(), G4VCascadeCollider::theName, and G4VCascadeCollider::verboseLevel.

Referenced by collide(), and G4InuclCollider::deexcite().

Field Documentation

◆ balance

G4CascadeCheckBalance* G4CascadeColliderBase::balance
protectedinherited

◆ fsGenerator

G4CascadeFinalStateGenerator G4ElementaryParticleCollider::fsGenerator
private

Definition at line 114 of file G4ElementaryParticleCollider.hh.

Referenced by generateSCMfinalState().

◆ interCase

G4InteractionCase G4CascadeColliderBase::interCase
protectedinherited

◆ masses

std::vector<G4double> G4ElementaryParticleCollider::masses
private

◆ masses2

std::vector<G4double> G4ElementaryParticleCollider::masses2
private

◆ modules

std::vector<G4double> G4ElementaryParticleCollider::modules
private

Definition at line 119 of file G4ElementaryParticleCollider.hh.

◆ nucleusA

G4int G4ElementaryParticleCollider::nucleusA
private

Definition at line 125 of file G4ElementaryParticleCollider.hh.

Referenced by generateSCMpionNAbsorption(), and setNucleusState().

◆ nucleusZ

G4int G4ElementaryParticleCollider::nucleusZ
private

Definition at line 125 of file G4ElementaryParticleCollider.hh.

Referenced by generateSCMpionNAbsorption(), and setNucleusState().

◆ particle_kinds

std::vector<G4int> G4ElementaryParticleCollider::particle_kinds
private

◆ particles

std::vector<G4InuclElementaryParticle> G4ElementaryParticleCollider::particles
private

◆ scm_momentums

std::vector<G4LorentzVector> G4ElementaryParticleCollider::scm_momentums
private

◆ theName

G4String G4VCascadeCollider::theName
protectedinherited

◆ verboseLevel

G4int G4VCascadeCollider::verboseLevel
protectedinherited

Definition at line 53 of file G4VCascadeCollider.hh.

Referenced by G4CascadeCheckBalance::baryonOkay(), G4CascadeCheckBalance::chargeOkay(), G4IntraNucleiCascader::collide(), G4InuclCollider::collide(), G4LightTargetCollider::collide(), G4VCascadeDeexcitation::collide(), G4CascadeCheckBalance::collide(), G4CascadeRecoilMaker::collide(), collide(), G4IntraNucleiCascader::copySecondaries(), G4IntraNucleiCascader::copyWoundedNucleus(), G4IntraNucleiCascader::decayTrappedParticle(), G4CascadeDeexcitation::deExcite(), G4InuclCollider::deexcite(), G4PreCompoundDeexcitation::deExcite(), G4BigBanger::deExcite(), G4EquilibriumEvaporator::deExcite(), G4EvaporationInuclCollider::deExcite(), G4Fissioner::deExcite(), G4NonEquilibriumEvaporator::deExcite(), G4CascadeCheckBalance::ekinOkay(), G4CascadeCheckBalance::energyOkay(), G4EquilibriumEvaporator::explosion(), G4CascadeDeexciteBase::explosion(), G4CascadeRecoilMaker::fillRecoil(), G4IntraNucleiCascader::finalize(), G4IntraNucleiCascader::finishCascade(), G4VCascadeCollider::G4VCascadeCollider(), G4BigBanger::generateBangInSCM(), G4IntraNucleiCascader::generateCascade(), G4BigBanger::generateMomentumModules(), generateMultiplicity(), generateSCMfinalState(), generateSCMmuonAbsorption(), generateSCMpionAbsorption(), generateSCMpionNAbsorption(), G4BigBanger::generateX(), G4EquilibriumEvaporator::getAF(), G4Fissioner::getC2(), G4EquilibriumEvaporator::getE0(), G4NonEquilibriumEvaporator::getE0(), G4NonEquilibriumEvaporator::getMatrixElement(), G4NonEquilibriumEvaporator::getParLev(), G4EquilibriumEvaporator::getPARLEVDEN(), G4EquilibriumEvaporator::getQF(), G4Fissioner::getZopt(), G4CascadeRecoilMaker::goodNucleus(), G4EquilibriumEvaporator::goodRemnant(), G4CascadeColliderBase::inelasticInteractionPossible(), G4IntraNucleiCascader::initialize(), G4CascadeDeexciteBase::makeFragment(), G4CascadeRecoilMaker::makeRecoilFragment(), G4CascadeRecoilMaker::makeRecoilNuclei(), G4BigBanger::maxProbability(), G4CascadeCheckBalance::momentumOkay(), G4IntraNucleiCascader::newCascade(), G4InuclCollider::photonuclearOkay(), pionNucleonAbsorption(), G4Fissioner::potentialMinimization(), G4IntraNucleiCascader::preloadCascade(), G4IntraNucleiCascader::processSecondary(), G4IntraNucleiCascader::processTrappedParticle(), G4IntraNucleiCascader::releaseSecondary(), G4IntraNucleiCascader::rescatter(), G4InuclCollider::rescatter(), G4IntraNucleiCascader::setupCascade(), G4InuclCollider::setVerboseLevel(), G4LightTargetCollider::setVerboseLevel(), G4VCascadeCollider::setVerboseLevel(), G4CascadeCheckBalance::strangeOkay(), G4InuclCollider::useCascadeDeexcitation(), G4InuclCollider::usePreCompoundDeexcitation(), G4CascadeDeexciteBase::validateOutput(), G4CascadeColliderBase::validateOutput(), G4CascadeRecoilMaker::wholeEvent(), and G4BigBanger::xProbability().


The documentation for this class was generated from the following files: