G4LENDFission.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 #include "G4LENDFission.hh"
00027 #include "G4SystemOfUnits.hh"
00028 #include "G4Nucleus.hh"
00029 #include "G4ParticleTable.hh"
00030   
00031 G4HadFinalState * G4LENDFission::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& aTarg )
00032 {
00033 
00034    G4double temp = aTrack.GetMaterial()->GetTemperature();
00035 
00036    //migrate to integer A and Z (GetN_asInt returns number of neutrons in the nucleus since this) 
00037    G4int iZ = aTarg.GetZ_asInt();
00038    G4int iA = aTarg.GetA_asInt();
00039 
00040    G4double ke = aTrack.GetKineticEnergy();
00041 
00042    G4HadFinalState* theResult = &theParticleChange;
00043    theResult->Clear();
00044 
00045    G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget();
00046    std::vector<G4GIDI_Product>* products = aTarget->getFissionFinalState( ke*MeV, temp, NULL, NULL );
00047    if ( products != NULL ) 
00048    {
00049       for ( G4int j = 0; j < int( products->size() ); j++ ) 
00050       {
00051          G4int jZ = (*products)[j].Z; 
00052          G4int jA = (*products)[j].A; 
00053 
00054          //G4cout << "Z = "    << (*products)[j].Z 
00055          //       << ", A = "  << (*products)[j].A 
00056          //       << ", EK = " << (*products)[j].kineticEnergy << " [MeV]" 
00057          //       << ", px = " << (*products)[j].px
00058          //       << ", py = " << (*products)[j].py
00059          //       << ", pz = " << (*products)[j].pz
00060          //       << G4endl;
00061 
00062          G4DynamicParticle* theSec = new G4DynamicParticle;
00063 
00064          if ( jZ > 0 )
00065          {
00066                                                                                         //Ex  j?
00067             theSec->SetDefinition( G4ParticleTable::GetParticleTable()->FindIon( jZ, jA , 0, 0 ) );
00068          } 
00069          else if ( jA == 1 && jZ == 0 )
00070          {
00071             theSec->SetDefinition( G4Neutron::Neutron() );
00072          } 
00073          else
00074          {
00075             theSec->SetDefinition( G4Gamma::Gamma() );
00076          } 
00077 
00078          theSec->SetMomentum( G4ThreeVector( (*products)[j].px*MeV , (*products)[j].py*MeV , (*products)[j].pz*MeV ) );
00079          //G4cout << theSec->GetDefinition()->GetParticleName() << G4endl;
00080          theResult->AddSecondary( theSec );
00081       } 
00082    }
00083    delete products;
00084 
00085    theResult->SetStatusChange( stopAndKill );
00086 
00087    return theResult; 
00088 
00089 }

Generated on Mon May 27 17:48:45 2013 for Geant4 by  doxygen 1.4.7