17 LArPointingCluster::LArPointingCluster(
const Cluster *
const pCluster,
const unsigned int fitHalfLayerWindow,
const float fitLayerPitch)
20 if (TPC_3D == LArClusterHelper::GetClusterHitType(pCluster))
22 const ThreeDSlidingFitResult slidingFitResult(pCluster, fitHalfLayerWindow, fitLayerPitch);
23 this->BuildPointingCluster(slidingFitResult);
27 const TwoDSlidingFitResult slidingFitResult(pCluster, fitHalfLayerWindow, fitLayerPitch);
28 this->BuildPointingCluster(slidingFitResult);
36 this->BuildPointingCluster(slidingFitResult);
43 this->BuildPointingCluster(slidingFitResult);
50 const HitType hitType(LArClusterHelper::GetClusterHitType(slidingFitResult.
GetCluster()));
52 if (!((TPC_VIEW_U == hitType) || (TPC_VIEW_V == hitType) || (TPC_VIEW_W == hitType)))
53 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
56 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
67 m_innerVertex = (isInner ? minVertex : maxVertex);
68 m_outerVertex = (isInner ? maxVertex : minVertex);
75 if (TPC_3D != LArClusterHelper::GetClusterHitType(slidingFitResult.
GetCluster()))
76 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
79 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
91 m_innerVertex = (isInner ? minVertex : maxVertex);
92 m_outerVertex = (isInner ? maxVertex : minVertex);
97 LArPointingCluster::Vertex::Vertex() :
99 m_position(0.f, 0.f, 0.f),
100 m_direction(0.f, 0.f, 0.f),
101 m_rms(
std::numeric_limits<float>::max()),
103 m_isInitialized(
false)
110 const Cluster *
const pCluster,
const CartesianVector &position,
const CartesianVector &direction,
const float rms,
const bool isInner) :
112 m_position(position),
113 m_direction(direction),
116 m_isInitialized(
true)
124 m_position(rhs.m_position),
125 m_direction(rhs.m_direction),
127 m_isInner(rhs.m_isInner),
128 m_isInitialized(rhs.m_isInitialized)
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Header file for the lar pointing cluster class.
const pandora::CartesianVector & GetGlobalMinLayerDirection() const
Get global direction corresponding to the fit result in minimum fit layer.
float GetMaxLayerRms() const
Get rms at maximum layer.
int GetMaxLayer() const
Get the maximum occupied layer in the sliding fit.
float GetMaxLayerRms() const
Get rms at maximum layer.
float GetMinLayerRms() const
Get rms at minimum layer.
const pandora::Cluster * m_pCluster
The address of the cluster.
Vertex & operator=(const Vertex &rhs)
Vertex assigment operator.
pandora::CartesianVector GetGlobalMinLayerDirection() const
Get global direction corresponding to the fit result in minimum fit layer.
const pandora::Cluster * m_pCluster
The address of the cluster.
int GetMaxLayer() const
Get the maximum occupied layer in the sliding fit.
int GetMinLayer() const
Get the minimum occupied layer in the sliding fit.
Header file for the cluster helper class.
const pandora::CartesianVector & GetGlobalMaxLayerDirection() const
Get global direction corresponding to the fit result in maximum fit layer.
bool m_isInner
Whether this is the inner vertex.
pandora::CartesianVector GetGlobalMinLayerPosition() const
Get global position corresponding to the fit result in minimum fit layer.
int GetMinLayer() const
Get the minimum occupied layer in the sliding fit.
const pandora::CartesianVector & GetGlobalMaxLayerPosition() const
Get global position corresponding to the fit result in maximum fit layer.
float GetMinLayerRms() const
Get rms at minimum layer.
const pandora::Cluster * GetCluster() const
Get the address of the cluster, if originally provided.
required by fuzzyCluster table::sbnd_g4_services gaushitTruthMatch pandora
ThreeDSlidingFitResult class.
pandora::CartesianVector GetGlobalMaxLayerDirection() const
Get global direction corresponding to the fit result in maximum fit layer.
Vertex()
Default constructor.
float m_rms
Rms from vertex fit.
const pandora::Cluster * GetCluster() const
Get the address of the cluster.
bool m_isInitialized
Whether the vertex has been initialized.
pandora::CartesianVector m_direction
The vertex direction.
pandora::CartesianVector GetGlobalMaxLayerPosition() const
Get global position corresponding to the fit result in maximum fit layer.
BEGIN_PROLOG don t mess with this pandoraTrackGausCryoW true
TwoDSlidingFitResult class.
pandora::CartesianVector m_position
The vertex position.
const pandora::CartesianVector & GetGlobalMinLayerPosition() const
Get global position corresponding to the fit result in minimum fit layer.