ATLAS Offline Software
Loading...
Searching...
No Matches
SimBarCode.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
7// //
8// Header file for class SimBarCode //
9// //
10// Description: Identifier for truth particle //
11// //
12// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
13// Initial version: April 2008 //
14// //
16
17#ifndef SIMBARCODE_H
18#define SIMBARCODE_H
19
21
23public:
24
25 static const int unknownPDG = -999;//Fixme: Better choice? 0?
26
30
31 inline int barCode() const;//For non-unique secondaries, this will return a negative number, which should not be presented to the user.
32 inline int actualBarCode() const;//The original present in the simhit
34 inline int pdgCode() const;
35 inline bool unknownPdgCode() const { return m_pdgCode==unknownPDG; }
36
37 inline bool isNonUniqueSecondary() const;
38
39 //For sorting (Does consider pdgCodes, even when one is unknown):
40 inline bool operator<(const SimBarCode&) const;
41
42 typedef std::pair<int,HepMcParticleLink::index_type> ExtBarCode;
44
45
46private:
50};
51
52
54
55#endif
std::pair< int, HepMcParticleLink::index_type > ExtBarCode
Definition SimBarCode.h:42
int actualBarCode() const
bool operator<(const SimBarCode &) const
ExtBarCode extBarCode() const
Definition SimBarCode.h:43
static const int unknownPDG
Definition SimBarCode.h:25
int m_pdgCode
Definition SimBarCode.h:49
int barCode() const
bool isNonUniqueSecondary() const
int m_barCode
Definition SimBarCode.h:47
HepMcParticleLink::index_type evtIndex() const
HepMcParticleLink::index_type m_evtIndex
Definition SimBarCode.h:48
SimBarCode(int barCode, HepMcParticleLink::index_type evtIndex, int pdgCode)
SimBarCode(const HepMcParticleLink &, int pdgCode)
int pdgCode() const
bool unknownPdgCode() const
Definition SimBarCode.h:35