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

chore: Sonar fixes after detector refactor #3968

Merged
Merged
Changes from 1 commit
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
3f1b961
refactor: Rework detector handling in Examples
andiwand Oct 22, 2024
8de3c96
fix odd
andiwand Oct 22, 2024
372e2a0
fix odd?
andiwand Oct 23, 2024
5f4e88d
Merge branch 'main' of github.com:acts-project/acts into ex-refactor-…
andiwand Oct 25, 2024
697d563
Merge branch 'main' into ex-refactor-detectors
andiwand Nov 7, 2024
3c23758
Merge branch 'main' into ex-refactor-detectors
andiwand Nov 16, 2024
45d4256
fix
andiwand Nov 17, 2024
423cfd7
try fix adapter
andiwand Nov 17, 2024
c5cee0c
fix telescope
andiwand Nov 17, 2024
cd54cdf
fix?
andiwand Nov 17, 2024
21bec1a
debug
andiwand Nov 17, 2024
f13b9b8
debug more
andiwand Nov 17, 2024
5423505
fix and remove debugging
andiwand Nov 17, 2024
73c5636
Merge branch 'main' of github.com:acts-project/acts into ex-refactor-…
andiwand Nov 20, 2024
c95efc6
pr feedback
andiwand Nov 20, 2024
3304bb0
fix
andiwand Nov 20, 2024
39138d4
try fix edm4hep
andiwand Nov 20, 2024
76d7c60
refactor detector base even further
andiwand Nov 21, 2024
43094f4
more
andiwand Nov 21, 2024
0005411
runs locally
andiwand Nov 21, 2024
b3c1691
clean python
andiwand Nov 21, 2024
2f37e35
clean
andiwand Nov 21, 2024
4c60e42
try fix geomodel
andiwand Nov 21, 2024
4cfa195
revert
andiwand Nov 21, 2024
d25081a
fix cmake
andiwand Nov 21, 2024
bd7df9a
fix
andiwand Nov 21, 2024
c6a929f
fix
andiwand Nov 21, 2024
f7f6699
fix
andiwand Nov 21, 2024
e5f861f
fix
andiwand Nov 21, 2024
33c1734
fix
andiwand Nov 21, 2024
b7ccc91
fix
andiwand Nov 21, 2024
55f7f69
fix
andiwand Nov 21, 2024
d8c1019
fix
andiwand Nov 21, 2024
73b8245
fix
andiwand Nov 21, 2024
2d33f50
fix
andiwand Nov 21, 2024
7d92a2e
fix
andiwand Nov 22, 2024
a13e204
refactor options; fix detector creation
andiwand Nov 22, 2024
dca7052
clean
andiwand Nov 22, 2024
1fa479b
tmp
andiwand Nov 22, 2024
12ef54b
tmp
andiwand Nov 22, 2024
ce737c9
tmp
andiwand Nov 22, 2024
8767401
tmp
andiwand Nov 22, 2024
0533d25
clean python
andiwand Nov 22, 2024
373134e
fix first round of python tests
andiwand Nov 23, 2024
f6c0527
Merge branch 'main' of github.com:acts-project/acts into ex-refactor-…
andiwand Nov 23, 2024
7c53d59
remove random file
andiwand Nov 23, 2024
e38adbe
downstream changes
andiwand Nov 25, 2024
46ef986
more fixes
andiwand Nov 25, 2024
396b504
Merge branch 'main' of github.com:acts-project/acts into ex-refactor-…
andiwand Nov 27, 2024
c3331ab
clean up
andiwand Nov 27, 2024
000c13c
fix
andiwand Nov 27, 2024
a44522c
try fix
andiwand Nov 27, 2024
0a0b6e8
fix
andiwand Nov 27, 2024
181f542
more fixes
andiwand Nov 27, 2024
936d6a4
more python changes
andiwand Nov 27, 2024
7c225f7
fix
andiwand Nov 28, 2024
3accec0
Merge branch 'main' into ex-refactor-detectors
andiwand Nov 29, 2024
b71457b
fix
andiwand Nov 29, 2024
6088b3b
fix
andiwand Nov 29, 2024
348b05d
fix
andiwand Nov 29, 2024
b5c41ea
fix
andiwand Nov 29, 2024
cf0d2c3
fix
andiwand Nov 29, 2024
797f64d
pls?
andiwand Nov 29, 2024
558b35d
now?
andiwand Nov 30, 2024
a87ead6
try again
andiwand Nov 30, 2024
c3f9562
detectors for gdml and geomodel; some residual stuff
andiwand Dec 2, 2024
7483604
pr feedback
andiwand Dec 3, 2024
2997750
Merge branch 'main' of github.com:acts-project/acts into ex-refactor-…
andiwand Dec 3, 2024
4c3991d
pr feedback
andiwand Dec 3, 2024
8be8522
Merge branch 'main' of github.com:acts-project/acts into ex-refactor-…
andiwand Dec 6, 2024
c8b2e7b
fix
andiwand Dec 6, 2024
1f998a6
merge factory into detector
andiwand Dec 6, 2024
0e6e394
python downstream changes
andiwand Dec 6, 2024
6599ae2
pr feedback
andiwand Dec 6, 2024
a7269b3
pr feedback
andiwand Dec 6, 2024
2acffa2
patch detector constructors
andiwand Dec 6, 2024
209ca9a
reduce warnings
andiwand Dec 6, 2024
1494af3
Merge branch 'main' of github.com:acts-project/acts into ex-refactor-…
andiwand Dec 6, 2024
b6c24ed
pr feedback
andiwand Dec 6, 2024
cc66308
remove `.buildDetector()`
andiwand Dec 6, 2024
3f1b57a
fix `test_geometry_example` for `AlignedDetector`
andiwand Dec 6, 2024
6a0f506
revert ODD
andiwand Dec 6, 2024
ed4678b
Merge branch 'main' into ex-refactor-detectors
andiwand Dec 6, 2024
1755a30
Merge branch 'main' into ex-refactor-detectors
andiwand Dec 7, 2024
255c81e
Merge branch 'main' into ex-refactor-detectors
andiwand Dec 7, 2024
cbf8f78
chore: Sonar fixes after detector refactor
paulgessinger Dec 7, 2024
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
Prev Previous commit
Next Next commit
clean
  • Loading branch information
