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
19namespace o2
20{
21
22namespace emcal
23{
24
31
33{
34 public:
35 // CellLabel() = default;
36
40 CellLabel(const gsl::span<const int> labels, const gsl::span<const float> amplitudeFractions);
41
42 // ~CellLabel() = default;
43 // CellLabel(const CellLabel& clus) = default;
44 // CellLabel& operator=(const CellLabel& source) = default;
45
48 size_t GetLabelSize(void) const { return mLabels.size(); }
49
52 int32_t GetLabel(size_t index) const { return mLabels[index]; }
53
55 gsl::span<const int32_t> GetLabels() const { return mLabels; }
56
59 float GetAmplitudeFraction(size_t index) const { return mAmplitudeFraction[index]; }
60
62 gsl::span<const float> GetAmplitudeFractions() const { return mAmplitudeFraction; }
63
65 int32_t GetLeadingMCLabel() const;
66
67 protected:
68 gsl::span<const int32_t> mLabels;
69 gsl::span<const float> mAmplitudeFraction;
70};
71
72} // namespace emcal
73} // namespace o2
74#endif // ALICEO2_EMCAL_CELLLABEL_H_
cell class for MC particle IDs and their respective amplitude fraction
Definition CellLabel.h:33
gsl::span< const float > GetAmplitudeFractions() const
Getter for amplitude fractions.
Definition CellLabel.h:62
int32_t GetLabel(size_t index) const
Getter for label.
Definition CellLabel.h:52
int32_t GetLeadingMCLabel() const
Getter for label with leading amplitude fraction.
Definition CellLabel.cxx:29
float GetAmplitudeFraction(size_t index) const
Getter for amplitude fraction.
Definition CellLabel.h:59
gsl::span< const int32_t > GetLabels() const
Getter for labels.
Definition CellLabel.h:55
size_t GetLabelSize(void) const
Getter of label size.
Definition CellLabel.h:48
gsl::span< const int32_t > mLabels
List of MC particles that generated the cluster, ordered in deposited energy.
Definition CellLabel.h:68
gsl::span< const float > mAmplitudeFraction
List of the fraction of the cell energy coming from a MC particle. Index aligns with mLabels!
Definition CellLabel.h:69
GLuint index
Definition glcorearb.h:781
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...