Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronicInteraction Class Referenceabstract

#include <G4HadronicInteraction.hh>

Inheritance diagram for G4HadronicInteraction:
Collaboration diagram for G4HadronicInteraction:

Public Member Functions

 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)=0
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int value)
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
virtual const std::pair
< G4double, G4double
GetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double,
G4double
GetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void ModelDescription (std::ostream &outFile) const
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void InitialiseModel ()
 

Protected Member Functions

void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 

Protected Attributes

G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Detailed Description

Definition at line 64 of file G4HadronicInteraction.hh.

Constructor & Destructor Documentation

G4HadronicInteraction::G4HadronicInteraction ( const G4String modelName = "HadronicModel")
explicit

Definition at line 42 of file G4HadronicInteraction.cc.

42  :
43  verboseLevel(0), theMinEnergy(0.0), theMaxEnergy(25.0*GeV),
44  isBlocked(false), recoilEnergyThreshold(0.0), theModelName(modelName),
45  epCheckLevels(DBL_MAX, DBL_MAX)
46 {
48  registry->RegisterMe(this);
49 }
void RegisterMe(G4HadronicInteraction *aModel)
static G4HadronicInteractionRegistry * Instance()
static constexpr double GeV
Definition: G4SIunits.hh:217
#define DBL_MAX
Definition: templates.hh:83

Here is the call graph for this function:

G4HadronicInteraction::~G4HadronicInteraction ( )
virtual

Definition at line 51 of file G4HadronicInteraction.cc.

52 {
53  registry->RemoveMe(this);
54 }
void RemoveMe(G4HadronicInteraction *aModel)

Here is the call graph for this function:

Member Function Documentation

void G4HadronicInteraction::ActivateFor ( const G4Material aMaterial)
inline

Definition at line 121 of file G4HadronicInteraction.hh.

122  {
123  Block();
124  SetMaxEnergy(GetMaxEnergy(), aMaterial);
125  SetMinEnergy(GetMinEnergy(), aMaterial);
126  }
G4double GetMinEnergy() const
G4double GetMaxEnergy() const
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)

Here is the call graph for this function:

void G4HadronicInteraction::ActivateFor ( const G4Element anElement)
inline

Definition at line 129 of file G4HadronicInteraction.hh.

130  {
131  Block();
132  SetMaxEnergy(GetMaxEnergy(), anElement);
133  SetMinEnergy(GetMinEnergy(), anElement);
134  }
G4double GetMinEnergy() const
G4double GetMaxEnergy() const
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)

Here is the call graph for this function:

virtual G4HadFinalState* G4HadronicInteraction::ApplyYourself ( const G4HadProjectile aTrack,
G4Nucleus targetNucleus 
)
pure virtual
void G4HadronicInteraction::Block ( )
inlineprotected

Definition at line 166 of file G4HadronicInteraction.hh.

166 { isBlocked = true; }

Here is the caller graph for this function:

void G4HadronicInteraction::BuildPhysicsTable ( const G4ParticleDefinition )
virtual
void G4HadronicInteraction::DeActivateFor ( const G4Material aMaterial)

Definition at line 216 of file G4HadronicInteraction.cc.

217 {
218  theBlockedList.push_back(aMaterial);
219 }

Here is the caller graph for this function:

void G4HadronicInteraction::DeActivateFor ( const G4Element anElement)

Definition at line 221 of file G4HadronicInteraction.cc.

222 {
223  theBlockedListElements.push_back(anElement);
224 }
std::pair< G4double, G4double > G4HadronicInteraction::GetEnergyMomentumCheckLevels ( ) const
virtual

Reimplemented in G4TheoFSGenerator.

Definition at line 251 of file G4HadronicInteraction.cc.

252 {
253  return epCheckLevels;
254 }

Here is the caller graph for this function:

const std::pair< G4double, G4double > G4HadronicInteraction::GetFatalEnergyCheckLevels ( ) const
virtual

Reimplemented in G4FissLib, G4ParticleHPInelastic, G4ParticleHPThermalScattering, G4LFission, G4LENDFission, G4ParticleHPFission, G4ParticleHPCapture, and G4ParticleHPElastic.

Definition at line 244 of file G4HadronicInteraction.cc.

245 {
246  // default level of Check
247  return std::pair<G4double, G4double>(2.*perCent, 1. * GeV);
248 }
static constexpr double perCent
Definition: G4SIunits.hh:332
static constexpr double GeV
Definition: G4SIunits.hh:217

Here is the caller graph for this function:

G4double G4HadronicInteraction::GetMaxEnergy ( ) const
inline

Definition at line 97 of file G4HadronicInteraction.hh.

98  { return theMaxEnergy; }

Here is the caller graph for this function:

G4double G4HadronicInteraction::GetMaxEnergy ( const G4Material aMaterial,
const G4Element anElement 
) const

Definition at line 146 of file G4HadronicInteraction.cc.