andiwand committed Nov 21, 2024
commit 2f37e359b8be7b6c5ed483eedaf2b1e9f31e053e
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ struct Geant4Handle;
namespace Geant4 {
class SensitiveSurfaceMapper;
struct EventStore;
class RegionCreator;
} // namespace Geant4

/// Abstracts common Geant4 Acts algorithm behaviour.
@@ -59,6 +60,9 @@ class Geant4SimulationBase : public IAlgorithm {
/// Random number service.
std::shared_ptr<const RandomNumbers> randomNumbers;

/// Geant4 region creators.
std::vector<std::shared_ptr<Geant4::RegionCreator>> regionCreators;

/// Detector construction object.
/// G4RunManager will take care of deletion
std::shared_ptr<Geant4DetectorConstructionFactory>
5 changes: 3 additions & 2 deletions Examples/Algorithms/Geant4/src/Geant4Simulation.cpp
Original file line number Diff line number Diff line change
@@ -81,9 +81,10 @@ void Geant4SimulationBase::commonInitialization() {
delete runManager().GetUserDetectorConstruction();
}
// G4RunManager will take care of deletion
// TODO region creators
m_detectorConstruction =
config().detectorConstructionFactory->factorize({}).release();
config()
.detectorConstructionFactory->factorize(config().regionCreators)
.release();
runManager().SetUserInitialization(m_detectorConstruction);
runManager().InitializeGeometry();
}
Original file line number Diff line number Diff line change
@@ -24,6 +24,9 @@ class G4RunManager;

namespace ActsExamples {
class Geant4DetectorConstructionFactory;
namespace Geant4 {
class RegionCreator;
} // namespace Geant4

class EventRecording final : public ActsExamples::IAlgorithm {
public:
@@ -34,6 +37,9 @@ class EventRecording final : public ActsExamples::IAlgorithm {
/// The recorded events output
std::string outputHepMcTracks = "geant-outcome-tracks";

/// Geant4 region creators.
std::vector<std::shared_ptr<Geant4::RegionCreator>> regionCreators;

std::shared_ptr<Geant4DetectorConstructionFactory>
detectorConstructionFactory;

4 changes: 2 additions & 2 deletions Examples/Algorithms/Geant4HepMC/src/EventRecording.cpp
Original file line number Diff line number Diff line change
@@ -52,9 +52,9 @@ EventRecording::EventRecording(const EventRecording::Config& config,
// Now set up the Geant4 simulation

// G4RunManager deals with the lifetime of these objects
// TODO region creator
m_runManager->SetUserInitialization(
m_cfg.detectorConstructionFactory->factorize({}).release());
m_cfg.detectorConstructionFactory->factorize(m_cfg.regionCreators)
.release());
m_runManager->SetUserInitialization(new FTFP_BERT);
m_runManager->SetUserAction(new Geant4::HepMC3::RunAction());
m_runManager->SetUserAction(
1 change: 0 additions & 1 deletion Examples/Python/src/Geant4Component.cpp
Original file line number Diff line number Diff line change
@@ -174,7 +174,6 @@ PYBIND11_MODULE(ActsPythonBindingsGeant4, mod) {
[](Geant4::SensitiveSurfaceMapper& self, State& state,
GeometryContext& gctx, Geant4DetectorConstructionFactory& factory,
Transform3& transform) {
// TODO region creators
return self.remapSensitiveNames(
state, gctx, factory.factorize({})->Construct(), transform);
},