53 daughters_name(nullptr),
55 parent_polarization(),
56 particletable(nullptr),
70 :kinematics_name(aName),
74 daughters_name(nullptr),
76 parent_polarization(),
77 particletable(nullptr),
93 G4int theNumberOfDaughters,
98 :kinematics_name(aName),
100 numberOfDaughters(theNumberOfDaughters),
101 parent_name(nullptr),
102 daughters_name(nullptr),
104 parent_polarization(),
174 if (
this != &right) {
234 G4cout <<
"G4VDecayChannel::ClearDaughtersName "
275 G4cout <<
"G4VDecayChannel::SetDaughter: "
276 <<
"Number of daughters is not defined" <<
G4endl;
294 "Trying to add a daughter without specifying number of secondaries, useSetNumberOfDaughters first");
299 "Trying to modify a daughter of a decay channel, but decay channel already has daughters.");
308 G4cout <<
"G4VDecayChannel::SetDaughter"
309 <<
"index out of range " << anIndex <<
G4endl;
317 G4cout <<
"G4VDecayChannel::SetDaughter[" << anIndex <<
"] :";
352 G4double sumofdaughterwidthsq = 0.0;
357 G4cout <<
"G4VDecayChannel::FillDaughters "
359 <<
"numberOfDaughters is not defined yet";
365 "Can not fill daughters: numberOfDaughters is not defined yet");
380 G4cout <<
"G4VDecayChannel::FillDaughters "
382 << index <<
"-th daughter is not defined yet" <<
G4endl;
388 "Can not fill daughters: name of a daughter is not defined yet");
396 G4cout <<
"G4VDecayChannel::FillDaughters "
399 <<
" is not defined !!" <<
G4endl;
400 G4cout <<
" The BR of this decay mode is set to zero " <<
G4endl;
416 sumofdaughterwidthsq += d_width*d_width;
422 (numberOfDaughters !=1) &&
423 (sumofdaughtermass > parentmass +
rangeMass*widthMass) ){
427 G4cout <<
"G4VDecayChannel::FillDaughters "
429 <<
" Energy/Momentum conserevation breaks " <<
G4endl;
432 <<
" mass:" << parentmass/
GeV <<
"[GeV/c/c]" <<
G4endl;
456 G4cout <<
"G4VDecayChannel::FillParent "
457 <<
": parent name is not defined !!" <<
G4endl;
463 "Can not fill parent: parent name is not defined yet");
472 G4cout <<
"G4VDecayChannel::FillParent "
478 "Can not fill parent: parent does not exist");
504 const G4int MaxiSpin = D1iSpin + D2iSpin;
505 const G4int lMax = (PiSpin+D1iSpin+D2iSpin)/2;
509 G4cout <<
"iSpin: " << PiSpin <<
" -> " << D1iSpin <<
" + " << D2iSpin <<
G4endl;
510 G4cout <<
"2*jmin, 2*jmax, lmax " << MiniSpin <<
" " << MaxiSpin <<
" " << lMax <<
G4endl;
513 for (
G4int j=MiniSpin; j<=MaxiSpin; j+=2){
519 for (
G4int l=lMin; l<=lMax; l++) {
525 if (PParity == D1Parity*D2Parity) {
529 if (PParity == -1*D1Parity*D2Parity) {
538 "Sorry, can't handle 3 particle decays (up to now)");
541 G4Exception (
"G4VDecayChannel::GetAngularMomentum",
543 "Can't find angular momentum for this decay");
555 G4cout <<
" not defined ";
569 if (width<=0.0)
return massPDG;
571 if (maxDev <=-1.*
rangeMass)
return massPDG;
575 const size_t MAX_LOOP=10000;
576 for (
size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter){
577 if ( y * (width*width*x*x + massPDG*massPDG*width*width) <= massPDG*massPDG*width*width )
break;
594 sumOfDaughterMassMin +=
597 return (parentMass >= sumOfDaughterMassMin);