Loading src/core/geometry/DetectorModel.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -200,14 +200,14 @@ bool DetectorModel::isWithinImplant(const ROOT::Math::XYZPoint& local_pos) const /** * The definition of the pixel grid size is determined by the detector model */ bool DetectorModel::isWithinPixelGrid(const Pixel::Index& pixel_index) const { bool DetectorModel::isWithinMatrix(const Pixel::Index& pixel_index) const { return !(pixel_index.x() >= number_of_pixels_.x() || pixel_index.y() >= number_of_pixels_.y()); } /** * The definition of the pixel grid size is determined by the detector model */ bool DetectorModel::isWithinPixelGrid(const int x, const int y) const { bool DetectorModel::isWithinMatrix(const int x, const int y) const { return !(x < 0 || x >= static_cast<int>(number_of_pixels_.x()) || y < 0 || y >= static_cast<int>(number_of_pixels_.y())); } Loading @@ -231,7 +231,7 @@ std::set<Pixel::Index> DetectorModel::getNeighbors(const Pixel::Index& idx, cons for(int x = static_cast<int>(idx.x() - distance); x <= static_cast<int>(idx.x() + distance); x++) { for(int y = static_cast<int>(idx.y() - distance); y <= static_cast<int>(idx.y() + distance); y++) { if(!isWithinPixelGrid(x, y)) { if(!isWithinMatrix(x, y)) { continue; } neighbors.insert({static_cast<unsigned int>(x), static_cast<unsigned int>(y)}); Loading src/core/geometry/DetectorModel.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -384,7 +384,7 @@ namespace allpix { * @param pixel_index Pixel index to be checked * @return True if pixel_index is within the pixel grid, false otherwise */ virtual bool isWithinPixelGrid(const Pixel::Index& pixel_index) const; virtual bool isWithinMatrix(const Pixel::Index& pixel_index) const; /** * @brief Returns if a set of pixel coordinates is within the grid of pixels defined for the device Loading @@ -392,7 +392,7 @@ namespace allpix { * @param y Y- (or row-) coordinate to be checked * @return True if pixel coordinates are within the pixel grid, false otherwise */ virtual bool isWithinPixelGrid(const int x, const int y) const; virtual bool isWithinMatrix(const int x, const int y) const; /** * @brief Returns a pixel center in local coordinates Loading src/modules/CapacitiveTransfer/CapacitiveTransferModule.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -290,7 +290,7 @@ void CapacitiveTransferModule::run(Event* event) { auto ycoord = ypixel + static_cast<int>(row - static_cast<size_t>(std::floor(matrix_rows_ / 2))); // Ignore if out of pixel grid if(!detector_->getModel()->isWithinPixelGrid(xcoord, ycoord)) { if(!detector_->getModel()->isWithinMatrix(xcoord, ycoord)) { LOG(DEBUG) << "Skipping set of propagated charges at " << propagated_charge.getLocalPosition() << " because their nearest pixel (" << xpixel << "," << ypixel << ") is outside the pixel matrix"; Loading src/modules/PulseTransfer/PulseTransferModule.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ void PulseTransferModule::run(Event* event) { auto [xpixel, ypixel] = model->getPixelIndex(position); // Ignore if out of pixel grid if(!detector_->getModel()->isWithinPixelGrid(xpixel, ypixel)) { if(!detector_->getModel()->isWithinMatrix(xpixel, ypixel)) { LOG(TRACE) << "Skipping set of " << propagated_charge.getCharge() << " propagated charges at " << Units::display(propagated_charge.getLocalPosition(), {"mm", "um"}) << " because their nearest pixel (" << xpixel << "," << ypixel << ") is outside the grid"; Loading src/modules/SimpleTransfer/SimpleTransferModule.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ void SimpleTransferModule::run(Event* event) { auto [xpixel, ypixel] = model_->getPixelIndex(position); // Ignore if out of pixel grid if(!detector_->getModel()->isWithinPixelGrid(xpixel, ypixel)) { if(!detector_->getModel()->isWithinMatrix(xpixel, ypixel)) { LOG(TRACE) << "Skipping set of " << propagated_charge.getCharge() << " propagated charges at " << Units::display(propagated_charge.getLocalPosition(), {"mm", "um"}) << " because their nearest pixel (" << xpixel << "," << ypixel << ") is outside the grid"; Loading Loading
src/core/geometry/DetectorModel.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -200,14 +200,14 @@ bool DetectorModel::isWithinImplant(const ROOT::Math::XYZPoint& local_pos) const /** * The definition of the pixel grid size is determined by the detector model */ bool DetectorModel::isWithinPixelGrid(const Pixel::Index& pixel_index) const { bool DetectorModel::isWithinMatrix(const Pixel::Index& pixel_index) const { return !(pixel_index.x() >= number_of_pixels_.x() || pixel_index.y() >= number_of_pixels_.y()); } /** * The definition of the pixel grid size is determined by the detector model */ bool DetectorModel::isWithinPixelGrid(const int x, const int y) const { bool DetectorModel::isWithinMatrix(const int x, const int y) const { return !(x < 0 || x >= static_cast<int>(number_of_pixels_.x()) || y < 0 || y >= static_cast<int>(number_of_pixels_.y())); } Loading @@ -231,7 +231,7 @@ std::set<Pixel::Index> DetectorModel::getNeighbors(const Pixel::Index& idx, cons for(int x = static_cast<int>(idx.x() - distance); x <= static_cast<int>(idx.x() + distance); x++) { for(int y = static_cast<int>(idx.y() - distance); y <= static_cast<int>(idx.y() + distance); y++) { if(!isWithinPixelGrid(x, y)) { if(!isWithinMatrix(x, y)) { continue; } neighbors.insert({static_cast<unsigned int>(x), static_cast<unsigned int>(y)}); Loading
src/core/geometry/DetectorModel.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -384,7 +384,7 @@ namespace allpix { * @param pixel_index Pixel index to be checked * @return True if pixel_index is within the pixel grid, false otherwise */ virtual bool isWithinPixelGrid(const Pixel::Index& pixel_index) const; virtual bool isWithinMatrix(const Pixel::Index& pixel_index) const; /** * @brief Returns if a set of pixel coordinates is within the grid of pixels defined for the device Loading @@ -392,7 +392,7 @@ namespace allpix { * @param y Y- (or row-) coordinate to be checked * @return True if pixel coordinates are within the pixel grid, false otherwise */ virtual bool isWithinPixelGrid(const int x, const int y) const; virtual bool isWithinMatrix(const int x, const int y) const; /** * @brief Returns a pixel center in local coordinates Loading
src/modules/CapacitiveTransfer/CapacitiveTransferModule.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -290,7 +290,7 @@ void CapacitiveTransferModule::run(Event* event) { auto ycoord = ypixel + static_cast<int>(row - static_cast<size_t>(std::floor(matrix_rows_ / 2))); // Ignore if out of pixel grid if(!detector_->getModel()->isWithinPixelGrid(xcoord, ycoord)) { if(!detector_->getModel()->isWithinMatrix(xcoord, ycoord)) { LOG(DEBUG) << "Skipping set of propagated charges at " << propagated_charge.getLocalPosition() << " because their nearest pixel (" << xpixel << "," << ypixel << ") is outside the pixel matrix"; Loading
src/modules/PulseTransfer/PulseTransferModule.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ void PulseTransferModule::run(Event* event) { auto [xpixel, ypixel] = model->getPixelIndex(position); // Ignore if out of pixel grid if(!detector_->getModel()->isWithinPixelGrid(xpixel, ypixel)) { if(!detector_->getModel()->isWithinMatrix(xpixel, ypixel)) { LOG(TRACE) << "Skipping set of " << propagated_charge.getCharge() << " propagated charges at " << Units::display(propagated_charge.getLocalPosition(), {"mm", "um"}) << " because their nearest pixel (" << xpixel << "," << ypixel << ") is outside the grid"; Loading
src/modules/SimpleTransfer/SimpleTransferModule.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ void SimpleTransferModule::run(Event* event) { auto [xpixel, ypixel] = model_->getPixelIndex(position); // Ignore if out of pixel grid if(!detector_->getModel()->isWithinPixelGrid(xpixel, ypixel)) { if(!detector_->getModel()->isWithinMatrix(xpixel, ypixel)) { LOG(TRACE) << "Skipping set of " << propagated_charge.getCharge() << " propagated charges at " << Units::display(propagated_charge.getLocalPosition(), {"mm", "um"}) << " because their nearest pixel (" << xpixel << "," << ypixel << ") is outside the grid"; Loading