Geant4-11
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes
G4FermiPhaseSpaceDecay Class Reference

#include <G4FermiPhaseSpaceDecay.hh>

Public Member Functions

std::vector< G4LorentzVector * > * Decay (G4double parent_mass, const std::vector< G4double > &fragment_masses) const
 
 G4FermiPhaseSpaceDecay ()
 
 ~G4FermiPhaseSpaceDecay ()
 

Private Member Functions

G4double BetaKopylov (G4int, CLHEP::HepRandomEngine *) const
 
 G4FermiPhaseSpaceDecay (const G4FermiPhaseSpaceDecay &)=delete
 
std::vector< G4LorentzVector * > * KopylovNBodyDecay (G4double, const std::vector< G4double > &) const
 
G4bool operator!= (const G4FermiPhaseSpaceDecay &)=delete
 
const G4FermiPhaseSpaceDecayoperator= (const G4FermiPhaseSpaceDecay &)=delete
 
G4bool operator== (const G4FermiPhaseSpaceDecay &)=delete
 
G4double PtwoBody (G4double E, G4double P1, G4double P2) const
 

Private Attributes

G4Powg4calc
 

Detailed Description

Definition at line 49 of file G4FermiPhaseSpaceDecay.hh.

Constructor & Destructor Documentation

◆ G4FermiPhaseSpaceDecay() [1/2]

G4FermiPhaseSpaceDecay::G4FermiPhaseSpaceDecay ( )

Definition at line 46 of file G4FermiPhaseSpaceDecay.cc.

47{
49}
static G4Pow * GetInstance()
Definition: G4Pow.cc:41

References g4calc, and G4Pow::GetInstance().

◆ ~G4FermiPhaseSpaceDecay()

G4FermiPhaseSpaceDecay::~G4FermiPhaseSpaceDecay ( )

Definition at line 51 of file G4FermiPhaseSpaceDecay.cc.

52{}

◆ G4FermiPhaseSpaceDecay() [2/2]

G4FermiPhaseSpaceDecay::G4FermiPhaseSpaceDecay ( const G4FermiPhaseSpaceDecay )
privatedelete

Member Function Documentation

◆ BetaKopylov()

G4double G4FermiPhaseSpaceDecay::BetaKopylov ( G4int  K,
CLHEP::HepRandomEngine rndmEngine 
) const
private

Definition at line 114 of file G4FermiPhaseSpaceDecay.cc.

116{
117 G4int N = 3*K - 5;
118 G4double xN = (G4double)N;
119 G4double xN1= (G4double)(N + 1);
120 G4double F;
121 // VI variant
122 G4double Fmax = std::sqrt(g4calc->powN(xN/xN1,N)/xN1);
123 G4double chi;
124 do {
125 chi = rndmEngine->flat();
126 F = std::sqrt(g4calc->powN(chi,N)*(1-chi));
127 // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
128 } while ( Fmax*rndmEngine->flat() > F);
129 return chi;
130}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
virtual double flat()=0
G4double powN(G4double x, G4int n) const
Definition: G4Pow.cc:166

References CLHEP::HepRandomEngine::flat(), g4calc, and G4Pow::powN().

◆ Decay()

std::vector< G4LorentzVector * > * G4FermiPhaseSpaceDecay::Decay ( G4double  parent_mass,
const std::vector< G4double > &  fragment_masses 
) const

Definition at line 54 of file G4FermiPhaseSpaceDecay.cc.

