Public Member Functions | Private Member Functions | Private Attributes | List of all members
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.

28 {
29 }
unsigned int m_zerothLayer
The zeroth layer.
static int max(int a, int b)

Member Function Documentation

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

Definition at line 33 of file LArPseudoLayerPlugin.cc.

34 {
35  const float zLayer((positionVector.GetZ() + m_zOffset) / m_zPitch + static_cast<float>(m_zerothLayer));
36 
37  if (zLayer < std::numeric_limits<float>::epsilon())
38  throw StatusCodeException(STATUS_CODE_FAILURE);
39 
40  return static_cast<unsigned int>(zLayer);
41 }
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 ( void  )
private

Definition at line 45 of file LArPseudoLayerPlugin.cc.

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

Definition at line 74 of file LArPseudoLayerPlugin.cc.

75 {
76  return STATUS_CODE_SUCCESS;
77 }

Member Data Documentation

unsigned int lar_content::LArPseudoLayerPlugin::m_zerothLayer
private

The zeroth layer.

Definition at line 36 of file LArPseudoLayerPlugin.h.

float lar_content::LArPseudoLayerPlugin::m_zOffset
private

The z offset.

Definition at line 35 of file LArPseudoLayerPlugin.h.

float lar_content::LArPseudoLayerPlugin::m_zPitch
private

The z pitch.

Definition at line 34 of file LArPseudoLayerPlugin.h.


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