All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
lar_pandora::VintageLArTPCThreeView Class Reference

Detector interface for a 3view, horizontal drift, single-phase LArTPC. More...

#include <VintageLArTPCThreeView.h>

Inheritance diagram for lar_pandora::VintageLArTPCThreeView:
lar_pandora::LArPandoraDetectorType lar_pandora::DUNEFarDetVDThreeView lar_pandora::ICARUS lar_pandora::ProtoDUNEDualPhase

Public Member Functions

virtual geo::View_t TargetViewU (const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
 Map a LArSoft view to Pandora's U view. More...
 
virtual geo::View_t TargetViewV (const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
 Map a LArSoft view to Pandora's V view. More...
 
virtual geo::View_t TargetViewW (const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
 Map a LArSoft view to Pandora's W view. More...
 
virtual float WirePitchU () const override
 The wire pitch of the mapped U view. More...
 
virtual float WirePitchV () const override
 The wire pitch of the mapped V view. More...
 
virtual float WirePitchW () const override
 The wire pitch of the mapped W view. More...
 
virtual float WireAngleU (const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
 The angle of the wires in the mapped U view. More...
 
virtual float WireAngleV (const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
 The angle of the wires in the mapped V view. More...
 
virtual float WireAngleW (const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
 The angle of the wires in the mapped V view. More...
 
virtual bool CheckDetectorGapSize (const geo::Vector_t &gaps, const geo::Vector_t &deltas, const float maxDisplacement) const override
 Check whether a gap size is small enough to be registered as a detector gap. More...
 
virtual LArDetectorGap CreateDetectorGap (const geo::Point_t &point1, const geo::Point_t &point2, const geo::Vector_t &widths) const override
 Create a detector gap. More...
 
virtual void LoadDaughterDetectorGaps (const LArDriftVolume &driftVolume, const float maxDisplacement, LArDetectorGapList &listOfGaps) const override
 Create detector gaps for all daughter volumes in a logical TPC volume. More...
 
virtual
PandoraApi::Geometry::LineGap::Parameters 
CreateLineGapParametersFromDetectorGaps (const LArDetectorGap &gap) const override
 Create the line gap parameters to give to the pandora API. More...
 
virtual
PandoraApi::Geometry::LineGap::Parameters 
CreateLineGapParametersFromReadoutGaps (const geo::View_t view, const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat, const double firstXYZ[3], const double lastXYZ[3], const float halfWirePitch, const float xFirst, const float xLast, const pandora::Pandora *pPandora) const override
 Create the line gap parameters to give to the pandora API. More...
 
const art::ServiceHandle
< geo::Geometry > & 
GetLArSoftGeometry () const
 Loan the LArSoft geometry handle owned by this class. More...
 

Private Attributes

art::ServiceHandle< geo::Geometrym_LArSoftGeometry
 the LArSoft geometry handle More...
 

Detailed Description

Detector interface for a 3view, horizontal drift, single-phase LArTPC.

Definition at line 28 of file VintageLArTPCThreeView.h.

Member Function Documentation

bool lar_pandora::VintageLArTPCThreeView::CheckDetectorGapSize ( const geo::Vector_t gaps,
const geo::Vector_t deltas,
const float  maxDisplacement 
) const
inlineoverridevirtual

Check whether a gap size is small enough to be registered as a detector gap.

Parameters
gapsa cartesean vector holding gap sizes between adjacent TPCs
deltasa cartesean vector holding distances between adjacent TPCs
maxDisplacementthe gap size threshold
Returns
logic bool

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ProtoDUNEDualPhase.

Definition at line 177 of file VintageLArTPCThreeView.h.

180  {
181  if (gaps.X() < 0.f || gaps.X() > maxDisplacement || deltas.Y() > maxDisplacement ||
182  deltas.Z() > maxDisplacement)
183  return false;
184  return true;
185  }
LArDetectorGap lar_pandora::VintageLArTPCThreeView::CreateDetectorGap ( const geo::Point_t point1,
const geo::Point_t point2,
const geo::Vector_t widths 
) const
inlineoverridevirtual

Create a detector gap.

Parameters
point1a point on TPC1 that are closest to TPC2
point2a point on TPC2 that are closest to TPC1
widththe gap sizes
Returns
the detector gap object

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ProtoDUNEDualPhase.

Definition at line 190 of file VintageLArTPCThreeView.h.

193  {
194  return LArDetectorGap(point1.X(), point1.Y(), point1.Z(), point2.X(), point2.Y(), point2.Z());
195  }
PandoraApi::Geometry::LineGap::Parameters lar_pandora::VintageLArTPCThreeView::CreateLineGapParametersFromDetectorGaps ( const LArDetectorGap gap) const
inlineoverridevirtual

Create the line gap parameters to give to the pandora API.

Parameters
gapthe input detector gap
Returns
the pandora API's line gap parameters object

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ProtoDUNEDualPhase.

Definition at line 210 of file VintageLArTPCThreeView.h.

211  {
213  }
PandoraApi::Geometry::LineGap::Parameters CreateDriftGapParameters(const LArDetectorGap &gap)
Make the drift gap parameters for the Pandora API.
PandoraApi::Geometry::LineGap::Parameters lar_pandora::VintageLArTPCThreeView::CreateLineGapParametersFromReadoutGaps ( const geo::View_t  view,
const geo::TPCID::TPCID_t  tpc,
const geo::CryostatID::CryostatID_t  cstat,
const double  firstXYZ[3],
const double  lastXYZ[3],
const float  halfWirePitch,
const float  xFirst,
const float  xLast,
const pandora::Pandora *  pPandora 
) const
inlineoverridevirtual

Create the line gap parameters to give to the pandora API.

Parameters
viewthe LArSoft view
tpcthe LArSoft TPC ID
cstatthe LArSoft cryostat ID
firstXYZthe first 3D coordinate
lastXYZthe last 3D coordinate
halfWirePitchthe half wire pitch
pPandorathe pandora instance
xFirstthe min X of the gap
xLastthe max X of the gap
Returns
the pandora API's line gap parameters object

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ProtoDUNEDualPhase.

Definition at line 218 of file VintageLArTPCThreeView.h.

228  {
229  float first(0.f), last(0.f);
230  pandora::LineGapType gapType(pandora::TPC_DRIFT_GAP);
231  if (view == this->TargetViewW(tpc, cstat)) {
232  first = firstXYZ[2];
233  last = lastXYZ[2];
234  gapType = pandora::TPC_WIRE_GAP_VIEW_W;
235  }
236  else if (view == this->TargetViewU(tpc, cstat)) {
237  first = pPandora->GetPlugins()->GetLArTransformationPlugin()->YZtoU(firstXYZ[1], firstXYZ[2]);
238  last = pPandora->GetPlugins()->GetLArTransformationPlugin()->YZtoU(lastXYZ[1], lastXYZ[2]);
239  gapType = pandora::TPC_WIRE_GAP_VIEW_U;
240  }
241  else if (view == this->TargetViewV(tpc, cstat)) {
242  first = pPandora->GetPlugins()->GetLArTransformationPlugin()->YZtoV(firstXYZ[1], firstXYZ[2]);
243  last = pPandora->GetPlugins()->GetLArTransformationPlugin()->YZtoV(lastXYZ[1], lastXYZ[2]);
244  gapType = pandora::TPC_WIRE_GAP_VIEW_V;
245  }
247  first, last, xFirst, xLast, halfWirePitch, gapType);
248  }
virtual geo::View_t TargetViewU(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s U view.
virtual geo::View_t TargetViewW(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s W view.
PandoraApi::Geometry::LineGap::Parameters CreateReadoutGapParameters(const float firstPoint, const float lastPoint, const float xFirst, const float xLast, const float halfWirePitch, const pandora::LineGapType gapType)
Make the readout gap parameters for the Pandora API.
virtual geo::View_t TargetViewV(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s V view.
const art::ServiceHandle< geo::Geometry > & lar_pandora::VintageLArTPCThreeView::GetLArSoftGeometry ( ) const
inline

Loan the LArSoft geometry handle owned by this class.

Returns
The LArSoft geometry handle

Definition at line 253 of file VintageLArTPCThreeView.h.

254  {
255  return m_LArSoftGeometry;
256  }
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle
void lar_pandora::VintageLArTPCThreeView::LoadDaughterDetectorGaps ( const LArDriftVolume driftVolume,
const float  maxDisplacement,
LArDetectorGapList listOfGaps 
) const
inlineoverridevirtual

Create detector gaps for all daughter volumes in a logical TPC volume.

Parameters
driftVolumethe parent drift volume
maxDisplacementthe gap size threshold
listOfGapsthe gaps vector to be filled

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ProtoDUNEDualPhase.

Definition at line 200 of file VintageLArTPCThreeView.h.

203  {
204  return;
205  }
geo::View_t lar_pandora::VintageLArTPCThreeView::TargetViewU ( const geo::TPCID::TPCID_t  tpc,
const geo::CryostatID::CryostatID_t  cstat 
) const
inlineoverridevirtual

Map a LArSoft view to Pandora's U view.

Parameters
tpcthe LArSoft TPC ID
cstatthe LArSoft cryostat ID
Returns
The mapped LArSoft view

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ICARUS, lar_pandora::ProtoDUNEDualPhase, and lar_pandora::DUNEFarDetVDThreeView.

Definition at line 94 of file VintageLArTPCThreeView.h.

96  {
97  return (m_LArSoftGeometry->TPC(tpc, cstat).DriftDirection() == geo::kPosX ?
98  m_LArSoftGeometry->View(geo::PlaneID(cstat, tpc, 1)) :
99  m_LArSoftGeometry->View(geo::PlaneID(cstat, tpc, 0)));
100  }
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle
Drift towards positive X values.
Definition: geo_types.h:161
geo::View_t lar_pandora::VintageLArTPCThreeView::TargetViewV ( const geo::TPCID::TPCID_t  tpc,
const geo::CryostatID::CryostatID_t  cstat 
) const
inlineoverridevirtual

Map a LArSoft view to Pandora's V view.

Parameters
tpcthe LArSoft TPC ID
cstatthe LArSoft cryostat ID
Returns
The mapped LArSoft view

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ICARUS, lar_pandora::ProtoDUNEDualPhase, and lar_pandora::DUNEFarDetVDThreeView.

Definition at line 103 of file VintageLArTPCThreeView.h.

105  {
106  return (m_LArSoftGeometry->TPC(tpc, cstat).DriftDirection() == geo::kPosX ?
107  m_LArSoftGeometry->View(geo::PlaneID(cstat, tpc, 0)) :
108  m_LArSoftGeometry->View(geo::PlaneID(cstat, tpc, 1)));
109  }
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle
Drift towards positive X values.
Definition: geo_types.h:161
geo::View_t lar_pandora::VintageLArTPCThreeView::TargetViewW ( const geo::TPCID::TPCID_t  tpc,
const geo::CryostatID::CryostatID_t  cstat 
) const
inlineoverridevirtual

Map a LArSoft view to Pandora's W view.

Parameters
tpcthe LArSoft TPC ID
cstatthe LArSoft cryostat ID
Returns
The mapped LArSoft view

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ICARUS, lar_pandora::ProtoDUNEDualPhase, and lar_pandora::DUNEFarDetVDThreeView.

Definition at line 114 of file VintageLArTPCThreeView.h.

116  {
117  return m_LArSoftGeometry->View(geo::PlaneID(cstat, tpc, 2));
118  }
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle
float lar_pandora::VintageLArTPCThreeView::WireAngleU ( const geo::TPCID::TPCID_t  tpc,
const geo::CryostatID::CryostatID_t  cstat 
) const
inlineoverridevirtual

The angle of the wires in the mapped U view.

Returns
The mapped wire angle

Implements lar_pandora::LArPandoraDetectorType.

Definition at line 147 of file VintageLArTPCThreeView.h.

149  {
151  this->TargetViewU(tpc, cstat), tpc, cstat, m_LArSoftGeometry);
152  }
virtual geo::View_t TargetViewU(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s U view.
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle
float WireAngle(const geo::View_t view, const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat, const art::ServiceHandle< geo::Geometry > &larsoftGeometry)
Calculate the wire angle of a LArTPC view in a given TPC/cryostat.
float lar_pandora::VintageLArTPCThreeView::WireAngleV ( const geo::TPCID::TPCID_t  tpc,
const geo::CryostatID::CryostatID_t  cstat 
) const
inlineoverridevirtual

The angle of the wires in the mapped V view.

Returns
The mapped wire angle

Implements lar_pandora::LArPandoraDetectorType.

Definition at line 157 of file VintageLArTPCThreeView.h.

159  {
161  this->TargetViewV(tpc, cstat), tpc, cstat, m_LArSoftGeometry);
162  }
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle
float WireAngle(const geo::View_t view, const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat, const art::ServiceHandle< geo::Geometry > &larsoftGeometry)
Calculate the wire angle of a LArTPC view in a given TPC/cryostat.
virtual geo::View_t TargetViewV(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s V view.
float lar_pandora::VintageLArTPCThreeView::WireAngleW ( const geo::TPCID::TPCID_t  tpc,
const geo::CryostatID::CryostatID_t  cstat 
) const
inlineoverridevirtual

The angle of the wires in the mapped V view.

Returns
The mapped wire angle

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ProtoDUNEDualPhase, and lar_pandora::ICARUS.

Definition at line 167 of file VintageLArTPCThreeView.h.

169  {
171  this->TargetViewW(tpc, cstat), tpc, cstat, m_LArSoftGeometry);
172  }
virtual geo::View_t TargetViewW(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s W view.
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle
float WireAngle(const geo::View_t view, const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat, const art::ServiceHandle< geo::Geometry > &larsoftGeometry)
Calculate the wire angle of a LArTPC view in a given TPC/cryostat.
float lar_pandora::VintageLArTPCThreeView::WirePitchU ( ) const
inlineoverridevirtual

The wire pitch of the mapped U view.

Returns
The mapped wire pitch

Implements lar_pandora::LArPandoraDetectorType.

Definition at line 123 of file VintageLArTPCThreeView.h.

124  {
125  return m_LArSoftGeometry->WirePitch(this->TargetViewU(0, 0));
126  }
virtual geo::View_t TargetViewU(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s U view.
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle
float lar_pandora::VintageLArTPCThreeView::WirePitchV ( ) const
inlineoverridevirtual

The wire pitch of the mapped V view.

Returns
The mapped wire pitch

Implements lar_pandora::LArPandoraDetectorType.

Definition at line 131 of file VintageLArTPCThreeView.h.

132  {
133  return m_LArSoftGeometry->WirePitch(this->TargetViewV(0, 0));
134  }
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle
virtual geo::View_t TargetViewV(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s V view.
float lar_pandora::VintageLArTPCThreeView::WirePitchW ( ) const
inlineoverridevirtual

The wire pitch of the mapped W view.

Returns
The mapped wire pitch

Implements lar_pandora::LArPandoraDetectorType.

Reimplemented in lar_pandora::ProtoDUNEDualPhase.

Definition at line 139 of file VintageLArTPCThreeView.h.

140  {
141  return m_LArSoftGeometry->WirePitch(this->TargetViewW(0, 0));
142  }
virtual geo::View_t TargetViewW(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s W view.
art::ServiceHandle< geo::Geometry > m_LArSoftGeometry
the LArSoft geometry handle

Member Data Documentation

art::ServiceHandle<geo::Geometry> lar_pandora::VintageLArTPCThreeView::m_LArSoftGeometry
private

the LArSoft geometry handle

Definition at line 88 of file VintageLArTPCThreeView.h.


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