54 daughters_name(nullptr),
56 parent_polarization(),
57 particletable(nullptr),
71 :kinematics_name(aName),
75 daughters_name(nullptr),
77 parent_polarization(),
78 particletable(nullptr),
94 G4int theNumberOfDaughters,
99 :kinematics_name(aName),
101 numberOfDaughters(theNumberOfDaughters),
102 parent_name(nullptr),
103 daughters_name(nullptr),
105 parent_polarization(),
175 if (
this != &right) {
235 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 <<
"] :";
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;
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");
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 ";
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;
595 sumOfDaughterMassMin +=
598 return (parentMass >= sumOfDaughterMassMin);
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4String ** daughters_name
G4int GetAngularMomentum()
G4ParticleTable * particletable
#define G4MUTEXDESTROY(mutex)
G4double GetPDGWidth() const
static G4ParticleTable * GetParticleTable()
G4int GetPDGiSpin() const
const G4String & GetParticleName() const
const G4String & GetParticleType() const
G4double GetPDGMass() const
virtual ~G4VDecayChannel()
void SetBR(G4double value)
G4int GetPDGiParity() const
void ClearDaughtersName()
#define G4MUTEXINIT(mutex)
const XML_Char int const XML_Char * value
G4ParticleDefinition * G4MT_parent
static const G4String noName
G4ParticleDefinition ** G4MT_daughters
void SetNumberOfDaughters(G4int value)
G4VDecayChannel & operator=(const G4VDecayChannel &)
G4ThreeVector parent_polarization
void CheckAndFillParent()
void SetParent(const G4ParticleDefinition *particle_type)
G4int GetVerboseLevel() const
G4double DynamicalMass(G4double massPDG, G4double width, G4double maxDev=+1.) const
G4double * G4MT_daughters_width
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
const G4String & GetNoName() const
G4GLOB_DLL std::ostream G4cout
virtual G4bool IsOKWithParentMass(G4double parentMass)
static constexpr double GeV
G4double G4MT_parent_mass
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
void CheckAndFillDaughters()
G4double * G4MT_daughters_mass