LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::LArCaloHit Class Reference

LAr calo hit class. More...

#include "LArCaloHit.h"

Inheritance diagram for lar_content::LArCaloHit:

Public Member Functions

 LArCaloHit (const LArCaloHitParameters &parameters)
 Constructor. More...
 
unsigned int GetLArTPCVolumeId () const
 Get the lar tpc volume id. More...
 
unsigned int GetDaughterVolumeId () const
 Get the daughter volume id. More...
 
void FillParameters (LArCaloHitParameters &parameters) const
 Fill the parameters associated with this calo hit. More...
 
float GetTrackProbability () const
 Get the probability that the hit is track-like. More...
 
float GetShowerProbability () const
 Get the probability that the hit is shower-like. More...
 
void SetTrackProbability (const float probability)
 Set the probability that the hit is track-like. More...
 
void SetShowerProbability (const float probability)
 Set the probability that the hit is shower-like. More...
 

Private Attributes

unsigned int m_larTPCVolumeId
 The lar tpc volume id. More...
 
unsigned int m_daughterVolumeId
 The daughter volume id. More...
 
pandora::InputFloat m_pTrack
 The probability that the hit is track-like. More...
 
pandora::InputFloat m_pShower
 The probability that the hit is shower-like. More...
 

Detailed Description

LAr calo hit class.

Definition at line 39 of file LArCaloHit.h.

Constructor & Destructor Documentation

lar_content::LArCaloHit::LArCaloHit ( const LArCaloHitParameters parameters)
inline

Constructor.

Parameters
parametersthe lar calo hit parameters

Definition at line 158 of file LArCaloHit.h.

158  :
159  object_creation::CaloHit::Object(parameters),
160  m_larTPCVolumeId(parameters.m_larTPCVolumeId.Get()),
161  m_daughterVolumeId(parameters.m_daughterVolumeId.IsInitialized() ? parameters.m_daughterVolumeId.Get() : 0)
162 {
163 }
unsigned int m_larTPCVolumeId
The lar tpc volume id.
Definition: LArCaloHit.h:99
unsigned int m_daughterVolumeId
The daughter volume id.
Definition: LArCaloHit.h:100

Member Function Documentation

void lar_content::LArCaloHit::FillParameters ( LArCaloHitParameters parameters) const
inline

Fill the parameters associated with this calo hit.

Parameters
parametersthe output parameters

Definition at line 181 of file LArCaloHit.h.

References GetDaughterVolumeId(), GetLArTPCVolumeId(), lar_content::LArCaloHitParameters::m_daughterVolumeId, and lar_content::LArCaloHitParameters::m_larTPCVolumeId.

182 {
183  parameters.m_positionVector = this->GetPositionVector();
184  parameters.m_expectedDirection = this->GetExpectedDirection();
185  parameters.m_cellNormalVector = this->GetCellNormalVector();
186  parameters.m_cellGeometry = this->GetCellGeometry();
187  parameters.m_cellSize0 = this->GetCellSize0();
188  parameters.m_cellSize1 = this->GetCellSize1();
189  parameters.m_cellThickness = this->GetCellThickness();
190  parameters.m_nCellRadiationLengths = this->GetNCellRadiationLengths();
191  parameters.m_nCellInteractionLengths = this->GetNCellInteractionLengths();
192  parameters.m_time = this->GetTime();
193  parameters.m_inputEnergy = this->GetInputEnergy();
194  parameters.m_mipEquivalentEnergy = this->GetMipEquivalentEnergy();
195  parameters.m_electromagneticEnergy = this->GetElectromagneticEnergy();
196  parameters.m_hadronicEnergy = this->GetHadronicEnergy();
197  parameters.m_isDigital = this->IsDigital();
198  parameters.m_hitType = this->GetHitType();
199  parameters.m_hitRegion = this->GetHitRegion();
200  parameters.m_layer = this->GetLayer();
201  parameters.m_isInOuterSamplingLayer = this->IsInOuterSamplingLayer();
202  // ATTN Set the parent address to the original owner of the calo hit
203  parameters.m_pParentAddress = static_cast<const void *>(this);
204  parameters.m_larTPCVolumeId = this->GetLArTPCVolumeId();
205  parameters.m_daughterVolumeId = this->GetDaughterVolumeId();
206 }
unsigned int GetLArTPCVolumeId() const
Get the lar tpc volume id.
Definition: LArCaloHit.h:167
unsigned int GetDaughterVolumeId() const
Get the daughter volume id.
Definition: LArCaloHit.h:174
unsigned int lar_content::LArCaloHit::GetDaughterVolumeId ( ) const
inline

