132 using namespace G4InuclParticleNames;
133 using namespace G4InuclSpecialFunctions;
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);
261 G4int finalBaryonNumber = 0;
262 G4int finalCharge = 0;
263 G4int finalStrangeness = 0;
266 finalBaryonNumber += ipart->baryon();
267 finalCharge += ipart->getCharge();
268 finalStrangeness += ipart->getStrangeness();
271 G4int bnc = finalBaryonNumber - initBaryonNumber;
272 G4int cnc = finalCharge - initCharge;
273 G4int snc = finalStrangeness - initStrangeness;
275 if (bnc != 0 || cnc != 0 || snc != 0) {
276 G4cout <<
" G4ElementaryParticleCollider: quantum number non-conservation " <<
G4endl;
277 G4cout <<
" Baryon number: initial = " << initBaryonNumber <<
", final = "
278 << finalBaryonNumber <<
G4endl;
279 G4cout <<
" Charge: initial = " << initCharge <<
", final = "
281 G4cout <<
" Strangeness: initial = " << initStrangeness <<
", final = "
282 << finalStrangeness <<
G4endl;
286 G4cout <<
" secondaries = " ;
288 G4cout << ipart->getDefinition()->GetParticleName() <<
" " ;
295 G4cout <<
" incoming particles: \n" << *particle1 << G4endl
296 << *particle2 << G4endl
297 <<
" outgoing particles: " <<
G4endl;
299 G4cout << *ipart << G4endl;
301 G4cout <<
" <<< Non-conservation in G4ElementaryParticleCollider"
320 G4cerr <<
" G4ElementaryParticleCollider: Unknown interaction channel "
321 << is <<
" - multiplicity not generated " <<
G4endl;
325 G4cout <<
" G4ElementaryParticleCollider::generateMultiplicity: "
326 <<
" multiplicity = " << mul <<
G4endl;
344 G4cerr <<
" G4ElementaryParticleCollider: Unknown interaction channel "
345 << is <<
" - outgoing kinds not generated " <<
G4endl;
358 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMfinalState"
364 const G4int itry_max = 10;
369 G4int is = type1 * type2;
373 G4int multiplicity = 0;
377 while (generate && itry++ < itry_max) {
387 G4cout <<
" generateOutgoingPartTypes failed mult " << multiplicity
400 if (itry >= itry_max) {
402 G4cout <<
" generateSCMfinalState failed " << itry <<
" attempts"
410 for (
G4int i=0; i<multiplicity; i++) {
416 G4cout <<
" <<< G4ElementaryParticleCollider::generateSCMfinalState"
432 for (
G4int i = 0; i < mult; i++) {
448 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMpionAbsorption"
463 }
else if (typeProduct ==
pim*diproton || typeProduct ==
pip*
dineutron ||
468 }
else if (typeProduct ==
pi0*
dineutron || typeProduct ==
pim*unboundPN ||
474 G4cerr <<
" Illegal absorption: "
486 / (etot_scm*etot_scm) );
505 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMmuonAbsorption"
525 G4cerr <<
" Illegal absorption: "
539 if (theMomenta.empty()) {
540 G4cerr <<
" generateSCMmuonAbsorption: GetThreeBodyMomenta() failed"
541 <<
" for " << particle2->
type() <<
" dibaryon" <<
G4endl;
548 for (
size_t i=0; i<3; i++) {
562 G4cout <<
" >>> G4ElementaryParticleCollider::generateSCMpionNAbsorption"
574 if ((type1*type2 !=
pim*
pro && type1*type2 !=
pip*
neu)) {
575 G4cerr <<
" pion-nucleon absorption: "
585 G4int outType = 3 - ntype;
593 G4double mRecoil2 = mRecoil*mRecoil;
608 G4cout <<
" outgoing type " << outType <<
" recoiling on nuclear mass "
609 << mRecoil <<
"\n a " << a <<
" p " << pmod <<
" Ekin "
616 G4cout <<
" in original pi-N frame p(SCM) " << mom1.
rho() <<
" Ekin "
629 G4cout <<
" >>> G4ElementaryParticleCollider::pionNucleonAbsorption ?"
std::vector< ExP01TrackerHit * > a
static G4double getParticleMass(G4int type)
void SetVerboseLevel(G4int verbose)
void setBullet(const G4InuclParticle *bullet)
G4bool quasi_deutron() const
virtual void getOutgoingParticleTypes(std::vector< G4int > &kinds, G4int mult, G4double ke) const =0
virtual G4int getMultiplicity(G4double ke) const =0
const G4String & GetParticleName() const
static void Print(std::ostream &os=G4cout)
void setVerbose(G4int vb=0)
std::vector< G4double > masses2
G4LorentzVector generateWithRandomAngles(G4double p, G4double mass=0.)
void generateOutgoingPartTypes(G4int is, G4int mult, G4double ekin)
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
G4InteractionCase interCase
const G4ParticleDefinition * getDefinition() const
void set(G4InuclParticle *part1, G4InuclParticle *part2)
void generate(const G4double sqrtS, ParticleList &particles)
Generate an event in the CM system.
G4CascadeFinalStateGenerator fsGenerator
G4LorentzVector backToTheLab(const G4LorentzVector &mom) const
static const G4CascadeChannel * GetTable(G4int initialState)
void generateSCMmuonAbsorption(G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
std::vector< G4InuclElementaryParticle > particles
G4bool isNeutrino() const
virtual G4bool useEPCollider(G4InuclParticle *bullet, G4InuclParticle *target) const
G4int GetBaryonNumber() const
void generateSCMpionNAbsorption(G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
G4ElementaryParticleCollider()
void addOutgoingParticles(const std::vector< G4InuclElementaryParticle > &particles)
G4int GetQuarkContent(G4int flavor) const
std::vector< G4int > particle_kinds
void fillOutgoingMasses()
static G4bool useQuasiDeuteron(G4int ptype, G4int qdtype=0)
G4GLOB_DLL std::ostream G4cerr
static G4double piNAbsorption()
std::vector< G4double > masses
std::vector< G4ThreeVector > GetThreeBodyMomenta()
void setTarget(const G4InuclParticle *target)
G4double getNucleiMass() const
void generateSCMpionAbsorption(G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
G4bool pionNucleonAbsorption(G4double ekin) const
G4bool Generate(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)
G4double getCharge() const
G4LorentzVector getMomentum() const
std::vector< G4InuclElementaryParticle >::iterator particleIterator
G4double getKinEnergyInTheTRS() const
G4GLOB_DLL std::ostream G4cout
Hep3Vector boostVector() const
G4double getTotalSCMEnergy() const
G4int generateMultiplicity(G4int is, G4double ekin) const
void generateSCMfinalState(G4double ekin, G4double etot_scm, G4InuclElementaryParticle *particle1, G4InuclElementaryParticle *particle2)
G4int GetAntiQuarkContent(G4int flavor) const
std::vector< G4LorentzVector > scm_momentums
G4double getMomModule() const
virtual G4bool validateOutput(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
HepLorentzVector & boost(double, double, double)
void setVectM(const Hep3Vector &spatial, double mass)
void Configure(G4InuclElementaryParticle *bullet, G4InuclElementaryParticle *target, const std::vector< G4int > &particle_kinds)