Commit b4edd1ca authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Codespell: fix typos in modules

parent 03958997
......@@ -17,7 +17,7 @@ using namespace std;
Clustering4D::Clustering4D(Configuration& config, std::shared_ptr<Detector> detector)
: Module(config, detector), m_detector(detector) {
// Backwards compatibilty: also allow timing_cut to be used for time_cut_abs
// Backwards compatibility: also allow timing_cut to be used for time_cut_abs
config_.setAlias("time_cut_abs", "timing_cut", true);
config_.setAlias("neighbor_radius_row", "neighbour_radius_row", true);
config_.setAlias("neighbor_radius_col", "neighbour_radius_col", true);
......@@ -262,7 +262,7 @@ void Clustering4D::calculateClusterCentre(Cluster* cluster) {
// Loop over all pixels
for(auto& pixel : pixels) {
// If charge == 0 (use epsilon to avoid errors in floating-point arithmetics):
// If charge == 0 (use epsilon to avoid errors in floating-point arithmetic):
if(pixel->charge() < std::numeric_limits<double>::epsilon()) {
// apply arithmetic mean if a pixel has zero charge
found_charge_zero = true;
......
......@@ -210,7 +210,7 @@ void ClusteringSpatial::calculateClusterCentre(Cluster* cluster) {
// Loop over all pixels
for(auto& pixel : pixels) {
// If charge == 0 (use epsilon to avoid errors in floating-point arithmetics):
// If charge == 0 (use epsilon to avoid errors in floating-point arithmetic):
if(pixel->charge() < std::numeric_limits<double>::epsilon()) {
// apply arithmetic mean if a pixel has zero charge
found_charge_zero = true;
......
......@@ -17,7 +17,7 @@ using namespace std;
DUTAssociation::DUTAssociation(Configuration& config, std::shared_ptr<Detector> detector)
: Module(config, detector), m_detector(detector) {
// Backwards compatibilty: also allow timing_cut to be used for time_cut_abs and spatial_cut for spatial_cut_abs
// Backwards compatibility: also allow timing_cut to be used for time_cut_abs and spatial_cut for spatial_cut_abs
config_.setAlias("time_cut_abs", "timing_cut", true);
config_.setAlias("spatial_cut_abs", "spatial_cut", true);
......@@ -111,7 +111,7 @@ StatusCode DUTAssociation::run(const std::shared_ptr<Clipboard>& clipboard) {
// Loop over all tracks
for(auto& track : tracks) {
LOG(TRACE) << "Proccessing track with model " << track->getType() << ", chi2 of " << track->getChi2();
LOG(TRACE) << "Processing track with model " << track->getType() << ", chi2 of " << track->getChi2();
int assoc_cls_per_track = 0;
auto min_distance = std::numeric_limits<double>::max();
......
......@@ -79,7 +79,7 @@ void clicpix2_frameDecoder::decodeHeader(const clicpix2_frameDecoder::WORD_TYPE
void clicpix2_frameDecoder::extractColumns(std::vector<clicpix2_frameDecoder::WORD_TYPE>::const_iterator& data,
std::vector<clicpix2_frameDecoder::WORD_TYPE>::const_iterator dataEnd) {
std::array<std::array<pixelReadout, 8>, CLICPIX2_ROW * 2>
pixels_dc; // stores results of the processed doube columns (up to 8 if compression is enabled)
pixels_dc; // stores results of the processed double columns (up to 8 if compression is enabled)
std::array<size_t, 8> row_index = {
{0, 0, 0, 0, 0, 0, 0, 0}}; // 8 independent (in case of compression) counters navigating through the <pixels_dc>
std::array<int, 8> row_slice = {{CLICPIX2_PIXEL_SIZE - 1,
......@@ -248,7 +248,7 @@ void clicpix2_frameDecoder::processDCbit(std::array<std::array<pixelReadout, 8>,
if(dc_counter ==
static_cast<int>(2 * (CLICPIX2_ROW * CLICPIX2_PIXEL_SIZE + CLICPIX2_ROW / CLICPIX2_SUPERPIXEL_SIZE) + 1)) {
if(data || // not empty double-column
!DCandSuperPixelCompressionEnabled) // or collumn compression disabled
!DCandSuperPixelCompressionEnabled) // or column compression disabled
dc_counter = 0;
else { // empty double-column
for(auto i = 0; i < static_cast<int>(2 * CLICPIX2_ROW); ++i)
......
......@@ -62,10 +62,10 @@ namespace caribou {
// current RCR register value
uint8_t rcr;
// firt column of the currently analyzed part of the package
// first column of the currently analyzed part of the package
uint16_t firstColumn;
// Configutation
// Configuration
bool pixelCompressionEnabled;
bool DCandSuperPixelCompressionEnabled;
std::map<size_t, std::map<size_t, bool>> counter_config; // [row][column]
......
......@@ -266,7 +266,7 @@ StatusCode EventLoaderCLICpix2::run(const std::shared_ptr<Clipboard>& clipboard)
tot = 1;
}
// Time defaults ot rising shutter edge:
// Time defaults to rising shutter edge:
double timestamp = shutterStartTime + (shutterStopTime - shutterStartTime) / 2;
// Decide whether information is counter of ToA
......
......@@ -95,7 +95,7 @@ StatusCode EventLoaderMuPixTelescope::run(const std::shared_ptr<Clipboard>& clip
double px_timestamp = 8 * static_cast<double>(((tf.timestamp() >> 2) & 0xFFFFF700) + h.timestamp_raw());
auto p = std::make_shared<Pixel>(detectors.at(h.tag() / 4), h.column(), h.row(), 0, 0, px_timestamp);
// Select earlies and latest pixel:
// Select earliest and latest pixel:
frame_start = (px_timestamp < frame_start ? px_timestamp : frame_start);
frame_end = (px_timestamp > frame_end ? px_timestamp : frame_end);
......
......@@ -53,7 +53,7 @@ namespace corryvreckan {
void loadCalibration(std::string path, char delim, std::vector<std::vector<float>>& dat);
void maskPixels(std::string);
// configuration paramaters:
// configuration parameters:
std::string m_inputDirectory;
bool applyCalibration;
......
......@@ -72,7 +72,7 @@ template <typename T> static void add_creator(FileReader::ObjectCreatorMap& map)
}
}
// Store the ojects on the clipboard:
// Store the objects on the clipboard:
if(detector.empty()) {
clipboard->putData(std::move(data));
} else {
......@@ -190,7 +190,7 @@ void FileReader::initialize() {
// Check tree structure and if object type matches name
auto split_type = corryvreckan::split<std::string>(branch->GetClassName(), "<>");
if(split_type.size() != 2 || split_type[1].size() <= 2) {
throw ModuleError("Tree is malformed and cannot be used for creating objetcs");
throw ModuleError("Tree is malformed and cannot be used for creating objects");
}
std::string class_name = split_type[1].substr(0, split_type[1].size() - 1);
std::string corry_namespace = "corryvreckan::";
......
......@@ -33,7 +33,7 @@ void ImproveReferenceTimestamp::initialize() {
StatusCode ImproveReferenceTimestamp::run(const std::shared_ptr<Clipboard>& clipboard) {
// Recieved triggers
// Received triggers
std::vector<double> trigger_times;
// Get trigger signals
......
......@@ -67,7 +67,7 @@ StatusCode JSONWriter::run(const std::shared_ptr<Clipboard>& clipboard) {
auto class_name_full = corryvreckan::demangle(type_idx.name(), true);
LOG(TRACE) << "Received objects of type \"" << class_name << "\"";
// Check if these objects hsould be read
// Check if these objects should be read
if((!include_.empty() && include_.find(class_name) == include_.end()) ||
(!exclude_.empty() && exclude_.find(class_name) != exclude_.end())) {
LOG(TRACE) << "Ignoring object " << corryvreckan::demangle(type_idx.name())
......
......@@ -34,7 +34,7 @@ MaskCreator::MaskCreator(Configuration& config, std::shared_ptr<Detector> detect
void MaskCreator::initialize() {
// adjust per-axis bandwith for pixel pitch along each axis such that the
// adjust per-axis bandwidth for pixel pitch along each axis such that the
// covered area is approximately circular in metric coordinates.
double scale = std::hypot(m_detector->getPitch().X(), m_detector->getPitch().Y()) / M_SQRT2;
m_bandwidthCol = static_cast<int>(std::ceil(bandwidth * scale / m_detector->getPitch().X()));
......
......@@ -65,7 +65,7 @@ StatusCode TextWriter::run(const std::shared_ptr<Clipboard>& clipboard) {
auto class_name_full = corryvreckan::demangle(type_idx.name(), true);
LOG(TRACE) << "Received objects of type \"" << class_name << "\"";
// Check if these objects hsould be read
// Check if these objects should be read
if((!include_.empty() && include_.find(class_name) == include_.end()) ||
(!exclude_.empty() && exclude_.find(class_name) != exclude_.end())) {
LOG(TRACE) << "Ignoring object " << corryvreckan::demangle(type_idx.name())
......
......@@ -16,7 +16,7 @@ The DUT plane can be excluded from the track finding.
* `time_cut_abs`: Specifies an absolute value for the maximum time difference allowed between clusters and a track for association to the track. Absolute and relative time cuts are mutually exclusive. No default value.
* `spatial_cut_rel`: Factor by which the `spatial_resolution` in x and y of each detector plane will be multiplied. These calculated value are defining an ellipse which is then used as the maximum distance in the XY plane allowed between clusters and a track for association to the track. This allows the spatial cuts between different planes to be detector appropriate. By default, a relative spatial cut is applied. Absolute and relative spatial cuts are mutually exclusive. Defaults to `3.0`.
* `spatial_cut_abs`: Specifies a set of absolute value (x and y) which defines an ellipse for the maximum spatial distance in the XY plane between clusters and a track for association to the track. Absolute and relative spatial cuts are mutually exclusive. No default value.
* `min_hits_on_track`: Minium number of associated clusters needed to create a track, equivalent to the minimum number of planes required for each track. Default value is `6`.
* `min_hits_on_track`: Minimum number of associated clusters needed to create a track, equivalent to the minimum number of planes required for each track. Default value is `6`.
* `exclude_dut`: Boolean to choose if the DUT plane is included in the track finding. Default value is `true`.
* `require_detectors`: Names of detectors which are required to have a cluster on the track. If a track does not have a cluster from all detectors listed here, it is rejected. If empty, no detector is required. Default is empty.
* `timestamp_from`: Defines the detector which provides the track timestamp. This detector is by default added to `required_detector`. If empty, the average timestamp of all clusters on the track will be used. Empty by default.
......
......@@ -21,7 +21,7 @@ using namespace std;
Tracking4D::Tracking4D(Configuration& config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(config, std::move(detectors)) {
// Backwards compatibilty: also allow timing_cut to be used for time_cut_abs and spatial_cut for spatial_cut_abs
// Backwards compatibility: also allow timing_cut to be used for time_cut_abs and spatial_cut for spatial_cut_abs
config_.setAlias("time_cut_abs", "timing_cut", true);
config_.setAlias("spatial_cut_abs", "spatial_cut", true);
......
......@@ -29,7 +29,7 @@ reconstruction with a mostly colinear beam.
TrackingSpatial::TrackingSpatial(Configuration& config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(config, std::move(detectors)) {
// Backwards compatibilty: also allow spatial_cut to be used for spatial_cut_abs
// Backwards compatibility: also allow spatial_cut to be used for spatial_cut_abs
config_.setAlias("spatial_cut_abs", "spatial_cut", true);
config_.setDefault<size_t>("min_hits_on_track", 6);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment