Project
Loading...
Searching...
No Matches
CellLabel.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_EMCAL_CELLLABEL_H_
13#define ALICEO2_EMCAL_CELLLABEL_H_
14
15#include <cstddef>
16#include <cstdint>
17#include <span>
18#include <vector>
19
20namespace o2::emcal
21{
22
29
31{
32 public:
33 // CellLabel() = default;
34
38 CellLabel(std::vector<int> labels, std::vector<float> amplitudeFractions);
39
43 CellLabel(std::span<const int> labels, std::span<const float> amplitudeFractions);
44
45 // ~CellLabel() = default;
46 // CellLabel(const CellLabel& clus) = default;
47 // CellLabel& operator=(const CellLabel& source) = default;
48
51 [[nodiscard]] size_t GetLabelSize() const { return mLabels.size(); }
52
55 [[nodiscard]] int32_t GetLabel(size_t index) const { return mLabels[index]; }
56
58 [[nodiscard]] std::vector<int32_t> GetLabels() const { return mLabels; }
59
62 [[nodiscard]] float GetAmplitudeFraction(size_t index) const { return mAmplitudeFraction[index]; }
63
65 [[nodiscard]] std::vector<float> GetAmplitudeFractions() const { return mAmplitudeFraction; }
66
68 [[nodiscard]] int32_t GetLeadingMCLabel() const;
69
70 protected:
71 std::vector<int32_t> mLabels;
72 std::vector<float> mAmplitudeFraction;
73};
74
75} // namespace o2::emcal
76#endif // ALICEO2_EMCAL_CELLLABEL_H_
std::vector< std::string > labels
cell class for MC particle IDs and their respective amplitude fraction
Definition CellLabel.h:31
int32_t GetLabel(size_t index) const
Getter for label.
Definition CellLabel.h:55
int32_t GetLeadingMCLabel() const
Getter for label with leading amplitude fraction.
Definition CellLabel.cxx:40
float GetAmplitudeFraction(size_t index) const
Getter for amplitude fraction.
Definition CellLabel.h:62
size_t GetLabelSize() const
Getter of label size.
Definition CellLabel.h:51
std::vector< int32_t > mLabels
List of MC particles that generated the cluster, ordered in deposited energy.
Definition CellLabel.h:71
std::vector< float > GetAmplitudeFractions() const
Getter for amplitude fractions.
Definition CellLabel.h:65
std::vector< int32_t > GetLabels() const
Getter for labels.
Definition CellLabel.h:58
std::vector< float > mAmplitudeFraction
List of the fraction of the cell energy coming from a MC particle. Index aligns with mLabels!
Definition CellLabel.h:72
GLuint index
Definition glcorearb.h:781