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
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Geant4MaterialRecording final : public Geant4SimulationBase {
/// Algorithm execute method, called once per event with context
///
/// @param ctx the AlgorithmContext for this event
ProcessCode execute(const ActsExamples::AlgorithmContext& ctx) const final;
ProcessCode execute(const ActsExamples::AlgorithmContext& ctx) const override;

/// Readonly access to the configuration
const Config& config() const final { return m_cfg; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include "ActsExamples/DetectorCommons/Detector.hpp"
#include "ActsExamples/GenericDetector/GenericDetector.hpp"

#include <cstddef>

namespace ActsExamples {

class InternallyAlignedDetectorElement;
Expand All @@ -24,11 +22,11 @@ class AlignedDetector : public Detector {
public:
struct Config : public GenericDetector::Config {
/// Seed for the decorator random numbers.
std::size_t seed = 1324354657;
unsigned int seed = 1324354657;
/// Size of a valid IOV.
std::size_t iovSize = 100;
unsigned int iovSize = 100;
/// Span until garbage collection is active.
std::size_t flushSize = 200;
unsigned int flushSize = 200;
/// Run the garbage collection?
bool doGarbageCollection = true;
/// Sigma of the in-plane misalignment
Expand All @@ -46,8 +44,6 @@ class AlignedDetector : public Detector {

enum class Mode { Internal, External };
Mode mode = Mode::Internal;

std::shared_ptr<const Acts::IMaterialDecorator> materialDecorator;
};

explicit AlignedDetector(const Config& cfg);
Expand Down
38 changes: 19 additions & 19 deletions Examples/Detectors/DD4hepDetector/src/DD4hepDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ std::unique_ptr<dd4hep::Detector> DD4hepDetector::buildDD4hepGeometry() const {

std::unique_ptr<dd4hep::Detector> detector =
dd4hep::Detector::make_unique(m_cfg.name);
for (auto& file : m_cfg.xmlFileNames) {
detector->fromCompact(file.c_str());
for (const auto& file : m_cfg.xmlFileNames) {
detector->fromCompact(file);
}
detector->volumeManager();
detector->apply("DD4hepVolumeManager", 0, nullptr);
Expand All @@ -106,7 +106,7 @@ void ActsExamples::sortFCChhDetElements(std::vector<dd4hep::DetElement>& det) {
std::vector<dd4hep::DetElement> eCal;
std::vector<dd4hep::DetElement> hCal;
std::vector<dd4hep::DetElement> muon;
for (auto& detElement : det) {
for (const auto& detElement : det) {
std::string detName = detElement.name();
if (detName.find("Muon") != std::string::npos) {
muon.push_back(detElement);
Expand All @@ -118,22 +118,22 @@ void ActsExamples::sortFCChhDetElements(std::vector<dd4hep::DetElement>& det) {
tracker.push_back(detElement);
}
}
sort(muon.begin(), muon.end(),
[](const dd4hep::DetElement& a, const dd4hep::DetElement& b) {
return (a.id() < b.id());
});
sort(eCal.begin(), eCal.end(),
[](const dd4hep::DetElement& a, const dd4hep::DetElement& b) {
return (a.id() < b.id());
});
sort(hCal.begin(), hCal.end(),
[](const dd4hep::DetElement& a, const dd4hep::DetElement& b) {
return (a.id() < b.id());
});
sort(tracker.begin(), tracker.end(),
[](const dd4hep::DetElement& a, const dd4hep::DetElement& b) {
return (a.id() < b.id());
});
std::ranges::sort(
muon, [](const dd4hep::DetElement& a, const dd4hep::DetElement& b) {
return (a.id() < b.id());
});
std::ranges::sort(
eCal, [](const dd4hep::DetElement& a, const dd4hep::DetElement& b) {
return (a.id() < b.id());
});
std::ranges::sort(
hCal, [](const dd4hep::DetElement& a, const dd4hep::DetElement& b) {
return (a.id() < b.id());
});
std::ranges::sort(
tracker, [](const dd4hep::DetElement& a, const dd4hep::DetElement& b) {
return (a.id() < b.id());
});
det.clear();
det = tracker;

Expand Down
Loading