All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
lar_content::SimpleCone Class Reference

SimpleCone class. More...

#include <LArThreeDSlidingConeFitResult.h>

Public Member Functions

 SimpleCone (const pandora::CartesianVector &coneApex, const pandora::CartesianVector &coneDirection, const float coneLength, const float coneTanHalfAngle)
 Constructor. More...
 
const pandora::CartesianVector & GetConeApex () const
 Get the cone apex. More...
 
const pandora::CartesianVector & GetConeDirection () const
 Get the cone direction. More...
 
float GetConeLength () const
 Get the cone length. More...
 
float GetConeTanHalfAngle () const
 Get the tangent of the cone half-angle. More...
 
float GetMeanRT (const pandora::Cluster *const pCluster) const
 Get the mean transverse distance to all hits in a cluster (whether contained or not) More...
 
float GetBoundedHitFraction (const pandora::Cluster *const pCluster) const
 Get the fraction of hits in a provided cluster that are bounded within the cone, using fitted cone angle and length. More...
 
float GetBoundedHitFraction (const pandora::Cluster *const pCluster, const float coneLength, const float coneTanHalfAngle) const
 Get the fraction of hits in a provided cluster that are bounded within the cone, using provided cone angle and length. More...
 

Private Attributes

pandora::CartesianVector m_coneApex
 The cone apex. More...
 
pandora::CartesianVector m_coneDirection
 The cone direction. More...
 
float m_coneLength
 The cone length. More...
 
float m_coneTanHalfAngle
 The tangent of the cone half-angle. More...
 

Detailed Description

SimpleCone class.

Definition at line 36 of file LArThreeDSlidingConeFitResult.h.

Constructor & Destructor Documentation

lar_content::SimpleCone::SimpleCone ( const pandora::CartesianVector &  coneApex,
const pandora::CartesianVector &  coneDirection,
const float  coneLength,
const float  coneTanHalfAngle 
)
inline

Constructor.

Parameters
coneApex
coneDirection
coneLength
coneTanHalfAngle

Definition at line 173 of file LArThreeDSlidingConeFitResult.h.

174  :
175  m_coneApex(coneApex),
176  m_coneDirection(coneDirection),
177  m_coneLength(coneLength),
178  m_coneTanHalfAngle(coneTanHalfAngle)
179 {
180 }
pandora::CartesianVector m_coneDirection
The cone direction.
float m_coneTanHalfAngle
The tangent of the cone half-angle.
pandora::CartesianVector m_coneApex
The cone apex.

Member Function Documentation

float lar_content::SimpleCone::GetBoundedHitFraction ( const pandora::Cluster *const  pCluster) const
inline

Get the fraction of hits in a provided cluster that are bounded within the cone, using fitted cone angle and length.

Parameters
pClusterthe address of the cluster
Returns
the bounded hit fraction

Definition at line 212 of file LArThreeDSlidingConeFitResult.h.

213 {
214  return this->GetBoundedHitFraction(pCluster, this->GetConeLength(), this->GetConeTanHalfAngle());
215 }
float GetConeTanHalfAngle() const
Get the tangent of the cone half-angle.
float GetBoundedHitFraction(const pandora::Cluster *const pCluster) const
Get the fraction of hits in a provided cluster that are bounded within the cone, using fitted cone an...
float GetConeLength() const
Get the cone length.
float lar_content::SimpleCone::GetBoundedHitFraction ( const pandora::Cluster *const  pCluster,
const float  coneLength,
const float  coneTanHalfAngle 
) const

Get the fraction of hits in a provided cluster that are bounded within the cone, using provided cone angle and length.

Parameters
pClusterthe address of the cluster
coneLengththe provided cone length
coneTanHalfAnglethe provided tangent of the cone half-angle
Returns
the bounded hit fraction
const pandora::CartesianVector & lar_content::SimpleCone::GetConeApex ( ) const
inline

Get the cone apex.

Returns
the cone apex

Definition at line 184 of file LArThreeDSlidingConeFitResult.h.

185 {
186  return m_coneApex;
187 }
pandora::CartesianVector m_coneApex
The cone apex.
const pandora::CartesianVector & lar_content::SimpleCone::GetConeDirection ( ) const
inline

Get the cone direction.

Returns
the cone direction

Definition at line 191 of file LArThreeDSlidingConeFitResult.h.

192 {
193  return m_coneDirection;
194 }
pandora::CartesianVector m_coneDirection
The cone direction.
float lar_content::SimpleCone::GetConeLength ( ) const
inline

Get the cone length.

Returns
the cone length

Definition at line 198 of file LArThreeDSlidingConeFitResult.h.

199 {
200  return m_coneLength;
201 }
float lar_content::SimpleCone::GetConeTanHalfAngle ( ) const
inline

Get the tangent of the cone half-angle.

Returns
the tangent of the cone half-angle

Definition at line 205 of file LArThreeDSlidingConeFitResult.h.

206 {
207  return m_coneTanHalfAngle;
208 }
float m_coneTanHalfAngle
The tangent of the cone half-angle.
float lar_content::SimpleCone::GetMeanRT ( const pandora::Cluster *const  pCluster) const

Get the mean transverse distance to all hits in a cluster (whether contained or not)

Parameters
pClusterthe address of the cluster
Returns
the mean transverse distance to all hits (whether contained or not)

Definition at line 22 of file LArThreeDSlidingConeFitResult.cc.

23 {
24  CartesianPointVector hitPositionVector;
25  LArClusterHelper::GetCoordinateVector(pCluster, hitPositionVector);
26 
27  float rTSum(0.f);
28  const unsigned int nClusterHits(pCluster->GetNCaloHits());
29 
30  for (const CartesianVector &hitPosition : hitPositionVector)
31  {
32  const CartesianVector displacement(hitPosition - this->GetConeApex());
33  const float rT(displacement.GetCrossProduct(this->GetConeDirection()).GetMagnitude());
34  rTSum += rT;
35  }
36 
37  return ((nClusterHits > 0) ? rTSum / static_cast<float>(nClusterHits) : 0.f);
38 }
const pandora::CartesianVector & GetConeApex() const
Get the cone apex.
createEngine this
static void GetCoordinateVector(const pandora::Cluster *const pCluster, pandora::CartesianPointVector &coordinateVector)
Get vector of hit coordinates from an input cluster.

Member Data Documentation

pandora::CartesianVector lar_content::SimpleCone::m_coneApex
private

The cone apex.

Definition at line 107 of file LArThreeDSlidingConeFitResult.h.

pandora::CartesianVector lar_content::SimpleCone::m_coneDirection
private

The cone direction.

Definition at line 108 of file LArThreeDSlidingConeFitResult.h.

float lar_content::SimpleCone::m_coneLength
private

The cone length.

Definition at line 109 of file LArThreeDSlidingConeFitResult.h.

float lar_content::SimpleCone::m_coneTanHalfAngle
private

The tangent of the cone half-angle.

Definition at line 110 of file LArThreeDSlidingConeFitResult.h.


The documentation for this class was generated from the following files: