Skip to content

Commit ae7bc4b

Browse files
committed
revert unrelated
1 parent c8037c7 commit ae7bc4b

File tree

24 files changed

+160
-108
lines changed

24 files changed

+160
-108
lines changed

Examples/Algorithms/Geant4/include/ActsExamples/Geant4/EventStore.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "ActsExamples/EventData/SimHit.hpp"
1515
#include "ActsExamples/EventData/SimParticle.hpp"
1616
#include "ActsExamples/Framework/DataHandle.hpp"
17+
#include "ActsFatras/EventData/ParticleOutcome.hpp"
1718

1819
#include <set>
1920
#include <unordered_map>
@@ -65,7 +66,7 @@ struct EventStore {
6566
/// Particle hit count (for hit indexing)
6667
std::unordered_map<SimBarcode, std::size_t> particleHitCount;
6768
/// Particle status
68-
std::unordered_map<SimBarcode, ActsFatras::SimulationOutcome> particleOutcome;
69+
std::unordered_map<SimBarcode, ActsFatras::ParticleOutcome> particleOutcome;
6970
/// Geant4 Track ID to Barcode mapping
7071
std::unordered_map<G4int, SimBarcode> trackIdMapping;
7172
/// Geant4 Track ID subparticle counter (for subparticle indexing)

Examples/Algorithms/Geant4/src/ParticleKillAction.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
#include "ActsExamples/Geant4/ParticleKillAction.hpp"
1010

11+
#include "Acts/Definitions/Algebra.hpp"
1112
#include "Acts/Definitions/Units.hpp"
1213
#include "ActsExamples/Geant4/AlgebraConverters.hpp"
1314
#include "ActsFatras/EventData/Barcode.hpp"
14-
#include "ActsFatras/EventData/SimulationOutcome.hpp"
15+
#include "ActsFatras/EventData/ParticleOutcome.hpp"
1516

1617
#include <ostream>
1718
#include <utility>
@@ -62,16 +63,16 @@ void ParticleKillAction::UserSteppingAction(const G4Step* step) {
6263
const ActsFatras::Barcode particleId = trackIt->second;
6364
if (outOfVolume) {
6465
eventStore().particleOutcome[particleId] =
65-
ActsFatras::SimulationOutcome::KilledVolumeExit;
66+
ActsFatras::ParticleOutcome::KilledVolumeExit;
6667
} else if (outOfTime) {
6768
eventStore().particleOutcome[particleId] =
68-
ActsFatras::SimulationOutcome::KilledTime;
69+
ActsFatras::ParticleOutcome::KilledTime;
6970
} else if (invalidSecondary) {
7071
eventStore().particleOutcome[particleId] =
71-
ActsFatras::SimulationOutcome::KilledSecondaryParticle;
72+
ActsFatras::ParticleOutcome::KilledSecondaryParticle;
7273
} else if (track->GetTrackStatus() == fStopAndKill) {
7374
eventStore().particleOutcome[particleId] =
74-
ActsFatras::SimulationOutcome::KilledInteraction;
75+
ActsFatras::ParticleOutcome::KilledInteraction;
7576
}
7677
}
7778
}

Examples/Algorithms/Geant4/src/ParticleTrackingAction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
#include "Acts/Definitions/PdgParticle.hpp"
1212
#include "Acts/Definitions/Units.hpp"
13+
#include "Acts/Utilities/MultiIndex.hpp"
1314
#include "ActsExamples/EventData/SimParticle.hpp"
1415
#include "ActsExamples/Geant4/EventStore.hpp"
1516
#include "ActsFatras/EventData/Barcode.hpp"
16-
#include "ActsFatras/EventData/SimulationOutcome.hpp"
1717

1818
#include <cassert>
1919
#include <ostream>
@@ -130,8 +130,8 @@ SimParticleState ParticleTrackingAction::convert(const G4Track& aTrack,
130130
numberOfHits = it->second;
131131
}
132132

