21 LArPandoraDetectorType*
26 const unsigned int nPlanes(geo->
MaxPlanes());
27 std::set<geo::_plane_proj> planeSet;
28 for (
unsigned int iPlane = 0; iPlane < nPlanes; ++iPlane)
29 (
void)planeSet.insert(geo->
TPC(0, 0).
Plane(iPlane).
View());
31 if (nPlanes == 3 && planeSet.count(
geo::kU) && planeSet.count(
geo::kY) &&
35 else if (nPlanes == 3 && planeSet.count(
geo::kU) && planeSet.count(
geo::kV) &&
39 else if (nPlanes == 3 && planeSet.count(
geo::kU) && planeSet.count(
geo::kV) &&
43 else if (nPlanes == 2 && planeSet.count(
geo::kW) && planeSet.count(
geo::kY)) {
47 throw cet::exception(
"LArPandora") <<
"LArPandoraDetectorType::GetDetectorType --- unable to " 48 "determine the detector type from the geometry GDML";
64 PandoraApi::Geometry::LineGap::Parameters
67 PandoraApi::Geometry::LineGap::Parameters parameters;
68 parameters.m_lineGapType = pandora::TPC_DRIFT_GAP;
69 parameters.m_lineStartX = gap.
GetX1();
70 parameters.m_lineEndX = gap.
GetX2();
79 PandoraApi::Geometry::LineGap::Parameters
81 const float lastPoint,
84 const float halfWirePitch,
85 const pandora::LineGapType gapType)
87 PandoraApi::Geometry::LineGap::Parameters parameters;
88 parameters.m_lineGapType = gapType;
89 parameters.m_lineStartX = xFirst;
90 parameters.m_lineEndX = xLast;
91 parameters.m_lineStartZ =
std::min(firstPoint, lastPoint) - halfWirePitch;
92 parameters.m_lineEndZ =
std::max(firstPoint, lastPoint) + halfWirePitch;
Detector interface for an older-style 3view, horizontal drift, single-phase LArTPC (e...
Detector interface for ProtoDUNE dual phase.
Detector interface DUNE's vertical drift far detector.
Helper functions for extracting detector geometry for use in reconsruction.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Detector interface for ProtoDUNE dual phase.
Detector interface for DUNE's vertical drift, 3 view far detector.
Planes which measure Z direction.
Planes which measure Y direction.
Detector interface for ICARUS.
View_t View() const
Which coordinate does this plane measure.
Detector interface for a 3view, horizontal drift, single-phase LArTPC.
unsigned int MaxPlanes() const
Returns the largest number of planes among all TPCs in this detector.
static int max(int a, int b)
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.
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.
Detector interface for ICARUS.
LArPandoraDetectorType * GetDetectorType()
Factory class that returns the correct detector type interface.
unsigned int TPCID_t
Type for the ID number.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
Planes which measure W (third view for Bo, MicroBooNE, etc).
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
LArSoft geometry interface.
Helper functions for extracting detector geometry for use in reconsruction.
double WireAngleToVertical(geo::View_t view, geo::TPCID const &tpcid) const
Returns the angle of the wires in the specified view from vertical.
cet::coded_exception< error, detail::translate > exception
drift volume class to hold properties of drift volume
float GetX2() const
Get upper X coordinate.