53 std::vector<G4LorentzVector*> *
54 G4FermiPhaseSpaceDecay::KopylovNBodyDecay(
const G4double M,
55 const std::vector<G4double>& mr)
const
60 std::vector<G4LorentzVector*>* P =
new std::vector<G4LorentzVector*>(
N, 0);
62 G4double mtot = std::accumulate( mr.begin(), mr.end(), 0.0);
71 for (
size_t k = N-1; k>0; --k)
74 if (k>1) { T *= BetaKopylov(k); }
79 PFragMagCM = PtwoBody(Mass,mr[k],RestMass);
84 PFragCM.setVect(RandVector);
85 PFragCM.setE(std::sqrt(PFragMagCM*PFragMagCM + mr[k]*mr[k]));
87 PRestCM.setVect(-RandVector);
88 PRestCM.setE(std::sqrt(PFragMagCM*PFragMagCM + RestMass*RestMass));
93 PFragCM.boost(BoostV);
94 PRestCM.boost(BoostV);
108 std::vector<G4LorentzVector*> *
109 G4FermiPhaseSpaceDecay::NBodyDecay(
G4double M,
const std::vector<G4double>& mr)
const
112 size_t N = mr.size();
115 G4double mtot = std::accumulate( mr.begin(), mr.end(), 0.0);
119 for (i = 1; i <
N; i++)
123 Wmax *= PtwoBody(Emax, Emin, mr[i]);
128 std::vector<G4double>
p(N, 0.0);
129 std::vector<G4double>
r(N,0.0);
130 std::vector<G4double> vm(N, 0.0);
137 std::sort(
r.begin(),
r.end(), std::less<G4double>());
140 std::partial_sum(mr.begin(), mr.end(), vm.begin());
141 std::transform(
r.begin(),
r.end(),
r.begin(),
142 std::bind2nd(std::multiplies<G4double>(), M-mtot));
143 std::transform(
r.begin(),
r.end(), vm.begin(), vm.begin(), std::plus<G4double>());
147 for (j = 0; j < N-1; j++)
149 p[j] = PtwoBody(vm[j+1],vm[j],mr[j+1]);
152 p[N-1] = PtwoBody(vm[N-2],mr[N-2],mr[N-1]);
155 if (ntries++ > 1000000)
162 std::vector<G4LorentzVector*> * P =
new std::vector<G4LorentzVector*>(
N, 0);
166 (*P)[0] =
new G4LorentzVector( a3P, std::sqrt(a3P.mag2()+mr[0]*mr[0]) );
167 (*P)[1] =
new G4LorentzVector(-a3P, std::sqrt(a3P.mag2()+mr[1]*mr[1]) );
168 for (i = 2; i <
N; i++)
170 a3P = IsotropicVector(
p[i-1]);
171 (*P)[i] =
new G4LorentzVector(a3P, std::sqrt(a3P.mag2() + mr[i]*mr[i]));
174 for (j = 0; j < i; j++)
176 (*P)[j]->boost(Beta);
183 std::vector<G4LorentzVector*> *
184 G4FermiPhaseSpaceDecay::TwoBodyDecay(
G4double M,
185 const std::vector<G4double>& mass)
const
194 P41->
setE(std::sqrt(mom*mom + m0*m0));
198 P42->
setE(std::sqrt(mom*mom + m1*m1));
200 std::vector<G4LorentzVector*> *
result =
new std::vector<G4LorentzVector*>;
201 result->push_back(P41);
202 result->push_back(P42);
210 G4cout <<
"G4FermiPhaseSpaceDecay: problem of decay of M(GeV)= " << E/
GeV
211 <<
" on M1(GeV)= " << P1/
GeV <<
" and M2(GeV)= " << P2/
GeV
212 <<
" P(MeV)= " << P/
MeV <<
" < 0" <<
G4endl;
static G4Pow * GetInstance()
G4double G4NeutronHPJENDLHEData::G4double result
G4GLOB_DLL std::ostream G4cout
~G4FermiPhaseSpaceDecay()
void setVect(const Hep3Vector &)
CLHEP::HepLorentzVector G4LorentzVector