Commit 319309fc authored by Simon Spannagel's avatar Simon Spannagel
Browse files

PixelCharge: fix bug where times were *always* set to zero

parent f22376bd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -36,6 +36,14 @@ PixelCharge::PixelCharge(Pixel pixel, long charge, const std::vector<const Propa
        mc_particles_.emplace_back(mc_particle);
    }

    // If no appropriate reference time has been found, set them to zero:
    if(local_time_ > std::numeric_limits<double>::max()) {
        local_time_ = 0.;
    }
    if(global_time_ > std::numeric_limits<double>::max()) {
        global_time_ = 0.;
    }

    // No pulse provided, set full charge in first bin:
    pulse_.addCharge(static_cast<double>(charge), 0);
}
+2 −2
Original line number Diff line number Diff line
@@ -136,8 +136,8 @@ namespace allpix {
        long charge_{};
        Pulse pulse_{};

        double local_time_{};
        double global_time_{};
        double local_time_{std::numeric_limits<double>::infinity()};
        double global_time_{std::numeric_limits<double>::infinity()};

        std::vector<PointerWrapper<PropagatedCharge>> propagated_charges_;
        std::vector<PointerWrapper<MCParticle>> mc_particles_;