LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
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.

173  :
174  m_coneApex(coneApex),
175  m_coneDirection(coneDirection),
176  m_coneLength(coneLength),
177  m_coneTanHalfAngle(coneTanHalfAngle)
178 {
179 }
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 211 of file LArThreeDSlidingConeFitResult.h.

References GetConeLength(), and GetConeTanHalfAngle().

212 {
213  return this->GetBoundedHitFraction(pCluster, this->GetConeLength(), this->GetConeTanHalfAngle());
214 }
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 183 of file LArThreeDSlidingConeFitResult.h.

References m_coneApex.

184 {
185  return m_coneApex;
186 }
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 190 of file LArThreeDSlidingConeFitResult.h.

References m_coneDirection.

191 {
192  return m_coneDirection;
193 }
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 197 of file LArThreeDSlidingConeFitResult.h.

References m_coneLength.

Referenced by GetBoundedHitFraction().

198 {
199  return m_coneLength;
200 }
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 204 of file LArThreeDSlidingConeFitResult.h.

References m_coneTanHalfAngle.

Referenced by GetBoundedHitFraction().

205 {
206  return m_coneTanHalfAngle;
207 }
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.

References f.

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 }
TFile f
Definition: plotHisto.C:6
const pandora::CartesianVector & GetConeApex() const
Get the cone apex.
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.

Referenced by GetConeApex().

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

The cone direction.

Definition at line 108 of file LArThreeDSlidingConeFitResult.h.

Referenced by GetConeDirection().

float lar_content::SimpleCone::m_coneLength
private

The cone length.

Definition at line 109 of file LArThreeDSlidingConeFitResult.h.

Referenced by GetConeLength().

float lar_content::SimpleCone::m_coneTanHalfAngle
private

The tangent of the cone half-angle.

Definition at line 110 of file LArThreeDSlidingConeFitResult.h.

Referenced by GetConeTanHalfAngle().


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