54 const LArTPC *
const pFirstLArTPC(this->
GetPandora().GetGeometry()->GetLArTPCMap().begin()->second);
61 if (trackStateVector.empty())
70 pfoParameters.m_energy = 0.f;
71 pfoParameters.m_momentum = pInputPfo->
GetMomentum();
75 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::Create(*
this, pfoParameters, pOutputPfo, trackFactory));
82 PandoraContentApi::ParticleFlowObject::Metadata pfodata;
86 const Vertex *pOutputVertex(NULL);
88 PandoraContentApi::Vertex::Parameters vtxParameters;
93 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Vertex::Create(*
this, vtxParameters, pOutputVertex));
98 if (STATUS_CODE_FAILURE == statusCodeException.
GetStatusCode())
99 throw statusCodeException;
Header file for the geometry manager class.
Header file for the cluster helper class.
Header file for the pfo helper class.
Header file for the lar pfo class.
#define PANDORA_THROW_RESULT_IF(StatusCode1, Operator, Command)
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
Header file for the 3D track building algorithm class.
static pandora::StatusCode AddToPfo(const pandora::Algorithm &algorithm, const pandora::ParticleFlowObject *const pPfo, const T *const pT)
Add a cluster to a particle flow object.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
static bool IsFinalState(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo is a primary parent particle.
static bool IsTrack(const pandora::ParticleFlowObject *const pPfo)
Return track flag based on Pfo Particle ID.
static bool IsNeutrino(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo is a neutrino or (antineutrino)
static bool IsNeutrinoFinalState(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo is a final-state particle from a neutrino (or antineutrino) interaction.
static void GetSlidingFitTrajectory(const pandora::CartesianPointVector &pointVector, const pandora::CartesianVector &vertexPosition, const unsigned int layerWindow, const float layerPitch, LArTrackStateVector &trackStateVector, pandora::IntVector *const pIndexVector=nullptr)
Apply 3D sliding fit to a set of 3D points and return track trajectory.
static const pandora::Vertex * GetVertex(const pandora::ParticleFlowObject *const pPfo)
Get the pfo vertex.
lar pfo object factory responsible for pfo creation
const pandora::CartesianVector & GetVertexPosition() const
Get vertex position.
const pandora::CartesianVector & GetVertexDirection() const
Get vertex direction.
LArTrackStateVector m_trackStateVector
TrackParticleBuildingAlgorithm()
Default constructor.
void CreatePfo(const pandora::ParticleFlowObject *const pInputPfo, const pandora::ParticleFlowObject *&pOutputPfo) const
Create specialised Pfo from an generic input Pfo.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
unsigned int m_slidingFitHalfWindow
float GetWirePitchW() const
Get the w wire pitch, units mm.
ParticleFlowObject class.
const PropertiesMap & GetPropertiesMap() const
Get the map from registered property name to floating point property value.
StatusCode AlterMetadata(const object_creation::ParticleFlowObject::Metadata &metadata)
Alter particle flow object metadata parameters.
int GetParticleId() const
Get the particle flow object id (PDG code)
const CartesianVector & GetMomentum() const
Get particle flow object momentum vector.
static float GetParticleMass(const int pdgCode)
Get the mass of a particle type.
static int GetParticleCharge(const int pdgCode)
Get the charge of a particle type.
const Pandora & GetPandora() const
Get the associated pandora instance.
StatusCodeException class.
StatusCode GetStatusCode() const
Get status code.
VertexType GetVertexType() const
Get the vertex type.
VertexLabel GetVertexLabel() const
Get the vertex label.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
std::vector< LArTrackState > LArTrackStateVector
StatusCode
The StatusCode enum.