You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* ignore TVirtualMC::StopTrack()
due to different RNG (settings) during the reference and replay run,
tracks might be stopped during hit production making the replay
slightly inconsistent (this is analugous to swallowing all secondaries
produced during hit production which is done as well)
* print number of skipped and kept steps at the end of a replay
* change energy cut to an energy PRODUCTION cut. The previous
implementation - killing a track at a certain point of its lifetime -
was inconsistent as in that case ALL secondaries were killed (also
those produced BEFORE the track was killed)
* the previous point needs a revision since it is desirable to
consistently remove tracks at any point during their lifetime.
// we need to make sure we follow the indexing of the user stack. During the original simulation, there might have been more tracks pushed than transported. In the replay case, we only have the tracks that have been originally transported. Hence, the indexing this time might be different.
// some caching to be able to run pre- and post-hooks at the right time
912
914
int currentTrackId = -1;
913
915
// some caching to be able to update the TGeoManager state
914
916
int previousVolId = -1;
915
917
int previousCopyNo = -1;
916
-
// we need to make sure we follow the indexing of the user stack. During the original simulation, there might have been more tracks pushed than transported. In the replay case, we only have the tracks that have been originally transported. Hence, the indexing this time might be different.
// We can only do it now after the current volume and hence medium have been found including the loading of current cuts and processes
973
-
skipTrack[step.trackID] = true;
974
-
continue;
975
-
}
976
-
977
978
// NOW PERFORM EVERYTHIN NECESSARY TO START / FINISH A TRACK
978
979
980
+
if (currentTrackId == step.trackID && mIsTrackStopped) {
981
+
// as the warning says, it should not happen but could (e.g. due to double vs. float precision)
982
+
// but mainly due to the fact that the RNG (TRandom) in the reference run and in this replay do not have the same seeding
983
+
::Warning("MCReplayEngine::ProcessEvent", "Track %d was stopped (PDG %d). That should usually not happen", userTrackId[step.trackID], mCurrentLookups->tracktopdg[step.trackID]);
984
+
mIsTrackStopped = false;
985
+
}
986
+
979
987
if (currentTrackId != step.trackID) {
980
988
// Found a new track
989
+
981
990
auto prim = isPrimary(step.trackID);
991
+
982
992
if (currentTrackId > -1) {
983
993
// only invoke if there has been at least 1 track before
0 commit comments