G4HadronCrossSections Class Reference

#include <G4HadronCrossSections.hh>

Inheritance diagram for G4HadronCrossSections:

G4NeutronHPElementData

Public Member Functions

 G4HadronCrossSections ()
 ~G4HadronCrossSections ()
G4bool IsApplicable (const G4DynamicParticle *aParticle)
G4double GetElasticCrossSection (const G4DynamicParticle *, G4int, G4int)
G4double GetInelasticCrossSection (const G4DynamicParticle *, G4int, G4int)
G4double GetCaptureCrossSection (const G4DynamicParticle *, G4int)
G4double GetFissionCrossSection (const G4DynamicParticle *, G4int, G4int)
void SetVerboseLevel (G4int value)
G4int GetVerboseLevel ()

Static Public Member Functions

static G4HadronCrossSectionsInstance ()
static void SetCorrectInelasticNearZero (G4bool value)
static G4bool GetCorrectInelasticNearZero ()

Detailed Description

Definition at line 63 of file G4HadronCrossSections.hh.


Constructor & Destructor Documentation

G4HadronCrossSections::G4HadronCrossSections (  ) 

Definition at line 1217 of file G4HadronCrossSections.cc.

References G4Pow::GetInstance().

01218   : prevParticleDefinition(0), prevElement(0), prevZZ(0), prevAA(0), 
01219     prevKineticEnergy(DBL_MAX), lastEkx(0.), lastEkxPower(0.), verboseLevel(0)
01220 {
01221   siginelastic = sigelastic = 0.0;
01222   g4pow = G4Pow::GetInstance();
01223 }

G4HadronCrossSections::~G4HadronCrossSections (  ) 

Definition at line 1225 of file G4HadronCrossSections.cc.

01226 {}


Member Function Documentation

G4double G4HadronCrossSections::GetCaptureCrossSection ( const G4DynamicParticle ,
G4int   
)

Definition at line 1556 of file G4HadronCrossSections.cc.

References G4DynamicParticle::GetKineticEnergy().

Referenced by G4HadronCaptureDataSet::GetElementCrossSection().

01558 {
01559   if (GetParticleCode(aParticle) != 16) return 0.;
01560   G4double ek = aParticle->GetKineticEnergy()/GeV;
01561   if (ek > 0.0327)  { return 0.; }
01562 
01563   G4double ekx = std::max(ek, 1.e-9);
01564   if (ekx != lastEkx) {
01565     lastEkx = ekx;
01566     lastEkxPower = std::pow(ekx*1.e6, 0.577);
01567   }
01568 
01569   G4int izno = ZZ;
01570   if (izno > 100) izno = 100;      // Not in GHESIG
01571   izno = izno - 1;      // For array indexing
01572   G4double sigcap = 11.12*cscap[izno]/lastEkxPower;
01573 
01574   // Convert cross section from mb to default units
01575   sigcap = sigcap*millibarn;
01576   return sigcap;
01577 }

static G4bool G4HadronCrossSections::GetCorrectInelasticNearZero (  )  [inline, static]

Definition at line 89 of file G4HadronCrossSections.hh.

00090       {return correctInelasticNearZero;}

G4double G4HadronCrossSections::GetElasticCrossSection ( const G4DynamicParticle ,
G4int  ,
G4int   
)

Definition at line 1260 of file G4HadronCrossSections.cc.

References G4cout, G4endl, G4DynamicParticle::GetDefinition(), and G4DynamicParticle::GetKineticEnergy().

Referenced by G4HadronElasticDataSet::GetElementCrossSection().

01262 {
01263   if (particle->GetDefinition() != prevParticleDefinition ||
01264       particle->GetKineticEnergy() != prevKineticEnergy ||
01265       ZZ != prevZZ || AA != prevAA)
01266     { CalcScatteringCrossSections(particle, ZZ, AA); }
01267 
01268   if (verboseLevel > 1) {
01269     G4cout << "        x-section elastic(mb)= " 
01270            << sigelastic/millibarn << G4endl; 
01271   }
01272   return sigelastic;
01273 }

G4double G4HadronCrossSections::GetFissionCrossSection ( const G4DynamicParticle ,
G4int  ,
G4int   
)

