Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
Vertex.cc
Go to the documentation of this file.
1
9#include "Objects/Vertex.h"
10
11namespace pandora
12{
13
15 m_position(parameters.m_position.Get() + CartesianVector(parameters.m_x0.IsInitialized() ? parameters.m_x0.Get() : 0.f, 0.f, 0.f)),
16 m_x0(parameters.m_x0.IsInitialized() ? parameters.m_x0.Get() : 0.f),
17 m_vertexLabel(parameters.m_vertexLabel.Get()),
18 m_vertexType(parameters.m_vertexType.Get()),
19 m_isAvailable(true)
20{
21}
22
23//------------------------------------------------------------------------------------------------------------------------------------------
24
28
29//------------------------------------------------------------------------------------------------------------------------------------------
30
32{
33 if (metadata.m_x0.IsInitialized())
34 {
35 const float oldX0(m_x0);
36 m_x0 = metadata.m_x0.Get();
37 m_position += CartesianVector(m_x0 - oldX0, 0.f, 0.f);
38 }
39
40 if (metadata.m_vertexLabel.IsInitialized())
41 m_vertexLabel = metadata.m_vertexLabel.Get();
42
43 if (metadata.m_vertexType.IsInitialized())
44 m_vertexType = metadata.m_vertexType.Get();
45
46 return STATUS_CODE_SUCCESS;
47}
48
49} // namespace pandora
Header file for the vertex class.
CartesianVector class.
VertexLabel m_vertexLabel
The vertex label (interaction, start, end, etc.)
Definition Vertex.h:92
float m_x0
For LArTPC usage, the x-coordinate shift associated with a drift time t0 shift, units mm.
Definition Vertex.h:91
virtual ~Vertex()
Destructor.
Definition Vertex.cc:25
StatusCode AlterMetadata(const object_creation::Vertex::Metadata &metadata)
Alter the metadata information stored in a vertex.
Definition Vertex.cc:31
VertexType m_vertexType
The vertex type (3d, view u, v, w, etc.)
Definition Vertex.h:93
Vertex(const object_creation::Vertex::Parameters &parameters)
Constructor.
Definition Vertex.cc:14
CartesianVector m_position
The vertex position.
Definition Vertex.h:90
StatusCode
The StatusCode enum.