I first found this in my code so decided to check in the LXe extended example. Inserting in LXeTrackingAction::PreUserTrackingAction the line if (aTrack->GetUserInformation()) G4cout << aTrack->GetTrackID() << G4endl; and running with the cerenkov.mac macro, you will see the track id being written. However if the option SetTrackSecondariesFirst is set to false in the LXe.cc : opticalParams->SetCerenkovTrackSecondariesFirst(false); the above output will go silent. Given that in this specific example (as I am doing in my code) a new object of the UserTrackInformation class is created for each call to PreUserTrackingAction, this results in a potential memory leak, because (I think...) only the last created UserTrackInformation object is deleted when the associated G4Track object is destroyed. In fact I could check that the memory consumption was increasing in the case with SetTrackSecondariesFirts true. Bernardo Tomé
Shogo, please investigate this.
*** This problem has been marked as a duplicate of problem 2425 ***