Loading src/core/geometry/PixelDetectorModel.hpp +0 −78 Original line number Diff line number Diff line Loading @@ -41,84 +41,6 @@ namespace allpix { */ explicit PixelDetectorModel(std::string type, ConfigReader reader); /* SENSOR */ /** * @brief Get size of the sensor * @return Size of the sensor * * Calculated from \ref DetectorModel::getMatrixSize "pixel grid size", sensor excess and sensor thickness */ ROOT::Math::XYZVector getSensorSize() const override { ROOT::Math::XYZVector excess_thickness((sensor_excess_.at(1) + sensor_excess_.at(3)), (sensor_excess_.at(0) + sensor_excess_.at(2)), sensor_thickness_); return getMatrixSize() + excess_thickness; } /** * @brief Get center of the sensor in local coordinates * @return Center of the sensor * * Center of the sensor with excess taken into account */ ROOT::Math::XYZPoint getSensorCenter() const override { ROOT::Math::XYZVector offset( (sensor_excess_.at(1) - sensor_excess_.at(3)) / 2.0, (sensor_excess_.at(0) - sensor_excess_.at(2)) / 2.0, 0); return getMatrixCenter() + offset; } /** * @brief Set the thickness of the sensor * @param val Thickness of the sensor */ void setSensorThickness(double val) { sensor_thickness_ = val; } /** * @brief Set the excess at the top of the sensor (positive y-coordinate) * @param val Sensor top excess */ void setSensorExcessTop(double val) { sensor_excess_.at(0) = val; } /** * @brief Set the excess at the right of the sensor (positive x-coordinate) * @param val Sensor right excess */ void setSensorExcessRight(double val) { sensor_excess_.at(1) = val; } /** * @brief Set the excess at the bottom of the sensor (negative y-coordinate) * @param val Sensor bottom excess */ void setSensorExcessBottom(double val) { sensor_excess_.at(2) = val; } /** * @brief Set the excess at the left of the sensor (negative x-coordinate) * @param val Sensor right excess */ void setSensorExcessLeft(double val) { sensor_excess_.at(3) = val; } /* CHIP */ /** * @brief Get size of the chip * @return Size of the chip * * Calculated from \ref DetectorModel::getMatrixSize "pixel grid size", sensor excess and chip thickness */ ROOT::Math::XYZVector getChipSize() const override { ROOT::Math::XYZVector excess_thickness((sensor_excess_.at(1) + sensor_excess_.at(3)), (sensor_excess_.at(0) + sensor_excess_.at(2)), chip_thickness_); return getMatrixSize() + excess_thickness; } /** * @brief Get center of the chip in local coordinates * @return Center of the chip * * Center of the chip calculcated from chip excess and sensor offset */ ROOT::Math::XYZPoint getChipCenter() const override { ROOT::Math::XYZVector offset((sensor_excess_.at(1) - sensor_excess_.at(3)) / 2.0, (sensor_excess_.at(0) - sensor_excess_.at(2)) / 2.0, getSensorSize().z() / 2.0 + getChipSize().z() / 2.0); return getMatrixCenter() + offset; } /** * @brief Returns if a local position is within the sensitive device * @param local_pos Position in local coordinates of the detector model Loading Loading
src/core/geometry/PixelDetectorModel.hpp +0 −78 Original line number Diff line number Diff line Loading @@ -41,84 +41,6 @@ namespace allpix { */ explicit PixelDetectorModel(std::string type, ConfigReader reader); /* SENSOR */ /** * @brief Get size of the sensor * @return Size of the sensor * * Calculated from \ref DetectorModel::getMatrixSize "pixel grid size", sensor excess and sensor thickness */ ROOT::Math::XYZVector getSensorSize() const override { ROOT::Math::XYZVector excess_thickness((sensor_excess_.at(1) + sensor_excess_.at(3)), (sensor_excess_.at(0) + sensor_excess_.at(2)), sensor_thickness_); return getMatrixSize() + excess_thickness; } /** * @brief Get center of the sensor in local coordinates * @return Center of the sensor * * Center of the sensor with excess taken into account */ ROOT::Math::XYZPoint getSensorCenter() const override { ROOT::Math::XYZVector offset( (sensor_excess_.at(1) - sensor_excess_.at(3)) / 2.0, (sensor_excess_.at(0) - sensor_excess_.at(2)) / 2.0, 0); return getMatrixCenter() + offset; } /** * @brief Set the thickness of the sensor * @param val Thickness of the sensor */ void setSensorThickness(double val) { sensor_thickness_ = val; } /** * @brief Set the excess at the top of the sensor (positive y-coordinate) * @param val Sensor top excess */ void setSensorExcessTop(double val) { sensor_excess_.at(0) = val; } /** * @brief Set the excess at the right of the sensor (positive x-coordinate) * @param val Sensor right excess */ void setSensorExcessRight(double val) { sensor_excess_.at(1) = val; } /** * @brief Set the excess at the bottom of the sensor (negative y-coordinate) * @param val Sensor bottom excess */ void setSensorExcessBottom(double val) { sensor_excess_.at(2) = val; } /** * @brief Set the excess at the left of the sensor (negative x-coordinate) * @param val Sensor right excess */ void setSensorExcessLeft(double val) { sensor_excess_.at(3) = val; } /* CHIP */ /** * @brief Get size of the chip * @return Size of the chip * * Calculated from \ref DetectorModel::getMatrixSize "pixel grid size", sensor excess and chip thickness */ ROOT::Math::XYZVector getChipSize() const override { ROOT::Math::XYZVector excess_thickness((sensor_excess_.at(1) + sensor_excess_.at(3)), (sensor_excess_.at(0) + sensor_excess_.at(2)), chip_thickness_); return getMatrixSize() + excess_thickness; } /** * @brief Get center of the chip in local coordinates * @return Center of the chip * * Center of the chip calculcated from chip excess and sensor offset */ ROOT::Math::XYZPoint getChipCenter() const override { ROOT::Math::XYZVector offset((sensor_excess_.at(1) - sensor_excess_.at(3)) / 2.0, (sensor_excess_.at(0) - sensor_excess_.at(2)) / 2.0, getSensorSize().z() / 2.0 + getChipSize().z() / 2.0); return getMatrixCenter() + offset; } /** * @brief Returns if a local position is within the sensitive device * @param local_pos Position in local coordinates of the detector model Loading