54 G4int icounter_max=1024;
57 if ( icounter > icounter_max ) {
58 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
65 if(temp->size()!=1)
throw G4HadronicException(__FILE__, __LINE__,
"SampleOne: Yield not correct");
68 result = temp->operator[](0);
96 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
97 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
107 anEnergy =
fCache.
Get().theProjectileRP->GetKineticEnergy();
129 fCache.
Get().theTotalMeanEnergy += aMeanEnergy;
137 for(
unsigned int ii=0; ii<it->size(); ii++)
141 it->operator[](ii)->GetTotalEnergy());
143 if( std::getenv(
"G4PHPTEST") )
G4cout <<
" G4particleHPEnAngCorrelation COS THETA " << std::cos(it->operator[](ii)->GetMomentum().theta()) <<
G4endl;
144 it->operator[](ii)->SetMomentum(pTmp1.vect());
145 it->operator[](ii)->SetTotalEnergy(pTmp1.e());
146 if( std::getenv(
"G4PHPTEST") )
G4cout <<
" G4particleHPEnAngCorrelation COS THETA after toLab " << std::cos(it->operator[](ii)->GetMomentum().theta()) <<
G4endl;
150 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*(*
fCache.
Get().theTarget));
155 if( std::getenv(
"G4ParticleHPDebug") )
156 G4cout <<
"G4ParticleHPEnAngCorrelation: before Lorentz boost "<<
157 it->at(ii)->GetKineticEnergy()<<
" "<<
158 it->at(ii)->GetMomentum()<<
G4endl;
160 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*theCMS);
162 if( std::getenv(
"G4ParticleHPDebug") )
163 G4cout <<
"G4ParticleHPEnAngCorrelation: after Lorentz boost "<<
164 it->at(ii)->GetKineticEnergy()<<
" "<<
165 it->at(ii)->GetMomentum()<<
G4endl;
174 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*(*
fCache.
Get().theTarget));
176 if( std::getenv(
"G4ParticleHPDebug") )
177 G4cout <<
"G4ParticleHPEnAngCorrelation: after Lorentz boost "<<
178 it->at(ii)->GetKineticEnergy()<<
" "<<
179 it->at(ii)->GetMomentum()<<
G4endl;
185 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*theCMS);
187 if( std::getenv(
"G4ParticleHPDebug") )
188 G4cout <<
"G4ParticleHPEnAngCorrelation: after Lorentz boost "<<
189 it->at(ii)->GetKineticEnergy()<<
" "<<
190 it->at(ii)->GetMomentum()<<
G4endl;
196 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPEnAngCorrelation::Sample: The frame of the finalstate is not specified");
198 if( std::getenv(
"G4PHPTEST") )
G4cout <<
frameFlag <<
" G4particleHPEnAngCorrelation COS THETA after Lorentz " << std::cos(it->operator[](ii)->GetMomentum().theta()) <<
G4endl;
202 result->push_back(it->operator[](ii));