LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
lar_content::ThreeDHitCreationAlgorithm::ProtoHit Class Reference

Proto hits are temporary constructs to be used during iterative 3D hit procedure. More...

#include "ThreeDHitCreationAlgorithm.h"

Public Member Functions

 ProtoHit (const pandora::CaloHit *const pParentCaloHit2D)
 Constructor. More...
 
const pandora::CaloHit * GetParentCaloHit2D () const
 Get the address of the parent 2D calo hit. More...
 
bool IsPositionSet () const
 Whether the proto hit position is set. More...
 
const pandora::CartesianVector & GetPosition3D () const
 Get the output 3D position. More...
 
double GetChi2 () const
 Get the chi squared value. More...
 
unsigned int GetNTrajectorySamples () const
 Get the number of trajectory samples. More...
 
const TrajectorySampleGetFirstTrajectorySample () const
 Get the first trajectory sample. More...
 
const TrajectorySampleGetLastTrajectorySample () const
 Get the last trajectory sample. More...
 
void SetPosition3D (const pandora::CartesianVector &position3D, const double chi2)
 Set position 3D. More...
 
void AddTrajectorySample (const TrajectorySample &trajectorySample)
 Add a trajectory sample. More...
 

Private Attributes

const pandora::CaloHit * m_pParentCaloHit2D
 The address of the parent 2D calo hit. More...
 
bool m_isPositionSet
 Whether the output 3D position has been set. More...
 
pandora::CartesianVector m_position3D
 The output 3D position. More...
 
double m_chi2
 The output chi squared value. More...
 
TrajectorySampleVector m_trajectorySampleVector
 The trajectory sample vector. More...
 

Detailed Description

Proto hits are temporary constructs to be used during iterative 3D hit procedure.

Definition at line 73 of file ThreeDHitCreationAlgorithm.h.

Constructor & Destructor Documentation

lar_content::ThreeDHitCreationAlgorithm::ProtoHit::ProtoHit ( const pandora::CaloHit *const  pParentCaloHit2D)
inline

Constructor.

Parameters
pParentCaloHit2Dthe address of the parent 2D calo hit

Definition at line 319 of file ThreeDHitCreationAlgorithm.h.

319  :
320  m_pParentCaloHit2D(pParentCaloHit2D),
321  m_isPositionSet(false),
322  m_position3D(0.f, 0.f, 0.f),
324 {
325 }
const pandora::CaloHit * m_pParentCaloHit2D
The address of the parent 2D calo hit.
TFile f
Definition: plotHisto.C:6
Int_t max
Definition: plot.C:27
bool m_isPositionSet
Whether the output 3D position has been set.
pandora::CartesianVector m_position3D
The output 3D position.

Member Function Documentation

void lar_content::ThreeDHitCreationAlgorithm::ProtoHit::AddTrajectorySample ( const TrajectorySample trajectorySample)
inline

Add a trajectory sample.

Parameters
thetrajectory sample

Definition at line 359 of file ThreeDHitCreationAlgorithm.h.

References m_trajectorySampleVector.

Referenced by lar_content::HitCreationBaseTool::~HitCreationBaseTool().

360 {
361  m_trajectorySampleVector.push_back(trajectorySample);
362 }
TrajectorySampleVector m_trajectorySampleVector
The trajectory sample vector.
double lar_content::ThreeDHitCreationAlgorithm::ProtoHit::GetChi2 ( ) const

Get the chi squared value.

Returns
the chi squared value, if set
Exceptions
StatusCodeException

Definition at line 412 of file ThreeDHitCreationAlgorithm.cc.

Referenced by lar_content::TransverseTrackHitsBaseTool::AddTransverseChi2(), lar_content::ThreeViewShowerHitsTool::GetShowerHit3D(), lar_content::TransverseTrackHitsBaseTool::GetTrackHits3D(), lar_content::LongitudinalTrackHitsBaseTool::GetTrackHits3D(), and lar_content::HitCreationBaseTool::~HitCreationBaseTool().

413 {
414  if (!m_isPositionSet)
415  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
416 
417  return m_chi2;
418 }
bool m_isPositionSet
Whether the output 3D position has been set.
const ThreeDHitCreationAlgorithm::TrajectorySample & lar_content::ThreeDHitCreationAlgorithm::ProtoHit::GetFirstTrajectorySample ( ) const

Get the first trajectory sample.

Returns
the first trajectory sample, if at least one sample is present
Exceptions
StatusCodeException

