43 verboseLevel(0), theMinEnergy(0.0), theMaxEnergy(25.0*GeV),
44 isBlocked(false), recoilEnergyThreshold(0.0), theModelName(modelName),
67 if(
IsBlocked(aMaterial) ) {
return 0.0; }
68 if(
IsBlocked(anElement) ) {
return 0.0; }
69 size_t length = theMinEnergyListElements.size();
71 for(
size_t i=0; i<length; ++i ) {
72 if( anElement == theMinEnergyListElements[i].second )
73 {
return theMinEnergyListElements[i].first; }
76 length = theMinEnergyList.size();
78 for(
size_t i=0; i<length; ++i ) {
79 if( aMaterial == theMinEnergyList[i].second )
80 {
return theMinEnergyList[i].first; }
85 G4cout <<
"*** Warning from HadronicInteraction::GetMinEnergy" <<
G4endl
86 <<
" material " << aMaterial->
GetName()
87 <<
" not found in min energy List" <<
G4endl;
96 G4cout <<
"*** Warning from HadronicInteraction::SetMinEnergy" <<
G4endl
97 <<
" The model is not active for the Element "
100 size_t length = theMinEnergyListElements.size();
102 for(
size_t i=0; i<length; ++i ) {
103 if( anElement == theMinEnergyListElements[i].second )
105 theMinEnergyListElements[i].first = anEnergy;
110 theMinEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
117 G4cout <<
"*** Warning from HadronicInteraction::SetMinEnergy" <<
G4endl
118 <<
" The model is not active for the Material "
121 size_t length = theMinEnergyList.size();
123 for(
size_t i=0; i<length; ++i ) {
124 if( aMaterial == theMinEnergyList[i].second )
126 theMinEnergyList[i].first = anEnergy;
131 theMinEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
137 if(
IsBlocked(aMaterial) ) {
return 0.0; }
138 if(
IsBlocked(anElement) ) {
return 0.0; }
139 size_t length = theMaxEnergyListElements.size();
141 for(
size_t i=0; i<length; ++i ) {
142 if( anElement == theMaxEnergyListElements[i].second )
143 {
return theMaxEnergyListElements[i].first; }
146 length = theMaxEnergyList.size();
148 for(
size_t i=0; i<length; ++i ) {
149 if( aMaterial == theMaxEnergyList[i].second )
150 {
return theMaxEnergyList[i].first; }
155 G4cout <<
"*** Warning from HadronicInteraction::GetMaxEnergy" <<
G4endl
156 <<
" material " << aMaterial->
GetName()
157 <<
" not found in min energy List" <<
G4endl;
166 G4cout <<
"*** Warning from HadronicInteraction::SetMaxEnergy" <<
G4endl
167 <<
"Warning: The model is not active for the Element "
170 size_t length = theMaxEnergyListElements.size();
172 for(
size_t i=0; i<length; ++i ) {
173 if( anElement == theMaxEnergyListElements[i].second )
175 theMaxEnergyListElements[i].first = anEnergy;
180 theMaxEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
187 G4cout <<
"*** Warning from HadronicInteraction::SetMaxEnergy" <<
G4endl
188 <<
"Warning: The model is not active for the Material "
191 size_t length = theMaxEnergyList.size();
193 for(
size_t i=0; i<length; ++i ) {
194 if( aMaterial == theMaxEnergyList[i].second )
196 theMaxEnergyList[i].first = anEnergy;
201 theMaxEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
206 theBlockedList.push_back(aMaterial);
211 theBlockedListElements.push_back(anElement);
217 for (
size_t i=0; i<theBlockedList.size(); ++i) {
218 if (aMaterial == theBlockedList[i])
return true;
226 for (
size_t i=0; i<theBlockedListElements.size(); ++i) {
227 if (anElement == theBlockedListElements[i])
return true;
235 return std::pair<G4double, G4double>(10.*perCent, 5 * GeV);
238std::pair<G4double, G4double>
241 return epCheckLevels;
247 outFile <<
"The description for this model has not been written yet.\n";
G4DLLIMPORT std::ostream G4cout
const G4String & GetName() const
void RegisterMe(G4HadronicInteraction *aModel)
void RemoveMe(G4HadronicInteraction *aModel)
static G4HadronicInteractionRegistry * Instance()
void DeActivateFor(const G4Material *aMaterial)
virtual ~G4HadronicInteraction()
virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const
void SetMinEnergy(G4double anEnergy)
virtual std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
G4HadronicInteraction(const G4String &modelName="HadronicModel")
virtual void ModelDescription(std::ostream &outFile) const
G4double GetMinEnergy() const
void SetMaxEnergy(const G4double anEnergy)
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4double GetMaxEnergy() const
const G4String & GetName() const