LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
lar_content::LArPseudoLayerPlugin Class Reference

LarPandoraPseudoLayerPlugin class. More...

#include "LArPseudoLayerPlugin.h"

Inheritance diagram for lar_content::LArPseudoLayerPlugin:

Public Member Functions

 LArPseudoLayerPlugin ()
 Constructor. More...
 
unsigned int GetPseudoLayer (const pandora::CartesianVector &positionVector) const
 
unsigned int GetPseudoLayerAtIp () const
 

Private Member Functions

pandora::StatusCode Initialize ()
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Private Attributes

float m_zPitch
 The z pitch. More...
 
float m_zOffset
 The z offset. More...
 
unsigned int m_zerothLayer
 The zeroth layer. More...
 

Detailed Description

LarPandoraPseudoLayerPlugin class.

Definition at line 19 of file LArPseudoLayerPlugin.h.

Constructor & Destructor Documentation

lar_content::LArPseudoLayerPlugin::LArPseudoLayerPlugin ( )

Constructor.

Definition at line 27 of file LArPseudoLayerPlugin.cc.

27  :
29  m_zOffset(0.01f),
30  m_zerothLayer(5000)
31 {
32 }
unsigned int m_zerothLayer
The zeroth layer.
TFile f
Definition: plotHisto.C:6
Int_t max
Definition: plot.C:27

Member Function Documentation

unsigned int lar_content::LArPseudoLayerPlugin::GetPseudoLayer ( const pandora::CartesianVector &  positionVector) const

Definition at line 36 of file LArPseudoLayerPlugin.cc.

References m_zerothLayer, m_zOffset, and m_zPitch.

37 {
38  const float zLayer((positionVector.GetZ() + m_zOffset) / m_zPitch + static_cast<float>(m_zerothLayer));
39 
40  if (zLayer < std::numeric_limits<float>::epsilon())
41  throw StatusCodeException(STATUS_CODE_FAILURE);
42 
43  return static_cast<unsigned int>(zLayer);
44 }
unsigned int m_zerothLayer
The zeroth layer.
unsigned int lar_content::LArPseudoLayerPlugin::GetPseudoLayerAtIp ( ) const
inline

Definition at line 41 of file LArPseudoLayerPlugin.h.

42 {
43  return 0;
44 }
StatusCode lar_content::LArPseudoLayerPlugin::Initialize ( )
private

Definition at line 48 of file LArPseudoLayerPlugin.cc.

References m_zPitch.

49 {
50  const LArTPCMap &larTPCMap(this->GetPandora().GetGeometry()->GetLArTPCMap());
51 
52  if (larTPCMap.empty())
53  {
54  std::cout << "LArPseudoLayerPlugin::Initialize - LArTPC description not registered with Pandora as required " << std::endl;
55  return STATUS_CODE_NOT_INITIALIZED;
56  }
57 
58  const LArTPC *const pFirstLArTPC(larTPCMap.begin()->second);
59  m_zPitch = pFirstLArTPC->GetWirePitchW();
60 
61  for (const LArTPCMap::value_type &mapEntry : larTPCMap)
62  {
63  const LArTPC *const pLArTPC(mapEntry.second);
64 
65  if (std::fabs(m_zPitch - pLArTPC->GetWirePitchW()) > std::numeric_limits<float>::epsilon())
66  {
67  std::cout << "LArPseudoLayerPlugin::Initialize - Plugin does not support provided LArTPC configurations " << std::endl;
68  return STATUS_CODE_INVALID_PARAMETER;
69  }
70  }
71 
72  return STATUS_CODE_SUCCESS;
73 }
pandora::StatusCode lar_content::LArPseudoLayerPlugin::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 77 of file LArPseudoLayerPlugin.cc.

78 {
79  return STATUS_CODE_SUCCESS;
80 }

Member Data Documentation

unsigned int lar_content::LArPseudoLayerPlugin::m_zerothLayer
private

The zeroth layer.

Definition at line 36 of file LArPseudoLayerPlugin.h.

Referenced by GetPseudoLayer().

float lar_content::LArPseudoLayerPlugin::m_zOffset
private

The z offset.

Definition at line 35 of file LArPseudoLayerPlugin.h.

Referenced by GetPseudoLayer().

float lar_content::LArPseudoLayerPlugin::m_zPitch
private

The z pitch.

Definition at line 34 of file LArPseudoLayerPlugin.h.

Referenced by GetPseudoLayer(), and Initialize().


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