127 if (frameFlag == 2 || frameFlag == 3)
129 G4ThreeVector the3IncidentPart = fCache.
Get().theProjectileRP->GetMomentum();
131 G4double nEnergy = fCache.
Get().theProjectileRP->GetTotalEnergy();
134 G4double tEnergy = fCache.
Get().theTarget->GetTotalEnergy();
138 G4double cmsMom = std::sqrt(the3CMS * the3CMS);
139 G4double sqrts = std::sqrt((totE - cmsMom) * (totE + cmsMom));
143 aIncidentPart.
Lorentz(*fCache.
Get().theProjectileRP, theCMS);
149 anEnergy = fCache.
Get().theProjectileRP->GetKineticEnergy();
158 fCache.
Get().theTotalMeanEnergy = 0;
162 for (i = 0; i < nProducts; ++i) {
164 it = theProducts[i].
Sample(anEnergy, nPart);
169 if (aMeanEnergy >= 0) {
170 fCache.
Get().theTotalMeanEnergy += aMeanEnergy;
173 fCache.
Get().theTotalMeanEnergy = anEnergy/nProducts + theProducts[i].
GetQValue();
176 for (
unsigned int ii = 0; ii < it->size(); ++ii) {
178 it->operator[](ii)->GetTotalEnergy());
179 pTmp1 = toLab * pTmp1;
180 it->operator[](ii)->SetMomentum(pTmp1.
vect());
181 it->operator[](ii)->SetTotalEnergy(pTmp1.
e());
185 it->operator[](ii)->Lorentz(
186 *(it->operator[](ii)),
187 -1. * (*fCache.
Get().theTarget));
189 else if (frameFlag == 2)
193 G4cout <<
"G4ParticleHPEnAngCorrelation: before Lorentz boost "
194 << it->at(ii)->GetKineticEnergy() <<
" "
195 << it->at(ii)->GetMomentum() <<
G4endl;
197 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1. * theCMS);
200 G4cout <<
"G4ParticleHPEnAngCorrelation: after Lorentz boost "
201 << it->at(ii)->GetKineticEnergy() <<
" "
202 << it->at(ii)->GetMomentum() <<
G4endl;
206 else if (frameFlag == 3)
208 if (theProducts[i].GetMassCode() > 2004.5)
211 it->operator[](ii)->Lorentz(
212 *(it->operator[](ii)),
213 -1. * (*fCache.
Get().theTarget));
216 G4cout <<
"G4ParticleHPEnAngCorrelation: after Lorentz boost "
217 << it->at(ii)->GetKineticEnergy() <<
" "
218 << it->at(ii)->GetMomentum() <<
G4endl;
223 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1. * theCMS);
226 G4cout <<
"G4ParticleHPEnAngCorrelation: after Lorentz boost "
227 << it->at(ii)->GetKineticEnergy() <<
" "
228 << it->at(ii)->GetMomentum() <<
G4endl;
235 "Sample: The frame of the final state is not specified");
237 result->push_back(it->operator[](ii));
G4ReactionProduct * SampleOne(G4double anEnergy)
void Init(std::istream &aDataFile)
~G4ParticleHPEnAngCorrelation()
G4ParticleHPEnAngCorrelation(const G4ParticleDefinition *proj=nullptr)
G4ReactionProductVector * Sample(G4double anEnergy)
static G4ParticleHPManager * GetInstance()
G4ReactionProductVector * Sample(G4double anEnergy, G4int nParticles)
G4double MeanEnergyOfThisInteraction()
void Init(std::istream &aDataFile, const G4ParticleDefinition *projectile)
G4int GetMultiplicity(G4double anEnergy)