50 : kinematics_name(aName), verboseLevel(verbose)
61 : kinematics_name(aName), rbranch(theBR), numberOfDaughters(theNumberOfDaughters)
121 if (
this != &right) {
174 G4cout <<
"G4VDecayChannel::ClearDaughtersName() "
203 for (
G4int index = 0; index < size; ++index) {
216 G4cout <<
"G4VDecayChannel::SetDaughter() - "
217 <<
"Number of daughters is not defined" <<
G4endl;
235 "Trying to add a daughter without specifying number of secondaries!");
240 "Trying to modify a daughter of a decay channel, \
241 but decay channel already has daughters.");
249 G4cout <<
"G4VDecayChannel::SetDaughter() - "
250 <<
"index out of range " << anIndex <<
G4endl;
259 G4cout <<
"G4VDecayChannel::SetDaughter[" << anIndex <<
"] :";
271void G4VDecayChannel::FillDaughters()
295 G4double sumofdaughterwidthsq = 0.0;
300 G4cout <<
"G4VDecayChannel::FillDaughters() - "
302 <<
"numberOfDaughters is not defined yet";
307 "Cannot fill daughters: numberOfDaughters is not defined yet");
322 G4cout <<
"G4VDecayChannel::FillDaughters() - "
324 <<
"-th daughter is not defined yet" <<
G4endl;
329 "Cannot fill daughters: name of daughter is not defined yet");
337 G4cout <<
"G4VDecayChannel::FillDaughters() - "
340 G4cout <<
" The BR of this decay mode is set to zero." <<
G4endl;
356 sumofdaughterwidthsq += d_width * d_width;
363 && (sumofdaughtermass > parentmass +
rangeMass * widthMass))
368 G4cout <<
"G4VDecayChannel::FillDaughters() - "
370 <<
" Energy/Momentum conserevation breaks " <<
G4endl;
372 G4cout <<
" parent:" << *
parent_name <<
" mass:" << parentmass / GeV <<
"[GeV/c/c]"
384void G4VDecayChannel::FillParent()
396 G4cout <<
"G4VDecayChannel::FillParent() - "
397 <<
"parent name is not defined !!" <<
G4endl;
402 "Cannot fill parent: parent name is not defined yet");
412 G4cout <<
"G4VDecayChannel::FillParent() - " << *
parent_name <<
" does not exist !!"
417 "Cannot fill parent: parent does not exist");
443 const G4int MiniSpin = std::abs(D1iSpin - D2iSpin);
444 const G4int MaxiSpin = D1iSpin + D2iSpin;
445 const G4int lMax = (PiSpin + D1iSpin + D2iSpin) / 2;
449 G4cout <<
"iSpin: " << PiSpin <<
" -> " << D1iSpin <<
" + " << D2iSpin <<
G4endl;
450 G4cout <<
"2*jmin, 2*jmax, lmax " << MiniSpin <<
" " << MaxiSpin <<
" " << lMax <<
G4endl;
453 for (
G4int j = MiniSpin; j <= MaxiSpin; j += 2)
455 lMin = std::abs(PiSpin - j) / 2;
459 for (
G4int l = lMin; l <= lMax; ++l) {
464 if (PParity == D1Parity * D2Parity)
468 if (PParity == -1 * D1Parity * D2Parity)
476 "Sorry, can't handle 3 particle decays (up to now)");
480 "Can't find angular momentum for this decay");
493 G4cout <<
" not defined ";
499const G4String& G4VDecayChannel::GetNoName()
const
506 if (width <= 0.0)
return massPDG;
508 if (maxDev <= -1. *
rangeMass)
return massPDG;
512 const std::size_t MAX_LOOP = 10000;
513 for (std::size_t loop_counter = 0; loop_counter < MAX_LOOP; ++loop_counter) {
514 if (y * (width * width * x * x + massPDG * massPDG * width * width)
515 <= massPDG * massPDG * width * width)
520 G4double mass = massPDG + x * width;
526 G4double sumOfDaughterMassMin = 0.0;
535 return (parentMass >= sumOfDaughterMassMin);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define G4MUTEXDESTROY(mutex)
#define G4MUTEXINIT(mutex)
G4GLOB_DLL std::ostream G4cout
const G4String & GetParticleType() const
G4double GetPDGMass() const
G4int GetPDGiParity() const
G4double GetPDGWidth() const
G4int GetPDGiSpin() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition ** G4MT_daughters
virtual ~G4VDecayChannel()
void CheckAndFillParent()
void SetBR(G4double value)
G4String ** daughters_name
G4double DynamicalMass(G4double massPDG, G4double width, G4double maxDev=1.0) const
G4int GetVerboseLevel() const
G4double G4MT_parent_mass
void SetNumberOfDaughters(G4int value)
static const G4String noName
G4ParticleDefinition * G4MT_parent
virtual G4bool IsOKWithParentMass(G4double parentMass)
void CheckAndFillDaughters()
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
void ClearDaughtersName()
G4double * G4MT_daughters_mass
G4VDecayChannel & operator=(const G4VDecayChannel &)
G4int GetAngularMomentum()
G4ParticleTable * particletable
G4ThreeVector parent_polarization
G4double * G4MT_daughters_width
void SetParent(const G4ParticleDefinition *particle_type)