Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (13 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/de_excitation/fission/include/G4ParaFissionModel.hh

    r819 r1347  
    2525//
    2626#ifndef G4ParaFissionModel_h
    27 #define G4ParaFissionModel_h
     27#define G4ParaFissionModel_h 1
    2828
    2929#include "G4CompetitiveFission.hh"
     
    4949    SetMaxEnergy( 60.*MeV );
    5050  }
     51
     52  ~G4ParaFissionModel() {};
    5153 
    5254  virtual G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
    53                                               G4Nucleus& theNucleus)
     55                                        G4Nucleus& theNucleus)
    5456  {
    5557    theParticleChange.Clear();
     
    5961    // prepare the fragment
    6062
    61     G4Fragment anInitialState;
    62     G4double anA = theNucleus.GetN();
    63     G4double aZ = theNucleus.GetZ();
    64     G4double nucMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4int(aZ) ,G4int(anA));
    65      
    66     anA += aTrack.GetDefinition()->GetBaryonNumber();
    67     aZ += aTrack.GetDefinition()->GetPDGCharge();
     63    G4int A = theNucleus.GetA_asInt();
     64    G4int Z = theNucleus.GetZ_asInt();
     65    G4double nucMass =
     66      G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A);
    6867     
    6968    G4int numberOfEx = aTrack.GetDefinition()->GetBaryonNumber();
    70     G4int numberOfCh = G4int(std::abs(aTrack.GetDefinition()->GetPDGCharge()));
     69    G4int numberOfCh = G4int(aTrack.GetDefinition()->GetPDGCharge() + 0.5);
    7170    G4int numberOfHoles = 0;
     71
     72    A += numberOfEx;
     73    Z += numberOfCh;
    7274     
    73     G4ThreeVector exciton3Momentum = aTrack.Get4Momentum().vect();
    74     G4double compoundMass = aTrack.GetTotalEnergy();
    75     compoundMass += nucMass;
    76     compoundMass = std::sqrt(compoundMass*compoundMass - exciton3Momentum*exciton3Momentum);
    77     G4LorentzVector fragment4Momentum(exciton3Momentum,
    78                                std::sqrt(exciton3Momentum.mag2()+compoundMass*compoundMass));
    79    
    80     anInitialState.SetA(anA);
    81     anInitialState.SetZ(aZ);
    82     anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
    83     anInitialState.SetNumberOfCharged(numberOfCh);
    84     anInitialState.SetNumberOfHoles(numberOfHoles);
    85     anInitialState.SetMomentum(fragment4Momentum);
     75    G4LorentzVector v = aTrack.Get4Momentum() + G4LorentzVector(0.0,0.0,0.0,nucMass);
     76    G4Fragment anInitialState(Z,A,v);
     77    anInitialState.SetNumberOfExcitedParticle(numberOfEx,numberOfCh);
     78    anInitialState.SetNumberOfHoles(0,0);
    8679
    8780    // do the fission
     
    10396        {
    10497          G4ReactionProduct* rp0 = (*theExcitationResult)[j];
    105           G4DynamicParticle* p0 = new G4DynamicParticle;
    106           p0->SetDefinition(rp0->GetDefinition() );
    107           p0->SetMomentum(rp0->GetMomentum() );
     98          G4DynamicParticle* p0 =
     99            new G4DynamicParticle(rp0->GetDefinition(),rp0->GetMomentum());
    108100          theParticleChange.AddSecondary(p0);
    109101          delete rp0;
     
    114106      {
    115107        // add secondary
    116         G4DynamicParticle* p0 = new G4DynamicParticle;
    117         p0->SetDefinition(aFragment->GetParticleDefinition());
    118         p0->SetMomentum(aFragment->GetMomentum().vect());
     108        G4DynamicParticle* p0 =
     109          new G4DynamicParticle(aFragment->GetParticleDefinition(),
     110                                aFragment->GetMomentum());
    119111        theParticleChange.AddSecondary(p0);
    120112      }
Note: See TracChangeset for help on using the changeset viewer.