81 theProjectilePotential(0)
142 theDefinition(aDefinition),
143 theFormationTime(aFormationTime),
144 thePosition(aPosition),
145 the4Momentum(a4Momentum),
146 theFermi3Momentum(0),
147 theTotal4Momentum(a4Momentum),
150 theProjectilePotential(0)
170 if (theDecayTable != 0)
194 G4bool * theDaughterIsShortLived = 0;
200 for (index =
nChannels - 1; index >= 0; index--)
205 if (nDaughters == 2 || nDaughters == 3)
213 theDaughterIsShortLived =
new G4bool[nDaughters];
215 for (n = 0; n < nDaughters; n++)
232 if ( !theDaughterIsShortLived[0] && !theDaughterIsShortLived[1] )
252 else if ( !theDaughterIsShortLived[0] && theDaughterIsShortLived[1] )
274 else if ( theDaughterIsShortLived[0] && !theDaughterIsShortLived[1] )
304 else if ( theDaughterIsShortLived[0] && theDaughterIsShortLived[1] )
332 if ( theDaughterIsShortLived[0] )
336 if ( theDaughterIsShortLived[1] )
342 if ( theDaughterIsShortLived[2] )
348 if ( nShortLived == 0 )
357 else if ( nShortLived >= 1 )
376 G4double theMomRatio = theActualMom / thePoleMom;
378 std::pow(theMomRatio, (2 * l + 1)) *
379 (1.2 / (1+ 0.2*std::pow(theMomRatio, (2 * l))));
384 delete [] theDaughterIsShortLived;
385 theDaughterIsShortLived = 0;
416 : theDefinition(nucleon->GetDefinition()),
418 thePosition(aPosition),
419 the4Momentum(a4Momentum),
420 theFermi3Momentum(nucleon->GetMomentum()),
423 theActualMass(nucleon->GetDefinition()->GetPDGMass()),
428 theProjectilePotential(0)
471 return (
this == & right);
478 return (
this != & right);
497 G4cerr <<
"Error condition encountered in G4KineticTrack::Decay()"<<
G4endl;
498 G4cerr <<
" track has no particle definition associated."<<
G4endl;
504 G4cerr <<
"Error condition encountered in G4KineticTrack::Decay()"<<
G4endl;
505 G4cerr <<
" particle definiton has no decay table associated."<<
G4endl;
514 if (theTotalActualWidth !=0)
519 for (index =
nChannels - 1; index >= 0; index--)
522 theCumActualWidth[index] = theSumActualWidth;
530 for (index =
nChannels - 1; index >= 0; index--)
532 if (r < theCumActualWidth[index])
541 delete [] theCumActualWidth;
545 G4cerr <<
"Error condition encountered in G4KineticTrack::Decay()"<<
G4endl;
546 G4cerr <<
" decay channel has 0x0 channel associated."<<
G4endl;
561 G4int shortlivedDaughters[3];
562 G4int numberOfShortliveds(0);
564 for (
G4int aD=0; aD < theNumberOfDaughters ; aD++)
570 shortlivedDaughters[numberOfShortliveds]=aD;
571 numberOfShortliveds++;
577 switch (theNumberOfDaughters)
583 theDaughtersName2 =
"";
584 theDaughtersName3 =
"";
589 theDaughtersName3 =
"";
590 if ( numberOfShortliveds == 1)
592 G4double massmax=theParentMass - SumLongLivedMass;
594 masses[shortlivedDaughters[0]]= aSampler.
SampleMass(aDaughter,massmax);
595 }
else if ( numberOfShortliveds == 2) {
602 masses[shortlivedDaughters[zero]]=aSampler.
SampleMass(aDaughter,massmax);
603 massmax=theParentMass - masses[shortlivedDaughters[zero]];
604 aDaughter=theDecayChannel->
GetDaughter(shortlivedDaughters[one]);
605 masses[shortlivedDaughters[one]]=aSampler.
SampleMass(aDaughter,massmax);
612 if ( numberOfShortliveds == 1)
614 G4double massmax=theParentMass - SumLongLivedMass;
616 masses[shortlivedDaughters[0]]= aSampler.
SampleMass(aDaughter,massmax);
628 theNumberOfDaughters,
634 if(!theDecayProducts)
636 G4cerr <<
"Error condition encountered in G4KineticTrack::Decay()"<<
G4endl;
640 G4cerr <<
" "<<theNumberOfDaughters<<
" Daughter particles: "
641 << theDaughtersName1<<
" "<<theDaughtersName2<<
" "<<theDaughtersName3<<
G4endl;
657 for (
G4int i=dEntries; i > 0; i--)
659 theDynamicParticle = theDecayProducts->
PopProducts();
663 momentumBalanceCMS += theDynamicParticle->
Get4Momentum();
665 energyMomentumBalance -= momentum;
670 delete theDynamicParticle;
672 delete theDecayProducts;
673 if(getenv(
"DecayEnergyBalanceCheck"))
674 std::cout <<
"DEBUGGING energy balance in cms and lab, charge baryon balance : "
675 << momentumBalanceCMS <<
" "
676 <<energyMomentumBalance <<
" "
680 return theDecayProductList;
695 G4double result = (1. / (2 * mass)) *
696 std::sqrt(
std::max((((mass * mass) - (mass1 + xmass) * (mass1 + xmass)) *
697 ((mass * mass) - (mass1 - xmass) * (mass1 - xmass))),0.0)) *
698 BrWig(gamma2, mass2, xmass);
708 G4double result = (1. / (2 * mass)) *
709 std::sqrt(
std::max((((mass * mass) - (mass1 + xmass) * (mass1 + xmass)) *
710 ((mass * mass) - (mass1 - xmass) * (mass1 - xmass))),0.0)) *
711 BrWig(gamma2, mass2, xmass);
722 const G4double result = (1. / (2 * mass)) *
725 BrWig(gamma2, mass2, xmass);
739 const G4double theUpperLimit = mass - xmass;
740 const G4int nIterations = 100;
752 const G4int nIterations = 100;
754 if (theLowerLimit>=theUpperLimit)
return 0.0;
758 theLowerLimit, theUpperLimit, nIterations);
759 return theIntegralOverMass2;
765 const G4int nIterations = 100;
767 if (theLowerLimit>=theUpperLimit)
return 0.0;
771 theLowerLimit, theUpperLimit, nIterations);
772 return theIntegralOverMass2;
780 const G4int nIterations = 100;
782 if (theLowerLimit>=theUpperLimit)
return 0.0;
786 theLowerLimit, theUpperLimit, nIterations);
787 return theIntegralOverMass2;
static G4KaonZero * KaonZero()
G4double SampleMass(const G4double poleMass, const G4double gamma, const G4double minMass, const G4double maxMass) const
G4double IntegrateCMMomentum2() const
void G4SwapObj(T *a, T *b)
G4int operator==(const G4KineticTrack &right) const
G4double theFormationTime
G4int GetnChannels() const
G4LorentzVector theTotal4Momentum
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepLorentzRotation G4LorentzRotation
const G4String & GetParentName() const
G4int GetNumberOfDaughters() const
G4double * theDaughterWidth
const G4ThreeVector & GetPosition() const
G4KineticTrackVector * Decay()
G4ParticleDefinition * GetDaughter(G4int anIndex)
static G4ThreadLocal G4double G4KineticTrack_Gmass
static G4KaonZeroLong * KaonZeroLong()
G4VDecayChannel * GetDecayChannel(G4int index) const
G4double GetActualMass() const
G4ParticleDefinition * GetDefinition() const
G4ThreeVector thePosition
const G4String & GetParticleName() const
G4double IntegrateCMMomentum(const G4double lowerLimit) const
G4double IntegrandFunction3(G4double xmass) const
G4double * theDaughterMass
G4LorentzVector theFermi3Momentum
G4DecayTable * GetDecayTable() const
G4double IntegrandFunction2(G4double xmass) const
G4int operator!=(const G4KineticTrack &right) const
G4double GetPDGWidth() const
G4double IntegrandFunction4(G4double xmass) const
static G4KaonZeroShort * KaonZeroShort()
G4bool nucleon(G4int ityp)
G4double GetFormationTime() const
G4LorentzVector the4Momentum
G4double EvaluateTotalActualWidth()
G4KineticTrack & operator=(const G4KineticTrack &right)
static G4ThreadLocal G4double G4KineticTrack_xmass1
void Set4Momentum(const G4LorentzVector &a4Momentum)
G4LorentzVector Get4Momentum() const
const G4String & GetDaughterName(G4int anIndex) const
G4double GetMinimumMass(const G4ParticleDefinition *p) const
virtual G4DecayProducts * DecayIt(G4double mass=0.0)
G4bool IsShortLived() const
G4double EvaluateCMMomentum(const G4double mass, const G4double *m_ij) const
static G4AntiKaonZero * AntiKaonZero()
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4LorentzVector & GetTrackingMomentum() const
G4DynamicParticle * PopProducts()
G4double * theActualWidth
G4double IntegrandFunction1(G4double xmass) const
G4double Simpson(T &typeT, F f, G4double a, G4double b, G4int n)
const G4LorentzVector & Get4Momentum() const
G4double GetPDGCharge() const
G4double theProjectilePotential
const G4ParticleDefinition * GetDefinition() const
G4double BrWig(const G4double Gamma, const G4double rmass, const G4double mass) const
G4GLOB_DLL std::ostream G4cerr
G4int GetBaryonNumber() const
CLHEP::HepLorentzVector G4LorentzVector
const G4ParticleDefinition * theDefinition
CascadeState theStateToNucleus