43 verboseLevel(0), theMinEnergy(0.0), theMaxEnergy(25.0*
GeV),
44 isBlocked(false), recoilEnergyThreshold(0.0), theModelName(modelName),
79 if(
IsBlocked(aMaterial) ) {
return 0.0; }
80 if(
IsBlocked(anElement) ) {
return 0.0; }
81 size_t length = theMinEnergyListElements.size();
83 for(
size_t i=0; i<length; ++i ) {
84 if( anElement == theMinEnergyListElements[i].
second )
85 {
return theMinEnergyListElements[i].first; }
88 length = theMinEnergyList.size();
90 for(
size_t i=0; i<length; ++i ) {
91 if( aMaterial == theMinEnergyList[i].
second )
92 {
return theMinEnergyList[i].first; }
97 G4cout <<
"*** Warning from HadronicInteraction::GetMinEnergy" <<
G4endl
98 <<
" material " << aMaterial->
GetName()
99 <<
" not found in min energy List" <<
G4endl;
108 G4cout <<
"*** Warning from HadronicInteraction::SetMinEnergy" <<
G4endl
109 <<
" The model is not active for the Element "
112 size_t length = theMinEnergyListElements.size();
114 for(
size_t i=0; i<length; ++i ) {
115 if( anElement == theMinEnergyListElements[i].
second )
117 theMinEnergyListElements[i].first = anEnergy;
122 theMinEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
129 G4cout <<
"*** Warning from HadronicInteraction::SetMinEnergy" <<
G4endl
130 <<
" The model is not active for the Material "
133 size_t length = theMinEnergyList.size();
135 for(
size_t i=0; i<length; ++i ) {
136 if( aMaterial == theMinEnergyList[i].
second )
138 theMinEnergyList[i].first = anEnergy;
143 theMinEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
149 if(
IsBlocked(aMaterial) ) {
return 0.0; }
150 if(
IsBlocked(anElement) ) {
return 0.0; }
151 size_t length = theMaxEnergyListElements.size();
153 for(
size_t i=0; i<length; ++i ) {
154 if( anElement == theMaxEnergyListElements[i].
second )
155 {
return theMaxEnergyListElements[i].first; }
158 length = theMaxEnergyList.size();
160 for(
size_t i=0; i<length; ++i ) {
161 if( aMaterial == theMaxEnergyList[i].
second )
162 {
return theMaxEnergyList[i].first; }
167 G4cout <<
"*** Warning from HadronicInteraction::GetMaxEnergy" <<
G4endl
168 <<
" material " << aMaterial->
GetName()
169 <<
" not found in min energy List" <<
G4endl;
178 G4cout <<
"*** Warning from HadronicInteraction::SetMaxEnergy" <<
G4endl
179 <<
"Warning: The model is not active for the Element "
182 size_t length = theMaxEnergyListElements.size();
184 for(
size_t i=0; i<length; ++i ) {
185 if( anElement == theMaxEnergyListElements[i].
second )
187 theMaxEnergyListElements[i].first = anEnergy;
192 theMaxEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
199 G4cout <<
"*** Warning from HadronicInteraction::SetMaxEnergy" <<
G4endl
200 <<
"Warning: The model is not active for the Material "
203 size_t length = theMaxEnergyList.size();
205 for(
size_t i=0; i<length; ++i ) {
206 if( aMaterial == theMaxEnergyList[i].
second )
208 theMaxEnergyList[i].first = anEnergy;
213 theMaxEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
218 theBlockedList.push_back(aMaterial);
223 theBlockedListElements.push_back(anElement);
229 for (
size_t i=0; i<theBlockedList.size(); ++i) {
230 if (aMaterial == theBlockedList[i])
return true;
238 for (
size_t i=0; i<theBlockedListElements.size(); ++i) {
239 if (anElement == theBlockedListElements[i])
return true;
247 return std::pair<G4double, G4double>(2.*
perCent, 1. *
GeV);
250 std::pair<G4double, G4double>
253 return epCheckLevels;
259 outFile <<
"The description for this model has not been written yet.\n";
G4double GetMinEnergy() const
G4bool isBlocked(ParticleList const &p, Nucleus const *const n)
Check Pauli blocking.
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4double GetMaxEnergy() const
static constexpr double perCent
virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const
const G4String & GetName() const
virtual void ModelDescription(std::ostream &outFile) const
virtual ~G4HadronicInteraction()
void RemoveMe(G4HadronicInteraction *aModel)
virtual void InitialiseModel()
static constexpr double second
void RegisterMe(G4HadronicInteraction *aModel)
void SetMinEnergy(G4double anEnergy)
G4GLOB_DLL std::ostream G4cout
virtual std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
G4HadronicInteraction(const G4String &modelName="HadronicModel")
static G4HadronicInteractionRegistry * Instance()
static constexpr double GeV
void SetMaxEnergy(const G4double anEnergy)
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
const G4String & GetName() const
virtual G4bool IsApplicable(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
void DeActivateFor(const G4Material *aMaterial)