54std::vector<G4LorentzVector*> *
55G4FermiPhaseSpaceDecay::KopylovNBodyDecay(
const G4double M,
56 const std::vector<G4double>& mr)
const
61 std::vector<G4LorentzVector*>* P =
new std::vector<G4LorentzVector*>(N, 0);
63 G4double mtot = std::accumulate( mr.begin(), mr.end(), 0.0);
72 for (
size_t k = N-1; k>0; --k)
75 if (k>1) { T *= BetaKopylov(k); }
80 PFragMagCM = PtwoBody(Mass,mr[k],RestMass);
85 PFragCM.setVect(RandVector);
86 PFragCM.setE(std::sqrt(PFragMagCM*PFragMagCM + mr[k]*mr[k]));
88 PRestCM.setVect(-RandVector);
89 PRestCM.setE(std::sqrt(PFragMagCM*PFragMagCM + RestMass*RestMass));
94 PFragCM.boost(BoostV);
95 PRestCM.boost(BoostV);
109std::vector<G4LorentzVector*> *
110G4FermiPhaseSpaceDecay::NBodyDecay(
G4double M,
const std::vector<G4double>& mr)
const
113 size_t N = mr.size();
116 G4double mtot = std::accumulate( mr.begin(), mr.end(), 0.0);
120 for (i = 1; i < N; i++)
124 Wmax *= PtwoBody(Emax, Emin, mr[i]);
129 std::vector<G4double> p(N, 0.0);
130 std::vector<G4double> r(N,0.0);
131 std::vector<G4double> vm(N, 0.0);
138 std::sort(r.begin(),r.end(), std::less<G4double>());
141 std::partial_sum(mr.begin(), mr.end(), vm.begin());
142 std::transform(r.begin(), r.end(), r.begin(),
143 std::bind2nd(std::multiplies<G4double>(), M-mtot));
144 std::transform(r.begin(), r.end(), vm.begin(), vm.begin(), std::plus<G4double>());
148 for (j = 0; j < N-1; j++)
150 p[j] = PtwoBody(vm[j+1],vm[j],mr[j+1]);
153 p[N-1] = PtwoBody(vm[N-2],mr[N-2],mr[N-1]);
156 if (ntries++ > 1000000)
163 std::vector<G4LorentzVector*> * P =
new std::vector<G4LorentzVector*>(N, 0);
169 for (i = 2; i < N; i++)
171 a3P = IsotropicVector(p[i-1]);
175 for (j = 0; j < i; j++)
177 (*P)[j]->boost(Beta);
184std::vector<G4LorentzVector*> *
185G4FermiPhaseSpaceDecay::TwoBodyDecay(
G4double M,
186 const std::vector<G4double>& mass)
const
195 P41->
setE(std::sqrt(mom*mom + m0*m0));
199 P42->
setE(std::sqrt(mom*mom + m1*m1));
201 std::vector<G4LorentzVector*> * result =
new std::vector<G4LorentzVector*>;
202 result->push_back(P41);
203 result->push_back(P42);
211 G4cout <<
"G4FermiPhaseSpaceDecay: problem of decay of M(GeV)= " << E/GeV
212 <<
" on M1(GeV)= " << P1/GeV <<
" and M2(GeV)= " << P2/GeV
213 <<
" P(MeV)= " << P/MeV <<
" < 0" <<
G4endl;
CLHEP::HepLorentzVector G4LorentzVector
G4DLLIMPORT std::ostream G4cout
void setVect(const Hep3Vector &)
~G4FermiPhaseSpaceDecay()
static G4Pow * GetInstance()