Definition at line 422 of file ThreeDHitCreationAlgorithm.cc.

423 {
424  if (m_trajectorySampleVector.empty())
425  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
426 
427  return m_trajectorySampleVector.front();
428 }
TrajectorySampleVector m_trajectorySampleVector
The trajectory sample vector.
const ThreeDHitCreationAlgorithm::TrajectorySample & lar_content::ThreeDHitCreationAlgorithm::ProtoHit::GetLastTrajectorySample ( ) const

Get the last trajectory sample.

Returns
the last trajectory sample, if at least two samples are present
Exceptions
StatusCodeException

Definition at line 432 of file ThreeDHitCreationAlgorithm.cc.

433 {
434  if (m_trajectorySampleVector.size() < 2)
435  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
436 
437  return m_trajectorySampleVector.back();
438 }
TrajectorySampleVector m_trajectorySampleVector
The trajectory sample vector.
unsigned int lar_content::ThreeDHitCreationAlgorithm::ProtoHit::GetNTrajectorySamples ( ) const
inline

Get the number of trajectory samples.

Returns
the number of trajectory samples

Definition at line 343 of file ThreeDHitCreationAlgorithm.h.

References m_trajectorySampleVector.

344 {
345  return m_trajectorySampleVector.size();
346 }
TrajectorySampleVector m_trajectorySampleVector
The trajectory sample vector.
const CartesianVector & lar_content::ThreeDHitCreationAlgorithm::ProtoHit::GetPosition3D ( ) const

Get the output 3D position.

Returns
the output 3D position, if set
Exceptions
StatusCodeException

Definition at line 402 of file ThreeDHitCreationAlgorithm.cc.

Referenced by lar_content::TransverseTrackHitsBaseTool::AddTransverseChi2(), lar_content::ThreeDHitCreationAlgorithm::CheckThreeDHit(), and lar_content::ThreeDHitCreationAlgorithm::CreateThreeDHit().

403 {
404  if (!m_isPositionSet)
405  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
406 
407  return m_position3D;
408 }
bool m_isPositionSet
Whether the output 3D position has been set.
pandora::CartesianVector m_position3D
The output 3D position.
bool lar_content::ThreeDHitCreationAlgorithm::ProtoHit::IsPositionSet ( ) const
inline
void lar_content::ThreeDHitCreationAlgorithm::ProtoHit::SetPosition3D ( const pandora::CartesianVector &  position3D,
const double  chi2 
)
inline

Set position 3D.

Parameters
theoutput 3D position
theoutput chi squared value

Definition at line 350 of file ThreeDHitCreationAlgorithm.h.

References m_chi2, m_isPositionSet, and m_position3D.

Referenced by lar_content::TransverseTrackHitsBaseTool::AddTransverseChi2(), and lar_content::HitCreationBaseTool::~HitCreationBaseTool().

351 {
352  m_position3D = position3D;
353  m_chi2 = chi2;
354  m_isPositionSet = true;
355 }
bool m_isPositionSet
Whether the output 3D position has been set.
pandora::CartesianVector m_position3D
The output 3D position.

Member Data Documentation

double lar_content::ThreeDHitCreationAlgorithm::ProtoHit::m_chi2
private

The output chi squared value.

Definition at line 159 of file ThreeDHitCreationAlgorithm.h.

Referenced by SetPosition3D().

bool lar_content::ThreeDHitCreationAlgorithm::ProtoHit::m_isPositionSet
private

Whether the output 3D position has been set.

Definition at line 157 of file ThreeDHitCreationAlgorithm.h.

Referenced by IsPositionSet(), and SetPosition3D().

pandora::CartesianVector lar_content::ThreeDHitCreationAlgorithm::ProtoHit::m_position3D
private

The output 3D position.

Definition at line 158 of file ThreeDHitCreationAlgorithm.h.

Referenced by SetPosition3D().

const pandora::CaloHit* lar_content::ThreeDHitCreationAlgorithm::ProtoHit::m_pParentCaloHit2D
private

The address of the parent 2D calo hit.

Definition at line 156 of file ThreeDHitCreationAlgorithm.h.

Referenced by GetParentCaloHit2D().

TrajectorySampleVector lar_content::ThreeDHitCreationAlgorithm::ProtoHit::m_trajectorySampleVector
private

The trajectory sample vector.

Definition at line 160 of file ThreeDHitCreationAlgorithm.h.

Referenced by AddTrajectorySample(), and GetNTrajectorySamples().


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