53 parent_name(0), daughters_name(0),
55 parent_polarization(),
70 :kinematics_name(aName),
73 parent_name(0), daughters_name(0),
75 parent_polarization(),
77 verboseLevel(Verbose),
94 G4int theNumberOfDaughters,
99 :kinematics_name(aName),
101 numberOfDaughters(theNumberOfDaughters),
102 parent_name(0), daughters_name(0),
104 parent_polarization(),
174 if (
this != &right) {
234 G4cout <<
"G4VDecayChannel::ClearDaughtersName "
276 G4cout <<
"G4VDecayChannel::SetDaughter: "
277 <<
"Number of daughters is not defined" <<
G4endl;
295 "Trying to add a daughter without specifying number of secondaries, useSetNumberOfDaughters first");
300 "Trying to modify a daughter of a decay channel, but decay channel already has daughters.");
309 G4cout <<
"G4VDecayChannel::SetDaughter"
310 <<
"index out of range " << anIndex <<
G4endl;
318 G4cout <<
"G4VDecayChannel::SetDaughter[" << anIndex <<
"] :";
330 void G4VDecayChannel::FillDaughters()
353 G4double sumofdaughterwidthsq = 0.0;
358 G4cout <<
"G4VDecayChannel::FillDaughters "
360 <<
"numberOfDaughters is not defined yet";
366 "Can not fill daughters: numberOfDaughters is not defined yet");
381 G4cout <<
"G4VDecayChannel::FillDaughters "
383 << index <<
"-th daughter is not defined yet" <<
G4endl;
389 "Can not fill daughters: name of a daughter is not defined yet");
397 G4cout <<
"G4VDecayChannel::FillDaughters "
400 <<
" is not defined !!" <<
G4endl;
401 G4cout <<
" The BR of this decay mode is set to zero " <<
G4endl;
417 sumofdaughterwidthsq += d_width*d_width;
423 (numberOfDaughters !=1) &&
424 (sumofdaughtermass > parentmass +
rangeMass*widthMass) ){
428 G4cout <<
"G4VDecayChannel::FillDaughters "
430 <<
" Energy/Momentum conserevation breaks " <<
G4endl;
433 <<
" mass:" << parentmass/
GeV <<
"[GeV/c/c]" <<
G4endl;
446 void G4VDecayChannel::FillParent()
457 G4cout <<
"G4VDecayChannel::FillParent "
458 <<
": parent name is not defined !!" <<
G4endl;
464 "Can not fill parent: parent name is not defined yet");
473 G4cout <<
"G4VDecayChannel::FillParent "
479 "Can not fill parent: parent does not exist");
499 if (2==numberOfDaughters) {
504 const G4int MiniSpin = std::abs (D1iSpin - D2iSpin);
505 const G4int MaxiSpin = D1iSpin + D2iSpin;
506 const G4int lMax = (PiSpin+D1iSpin+D2iSpin)/2;
510 G4cout <<
"iSpin: " << PiSpin <<
" -> " << D1iSpin <<
" + " << D2iSpin <<
G4endl;
511 G4cout <<
"2*jmin, 2*jmax, lmax " << MiniSpin <<
" " << MaxiSpin <<
" " << lMax <<
G4endl;
514 for (
G4int j=MiniSpin; j<=MaxiSpin; j+=2){
515 lMin = std::abs(PiSpin-j)/2;
520 for (
G4int l=lMin; l<=lMax; l++) {
526 if (PParity == D1Parity*D2Parity) {
530 if (PParity == -1*D1Parity*D2Parity) {
539 "Sorry, can't handle 3 particle decays (up to now)");
542 G4Exception (
"G4VDecayChannel::GetAngularMomentum",
544 "Can't find angular momentum for this decay");
556 G4cout <<
" not defined ";
562 const G4String& G4VDecayChannel::GetNoName()
const
570 if (width<=0.0)
return massPDG;
572 if (maxDev <=-1.*
rangeMass)
return massPDG;
576 const size_t MAX_LOOP=10000;
577 for (
size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter){
578 if ( y * (width*width*x*x + massPDG*massPDG*width*width) <= massPDG*massPDG*width*width )
break;
592 if (numberOfDaughters==1)
return true;
595 sumOfDaughterMassMin +=
598 return (parentMass >= sumOfDaughterMassMin);
void CheckAndFillDaughters()
static const G4String noName
G4int GetPDGiSpin() const
void ClearDaughtersName()
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void SetBR(G4double value)
G4double * G4MT_daughters_mass
G4int GetPDGiParity() const
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
#define G4MUTEXINIT(mutex)
G4double G4MT_parent_mass
virtual G4bool IsOKWithParentMass(G4double parentMass)
G4ParticleTable * particletable
#define G4MUTEX_INITIALIZER
const G4String & GetParticleName() const
G4int GetAngularMomentum()
G4double GetPDGWidth() const
G4GLOB_DLL std::ostream G4cout
void SetNumberOfDaughters(G4int value)
const G4String & GetParticleType() const
G4VDecayChannel & operator=(const G4VDecayChannel &)
G4ThreeVector parent_polarization
virtual ~G4VDecayChannel()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4int GetVerboseLevel() const
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
G4double * G4MT_daughters_width
void SetParent(const G4ParticleDefinition *particle_type)
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
static constexpr double GeV
G4double DynamicalMass(G4double massPDG, G4double width, G4double maxDev=+1.) const
#define G4MUTEXDESTROY(mutex)
G4String ** daughters_name
void CheckAndFillParent()