Skip to content

Commit 3d0fdb6

Browse files
authored
Merge pull request #140 from rest-for-physics/subEventDelay
Using configurable time delay from G4Metadata subEventTimeDelay
2 parents 6214d85 + 42e572e commit 3d0fdb6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/DataModel.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void TRestGeant4Track::UpdateTrack(const G4Track* track) {
149149

150150
SetTimeOffset(globalTimeOffset);
151151

152-
const double precision = metadata->GetResetTimePrecision();
152+
const double precision = metadata->GetResetTimePrecision() / CLHEP::microsecond;
153153
const double globalTime = track->GetGlobalTime() / CLHEP::microsecond;
154154

155155
const auto processName = track->GetStep()->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();

src/StackingAction.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using namespace std;
1414

1515
StackingAction::StackingAction(SimulationManager* simulationManager) : fSimulationManager(simulationManager) {
16-
fMaxAllowedLifetime = 100; // TODO: update this
16+
fMaxAllowedLifetime = fSimulationManager->GetRestMetadata()->GetSubEventTimeDelay() * CLHEP::microsecond;
1717

1818
fMaxAllowedLifetimeWithUnit = G4BestUnit(fMaxAllowedLifetime, "Time");
1919

0 commit comments

Comments
 (0)