Project
Loading...
Searching...
No Matches
VtxTrackIndex.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 O2_VERTEX_TRACK_INDEX
17#define O2_VERTEX_TRACK_INDEX
18
20#include <iosfwd>
21#include <string>
22#include <array>
23#include <string_view>
24
25namespace o2
26{
27namespace dataformats
28{
29
31{
32 public:
33 enum Flags : uint8_t {
34 Contributor, // flag that it contributes to vertex fit
35 Ambiguous, // flag that attachment is ambiguous
36 NFlags
37 };
38
39 using GlobalTrackID::GlobalTrackID;
40 VtxTrackIndex() = default;
42
43 bool isPVContributor() const { return testBit(Contributor); }
44 void setPVContributor() { setBit(Contributor); }
45
46 bool isAmbiguous() const { return testBit(Ambiguous); }
47 void setAmbiguous() { setBit(Ambiguous); }
48
50};
51
52} // namespace dataformats
53} // namespace o2
54
55namespace std
56{
57// defining std::hash for VtxTrackIndex to be used with std containers
58template <>
59struct hash<o2::dataformats::VtxTrackIndex> {
60 public:
62 {
63 return std::hash<o2::dataformats::GlobalTrackID>{}(id);
64 //return id.getRawWOFlags();
65 }
66};
67} // namespace std
68
69#endif
Global index for barrel track: provides provenance (detectors combination), index in respective array...
VtxTrackIndex(const GlobalTrackID &src)
ClassDefNV(VtxTrackIndex, 2)
GLenum src
Definition glcorearb.h:1767
GLuint id
Definition glcorearb.h:650
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
size_t operator()(const o2::dataformats::VtxTrackIndex &id) const