53 std::vector<G4LorentzVector*> *
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*> *
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++)
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*> *
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()
std::vector< G4LorentzVector * > * NBodyDecay(G4double, const std::vector< G4double > &) const
static const G4double * P1[nN]
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4LorentzVector * > * TwoBodyDecay(G4double, const std::vector< G4double > &) const
G4double PtwoBody(G4double E, G4double P1, G4double P2) const
void DumpProblem(G4double E, G4double P1, G4double P2, G4double P) const
G4GLOB_DLL std::ostream G4cout
~G4FermiPhaseSpaceDecay()
G4ThreeVector IsotropicVector(const G4double Magnitude=1.0) const
static const G4double Emin
static const G4double * P2[nN]
static const G4double Emax
std::vector< G4LorentzVector * > * KopylovNBodyDecay(G4double, const std::vector< G4double > &) const
CLHEP::HepLorentzVector G4LorentzVector