137 nucleusA(0), nucleusZ(0) {;}
146 G4cout <<
" >>> G4ElementaryParticleCollider::collide" <<
G4endl;
149 G4cerr <<
" ElementaryParticleCollider -> can collide only particle with particle "
154 #ifdef G4CASCADE_DEBUG_SAMPLER
155 static G4bool doPrintTables =
true;
158 doPrintTables =
false;
171 if (!particle1 || !particle2) {
172 G4cerr <<
" ElementaryParticleCollider -> can only collide hadrons"
182 G4cerr <<
" ElementaryParticleCollider -> cannot collide "
217 G4cerr <<
" ElementaryParticleCollider -> can only collide pi,mu,gamma with"
218 <<
" dibaryons " <<
G4endl;
233 G4cerr <<
" ElementaryParticleCollider -> failed to collide "
246 ipart->setMomentum(mom);
251 G4cout <<
" incoming particles: \n" << *particle1 << G4endl
252 << *particle2 << G4endl
253 <<
" outgoing particles: " <<
G4endl;
255 G4cout << *ipart << G4endl;
257 G4cout <<
" <<< Non-conservation in G4ElementaryParticleCollider"
276 G4cerr <<
" G4ElementaryParticleCollider: Unknown interaction channel "
277 << is <<
" - multiplicity not generated " <<
G4endl;
281 G4cout <<
" G4ElementaryParticleCollider::generateMultiplicity: "
282 <<
" multiplicity = " << mul <<
G4endl;
300 G4cerr <<
" G4ElementaryParticleCollider: Unknown interaction channel "
301 << is <<
" - outgoing kinds not generated " <<
G4endl;
314 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMfinalState"
320 const G4int itry_max = 10;
325 G4int is = type1 * type2;
329 G4int multiplicity = 0;
333 while (generate && itry++ < itry_max) {
343 G4cout <<
" generateOutgoingPartTypes failed mult " << multiplicity
356 if (itry >= itry_max) {
358 G4cout <<
" generateSCMfinalState failed " << itry <<
" attempts"
366 for (
G4int i=0; i<multiplicity; i++) {
372 G4cout <<
" <<< G4ElementaryParticleCollider::generateSCMfinalState"
388 for (
G4int i = 0; i < mult; i++) {
403 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMpionAbsorption"
416 G4cerr <<
" pion absorption: "
430 / (masses2[0] + masses2[1] + 2.0*a));
433 mom2.setVectM(-mom1.vect(),
masses[1]);
449 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMmuonAbsorption"
469 G4cerr <<
" mu- absorption: "
484 if (theMomenta.empty()) {
485 G4cerr <<
" generateSCMmuonAbsorption: GetThreeBodyMomenta() failed"
486 <<
" for " << type2 <<
" dibaryon" <<
G4endl;
492 for (
size_t i=0; i<3; i++) {
506 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMpionNAbsorption"
518 if ((type1*type2 !=
pim*
pro && type1*type2 !=
pip*
neu)) {
519 G4cerr <<
" pion-nucleon absorption: "
529 G4int outType = 3 - ntype;
537 G4double mRecoil2 = mRecoil*mRecoil;
548 / (
masses2[0] + mRecoil2 + 2.0*a));
552 G4cout <<
" outgoing type " << outType <<
" recoiling on nuclear mass "
553 << mRecoil <<
" a " << a <<
" p(SCM) " << pmod <<
" Ekin "
559 mom2.setVectM(-mom1.vect(), mRecoil);
560 mom1.boost(-mom2.boostVector());
563 G4cout <<
" after nuclear recoil p " << mom1.rho() <<
" Ekin "
579 G4cout <<
" >>> G4ElementaryParticleCollider::pionNucleonAbsorption ?"
599 G4cerr <<
" type " << qdtype <<
" not dibaryon!" <<
G4endl;
void generateSCMpionNAbsorption(G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
void generateSCMpionAbsorption(G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
std::vector< G4double > masses2
std::vector< G4ThreeVector > GetThreeBodyMomenta()
static const G4CascadeChannel * GetTable(G4int initialState)
std::vector< G4int > particle_kinds
G4bool Generate(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)
G4CascadeFinalStateGenerator fsGenerator
G4LorentzVector getMomentum() const
virtual G4bool useEPCollider(G4InuclParticle *bullet, G4InuclParticle *target) const
virtual void getOutgoingParticleTypes(std::vector< G4int > &kinds, G4int mult, G4double ke) const =0
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
const G4ParticleDefinition * getDefinition() const
std::vector< G4double > masses
static G4bool useQuasiDeuteron(G4int ptype, G4int qdtype=0)
static G4double getParticleMass(G4int type)
void setBullet(const G4InuclParticle *bullet)
G4double getTotalSCMEnergy() const
G4LorentzVector backToTheLab(const G4LorentzVector &mom) const
void generateSCMmuonAbsorption(G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
const G4String & GetParticleName() const
std::vector< G4LorentzVector > scm_momentums
G4ElementaryParticleCollider()
void generateSCMfinalState(G4double ekin, G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
G4GLOB_DLL std::ostream G4cout
void setVerbose(G4int vb=0)
std::vector< G4InuclElementaryParticle > particles
G4double getNucleiMass() const
void Configure(G4InuclElementaryParticle *bullet, G4InuclElementaryParticle *target, const std::vector< G4int > &particle_kinds)
void fillOutgoingMasses()
void generateOutgoingPartTypes(G4int is, G4int mult, G4double ekin)
G4LorentzVector generateWithRandomAngles(G4double p, G4double mass=0.)
G4double getKinEnergyInTheTRS() const
G4InteractionCase interCase
G4int generateMultiplicity(G4int is, G4double ekin) const
static void Print(std::ostream &os=G4cout)
void addOutgoingParticles(const std::vector< G4InuclElementaryParticle > &particles)
void set(G4InuclParticle *part1, G4InuclParticle *part2)
void generate(const G4double sqrtS, ParticleList &particles)
Generate an event in the CM system.
void SetVerboseLevel(G4int verbose)
virtual G4bool validateOutput(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
std::vector< G4InuclElementaryParticle >::iterator particleIterator
G4bool quasi_deutron() const
G4bool splitQuasiDeuteron(G4int qdtype)
static G4bool piNAbsorption()
virtual G4int getMultiplicity(G4double ke) const =0
std::vector< G4InuclElementaryParticle >::iterator particleIterator
G4bool pionNucleonAbsorption(G4double ekin) const
G4double getMomModule() const
G4GLOB_DLL std::ostream G4cerr
G4bool isNeutrino() const
void setTarget(const G4InuclParticle *target)
CLHEP::HepLorentzVector G4LorentzVector