All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
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 320 of file ThreeDHitCreationAlgorithm.h.

320  :
321  m_pParentCaloHit2D(pParentCaloHit2D),
322  m_isPositionSet(false),
323  m_position3D(0.f, 0.f, 0.f),
324  m_chi2(std::numeric_limits<double>::max())
325 {
326 }
const pandora::CaloHit * m_pParentCaloHit2D
The address of the parent 2D calo hit.
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 360 of file ThreeDHitCreationAlgorithm.h.

361 {
362  m_trajectorySampleVector.push_back(trajectorySample);
363 }
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 432 of file ThreeDHitCreationAlgorithm.cc.

433 {
434  if (!m_isPositionSet)
435  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
436 
437  return m_chi2;
438 }
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 442 of file ThreeDHitCreationAlgorithm.cc.

443 {
444  if (m_trajectorySampleVector.empty())
445  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
446 
447  return m_trajectorySampleVector.front();
448 }
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 452 of file ThreeDHitCreationAlgorithm.cc.

453 {
454  if (m_trajectorySampleVector.size() < 2)
455  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
456 
457  return m_trajectorySampleVector.back();
458 }
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 344 of file ThreeDHitCreationAlgorithm.h.

345 {
346  return m_trajectorySampleVector.size();
347 }
TrajectorySampleVector m_trajectorySampleVector
The trajectory sample vector.
const pandora::CaloHit * lar_content::ThreeDHitCreationAlgorithm::ProtoHit::GetParentCaloHit2D ( ) const
inline

Get the address of the parent 2D calo hit.

Returns
the address of the parent 2D calo hit

Definition at line 330 of file ThreeDHitCreationAlgorithm.h.

331 {
332  return m_pParentCaloHit2D;
333 }
const pandora::CaloHit * m_pParentCaloHit2D
The address of the parent 2D calo hit.
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 422 of file ThreeDHitCreationAlgorithm.cc.

423 {
424  if (!m_isPositionSet)
425  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
426 
427  return m_position3D;
428 }
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

Whether the proto hit position is set.

Returns
boolean

Definition at line 337 of file ThreeDHitCreationAlgorithm.h.

338 {
339  return m_isPositionSet;
340 }
bool m_isPositionSet
Whether the output 3D position has been set.
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 351 of file ThreeDHitCreationAlgorithm.h.

352 {
353  m_position3D = position3D;
354  m_chi2 = chi2;
355  m_isPositionSet = true;
356 }
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.

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

Whether the output 3D position has been set.

Definition at line 157 of file ThreeDHitCreationAlgorithm.h.

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

The output 3D position.

Definition at line 158 of file ThreeDHitCreationAlgorithm.h.

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.

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

The trajectory sample vector.

Definition at line 160 of file ThreeDHitCreationAlgorithm.h.


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