ATLAS Offline Software
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 
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 
21  public:
22  // Is it enough to use a 32 bit unsigned instead?
24 
25  // Contructor from EL
27 
28  // Reflex is clueless about handling types that do not have a default constructor
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:
42  };
43 
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
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