Andreas Morsch (ALICE) reported on 5 August 2017: It seems we found a problem with G4NystromRK4 when trying to reconstruct "kinks" from Kaon decays (K-> mu nu) in our TPC. In many cases the transport follows the direction of the muon, but with the momentum of the mother particle. Here some more information provided by our tracking expert Ruben Shahoyan: The reason kink problem in G4 (which as was shown above is caused by the strongly overestimated total momentum of the daughter) is that in the geant the secondary track is transported with direction vector of the correct MC particle but the total momentum of some particle tracked before (which mostly happens to be the mother particle). In the G4ChordFinder::AdvanceChordLimited the FindNextChord tries to do the fast propagation (via fIntgrDriver->QuickAdvance) and estimates its error. If the error is above the threshold then it calls AccurateAdvance, otherwhise it assumes that the step is done. The problem is that the actual step in the FindNextChord is done in the G4NystromRK4::Stepper method which uses precalculated inverse momentum of the track (m_imom) the m_imom is precalculated only as the result of the AccurateAdvance call (in the G4NystromRK4::ComputeRightHandSide method). For the secondaries where we see the problem the inverse momentum was not recalculated (because the error from the fast propagation is deemed to be smaller than the threshold), hence the cached inverse momentum of previously tracked particle is used. Could you please have a look and confirm that the logic is as described. Thanks Best regards Andreas
Analysing with Dmitry Sorokin. We believe that the issue is a real bug. Looking for good solution (with small overhead.)
Created candidate patch for G4NystromRK4, which add extra calculacation of the momentum magnitude and field call in order to ensure that values are always correct. May have a performance impact for G4NystromRK4 - but does not affect any other steppers. Development tag field-V10-03-10 (it also make G4NystromRK4 the default for magnetic fields, enabling its full testing.)
Tag has been accepted. Revised code should appear in next development tag.
Created attachment 468 [details] Revised code for Nystrom, correcting momentum and field value Current fix for this problem. ( May slow down integration. A faster fix is under construction. )