ATLAS Offline Software
TruthVertex_v1.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: TruthVertex_v1.h 624338 2014-10-27 15:08:55Z krasznaa $
8 #ifndef XAODTRUTH_VERSIONS_TRUTHVERTEX_V1_H
9 #define XAODTRUTH_VERSIONS_TRUTHVERTEX_V1_H
10 
11 // ROOT include(s):
12 #include <TLorentzVector.h>
13 
14 // EDM include(s):
16 #include "AthLinks/ElementLink.h"
17 
18 // xAOD include(s):
19 #include "xAODBase/ObjectType.h"
20 
21 // Local include(s):
23 
24 // ROOT include(s):
25 #include "Math/Vector4D.h"
26 
27 namespace xAOD {
28 
41  class TruthVertex_v1 : public SG::AuxElement {
42 
43  public:
46 
49 
52  void setId( int value );
55  int id() const;
56 
59  int status() const { return id(); }
60 
63  void setStatus( int value ) { setId(value); }
64 
66  void setBarcode( int value );
68  int barcode() const;
69 
71 
74 
78  typedef std::vector< TPLink_t > TPLinks_t;
79 
85  size_t nIncomingParticles() const;
87  const TruthParticle_v1* incomingParticle( size_t index ) const;
89  void addIncomingParticleLink( const TPLink_t& link );
92 
98  size_t nOutgoingParticles() const;
100  const TruthParticle_v1* outgoingParticle( size_t index ) const;
102  std::vector<const TruthParticle*> particles_in() const;
104  std::vector<const TruthParticle*> particles_out() const;
106  void addOutgoingParticleLink( const TPLink_t& link );
109 
111 
114 
116  float x() const;
118  void setX( float value );
119 
121  float y() const;
123  void setY( float value );
124 
126  float z() const;
128  void setZ( float value );
129 
131  float perp() const;
133  float eta() const;
135  float phi() const;
136 
138  float t() const;
140  void setT( float value );
141 
143  typedef TLorentzVector FourVec_t;
144 
146  FourVec_t v4() const;
147 
149  typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > GenVecFourVec_t;
150 
152  GenVecFourVec_t genvecV4() const;
153 
155 
157  Type::ObjectType type() const;
158 
160  void toPersistent();
161 
162  }; // class TruthVertex_v1
163 
164 } // namespace xAOD
165 
166 // Declare the inheritance of the type to StoreGate:
167 #include "xAODCore/BaseInfo.h"
169 
170 #endif // XAODTRUTH_VERSIONS_TRUTHVERTEX_V1_H
xAOD::TruthVertex_v1::clearOutgoingParticleLinks
void clearOutgoingParticleLinks()
Remove all outgoing particles.
Definition: TruthVertex_v1.cxx:145
TruthParticleContainerFwd.h
xAOD::TruthVertex_v1::nOutgoingParticles
size_t nOutgoingParticles() const
Get the number of outgoing particles.
xAOD::TruthVertex_v1::id
int id() const
Obsolete function Vertex ID code HepMC2 id == HepMC3 status, i.e.
xAOD::TruthVertex_v1::GenVecFourVec_t
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > GenVecFourVec_t
Base 4 Momentum type for TruthVector.
Definition: TruthVertex_v1.h:149
xAOD::TruthVertex_v1::phi
float phi() const
Vertex azimuthal angle.
Definition: TruthVertex_v1.cxx:178
xAOD::TruthVertex_v1::FourVec_t
TLorentzVector FourVec_t
The 4-vector type.
Definition: TruthVertex_v1.h:143
xAOD::TruthVertex_v1::particles_in
std::vector< const TruthParticle * > particles_in() const
Get the incoming particles.
Definition: TruthVertex_v1.cxx:61
xAOD::TruthVertex_v1::clearIncomingParticleLinks
void clearIncomingParticleLinks()
Remove all incoming particles.
Definition: TruthVertex_v1.cxx:95
index
Definition: index.py:1
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:446
BaseInfo.h
xAOD::TruthVertex_v1::setT
void setT(float value)
Set the vertex time.
athena.value
value
Definition: athena.py:122
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TruthVertex_v1::setIncomingParticleLinks
void setIncomingParticleLinks(const TPLinks_t &links)
Set all the incoming particles.
xAOD::TruthVertex_v1::addOutgoingParticleLink
void addOutgoingParticleLink(const TPLink_t &link)
Add one outgoing particle.
Definition: TruthVertex_v1.cxx:139
xAOD::TruthVertex_v1::setY
void setY(float value)
Set the y displacement of the vertex.
SG_BASE
SG_BASE(xAOD::TruthVertex_v1, SG::AuxElement)
xAOD::TruthVertex_v1::setOutgoingParticleLinks
void setOutgoingParticleLinks(const TPLinks_t &links)
Set all the outgoing particles.
xAOD::TruthVertex_v1::outgoingParticleLinks
const TPLinks_t & outgoingParticleLinks() const
Get all the outgoing particles.
xAOD::TruthVertex_v1::y
float y() const
Vertex y displacement.
xAOD::TruthVertex_v1::t
float t() const
Vertex time.
xAOD::TruthVertex_v1::v4
FourVec_t v4() const
The full 4-vector of the vertex.
Definition: TruthVertex_v1.cxx:186
ObjectType.h
xAOD::TruthVertex_v1::barcode
int barcode() const
Barcode.
DMTest::links
links
Definition: CLinks_v1.cxx:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
xAOD::TruthVertex_v1::perp
float perp() const
Vertex transverse distance from the beam line.
Definition: TruthVertex_v1.cxx:165
xAOD::TruthVertex_v1::incomingParticle
const TruthParticle_v1 * incomingParticle(size_t index) const
Get one of the incoming particles.
Definition: TruthVertex_v1.cxx:71
xAOD::TruthVertex_v1::toPersistent
void toPersistent()
Function making sure that the object is ready for persistification.
Definition: TruthVertex_v1.cxx:202
xAOD::TruthVertex_v1::TPLinks_t
std::vector< TPLink_t > TPLinks_t
Type used to save the links to incoming and outgoing particles.
Definition: TruthVertex_v1.h:78
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:41
xAOD::TruthVertex_v1::particles_out
std::vector< const TruthParticle * > particles_out() const
Get the outgoing particles.
Definition: TruthVertex_v1.cxx:66
xAOD::TruthVertex_v1::setId
void setId(int value)
Obsolete function Set vertex ID code HepMC2 id == HepMC3 status, i.e.
xAOD::TruthVertex_v1::x
float x() const
Vertex x displacement.
xAOD::TruthVertex_v1::setZ
void setZ(float value)
Set the vertex's longitudinal distance from the origin.
xAOD::TruthVertex_v1::status
int status() const
New function Vertex status HepMC2 id == HepMC3 status, i.e.
Definition: TruthVertex_v1.h:59
xAOD::TruthVertex_v1::TPLink_t
ElementLink< TruthParticleContainer > TPLink_t
Type of one truth particle link.
Definition: TruthVertex_v1.h:76
xAOD::TruthVertex_v1::setBarcode
void setBarcode(int value)
Set barcode.
xAOD::TruthVertex_v1::eta
float eta() const
Vertex pseudorapidity.
Definition: TruthVertex_v1.cxx:172
xAOD::TruthVertex_v1::nIncomingParticles
size_t nIncomingParticles() const
Get the number of incoming particles.
Definition: TruthVertex_v1.cxx:49
xAOD::TruthVertex_v1::type
Type::ObjectType type() const
The type of the object as a simple enumeration.
Definition: TruthVertex_v1.cxx:197
xAOD::TruthVertex_v1::TruthVertex_v1
TruthVertex_v1()
Default constructor.
Definition: TruthVertex_v1.cxx:19
xAOD::TruthVertex_v1::z
float z() const
Vertex longitudinal distance along the beam line form the origin.
xAOD::TruthVertex_v1::genvecV4
GenVecFourVec_t genvecV4() const
The full 4-vector of the particle : GenVector form.
Definition: TruthVertex_v1.cxx:190
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::TruthVertex_v1::addIncomingParticleLink
void addIncomingParticleLink(const TPLink_t &link)
Add one incoming particle.
Definition: TruthVertex_v1.cxx:89
xAOD::TruthVertex_v1::outgoingParticle
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
Definition: TruthVertex_v1.cxx:121
xAOD::TruthVertex_v1::setStatus
void setStatus(int value)
New function Set vertex status HepMC2 id == HepMC3 status, i.e.
Definition: TruthVertex_v1.h:63
AuxElement.h
Base class for elements of a container that can have aux data.
xAOD::TruthVertex_v1::setX
void setX(float value)
Set the x displacement of the vertex.
xAOD::TruthVertex_v1::incomingParticleLinks
const TPLinks_t & incomingParticleLinks() const
Get all the incoming particles.