LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArPandoraDetectorType.cxx
Go to the documentation of this file.
1 
11 
12 #include <limits>
13 
14 namespace lar_pandora {
15 
17  const geo::TPCID::TPCID_t tpc,
19  const art::ServiceHandle<geo::Geometry>& larsoftGeometry)
20  {
21  return 0.5f * M_PI - larsoftGeometry->WireAngleToVertical(view, geo::TPCID{cstat, tpc});
22  }
23 
24  //------------------------------------------------------------------------------------------------------------------------------------------
25 
26  PandoraApi::Geometry::LineGap::Parameters detector_functions::CreateDriftGapParameters(
27  const LArDetectorGap& gap)
28  {
29  PandoraApi::Geometry::LineGap::Parameters parameters;
30  parameters.m_lineGapType = pandora::TPC_DRIFT_GAP;
31  parameters.m_lineStartX = gap.GetX1();
32  parameters.m_lineEndX = gap.GetX2();
33  parameters.m_lineStartZ = -std::numeric_limits<float>::max();
34  parameters.m_lineEndZ = std::numeric_limits<float>::max();
35 
36  return parameters;
37  }
38 
39  //------------------------------------------------------------------------------------------------------------------------------------------
40 
41  PandoraApi::Geometry::LineGap::Parameters detector_functions::CreateReadoutGapParameters(
42  const float firstPoint,
43  const float lastPoint,
44  const float xFirst,
45  const float xLast,
46  const float halfWirePitch,
47  const pandora::LineGapType gapType)
48  {
49  PandoraApi::Geometry::LineGap::Parameters parameters;
50  parameters.m_lineGapType = gapType;
51  parameters.m_lineStartX = xFirst;
52  parameters.m_lineEndX = xLast;
53  parameters.m_lineStartZ = std::min(firstPoint, lastPoint) - halfWirePitch;
54  parameters.m_lineEndZ = std::max(firstPoint, lastPoint) + halfWirePitch;
55 
56  return parameters;
57  }
58 
59 } // namespace lar_pandora
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
double WireAngleToVertical(View_t view, TPCID const &tpcid) const
Returns the angle of the wires in the specified view from vertical.
The data type to uniquely identify a TPC.
Definition: geo_types.h:381
float GetX1() const
Get lower X coordinate.
PandoraApi::Geometry::LineGap::Parameters CreateDriftGapParameters(const LArDetectorGap &gap)
Make the drift gap parameters for the Pandora API.
unsigned int CryostatID_t
Type for the ID number.
Definition: geo_types.h:193
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.
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.
unsigned int TPCID_t
Type for the ID number.
Definition: geo_types.h:382
Helper functions for extracting detector geometry for use in reconsruction.
drift volume class to hold properties of drift volume
float GetX2() const
Get upper X coordinate.