57{
58 size_t N = mr.size();
59
60 std::vector<G4LorentzVector*>* P =
61 new std::vector<G4LorentzVector*>(N, nullptr);
62
63 G4double mtot = 0.0;
64 for(size_t k=0; k<N; ++k) { mtot += mr[k]; }
65
66 G4double mu = mtot;
67 G4double PFragMagCM = 0.0;
68
69 // Primary mass is above the sum of mass of components
70 G4double Mass = std::max(M, mtot + CLHEP::eV);
71 G4double T = Mass-mtot;
72
73 G4LorentzVector PFragCM(0.0,0.0,0.0,0.0);
74 G4LorentzVector PRestCM(0.0,0.0,0.0,0.0);
75 G4LorentzVector PRestLab(0.0,0.0,0.0,Mass);
76
77 CLHEP::HepRandomEngine* rndmEngine = G4Random::getTheEngine();
78
79 for (size_t k = N-1; k>0; --k)
80 {
81 mu -= mr[k];
82 if (k>1) { T *= BetaKopylov(k, rndmEngine); }
83 else { T = 0.0; }
84
85 G4double RestMass = mu + T;
86
87 PFragMagCM = PtwoBody(Mass,mr[k],RestMass);
88
89 // Create a unit vector with a random direction isotropically distributed
90 G4ThreeVector RandVector = PFragMagCM*G4RandomDirection();
91
92 PFragCM.setVect(RandVector);
93 PFragCM.setE(std::sqrt(PFragMagCM*PFragMagCM + mr[k]*mr[k]));
94
95 PRestCM.setVect(-RandVector);
96 PRestCM.setE(std::sqrt(PFragMagCM*PFragMagCM + RestMass*RestMass));
97
98 G4ThreeVector BoostV = PRestLab.boostVector();
99
100 PFragCM.boost(BoostV);
101 (*P)[k] = new G4LorentzVector(PFragCM);
102
103 PRestCM.boost(BoostV);
104 PRestLab = PRestCM;
105
106 Mass = RestMass;
107 }
108
109 (*P)[0] = new G4LorentzVector(PRestLab);
110
111 return P;
112}
CLHEP::HepLorentzVector G4LorentzVector
#define M(row, col)
G4ThreeVector G4RandomDirection()
G4double PtwoBody(G4double E, G4double P1, G4double P2) const
G4double BetaKopylov(G4int, CLHEP::HepRandomEngine *) const
static constexpr double eV
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static double P[]

References CLHEP::HepLorentzVector::boost(), CLHEP::HepLorentzVector::boostVector(), CLHEP::eV, G4RandomDirection(), M, G4INCL::Math::max(), P, CLHEP::HepLorentzVector::setE(), and CLHEP::HepLorentzVector::setVect().

◆ KopylovNBodyDecay()

std::vector< G4LorentzVector * > * G4FermiPhaseSpaceDecay::KopylovNBodyDecay ( G4double  ,
const std::vector< G4double > &   
) const
private

◆ operator!=()

G4bool G4FermiPhaseSpaceDecay::operator!= ( const G4FermiPhaseSpaceDecay )
privatedelete

◆ operator=()

const G4FermiPhaseSpaceDecay & G4FermiPhaseSpaceDecay::operator= ( const G4FermiPhaseSpaceDecay )
privatedelete

◆ operator==()

G4bool G4FermiPhaseSpaceDecay::operator== ( const G4FermiPhaseSpaceDecay )
privatedelete

◆ PtwoBody()

G4double G4FermiPhaseSpaceDecay::PtwoBody ( G4double  E,
G4double  P1,
G4double  P2 
) const
inlineprivate

Definition at line 78 of file G4FermiPhaseSpaceDecay.hh.

79{
80 G4double P = (E+P1+P2)*(E+P1-P2)*(E-P1+P2)*(E-P1-P2)/(4.0*E*E);
81 return (P>0.0) ? std::sqrt(P) : 0.0;
82}
static const G4double * P1[nN]
static const G4double * P2[nN]

References P, P1, and P2.

Field Documentation

◆ g4calc

G4Pow* G4FermiPhaseSpaceDecay::g4calc
private

Definition at line 74 of file G4FermiPhaseSpaceDecay.hh.

Referenced by BetaKopylov(), and G4FermiPhaseSpaceDecay().


The documentation for this class was generated from the following files: