Project
Loading...
Searching...
No Matches
TrkClusRef.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
14
15#ifndef ALICEO2_ITSMFT_TRKCLUSREF_H
16#define ALICEO2_ITSMFT_TRKCLUSREF_H
17
19
20namespace o2
21{
22namespace itsmft
23{
24
25// can refer to max 15 indices in the vector of total length <268435456, i.e. 17895697 tracks in worst case
27 using o2::dataformats::RangeRefComp<4>::RangeRefComp;
28 uint32_t clsizes = 0;
29 uint16_t pattern = 0;
30
31 GPUd() int getNClusters() const { return getEntries(); }
32 bool hasHitOnLayer(int i) const { return pattern & (0x1 << i); }
33
34 void setClusterSize(int l, int size)
35 {
36 if (l >= 8)
37 return;
38 if (size > 15)
39 size = 15;
40 clsizes &= ~(0xf << (l * 4));
41 clsizes |= (size << (l * 4));
42 }
43
44 int getClusterSize(int l) const
45 {
46 return (l >= 8) ? 0 : (clsizes >> (l * 4)) & 0xf;
47 }
48
49 int getClusterSizes() const
50 {
51 return clsizes;
52 }
53
55};
56
57} // namespace itsmft
58} // namespace o2
59
60#endif
int32_t i
Class to refer to the 1st entry and N elements of some group in the continuous container.
GLsizeiptr size
Definition glcorearb.h:659
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
void setClusterSize(int l, int size)
Definition TrkClusRef.h:34
uint32_t clsizes
cluster sizes for each layer
Definition TrkClusRef.h:28
bool hasHitOnLayer(int i) const
Definition TrkClusRef.h:32
ClassDefNV(TrkClusRef, 2)
GPUd() int getNClusters() const
Definition TrkClusRef.h:31
int getClusterSizes() const
Definition TrkClusRef.h:49
int getClusterSize(int l) const
Definition TrkClusRef.h:44
uint16_t pattern
layers pattern
Definition TrkClusRef.h:29