Geant4  10.02.p03
G4FermiPhaseSpaceDecay Class Reference

#include <G4FermiPhaseSpaceDecay.hh>

Collaboration diagram for G4FermiPhaseSpaceDecay:

Public Member Functions

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

Private Member Functions

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

Private Attributes

G4Powg4pow
 

Detailed Description

Definition at line 51 of file G4FermiPhaseSpaceDecay.hh.

Constructor & Destructor Documentation

◆ G4FermiPhaseSpaceDecay() [1/2]

G4FermiPhaseSpaceDecay::G4FermiPhaseSpaceDecay ( )

Definition at line 42 of file G4FermiPhaseSpaceDecay.cc.

43 {
45 }
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
Here is the call graph for this function:

◆ ~G4FermiPhaseSpaceDecay()

G4FermiPhaseSpaceDecay::~G4FermiPhaseSpaceDecay ( )

Definition at line 47 of file G4FermiPhaseSpaceDecay.cc.

48 {}

◆ G4FermiPhaseSpaceDecay() [2/2]

G4FermiPhaseSpaceDecay::G4FermiPhaseSpaceDecay ( const G4FermiPhaseSpaceDecay )
private

Member Function Documentation

◆ BetaKopylov()

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

Definition at line 102 of file G4FermiPhaseSpaceDecay.hh.

104 {
105  G4int N = 3*K - 5;
106  G4double xN = G4double(N);
107  G4double F;
108  // VI variant
109  G4double Fmax = std::sqrt(g4pow->powN(xN/(xN + 1),N)/(xN + 1));
110  G4double chi;
111  do {
112  chi = rndmEngine->flat();
113  F = std::sqrt(g4pow->powN(chi,N)*(1-chi));
114  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
115  } while ( Fmax*rndmEngine->flat() > F);
116  return chi;
117 }
G4double powN(G4double x, G4int n) const
Definition: G4Pow.cc:128
virtual double flat()=0
int G4int
Definition: G4Types.hh:78
**D E S C R I P T I O N
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Decay()

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

Definition at line 95 of file G4FermiPhaseSpaceDecay.hh.

97 {
98  return KopylovNBodyDecay(parent_mass, fragment_masses);
99 }
std::vector< G4LorentzVector * > * KopylovNBodyDecay(G4double, const std::vector< G4double > &) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DumpProblem()

void G4FermiPhaseSpaceDecay::DumpProblem ( G4double  E,
G4double  P1,
G4double  P2,
G4double  P 
) const
private

Definition at line 109 of file G4FermiPhaseSpaceDecay.cc.

111 {
112  G4cout << "G4FermiPhaseSpaceDecay: problem of decay of M(GeV)= " << E/GeV
113  << " on M1(GeV)= " << P1/GeV << " and M2(GeV)= " << P2/GeV
114  << " P(MeV)= " << P/MeV << " < 0" << G4endl;
115  // exception only if the problem is numerically significant
116  if(P < -CLHEP::eV) {
117  throw G4HadronicException(__FILE__, __LINE__,"Error in decay kinematics");
118  }
119 }
static const double MeV
Definition: G4SIunits.hh:211
static const G4double * P1[nN]
static double P[]
G4GLOB_DLL std::ostream G4cout
static const double GeV
Definition: G4SIunits.hh:214
static const G4double * P2[nN]
#define G4endl
Definition: G4ios.hh:61
static const double eV
Here is the caller graph for this function:

◆ IsotropicVector()

G4ThreeVector G4FermiPhaseSpaceDecay::IsotropicVector ( G4double  Magnitude,
CLHEP::HepRandomEngine rndmEngine 
) const
inlineprivate

Definition at line 120 of file G4FermiPhaseSpaceDecay.hh.

