2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
6 ////////////////////////////////////////////////////////////////
8 // Inline file for class SimBarCode //
10 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11 // Initial version: April 2008 //
13 ////////////////////////////////////////////////////////////////
15 //____________________________________________________________________
16 inline SimBarCode::SimBarCode(int barCode, HepMcParticleLink::index_type evtIndex, int pdgCode)
17 : m_barCode(barCode), m_evtIndex(evtIndex), m_pdgCode(pdgCode)
21 //____________________________________________________________________
22 inline SimBarCode::SimBarCode(const HepMcParticleLink& l, int pdgCode)
23 : m_barCode(l.barcode()), m_evtIndex(l.eventIndex()), m_pdgCode(pdgCode)
27 //____________________________________________________________________
28 inline int SimBarCode::barCode() const
33 //____________________________________________________________________
34 inline int SimBarCode::actualBarCode() const {
35 return m_barCode < 0 ? 0 : m_barCode;
38 //____________________________________________________________________
39 inline HepMcParticleLink::index_type SimBarCode::evtIndex() const
44 //____________________________________________________________________
45 inline int SimBarCode::pdgCode() const
50 //____________________________________________________________________
51 inline bool SimBarCode::isNonUniqueSecondary() const {
55 //____________________________________________________________________
56 inline bool SimBarCode::operator<(const SimBarCode& o) const
58 if (m_evtIndex == o.m_evtIndex)
59 return m_barCode == o.m_barCode ? m_pdgCode < o.m_pdgCode : m_barCode < o.m_barCode;
60 return m_evtIndex < o.m_evtIndex;