10 invalidateCalculatedState();
12 auto preStepPoint = step->GetPreStepPoint();
14 auto touchable = preStepPoint->GetTouchable();
17 G4ThreeVector xyz = preStepPoint->GetPosition();
18 G4ThreeVector xyzL = touchable->GetHistory()->GetTopTransform().TransformPoint(xyz);
20 globalPositions.push_back(xyz);
21 localPositions.push_back(xyzL);
24 double edep = (step->GetTotalEnergyDeposit()) * (
gtouchable->getEnergyMultiplier());
25 double time = preStepPoint->GetGlobalTime();
27 edeps.push_back(edep);
28 times.push_back(time);
30 auto track = step->GetTrack();
31 auto trackVertex = track->GetVertexPosition();
32 int trackId = track->GetTrackID();
33 int motherTrackId = track->GetParentID();
34 int currentPdg = track->GetDefinition()->GetPDGEncoding();
36 trackVertexById.emplace(trackId, trackVertex);
37 pdgById.emplace(trackId, currentPdg);
39 MotherInfo motherInfo{motherTrackId, std::nullopt, std::nullopt};
40 if (motherTrackId > 0) {
41 auto motherVertex = trackVertexById.find(motherTrackId);
42 if (motherVertex != trackVertexById.end()) {
43 motherInfo.
vertex = motherVertex->second;
45 auto motherPdgIt = pdgById.find(motherTrackId);
46 if (motherPdgIt != pdgById.end()) {
47 motherInfo.
pid = motherPdgIt->second;
51 trackVertexPositions.push_back(trackVertex);
52 motherInfos.push_back(std::move(motherInfo));
53 pids.push_back(currentPdg);
54 tids.push_back(trackId);
55 momenta.push_back(preStepPoint->GetMomentum());
56 trackEs.push_back(preStepPoint->GetTotalEnergy());
58 if (track->GetCreatorProcess()) {
59 processNames.push_back(track->GetCreatorProcess()->GetProcessName());