Public Member Functions | Private Member Functions | Private Attributes | List of all members
lar_content::ThreeViewShowerHitsTool Class Reference

ThreeViewShowerHitsTool class. More...

#include <ThreeViewShowerHitsTool.h>

Inheritance diagram for lar_content::ThreeViewShowerHitsTool:
lar_content::ShowerHitsBaseTool lar_content::HitCreationBaseTool

Public Member Functions

 ThreeViewShowerHitsTool ()
 Default constructor. More...
 
- Public Member Functions inherited from lar_content::ShowerHitsBaseTool
 ShowerHitsBaseTool ()
 Default constructor. More...
 
virtual void Run (ThreeDHitCreationAlgorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pPfo, const pandora::CaloHitVector &inputTwoDHits, ProtoHitVector &protoHitVector)
 Run the algorithm tool. More...
 
- Public Member Functions inherited from lar_content::HitCreationBaseTool
 HitCreationBaseTool ()
 Default constructor. More...
 
virtual ~HitCreationBaseTool ()
 Destructor. More...
 

Private Member Functions

void GetShowerHit3D (const pandora::CaloHitVector &caloHitVector1, const pandora::CaloHitVector &caloHitVector2, ProtoHit &protoHit) const
 Get the three dimensional position for to a two dimensional calo hit, using the hit and a list of candidate matched hits in the other two views. More...
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Private Attributes

float m_zTolerance
 The z tolerance to use when looking for associated calo hits between views. More...
 

Additional Inherited Members

- Public Types inherited from lar_content::HitCreationBaseTool
typedef ThreeDHitCreationAlgorithm::ProtoHit ProtoHit
 
typedef ThreeDHitCreationAlgorithm::ProtoHitVector ProtoHitVector
 
typedef ThreeDHitCreationAlgorithm::TrajectorySample TrajectorySample
 
- Protected Member Functions inherited from lar_content::ShowerHitsBaseTool
virtual void GetShowerHits3D (const pandora::CaloHitVector &inputTwoDHits, const pandora::CaloHitVector &caloHitVector1, const pandora::CaloHitVector &caloHitVector2, ProtoHitVector &protoHitVector) const
 Create three dimensional hits, using a list of input two dimensional hits and the hits (contained in the same particle) from the other two views. More...
 
- Protected Member Functions inherited from lar_content::HitCreationBaseTool
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...
 
- Protected Attributes inherited from lar_content::HitCreationBaseTool
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

ThreeViewShowerHitsTool class.

Definition at line 19 of file ThreeViewShowerHitsTool.h.

Constructor & Destructor Documentation

lar_content::ThreeViewShowerHitsTool::ThreeViewShowerHitsTool ( )

Default constructor.

Definition at line 20 of file ThreeViewShowerHitsTool.cc.

20  : m_zTolerance(1.f)
21 {
22 }
float m_zTolerance
The z tolerance to use when looking for associated calo hits between views.

Member Function Documentation

void lar_content::ThreeViewShowerHitsTool::GetShowerHit3D ( const pandora::CaloHitVector &  caloHitVector1,
const pandora::CaloHitVector &  caloHitVector2,
ProtoHit protoHit 
) const
privatevirtual

Get the three dimensional position for to a two dimensional calo hit, using the hit and a list of candidate matched hits in the other two views.

Parameters
caloHitVector1the vector of candidate hits in view 1
caloHitVector2the vector of candidate hits in view 2
protoHitto receive the populated proto hit

Implements lar_content::ShowerHitsBaseTool.

Definition at line 26 of file ThreeViewShowerHitsTool.cc.

27 {
28  if (caloHitVector1.empty() || caloHitVector2.empty())
29  throw StatusCodeException(STATUS_CODE_NOT_FOUND);
30 
31  const HitType hitType1(caloHitVector1.at(0)->GetHitType());
32  const HitType hitType2(caloHitVector2.at(0)->GetHitType());
33 
34  const CaloHit *const pCaloHit2D(protoHit.GetParentCaloHit2D());
35  const HitType hitType2D(pCaloHit2D->GetHitType());
36  const float position2D(pCaloHit2D->GetPositionVector().GetZ());
37 
38  for (const CaloHit *const pCaloHit1 : caloHitVector1)
39  {
40  const CartesianVector &position1(pCaloHit1->GetPositionVector());
41  const float prediction(LArGeometryHelper::MergeTwoPositions(this->GetPandora(), hitType2D, hitType1, position2D, position1.GetZ()));
42 
43  for (const CaloHit *const pCaloHit2 : caloHitVector2)
44  {
45  const CartesianVector &position2(pCaloHit2->GetPositionVector());
46 
47  if (std::fabs(position2.GetZ() - prediction) > m_zTolerance)
48  continue;
49 
50  ProtoHit thisProtoHit(pCaloHit2D);
51  this->GetBestPosition3D(hitType1, hitType2, position1, position2, thisProtoHit);
52 
53  if (!protoHit.IsPositionSet() || (thisProtoHit.GetChi2() < protoHit.GetChi2()))
54  protoHit = thisProtoHit;
55  }
56  }
57 }
ThreeDHitCreationAlgorithm::ProtoHit ProtoHit
enum cvn::HType HitType
static float MergeTwoPositions(const pandora::Pandora &pandora, const pandora::HitType view1, const pandora::HitType view2, const float position1, const float position2)
Merge two views (U,V) to give a third view (Z).
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 positi...
float m_zTolerance
The z tolerance to use when looking for associated calo hits between views.
StatusCode lar_content::ThreeViewShowerHitsTool::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Reimplemented from lar_content::ShowerHitsBaseTool.

Definition at line 61 of file ThreeViewShowerHitsTool.cc.

62 {
63  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "ZTolerance", m_zTolerance));
64 
65  return ShowerHitsBaseTool::ReadSettings(xmlHandle);
66 }
float m_zTolerance
The z tolerance to use when looking for associated calo hits between views.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)

Member Data Documentation

float lar_content::ThreeViewShowerHitsTool::m_zTolerance
private

The z tolerance to use when looking for associated calo hits between views.

Definition at line 32 of file ThreeViewShowerHitsTool.h.


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