Project
Loading...
Searching...
No Matches
ClusterLabel.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_CLUSTERLABEL_H_
13#define ALICEO2_EMCAL_CLUSTERLABEL_H_
14
15#include <fairlogger/Logger.h>
16#include <gsl/span>
17
18#include <vector>
19
20namespace o2::emcal
21{
22
29
31{
32 public:
35 struct labelWithE {
36
39
43 labelWithE(int l, float e) : label(l), energyFraction(e) {}
44
51 bool operator>=(labelWithE const& rhs) const
52 {
53 return energyFraction >= rhs.energyFraction;
54 }
55
57 int label;
58 };
59
60 // ClusterLabel() = default;
61 // ~ClusterLabel() = default;
62 // ClusterLabel(const ClusterLabel& clus) = default;
63 // ClusterLabel& operator=(const ClusterLabel& source) = default;
64
66 void clear();
67
71 void addValue(int label, float energyFraction);
72
75 void normalize(float factor);
76
78 std::vector<int32_t> getLabels();
79
81 std::vector<float> getEnergyFractions();
82
84 void orderLabels();
85
86 protected:
87 std::vector<labelWithE> mClusterLabels;
88};
89
90} // namespace o2::emcal
91#endif // ALICEO2_EMCAL_CLUSTERLABEL_H_
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by factor
cluster class for MC particle IDs and their respective energy fraction
void orderLabels()
Sort the labels and energy fraction in descending order (largest energy fraction to smallest)
void clear()
Clear the member variables.
void normalize(float factor)
Normalize the energy fraction.
void addValue(int label, float energyFraction)
Add label and energy fraction to the.
std::vector< labelWithE > mClusterLabels
List of MC particles that generated the cluster, paired with energy fraction.
std::vector< float > getEnergyFractions()
Getter for vector of energy fractions.
std::vector< int32_t > getLabels()
Getter for vector of labels.
GLuint GLsizei const GLchar * label
Definition glcorearb.h:2519
Wrapper structure to make cluster label sortable in energy fraction.
bool operator>=(labelWithE const &rhs) const
Comparison lower operator comparing cells based on energy.
float energyFraction
Energy Fraction.
labelWithE(int l, float e)
Constructor.