53 if(temp->size()!=1)
throw G4HadronicException(__FILE__, __LINE__,
"SampleOne: Yield not correct");
56 result = temp->operator[](0);
84 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
85 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
99 toZ.rotateZ(-1*Ptmp.phi());
100 toZ.rotateY(-1*Ptmp.theta());
105 std::vector<int> nParticles;
115 sumZ += massCode/1000 * nPart;
116 sumA += massCode % 1000 * nPart;
118 if( getenv(
"G4ParticleHPDebug") )
G4cout << i <<
" G4ParticleHPEnAngCorrelation::MULTIPLICITY " << massCode <<
" sumZ " << sumZ <<
" sumA " << sumA <<
" NPART " << nPart <<
G4endl;
120 nParticles.push_back( nPart );
128 if ( (sumZ != targetZ || sumA != targetA ) &&
129 (sumZ > targetZ || sumA > targetA
134 if( getenv(
"G4ParticleHPDebug") )
135 G4cerr <<
" WRONG MULTIPLICITY Z= " << sumZ
138 <<
" > " << targetA <<
G4endl;
161 for(
unsigned int ii=0; ii<it->size(); ii++)
165 it->operator[](ii)->GetTotalEnergy());
167 if( getenv(
"G4PHPTEST") )
G4cout <<
" G4particleHPEnAngCorrelation COS THETA " << std::cos(it->operator[](ii)->GetMomentum().theta()) <<
G4endl;
168 it->operator[](ii)->SetMomentum(pTmp1.vect());
169 it->operator[](ii)->SetTotalEnergy(pTmp1.e());
170 if( getenv(
"G4PHPTEST") )
G4cout <<
" G4particleHPEnAngCorrelation COS THETA after toLab " << std::cos(it->operator[](ii)->GetMomentum().theta()) <<
G4endl;
174 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*
theTarget);
179 if( getenv(
"G4ParticleHPDebug") )
180 G4cout <<
"G4ParticleHPEnAngCorrelation: before Lorentz boost "<<
181 it->at(ii)->GetKineticEnergy()<<
" "<<
182 it->at(ii)->GetMomentum()<<
G4endl;
184 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*theCMS);
186 if( getenv(
"G4ParticleHPDebug") )
187 G4cout <<
"G4ParticleHPEnAngCorrelation: after Lorentz boost "<<
188 it->at(ii)->GetKineticEnergy()<<
" "<<
189 it->at(ii)->GetMomentum()<<
G4endl;
198 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*
theTarget);
200 if( getenv(
"G4ParticleHPDebug") )
201 G4cout <<
"G4ParticleHPEnAngCorrelation: after Lorentz boost "<<
202 it->at(ii)->GetKineticEnergy()<<
" "<<
203 it->at(ii)->GetMomentum()<<
G4endl;
209 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*theCMS);
211 if( getenv(
"G4ParticleHPDebug") )
212 G4cout <<
"G4ParticleHPEnAngCorrelation: after Lorentz boost "<<
213 it->at(ii)->GetKineticEnergy()<<
" "<<
214 it->at(ii)->GetMomentum()<<
G4endl;
220 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPEnAngCorrelation::Sample: The frame of the finalstate is not specified");
222 if( getenv(
"G4PHPTEST") )
G4cout <<
frameFlag <<
" G4particleHPEnAngCorrelation COS THETA after Lorentz " << std::cos(it->operator[](ii)->GetMomentum().theta()) <<
G4endl;
226 result->push_back(it->operator[](ii));
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepLorentzRotation G4LorentzRotation
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double MeanEnergyOfThisInteraction()
G4ReactionProductVector * Sample(G4double anEnergy)
G4int GetAtomicNumber() const
std::vector< G4ReactionProduct * > G4ReactionProductVector
const G4ParticleDefinition * GetDefinition() const
void SetMass(const G4double mas)
G4GLOB_DLL std::ostream G4cout
void SetTotalEnergy(const G4double en)
G4int GetAtomicMass() const
static G4IonTable * GetIonTable()
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4int GetMultiplicity(G4double anEnergy)
G4ReactionProduct * SampleOne(G4double anEnergy)
G4ReactionProductVector * Sample(G4double anEnergy, G4int nParticles)
G4ReactionProduct theTarget
G4ThreeVector GetMomentum() const
G4ReactionProduct theProjectileRP
G4ParticleHPProduct * theProducts
G4GLOB_DLL std::ostream G4cerr
CLHEP::HepLorentzVector G4LorentzVector
G4double theTotalMeanEnergy