Get the daughter volume id.

Returns
the daughter volume id

Definition at line 174 of file LArCaloHit.h.

References m_daughterVolumeId.

Referenced by FillParameters(), lar_content::LArClusterHelper::GetDaughterVolumeIDs(), and lar_content::LArCaloHitFactory::Write().

175 {
176  return m_daughterVolumeId;
177 }
unsigned int m_daughterVolumeId
The daughter volume id.
Definition: LArCaloHit.h:100
unsigned int lar_content::LArCaloHit::GetLArTPCVolumeId ( ) const
inline

Get the lar tpc volume id.

Returns
the lar tpc volume id

Definition at line 167 of file LArCaloHit.h.

References m_larTPCVolumeId.

Referenced by lar_content::CosmicRayTaggingTool::CheckIfInTime(), FillParameters(), lar_content::MasterAlgorithm::GetVolumeIdToHitListMap(), and lar_content::LArCaloHitFactory::Write().

168 {
169  return m_larTPCVolumeId;
170 }
unsigned int m_larTPCVolumeId
The lar tpc volume id.
Definition: LArCaloHit.h:99
float lar_content::LArCaloHit::GetShowerProbability ( ) const
inline

Get the probability that the hit is shower-like.

Returns
the probability the hit is shower-like

Definition at line 217 of file LArCaloHit.h.

References m_pShower.

218 {
219  return m_pShower.Get();
220 }
pandora::InputFloat m_pShower
The probability that the hit is shower-like.
Definition: LArCaloHit.h:102
float lar_content::LArCaloHit::GetTrackProbability ( ) const
inline

Get the probability that the hit is track-like.

Returns
the probability the hit is track-like

Definition at line 210 of file LArCaloHit.h.

References m_pTrack.

Referenced by lar_dl_content::DlTrackShowerStreamSelectionAlgorithm::AllocateToStreams(), lar_dl_content::DlPfoCharacterisationAlgorithm::DlPfoCharacterisationAlgorithm(), lar_dl_content::DlPfoCharacterisationAlgorithm::IsClearTrack(), lar_dl_content::DlClusterCharacterisationAlgorithm::IsClearTrack(), and lar_dl_content::DlHitValidationAlgorithm::Run().

211 {
212  return m_pTrack.Get();
213 }
pandora::InputFloat m_pTrack
The probability that the hit is track-like.
Definition: LArCaloHit.h:101
void lar_content::LArCaloHit::SetShowerProbability ( const float  probability)
inline

Set the probability that the hit is shower-like.

Parameters
probabilitythe probability the hit is shower-like

Definition at line 234 of file LArCaloHit.h.

References f, and m_pShower.

Referenced by lar_dl_content::DlHitTrackShowerIdAlgorithm::Infer().

235 {
236  if (probability >= 0.f)
237  m_pShower = probability;
238  else
239  throw pandora::StatusCodeException(pandora::STATUS_CODE_INVALID_PARAMETER);
240 }
pandora::InputFloat m_pShower
The probability that the hit is shower-like.
Definition: LArCaloHit.h:102
TFile f
Definition: plotHisto.C:6
void lar_content::LArCaloHit::SetTrackProbability ( const float  probability)
inline

Set the probability that the hit is track-like.

Parameters
probabilitythe probability the hit is track-like

Definition at line 224 of file LArCaloHit.h.

References f, and m_pTrack.

225 {
226  if (probability >= 0.f)
227  m_pTrack = probability;
228  else
229  throw pandora::StatusCodeException(pandora::STATUS_CODE_INVALID_PARAMETER);
230 }
pandora::InputFloat m_pTrack
The probability that the hit is track-like.
Definition: LArCaloHit.h:101
TFile f
Definition: plotHisto.C:6

Member Data Documentation

unsigned int lar_content::LArCaloHit::m_daughterVolumeId
private

The daughter volume id.

Definition at line 100 of file LArCaloHit.h.

Referenced by GetDaughterVolumeId().

unsigned int lar_content::LArCaloHit::m_larTPCVolumeId
private

The lar tpc volume id.

Definition at line 99 of file LArCaloHit.h.

Referenced by GetLArTPCVolumeId().

pandora::InputFloat lar_content::LArCaloHit::m_pShower
private

The probability that the hit is shower-like.

Definition at line 102 of file LArCaloHit.h.

Referenced by GetShowerProbability(), and SetShowerProbability().

pandora::InputFloat lar_content::LArCaloHit::m_pTrack
private

The probability that the hit is track-like.

Definition at line 101 of file LArCaloHit.h.

Referenced by GetTrackProbability(), and SetTrackProbability().


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