Skip to content

Commit f050c63

Browse files
authored
Refactor LUT structures and improve documentation
Updated struct names and comments for clarity.
1 parent b0640be commit f050c63

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

ALICE3/Core/FlatLutEntry.h

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12+
/// \file FlatLutEntry.h
13+
/// \brief Flat LUT data structures and buffer handling for the ALICE3 fast smearing backend.
14+
1215
#ifndef ALICE3_CORE_FLATLUTENTRY_H_
1316
#define ALICE3_CORE_FLATLUTENTRY_H_
1417

@@ -25,9 +28,9 @@ namespace o2::delphes
2528
{
2629

2730
/**
28-
* @brief Flat LUT entry structure
31+
* @brief Flat LUT entry structure.
2932
*/
30-
struct lutEntry_t {
33+
struct LutEntry {
3134
float nch = 0.f;
3235
float eta = 0.f;
3336
float pt = 0.f;
@@ -44,10 +47,12 @@ struct lutEntry_t {
4447
void print() const;
4548
};
4649

50+
using lutEntry_t = LutEntry;
51+
4752
/**
48-
* @brief Binning map
53+
* @brief Binning map.
4954
*/
50-
struct map_t {
55+
struct Map {
5156
int nbins = 1;
5257
float min = 0.f;
5358
float max = 1.e6f;
@@ -67,10 +72,12 @@ struct map_t {
6772
void print() const;
6873
};
6974

75+
using map_t = Map;
76+
7077
/**
71-
* @brief LUT header
78+
* @brief LUT header.
7279
*/
73-
struct lutHeader_t {
80+
struct LutHeader {
7481
int version = LUTCOVM_VERSION;
7582
int pdg = 0;
7683
float mass = 0.f;
@@ -80,12 +87,14 @@ struct lutHeader_t {
8087
map_t etamap;
8188
map_t ptmap;
8289

83-
bool check_version() const;
90+
bool checkVersion() const;
8491
void print() const;
8592
};
8693

94+
using lutHeader_t = LutHeader;
95+
8796
/**
88-
* @brief Flat LUT data container - single contiguous buffer
97+
* @brief Flat LUT data container - single contiguous buffer.
8998
* Memory layout: [header][entry_0][entry_1]...[entry_N]
9099
*
91100
* All entries stored sequentially in a single allocation.

0 commit comments

Comments
 (0)