G4BENeutronChannel Class Reference

#include <G4BENeutronChannel.hh>

Inheritance diagram for G4BENeutronChannel:

G4BertiniEvaporationChannel

Public Member Functions

 G4BENeutronChannel ()
virtual ~G4BENeutronChannel ()
virtual void calculateProbability ()
G4DynamicParticleemit ()
G4double sampleKineticEnergy ()

Detailed Description

Definition at line 37 of file G4BENeutronChannel.hh.


Constructor & Destructor Documentation

G4BENeutronChannel::G4BENeutronChannel (  ) 

Definition at line 47 of file G4BENeutronChannel.cc.

References G4BertiniEvaporationChannel::name, G4BertiniEvaporationChannel::particleA, G4BertiniEvaporationChannel::particleZ, G4BertiniEvaporationChannel::rho, and G4BertiniEvaporationChannel::verboseLevel.

00048 {
00049   name         = "neutron";
00050   particleA    = 1;
00051   particleZ    = 0;
00052   verboseLevel = 0;
00053   rho          = 0;
00054 }

G4BENeutronChannel::~G4BENeutronChannel (  )  [virtual]

Definition at line 57 of file G4BENeutronChannel.cc.

00058 {
00059 }


Member Function Documentation

void G4BENeutronChannel::calculateProbability (  )  [virtual]

Implements G4BertiniEvaporationChannel.

Definition at line 62 of file G4BENeutronChannel.cc.

References G4BertiniEvaporationChannel::correction, G4BertiniEvaporationChannel::emissionProbability, G4BertiniEvaporationChannel::excitationEnergy, G4cout, G4endl, G4BertiniEvaporationChannel::getLevelDensityParameter(), G4BertiniEvaporationChannel::getThresh(), G4BertiniEvaporationChannel::nucleusA, G4BertiniEvaporationChannel::nucleusZ, G4BertiniEvaporationChannel::particleA, G4BertiniEvaporationChannel::particleZ, and G4BertiniEvaporationChannel::verboseLevel.

00063 {
00064   const G4int residualZ = nucleusZ - particleZ;
00065   const G4int residualA = nucleusA - particleA;
00066 
00067   if ( nucleusA  <  2.0 * particleA ||  
00068        nucleusZ  <  2.0 * particleZ ||  
00069        residualA <= residualZ       ||  
00070        excitationEnergy - getThresh() - correction < 0 )
00071     {
00072       if ( verboseLevel >= 6 )
00073         G4cout << "G4BENeutronChannel : calculateProbability = 0 " << G4endl;
00074       emissionProbability = 0;
00075       return;
00076     }
00077 
00078   // In HETC88 s-s0 was used in std::exp( s ), in which s0 was either 50 or
00079   // max(s_i), where i goes over all channels.
00080 
00081   const G4double levelParam = getLevelDensityParameter();
00082   
00083   const G4double slevel = 2 * std::sqrt( levelParam  * ( excitationEnergy - getThresh() - correction ) );
00084   const G4double eye0 = std::exp( slevel ) * ( slevel - 1 ) /  ( 2 * levelParam );
00085   const G4double eye1 = ( slevel*slevel - 3*slevel +3 ) * std::exp( slevel ) / ( 4 * levelParam*levelParam ) ;
00086   
00087   emissionProbability = std::pow( G4double(residualA), 0.666666 ) * alpha() * ( eye1 + beta() * eye0 );
00088   
00089   if ( verboseLevel >= 6 )
00090     G4cout << "G4BENeutronChannel : calculateProbability " << G4endl
00091            << "                    res A = " << residualA << G4endl 
00092            << "                    res Z = " << residualZ << G4endl 
00093            << "                    alpha = " << alpha() << G4endl 
00094            << "                     beta = " << beta() << G4endl
00095            << "                        E = " << excitationEnergy << G4endl
00096            << "               correction = " << correction << G4endl
00097            << "                     eye1 = " << eye1 << G4endl
00098            << "                     eye0 = " <<  eye0 << G4endl
00099            << "               levelParam = " << levelParam << G4endl
00100            << "                   thresh = " << getThresh() << G4endl
00101            << "                        s = " << s << G4endl
00102            << "              probability = " << emissionProbability << G4endl;
00103 
00104   return;
00105 }

G4DynamicParticle * G4BENeutronChannel::emit (  )  [virtual]

Implements G4BertiniEvaporationChannel.

Definition at line 150 of file G4BENeutronChannel.cc.

References G4BertiniEvaporationChannel::isotropicCosines(), G4Neutron::Neutron(), and sampleKineticEnergy().

00151 {
00152   G4double u;
00153   G4double v;
00154   G4double w;
00155   G4DynamicParticle * pParticle = new G4DynamicParticle;
00156 
00157   pParticle -> SetDefinition( G4Neutron::Neutron() );
00158   pParticle -> SetKineticEnergy( sampleKineticEnergy() ); 
00159   isotropicCosines( u, v, w );
00160   pParticle -> SetMomentumDirection( u , v , w );  
00161 
00162   return pParticle;
00163 }

G4double G4BENeutronChannel::sampleKineticEnergy (  ) 

Definition at line 108 of file G4BENeutronChannel.cc.

References G4BertiniEvaporationChannel::correction, G4BertiniEvaporationChannel::excitationEnergy, G4cout, G4endl, G4UniformRand, G4BertiniEvaporationChannel::getLevelDensityParameter(), G4BertiniEvaporationChannel::getThresh(), and G4BertiniEvaporationChannel::verboseLevel.

Referenced by emit().

00109 {
00111   // A random number is sampled from the density function
00112   // P(x) = x * std::exp ( 2 std::sqrt ( a ( xMax - x ) ) )  [not normalized],
00113   // x belongs to [ 0, xMax ]
00114   // with the 'Hit or Miss' -method
00115   // Kinetic energy is this energy scaled properly
00116   
00117   G4double levelParam;
00118   levelParam = getLevelDensityParameter();
00119   
00120   const G4double xMax  = excitationEnergy - getThresh() - correction + beta(); // maximum number
00121   const G4double xProb = ( - 1 + std::sqrt ( 1 + 4 * levelParam * xMax ) ) / ( 2 * levelParam ); // most probable value
00122   const G4double maxProb = xProb * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - xProb ) ) ); // maximum value of P(x)
00123 
00124   // Sample x according to density function P(x) with rejection method
00125   G4double r1;
00126   G4double r2;
00127   G4int koe=0;
00128   do
00129     {
00130       r1 = beta() + G4UniformRand() * ( xMax - beta() );
00131       r2 = G4UniformRand() * maxProb;
00132       koe++;
00133     }
00134   while (  r1 * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - r1 ) ) )  < r2 );
00135 
00136 //  G4cout <<  koe << G4endl;
00137   G4double kineticEnergy = r1 - beta();
00138 
00139   if ( verboseLevel >= 10 )
00140     G4cout << " G4BENeutronChannel : sampleKineticEnergy() " << G4endl
00141            << "       kinetic n e = " << kineticEnergy << G4endl
00142            << "        levelParam = " << levelParam << G4endl
00143            << "             thresh= " << getThresh() << G4endl
00144            << "               beta= " << beta() << G4endl;
00145 
00146   return kineticEnergy;
00147 }


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