Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4FermiPhaseSpaceDecay Class Reference

#include <G4FermiPhaseSpaceDecay.hh>

Public Member Functions

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

Detailed Description

Definition at line 49 of file G4FermiPhaseSpaceDecay.hh.

Constructor & Destructor Documentation

◆ G4FermiPhaseSpaceDecay()

G4FermiPhaseSpaceDecay::G4FermiPhaseSpaceDecay ( )

Definition at line 46 of file G4FermiPhaseSpaceDecay.cc.

47{
48 g4calc = G4Pow::GetInstance();
49}
static G4Pow * GetInstance()
Definition: G4Pow.cc:41

◆ ~G4FermiPhaseSpaceDecay()

G4FermiPhaseSpaceDecay::~G4FermiPhaseSpaceDecay ( )

Definition at line 51 of file G4FermiPhaseSpaceDecay.cc.

52{}

Member Function Documentation

◆ 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 std::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(std::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 (G4int k = (G4int)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()
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define N
Definition: crc32.c:56

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