ATLAS Offline Software
TruthEventBase_v1.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: TruthEventBase_v1.h 622193 2014-10-16 16:08:34Z krasznaa $
8 #ifndef XAODTRUTH_VERSIONS_TRUTHEVENTBASE_V1_H
9 #define XAODTRUTH_VERSIONS_TRUTHEVENTBASE_V1_H
10 
11 // System include(s):
12 #include <vector>
13 
14 // EDM include(s):
16 #include "AthLinks/ElementLink.h"
17 #include "xAODBase/ObjectType.h"
18 
19 // Local include(s):
22 
23 namespace xAOD {
24 
37 
38  public:
42  virtual ~TruthEventBase_v1() {}
43 
46 
50  typedef std::vector< TruthParticleLink_t > TruthParticleLinks_t;
51 
57  size_t nTruthParticles() const;
59  const TruthParticleLink_t& truthParticleLink( size_t index ) const;
61  const TruthParticle* truthParticle( size_t index ) const;
63  void addTruthParticleLink( const TruthParticleLink_t& plink );
66 
68 
71 
75  typedef std::vector< TruthVertexLink_t > TruthVertexLinks_t;
76 
82  size_t nTruthVertices() const;
84  const TruthVertexLink_t& truthVertexLink( size_t index ) const;
86  const TruthVertex* truthVertex( size_t index ) const;
88  void addTruthVertexLink( const TruthVertexLink_t& vlink );
90  void clearTruthVertexLinks();
91 
93 
95  virtual Type::ObjectType type() const = 0;
96 
98  void toPersistent();
99 
100  }; // class TruthEventBase_v1
101 
102 } // namespace xAOD
103 
104 // Declare the base class of TruthEventBase_v1 to StoreGate:
105 #include "xAODCore/BaseInfo.h"
107 
108 #endif // XAODTRUTH_VERSIONS_TRUTHEVENTBASE_V1_H
xAOD::TruthEventBase_v1::toPersistent
void toPersistent()
Function making sure that the object is ready for persistification.
Definition: TruthEventBase_v1.cxx:143
xAOD::TruthEventBase_v1::TruthEventBase_v1
TruthEventBase_v1()
Default constructor.
Definition: TruthEventBase_v1.cxx:15
index
Definition: index.py:1
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:472
TruthVertexContainer.h
TruthParticleContainer.h
xAOD::TruthEventBase_v1::truthParticle
const TruthParticle * truthParticle(size_t index) const
Get a pointer to one of the truth particles.
Definition: TruthEventBase_v1.cxx:50
BaseInfo.h
SG_BASE
SG_BASE(xAOD::TruthEventBase_v1, SG::AuxElement)
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TruthEventBase_v1::setTruthParticleLinks
void setTruthParticleLinks(const TruthParticleLinks_t &plinks)
Set all the truth particles.
xAOD::TruthEventBase_v1::addTruthParticleLink
void addTruthParticleLink(const TruthParticleLink_t &plink)
Add one truth particle.
Definition: TruthEventBase_v1.cxx:68
ObjectType.h
xAOD::TruthEventBase_v1::truthVertexLinks
const TruthVertexLinks_t & truthVertexLinks() const
Get all the truth vertices.
DMTest::links
links
Definition: CLinks_v1.cxx:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
xAOD::TruthEventBase_v1::truthParticleLink
const TruthParticleLink_t & truthParticleLink(size_t index) const
Get the link to one of the truth particles.
Definition: TruthEventBase_v1.cxx:45
xAOD::TruthEventBase_v1::truthVertexLink
const TruthVertexLink_t & truthVertexLink(size_t index) const
Get the link to one of the truth vertices.
Definition: TruthEventBase_v1.cxx:107
xAOD::TruthEventBase_v1::type
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
xAOD::TruthEventBase_v1::clearTruthParticleLinks
void clearTruthParticleLinks()
Remove all truth particles.
Definition: TruthEventBase_v1.cxx:74
xAOD::TruthEventBase_v1::TruthVertexLinks_t
std::vector< TruthVertexLink_t > TruthVertexLinks_t
Type of the truth particle links vector.
Definition: TruthEventBase_v1.h:75
xAOD::TruthEventBase_v1
Base class describing a pile-up or signal truth event in the MC record.
Definition: TruthEventBase_v1.h:36
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
xAOD::TruthEventBase_v1::nTruthParticles
size_t nTruthParticles() const
Get the number of truth particles.
xAOD::TruthEventBase_v1::TruthParticleLink_t
ElementLink< TruthParticleContainer > TruthParticleLink_t
Type of a single truth particle link.
Definition: TruthEventBase_v1.h:48
xAOD::TruthEventBase_v1::nTruthVertices
size_t nTruthVertices() const
Get the number of truth vertices.
xAOD::TruthEventBase_v1::~TruthEventBase_v1
virtual ~TruthEventBase_v1()
Virtual destructor, to make vtable happy.
Definition: TruthEventBase_v1.h:42
xAOD::TruthEventBase_v1::clearTruthVertexLinks
void clearTruthVertexLinks()
Remove all truth vertices.
Definition: TruthEventBase_v1.cxx:135
xAOD::TruthEventBase_v1::truthParticleLinks
const TruthParticleLinks_t & truthParticleLinks() const
Get all the truth particles.
xAOD::TruthEventBase_v1::setTruthVertexLinks
void setTruthVertexLinks(const TruthVertexLinks_t &links)
Set all the truth vertices.
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::TruthEventBase_v1::TruthVertexLink_t
ElementLink< TruthVertexContainer > TruthVertexLink_t
Type of a single truth vertex link.
Definition: TruthEventBase_v1.h:73
xAOD::TruthEventBase_v1::addTruthVertexLink
void addTruthVertexLink(const TruthVertexLink_t &vlink)
Add one truth vertex.
Definition: TruthEventBase_v1.cxx:129
xAOD::TruthEventBase_v1::truthVertex
const TruthVertex * truthVertex(size_t index) const
Get a pointer to one of the truth vertices.
Definition: TruthEventBase_v1.cxx:112
xAOD::TruthEventBase_v1::TruthParticleLinks_t
std::vector< TruthParticleLink_t > TruthParticleLinks_t
Type of the truth particle links vector.
Definition: TruthEventBase_v1.h:50
AuxElement.h
Base class for elements of a container that can have aux data.