ATLAS Offline Software
Reconstruction
ParticleTruth
ParticleTruth
TrackParticleTruthKey.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
#ifndef PARTICLETRUTH_TRACKPARTICLETRUTHKEY_H
6
#define PARTICLETRUTH_TRACKPARTICLETRUTHKEY_H
7
8
#include "
Particle/TrackParticleContainer.h
"
9
#include "AthLinks/ElementLink.h"
10
11
namespace
Rec
{
12
13
// This class identifies a track in TrackParticleTruthCollection.
14
// It uses less memory than ElementLink<TrackParticleContainer> because it does not carry a
15
// string-the TrackParticleContainer key. Instead this is a wrapper around
16
// a single integer - the index of the track in a TrackParticleContainer.
17
//
18
// taken from TrackTruthKey by andrei.gaponenko@cern.ch, 2007
19
20
class
TrackParticleTruthKey
{
21
public
:
22
// Is it enough to use a 32 bit unsigned instead?
23
typedef
TrackParticleContainer::size_type
size_type
;
24
25
// Contructor from EL
26
TrackParticleTruthKey
(
const
ElementLink<TrackParticleContainer>
&
el
) :
m_EL
(
el
) {}
27
28
// Reflex is clueless about handling types that do not have a default constructor
29
TrackParticleTruthKey
() {}
30
31
// Check whether ElementLink is valid or has been thinned away
32
bool
isValid
()
const
{
return
(
m_EL
.isValid()); }
33
34
// Return index of EL
35
size_type
index
()
const
{
return
(
m_EL
.index()); }
36
37
const
ElementLink<TrackParticleContainer>
&
link
()
const
{
return
m_EL
; }
38
39
40
private
:
41
ElementLink<TrackParticleContainer>
m_EL
;
42
};
43
44
inline
bool
operator<
(
const
TrackParticleTruthKey
&
a
,
const
TrackParticleTruthKey
&
b
) {
45
return
a
.index() <
b
.index();
46
}
47
48
}
49
50
#endif
/* PARTICLETRUTH_TRACKPARTICLETRUTHKEY_H */
Rec::TrackParticleTruthKey::index
size_type index() const
Definition:
TrackParticleTruthKey.h:35
Rec::TrackParticleTruthKey
Definition:
TrackParticleTruthKey.h:20
Rec::TrackParticleTruthKey::isValid
bool isValid() const
Definition:
TrackParticleTruthKey.h:32
Rec::TrackParticleTruthKey::TrackParticleTruthKey
TrackParticleTruthKey()
Definition:
TrackParticleTruthKey.h:29
Rec::TrackParticleTruthKey::size_type
TrackParticleContainer::size_type size_type
Definition:
TrackParticleTruthKey.h:23
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition:
FakeTrackBuilder.h:10
plotIsoValidation.el
el
Definition:
plotIsoValidation.py:197
ElementLink
ElementLink implementation for ROOT usage.
Definition:
AthLinks/ElementLink.h:123
plotBeamSpotMon.b
b
Definition:
plotBeamSpotMon.py:77
a
TList * a
Definition:
liststreamerinfos.cxx:10
Rec::TrackParticleTruthKey::link
const ElementLink< TrackParticleContainer > & link() const
Definition:
TrackParticleTruthKey.h:37
Rec::operator<
bool operator<(const TrackParticleTruthKey &a, const TrackParticleTruthKey &b)
Definition:
TrackParticleTruthKey.h:44
Rec::TrackParticleTruthKey::m_EL
ElementLink< TrackParticleContainer > m_EL
Definition:
TrackParticleTruthKey.h:41
DataVector< TrackParticle >::size_type
BASE::size_type size_type
Definition:
DataVector.h:813
Rec::TrackParticleTruthKey::TrackParticleTruthKey
TrackParticleTruthKey(const ElementLink< TrackParticleContainer > &el)
Definition:
TrackParticleTruthKey.h:26
TrackParticleContainer.h
Generated on Mon Dec 23 2024 21:20:46 for ATLAS Offline Software by
1.8.18