ATLAS Offline Software
Loading...
Searching...
No Matches
Tracking
TrkEvent
TrkTruthData
TrkTruthData
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
9
#include "
TrkTrack/TrackCollection.h
"
10
#include "AthLinks/ElementLink.h"
11
12
namespace
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
22
class
TrackTruthKey
{
23
public
:
24
// Is it enough to use a 32 bit unsigned instead?
25
typedef
TrackCollection::size_type
size_type
;
26
27
size_type
index
()
const
{
return
m_index
; }
28
29
TrackTruthKey
(
size_type
i) :
m_index
(i) {}
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
36
TrackTruthKey
(
const
ElementLink<TrackCollection>
& el) :
m_index
(el.
index
()) {}
37
38
// Reflex is clueless about handling types that do not have a default constructor
39
TrackTruthKey
() :
m_index
(-1U) {}
40
41
private
:
42
size_type
m_index
;
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*/
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
TrackCollection.h
DataVector< Trk::Track >::size_type
typename DataVectorBase< Trk::Track >::Base::size_type size_type
Definition
DataVector.h:814
ElementLink
ElementLink implementation for ROOT usage.
Definition
AthLinks/ElementLink.h:123
Trk::TrackTruthKey
Definition
TrackTruthKey.h:22
Trk::TrackTruthKey::TrackTruthKey
TrackTruthKey(size_type i)
Definition
TrackTruthKey.h:29
Trk::TrackTruthKey::size_type
TrackCollection::size_type size_type
Definition
TrackTruthKey.h:25
Trk::TrackTruthKey::index
size_type index() const
Definition
TrackTruthKey.h:27
Trk::TrackTruthKey::m_index
size_type m_index
Definition
TrackTruthKey.h:42
Trk::TrackTruthKey::TrackTruthKey
TrackTruthKey(const ElementLink< TrackCollection > &el)
Definition
TrackTruthKey.h:36
Trk::TrackTruthKey::TrackTruthKey
TrackTruthKey()
Definition
TrackTruthKey.h:39
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::operator<
bool operator<(const LayerIndex &one, const LayerIndex &two)
Overload of operator< | <= | > | >= for the usage in a map.
Definition
LayerIndex.cxx:12
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.14.0