ATLAS Offline Software
Loading...
Searching...
No Matches
TrackTruthKey.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Dear emacs, this is -*-c++-*-
6#ifndef TRACKTRUTHKEY_H
7#define TRACKTRUTHKEY_H
8
10#include "AthLinks/ElementLink.h"
11
12namespace Trk {
13
14 // This class identifies a track in TrackTruthCollection and
15 // DetailedTrackTruthCollection. It uses less memory than
16 // ElementLink<TrackCollection> because it does not carry a
17 // string-the TrackCollection key. Instead this is a wrapper around
18 // a single integer - the index of the track in a TrackCollection.
19 //
20 // andrei.gaponenko@cern.ch, 2007
21
23 public:
24 // Is it enough to use a 32 bit unsigned instead?
26
27 size_type index() const { return m_index; }
28
30
31 // For compatibility with the existing clients of ElementLink
32 // based TrackTruthCollection. This constuctor may be removed
33 // after the clients are migrated to use bare index instead of
34 // building ElementLink to do truth look up.
35
37
38 // Reflex is clueless about handling types that do not have a default constructor
40
41 private:
43 };
44
45 inline bool operator<(const TrackTruthKey& a, const TrackTruthKey& b) {
46 return a.index() < b.index();
47 }
48
49}
50
51#endif/*TRACKTRUTHKEY_H*/
static Double_t a
typename DataVectorBase< Trk::Track >::Base::size_type size_type
Definition DataVector.h:814
TrackTruthKey(size_type i)
TrackCollection::size_type size_type
size_type index() const
TrackTruthKey(const ElementLink< TrackCollection > &el)
Ensure that the ATLAS eigen extensions are properly loaded.
bool operator<(const LayerIndex &one, const LayerIndex &two)
Overload of operator< | <= | > | >= for the usage in a map.
Definition index.py:1