All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LArPandoraDetectorType.cxx
Go to the documentation of this file.
1 /**
2  * @file larpandora/LArPandoraInterface/Detectors/LArPandoraDetectorType.cxx
3  *
4  * @brief Implementation of the interface for handling detector-specific details, as well as some helper functions
5  *
6  * $Log: $
7  */
8 
11 
12 #include <limits>
13 
14 namespace lar_pandora {
15 
16  float
18  const geo::TPCID::TPCID_t tpc,
20  const art::ServiceHandle<geo::Geometry>& larsoftGeometry)
21  {
22  return (0.5f * M_PI - larsoftGeometry->WireAngleToVertical(view, tpc, cstat));
23  }
24 
25  //------------------------------------------------------------------------------------------------------------------------------------------
26 
29  {
31  parameters.m_lineGapType = pandora::TPC_DRIFT_GAP;
32  parameters.m_lineStartX = gap.GetX1();
33  parameters.m_lineEndX = gap.GetX2();
34  parameters.m_lineStartZ = -std::numeric_limits<float>::max();
35  parameters.m_lineEndZ = std::numeric_limits<float>::max();
36 
37  return parameters;
38  }
39 
40  //------------------------------------------------------------------------------------------------------------------------------------------
41 
44  const float lastPoint,
45  const float xFirst,
46  const float xLast,
47  const float halfWirePitch,
48  const pandora::LineGapType gapType)
49  {
51  parameters.m_lineGapType = gapType;
52  parameters.m_lineStartX = xFirst;
53  parameters.m_lineEndX = xLast;
54  parameters.m_lineStartZ = std::min(firstPoint, lastPoint) - halfWirePitch;
55  parameters.m_lineEndZ = std::max(firstPoint, lastPoint) + halfWirePitch;
56 
57  return parameters;
58  }
59 
60 } // namespace lar_pandora
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
float GetX1() const
Get lower X coordinate.
fhicl::Table< sbnd::crt::CRTDetSimParams > Parameters
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:191
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:387
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.