133-
ActsFatras::SimulationOutcome particleOutcome =
134-
ActsFatras::SimulationOutcome::Alive;
133+
ActsFatras::ParticleOutcome particleOutcome =
134+
ActsFatras::ParticleOutcome::Alive;
135135
if (auto it = eventStore().particleOutcome.find(particleId);
136136
it != eventStore().particleOutcome.end()) {
137137
particleOutcome = it->second;

Examples/Algorithms/Geant4/src/SensitiveSteppingAction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "Acts/Geometry/GeometryIdentifier.hpp"
1414
#include "Acts/Propagator/detail/SteppingLogger.hpp"
1515
#include "Acts/Surfaces/Surface.hpp"
16+
#include "Acts/Utilities/MultiIndex.hpp"
1617
#include "ActsExamples/Geant4/AlgebraConverters.hpp"
1718
#include "ActsExamples/Geant4/EventStore.hpp"
1819
#include "ActsExamples/Geant4/SensitiveSurfaceMapper.hpp"
@@ -285,9 +286,8 @@ void SensitiveSteppingAction::UserSteppingAction(const G4Step* step) {
285286

286287
assert(std::ranges::all_of(
287288
buffer, [&](const auto& h) { return h.geometryId() == geoId; }));
288-
assert(std::ranges::all_of(buffer, [&](const auto& h) {
289-
return h.particleBarcode() == particleId;
290-
}));
289+
assert(std::ranges::all_of(
290+
buffer, [&](const auto& h) { return h.particleId() == particleId; }));
291291

292292
eventStore().numberGeantSteps += buffer.size();
293293
eventStore().maxStepsForHit =

Examples/Algorithms/Printers/ActsExamples/Printers/ParticlesPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "Acts/Utilities/Logger.hpp"
1313
#include "ActsExamples/EventData/SimParticle.hpp"
1414
#include "ActsExamples/Framework/AlgorithmContext.hpp"
15-
#include "ActsFatras/EventData/GenerationProcess.hpp"
15+
#include "ActsFatras/EventData/ProcessType.hpp"
1616

1717
#include <ostream>
1818
#include <stdexcept>

Examples/Framework/include/ActsExamples/EventData/SimParticle.hpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include "ActsExamples/Utilities/GroupBy.hpp"
1212
#include "ActsFatras/EventData/Particle.hpp"
13-
#include "ActsFatras/EventData/SimulationOutcome.hpp"
13+
#include "ActsFatras/EventData/ParticleOutcome.hpp"
1414

1515
#include <boost/container/flat_set.hpp>
1616

@@ -74,7 +74,7 @@ class SimParticle final {
7474
}
7575

7676
/// Set the process type that generated this particle.
77-
SimParticle& setProcess(ActsFatras::GenerationProcess proc) {
77+
SimParticle& setProcess(ActsFatras::ProcessType proc) {
7878
initialState().setProcess(proc);
7979
finalState().setProcess(proc);
8080
return *this;
@@ -107,9 +107,7 @@ class SimParticle final {
107107
/// Particle identifier within an event.
108108
SimBarcode particleId() const { return initialState().particleId(); }
109109
/// Which type of process generated this particle.
110-
ActsFatras::GenerationProcess process() const {
111-
return initialState().process();
112-
}
110+
ActsFatras::ProcessType process() const { return initialState().process(); }
113111
/// PDG particle number that identifies the type.
114112
Acts::PdgParticle pdg() const { return initialState().pdg(); }
115113
/// Absolute PDG particle number that identifies the type.
@@ -172,9 +170,7 @@ class SimParticle final {
172170
std::uint32_t numberOfHits() const { return finalState().numberOfHits(); }
173171

174172
/// Particle outcome.
175-
ActsFatras::SimulationOutcome outcome() const {
176-
return finalState().outcome();
177-
}
173+
ActsFatras::ParticleOutcome outcome() const { return finalState().outcome(); }
178174

179175
private:
180176
SimParticleState m_initial;

Examples/Framework/include/ActsExamples/EventData/SimVertex.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include "Acts/Definitions/Algebra.hpp"
1212
#include "ActsExamples/EventData/SimParticle.hpp"
13-
#include "ActsFatras/EventData/GenerationProcess.hpp"
13+
#include "ActsFatras/EventData/ProcessType.hpp"
1414

1515
#include <boost/container/flat_set.hpp>
1616

@@ -87,8 +87,7 @@ struct SimVertex {
8787
/// The vertex four-position
8888
Acts::Vector4 position4 = Acts::Vector4::Zero();
8989
/// The vertex process type
90-
ActsFatras::GenerationProcess process =
91-
ActsFatras::GenerationProcess::eUndefined;
90+
ActsFatras::ProcessType process = ActsFatras::ProcessType::eUndefined;
9291
/// The incoming particles into the vertex
9392
SimBarcodeContainer incoming;
9493
/// The outgoing particles from the vertex
@@ -101,9 +100,9 @@ struct SimVertex {
101100
///
102101
/// Associated particles are left empty by default and must be filled by the
103102
/// user after construction.
104-
SimVertex(SimVertexBarcode id_, const Acts::Vector4& position4_,
105-
ActsFatras::GenerationProcess process_ =
106-
ActsFatras::GenerationProcess::eUndefined)
103+
SimVertex(
104+
SimVertexBarcode id_, const Acts::Vector4& position4_,
105+
ActsFatras::ProcessType process_ = ActsFatras::ProcessType::eUndefined)
107106
: id(id_), position4(position4_), process(process_) {}
108107
// explicitly default rule-of-five.
109108
SimVertex() = default;

Examples/Framework/src/Root/MuonVisualization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ void visualizeMuonSpacePoints(const std::string& outputPath,
225225
if (chambId != toChamberId(simHit.geometryId())) {
226226
continue;
227227
}
228-
const auto simPartItr = simParticles.find(simHit.particleBarcode());
228+
const auto simPartItr = simParticles.find(simHit.particleId());
229229
if (simPartItr == simParticles.end() ||
230230
(*simPartItr).hypothesis() != ParticleHypothesis::muon()) {
231231
continue;

Examples/Io/Csv/src/CsvParticleReader.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "ActsExamples/Io/Csv/CsvInputOutput.hpp"
1717
#include "ActsExamples/Utilities/Paths.hpp"
1818
#include "ActsFatras/EventData/Barcode.hpp"
19-
#include "ActsFatras/EventData/GenerationProcess.hpp"
19+
#include "ActsFatras/EventData/ProcessType.hpp"
2020

2121
#include <cmath>
2222
#include <stdexcept>
@@ -69,8 +69,7 @@ ProcessCode CsvParticleReader::read(const AlgorithmContext& ctx) {
6969
Acts::PdgParticle{data.particle_type},
7070
data.q * Acts::UnitConstants::e,
7171
data.m * Acts::UnitConstants::GeV);
72-
particle.setProcess(
73-
static_cast<ActsFatras::GenerationProcess>(data.process));
72+
particle.setProcess(static_cast<ActsFatras::ProcessType>(data.process));
7473
particle.setPosition4(
7574
data.vx * Acts::UnitConstants::mm, data.vy * Acts::UnitConstants::mm,
7675
data.vz * Acts::UnitConstants::mm, data.vt * Acts::UnitConstants::mm);

Examples/Io/Root/src/RootParticleReader.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include "ActsExamples/EventData/SimParticle.hpp"
1414
#include "ActsExamples/Framework/AlgorithmContext.hpp"
1515
#include "ActsExamples/Io/Root/RootUtility.hpp"
16-
#include "ActsFatras/EventData/GenerationProcess.hpp"
17-
#include "ActsFatras/EventData/SimulationOutcome.hpp"
16+
#include "ActsFatras/EventData/ParticleOutcome.hpp"
17+
#include "ActsFatras/EventData/ProcessType.hpp"
1818

1919
#include <iostream>
2020
#include <stdexcept>
@@ -121,8 +121,7 @@ ProcessCode RootParticleReader::read(const AlgorithmContext& context) {
121121
for (unsigned int i = 0; i < nParticles; i++) {
122122
SimParticle p;
123123

124-
p.setProcess(
125-
static_cast<ActsFatras::GenerationProcess>((*m_process).at(i)));
124+
p.setProcess(static_cast<ActsFatras::ProcessType>((*m_process).at(i)));
126125
p.setPdg(static_cast<Acts::PdgParticle>((*m_particleType).at(i)));
127126
p.setCharge((*m_q).at(i) * Acts::UnitConstants::e);
128127
p.setMass((*m_m).at(i) * Acts::UnitConstants::GeV);
@@ -150,7 +149,7 @@ ProcessCode RootParticleReader::read(const AlgorithmContext& context) {
150149
(*m_pathInL0).at(i) * Acts::UnitConstants::mm);
151150
finalState.setNumberOfHits((*m_numberOfHits).at(i));
152151
finalState.setOutcome(
153-
static_cast<ActsFatras::SimulationOutcome>((*m_outcome).at(i)));
152+
static_cast<ActsFatras::ParticleOutcome>((*m_outcome).at(i)));
154153

155154
particles.insert(p);
156155
}

0 commit comments

Comments
 (0)