51 ,theProjectile(projectile)
53 const char* dataDirVariable;
55 dataDirVariable =
"G4NEUTRONHPDATA";
57 dataDirVariable =
"G4PROTONHPDATA";
59 dataDirVariable =
"G4DEUTERONHPDATA";
61 dataDirVariable =
"G4TRITONHPDATA";
63 dataDirVariable =
"G4HE3HPDATA";
65 dataDirVariable =
"G4ALPHAHPDATA";
75 if(!getenv(dataDirVariable)){
79 dirName = getenv(dataDirVariable);
83 dirName = dirName + tString;
224 for ( std::vector<G4ParticleHPChannelList*>::iterator
252 rWeight = NumAtomsPerVolume[i];
263 if( getenv(
"G4ParticleHPDebug") )
G4cout <<
" G4ParticleHPInelastic XSEC ELEM " << i <<
" = " << xSec[i] <<
G4endl;
275 if( sum == 0 || random<=running/sum)
break;
281 if( getenv(
"G4ParticleHPDebug") )
G4cout <<
" G4ParticleHPInelastic SELECTED ELEM " << it <<
" = " << theMaterial->
GetElement(it)->
GetName() <<
" FROM MATERIAL " << theMaterial->
GetName() <<
G4endl;
290 for (
G4int j = 0 ; j != iele ; j++ ) {
291 target_isotope=target_element->
GetIsotope( j );
302 if( getenv(
"G4PHPTEST") ) {
306 G4cout <<
" G4ParticleHPinelastic COS THETA " << std::cos(secoMom.
theta()) <<
" " << secoMom <<
G4endl;
401 #include "G4ParticleHP2N2AInelasticFS.hh" 421 #include "G4ParticleHPND2AInelasticFS.hh" 423 #include "G4ParticleHPNHe3InelasticFS.hh" 427 #include "G4ParticleHPNT2AInelasticFS.hh" 454 const char* dataDirVariable;
456 dataDirVariable =
"G4NEUTRONHPDATA";
458 dataDirVariable =
"G4PROTONHPDATA";
460 dataDirVariable =
"G4DEUTERONHPDATA";
462 dataDirVariable =
"G4TRITONHPDATA";
464 dataDirVariable =
"G4HE3HPDATA";
466 dataDirVariable =
"G4ALPHAHPDATA";
468 G4String message(
"G4ParticleHPInelastic may only be called for neutron, proton, deuteron, triton, He3 or alpha, while it is called for " + projectile.
GetParticleName());
471 if(!getenv(dataDirVariable)){
472 G4String message(
"Please set the environement variable " +
G4String(dataDirVariable) +
" to point to the " + projectile.
GetParticleName() +
" cross-section files.");
475 dirName = getenv(dataDirVariable);
479 dirName = dirName + tString;
481 G4cout <<
"@@@ G4ParticleHPInelastic instantiated for particle " << projectile.
GetParticleName() <<
" data directory variable is " << dataDirVariable <<
" pointing to " << dirName <<
G4endl;
501 ((*theInelastic)[i])->
Register(
new G4ParticleHP2N2AInelasticFS ,
"F12");
504 ((*theInelastic)[i])->
Register(
new G4ParticleHPNHe3InelasticFS ,
"F15");
505 ((*theInelastic)[i])->
Register(
new G4ParticleHPND2AInelasticFS ,
"F16");
506 ((*theInelastic)[i])->
Register(
new G4ParticleHPNT2AInelasticFS ,
"F17");
526 ((*theInelastic)[i])->RestartRegistration();
529 while( !((*
theInelastic)[i])->HasDataInAnyFinalState() && itry < 6 );
547 G4cout <<
"The components of the element are" <<
G4endl;
552 G4cout <<
"No possible final state data of the element is found in " << dataDirVariable <<
"." <<
G4endl;
563 outFile <<
"Extension of High Precision model for inelastic reaction of proton, deuteron, triton, He3 and alpha below 20MeV\n";
static G4ParticleHPManager * GetInstance()
void SetIsotope(const G4Isotope *iso)
const G4Isotope * GetIsotope(G4int iso) const
G4ParticleDefinition * theProjectile
const G4Material * GetMaterial() const
G4HadSecondary * GetSecondary(size_t i)
void RegisterInelasticFinalStates(const G4ParticleDefinition *, std::vector< G4ParticleHPChannelList *> *)
G4ParticleHPInelastic(G4ParticleDefinition *projectile=G4Neutron::Neutron(), const char *name="NeutronHPInelastic")
size_t GetNumberOfIsotopes() const
void SetVerboseLevel(G4int i)
virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const
void SetMinEnergy(G4double anEnergy)
G4ThreeVector GetMomentum() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
static size_t GetNumberOfElements()
std::vector< G4ParticleHPChannelList * > * theInelastic
const G4double * GetVecNbOfAtomsPerVolume() const
static G4Triton * Triton()
G4int GetVerboseLevel() const
static G4Proton * Proton()
const G4Element * GetElement(G4int iel) const
static const double perCent
static G4Neutron * Neutron()
void OpenReactionWhiteBoard()
G4double GetTemperature() const
void BuildPhysicsTable(const G4ParticleDefinition &)
void SetVerboseLevel(G4int)
static G4Deuteron * Deuteron()
G4double GetThermalEnergy(const G4HadProjectile &aP, const G4Element *anE, G4double aT)
const G4ParticleDefinition * GetDefinition() const
const G4String & GetName() const
virtual void ModelDescription(std::ostream &outFile) const
G4double GetKineticEnergy() const
G4DynamicParticle * GetParticle()
size_t GetNumberOfElements() const
std::vector< G4ParticleHPChannelList * > * GetInelasticFinalStates(const G4ParticleDefinition *)
void SetMaxEnergy(const G4double anEnergy)
void CloseReactionWhiteBoard()
static G4ElementTable * GetElementTable()
const G4String & GetName() const
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
void SetParameters(const G4double A, const G4double Z)