diff --git a/include/AdePT/core/AdePTScoringTemplate.cuh b/include/AdePT/core/AdePTScoringTemplate.cuh index ba1c01dd..29c51067 100644 --- a/include/AdePT/core/AdePTScoringTemplate.cuh +++ b/include/AdePT/core/AdePTScoringTemplate.cuh @@ -23,8 +23,8 @@ __device__ void RecordHit(Scoring *scoring_dev, uint64_t aTrackID, uint64_t aPar vecgeom::Vector3D const &aPreMomentumDirection, double aPreEKin, vecgeom::NavigationState const &aPostState, vecgeom::Vector3D const &aPostPosition, vecgeom::Vector3D const &aPostMomentumDirection, double aPostEKin, - double aGlobalTime, double aLocalTime, unsigned int eventId, short threadId, bool isLastStep, - unsigned short stepCounter); + double aGlobalTime, double aLocalTime, double aPreGlobalTime, unsigned int eventId, + short threadId, bool isLastStep, unsigned short stepCounter); template __device__ void AccountProduced(Scoring *scoring_dev, int num_ele, int num_pos, int num_gam); diff --git a/include/AdePT/core/HostScoringImpl.cuh b/include/AdePT/core/HostScoringImpl.cuh index d056d33c..f3507c59 100644 --- a/include/AdePT/core/HostScoringImpl.cuh +++ b/include/AdePT/core/HostScoringImpl.cuh @@ -155,8 +155,8 @@ __device__ void RecordHit(HostScoring *hostScoring_dev, uint64_t aTrackID, uint6 vecgeom::Vector3D const &aPreMomentumDirection, double aPreEKin, vecgeom::NavigationState const &aPostState, vecgeom::Vector3D const &aPostPosition, vecgeom::Vector3D const &aPostMomentumDirection, double aPostEKin, - double aGlobalTime, double aLocalTime, unsigned int eventID, short threadID, bool isLastStep, - unsigned short stepCounter) + double aGlobalTime, double aLocalTime, double aPreGlobalTime, unsigned int eventID, + short threadID, bool isLastStep, unsigned short stepCounter) { // Acquire a hit slot GPUHit &aGPUHit = *GetNextFreeHit(hostScoring_dev); @@ -164,7 +164,7 @@ __device__ void RecordHit(HostScoring *hostScoring_dev, uint64_t aTrackID, uint6 // Fill the required data FillHit(aGPUHit, aTrackID, aParentID, stepLimProcessId, aParticleType, aStepLength, aTotalEnergyDeposit, aTrackWeight, aPreState, aPrePosition, aPreMomentumDirection, aPreEKin, aPostState, aPostPosition, aPostMomentumDirection, - aPostEKin, aGlobalTime, aLocalTime, eventID, threadID, isLastStep, stepCounter); + aPostEKin, aGlobalTime, aLocalTime, aPreGlobalTime, eventID, threadID, isLastStep, stepCounter); } /// @brief Account for the number of produced secondaries diff --git a/include/AdePT/core/PerEventScoringImpl.cuh b/include/AdePT/core/PerEventScoringImpl.cuh index e4fe7216..62134a9f 100644 --- a/include/AdePT/core/PerEventScoringImpl.cuh +++ b/include/AdePT/core/PerEventScoringImpl.cuh @@ -706,8 +706,8 @@ __device__ void RecordHit(AsyncAdePT::PerEventScoring * /*scoring*/, uint64_t aT vecgeom::Vector3D const &aPreMomentumDirection, double aPreEKin, vecgeom::NavigationState const &aPostState, vecgeom::Vector3D const &aPostPosition, vecgeom::Vector3D const &aPostMomentumDirection, double aPostEKin, - double aGlobalTime, double aLocalTime, unsigned int eventID, short threadID, bool isLastStep, - unsigned short stepCounter) + double aGlobalTime, double aLocalTime, double aPreGlobalTime, unsigned int eventID, + short threadID, bool isLastStep, unsigned short stepCounter) { // Acquire a hit slot GPUHit &aGPUHit = AsyncAdePT::gHitScoringBuffer_dev.GetNextSlot(threadID); @@ -715,7 +715,7 @@ __device__ void RecordHit(AsyncAdePT::PerEventScoring * /*scoring*/, uint64_t aT // Fill the required data FillHit(aGPUHit, aTrackID, aParentID, stepLimProcessId, aParticleType, aStepLength, aTotalEnergyDeposit, aTrackWeight, aPreState, aPrePosition, aPreMomentumDirection, aPreEKin, aPostState, aPostPosition, aPostMomentumDirection, - aPostEKin, aGlobalTime, aLocalTime, eventID, threadID, isLastStep, stepCounter); + aPostEKin, aGlobalTime, aLocalTime, aPreGlobalTime, eventID, threadID, isLastStep, stepCounter); } /// @brief Account for the number of produced secondaries diff --git a/include/AdePT/core/ScoringCommons.hh b/include/AdePT/core/ScoringCommons.hh index 7c3bf041..cbe93a48 100644 --- a/include/AdePT/core/ScoringCommons.hh +++ b/include/AdePT/core/ScoringCommons.hh @@ -27,6 +27,7 @@ struct GPUHit { // double fNonIonizingEnergyDeposit{0}; double fGlobalTime{0.}; double fLocalTime{0.}; + double fPreGlobalTime{0.}; float fTrackWeight{1}; uint64_t fTrackID{0}; // Track ID uint64_t fParentID{0}; // parent Track ID @@ -76,7 +77,7 @@ __device__ __forceinline__ void FillHit( vecgeom::Vector3D const &aPrePosition, vecgeom::Vector3D const &aPreMomentumDirection, double aPreEKin, vecgeom::NavigationState const &aPostState, vecgeom::Vector3D const &aPostPosition, vecgeom::Vector3D const &aPostMomentumDirection, double aPostEKin, double aGlobalTime, double aLocalTime, - unsigned int eventID, short threadID, bool isLastStep, unsigned short stepCounter) + double aPreGlobalTime, unsigned int eventID, short threadID, bool isLastStep, unsigned short stepCounter) { aGPUHit.fEventId = eventID; aGPUHit.threadId = threadID; @@ -93,6 +94,7 @@ __device__ __forceinline__ void FillHit( aGPUHit.fTrackWeight = aTrackWeight; aGPUHit.fGlobalTime = aGlobalTime; aGPUHit.fLocalTime = aLocalTime; + aGPUHit.fPreGlobalTime = aPreGlobalTime; // Pre step point aGPUHit.fPreStepPoint.fNavigationState = aPreState; Copy3DVector(aPrePosition, aGPUHit.fPreStepPoint.fPosition); diff --git a/include/AdePT/core/Track.cuh b/include/AdePT/core/Track.cuh index f8acb320..2975e7fc 100644 --- a/include/AdePT/core/Track.cuh +++ b/include/AdePT/core/Track.cuh @@ -52,6 +52,7 @@ struct Track { vecgeom::Vector3D preStepPos; vecgeom::Vector3D preStepDir; double preStepEKin{0}; + double preStepGlobalTime{0.}; // Variables used to store navigation results double geometryStepLength{0}; double safeLength{0}; diff --git a/include/AdePT/kernels/electrons.cuh b/include/AdePT/kernels/electrons.cuh index 32d8cec1..f255daea 100644 --- a/include/AdePT/kernels/electrons.cuh +++ b/include/AdePT/kernels/electrons.cuh @@ -143,9 +143,10 @@ static __device__ __forceinline__ void TransportElectrons(adept::TrackManager preStepPos(pos); auto dir = currentTrack.dir; vecgeom::Vector3D preStepDir(dir); - double globalTime = currentTrack.globalTime; - double localTime = currentTrack.localTime; - double properTime = currentTrack.properTime; + double globalTime = currentTrack.globalTime; + double preStepGlobalTime = currentTrack.globalTime; + double localTime = currentTrack.localTime; + double properTime = currentTrack.properTime; vecgeom::NavigationState nextState; currentTrack.stepCounter++; @@ -619,25 +620,27 @@ static __device__ __forceinline__ void TransportElectrons(adept::TrackManager= maxSteps || currentTrack.zeroStepCounter > kStepsStuckKill) { @@ -530,6 +531,7 @@ __global__ void ElectronSetupInteractions(Track *electrons, Track *leaks, G4HepE currentTrack.eKin, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // eventID and threadID isLastStep, // whether this was the last step currentTrack.stepCounter); // stepcounter @@ -650,6 +652,7 @@ __global__ void ElectronRelocation(Track *electrons, Track *leaks, G4HepEmElectr currentTrack.eKin, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // eventID and threadID isLastStep, // whether this was the last step currentTrack.stepCounter); // stepcounter @@ -730,6 +733,7 @@ __device__ __forceinline__ void PerformStoppedAnnihilation(const int slot, Track gamma1.eKin, // Post-step point kinetic energy gamma1.globalTime, // global time 0., // local time + gamma1.globalTime, // preStep global time for initializing step gamma1.eventId, gamma1.threadId, // eventID and threadID false, // whether this was the last step gamma1.stepCounter); // whether this was the first step @@ -748,6 +752,7 @@ __device__ __forceinline__ void PerformStoppedAnnihilation(const int slot, Track gamma2.eKin, // Post-step point kinetic energy gamma2.globalTime, // global time 0., // local time + gamma2.globalTime, // preStep global time for initializing step gamma2.eventId, gamma2.threadId, // eventID and threadID false, // whether this was the last step gamma2.stepCounter); // whether this was the first step @@ -843,6 +848,7 @@ __global__ void ElectronIonization(Track *electrons, G4HepEmElectronTrack *hepEM secondary.eKin, // Post-step point kinetic energy secondary.globalTime, // global time 0., // local time + secondary.globalTime, // preStep global time for initializing step secondary.eventId, secondary.threadId, // eventID and threadID false, // whether this was the last step secondary.stepCounter); // whether this was the first step @@ -885,6 +891,7 @@ __global__ void ElectronIonization(Track *electrons, G4HepEmElectronTrack *hepEM currentTrack.eKin, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // eventID and threadID isLastStep, // whether this was the last step currentTrack.stepCounter); // stepcounter @@ -976,6 +983,7 @@ __global__ void ElectronBremsstrahlung(Track *electrons, G4HepEmElectronTrack *h gamma.eKin, // Post-step point kinetic energy gamma.globalTime, // global time 0., // local time + gamma.globalTime, // preStep global time at initializing step gamma.eventId, gamma.threadId, // eventID and threadID false, // whether this was the last step gamma.stepCounter); // whether this was the first step @@ -1018,6 +1026,7 @@ __global__ void ElectronBremsstrahlung(Track *electrons, G4HepEmElectronTrack *h currentTrack.eKin, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // eventID and threadID isLastStep, // whether this was the last step currentTrack.stepCounter); // stepcounter @@ -1106,6 +1115,7 @@ __global__ void PositronAnnihilation(Track *electrons, G4HepEmElectronTrack *hep gamma1.eKin, // Post-step point kinetic energy gamma1.globalTime, // global time 0., // local time + gamma1.globalTime, // preStep global time at initializing step gamma1.eventId, gamma1.threadId, // eventID and threadID false, // whether this was the last step gamma1.stepCounter); @@ -1137,6 +1147,7 @@ __global__ void PositronAnnihilation(Track *electrons, G4HepEmElectronTrack *hep gamma2.eKin, // Post-step point kinetic energy gamma2.globalTime, // global time 0., // local time + gamma2.globalTime, // preStep global time at initializing step gamma2.eventId, gamma2.threadId, // eventID and threadID false, // whether this was the last step gamma2.stepCounter); @@ -1166,6 +1177,7 @@ __global__ void PositronAnnihilation(Track *electrons, G4HepEmElectronTrack *hep currentTrack.eKin, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // eventID and threadID isLastStep, // whether this was the last step currentTrack.stepCounter); // stepcounter @@ -1236,6 +1248,7 @@ __global__ void PositronStoppedAnnihilation(Track *electrons, G4HepEmElectronTra currentTrack.eKin, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // eventID and threadID isLastStep, // whether this was the last step currentTrack.stepCounter); // stepcounter diff --git a/include/AdePT/kernels/gammas.cuh b/include/AdePT/kernels/gammas.cuh index 403e8034..ab29be2c 100644 --- a/include/AdePT/kernels/gammas.cuh +++ b/include/AdePT/kernels/gammas.cuh @@ -80,9 +80,10 @@ __global__ void TransportGammas(adept::TrackManager *gammas, Secondaries vecgeom::Vector3D preStepPos(pos); auto dir = currentTrack.dir; vecgeom::Vector3D preStepDir(dir); - double globalTime = currentTrack.globalTime; - double localTime = currentTrack.localTime; - double properTime = currentTrack.properTime; + double globalTime = currentTrack.globalTime; + double preStepGlobalTime = currentTrack.globalTime; + double localTime = currentTrack.localTime; + double properTime = currentTrack.properTime; vecgeom::NavigationState nextState; // the MCC vector is indexed by the logical volume id @@ -337,20 +338,21 @@ __global__ void TransportGammas(adept::TrackManager *gammas, Secondaries if (returnLastStep) { adept_scoring::RecordHit(userScoring, electron.trackId, electron.parentId, /*CreatorProcessId*/ short(winnerProcessIndex), - /* electron*/ 0, // Particle type - 0, // Step length - 0, // Total Edep - electron.weight, // Track weight - navState, // Pre-step point navstate - electron.pos, // Pre-step point position - electron.dir, // Pre-step point momentum direction - electron.eKin, // Pre-step point kinetic energy - navState, // Post-step point navstate - electron.pos, // Post-step point position - electron.dir, // Post-step point momentum direction - electron.eKin, // Post-step point kinetic energy - globalTime, // global time - 0., // local time + /* electron*/ 0, // Particle type + 0, // Step length + 0, // Total Edep + electron.weight, // Track weight + navState, // Pre-step point navstate + electron.pos, // Pre-step point position + electron.dir, // Pre-step point momentum direction + electron.eKin, // Pre-step point kinetic energy + navState, // Post-step point navstate + electron.pos, // Post-step point position + electron.dir, // Post-step point momentum direction + electron.eKin, // Post-step point kinetic energy + globalTime, // global time + 0., // local time + globalTime, // global time at preStepPoint, for initializingStep its the globalTime electron.eventId, electron.threadId, // eventID and threadID false, // whether this was the last step electron.stepCounter); // whether this was the first step @@ -381,20 +383,21 @@ __global__ void TransportGammas(adept::TrackManager *gammas, Secondaries if (returnLastStep) { adept_scoring::RecordHit(userScoring, positron.trackId, positron.parentId, /*CreatorProcessId*/ short(winnerProcessIndex), - /* positron*/ 1, // Particle type - 0, // Step length - 0, // Total Edep - positron.weight, // Track weight - navState, // Pre-step point navstate - positron.pos, // Pre-step point position - positron.dir, // Pre-step point momentum direction - positron.eKin, // Pre-step point kinetic energy - navState, // Post-step point navstate - positron.pos, // Post-step point position - positron.dir, // Post-step point momentum direction - positron.eKin, // Post-step point kinetic energy - globalTime, // global time - 0., // local time + /* positron*/ 1, // Particle type + 0, // Step length + 0, // Total Edep + positron.weight, // Track weight + navState, // Pre-step point navstate + positron.pos, // Pre-step point position + positron.dir, // Pre-step point momentum direction + positron.eKin, // Pre-step point kinetic energy + navState, // Post-step point navstate + positron.pos, // Post-step point position + positron.dir, // Post-step point momentum direction + positron.eKin, // Post-step point kinetic energy + globalTime, // global time + 0., // local time + globalTime, // global time at preStepPoint, for initializingStep its the globalTime positron.eventId, positron.threadId, // eventID and threadID false, // whether this was the last step positron.stepCounter); // whether this was the first step @@ -448,20 +451,21 @@ __global__ void TransportGammas(adept::TrackManager *gammas, Secondaries if (returnLastStep) { adept_scoring::RecordHit(userScoring, electron.trackId, electron.parentId, /*CreatorProcessId*/ short(winnerProcessIndex), - /* electron*/ 0, // Particle type - 0, // Step length - 0, // Total Edep - electron.weight, // Track weight - navState, // Pre-step point navstate - electron.pos, // Pre-step point position - electron.dir, // Pre-step point momentum direction - electron.eKin, // Pre-step point kinetic energy - navState, // Post-step point navstate - electron.pos, // Post-step point position - electron.dir, // Post-step point momentum direction - electron.eKin, // Post-step point kinetic energy - globalTime, // global time - 0., // local time + /* electron*/ 0, // Particle type + 0, // Step length + 0, // Total Edep + electron.weight, // Track weight + navState, // Pre-step point navstate + electron.pos, // Pre-step point position + electron.dir, // Pre-step point momentum direction + electron.eKin, // Pre-step point kinetic energy + navState, // Post-step point navstate + electron.pos, // Post-step point position + electron.dir, // Post-step point momentum direction + electron.eKin, // Post-step point kinetic energy + globalTime, // global time + 0., // local time + globalTime, // global time at preStepPoint, for initializingStep its the globalTime electron.eventId, electron.threadId, // eventID and threadID false, // whether this was the last step electron.stepCounter); // whether this was the first step @@ -523,20 +527,21 @@ __global__ void TransportGammas(adept::TrackManager *gammas, Secondaries if (returnLastStep) { adept_scoring::RecordHit(userScoring, electron.trackId, electron.parentId, /*CreatorProcessId*/ short(winnerProcessIndex), - /* electron*/ 0, // Particle type - 0, // Step length - 0, // Total Edep - electron.weight, // Track weight - navState, // Pre-step point navstate - electron.pos, // Pre-step point position - electron.dir, // Pre-step point momentum direction - electron.eKin, // Pre-step point kinetic energy - navState, // Post-step point navstate - electron.pos, // Post-step point position - electron.dir, // Post-step point momentum direction - electron.eKin, // Post-step point kinetic energy - globalTime, // global time - 0., // local time + /* electron*/ 0, // Particle type + 0, // Step length + 0, // Total Edep + electron.weight, // Track weight + navState, // Pre-step point navstate + electron.pos, // Pre-step point position + electron.dir, // Pre-step point momentum direction + electron.eKin, // Pre-step point kinetic energy + navState, // Post-step point navstate + electron.pos, // Post-step point position + electron.dir, // Post-step point momentum direction + electron.eKin, // Post-step point kinetic energy + globalTime, // global time + 0., // local time + globalTime, // global time at preStepPoint, for initializingStep its the globalTime electron.eventId, electron.threadId, // eventID and threadID false, // whether this was the last step electron.stepCounter); // whether this was the first step @@ -622,6 +627,7 @@ __global__ void TransportGammas(adept::TrackManager *gammas, Secondaries eKin, // Post-step point kinetic energy globalTime, // global time localTime, // local time + preStepGlobalTime, // global time at preStepPoint currentTrack.eventId, currentTrack.threadId, // event and thread ID isLastStep, // whether this is the last step of the track currentTrack.stepCounter); // whether this is the first step diff --git a/include/AdePT/kernels/gammas_split.cuh b/include/AdePT/kernels/gammas_split.cuh index 536b7f34..e2f73d0a 100644 --- a/include/AdePT/kernels/gammas_split.cuh +++ b/include/AdePT/kernels/gammas_split.cuh @@ -36,9 +36,10 @@ __global__ void GammaHowFar(Track *gammas, Track *leaks, G4HepEmGammaTrack *hepE int lvolID = currentTrack.navState.GetLogicalId(); VolAuxData const &auxData = AsyncAdePT::gVolAuxData[lvolID]; // FIXME unify VolAuxData - currentTrack.preStepEKin = currentTrack.eKin; - currentTrack.preStepPos = currentTrack.pos; - currentTrack.preStepDir = currentTrack.dir; + currentTrack.preStepEKin = currentTrack.eKin; + currentTrack.preStepGlobalTime = currentTrack.globalTime; + currentTrack.preStepPos = currentTrack.pos; + currentTrack.preStepDir = currentTrack.dir; // the MCC vector is indexed by the logical volume id currentTrack.stepCounter++; @@ -300,6 +301,7 @@ __global__ void GammaRelocation(Track *gammas, Track *leaks, G4HepEmGammaTrack * currentTrack.eKin, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // event and thread ID false, // whether this is the last step of the track currentTrack.stepCounter); // stepcounter @@ -343,6 +345,7 @@ __global__ void GammaRelocation(Track *gammas, Track *leaks, G4HepEmGammaTrack * currentTrack.eKin, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // event and thread ID true, // whether this is the last step of the track currentTrack.stepCounter); // stepcounter @@ -440,6 +443,7 @@ __global__ void GammaConversion(Track *gammas, G4HepEmGammaTrack *hepEMTracks, S electron.eKin, // Post-step point kinetic energy electron.globalTime, // global time 0., // local time + electron.globalTime, // preStep global time at initializing step electron.eventId, electron.threadId, // eventID and threadID false, // whether this was the last step electron.stepCounter); // whether this was the first step @@ -473,6 +477,7 @@ __global__ void GammaConversion(Track *gammas, G4HepEmGammaTrack *hepEMTracks, S positron.eKin, // Post-step point kinetic energy positron.globalTime, // global time 0., // local time + positron.globalTime, // preStep global time positron.eventId, positron.threadId, // eventID and threadID false, // whether this was the last step positron.stepCounter); // whether this was the first step @@ -504,6 +509,7 @@ __global__ void GammaConversion(Track *gammas, G4HepEmGammaTrack *hepEMTracks, S newEnergyGamma, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // event and thread ID isLastStep, // whether this is the last step of the track currentTrack.stepCounter); // stepcounter @@ -594,6 +600,7 @@ __global__ void GammaCompton(Track *gammas, G4HepEmGammaTrack *hepEMTracks, Seco electron.eKin, // Post-step point kinetic energy electron.globalTime, // global time 0., // local time + electron.globalTime, // preStep global time at initializing step electron.eventId, electron.threadId, // eventID and threadID false, // whether this was the last step electron.stepCounter); // whether this was the first step @@ -639,6 +646,7 @@ __global__ void GammaCompton(Track *gammas, G4HepEmGammaTrack *hepEMTracks, Seco newEnergyGamma, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // event and thread ID isLastStep, // whether this is the last step of the track currentTrack.stepCounter); @@ -727,6 +735,7 @@ __global__ void GammaPhotoelectric(Track *gammas, G4HepEmGammaTrack *hepEMTracks electron.eKin, // Post-step point kinetic energy electron.globalTime, // global time 0., // local time + electron.globalTime, // preStep global time at initializing step electron.eventId, electron.threadId, // eventID and threadID false, // whether this was the last step electron.stepCounter); // whether this was the first step @@ -761,6 +770,7 @@ __global__ void GammaPhotoelectric(Track *gammas, G4HepEmGammaTrack *hepEMTracks newEnergyGamma, // Post-step point kinetic energy currentTrack.globalTime, // global time currentTrack.localTime, // local time + currentTrack.preStepGlobalTime, // preStep global time currentTrack.eventId, currentTrack.threadId, // event and thread ID isLastStep, // whether this is the last step of the track currentTrack.stepCounter); diff --git a/src/AdePTGeant4Integration.cpp b/src/AdePTGeant4Integration.cpp index e097ceff..a89f3ec7 100644 --- a/src/AdePTGeant4Integration.cpp +++ b/src/AdePTGeant4Integration.cpp @@ -646,7 +646,7 @@ void AdePTGeant4Integration::FillG4Step(GPUHit const *aGPUHit, G4Step *aG4Step, aPreStepPoint->SetPosition(G4ThreeVector(aGPUHit->fPreStepPoint.fPosition.x(), aGPUHit->fPreStepPoint.fPosition.y(), aGPUHit->fPreStepPoint.fPosition.z())); // Real data // aPreStepPoint->SetLocalTime(0); // Missing data - // aPreStepPoint->SetGlobalTime(0); // Missing data + aPreStepPoint->SetGlobalTime(aGPUHit->fPreGlobalTime); // Real data // aPreStepPoint->SetProperTime(0); // Missing data aPreStepPoint->SetMomentumDirection(G4ThreeVector(aGPUHit->fPreStepPoint.fMomentumDirection.x(), aGPUHit->fPreStepPoint.fMomentumDirection.y(),