46double MyRNG(
void*) {
return G4Random::getTheEngine()->flat(); }
62 default_evaluation =
"";
74 for ( std::map< G4int , G4LENDUsedTarget* >::iterator
85 for ( std::map< G4int , G4LENDUsedTarget* >::iterator
106 for ( std::size_t i = 0 ; i < numberOfElements ; ++i )
109 const G4Element* anElement = (*theElementTable)[i];
112 if ( numberOfIsotope > 0 )
115 for (
G4int i_iso = 0 ; i_iso < numberOfIsotope ; ++i_iso )
122 if ( allow_nat ==
true ) aTarget->
AllowNat();
123 if ( allow_any ==
true ) aTarget->
AllowAny();
124 usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > (
lend_manager->GetNucleusEncoding( iZ , iA , iIsomer ) , aTarget ) );
135 for (
G4int ii = 0 ; ii < numberOfNistIso ; ii++ )
145 if ( allow_nat ==
true ) aTarget->
AllowNat();
146 if ( allow_any ==
true ) aTarget->
AllowAny();
147 usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > (
lend_manager->GetNucleusEncoding( iZ , iMass , iIsomer ) , aTarget ) );
201 G4ThreeVector v ( G4RandGauss::shoot() * std::sqrt( kT*mass )
202 , G4RandGauss::shoot() * std::sqrt( kT*mass )
203 , G4RandGauss::shoot() * std::sqrt( kT*mass ) );
216 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
217 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
221 theNeutron.
Lorentz(theNeutron, theCMS);
222 theTarget.
Lorentz(theTarget, theCMS);
228 tempVector.
setX(std::cos(theta)*std::sin(cms_theta)*std::cos(cms_phi)
229 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::cos(cms_phi)
230 -std::sin(theta)*std::sin(phi)*std::sin(cms_phi) );
231 tempVector.
setY(std::cos(theta)*std::sin(cms_theta)*std::sin(cms_phi)
232 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::sin(cms_phi)
233 +std::sin(theta)*std::sin(phi)*std::cos(cms_phi) );
234 tempVector.
setZ(std::cos(theta)*std::cos(cms_theta)
235 -std::sin(theta)*std::cos(phi)*std::sin(cms_theta) );
242 theNeutron.
Lorentz(theNeutron, -1.*theCMS);
243 theTarget.
Lorentz(theTarget, -1.*theCMS);
261 message =
"Produce unchanged final state is requested in ";
263 message +=
". Cross section and model likely have an inconsistency.";
275 target =
usedTarget_map.find( nuclear_code )->second->GetTarget();
285 G4cout <<
"Requested Evaluation, Z , A -> Actual Evaluation, Z , A(0=Nat) " <<
G4endl;
286 for ( std::map< G4int , G4LENDUsedTarget* >::iterator
289 <<
" " << it->second->GetWantedEvaluation()
290 <<
", " << it->second->GetWantedZ()
291 <<
", " << it->second->GetWantedA()
292 <<
" -> " << it->second->GetActualEvaluation()
293 <<
", " << it->second->GetActualZ()
294 <<
", " << it->second->GetActualA()
std::vector< G4Element * > G4ElementTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
static std::size_t GetNumberOfElements()
std::size_t GetNumberOfIsotopes() const
const G4Isotope * GetIsotope(G4int iso) const
static const G4ElementTable * GetElementTable()
double getElasticFinalState(double a_energy, double a_temperature, double(*a_rng)(void *), void *a_rngState) const
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
void SetMinEnergy(G4double anEnergy)
G4HadronicInteraction(const G4String &modelName="HadronicModel")
const G4String & GetModelName() const
void SetMaxEnergy(const G4double anEnergy)
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4IonTable * GetIonTable()
static G4LENDManager * GetInstance()
std::map< G4int, G4LENDUsedTarget * > usedTarget_map
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
G4LENDManager * lend_manager
void DumpLENDTargetInfo(G4bool force=false)
G4LENDModel(G4String name="LENDModel")
void recreate_used_target_map()
void create_used_target_map()
G4HadFinalState * returnUnchanged(const G4HadProjectile &aTrack, G4HadFinalState *theResult)
G4ParticleDefinition * proj
G4GIDI_target * get_target_from_map(G4int nuclear_code)
G4double GetTemperature() const
G4int GetNumberOfNistIsotopes(G4int Z) const
G4double GetIsotopeAbundance(G4int Z, G4int N) const
G4int GetNistFirstIsotopeN(G4int Z) const
const G4Isotope * GetIsotope()
G4double GetPDGMass() const
static G4int GetModelID(const G4int modelIndex)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetTotalMomentum() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetKineticEnergy(const G4double en)
void SetMass(const G4double mas)