| Summary: | Decay channel prepared incorrectly in G4DecayWithSpin | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Aaron Fienberg <atfienberg> |
| Component: | processes/decay | Assignee: | gum |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | krlynch, kurasige, resnegfk |
| Priority: | P5 | ||
| Version: | 10.1 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Aaron Fienberg
2015-09-18 20:59:29 CEST
Based on my tests I can confirm that for the in flight decays, the parent polarization set by the transportation at the decay point is different from the polarization passed to the decay channel by G4DecayWithSpin Thanks for reporting this problem/bug. To avoid the resampling of the decay channel in G4Decay::DecayIt perhaps the needed/relevant code in that method has to be copied into G4DecayWithSpin::DecayIt and no call to G4Decay::DecayIt be made. Or invent some other mechanism to avoid the resampling. What I don't understand is that fRemainderLifeTime is not zero for decays-in-flight. I welcome help in addressing this report. Peter In the interest of avoiding code duplication, one possible solution to the decay table resampling would be setting the parent polarization for all channels, using the G4DecayTable::entries() method and operator[] to iterate through. For decays-in-flight, fRemainderLifeTime is set during G4Decay::PostStepGetPhysicalInteractionLength, line 392, to be theNumberOfInteractionLengthsLeft*PDGLifeTime. In the step where the particle decays, G4Decay::PostStepDoIt is called, which does nothing but call G4DecayWithSpin::DecayIt. So, when DecayIt is called, fRemainderLifeTime will be equal to that final step length * lifetime / currentinteractionlength, which is nonzero. Keep in mind that the spin should already have been rotated according to that final step length by the transportation process. I made a very simple simulation to demonstrate this. You can find it here: https://github.com/atfienberg/decayWithSpinBug If you look in debuggingOutput.txt, I ran this simulation in debugging mode with a breakpoint in G4DecayWithSpin::DecayIt to directly check the value of fRemainderLifeTime. Thank you for looking in to this, Aaron Thanks Aaron, Not sampling the decay channel in G4DecayWithSpin and setting the polarization for all decay channels is a good idea! Hisaya Kurashige thinks the issue with fRemainderLifeTime is caused by a bug in G4ParticleChangeForDecay. (G4ParticleChangeForDecay.cc#L146). The polarization should be updated in UpdateStepForPostStep() same as UpdateStepForAtRest. Can you please try track-V10-01-09 tag? (but I don't see the connection...) Something changed. Why did I claim (and presumably verified in 2009) that fRemainderLifeTime is zero for decays in flight while you find that it is now one step behind. Peter I've created a new tag of decay-V10-01-04 which require particles-V10-01-11 and track-V10-01-10. In these tag, G4DecayWithSpin have both PostStepDoIt and AtRestDoIt. In AtRestDoIt, the spin of parent particle is updated by using Spin_Precession method and then is passed to 'all' decay channel in the decay table. Then the parent particle decays by using G4Decay::DecayIt method. In PostStepDoIt, the spin of parent particle is not updated. Set/GetPolarization methods are moved to G4VDecayChannel. In G4DecayWithSpin, polarization information is passed all decay channels in the decay tabale. These changes resolve the bug report - to be confirmed by muon g-2 |