Project
Loading...
Searching...
No Matches
StrangeTrack.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
15
16#ifndef _ALICEO2_STRANGETRACK_
17#define _ALICEO2_STRANGETRACK_
18
19#include <array>
21
22namespace o2
23{
24namespace dataformats
25{
26
30
34 unsigned int mITSRef = -1;
35 unsigned int mDecayRef = -1;
36 std::array<float, 3> mDecayVtx;
37 std::array<float, 3> mDecayMom;
38 std::array<float, 2> mMasses; // V0: hypertriton and hyperhydrongen4, cascade: Xi and Omega.
39 unsigned int mClusterSizes = 0u; // same encoding used for the ITS track
41 float mTopoChi2;
42
43 void setClusterSize(int l, int size)
44 {
45 if (l >= 8) {
46 return;
47 }
48 if (size > 15) {
49 size = 15;
50 }
51 mClusterSizes &= ~(0xf << (l * 4));
52 mClusterSizes |= (size << (l * 4));
53 }
54
55 int getClusterSize(int l) const
56 {
57 if (l >= 7) {
58 return 0;
59 }
60 return (mClusterSizes >> (l * 4)) & 0xf;
61 }
62
63 int getClusterSizes() const
64 {
65 return mClusterSizes;
66 }
67
69 {
70 int nClusters = 0;
71 int nClustersSize = 0;
72 for (int i = 0; i < 7; ++i) {
73 int size = getClusterSize(i);
74 if (size > 0) {
75 nClustersSize += size;
76 nClusters++;
77 }
78 }
79 return nClusters > 0 ? static_cast<float>(nClustersSize) / nClusters : 0.f;
80 }
81};
82
83} // namespace dataformats
84} // namespace o2
85
86#endif // _ALICEO2_STRANGETRACK_
Base track model for the Barrel, params only, w/o covariance.
int32_t i
int nClusters
GLsizeiptr size
Definition glcorearb.h:659
TrackParametrizationWithError< float > TrackParCovF
Definition Track.h:31
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::track::TrackParCovF mMother
std::array< float, 3 > mDecayVtx
float getAverageClusterSize() const
std::array< float, 3 > mDecayMom
std::array< float, 2 > mMasses
int getClusterSize(int l) const
void setClusterSize(int l, int size)