LArTrackPfo.cc
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArObjects/LArTrackPfo.cc
3  *
4  * @brief Implementation of the lar track pfo class.
5  *
6  * $Log: $
7  */
8 
10 
11 #include "Objects/CaloHit.h"
12 
13 using namespace pandora;
14 
15 namespace lar_content
16 {
17 
18 LArTrackPfo::LArTrackPfo(const LArTrackPfoParameters &parameters) :
19  ParticleFlowObject(parameters),
20  m_trackStateVector(parameters.m_trackStateVector)
21 {
22 }
23 
24 //------------------------------------------------------------------------------------------------------------------------------------------
25 
26 const CartesianVector &LArTrackPfo::GetVertexPosition() const
27 {
28  if (m_trackStateVector.empty())
29  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
30 
31  return (*m_trackStateVector.begin()).GetPosition();
32 }
33 
34 //------------------------------------------------------------------------------------------------------------------------------------------
35 
36 const CartesianVector &LArTrackPfo::GetEndPosition() const
37 {
38  if (m_trackStateVector.empty())
39  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
40 
41  return (*m_trackStateVector.rbegin()).GetPosition();
42 }
43 
44 //------------------------------------------------------------------------------------------------------------------------------------------
45 
46 const CartesianVector &LArTrackPfo::GetVertexDirection() const
47 {
48  if (m_trackStateVector.empty())
49  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
50 
51  return (*m_trackStateVector.begin()).GetDirection();
52 }
53 
54 //------------------------------------------------------------------------------------------------------------------------------------------
55 
56 const CartesianVector &LArTrackPfo::GetEndDirection() const
57 {
58  if (m_trackStateVector.empty())
59  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
60 
61  return (*m_trackStateVector.rbegin()).GetDirection();
62 }
63 
64 } // namespace lar_content
const pandora::CartesianVector & GetEndPosition() const
Get end position.
Definition: LArTrackPfo.cc:36
Header file for the lar pfo class.
const pandora::CartesianVector & GetVertexDirection() const
Get vertex direction.
Definition: LArTrackPfo.cc:46
const LArTrackStateVector m_trackStateVector
The vector of track states.
Definition: LArTrackPfo.h:73
const pandora::CartesianVector & GetEndDirection() const
Get end direction.
Definition: LArTrackPfo.cc:56
const pandora::CartesianVector & GetVertexPosition() const
Get vertex position.
Definition: LArTrackPfo.cc:26