Loading src/objects/PixelCharge.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -46,10 +46,34 @@ PixelCharge::PixelCharge(Pixel pixel, Pulse pulse, const std::vector<const Propa pulse_ = std::move(pulse); } const Pixel& PixelCharge::getPixel() const { return pixel_; } Pixel::Index PixelCharge::getIndex() const { return getPixel().getIndex(); } long PixelCharge::getCharge() const { return charge_; } unsigned long PixelCharge::getAbsoluteCharge() const { return static_cast<unsigned long>(std::abs(charge_)); } const Pulse& PixelCharge::getPulse() const { return pulse_; } double PixelCharge::getGlobalTime() const { return global_time_; } double PixelCharge::getLocalTime() const { return local_time_; } /** * @throws MissingReferenceException If the pointed object is not in scope * Loading src/objects/PixelCharge.hpp +6 −6 Original line number Diff line number Diff line Loading @@ -56,19 +56,19 @@ namespace allpix { * @brief Get the pixel containing the charges * @return Pixel indices in the grid */ const Pixel& getPixel() const { return pixel_; } const Pixel& getPixel() const; /** * @brief Shortcut to retrieve the pixel indices * @return Index of the pixel */ Pixel::Index getIndex() const { return getPixel().getIndex(); } Pixel::Index getIndex() const; /** * @brief Get the charge at the pixel * @return Total charge stored */ long getCharge() const { return charge_; } long getCharge() const; /** * @brief Get the absolute charge value at the pixel Loading Loading @@ -99,19 +99,19 @@ namespace allpix { * @brief Get recoded charge pulse * @return Constant reference to the full charge pulse */ const Pulse& getPulse() const { return pulse_; } const Pulse& getPulse() const; /** * @brief Get time after start of event in global reference frame * @return Time from start event */ double getGlobalTime() const { return global_time_; } double getGlobalTime() const; /** * @brief Get local time in the sensor * @return Time with respect to local sensor */ double getLocalTime() const { return local_time_; } double getLocalTime() const; /** * @brief Print an ASCII representation of PixelCharge to the given stream Loading src/objects/PixelHit.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,14 @@ PixelHit::PixelHit(Pixel pixel, } } const Pixel& PixelHit::getPixel() const { return pixel_; } Pixel::Index PixelHit::getIndex() const { return getPixel().getIndex(); } /** * @throws MissingReferenceException If the pointed object is not in scope * Loading src/objects/PixelHit.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -50,13 +50,13 @@ namespace allpix { * @brief Get the pixel hit * @return Pixel indices in the grid */ const Pixel& getPixel() const { return pixel_; } const Pixel& getPixel() const; /** * @brief Shortcut to retrieve the pixel indices * @return Index of the pixel */ Pixel::Index getIndex() const { return getPixel().getIndex(); } Pixel::Index getIndex() const; /** * @brief Get the timing data of the hit in the global reference frame Loading src/objects/Pulse.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,14 @@ int Pulse::getCharge() const { return static_cast<int>(std::lround(charge)); } double Pulse::getBinning() const { return bin_; } bool Pulse::isInitialized() const { return initialized_; } Pulse& Pulse::operator+=(const Pulse& rhs) { // Allow to initialize uninitialized pulse if(!this->initialized_) { Loading Loading
src/objects/PixelCharge.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -46,10 +46,34 @@ PixelCharge::PixelCharge(Pixel pixel, Pulse pulse, const std::vector<const Propa pulse_ = std::move(pulse); } const Pixel& PixelCharge::getPixel() const { return pixel_; } Pixel::Index PixelCharge::getIndex() const { return getPixel().getIndex(); } long PixelCharge::getCharge() const { return charge_; } unsigned long PixelCharge::getAbsoluteCharge() const { return static_cast<unsigned long>(std::abs(charge_)); } const Pulse& PixelCharge::getPulse() const { return pulse_; } double PixelCharge::getGlobalTime() const { return global_time_; } double PixelCharge::getLocalTime() const { return local_time_; } /** * @throws MissingReferenceException If the pointed object is not in scope * Loading
src/objects/PixelCharge.hpp +6 −6 Original line number Diff line number Diff line Loading @@ -56,19 +56,19 @@ namespace allpix { * @brief Get the pixel containing the charges * @return Pixel indices in the grid */ const Pixel& getPixel() const { return pixel_; } const Pixel& getPixel() const; /** * @brief Shortcut to retrieve the pixel indices * @return Index of the pixel */ Pixel::Index getIndex() const { return getPixel().getIndex(); } Pixel::Index getIndex() const; /** * @brief Get the charge at the pixel * @return Total charge stored */ long getCharge() const { return charge_; } long getCharge() const; /** * @brief Get the absolute charge value at the pixel Loading Loading @@ -99,19 +99,19 @@ namespace allpix { * @brief Get recoded charge pulse * @return Constant reference to the full charge pulse */ const Pulse& getPulse() const { return pulse_; } const Pulse& getPulse() const; /** * @brief Get time after start of event in global reference frame * @return Time from start event */ double getGlobalTime() const { return global_time_; } double getGlobalTime() const; /** * @brief Get local time in the sensor * @return Time with respect to local sensor */ double getLocalTime() const { return local_time_; } double getLocalTime() const; /** * @brief Print an ASCII representation of PixelCharge to the given stream Loading
src/objects/PixelHit.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,14 @@ PixelHit::PixelHit(Pixel pixel, } } const Pixel& PixelHit::getPixel() const { return pixel_; } Pixel::Index PixelHit::getIndex() const { return getPixel().getIndex(); } /** * @throws MissingReferenceException If the pointed object is not in scope * Loading
src/objects/PixelHit.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -50,13 +50,13 @@ namespace allpix { * @brief Get the pixel hit * @return Pixel indices in the grid */ const Pixel& getPixel() const { return pixel_; } const Pixel& getPixel() const; /** * @brief Shortcut to retrieve the pixel indices * @return Index of the pixel */ Pixel::Index getIndex() const { return getPixel().getIndex(); } Pixel::Index getIndex() const; /** * @brief Get the timing data of the hit in the global reference frame Loading
src/objects/Pulse.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,14 @@ int Pulse::getCharge() const { return static_cast<int>(std::lround(charge)); } double Pulse::getBinning() const { return bin_; } bool Pulse::isInitialized() const { return initialized_; } Pulse& Pulse::operator+=(const Pulse& rhs) { // Allow to initialize uninitialized pulse if(!this->initialized_) { Loading