Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
asalzburger committed Dec 4, 2024
1 parent a6479d5 commit 00cdf91
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 19 deletions.
3 changes: 2 additions & 1 deletion Alignment/include/ActsAlignment/Kernel/Alignment.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ void ActsAlignment::Alignment<fitter_t>::calculateAlignmentParameters(
alignResult.measurementDim += alignState.measurementDim;
sumChi2ONdf += alignState.chi2 / alignState.measurementDim;
}
alignResult.averageChi2ONdf = sumChi2ONdf / static_cast<double>(alignResult.numTracks);
alignResult.averageChi2ONdf =
sumChi2ONdf / static_cast<double>(alignResult.numTracks);

// Get the inverse of chi2 second derivative matrix (we need this to
// calculate the covariance of the alignment parameters)
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Geometry/TrapezoidVolumeBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ class TrapezoidVolumeBounds : public VolumeBounds {
/// Constructor - from a fixed size array
///
/// @param values The bound values
explicit TrapezoidVolumeBounds(const std::array<double, eSize>& values) noexcept(false)
explicit TrapezoidVolumeBounds(
const std::array<double, eSize>& values) noexcept(false)
: m_values(values) {
checkConsistency();
buildSurfaceBounds();
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/AnnulusBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class AnnulusBounds : public DiscBounds {
/// Constructor - from parameters array
///
/// @param values The parameter array
explicit AnnulusBounds(const std::array<double, eSize>& values) noexcept(false);
explicit AnnulusBounds(const std::array<double, eSize>& values) noexcept(
false);

AnnulusBounds(const AnnulusBounds& source) = default;

Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/ConvexPolygonBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ class ConvexPolygonBounds : public ConvexPolygonBoundsBase {
/// This will throw if the vector size does not match `num_vertices`.
/// This will throw if the vertices do not form a convex polygon.
/// @param vertices The list of vertices.
explicit ConvexPolygonBounds(const std::vector<Vector2>& vertices) noexcept(false);
explicit ConvexPolygonBounds(const std::vector<Vector2>& vertices) noexcept(
false);

/// Constructor from a fixed size array of vertices.
/// This will throw if the vertices do not form a convex polygon.
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/CylinderBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ class CylinderBounds : public SurfaceBounds {
/// Constructor - from fixed size array
///
/// @param values The parameter values
explicit CylinderBounds(const std::array<double, eSize>& values) noexcept(false)
explicit CylinderBounds(const std::array<double, eSize>& values) noexcept(
false)
: m_values(values),
m_closed(std::abs(values[eHalfPhiSector] - std::numbers::pi) <
s_epsilon) {
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/DiamondBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class DiamondBounds : public PlanarBounds {
/// Constructor - from fixed size array
///
/// @param values The parameter values
explicit DiamondBounds(const std::array<double, eSize>& values) noexcept(false)
explicit DiamondBounds(const std::array<double, eSize>& values) noexcept(
false)
: m_values(values),
m_boundingBox(
Vector2{-(*std::max_element(values.begin(), values.begin() + 2)),
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/DiscTrapezoidBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class DiscTrapezoidBounds : public DiscBounds {
/// Constructor - from fixed size array
///
/// @param values The parameter values
explicit DiscTrapezoidBounds(const std::array<double, eSize>& values) noexcept(false)
explicit DiscTrapezoidBounds(
const std::array<double, eSize>& values) noexcept(false)
: m_values(values) {
checkConsistency();
}
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/EllipseBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ class EllipseBounds : public PlanarBounds {
/// Constructor - from fixed size array
///
/// @param values The parameter values
explicit EllipseBounds(const std::array<double, eSize>& values) noexcept(false)
explicit EllipseBounds(const std::array<double, eSize>& values) noexcept(
false)
: m_values(values), m_boundingBox(values[eInnerRy], values[eOuterRy]) {
checkConsistency();
}
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/RectangleBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class RectangleBounds : public PlanarBounds {
/// Constructor - from fixed size array - generic
///
/// @param values The parameter values
explicit RectangleBounds(const std::array<double, eSize>& values) noexcept(false)
explicit RectangleBounds(const std::array<double, eSize>& values) noexcept(
false)
: m_min({values[eMinX], values[eMinY]}),
m_max({values[eMaxX], values[eMaxY]}) {
checkConsistency();
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/SurfaceArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ class SurfaceArray {

/// @brief Default constructor.
/// @param elements the surfaces that are provided through a single lookup
explicit SingleElementLookup(const SurfaceVector& elements) : m_element(elements) {}
explicit SingleElementLookup(const SurfaceVector& elements)
: m_element(elements) {}

/// @brief Lookup, always returns @c element
/// @return reference to vector containing only @c element
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Utilities/Axis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class NeighborHoodIndices {
iterator() = default;

// Specialized constructor for end() iterator
explicit iterator(std::size_t current) : m_current(current), m_wrapped(true) {}
explicit iterator(std::size_t current)
: m_current(current), m_wrapped(true) {}

iterator(std::size_t begin1, std::size_t end1, std::size_t begin2)
: m_current(begin1),
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Utilities/Grid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class Grid final : public IGrid {

/// @brief constructor from parameters pack of axes and type tag
/// @param axes
explicit Grid(TypeTag<T> /*tag*/, const Axes&... axes) : m_axes(std::tuple(axes...)) {
explicit Grid(TypeTag<T> /*tag*/, const Axes&... axes)
: m_axes(std::tuple(axes...)) {
m_values.resize(size());
}

Expand Down
16 changes: 12 additions & 4 deletions Examples/Framework/include/ActsExamples/EventData/SimParticle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,16 @@ class SimParticle final {
bool isSecondary() const { return initialState().isSecondary(); }

/// Particle hypothesis.
Acts::ParticleHypothesis hypothesis() const { return initialState().hypothesis(); }
Acts::ParticleHypothesis hypothesis() const {
return initialState().hypothesis();
}
/// Particl qOverP.
double qOverP() const { return initialState().qOverP(); }

/// Space-time position four-vector.
const Acts::Vector4& fourPosition() const { return initialState().fourPosition(); }
const Acts::Vector4& fourPosition() const {
return initialState().fourPosition();
}
/// Three-position, i.e. spatial coordinates without the time.
auto position() const { return initialState().position(); }
/// Time coordinate.
Expand All @@ -146,7 +150,9 @@ class SimParticle final {
/// Azimuthal angle.
double phi() const { return initialState().phi(); }
/// Absolute momentum in the x-y plane.
double transverseMomentum() const { return initialState().transverseMomentum(); }
double transverseMomentum() const {
return initialState().transverseMomentum();
}
/// Absolute momentum.
double absoluteMomentum() const { return initialState().absoluteMomentum(); }
/// Absolute momentum.
Expand All @@ -155,7 +161,9 @@ class SimParticle final {
double energy() const { return initialState().energy(); }

/// Energy loss over the particles lifetime or simulation time.
double energyLoss() const { return initialState().energy() - finalState().energy(); }
double energyLoss() const {
return initialState().energy() - finalState().energy();
}

/// Accumulated path within material measured in radiation lengths.
double pathInX0() const { return finalState().pathInX0(); }
Expand Down
6 changes: 3 additions & 3 deletions Examples/Io/EDM4hep/src/EDM4hepUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ SimParticle EDM4hepUtil::readParticle(const edm4hep::MCParticle& from,
// particle.setProcess(static_cast<ActsFatras::ProcessType>(data.process));

to.initialState().setPosition4(from.getVertex()[0] * Acts::UnitConstants::mm,
from.getVertex()[1] * Acts::UnitConstants::mm,
from.getVertex()[2] * Acts::UnitConstants::mm,
from.getTime() * Acts::UnitConstants::ns);
from.getVertex()[1] * Acts::UnitConstants::mm,
from.getVertex()[2] * Acts::UnitConstants::mm,
from.getTime() * Acts::UnitConstants::ns);

// Only used for direction; normalization/units do not matter
Acts::Vector3 momentum = {from.getMomentum()[0], from.getMomentum()[1],
Expand Down

0 comments on commit 00cdf91

Please sign in to comment.