15#include "fairlogger/Logger.h"
24CellLabel::CellLabel(std::vector<int> labels, std::vector<float> amplitudeFractions) : mLabels(
std::move(labels)), mAmplitudeFraction(
std::move(amplitudeFractions))
26 if (labels.size() != amplitudeFractions.size()) {
27 LOG(error) <<
"Size of labels " << labels.size() <<
" does not match size of amplitude fraction " << amplitudeFractions.size() <<
" !";
31CellLabel::CellLabel(gsl::span<const int> labels, gsl::span<const float> amplitudeFractions) : mLabels(labels.begin(), labels.
end()), mAmplitudeFraction(amplitudeFractions.begin(), amplitudeFractions.
end())
33 if (labels.size() != amplitudeFractions.size()) {
34 LOG(error) <<
"Size of labels " << labels.size() <<
" does not match size of amplitude fraction " << amplitudeFractions.size() <<
" !";
int32_t GetLeadingMCLabel() const
Getter for label with leading amplitude fraction.
CellLabel(std::vector< int > labels, std::vector< float > amplitudeFractions)
Constructor using std::vector by moving NOT copying.
std::vector< int32_t > mLabels
List of MC particles that generated the cluster, ordered in deposited energy.
std::vector< float > mAmplitudeFraction
List of the fraction of the cell energy coming from a MC particle. Index aligns with mLabels!
Defining DataPointCompositeObject explicitly as copiable.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"