LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
GetDetectorType.cxx
Go to the documentation of this file.
1 
15 
16 #include "cetlib_except/exception.h"
17 
18 #include <limits>
19 #include <set>
20 
21 namespace lar_pandora {
22 
24  {
26 
27  const unsigned int nPlanes(geo->MaxPlanes());
28  std::set<geo::_plane_proj> planeSet;
29  for (unsigned int iPlane = 0; iPlane < nPlanes; ++iPlane)
30  (void)planeSet.insert(geo->TPC().Plane(iPlane).View());
31 
32  if (nPlanes == 3 && planeSet.count(geo::kU) && planeSet.count(geo::kY) &&
33  planeSet.count(geo::kZ)) {
34  return new DUNEFarDetVDThreeView; //TODO Address bare pointer
35  }
36  else if (nPlanes == 3 && planeSet.count(geo::kU) && planeSet.count(geo::kV) &&
37  planeSet.count(geo::kW)) {
38  return new VintageLArTPCThreeView;
39  }
40  else if (nPlanes == 3 && planeSet.count(geo::kU) && planeSet.count(geo::kV) &&
41  planeSet.count(geo::kY)) {
42  return new ICARUS;
43  }
44  else if (nPlanes == 2 && planeSet.count(geo::kW) && planeSet.count(geo::kY)) {
45  return new ProtoDUNEDualPhase;
46  }
47 
48  throw cet::exception("LArPandora") << "LArPandoraDetectorType::GetDetectorType --- unable to "
49  "determine the detector type from the geometry GDML";
50  }
51 
52 } // namespace lar_pandora
Detector interface for an older-style 3view, horizontal drift, single-phase LArTPC (e...
Detector interface for ProtoDUNE dual phase.
Detector interface DUNE&#39;s vertical drift far detector.
Planes which measure V.
Definition: geo_types.h:136
Detector interface for ProtoDUNE dual phase.
Empty interface to map pandora to specifics in the LArSoft geometry.
Detector interface for DUNE&#39;s vertical drift, 3 view far detector.
Planes which measure Z direction.
Definition: geo_types.h:138
Planes which measure Y direction.
Definition: geo_types.h:139
Detector interface for ICARUS.
Definition: ICARUS.h:20
TPCGeo const & TPC(TPCID const &tpcid=tpc_zero) const
Returns the specified TPC.
Definition: GeometryCore.h:722
Planes which measure U.
Definition: geo_types.h:135
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:166
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.
Detector interface for ICARUS.
LArPandoraDetectorType * GetDetectorType()
Factory class that returns the correct detector type interface.
Planes which measure W (third view for Bo, MicroBooNE, etc).
Definition: geo_types.h:137
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:252
Namespace collecting geometry-related classes utilities.
Helper functions for extracting detector geometry for use in reconsruction.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33