50 const char* dataDirVariable;
52 dataDirVariable =
"G4NEUTRONHPDATA";
54 dataDirVariable =
"G4PROTONHPDATA";
56 dataDirVariable =
"G4DEUTERONHPDATA";
58 dataDirVariable =
"G4TRITONHPDATA";
60 dataDirVariable =
"G4HE3HPDATA";
62 dataDirVariable =
"G4ALPHAHPDATA";
64 G4String message(
"G4ParticleHPInelastic may only be called for neutron, proton, deuteron, triton, He3 or alpha, while it is called for " + projectile->
GetParticleName());
72 if(!getenv(dataDirVariable)){
73 G4String message(
"Please set the environement variable " +
G4String(dataDirVariable) +
" to point to the " + projectile->
GetParticleName() +
" cross-section files.");
76 dirName = getenv(dataDirVariable);
83 G4cout <<
"@@@ G4ParticleHPInelastic instantiated for particle " << projectile->
GetParticleName() <<
" data directory variable is " << dataDirVariable <<
" pointing to " <<
dirName <<
G4endl;
195 while( !(*
theInelastic[i]).HasDataInAnyFinalState() && itry < 6 );
201 G4bool exceptional =
false;
206 if ( !exceptional ) {
208 throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this element");
219 for ( std::vector<G4ParticleHPChannelList*>::iterator
248 rWeight = NumAtomsPerVolume[i];
259 if( getenv(
"G4ParticleHPDebug") )
G4cout <<
" G4ParticleHPInelastic XSEC ELEM " << i <<
" = " <<
xSec[i] <<
G4endl;
271 if( sum == 0 || random<=running/sum)
break;
277 if( getenv(
"G4ParticleHPDebug") )
G4cout <<
" G4ParticleHPInelastic SELECTED ELEM " << it <<
" = " << theMaterial->
GetElement(it)->
GetName() <<
" FROM MATERIAL " << theMaterial->
GetName() <<
G4endl;
286 for (
G4int j = 0 ; j != iele ; j++ ) {
287 target_isotope=target_element->
GetIsotope( j );
298 if( getenv(
"G4PHPTEST") ) {
302 G4cout <<
" G4ParticleHPinelastic COS THETA " << std::cos(secoMom.theta()) <<
" " << secoMom <<
G4endl;
368 while( !(*
theInelastic[i]).HasDataInAnyFinalState() && itry < 6 );
374 G4bool exceptional =
false;
379 if ( !exceptional )
throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this element");
static G4ParticleHPManager * GetInstance()
size_t GetNumberOfIsotopes() const
void SetIsotope(const G4Isotope *iso)
G4ParticleHPDInelasticFS theDFS
G4ParticleHPND2AInelasticFS theND2AFS
G4ParticleDefinition * theProjectile
G4HadSecondary * GetSecondary(size_t i)
CLHEP::Hep3Vector G4ThreeVector
G4ParticleHPDAInelasticFS theDAFS
G4ParticleHPN2AInelasticFS theN2AFS
G4ParticleHP3AInelasticFS the3AFS
G4ParticleHPNHe3InelasticFS theNHe3FS
G4ParticleHPHe3InelasticFS theHe3FS
G4ParticleHPN3AInelasticFS theN3AFS
const G4String & GetName() const
G4ParticleHP2N2AInelasticFS the2N2AFS
G4ParticleHPNPAInelasticFS theNPAFS
G4ParticleHP3NAInelasticFS the3NAFS
G4ParticleHPNInelasticFS theNFS
G4ParticleHPNT2AInelasticFS theNT2AFS
G4ParticleHPNTInelasticFS theNTFS
std::vector< G4ParticleHPChannelList * > theInelastic
const G4Element * GetElement(G4int iel) const
G4ParticleHP3NInelasticFS the3NFS
G4ParticleHPInelastic(G4ParticleDefinition *projectile=G4Neutron::Neutron(), const char *name="NeutronHPInelastic")
G4ParticleHPPDInelasticFS thePDFS
const G4String & GetParticleName() const
G4int GetVerboseLevel() const
G4ParticleHPPInelasticFS thePFS
void SetVerboseLevel(G4int i)
void SetMinEnergy(G4double anEnergy)
const G4double * GetVecNbOfAtomsPerVolume() const
G4ParticleHPNPInelasticFS theNPFS
G4GLOB_DLL std::ostream G4cout
G4ParticleHP3NPInelasticFS the3NPFS
static size_t GetNumberOfElements()
const G4ParticleDefinition * GetDefinition() const
G4ParticleHPPAInelasticFS thePAFS
G4double GetKineticEnergy() const
G4ParticleHP2AInelasticFS the2AFS
G4ParticleHPNDInelasticFS theNDFS
static G4Triton * Triton()
G4ParticleHPPTInelasticFS thePTFS
G4ParticleHPTInelasticFS theTFS
static G4Proton * Proton()
static const double perCent
G4ParticleHP2NDInelasticFS the2NDFS
static G4Neutron * Neutron()
void OpenReactionWhiteBoard()
void SetVerboseLevel(G4int)
static G4Deuteron * Deuteron()
G4ParticleHPT2AInelasticFS theT2AFS
G4double GetThermalEnergy(const G4HadProjectile &aP, const G4Element *anE, G4double aT)
G4ParticleHP4NInelasticFS the4NFS
G4ParticleHPNAInelasticFS theNAFS
G4ParticleHP2NInelasticFS the2NFS
G4ParticleHPN2PInelasticFS theN2PFS
G4ParticleHPNXInelasticFS theNXFS
G4ParticleHPAInelasticFS theAFS
G4DynamicParticle * GetParticle()
G4ParticleHP2PInelasticFS the2PFS
void SetMaxEnergy(const G4double anEnergy)
const G4Isotope * GetIsotope(G4int iso) const
G4double GetTemperature() const
const G4Material * GetMaterial() const
void CloseReactionWhiteBoard()
size_t GetNumberOfElements() const
const G4String & GetName() const
static G4ElementTable * GetElementTable()
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()
G4ParticleHP2NAInelasticFS the2NAFS
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
G4ParticleHP2NPInelasticFS the2NPFS
void SetParameters(const G4double A, const G4double Z)
void addChannelForNewElement()
G4ParticleHPD2AInelasticFS theD2AFS
G4ThreeVector GetMomentum() const
G4GLOB_DLL std::ostream G4cerr
virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const