ConeParameters class.
More...
#include <VertexBasedPfoMopUpAlgorithm.h>
|
| ConeParameters (const pandora::Cluster *const pCluster, const pandora::CartesianVector &vertexPosition2D, const float coneAngleCentile, const float maxConeCosHalfAngle) |
| Constructor. More...
|
|
float | GetBoundedFraction (const pandora::Cluster *const pDaughterCluster, const float coneLengthMultiplier) const |
| Get the fraction of hits in a candidate daughter cluster bounded by the cone. More...
|
|
lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::ConeParameters |
( |
const pandora::Cluster *const |
pCluster, |
|
|
const pandora::CartesianVector & |
vertexPosition2D, |
|
|
const float |
coneAngleCentile, |
|
|
const float |
maxConeCosHalfAngle |
|
) |
| |
Constructor.
- Parameters
-
pCluster | address of the cluster |
vertexPosition2D | the event 2D vertex position |
coneAngleCentile | the cone angle centile |
maxConeCosHalfAngle | the maximum value for cosine of cone half angle |
Definition at line 389 of file VertexBasedPfoMopUpAlgorithm.cc.
401 if (
m_coneLength < std::numeric_limits<float>::epsilon())
float GetCosHalfAngleEstimate(const float coneAngleCentile) const
Get the cone cos half angle estimate.
pandora::CartesianVector m_direction
The cone direction.
float GetSignedConeLength() const
Get the cone length (signed, by projections of hits onto initial direction estimate) ...
float m_coneLength
The cone length.
float m_coneCosHalfAngle
The cone cos half angle.
pandora::CartesianVector GetDirectionEstimate() const
Get the cone direction estimate, with apex fixed at the 2d vertex position.
pandora::CartesianVector m_apex
The cone apex.
const pandora::Cluster * m_pCluster
The parent cluster.
float lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::GetBoundedFraction |
( |
const pandora::Cluster *const |
pDaughterCluster, |
|
|
const float |
coneLengthMultiplier |
|
) |
| const |
Get the fraction of hits in a candidate daughter cluster bounded by the cone.
- Parameters
-
pDaughterCluster | the address of the daughter cluster |
coneLengthMultiplier | cnsider hits as bound if inside cone with projected distance less than N times cone length |
- Returns
- the bounded fraction
Definition at line 412 of file VertexBasedPfoMopUpAlgorithm.cc.
414 unsigned int nMatchedHits(0);
415 const OrderedCaloHitList &orderedCaloHitList(pDaughterCluster->GetOrderedCaloHitList());
417 for (OrderedCaloHitList::const_iterator iter = orderedCaloHitList.begin(), iterEnd = orderedCaloHitList.end(); iter != iterEnd; ++iter)
419 for (CaloHitList::const_iterator hIter = iter->second->begin(), hIterEnd = iter->second->end(); hIter != hIterEnd; ++hIter)
421 const CartesianVector &positionVector((*hIter)->GetPositionVector());
433 if (0 == pDaughterCluster->GetNCaloHits())
434 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
436 return (static_cast<float>(nMatchedHits) /
static_cast<float>(pDaughterCluster->GetNCaloHits()));
pandora::CartesianVector m_direction
The cone direction.
float m_coneLength
The cone length.
float m_coneCosHalfAngle
The cone cos half angle.
pandora::CartesianVector m_apex
The cone apex.
float lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::GetCosHalfAngleEstimate |
( |
const float |
coneAngleCentile | ) |
const |
|
private |
Get the cone cos half angle estimate.
- Parameters
-
coneAngleCentile | the cone angle centile |
- Returns
- the cone cos half angle estimate
Definition at line 485 of file VertexBasedPfoMopUpAlgorithm.cc.
487 FloatVector halfAngleValues;
488 const OrderedCaloHitList &orderedCaloHitList(
m_pCluster->GetOrderedCaloHitList());
490 for (OrderedCaloHitList::const_iterator iter = orderedCaloHitList.begin(), iterEnd = orderedCaloHitList.end(); iter != iterEnd; ++iter)
492 for (CaloHitList::const_iterator hitIter = iter->second->begin(), hitIterEnd = iter->second->end(); hitIter != hitIterEnd; ++hitIter)
493 halfAngleValues.push_back(
m_direction.GetOpeningAngle((*hitIter)->GetPositionVector() -
m_apex));
496 std::sort(halfAngleValues.begin(), halfAngleValues.end());
498 if (halfAngleValues.empty())
499 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
501 const unsigned int halfAngleBin(coneAngleCentile * halfAngleValues.size());
502 return std::cos(halfAngleValues.at(halfAngleBin));
pandora::CartesianVector m_direction
The cone direction.
pandora::CartesianVector m_apex
The cone apex.
const pandora::Cluster * m_pCluster
The parent cluster.
CartesianVector lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::GetDirectionEstimate |
( |
| ) |
const |
|
private |
Get the cone direction estimate, with apex fixed at the 2d vertex position.
- Returns
- the direction estimate
Definition at line 441 of file VertexBasedPfoMopUpAlgorithm.cc.
443 const OrderedCaloHitList &orderedCaloHitList(
m_pCluster->GetOrderedCaloHitList());
444 float sumDxDz(0.f), sumDxDx(0.f);
446 for (OrderedCaloHitList::const_iterator iter = orderedCaloHitList.begin(), iterEnd = orderedCaloHitList.end(); iter != iterEnd; ++iter)
448 for (CaloHitList::const_iterator hitIter = iter->second->begin(), hitIterEnd = iter->second->end(); hitIter != hitIterEnd; ++hitIter)
450 const CartesianVector apexDisplacement((*hitIter)->GetPositionVector() -
m_apex);
451 sumDxDz += apexDisplacement.GetX() * apexDisplacement.GetZ();
452 sumDxDx += apexDisplacement.GetX() * apexDisplacement.GetX();
456 if (sumDxDx < std::numeric_limits<float>::epsilon())
457 return CartesianVector(0.f, 0.f, 1.f);
459 return CartesianVector(1.f, 0.f, sumDxDz / sumDxDx).GetUnitVector();
pandora::CartesianVector m_apex
The cone apex.
const pandora::Cluster * m_pCluster
The parent cluster.
float lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::GetSignedConeLength |
( |
| ) |
const |
|
private |
Get the cone length (signed, by projections of hits onto initial direction estimate)
- Returns
- rhe cone length
Definition at line 464 of file VertexBasedPfoMopUpAlgorithm.cc.
466 float maxProjectedLength(0.f);
467 const OrderedCaloHitList &orderedCaloHitList(
m_pCluster->GetOrderedCaloHitList());
469 for (OrderedCaloHitList::const_iterator iter = orderedCaloHitList.begin(), iterEnd = orderedCaloHitList.end(); iter != iterEnd; ++iter)
471 for (CaloHitList::const_iterator hitIter = iter->second->begin(), hitIterEnd = iter->second->end(); hitIter != hitIterEnd; ++hitIter)
473 const float projectedLength(
m_direction.GetDotProduct((*hitIter)->GetPositionVector() -
m_apex));
475 if (std::fabs(projectedLength) > std::fabs(maxProjectedLength))
476 maxProjectedLength = projectedLength;
480 return maxProjectedLength;
pandora::CartesianVector m_direction
The cone direction.
pandora::CartesianVector m_apex
The cone apex.
const pandora::Cluster * m_pCluster
The parent cluster.
pandora::CartesianVector lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::m_apex |
|
private |
float lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::m_coneCosHalfAngle |
|
private |
float lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::m_coneLength |
|
private |
pandora::CartesianVector lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::m_direction |
|
private |
const pandora::Cluster* lar_content::VertexBasedPfoMopUpAlgorithm::ConeParameters::m_pCluster |
|
private |
The documentation for this class was generated from the following files: