LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::HitCreationBaseTool Class Referenceabstract

HitCreationBaseTool class. More...

#include "HitCreationBaseTool.h"

Inheritance diagram for lar_content::HitCreationBaseTool:
lar_content::DeltaRayShowerHitsTool lar_content::ShowerHitsBaseTool lar_content::TrackHitsBaseTool lar_content::ThreeViewShowerHitsTool lar_content::TwoViewShowerHitsTool lar_content::LongitudinalTrackHitsBaseTool lar_content::TransverseTrackHitsBaseTool lar_content::ClearLongitudinalTrackHitsTool lar_content::MultiValuedLongitudinalTrackHitsTool lar_content::ClearTransverseTrackHitsTool lar_content::MultiValuedTransverseTrackHitsTool

Public Types

typedef ThreeDHitCreationAlgorithm::ProtoHit ProtoHit
 
typedef ThreeDHitCreationAlgorithm::ProtoHitVector ProtoHitVector
 
typedef ThreeDHitCreationAlgorithm::TrajectorySample TrajectorySample
 

Public Member Functions

 HitCreationBaseTool ()
 Default constructor. More...
 
virtual ~HitCreationBaseTool ()
 Destructor. More...
 
virtual void Run (ThreeDHitCreationAlgorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pPfo, const pandora::CaloHitVector &inputTwoDHits, ProtoHitVector &protoHitVector)=0
 Run the algorithm tool. More...
 

Protected Member Functions

virtual void GetBestPosition3D (const pandora::HitType hitType1, const pandora::HitType hitType2, const pandora::CartesianPointVector &fitPositionList1, const pandora::CartesianPointVector &fitPositionList2, ProtoHit &protoHit) const
 Get the three dimensional position using a provided two dimensional calo hit and candidate fit positions from the other two views. More...
 
virtual void GetBestPosition3D (const pandora::HitType hitType1, const pandora::HitType hitType2, const pandora::CartesianVector &fitPosition1, const pandora::CartesianVector &fitPosition2, ProtoHit &protoHit) const
 Get the three dimensional position using a provided two dimensional calo hit and candidate fit positions from the other two views. More...
 
virtual void GetBestPosition3D (const pandora::HitType hitType, const pandora::CartesianVector &fitPosition, ProtoHit &protoHit) const
 Get the three dimensional position using a provided two dimensional calo hit and a candidate fit position from another view. More...
 
virtual pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Protected Attributes

double m_sigmaX2
 The sigmaX squared value, for calculation of chi2 deltaX term. More...
 
double m_chiSquaredCut
 The chi squared cut (accept only values below the cut value) More...
 

Detailed Description

HitCreationBaseTool class.

Definition at line 21 of file HitCreationBaseTool.h.

Member Typedef Documentation

Constructor & Destructor Documentation

lar_content::HitCreationBaseTool::HitCreationBaseTool ( )

Default constructor.

Definition at line 20 of file HitCreationBaseTool.cc.

20  :
21  m_sigmaX2(1.),
22  m_chiSquaredCut(1.)
23 {
24 }
double m_sigmaX2
The sigmaX squared value, for calculation of chi2 deltaX term.
double m_chiSquaredCut
The chi squared cut (accept only values below the cut value)

Member Function Documentation

virtual void lar_content::HitCreationBaseTool::GetBestPosition3D ( const pandora::HitType  hitType1,
const pandora::HitType  hitType2,
const pandora::CartesianPointVector &  fitPositionList1,
const pandora::CartesianPointVector &  fitPositionList2,
ProtoHit protoHit 
) const
protectedvirtual

Get the three dimensional position using a provided two dimensional calo hit and candidate fit positions from the other two views.

Parameters
hitType1the hit type identifying the first view
hitType2the hit type identifying the second view
fitPositionList1the candidate sliding fit position in the first view
fitPositionList2the candidate sliding fit position in the second view
protoHitto receive the populated proto hit

Referenced by lar_content::ThreeViewShowerHitsTool::GetShowerHit3D(), and ~HitCreationBaseTool().

virtual void lar_content::HitCreationBaseTool::GetBestPosition3D ( const pandora::HitType  hitType1,
const pandora::HitType  hitType2,
const pandora::CartesianVector &  fitPosition1,
const pandora::CartesianVector &  fitPosition2,
ProtoHit protoHit 
) const
protectedvirtual

Get the three dimensional position using a provided two dimensional calo hit and candidate fit positions from the other two views.

Parameters
hitType1the hit type identifying the first view
hitType2the hit type identifying the second view
fitPosition1the candidate sliding fit position in the first view
fitPosition2the candidate sliding fit position in the second view
protoHitto receive the populated proto hit
virtual void lar_content::HitCreationBaseTool::GetBestPosition3D ( const pandora::HitType  hitType,
const pandora::CartesianVector &  fitPosition,
ProtoHit protoHit 
) const
protectedvirtual

Get the three dimensional position using a provided two dimensional calo hit and a candidate fit position from another view.

Parameters
hitTypethe hit type identifying the other view
fitPositionthe candidate sliding fit position in the other view
protoHitto receive the populated proto hit
StatusCode lar_content::HitCreationBaseTool::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
protectedvirtual

Reimplemented in lar_content::TrackHitsBaseTool, lar_content::ShowerHitsBaseTool, lar_content::LongitudinalTrackHitsBaseTool, and lar_content::ThreeViewShowerHitsTool.

Definition at line 141 of file HitCreationBaseTool.cc.

References m_chiSquaredCut, and m_sigmaX2.

Referenced by lar_content::ShowerHitsBaseTool::ReadSettings(), and lar_content::TrackHitsBaseTool::ReadSettings().

142 {
143  double sigmaX(std::sqrt(m_sigmaX2));
144 
145  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "SigmaX", sigmaX));
146 
147  m_sigmaX2 = sigmaX * sigmaX;
148 
149  if (m_sigmaX2 < std::numeric_limits<double>::epsilon())
150  {
151  std::cout << "HitCreationBaseTool - Invalid parameter, SigmaX: " << sigmaX << std::endl;
152  return STATUS_CODE_INVALID_PARAMETER;
153  }
154 
155  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "ChiSquaredCut", m_chiSquaredCut));
156 
157  return STATUS_CODE_SUCCESS;
158 }
double m_sigmaX2
The sigmaX squared value, for calculation of chi2 deltaX term.
double m_chiSquaredCut
The chi squared cut (accept only values below the cut value)
virtual void lar_content::HitCreationBaseTool::Run ( ThreeDHitCreationAlgorithm *const  pAlgorithm,
const pandora::ParticleFlowObject *const  pPfo,
const pandora::CaloHitVector &  inputTwoDHits,
ProtoHitVector protoHitVector 
)
pure virtual

Run the algorithm tool.

Parameters
pAlgorithmaddress of the calling algorithm
pPfothe address of the pfo
inputTwoDHitsthe vector of input two dimensional hits
protoHitVectorto receive the new three dimensional proto hits

Implemented in lar_content::TrackHitsBaseTool, lar_content::ShowerHitsBaseTool, and lar_content::DeltaRayShowerHitsTool.

Member Data Documentation

double lar_content::HitCreationBaseTool::m_chiSquaredCut
protected

The chi squared cut (accept only values below the cut value)

Definition at line 86 of file HitCreationBaseTool.h.

Referenced by lar_content::ShowerHitsBaseTool::GetShowerHits3D(), lar_content::LongitudinalTrackHitsBaseTool::GetTrackHits3D(), and ReadSettings().

double lar_content::HitCreationBaseTool::m_sigmaX2
protected

The sigmaX squared value, for calculation of chi2 deltaX term.

Definition at line 85 of file HitCreationBaseTool.h.

Referenced by ReadSettings(), and ~HitCreationBaseTool().


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