148 {
149  if( IsBlocked(aMaterial) ) { return 0.0; }
150  if( IsBlocked(anElement) ) { return 0.0; }
151  size_t length = theMaxEnergyListElements.size();
152  if(0 < length) {
153  for(size_t i=0; i<length; ++i ) {
154  if( anElement == theMaxEnergyListElements[i].second )
155  { return theMaxEnergyListElements[i].first; }
156  }
157  }
158  length = theMaxEnergyList.size();
159  if(0 < length) {
160  for(size_t i=0; i<length; ++i ) {
161  if( aMaterial == theMaxEnergyList[i].second )
162  { return theMaxEnergyList[i].first; }
163  }
164  }
165  if(IsBlocked()) { return 0.0; }
166  if( verboseLevel > 1 ) {
167  G4cout << "*** Warning from HadronicInteraction::GetMaxEnergy" << G4endl
168  << " material " << aMaterial->GetName()
169  << " not found in min energy List" << G4endl;
170  }
171  return theMaxEnergy;
172 }
const G4String & GetName() const
Definition: G4Material.hh:178
static constexpr double second
Definition: G4SIunits.hh:157
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4double G4HadronicInteraction::GetMinEnergy ( ) const
inline

Definition at line 84 of file G4HadronicInteraction.hh.

85  { return theMinEnergy; }

Here is the caller graph for this function:

G4double G4HadronicInteraction::GetMinEnergy ( const G4Material aMaterial,
const G4Element anElement 
) const

Definition at line 76 of file G4HadronicInteraction.cc.

78 {
79  if( IsBlocked(aMaterial) ) { return 0.0; }
80  if( IsBlocked(anElement) ) { return 0.0; }
81  size_t length = theMinEnergyListElements.size();
82  if(0 < length) {
83  for(size_t i=0; i<length; ++i ) {
84  if( anElement == theMinEnergyListElements[i].second )
85  { return theMinEnergyListElements[i].first; }
86  }
87  }
88  length = theMinEnergyList.size();
89  if(0 < length) {
90  for(size_t i=0; i<length; ++i ) {
91  if( aMaterial == theMinEnergyList[i].second )
92  { return theMinEnergyList[i].first; }
93  }
94  }
95  if(IsBlocked()) { return 0.0; }
96  if( verboseLevel > 1 ) {
97  G4cout << "*** Warning from HadronicInteraction::GetMinEnergy" << G4endl
98  << " material " << aMaterial->GetName()
99  << " not found in min energy List" << G4endl;
100  }
101  return theMinEnergy;
102 }
const G4String & GetName() const
Definition: G4Material.hh:178
static constexpr double second
Definition: G4SIunits.hh:157
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

const G4String& G4HadronicInteraction::GetModelName ( ) const
inline

Definition at line 116 of file G4HadronicInteraction.hh.

117  { return theModelName; }

Here is the caller graph for this function:

G4double G4HadronicInteraction::GetRecoilEnergyThreshold ( ) const
inline

Definition at line 142 of file G4HadronicInteraction.hh.

143  { return recoilEnergyThreshold;}

Here is the caller graph for this function:

G4int G4HadronicInteraction::GetVerboseLevel ( ) const
inline

Definition at line 110 of file G4HadronicInteraction.hh.

111  { return verboseLevel; }
void G4HadronicInteraction::InitialiseModel ( )
virtual

Reimplemented in G4PreCompoundModel, and G4NeutronRadCapture.

Definition at line 59 of file G4HadronicInteraction.cc.

60 {}
G4bool G4HadronicInteraction::IsApplicable ( const G4HadProjectile aTrack,
G4Nucleus targetNucleus 
)
virtual

Reimplemented in G4CascadeInterface, G4LMsdGenerator, G4hhElastic, and G4DiffuseElastic.

Definition at line 69 of file G4HadronicInteraction.cc.

71 {
72  return true;
73 }
G4bool G4HadronicInteraction::IsBlocked ( const G4Material aMaterial) const

Definition at line 227 of file G4HadronicInteraction.cc.

228 {
229  for (size_t i=0; i<theBlockedList.size(); ++i) {
230  if (aMaterial == theBlockedList[i]) return true;
231  }
232  return false;
233 }
G4bool G4HadronicInteraction::IsBlocked ( const G4Element anElement) const

Definition at line 236 of file G4HadronicInteraction.cc.

237 {
238  for (size_t i=0; i<theBlockedListElements.size(); ++i) {
239  if (anElement == theBlockedListElements[i]) return true;
240  }
241  return false;
242 }
G4bool G4HadronicInteraction::IsBlocked ( ) const
inlineprotected

Definition at line 165 of file G4HadronicInteraction.hh.

165 { return isBlocked;}

Here is the caller graph for this function:

G4double G4HadronicInteraction::SampleInvariantT ( const G4ParticleDefinition p,
G4double  plab,
G4int  Z,
G4int  A 
)
virtual
void G4HadronicInteraction::SetEnergyMomentumCheckLevels ( G4double  relativeLevel,
G4double  absoluteLevel 
)
inline

Definition at line 150 of file G4HadronicInteraction.hh.

151  { epCheckLevels.first = relativeLevel;
152  epCheckLevels.second = absoluteLevel; }

Here is the caller graph for this function:

