140 nucleusA(0), nucleusZ(0) {;}
149 G4cout <<
" >>> G4ElementaryParticleCollider::collide" <<
G4endl;
152 G4cerr <<
" ElementaryParticleCollider -> can collide only particle with particle "
157 #ifdef G4CASCADE_DEBUG_SAMPLER
158 static G4bool doPrintTables =
true;
161 doPrintTables =
false;
174 if (!particle1 || !particle2) {
175 G4cerr <<
" ElementaryParticleCollider -> can only collide hadrons"
185 G4cerr <<
" ElementaryParticleCollider -> cannot collide "
221 G4cerr <<
" ElementaryParticleCollider -> can only collide pi,mu,gamma with"
222 <<
" dibaryons " <<
G4endl;
235 G4cerr <<
" ElementaryParticleCollider -> failed to collide "
248 ipart->setMomentum(mom);
253 G4cout <<
" incoming particles: \n" << *particle1 << G4endl
254 << *particle2 << G4endl
255 <<
" outgoing particles: " <<
G4endl;
257 G4cout << *ipart << G4endl;
259 G4cout <<
" <<< Non-conservation in G4ElementaryParticleCollider"
278 G4cerr <<
" G4ElementaryParticleCollider: Unknown interaction channel "
279 << is <<
" - multiplicity not generated " <<
G4endl;
283 G4cout <<
" G4ElementaryParticleCollider::generateMultiplicity: "
284 <<
" multiplicity = " << mul <<
G4endl;
302 G4cerr <<
" G4ElementaryParticleCollider: Unknown interaction channel "
303 << is <<
" - outgoing kinds not generated " <<
G4endl;
316 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMfinalState"
322 const G4int itry_max = 10;
327 G4int is = type1 * type2;
331 G4int multiplicity = 0;
335 while (generate && itry++ < itry_max) {
345 G4cout <<
" generateOutgoingPartTypes failed mult " << multiplicity
358 if (itry >= itry_max) {
360 G4cout <<
" generateSCMfinalState failed " << itry <<
" attempts"
368 for (
G4int i=0; i<multiplicity; i++) {
374 G4cout <<
" <<< G4ElementaryParticleCollider::generateSCMfinalState"
390 for (
G4int i = 0; i < mult; i++) {
405 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMpionAbsorption"
418 G4cerr <<
" pion absorption: "
432 / (etot_scm*etot_scm) );
435 mom2.setVectM(-mom1.vect(),
masses[1]);
451 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMmuonAbsorption"
471 G4cerr <<
" mu- absorption: "
486 if (theMomenta.empty()) {
487 G4cerr <<
" generateSCMmuonAbsorption: GetThreeBodyMomenta() failed"
488 <<
" for " << type2 <<
" dibaryon" <<
G4endl;
494 for (
size_t i=0; i<3; i++) {
508 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMpionNAbsorption"
520 if ((type1*type2 !=
pim*
pro && type1*type2 !=
pip*
neu)) {
521 G4cerr <<
" pion-nucleon absorption: "
531 G4int outType = 3 - ntype;
539 G4double mRecoil2 = mRecoil*mRecoil;
554 G4cout <<
" outgoing type " << outType <<
" recoiling on nuclear mass "
555 << mRecoil <<
"\n a " << a <<
" p " << pmod <<
" Ekin "
559 mom1.boost(-piN4.boostVector());
562 G4cout <<
" in original pi-N frame p(SCM) " << mom1.rho() <<
" Ekin "
576 G4cout <<
" >>> G4ElementaryParticleCollider::pionNucleonAbsorption ?"
596 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
static G4double piNAbsorption()
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)
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