86G4bool G4ParticleHPInelastic::fLock[] = {
false,
false,
false,
false,
false,
false};
87std::vector<G4ParticleHPChannelList*>*
90static std::once_flag applyOnce;
105 if (
fManager->GetVerboseLevel() > 1)
106 G4cout <<
"@@@ G4ParticleHPInelastic instantiated for "
120void G4ParticleHPInelastic::ClearData()
122 for (
G4int i=0; i<6; ++i) {
140 std::size_t index = elm->
GetIndex();
155 for (i = 0; i < n; ++i) {
162 rWeight = NumAtomsPerVolume[i];
175 G4cout <<
" G4ParticleHPInelastic XSEC ELEM " << i <<
" = " << xSec[i] <<
G4endl;
179 for (it = 0; it < n; ++it) {
182 if (sum <= xSec[it])
break;
189 G4cout <<
" G4ParticleHPInelastic: Elem it=" << it <<
" "
190 << elm->GetName() <<
" index=" << index
191 <<
" from material " << theMaterial->
GetName()
199 fManager->GetReactionWhiteBoard()->GetTargZ());
202 const G4Isotope* target_isotope =
nullptr;
204 for (
G4int j = 0; j != iele; ++j) {
205 target_isotope = target_element->
GetIsotope(j);
206 if (target_isotope->
GetN() ==
fManager->GetReactionWhiteBoard()->GetTargA())
219 return std::pair<G4double, G4double>(10.0 * perCent, 350.0 * CLHEP::GeV);
225 std::call_once(applyOnce, [
this]() { isFirst =
true; });
228 if (isFirst && nelm !=
numEle) {
231 for (
G4int i=0; i<6; ++i) { fLock[i] =
false; }
235 if (fLock[
indexP]) {
return; }
239 if (fLock[
indexP]) {
return; }
249 if (
fManager->GetVerboseLevel() > 0 && isFirst) {
251 G4cout <<
"@@@ G4ParticleHPInelastic instantiated for particle "
252 << theProjectile->GetParticleName() <<
"/n data directory is "
257 for (
G4int i = n0; i < nelm; ++i) {
260 clist->Init((*table)[i],
dirName, theProjectile);
298 if (
fManager->GetVerboseLevel() > 1) {
299 G4cout <<
"ParticleHP::Inelastic for "
300 << theProjectile->GetParticleName() <<
" off "
301 << (*table)[i]->GetName() <<
G4endl;
311 outFile <<
"High Precision (HP) model for inelastic reaction of "
312 << theProjectile->GetParticleName() <<
" below 20MeV\n";
G4TemplateAutoLock< G4Mutex > G4AutoLock
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
static std::size_t GetNumberOfElements()
std::size_t GetNumberOfIsotopes() const
std::size_t GetIndex() const
const G4Isotope * GetIsotope(G4int iso) const
static const G4ElementTable * GetElementTable()
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4HadronicInteraction(const G4String &modelName="HadronicModel")
G4double GetTemperature() const
const G4Element * GetElement(G4int iel) const
const G4double * GetVecNbOfAtomsPerVolume() const
std::size_t GetNumberOfElements() const
const G4String & GetName() const
static G4Neutron * Neutron()
void SetParameters(const G4double A, const G4double Z, const G4int numberOfLambdas=0)
void SetIsotope(const G4Isotope *iso)
const G4String & GetParticleName() const
G4ParticleHPManager * fManager
~G4ParticleHPInelastic() override
void ModelDescription(std::ostream &outFile) const override
static std::vector< G4ParticleHPChannelList * > * theInelastic[6]
void BuildPhysicsTable(const G4ParticleDefinition &) override
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus) override
const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const override
G4ParticleHPInelastic(G4ParticleDefinition *p=G4Neutron::Neutron(), const char *name="NeutronHPInelastic")
static G4ParticleHPManager * GetInstance()
void CloseReactionWhiteBoard()
void OpenReactionWhiteBoard()
G4double GetThermalEnergy(const G4HadProjectile &aP, const G4Element *anE, G4double aT)