Definition at line 1581 of file G4HadronCrossSections.cc.

References G4DynamicParticle::GetKineticEnergy(), NFISS, and G4Pow::Z13().

01583 {
01584   if (AA < 230) return 0;
01585 
01586   G4double ek = aParticle->GetKineticEnergy()/GeV;      
01587 
01588   G4int ie1 = 0;
01589   G4int ie2 = NFISS - 1;
01590   do {
01591     G4int midBin = (ie1 + ie2)/2;
01592     if (ek < ekfiss[midBin])
01593       ie2 = midBin;
01594     else
01595       ie1 = midBin;
01596   } while (ie2 - ie1 > 1); 
01597   G4int i = ie2;
01598   if (ek < ekfiss[0]) i = 0;
01599 
01600   G4int j = 4;
01601   if (ek <= 0.01) {
01602     if (ZZ == 92 && AA == 233) j = 1;
01603     else if (ZZ == 92 && AA == 235) j = 2;
01604     else if (ZZ == 94 && AA == 239) j = 3;
01605   }
01606 
01607   G4double z43ba;
01608   if (j == 4) {
01609     z43ba = ZZ*g4pow->Z13(ZZ)/G4double(AA);
01610     z43ba = std::max(-67. + 38.7*z43ba, 0.);
01611   } else {
01612     z43ba = 1.;
01613   }
01614   j = j - 1;      // For array indexing
01615 
01616   G4double sigfiss = csfiss[j][i]*z43ba;
01617   sigfiss = sigfiss*millibarn;
01618   return sigfiss;
01619 }

G4double G4HadronCrossSections::GetInelasticCrossSection ( const G4DynamicParticle ,
G4int  ,
G4int   
)

Definition at line 1243 of file G4HadronCrossSections.cc.

References G4cout, G4endl, G4DynamicParticle::GetDefinition(), and G4DynamicParticle::GetKineticEnergy().

Referenced by G4HadronInelasticDataSet::GetElementCrossSection().

01245 {
01246   if (particle->GetDefinition() != prevParticleDefinition ||
01247       particle->GetKineticEnergy() != prevKineticEnergy ||
01248       ZZ != prevZZ || AA != prevAA)
01249     { CalcScatteringCrossSections(particle, ZZ, AA); }
01250   if (verboseLevel > 1) {
01251     G4cout << "        x-section inelastic(mb)= " 
01252            << siginelastic/millibarn << G4endl; 
01253   }
01254 
01255   return siginelastic;
01256 }

G4int G4HadronCrossSections::GetVerboseLevel (  )  [inline]

Definition at line 94 of file G4HadronCrossSections.hh.

00094 {return verboseLevel;}

G4HadronCrossSections * G4HadronCrossSections::Instance (  )  [static]

Definition at line 1228 of file G4HadronCrossSections.cc.

Referenced by G4HadronCaptureDataSet::G4HadronCaptureDataSet(), G4HadronElasticDataSet::G4HadronElasticDataSet(), and G4HadronInelasticDataSet::G4HadronInelasticDataSet().

01229 {
01230   if (!theInstance) {
01231     static G4HadronCrossSections xsection;
01232     theInstance = &xsection;
01233   }
01234   return theInstance;
01235 }

G4bool G4HadronCrossSections::IsApplicable ( const G4DynamicParticle aParticle  ) 

Definition at line 1237 of file G4HadronCrossSections.cc.

Referenced by G4HadronInelasticDataSet::IsElementApplicable(), and G4HadronElasticDataSet::IsElementApplicable().

01238 {
01239   return (GetParticleCode(aParticle) > 0);
01240 }

static void G4HadronCrossSections::SetCorrectInelasticNearZero ( G4bool  value  )  [inline, static]

Definition at line 86 of file G4HadronCrossSections.hh.

00087       {correctInelasticNearZero = value;}

void G4HadronCrossSections::SetVerboseLevel ( G4int  value  )  [inline]

Definition at line 92 of file G4HadronCrossSections.hh.

00092 {verboseLevel = value;}


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:07 2013 for Geant4 by  doxygen 1.4.7