ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
ParticleEvent
ParticleEvent
ParticleBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef PARTICLEEVENT_PARTICLEBASE_H
6
#define PARTICLEEVENT_PARTICLEBASE_H
7
8
#include "
EventKernel/IParticle.h
"
9
10
#include "
VxVertex/VxContainer.h
"
11
#include "
VxVertex/VxCandidate.h
"
12
#include "AthLinks/ElementLink.h"
13
#include "
AthContainers/DataVector.h
"
14
#include "
NavFourMom/IParticleContainer.h
"
15
16
class
ParticleBase
:
public
virtual
IParticle
17
{
18
public
:
19
21
ParticleBase
();
22
25
ParticleBase
(
const
ParticleBase
& rhs );
26
29
ParticleBase
&
operator=
(
const
ParticleBase
& rhs );
30
32
virtual
~ParticleBase
();
33
34
// standard IParticle methods
38
virtual
ParticleDataType::DataType
dataType
()
const
;
39
41
virtual
const
Trk::RecVertex
*
origin
()
const
;
42
44
virtual
const
ElementLink<VxContainer>
&
originLink
()
const
{
return
m_origin
; }
45
47
virtual
bool
hasCharge
()
const
;
48
52
virtual
ChargeType
charge
()
const
;
53
55
virtual
bool
hasPdgId
()
const
;
56
58
virtual
int
pdgId
()
const
;
59
60
// Set functions (for IParticle)
61
void
set_dataType
(
ParticleDataType::DataType
x
) {
m_dataType
=
x
;}
62
void
set_charge
(
ChargeType
x
) {
m_charge
=
x
;
m_hasCharge
=
true
;}
63
void
set_pdgId
(
int
x
) {
m_pdgId
=
x
;
m_hasPdgId
=
true
;}
64
void
reset_charge
() {
m_hasCharge
=
false
; }
65
void
reset_pdgId
() {
m_hasPdgId
=
false
; }
66
void
set_origin
(
const
VxContainer
* theContainer,
int
index
);
67
void
set_origin
(
const
VxContainer
* theContainer,
const
Trk::VxCandidate
* vertex );
68
void
set_origin
(
const
ElementLink<VxContainer>
&
origin
);
69
70
private
:
71
72
ElementLink< VxContainer >
m_origin
;
73
ChargeType
m_charge
;
74
bool
m_hasCharge
;
75
int
m_pdgId
;
76
bool
m_hasPdgId
;
77
ParticleDataType::DataType
m_dataType
;
78
79
};
80
81
inline
void
ParticleBase::set_origin
(
const
VxContainer
*
const
theContainer,
int
index
)
82
{
83
m_origin
.toIndexedElement( *theContainer,
index
) ;
84
}
85
inline
void
ParticleBase::set_origin
(
const
VxContainer
* theContainer,
const
Trk::VxCandidate
* vertex )
86
{
87
m_origin
.toContainedElement(*theContainer, vertex);
88
}
89
inline
void
ParticleBase::set_origin
(
const
ElementLink<VxContainer>
&
origin
)
90
{
91
m_origin
=
origin
;
92
}
93
inline
ParticleDataType::DataType
ParticleBase::dataType
()
const
94
{
95
return
m_dataType
;
96
}
97
inline
bool
ParticleBase::hasCharge
()
const
{
return
m_hasCharge
;}
98
inline
ChargeType
ParticleBase::charge
()
const
{
return
m_charge
;}
99
inline
bool
ParticleBase::hasPdgId
()
const
{
return
m_hasPdgId
;}
100
inline
int
ParticleBase::pdgId
()
const
{
return
m_pdgId
;}
101
102
DATAVECTOR_VIRTBASES1
(
ParticleBase
,
IParticle
);
103
104
#endif
// PARTICLEEVENT_PARTICLEBASE_H
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
DATAVECTOR_VIRTBASES1
#define DATAVECTOR_VIRTBASES1(T, B1)
Declare base class info to DataVector.
Definition
DataVector.h:673
IParticle.h
ChargeType
double ChargeType
typedef ChargeType used to anticipate changes here
Definition
Event/EventKernel/EventKernel/IParticle.h:40
IParticleContainer.h
x
#define x
VxCandidate.h
VxContainer.h
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:40
IParticle
Definition
Event/EventKernel/EventKernel/IParticle.h:43
ParticleBase
Definition
ParticleBase.h:17
ParticleBase::m_hasCharge
bool m_hasCharge
Definition
ParticleBase.h:74
ParticleBase::set_charge
void set_charge(ChargeType x)
Definition
ParticleBase.h:62
ParticleBase::operator=
ParticleBase & operator=(const ParticleBase &rhs)
Assignement operator.
Definition
ParticleBase.cxx:52
ParticleBase::~ParticleBase
virtual ~ParticleBase()
Destructor.
Definition
ParticleBase.cxx:71
ParticleBase::set_origin
void set_origin(const VxContainer *theContainer, int index)
Definition
ParticleBase.h:81
ParticleBase::ParticleBase
ParticleBase()
Default constructor.
Definition
ParticleBase.cxx:25
ParticleBase::dataType
virtual ParticleDataType::DataType dataType() const
Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the f...
Definition
ParticleBase.h:93
ParticleBase::set_dataType
void set_dataType(ParticleDataType::DataType x)
Definition
ParticleBase.h:61
ParticleBase::charge
virtual ChargeType charge() const
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed...
Definition
ParticleBase.h:98
ParticleBase::origin
virtual const Trk::RecVertex * origin() const
Return a RecVertex corresponding to particle Origin.
Definition
ParticleBase.cxx:76
ParticleBase::m_hasPdgId
bool m_hasPdgId
Definition
ParticleBase.h:76
ParticleBase::hasCharge
virtual bool hasCharge() const
method to check if charge information is available
Definition
ParticleBase.h:97
ParticleBase::reset_pdgId
void reset_pdgId()
Definition
ParticleBase.h:65
ParticleBase::originLink
virtual const ElementLink< VxContainer > & originLink() const
Return an ElementLink corresponding to particle's Origin.
Definition
ParticleBase.h:44
ParticleBase::m_origin
ElementLink< VxContainer > m_origin
Definition
ParticleBase.h:72
ParticleBase::hasPdgId
virtual bool hasPdgId() const
method to check if particle id information is available
Definition
ParticleBase.h:99
ParticleBase::m_dataType
ParticleDataType::DataType m_dataType
Definition
ParticleBase.h:77
ParticleBase::m_pdgId
int m_pdgId
Definition
ParticleBase.h:75
ParticleBase::m_charge
ChargeType m_charge
Definition
ParticleBase.h:73
ParticleBase::pdgId
virtual int pdgId() const
Return particle id.
Definition
ParticleBase.h:100
ParticleBase::set_pdgId
void set_pdgId(int x)
Definition
ParticleBase.h:63
ParticleBase::reset_charge
void reset_charge()
Definition
ParticleBase.h:64
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition
RecVertex.h:44
Trk::VxCandidate
Definition
VxCandidate.h:27
VxContainer
Definition
VxContainer.h:28
ParticleDataType::DataType
DataType
Definition
Event/EventKernel/EventKernel/IParticle.h:36
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0