Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixprestepoint #309

Merged
merged 4 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/AdePTGeant4Integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ void AdePTGeant4Integration::FillG4Step(GPUHit *aGPUHit, G4Step *aG4Step, G4Touc

// G4Track
G4Track *aTrack = aG4Step->GetTrack();
// aTrack->SetTrackID(0); // Missing data
aTrack->SetTrackID(aGPUHit->fParentID); // Missing data
aTrack->SetParentID(aGPUHit->fParentID); // ID of the initial particle that entered AdePT
aTrack->SetPosition(*aPostStepPointPosition); // Real data
// aTrack->SetGlobalTime(0); // Missing data
Expand Down Expand Up @@ -424,19 +424,25 @@ void AdePTGeant4Integration::FillG4Step(GPUHit *aGPUHit, G4Step *aG4Step, G4Touc

// Pre-Step Point
G4StepPoint *aPreStepPoint = aG4Step->GetPreStepPoint();
aPreStepPoint->SetPosition(G4ThreeVector(aGPUHit->fPreStepPoint.fPosition)); // Real data
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->SetProperTime(0); // Missing data
aPreStepPoint->SetMomentumDirection(G4ThreeVector(aGPUHit->fPreStepPoint.fMomentumDirection)); // Real data
aPreStepPoint->SetMomentumDirection(G4ThreeVector(aGPUHit->fPreStepPoint.fMomentumDirection.x(),
aGPUHit->fPreStepPoint.fMomentumDirection.y(),
aGPUHit->fPreStepPoint.fMomentumDirection.z())); // Real data
aPreStepPoint->SetKineticEnergy(aGPUHit->fPreStepPoint.fEKin); // Real data
// aPreStepPoint->SetVelocity(0); // Missing data
aPreStepPoint->SetTouchableHandle(aPreG4TouchableHandle); // Real data
aPreStepPoint->SetMaterial(aPreG4TouchableHandle->GetVolume()->GetLogicalVolume()->GetMaterial()); // Real data
aPreStepPoint->SetMaterialCutsCouple(aPreG4TouchableHandle->GetVolume()->GetLogicalVolume()->GetMaterialCutsCouple());
// aPreStepPoint->SetSensitiveDetector(nullptr); // Missing data
// aPreStepPoint->SetSafety(0); // Missing data
aPreStepPoint->SetPolarization(G4ThreeVector(aGPUHit->fPreStepPoint.fPolarization)); // Real data
aPreStepPoint->SetPolarization(G4ThreeVector(aGPUHit->fPreStepPoint.fPolarization.x(),
aGPUHit->fPreStepPoint.fPolarization.y(),
aGPUHit->fPreStepPoint.fPolarization.z())); // Real data
// aPreStepPoint->SetStepStatus(G4StepStatus::fUndefined); // Missing data
// aPreStepPoint->SetProcessDefinedStep(nullptr); // Missing data
// aPreStepPoint->SetMass(0); // Missing data
Expand Down
1 change: 1 addition & 0 deletions test/testField/electrons.cu
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <G4HepEmElectronInteractionIoni.icc>
#include <G4HepEmElectronInteractionUMSC.icc>
#include <G4HepEmPositronInteractionAnnihilation.icc>
#include <G4HepEmElectronEnergyLossFluctuation.icc>

#ifdef CHECK_RESULTS
#include "CompareResponses.h"
Expand Down
Loading