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 <gsl/span>
18#include <vector>
19
20namespace o2
21{
22
23namespace emcal
24{
25
32
34{
35 public:
36 // CellLabel() = default;
37
41 CellLabel(std::vector<int> labels, std::vector<float> amplitudeFractions);
42
46 CellLabel(gsl::span<const int> labels, gsl::span<const float> amplitudeFractions);
47
48 // ~CellLabel() = default;
49 // CellLabel(const CellLabel& clus) = default;
50 // CellLabel& operator=(const CellLabel& source) = default;
51
54 size_t GetLabelSize(void) const { return mLabels.size(); }
55
58 int32_t GetLabel(size_t index) const { return mLabels[index]; }
59
61 std::vector<int32_t> GetLabels() const { return mLabels; }
62
65 float GetAmplitudeFraction(size_t index) const { return mAmplitudeFraction[index]; }
66
68 std::vector<float> GetAmplitudeFractions() const { return mAmplitudeFraction; }
69
71 int32_t GetLeadingMCLabel() const;
72
73 protected:
74 std::vector<int32_t> mLabels;
75 std::vector<float> mAmplitudeFraction;
76};
77
78} // namespace emcal
79} // namespace o2
80#endif // ALICEO2_EMCAL_CELLLABEL_H_
cell class for MC particle IDs and their respective amplitude fraction
Definition CellLabel.h:34
int32_t GetLabel(size_t index) const
Getter for label.
Definition CellLabel.h:58
int32_t GetLeadingMCLabel() const
Getter for label with leading amplitude fraction.
Definition CellLabel.cxx:38
float GetAmplitudeFraction(size_t index) const
Getter for amplitude fraction.
Definition CellLabel.h:65
std::vector< int32_t > mLabels
List of MC particles that generated the cluster, ordered in deposited energy.
Definition CellLabel.h:74
std::vector< float > GetAmplitudeFractions() const
Getter for amplitude fractions.
Definition CellLabel.h:68
size_t GetLabelSize(void) const
Getter of label size.
Definition CellLabel.h:54
std::vector< int32_t > GetLabels() const
Getter for labels.
Definition CellLabel.h:61
std::vector< float > mAmplitudeFraction
List of the fraction of the cell energy coming from a MC particle. Index aligns with mLabels!
Definition CellLabel.h:75
GLuint index
Definition glcorearb.h:781
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...