44 : parent_polarization()
52 : kinematics_name(aName), parent_polarization(), verboseLevel(verbose)
62 G4int theNumberOfDaughters,
68 : kinematics_name(aName), rbranch(theBR), parent_polarization(),
69 numberOfDaughters(theNumberOfDaughters)
193 G4cout <<
"G4VDecayChannel::ClearDaughtersName() "
225 for (
G4int index=0; index<size; ++index)
242 G4cout <<
"G4VDecayChannel::SetDaughter() - "
243 <<
"Number of daughters is not defined" <<
G4endl;
262 "Trying to add a daughter without specifying number of secondaries!");
268 "Trying to modify a daughter of a decay channel, \
269 but decay channel already has daughters.");
279 G4cout <<
"G4VDecayChannel::SetDaughter() - "
280 <<
"index out of range " << anIndex <<
G4endl;
291 G4cout <<
"G4VDecayChannel::SetDaughter[" << anIndex <<
"] :";
303 if (parent_type !=
nullptr)
308void G4VDecayChannel::FillDaughters()
333 G4double sumofdaughterwidthsq = 0.0;
340 G4cout <<
"G4VDecayChannel::FillDaughters() - "
342 <<
"numberOfDaughters is not defined yet";
348 "Cannot fill daughters: numberOfDaughters is not defined yet");
366 G4cout <<
"G4VDecayChannel::FillDaughters() - "
368 << index <<
"-th daughter is not defined yet" <<
G4endl;
374 "Cannot fill daughters: name of daughter is not defined yet");
384 G4cout <<
"G4VDecayChannel::FillDaughters() - "
387 <<
" is not defined !!" <<
G4endl;
388 G4cout <<
" The BR of this decay mode is set to zero." <<
G4endl;
405 sumofdaughterwidthsq += d_width*d_width;
411 +sumofdaughterwidthsq);
414 && (sumofdaughtermass > parentmass +
rangeMass*widthMass) )
420 G4cout <<
"G4VDecayChannel::FillDaughters() - "
422 <<
" Energy/Momentum conserevation breaks " <<
G4endl;
426 <<
" mass:" << parentmass/GeV <<
"[GeV/c/c]" <<
G4endl;
440void G4VDecayChannel::FillParent()
454 G4cout <<
"G4VDecayChannel::FillParent() - "
455 <<
"parent name is not defined !!" <<
G4endl;
461 "Cannot fill parent: parent name is not defined yet");
473 G4cout <<
"G4VDecayChannel::FillParent() - "
479 "Cannot fill parent: parent does not exist");
507 const G4int MiniSpin = std::abs (D1iSpin - D2iSpin);
508 const G4int MaxiSpin = D1iSpin + D2iSpin;
509 const G4int lMax = (PiSpin+D1iSpin+D2iSpin)/2;
514 G4cout <<
"iSpin: " << PiSpin <<
" -> " << D1iSpin
515 <<
" + " << D2iSpin <<
G4endl;
516 G4cout <<
"2*jmin, 2*jmax, lmax " << MiniSpin <<
" " << MaxiSpin
520 for (
G4int j=MiniSpin; j<=MaxiSpin; j+=2)
522 lMin = std::abs(PiSpin-j)/2;
527 for (
G4int l=lMin; l<=lMax; ++l)
535 if (PParity == D1Parity*D2Parity)
540 if (PParity == -1*D1Parity*D2Parity)
548 G4Exception(
"G4VDecayChannel::GetAngularMomentum()",
550 "Sorry, can't handle 3 particle decays (up to now)");
553 G4Exception (
"G4VDecayChannel::GetAngularMomentum()",
555 "Can't find angular momentum for this decay");
572 G4cout <<
" not defined ";
579const G4String& G4VDecayChannel::GetNoName()
const
588 if (width<=0.0)
return massPDG;
590 if (maxDev <=-1.*
rangeMass)
return massPDG;
594 const std::size_t MAX_LOOP=10000;
595 for (std::size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter)
597 if ( y * (width*width*x*x + massPDG*massPDG*width*width)
598 <= massPDG*massPDG*width*width )
break;
609 G4double sumOfDaughterMassMin = 0.0;
617 sumOfDaughterMassMin +=
620 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)