void G4HadronicInteraction::SetMaxEnergy ( const G4double  anEnergy)
inline

Definition at line 103 of file G4HadronicInteraction.hh.

104  { theMaxEnergy = anEnergy; }
void G4HadronicInteraction::SetMaxEnergy ( G4double  anEnergy,
const G4Element anElement 
)

Definition at line 174 of file G4HadronicInteraction.cc.

176 {
177  if( IsBlocked(anElement) ) {
178  G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl
179  << "Warning: The model is not active for the Element "
180  << anElement->GetName() << "." << G4endl;
181  }
182  size_t length = theMaxEnergyListElements.size();
183  if(0 < length) {
184  for(size_t i=0; i<length; ++i ) {
185  if( anElement == theMaxEnergyListElements[i].second )
186  {
187  theMaxEnergyListElements[i].first = anEnergy;
188  return;
189  }
190  }
191  }
192  theMaxEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
193 }
static constexpr double second
Definition: G4SIunits.hh:157
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
const G4String & GetName() const
Definition: G4Element.hh:127

Here is the call graph for this function:

void G4HadronicInteraction::SetMaxEnergy ( G4double  anEnergy,
const G4Material aMaterial 
)

Definition at line 195 of file G4HadronicInteraction.cc.

197 {
198  if( IsBlocked(aMaterial) ) {
199  G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl
200  << "Warning: The model is not active for the Material "
201  << aMaterial->GetName() << "." << G4endl;
202  }
203  size_t length = theMaxEnergyList.size();
204  if(0 < length) {
205  for(size_t i=0; i<length; ++i ) {
206  if( aMaterial == theMaxEnergyList[i].second )
207  {
208  theMaxEnergyList[i].first = anEnergy;
209  return;
210  }
211  }
212  }
213  theMaxEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
214 }
const G4String & GetName() const
Definition: G4Material.hh:178
static constexpr double second
Definition: G4SIunits.hh:157
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void G4HadronicInteraction::SetMinEnergy ( G4double  anEnergy)
inline

Definition at line 90 of file G4HadronicInteraction.hh.

91  { theMinEnergy = anEnergy; }
void G4HadronicInteraction::SetMinEnergy ( G4double  anEnergy,
const G4Element anElement 
)

Definition at line 104 of file G4HadronicInteraction.cc.

106 {
107  if( IsBlocked(anElement) ) {
108  G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl
109  << " The model is not active for the Element "
110  << anElement->GetName() << "." << G4endl;
111  }
112  size_t length = theMinEnergyListElements.size();
113  if(0 < length) {
114  for(size_t i=0; i<length; ++i ) {
115  if( anElement == theMinEnergyListElements[i].second )
116  {
117  theMinEnergyListElements[i].first = anEnergy;
118  return;
119  }
120  }
121  }
122  theMinEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
123 }
static constexpr double second
Definition: G4SIunits.hh:157
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
const G4String & GetName() const
Definition: G4Element.hh:127

Here is the call graph for this function:

void G4HadronicInteraction::SetMinEnergy ( G4double  anEnergy,
const G4Material aMaterial 
)

Definition at line 125 of file G4HadronicInteraction.cc.

127 {
128  if( IsBlocked(aMaterial) ) {
129  G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << G4endl
130  << " The model is not active for the Material "
131  << aMaterial->GetName() << "." << G4endl;
132  }
133  size_t length = theMinEnergyList.size();
134  if(0 < length) {
135  for(size_t i=0; i<length; ++i ) {
136  if( aMaterial == theMinEnergyList[i].second )
137  {
138  theMinEnergyList[i].first = anEnergy;
139  return;
140  }
141  }
142  }
143  theMinEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
144 }
const G4String & GetName() const
Definition: G4Material.hh:178
static constexpr double second
Definition: G4SIunits.hh:157
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void G4HadronicInteraction::SetModelName ( const G4String nam)
inlineprotected

Definition at line 162 of file G4HadronicInteraction.hh.

163  { theModelName = nam; }
void G4HadronicInteraction::SetRecoilEnergyThreshold ( G4double  val)
inline

Definition at line 139 of file G4HadronicInteraction.hh.

140  { recoilEnergyThreshold = val; }

Here is the caller graph for this function:

void G4HadronicInteraction::SetVerboseLevel ( G4int  value)
inline

Definition at line 113 of file G4HadronicInteraction.hh.

114  { verboseLevel = value; }
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

Member Data Documentation

G4bool G4HadronicInteraction::isBlocked
protected

Definition at line 184 of file G4HadronicInteraction.hh.

G4double G4HadronicInteraction::theMaxEnergy
protected

Definition at line 182 of file G4HadronicInteraction.hh.

G4double G4HadronicInteraction::theMinEnergy
protected

Definition at line 181 of file G4HadronicInteraction.hh.

G4HadFinalState G4HadronicInteraction::theParticleChange
protected

Definition at line 168 of file G4HadronicInteraction.hh.

G4int G4HadronicInteraction::verboseLevel
protected

Definition at line 173 of file G4HadronicInteraction.hh.


The documentation for this class was generated from the following files: