Problem 967 - delayed neutrons in G4NeutronHPFission have wrong times
Summary: delayed neutrons in G4NeutronHPFission have wrong times
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/neutron_hp (show other problems)
Version: 9.0
Hardware: PC Linux
: P1 major
Assignee: tkoi
URL:
Depends on:
Blocks:
 
Reported: 2007-09-03 15:42 CEST by Makarov Victor
Modified: 2007-09-08 01:23 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Makarov Victor 2007-09-03 15:42:29 CEST
It seems to be that delayed neutrons created by G4NeutronHPFission have wrong times during tracking (times like promt ones, actually). I examined G4NeutronHPFissionFS. Lines
G4double time = -std::log(G4UniformRand())/theDecayConstants[i0-Prompt];
time += theTrack.GetGlobalTime(); (!)
seem to calculate delayed neutrons' time correct if I print out time variable.
But when I do /tracking/verbose 2, I see that tracks of delayed neutrons begin at GlobalTime which was used in formulae (!), so that
-std::log(G4UniformRand())/theDecayConstants[i0-Prompt] part of sum has not been taken into account.
Comment 1 Makarov Victor 2007-09-06 08:18:43 CEST
I added some lines to print out time variables in G4NeutronHPFissionFS: 

G4double time = -std::log(G4UniformRand())/theDecayConstants[i0-Prompt]; 

G4double gtime = 0.0; 

gtime = theTrack.GetGlobalTime(); 

G4cout << "global time2 "<<gtime<<G4endl; 

time += theTrack.GetGlobalTime(); 

G4cout << "sum time2 "<<time<<G4endl; 

Here's the extract of tracking verbose one one of delayed neutrons' creation: 


*********************************************************************************************************
* G4Track Information:   Particle = neutron,   Track ID = 34703,   Parent ID = 34211
*********************************************************************************************************



Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume        Time     Process
    2   4.62 cm  -2.79 cm   2.96 m    1.21 MeV     0 eV      0 fm   1.54 cm         U235       187 ns     initStep
global time2 187.34243
sum time2 2.2556391e+09
Number of secondaries = 1
Number of photons = 0
Number of Prompt = 0
Number of delayed = 1
    3   3.77 cm  -2.25 cm   2.97 m       0 eV      0 eV   1.27 cm   2.82 cm         U235       187 ns   HadronFission
    :----- List of 2ndaries - #SpawnInStep=  1(Rest= 0,Along= 0,Post= 1), #SpawnTotal=  1 ---------------
    :   3.77 cm  -2.25 cm   2.97 m     417 keV   neutron
    :----------------------------------------------------------------- EndOf2ndaries Info ---------------


*********************************************************************************************************
* G4Track Information:   Particle = neutron,   Track ID = 34966,   Parent ID = 34703
*********************************************************************************************************



Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng    Volume        Time     Process
    0   3.77 cm  -2.25 cm   2.97 m     417 keV     0 eV      0 fm      0 fm         U235       187 ns     initStep
    1   4.96 cm  -2.69 cm   2.97 m     414 keV     0 eV   1.27 cm   1.27 cm         U235       189 ns     hElastic
    :----- List of 2ndaries - #SpawnInStep=  1(Rest= 0,Along= 0,Post= 1), #SpawnTotal=  1 ---------------
    :   4.96 cm  -2.69 cm   2.97 m    3.28 keV U235[0.0]

As we can see, the delay part of time is about 2.25 second - typical time of neutrons' delay from fission. But new track still begins at time point of fission proccess. 
Comment 2 tkoi 2007-09-08 01:23:30 CEST
Thank you for detailed invitation.
The bug is identified and will be fixed.
It is not in not in NeutronHPs but in G4HadronicProcess.
The fix will be included coming release, if you need correction sooner then please edit 664th line of G4Hadronic Process as following
G4HadronicProcess.cc
663     G4Track* track = new G4Track(aR->GetSecondary(i)->GetParticle(),
664     aT.GetGlobalTime(),
665     aT.GetPosition());

to
663     G4Track* track = new G4Track(aR->GetSecondary(i)->GetParticle(),
664     time,
665     aT.GetPosition());

Thanks again

Tatsumi