Commit 54593ca6 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Linter findings

parent 326e54c9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@

using namespace allpix;

PixelDetectorModel::PixelDetectorModel(std::string type, ConfigReader reader) : DetectorModel(std::move(type), reader) {
PixelDetectorModel::PixelDetectorModel(std::string type, const ConfigReader& reader)
    : DetectorModel(std::move(type), reader) {
    using namespace ROOT::Math;
    auto config = reader.getHeaderConfiguration();

+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ namespace allpix {
         * @param type Name of the model type
         * @param reader Configuration reader with description of the model
         */
        explicit PixelDetectorModel(std::string type, ConfigReader reader);
        explicit PixelDetectorModel(std::string type, const ConfigReader& reader);

        /**
         * @brief Returns if a local position is within the sensitive device
+7 −7
Original line number Diff line number Diff line
@@ -152,15 +152,15 @@ void GenericPropagationModule::create_output_plots(uint64_t event_num,
    double start_time = std::numeric_limits<double>::max();
    unsigned int total_charge = 0;
    unsigned int max_charge = 0;
    for(auto& [deposit, points] : output_plot_points) {
        for(auto& point : points) {
    for(const auto& [deposit, points] : output_plot_points) {
        for(const auto& point : points) {
            minX = std::min(minX, point.x() / scale_x);
            maxX = std::max(maxX, point.x() / scale_x);

            minY = std::min(minY, point.y() / scale_y);
            maxY = std::max(maxY, point.y() / scale_y);
        }
        auto& [time, charge, type, state] = deposit;
        const auto& [time, charge, type, state] = deposit;
        start_time = std::min(start_time, time);
        total_charge += charge;
        max_charge = std::max(max_charge, charge);
@@ -241,14 +241,14 @@ void GenericPropagationModule::create_output_plots(uint64_t event_num,
    // The vector of unique_pointers is required in order not to delete the objects before the canvas is drawn.
    std::vector<std::unique_ptr<TPolyLine3D>> lines;
    short current_color = 1;
    for(auto& [deposit, points] : output_plot_points) {
    for(const auto& [deposit, points] : output_plot_points) {
        // Check if we should plot this point:
        if(plotting_state != CarrierState::UNKNOWN && plotting_state != std::get<3>(deposit)) {
            continue;
        }

        auto line = std::make_unique<TPolyLine3D>();
        for(auto& point : points) {
        for(const auto& point : points) {
            line->SetNextPoint(point.x() / scale_x, point.y() / scale_y, point.z());
        }
        // Plot all lines with at least three points with different color
@@ -384,8 +384,8 @@ void GenericPropagationModule::create_output_plots(uint64_t event_num,
            text->Draw();

            // Plot all the required points
            for(auto& [deposit, points] : output_plot_points) {
                auto& [time, charge, type, state] = deposit;
            for(const auto& [deposit, points] : output_plot_points) {
                const auto& [time, charge, type, state] = deposit;

                // Check if we should plot this point:
                if(plotting_state != CarrierState::UNKNOWN && plotting_state != state) {
+4 −4
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ namespace allpix {
     */
    class JacoboniCanali : virtual public MobilityModel {
    public:
        JacoboniCanali(double temperature)
        explicit JacoboniCanali(double temperature)
            : electron_Vm_(Units::get(1.53e9 * std::pow(temperature, -0.87), "cm/s")),
              electron_Beta_(2.57e-2 * std::pow(temperature, 0.66)),
              hole_Vm_(Units::get(1.62e8 * std::pow(temperature, -0.52), "cm/s")),
@@ -97,7 +97,7 @@ namespace allpix {
     */
    class Canali : virtual public JacoboniCanali {
    public:
        Canali(double temperature) : JacoboniCanali(temperature) {
        explicit Canali(double temperature) : JacoboniCanali(temperature) {
            electron_Vm_ = Units::get(1.43e9 * std::pow(temperature, -0.87), "cm/s");
        }
    };
@@ -112,7 +112,7 @@ namespace allpix {
     */
    class Hamburg : public MobilityModel {
    public:
        Hamburg(double temperature)
        explicit Hamburg(double temperature)
            : electron_mu0_(Units::get(1530 * std::pow(temperature / 300, -2.42), "cm*cm/V/s")),
              electron_vsat_(Units::get(1.03e7 * std::pow(temperature / 300, -0.226), "cm/s")),
              hole_mu0_(Units::get(464 * std::pow(temperature / 300, -2.20), "cm*cm/V/s")),
@@ -155,7 +155,7 @@ namespace allpix {
     */
    class HamburgHighField : public Hamburg {
    public:
        HamburgHighField(double temperature) : Hamburg(temperature) {
        explicit HamburgHighField(double temperature) : Hamburg(temperature) {
            electron_mu0_ = Units::get(1430 * std::pow(temperature / 300, -1.99), "cm*cm/V/s");
            electron_vsat_ = Units::get(1.05e7 * std::pow(temperature / 300, -0.302), "cm/s");
            hole_mu0_ = Units::get(457 * std::pow(temperature / 300, -2.80), "cm*cm/V/s");
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ namespace allpix {
     */
    class Auger : virtual public RecombinationModel {
    public:
        Auger(bool doping) : auger_coefficient_(Units::get(3.8e-31, "cm*cm*cm*cm*cm*cm*/s")) {
        explicit Auger(bool doping) : auger_coefficient_(Units::get(3.8e-31, "cm*cm*cm*cm*cm*cm*/s")) {
            if(!doping) {
                throw ModelUnsuitable("No doping profile available");
            }