44 : parent_polarization()
52 : kinematics_name(aName), parent_polarization(), verboseLevel(verbose)
62 G4int theNumberOfDaughters,
67 : kinematics_name(aName), rbranch(theBR), parent_polarization(),
68 numberOfDaughters(theNumberOfDaughters)
191 G4cout <<
"G4VDecayChannel::ClearDaughtersName() "
223 for (
G4int index=0; index<size; ++index)
240 G4cout <<
"G4VDecayChannel::SetDaughter() - "
241 <<
"Number of daughters is not defined" <<
G4endl;
260 "Trying to add a daughter without specifying number of secondaries!");
266 "Trying to modify a daughter of a decay channel, \
267 but decay channel already has daughters.");
277 G4cout <<
"G4VDecayChannel::SetDaughter() - "
278 <<
"index out of range " << anIndex <<
G4endl;
289 G4cout <<
"G4VDecayChannel::SetDaughter[" << anIndex <<
"] :";
301 if (parent_type !=
nullptr)
306void G4VDecayChannel::FillDaughters()
331 G4double sumofdaughterwidthsq = 0.0;
338 G4cout <<
"G4VDecayChannel::FillDaughters() - "
340 <<
"numberOfDaughters is not defined yet";
346 "Cannot fill daughters: numberOfDaughters is not defined yet");
364 G4cout <<
"G4VDecayChannel::FillDaughters() - "
366 << index <<
"-th daughter is not defined yet" <<
G4endl;
372 "Cannot fill daughters: name of daughter is not defined yet");
382 G4cout <<
"G4VDecayChannel::FillDaughters() - "
385 <<
" is not defined !!" <<
G4endl;
386 G4cout <<
" The BR of this decay mode is set to zero." <<
G4endl;
403 sumofdaughterwidthsq += d_width*d_width;
409 +sumofdaughterwidthsq);
412 && (sumofdaughtermass > parentmass +
rangeMass*widthMass) )
418 G4cout <<
"G4VDecayChannel::FillDaughters() - "
420 <<
" Energy/Momentum conserevation breaks " <<
G4endl;
424 <<
" mass:" << parentmass/GeV <<
"[GeV/c/c]" <<
G4endl;
438void G4VDecayChannel::FillParent()
452 G4cout <<
"G4VDecayChannel::FillParent() - "
453 <<
"parent name is not defined !!" <<
G4endl;
459 "Cannot fill parent: parent name is not defined yet");
471 G4cout <<
"G4VDecayChannel::FillParent() - "
477 "Cannot fill parent: parent does not exist");
505 const G4int MiniSpin = std::abs (D1iSpin - D2iSpin);
506 const G4int MaxiSpin = D1iSpin + D2iSpin;
507 const G4int lMax = (PiSpin+D1iSpin+D2iSpin)/2;
512 G4cout <<
"iSpin: " << PiSpin <<
" -> " << D1iSpin
513 <<
" + " << D2iSpin <<
G4endl;
514 G4cout <<
"2*jmin, 2*jmax, lmax " << MiniSpin <<
" " << MaxiSpin
518 for (
G4int j=MiniSpin; j<=MaxiSpin; j+=2)
520 lMin = std::abs(PiSpin-j)/2;
525 for (
G4int l=lMin; l<=lMax; ++l)
533 if (PParity == D1Parity*D2Parity)
538 if (PParity == -1*D1Parity*D2Parity)
546 G4Exception(
"G4VDecayChannel::GetAngularMomentum()",
548 "Sorry, can't handle 3 particle decays (up to now)");
551 G4Exception (
"G4VDecayChannel::GetAngularMomentum()",
553 "Can't find angular momentum for this decay");
570 G4cout <<
" not defined ";
577const G4String& G4VDecayChannel::GetNoName()
const
586 if (width<=0.0)
return massPDG;
588 if (maxDev <=-1.*
rangeMass)
return massPDG;
592 const std::size_t MAX_LOOP=10000;
593 for (std::size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter)
595 if ( y * (width*width*x*x + massPDG*massPDG*width*width)
596 <= massPDG*massPDG*width*width )
break;
607 G4double sumOfDaughterMassMin = 0.0;
615 sumOfDaughterMassMin +=
618 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)