124 {
125  G4double CosTheta = 2.0*rndmEngine->flat() - 1.0;
126  G4double SinTheta = std::sqrt((1. - CosTheta)*(1. + CosTheta));
127  G4double Phi = CLHEP::twopi*rndmEngine->flat();
128  G4ThreeVector Vector(Magnitude*std::cos(Phi)*SinTheta,
129  Magnitude*std::sin(Phi)*SinTheta,
130  Magnitude*CosTheta);
131  return Vector;
132 }
virtual double flat()=0
double G4double
Definition: G4Types.hh:76
static const double twopi
Definition: SystemOfUnits.h:54
Here is the caller graph for this function:

◆ KopylovNBodyDecay()

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

Definition at line 51 of file G4FermiPhaseSpaceDecay.cc.

54 {
55  size_t N = mr.size();
56 
57  std::vector<G4LorentzVector*>* P =
58  new std::vector<G4LorentzVector*>(N, 0);
59 
60  G4double mtot = 0.0;
61  for(size_t k=0; k<N; ++k) { mtot += mr[k]; }
62  G4double mu = mtot;
63  G4double PFragMagCM = 0.0;
64  G4double Mass = M;
65  G4double T = Mass-mtot;
66  G4LorentzVector PFragCM(0.0,0.0,0.0,0.0);
67  G4LorentzVector PRestCM(0.0,0.0,0.0,0.0);
68  G4LorentzVector PRestLab(0.0,0.0,0.0,Mass);
69 
70  CLHEP::HepRandomEngine* rndmEngine = G4Random::getTheEngine();
71 
72  for (size_t k = N-1; k>0; --k)
73  {
74  mu -= mr[k];
75  if (k>1) { T *= BetaKopylov(k, rndmEngine); }
76  else { T = 0.0; }
77 
78  G4double RestMass = mu + T;
79 
80  PFragMagCM = PtwoBody(Mass,mr[k],RestMass);
81 
82  // Create a unit vector with a random direction isotropically distributed
83  G4ThreeVector RandVector(IsotropicVector(PFragMagCM, rndmEngine));
84 
85  PFragCM.setVect(RandVector);
86  PFragCM.setE(std::sqrt(PFragMagCM*PFragMagCM + mr[k]*mr[k]));
87 
88  PRestCM.setVect(-RandVector);
89  PRestCM.setE(std::sqrt(PFragMagCM*PFragMagCM + RestMass*RestMass));
90 
91 
92  G4ThreeVector BoostV = PRestLab.boostVector();
93 
94  PFragCM.boost(BoostV);
95  PRestCM.boost(BoostV);
96  PRestLab = PRestCM;
97 
98  (*P)[k] = new G4LorentzVector(PFragCM);
99 
100  Mass = RestMass;
101  }
102 
103  (*P)[0] = new G4LorentzVector(PRestLab);
104 
105  return P;
106 }
G4double PtwoBody(G4double E, G4double P1, G4double P2) const
static double P[]
G4double BetaKopylov(G4int, CLHEP::HepRandomEngine *) const
G4ThreeVector IsotropicVector(G4double Magnitude, CLHEP::HepRandomEngine *) const
**D E S C R I P T I O N
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

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

◆ operator=()

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

◆ operator==()

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

◆ PtwoBody()

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

Definition at line 85 of file G4FermiPhaseSpaceDecay.hh.

86 {
87  G4double res = 0.0;
88  G4double P = (E+P1+P2)*(E+P1-P2)*(E-P1+P2)*(E-P1-P2)/(4.0*E*E);
89  if (P>0.0) { res = std::sqrt(P); }
90  else { DumpProblem(E,P1,P2,P); }
91  return res;
92 }
static const G4double * P1[nN]
static double P[]
void DumpProblem(G4double E, G4double P1, G4double P2, G4double P) const
static const G4double * P2[nN]
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ g4pow

G4Pow* G4FermiPhaseSpaceDecay::g4pow
private

Definition at line 81 of file G4FermiPhaseSpaceDecay.hh.


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