Skip to content

Commit

Permalink
grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
AJPfleger committed Oct 5, 2023
1 parent 6f3b50e commit 7c9c42c
Show file tree
Hide file tree
Showing 83 changed files with 120 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ TrackAlignmentState trackAlignmentState(
// The direction
const Vector3 direction = freeParams.segment<3>(eFreeDir0);
// The derivative of free parameters w.r.t. path length. @note Here, we
// assumes a linear track model, i.e. negecting the change of track
// assume a linear track model, i.e. neglecting the change of track
// direction. Otherwise, we need to know the magnetic field at the free
// parameters
FreeVector pathDerivative = FreeVector::Zero();
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Definitions/TrackParametrization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
namespace Acts {

// Note:
// The named indices are use to access raw data vectors and matrices at the
// lowest level. Since the interpretation of some of the components, e.g. local
// The named indices are used to access raw data vectors and matrices at the
// lowest level. Since the interpretation of some components, e.g. local
// position and the inverse-momentum-like component, depend on additional
// information the names have some ambiguity. This can only be resolved at a
// higher logical level and no attempt is made to resolve it here.
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Geometry/CylinderVolumeBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ struct WrappingConfig {
sl << "New container built with configuration: "
<< containerVolumeConfig.toString() << '\n';
}
// go through the new new ones first
// go through the new ones first
if (nVolumeConfig) {
sl << " - n: Negative Endcap, current configuration: "
<< nVolumeConfig.toString() << '\n';
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Seeding/CandidatesForMiddleSp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class CandidatesForMiddleSp {

// The following vectors store indexes to elements in the storage
// They are sorted as a min heap tree, in which
// Each node is lower then its children
// Each node is lower than its children
// Thus, it is guaranteed that the lower elements is at the front
// Sorting criteria is the seed quality
//
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Seeding/CandidatesForMiddleSp.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void CandidatesForMiddleSp<external_space_point_t>::bubbledw(
// This is done by comparing its weight with the weights of its two
// children. Few things can happen:
// - there are no children
// - the current weight is lower then the weight of the children
// - the current weight is lower than the weight of the children
// - at least one of the children has a lower weight
// In the first two cases we stop, since we are already in the correct
// position
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Seeding/SeedFilter.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ void SeedFilter<external_spacepoint_t>::filterSeeds_2SpFixed(
// if we have not yet reached our max number of quality seeds we add the
// new seed to outCont

// Internally, "push" will also checks the max number of quality seeds
// Internally, "push" will also check the max number of quality seeds
// for a middle sp.
// If this is reached, we remove the seed with lowest weight.
// If this is reached, we remove the seed with the lowest weight.
candidates_collector.push(bottomSP, middleSP, *topSpVec[topSPIndex],
weight, zOrigin, true);
if (seedFilterState.numQualitySeeds < m_cfg.maxQualitySeedsPerSpMConf) {
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Seeding/SeedFinder.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ inline void SeedFinder<external_spacepoint_t, platform_t>::filterCandidates(
}

state.topSpVec.push_back(state.compatTopSP[t]);
// inverse diameter is signed depending if the curvature is
// inverse diameter is signed depending on if the curvature is
// positive/negative in phi
state.curvatures.push_back(B / std::sqrt(S2));
state.impactParameters.push_back(Im);
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Seeding/SeedFinderOrthogonal.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ void SeedFinderOrthogonal<external_spacepoint_t>::filterCandidates(

if (Im <= m_config.impactMax) {
top_valid.push_back(top[t]);
// inverse diameter is signed depending if the curvature is
// inverse diameter is signed depending on if the curvature is
// positive/negative in phi
curvatures.push_back(B / std::sqrt(S2));
impactParameters.push_back(Im);
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Seeding/SeedFinderUtils.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ inline void transformCoordinates(Acts::SpacePointData& spacePointData,
callable_t&& extractFunction) {
auto [xM, yM, zM, rM, varianceRM, varianceZM] = extractFunction(spM);

// resize + operator[] is faster then reserve and push_back
// resize + operator[] is faster than reserve and push_back
linCircleVec.resize(vec.size());

float cosPhiM = xM / rM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ struct CombinatorialKalmanFilterResult {
// Fitted states that the actor has handled.
traj_t* fittedStates{nullptr};

// These is used internally to store candidate trackstates
// This is used internally to store candidate trackstates
std::shared_ptr<traj_t> stateBuffer;
std::vector<typename traj_t::TrackStateProxy> trackStateCandidates;

Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/TrackFitting/detail/GsfActor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ struct GsfActor {
updateStepper(state, stepper, navigator, componentCache);
}

// If we only done preUpdate before, now do postUpdate
// If we have only done preUpdate before, now do postUpdate
if (haveMaterial && haveMeasurement) {
applyMultipleScattering(state, stepper, navigator,
MaterialUpdateStage::PostUpdate);
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Utilities/BoundingBox.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ bool Acts::AxisAlignedBoundingBox<entity_t, value_t, DIM>::intersect(
const vertex_array_type fr_vmax = m_vmax - fr.origin();

// For each plane, find the p-vertex, which is the vertex that is at the
// furthest distance from the plane *along* it's normal direction.
// furthest distance from the plane *along* its normal direction.
// See Fig. 2 in [2].
VertexType p_vtx;
// for loop, we could eliminate this, probably,
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Utilities/Holders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct ValueHolder {
// a SEGFAULT in GCC11 (an up?). Re-evaluate down the line
/* explicit */ ValueHolder(T&& _val) : val{std::move(_val)} {}

// Does it makes sense to allow copy operations?
// Does it make sense to allow copy operations?

const T& operator*() const { return val; }
T& operator*() { return val; }
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Utilities/detail/Subspace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class FixedSizeSubspace {
constexpr bool contains(size_t index) const {
bool isContained = false;
// always iterate over all elements to avoid branching and hope the compiler
// can optimized this for us.
// can optimise this for us.
for (auto a : m_axes) {
isContained = (isContained or (a == index));
}
Expand All @@ -138,7 +138,7 @@ class FixedSizeSubspace {

/// Project a full vector into the subspace.
///
/// @tparam fullspace_vector_t Veector type in the full space
/// @tparam fullspace_vector_t Vector type in the full space
/// @param full Vector in the full space
/// @return Subspace vector w/ just the configured axis components
///
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Utilities/detail/grid_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class GlobalNeighborHoodIndices {
return result;
}

// Collect the sequence of indices into an vector
// Collect the sequence of indices into a vector
auto collect() const {
boost::container::small_vector<size_t, ipow(3, DIM)> result;
result.reserve(this->size());
Expand Down
2 changes: 1 addition & 1 deletion Core/scripts/print_units_physical_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@


def print_constants(constants):
# find largest name first for consistent formatting
# find the largest name first for consistent formatting
max_len_name = max((len(n) for n, *_ in constants))
line_format = f"{{:>{max_len_name}}}: {{}} {{}}"
for name, value, unit in constants:
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Detector/detail/CylindricalDetectorHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ Acts::Experimental::detail::CylindricalDetectorHelper::connectInZ(
// Check for bounds compatibility
// We check phi sector (3u) and average phi (4u)
std::vector<std::array<unsigned int, 2u>> checks = {{3u, 3u}, {4u, 4u}};
// And we check the inner radius [0u], outer radius[1u] if its' not a
// And we check the inner radius [0u], outer radius[1u] if it is not a
// selective attachment
if (selectedOnly.empty()) {
checks.push_back({0u, 0u});
Expand Down
7 changes: 3 additions & 4 deletions Core/src/Digitization/CartesianSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,9 @@ void Acts::CartesianSegmentation::createSegmentationSurfaces(
-m_activeBounds->boundingBox().halfLengthX() + ibinx * pitchX;
// (i) this is the low/high boundary --- ( ibin == 0/m_binUtility->bins(0) )
if ((ibinx == 0u) || ibinx == m_binUtility->bins(0)) {
// check if it a straight boundary or not: always straight for no lorentz
// angle,
// and either the first boundary or the last depending on lorentz &
// readout
// check if it is a straight boundary or not: always straight for no
// lorentz angle, and either the first boundary or the last depending on
// lorentz and readout
bool boundaryStraight =
(lorentzAngle == 0. ||
((ibinx == 0u) && readoutDirection * lorentzAngle > 0.) ||
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Geometry/CylinderVolumeHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Acts::CylinderVolumeHelper::createContainerTrackingVolume(
"(required) - returning 0 ");
return nullptr;
}
// Check whether it is a r-binned case or a z-binned case
// Check whether it is an r-binned case or a z-binned case
bool rCase =
std::abs(firstVolumeBounds->get(CylinderVolumeBounds::eMinR) -
lastVolumeBounds->get(CylinderVolumeBounds::eMinR)) > 0.1;
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Geometry/Extent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void Acts::Extent::extend(const Vector3& vtx,
const std::vector<BinningValue>& bValues,
bool applyEnv, bool fillHistograms) {
for (auto bValue : bValues) {
// Get the casted value given the binnin value description
// Get the casted value given the binning value description
ActsScalar cValue = VectorHelpers::cast(vtx, bValue);
if (fillHistograms) {
m_valueHistograms[bValue].push_back(cValue);
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 @@ -34,7 +34,7 @@ Acts::MaterialSlab Acts::detail::combineSlabs(const MaterialSlab& slab1,
double thickness = static_cast<double>(slab1.thickness()) +
static_cast<double>(slab2.thickness());

// if the two materials are the same there is not need for additional
// if the two materials are the same there is no need for additional
// computation
if (mat1 == mat2) {
return {mat1, static_cast<float>(thickness)};
Expand Down
4 changes: 2 additions & 2 deletions Core/src/Material/MaterialGridHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Acts::Grid2D Acts::createGrid2D(
throw std::invalid_argument("Incorrect bin, should be x,y,z or r,phi,z");
}

// First we nee to create the 2 axis
// First we need to create the 2 axis
MaterialGridAxisData gridAxis1{bu[0].min, bu[0].max, bu[0].bins()};
MaterialGridAxisData gridAxis2{bu[1].min, bu[1].max, bu[1].bins()};

Expand All @@ -170,7 +170,7 @@ Acts::Grid3D Acts::createGrid3D(
const Acts::BinUtility& bins,
std::function<Acts::Vector3(Acts::Vector3)>& transfoGlobalToLocal) {
auto bu = bins.binningData();
// First we nee to create the 3 axis
// First we need to create the 3 axis

bool isCartesian = false;
bool isCylindrical = false;
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Material/MaterialSlab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Acts::MaterialSlab::MaterialSlab(const std::vector<MaterialSlab>& layers)
// layers are sorted by thickness/mass density. then, the later terms
// of the averaging are only small corrections to the large average of
// the initial layers. this could be enforced by sorting the layers first,
// but i am not sure if this is actually a problem.
// but I am not sure if this is actually a problem.
// NOTE yes, this loop is exactly like std::reduce which apparently does not
// exist on gcc 8 although it is required by C++17.
for (const auto& layer : layers) {
Expand Down
4 changes: 2 additions & 2 deletions Core/src/Material/VolumeMaterialMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ void Acts::VolumeMaterialMapper::createExtraHits(
}

if (remainder > 0) {
// We need to had an additional extra hit with the remainder length. Adjust
// We need to have an additional extra hit with the remainder length. Adjust
// the thickness of the last extrapolated step
properties.scaleThickness(remainder / properties.thickness());
Vector3 extraPosition = position + volumeStep * direction;
Expand Down Expand Up @@ -430,7 +430,7 @@ void Acts::VolumeMaterialMapper::mapMaterialTrack(
if (volIter != mappingVolumes.end() &&
!volIter->volume->inside(rmIter->position)) {
// Check if the material point is past the entry point to the current
// volume (this prevent switching volume before the first volume has been
// volume (this prevents switching volume before the first volume has been
// reached)
double distVol = (volIter->position - mTrack.first.first).norm();
double distMat = (rmIter->position - mTrack.first.first).norm();
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Surfaces/AnnulusBounds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ bool Acts::AnnulusBounds::inside(const Vector2& lposition,
return true;
}

// we need to rotated the locpo
// we need to rotate the locpo
Vector2 locpo_rotated = m_rotationStripPC * lposition;

// covariance is given in STRIP SYSTEM in PC
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Surfaces/ConeSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Acts::Polyhedron Acts::ConeSurface::polyhedronRepresentation(

auto ctransform = transform(gctx);

// The tip - created only once and only, if the it's not a cut-off cone
// The tip - created only once and only, if it is not a cut-off cone
bool tipExists = false;
if (minZ * maxZ <= s_onSurfaceTolerance) {
vertices.push_back(ctransform * Vector3(0., 0., 0.));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct GeometricConfig {
ActsFatras::SingleParameterSmearFunction<ActsExamples::RandomEngine>
chargeSmearer = Digitization::Exact{};

// The threshold below an cell activation is ignored
// The threshold below a cell activation is ignored
double threshold = 0.;

// Whether to assume digital readout (activation is either 0 or 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ ActsExamples::ProcessCode ActsExamples::PlanarSteppingAlgorithm::execute(
continue;
}

// lets create a cluster - centroid method
// let's create a cluster - centroid method
double localX = 0.;
double localY = 0.;
double totalPath = 0.;
Expand Down
2 changes: 1 addition & 1 deletion Examples/Algorithms/Geant4HepMC/src/SteppingAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void SteppingAction::UserSteppingAction(const G4Step* step) {
auto postParticle = std::make_shared<::HepMC3::GenParticle>(
mom4, track->GetDynamicParticle()->GetPDGcode());

// The process the led to the current state
// The process that led to the current state
auto process = std::make_shared<::HepMC3::StringAttribute>(
step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class HoughTransformSeeder final : public IAlgorithm {
// one simple example, one may consider that hits with z < 50 mm belong to
// one subregion, and hits with z > -50 mm belong to a second subregion.
// Note that hits even in this toy example belong to more than one
// subregions. But since not all hits are considered this provides a way to
// subregion. But since not all hits are considered this provides a way to
// reduce potential combinatorics

std::vector<int> subRegions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ void ActsExamples::HoughTransformSeeder::addMeasurements(
}

for (auto& sourceLink : moduleSourceLinks) {
// extract a local position/covariance independent from the concrecte
// extract a local position/covariance independent of the concrete
// measurement content. since we do not know if and where the local
// parameters are contained in the measurement parameters vector, they
// are transformed to the bound space where we do know their location.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class CsvMeasurementReader final : public IReader {
/// Output cluster collection (optional).
std::string outputClusters;

/// Input SimHits for measurment-particle map (optional)
/// Input SimHits for measurement-particle map (optional)
std::string inputSimHits;
/// Output measurement to particle collection (optional)
/// @note Only filled if inputSimHits is given
Expand Down
10 changes: 5 additions & 5 deletions Examples/Io/Csv/src/CsvMeasurementReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ std::vector<ActsExamples::MeasurementData> readMeasurementsByGeometryId(
ActsExamples::ClusterContainer makeClusters(
const std::unordered_multimap<std::size_t, ActsExamples::CellData>&
cellDataMap,
std::size_t nMeasurments) {
std::size_t nMeasurements) {
using namespace ActsExamples;
ClusterContainer clusters;

for (auto index = 0ul; index < nMeasurments; ++index) {
for (auto index = 0ul; index < nMeasurements; ++index) {
auto [begin, end] = cellDataMap.equal_range(index);

// Fill the channels with the iterators
Expand Down Expand Up @@ -273,7 +273,7 @@ ActsExamples::ProcessCode ActsExamples::CsvMeasurementReader::read(
measurements.emplace_back(std::move(meas));
}

// Generate measurment-particles-map
// Generate measurement-particles-map
if (m_inputHits.isInitialized() &&
m_outputMeasurementParticlesMap.isInitialized()) {
const auto hits = m_inputHits(ctx);
Expand Down Expand Up @@ -303,8 +303,8 @@ ActsExamples::ProcessCode ActsExamples::CsvMeasurementReader::read(

std::vector<ActsExamples::CellData> cellData;

// This allows seamless import of files created with a older version where
// the measurment_id-column is still named hit_id
// This allows seamless import of files created with an older version where
// the measurement_id-column is still named hit_id
try {
cellData = readEverything<ActsExamples::CellData>(
m_cfg.inputDir, "cells.csv", {"timestamp"}, ctx.eventNumber);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ struct ActsExamples::TrackFinderPerformanceWriter::Impl {
// extract per-particle reconstruction counts
// empty track hits counts could originate from a buggy track finder
// that results in empty tracks or from purely noise track where no hits
// is from a particle.
// are from a particle.
if (not particleHitCounts.empty()) {
auto it = majorityCount
.try_emplace(particleHitCounts.front().particleId, 0u)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ ActsExamples::ProcessCode ActsExamples::VertexPerformanceWriter::writeT(
// Perigee at the true vertex position
const std::shared_ptr<Acts::PerigeeSurface> perigeeSurface =
Acts::Surface::makeShared<Acts::PerigeeSurface>(truePos.head(3));
// Setting the geometry/magnetic field context context for the event
// Setting the geometry/magnetic field context for the event
Acts::PropagatorOptions pOptions(ctx.geoContext, ctx.magFieldContext);
// Lambda for propagating the tracks to the PCA
auto propagateToVtx = [&](const auto& params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class RootSimHitReader : public IReader {
std::unordered_map<std::string_view, std::int32_t> m_int32Columns;

// For some reason I need to use here `unsigned long long` instead of
// `uint64_t` to prevent a internal ROOT type mismatch...
// `uint64_t` to prevent an internal ROOT type mismatch...
std::unordered_map<std::string_view, unsigned long long> m_uint64Columns;
};

Expand Down
2 changes: 1 addition & 1 deletion Examples/Io/Root/src/RootMaterialTrackWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ ActsExamples::ProcessCode ActsExamples::RootMaterialTrackWriter::writeT(
m_v_phi = phi(mtrack.first.second);
m_v_eta = eta(mtrack.first.second);

// an now loop over the material
// and now loop over the material
for (const auto& mint : materialInteractions) {
auto direction = mint.direction.normalized();

Expand Down
Loading

0 comments on commit 7c9c42c

Please sign in to comment.