Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AJPfleger committed Oct 5, 2023
1 parent 7c9c42c commit c38a416
Show file tree
Hide file tree
Showing 24 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions Alignment/include/ActsAlignment/Kernel/Alignment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct AlignmentOptions {
// The detector elements to be aligned
std::vector<Acts::DetectorElementBase*> alignedDetElements;

// The alignment tolerance to determine if the alignment is coveraged
// The alignment tolerance to determine if the alignment is averaged
double averageChi2ONdfCutOff = 0.5;

// The delta of average chi2/ndf within a couple of iterations to determine if
Expand All @@ -101,7 +101,7 @@ struct AlignmentResult {
// The covariance of alignment parameters
Acts::ActsDynamicMatrix alignmentCovariance;

// The avarage chi2/ndf (ndf is the measurement dim)
// The average chi2/ndf (ndf is the measurement dim)
double averageChi2ONdf = std::numeric_limits<double>::max();

// The delta chi2
Expand Down
12 changes: 6 additions & 6 deletions Alignment/include/ActsAlignment/Kernel/Alignment.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ void ActsAlignment::Alignment<fitter_t>::calculateAlignmentParameters(
const fit_options_t& fitOptions,
ActsAlignment::AlignmentResult& alignResult,
const ActsAlignment::AlignmentMask& alignMask) const {
// The number of trajectories must be eual to the number of starting
// The number of trajectories must be equal to the number of starting
// parameters
assert(trajectoryCollection.size() == startParametersCollection.size());

// The total alignment degree of freedom
alignResult.alignmentDof =
alignResult.idxedAlignSurfaces.size() * Acts::eAlignmentSize;
// Initialize derivative of chi2 w.r.t. aligment parameters for all tracks
// Initialize derivative of chi2 w.r.t. alignment parameters for all tracks
Acts::ActsDynamicVector sumChi2Derivative =
Acts::ActsDynamicVector::Zero(alignResult.alignmentDof);
Acts::ActsDynamicMatrix sumChi2SecondDerivative =
Expand Down Expand Up @@ -97,7 +97,7 @@ void ActsAlignment::Alignment<fitter_t>::calculateAlignmentParameters(
const auto& alignState = evaluateRes.value();
for (const auto& [rowSurface, rows] : alignState.alignedSurfaces) {
const auto& [dstRow, srcRow] = rows;
// Fill the results into full chi2 derivative matrixs
// Fill the results into full chi2 derivative matrix
sumChi2Derivative.segment<Acts::eAlignmentSize>(dstRow *
Acts::eAlignmentSize) +=
alignState.alignmentToChi2Derivative.segment(
Expand Down Expand Up @@ -262,7 +262,7 @@ ActsAlignment::Alignment<fitter_t>::align(
if (std::abs(recentChi2ONdf.front() - alignResult.averageChi2ONdf) <=
alignOptions.deltaAverageChi2ONdfCutOff.second) {
ACTS_INFO(
"Alignment has converaged with change of chi2/ndf < "
"Alignment has converged with change of chi2/ndf < "
<< alignOptions.deltaAverageChi2ONdfCutOff.second << " in the last "
<< alignOptions.deltaAverageChi2ONdfCutOff.first << " iterations"
<< " after " << iIter << " iteration(s)");
Expand All @@ -273,7 +273,7 @@ ActsAlignment::Alignment<fitter_t>::align(
}
// 2. or the average chi2/ndf (is this correct?)
if (alignResult.averageChi2ONdf <= alignOptions.averageChi2ONdfCutOff) {
ACTS_INFO("Alignment has converaged with average chi2/ndf < "
ACTS_INFO("Alignment has converged with average chi2/ndf < "
<< alignOptions.averageChi2ONdfCutOff << " after " << iIter
<< " iteration(s)");
converged = true;
Expand Down Expand Up @@ -320,7 +320,7 @@ ActsAlignment::Alignment<fitter_t>::align(
ACTS_VERBOSE("Center (cenX, cenY, cenZ) = " << translation.transpose());
ACTS_VERBOSE(
"Euler angles (rotZ, rotY, rotX) = " << rotAngles.transpose());
ACTS_VERBOSE("Rotation marix = \n" << rotation);
ACTS_VERBOSE("Rotation matrix = \n" << rotation);
}
} else {
ACTS_DEBUG("Alignment parameters is not updated.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ TrackAlignmentState trackAlignmentState(
alignState.alignedSurfaces[surface].first = it->second;
nAlignSurfaces++;
}
// Rember the index of the state within the trajectory and whether it's
// Remember the index of the state within the trajectory and whether it's
// alignable
measurementStates.push_back({ts.index(), isAlignable});
// Add up measurement dimension
Expand All @@ -167,7 +167,7 @@ TrackAlignmentState trackAlignmentState(
// Dimension of global track parameters (from only measurement states)
alignState.trackParametersDim = eBoundSize * measurementStates.size();

// Initialize the alignment matrixs with components from the measurement
// Initialize the alignment matrices with components from the measurement
// states
// The measurement covariance
alignState.measurementCovariance = ActsDynamicMatrix::Zero(
Expand All @@ -190,7 +190,7 @@ TrackAlignmentState trackAlignmentState(
// should be same as eBoundSize * nSmoothedStates
const auto& [sourceTrackParamsCov, stateRowIndices] = globalTrackParamsCov;

// Loop over the measurement states to fill those alignment matrixs
// Loop over the measurement states to fill those alignment matrices
// This is done in reverse order
size_t iMeasurement = alignState.measurementDim;
size_t iParams = alignState.trackParametersDim;
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Material/AccumulatedMaterialSlab.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class AccumulatedMaterialSlab {
/// @param useEmptyTrack indicate whether to consider an empty track store
///
/// The material variance can be used to optimised the mapping process as it
/// should be inversly proportionnal to the map quality
/// should be inversely proportional to the map quality
void trackVariance(MaterialSlab slabReference, bool useEmptyTrack = false);

/// Add the accumulated material for the current track to the total average.
Expand Down Expand Up @@ -88,7 +88,7 @@ class AccumulatedMaterialSlab {
/// Only contains the information up to the last `.trackVariance(...)` call.
/// If there have been additional calls to `.accumulate(...)` afterwards, the
/// information is not part of the total average. The number of tracks is only
/// opdated on the call of `.trackAverage(...)`
/// updated on the call of `.trackAverage(...)`
std::pair<float, unsigned int> totalVariance() const;

private:
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Propagator/ActionList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace Acts {
/// @brief ActionList implementation to be used with the propagator
///
/// This is the ActionList struct that is used in the propagator
/// to define a list of different actors_t that are eacch
/// to define a list of different actors_t that are each
/// executed during the stepping procedure
template <typename... actors_t>
struct ActionList : public detail::Extendable<actors_t...> {
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Propagator/AtlasStepper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <cmath>
#include <functional>

// This is based original stepper code from the ATLAS RungeKuttePropagator
// This is based original stepper code from the ATLAS RungeKuttaPropagator
namespace Acts {

/// @brief the AtlasStepper implementation for the
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Surfaces/AnnulusBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class AnnulusBounds : public DiscBounds {
std::vector<Vector2> corners() const;

/// This method returns the xy coordinates of the four corners of the
/// bounds in module coorindates (in x/y)
/// bounds in module coordinates (in x/y)
/// Starting from the upper right (max R, pos locX) and proceeding clock-wise
/// i.e. (max R; pos locX), (min R; pos locX), (min R; neg loc X), (max R: neg
/// locX)
Expand Down Expand Up @@ -194,7 +194,7 @@ class AnnulusBounds : public DiscBounds {
virtual bool inside(const Vector2& lposition, double tolR,
double tolPhi) const final;

/// Transform the strip cartesien
/// Transform the strip cartesian
/// into the module polar system
///
/// @param vStripXY the position in the cartesian strip system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class CombinatorialKalmanFilter {
private:
using KalmanNavigator = typename propagator_t::Navigator;

/// The propgator for the transport and material update
/// The propagator for the transport and material update
propagator_t m_propagator;

std::unique_ptr<const Logger> m_logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace detail {

/// Clusterise tracks based on shared hits
///
/// @param trackMap : Multimap storing pair of track ID and vector of measurement ID. The keys are the number of measurement and are just there to focilitate the ordering.
/// @param trackMap : Multimap storing pair of track ID and vector of measurement ID. The keys are the number of measurement and are just there to facilitate the ordering.
/// @return an unordered map representing the clusters, the keys the ID of the primary track of each cluster and the store a vector of track IDs.
std::unordered_map<int, std::vector<int>> clusterDuplicateTracks(
const std::multimap<int, std::pair<int, std::vector<int>>>& trackMap);
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/TrackFitting/KalmanFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class KalmanFitter {
m_actorLogger{m_logger->cloneWithSuffix("Actor")} {}

private:
/// The propgator for the transport and material update
/// The propagator for the transport and material update
propagator_t m_propagator;

/// The logger instance
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Utilities/AlgebraHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ inline ActsMatrix<A::RowsAtCompileTime, B::ColsAtCompileTime> blockedMult(
/// FPE "safe" functions
///
/// Our main motivation for this is that users might have a strict FPE policy
/// which would flag every single occurrence as a failure and then sombody has
/// which would flag every single occurrence as a failure and then somebody has
/// to investigate. Since we are processing a high number of events and floating
/// point numbers sometimes work in mysterious ways the caller of this function
/// might want to hide FPEs and handle them in a more controlled way.
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Utilities/detail/AxisFwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace detail {
/// - Bound: out-of-bounds positions resolve to first/last bin
/// respectively
/// - Closed: out-of-bounds positions resolve to the outermost
/// bin on the oppsite side
/// bin on the opposite side
enum class AxisBoundaryType { Open, Bound, Closed };

/// Enum which determines the binning type of the axis
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Material/AverageMaterials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Acts::MaterialSlab Acts::detail::combineSlabs(const MaterialSlab& slab1,
//
// A = (N1*A1 + N2*A2) / (N1+N2) = (N1/N)*A1 + (N2/N)*A2 = W1*A1 + W2*A2
//
// the number of atoms/molecues in a given volume V with molar density rho is
// the number of atoms/molecules in a given volume V with molar density rho is
//
// N = V * rho * Na
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class AlignmentAlgorithm final : public IAlgorithm {
/// Framework execute method of the alignment algorithm
///
/// @param ctx is the algorithm context that holds event-wise information
/// @return a process code to steer the algporithm flow
/// @return a process code to steer the algorithm flow
ActsExamples::ProcessCode execute(
const ActsExamples::AlgorithmContext& ctx) const override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ auto AlignedDetector::finalize(
-> std::pair<TrackingGeometryPtr, ContextDecorators> {
ContextDecorators aContextDecorators;

// Let's create a reandom number service
// Let's create a random number service
ActsExamples::RandomNumbers::Config randomNumberConfig;
randomNumberConfig.seed = cfg.seed;
auto randomNumberSvc =
Expand Down
2 changes: 1 addition & 1 deletion Examples/Python/python/acts/examples/geant4/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import sys

# Cannot conveniently catch linker errors, so we launch a suprocess to
# Cannot conveniently catch linker errors, so we launch a subprocess to
# try importing and see if it works in order to provide a useful error message
try:
subprocess.check_call(
Expand Down
4 changes: 2 additions & 2 deletions Fatras/include/ActsFatras/EventData/Barcode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace ActsFatras {
/// A simulation module might generate an interaction and create two new
/// particles. These are descendants of the initial particle and the simulation
/// module can generate the new barcodes directly by increasing the
/// generation number and chosing sub-particle identifiers:
/// generation number and choosing sub-particle identifiers:
///
/// 2|0|14|1|0 -> vertex=2 (primary), particle=14, generation=1, sub=0
/// 2|0|14|1|1 -> vertex=2 (primary), particle=14, generation=1, sub=1
Expand All @@ -69,7 +69,7 @@ namespace ActsFatras {
///
/// ## Possible issues
///
/// The hierachical nature of the barcode allows barcode creation without
/// The hierarchical nature of the barcode allows barcode creation without
/// a central service. Since the full history is not stored, generated barcodes
/// for higher-generation particles can overlap when generated by independent
/// interactions. Assuming an initial primary particle with barcode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Acts {

/// Clusterise tracks based on shared hits
///
/// @param trackMap : Multimap storing pair of track ID and vector of measurement ID. The keys are the number of measurement and are just there to focilitate the ordering.
/// @param trackMap : Multimap storing pair of track ID and vector of measurement ID. The keys are the number of measurement and are just there to facilitate the ordering.
/// @param tracks : Track container with all the track to be clustered
/// @param epsilon : Maximum distance between 2 tracks to be clustered
/// @param minPoints : Minimum number of tracks to create a cluster
Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/Core/Geometry/AlignmentContextTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ BOOST_AUTO_TEST_CASE(AlignmentContextTests) {

const auto& alignedSurface = alignedElement.surface();

// The alignment centexts
// The alignment contexts
GeometryContext defaultContext{AlignmentContext{}};
GeometryContext negativeContext{AlignmentContext{alignmentStore, 0}};
GeometryContext positiveContext{AlignmentContext{alignmentStore, 1}};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ BOOST_AUTO_TEST_CASE(MultipleDifferentTracks) {
CHECK_CLOSE_REL(average.material().L0(), 2 * unit.material().L0(), eps);
CHECK_CLOSE_REL(average.material().molarDensity(),
0.5f * unit.material().molarDensity(), eps);
// averag atom is still the same species
// average atom is still the same species
CHECK_CLOSE_REL(average.material().Ar(), unit.material().Ar(), eps);
// averag atomic number proportional to the thickness
// average atomic number proportional to the thickness
CHECK_CLOSE_REL(average.material().Z(), 0.5 * unit.material().Z(), eps);
// thickness in x0/l0 depends on density and thus halved as well
BOOST_CHECK_EQUAL(average.thicknessInX0(), 1 * unit.thicknessInX0());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ BOOST_AUTO_TEST_CASE(AccumulatedSurfaceMaterial_construction_test) {
BOOST_CHECK_EQUAL(material0D.splitFactor(), 0.);

// Test:
// BinnesSurfaceMatieral accumulation - 1D
// BinsSurfaceMaterial accumulation - 1D
BinUtility binUtility1D(10, -5., 5., open, binX);
AccumulatedSurfaceMaterial material1D{binUtility1D};
auto accMat1D = material1D.accumulatedMaterial();
BOOST_CHECK_EQUAL(accMat1D.size(), 1u);
BOOST_CHECK_EQUAL(accMat1D[0].size(), 10u);

// Test:
// BinnesSurfaceMatieral accumulation - 2D
// BinsSurfaceMaterial accumulation - 2D
BinUtility binUtility2D(10, -5., 5., open, binX);
binUtility2D += BinUtility(20, -10., 10., open, binY);
AccumulatedSurfaceMaterial material2D{binUtility2D};
Expand Down Expand Up @@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE(AccumulatedSurfaceMaterial_fill_convert_1D) {
MaterialSlab three(mat, 3.);
MaterialSlab four(mat, 4.);

// BinnesSurfaceMatieral accumulation - 2D
// BinsSurfaceMaterial accumulation - 2D
BinUtility binUtility2D(2, -1., 1., open, binX);
binUtility2D += BinUtility(2, -1., 1., open, binY);
AccumulatedSurfaceMaterial material2D{binUtility2D};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct NaivgatorState {
TrackingVolume* currentVolume = nullptr;
};

/// @brief Simplified propgator state
/// @brief Simplified propagator state
struct State {
struct {
Direction direction = Direction::Forward;
Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/Core/Surfaces/AnnulusBoundsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ double maxPhi = 1.33970;

Vector2 offset(-2., 2.);

// Unit tests for AnnulusBounds constrcuctors
// Unit tests for AnnulusBounds constructors
BOOST_AUTO_TEST_CASE(AnnulusBoundsConstruction) {
// Test construction with radii and default sector
auto original = AnnulusBounds(minRadius, maxRadius, minPhi, maxPhi, offset);
Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/Plugins/Json/AlgebraJsonConverterTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE(TransformTranspose) {
0.0997267, 0.994574, -0.0296247,
-0.0641331, 0.0361362, 0.997287};

// Test standard writig
// Test standard writing
Transform3JsonConverter::Options standardOptions{true, false};
nlohmann::json standardOut =
Transform3JsonConverter::toJson(reference, standardOptions);
Expand Down

0 comments on commit c38a416

Please sign in to comment.