G4LENDCapture Class Reference

#include <G4LENDCapture.hh>

Inheritance diagram for G4LENDCapture:

G4LENDModel G4HadronicInteraction

Public Member Functions

 G4LENDCapture (G4ParticleDefinition *pd)
 ~G4LENDCapture ()
G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)

Detailed Description

Definition at line 44 of file G4LENDCapture.hh.


Constructor & Destructor Documentation

G4LENDCapture::G4LENDCapture ( G4ParticleDefinition pd  )  [inline]

Definition at line 49 of file G4LENDCapture.hh.

References G4LENDModel::create_used_target_map(), and G4LENDModel::proj.

00050      :G4LENDModel( "LENDCapture" ) 
00051      { 
00052         proj = pd; 
00053        
00054 //        theModelName = "LENDCapture for "; 
00055 //        theModelName += proj->GetParticleName(); 
00056         create_used_target_map();
00057      };

G4LENDCapture::~G4LENDCapture (  )  [inline]

Definition at line 59 of file G4LENDCapture.hh.

00059 {;};


Member Function Documentation

G4HadFinalState * G4LENDCapture::ApplyYourself ( const G4HadProjectile aTrack,
G4Nucleus aTargetNucleus 
) [virtual]

Reimplemented from G4LENDModel.

Definition at line 32 of file G4LENDCapture.cc.

References G4HadFinalState::AddSecondary(), G4HadFinalState::Clear(), G4Gamma::Gamma(), G4Nucleus::GetA_asInt(), G4GIDI_target::getCaptureFinalState(), G4HadProjectile::GetKineticEnergy(), G4HadProjectile::GetMaterial(), G4LENDManager::GetNucleusEncoding(), G4ParticleTable::GetParticleTable(), G4Material::GetTemperature(), G4Nucleus::GetZ_asInt(), G4LENDModel::lend_manager, G4Neutron::Neutron(), G4Proton::Proton(), G4DynamicParticle::SetDefinition(), G4DynamicParticle::SetMomentum(), G4HadFinalState::SetStatusChange(), stopAndKill, G4HadronicInteraction::theParticleChange, and G4LENDModel::usedTarget_map.

00033 {
00034 
00035    G4double temp = aTrack.GetMaterial()->GetTemperature();
00036 
00037    //G4int iZ = int ( aTarg.GetZ() );
00038    //G4int iA = int ( aTarg.GetN() );
00039    //migrate to integer A and Z (GetN_asInt returns number of neutrons in the nucleus since this) 
00040    G4int iZ = aTarg.GetZ_asInt();
00041    G4int iA = aTarg.GetA_asInt();
00042 
00043    G4double ke = aTrack.GetKineticEnergy();
00044 
00045    G4HadFinalState* theResult = &theParticleChange;
00046    theResult->Clear();
00047 
00048    G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget();
00049    std::vector<G4GIDI_Product>* products = aTarget->getCaptureFinalState( ke*MeV, temp, NULL, NULL );
00050 
00051 
00052    if ( products != NULL ) 
00053    {
00054 
00055       G4ThreeVector p(0,0,0);
00056       G4int totN = 0;
00057 
00058       for ( G4int j = 0; j < int( products->size() ); j++ ) 
00059       {
00060          G4int jZ = (*products)[j].Z; 
00061          G4int jA = (*products)[j].A; 
00062 
00063          //G4cout << "ZA = " << 1000 * (*products)[j].Z + (*products)[j].A << "  EK = "
00064          //     << (*products)[j].kineticEnergy
00065          //     << " px  " <<  (*products)[j].px
00066          //     << " py  " <<  (*products)[j].py
00067          //     << " pz  " <<  (*products)[j].pz
00068          //     << G4endl;
00069 
00070          G4ThreeVector dp((*products)[j].px,(*products)[j].py,(*products)[j].pz);
00071          p += dp;
00072           
00073          G4DynamicParticle* theSec = new G4DynamicParticle;
00074 
00075          if ( jA == 1 && jZ == 1 )
00076          {
00077             theSec->SetDefinition( G4Proton::Proton() );
00078             totN += 1;
00079          }
00080          else if ( jA == 1 && jZ == 0 )
00081          {
00082             theSec->SetDefinition( G4Neutron::Neutron() );
00083             totN += 1;
00084          } 
00085          else if ( jZ > 0 )
00086          {
00087             if ( jA != 0 )
00088             {
00089                theSec->SetDefinition( G4ParticleTable::GetParticleTable()->FindIon( jZ , jA , 0 , 0 ) );
00090                totN += jA;
00091             }
00092             else 
00093             {
00094                theSec->SetDefinition( G4ParticleTable::GetParticleTable()->FindIon( jZ , iA+1-totN , 0 , 0 ) );
00095             }
00096          } 
00097          else
00098          {
00099             theSec->SetDefinition( G4Gamma::Gamma() );
00100          } 
00101 
00102          theSec->SetMomentum( G4ThreeVector( (*products)[j].px*MeV , (*products)[j].py*MeV , (*products)[j].pz*MeV ) );
00103 
00104          if ( dp.mag() == 0 ) 
00105          {
00106             theSec->SetMomentum( -p*MeV ); 
00107          }
00108 
00109          theResult->AddSecondary( theSec );
00110       } 
00111    }
00112    delete products;
00113 
00114    theResult->SetStatusChange( stopAndKill );
00115 
00116    return theResult; 
00117 
00118 }


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