LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
GetDetectorType.cxx
Go to the documentation of this file.
1 
16 
17 #include "cetlib_except/exception.h"
18 
19 #include <limits>
20 #include <set>
21 
22 namespace lar_pandora {
23 
25  {
26  auto const& wireReadoutGeom = art::ServiceHandle<geo::WireReadout>()->Get();
27 
28  const unsigned int nPlanes(wireReadoutGeom.MaxPlanes());
29  std::set<geo::View_t> planeSet;
30  for (auto const& plane : wireReadoutGeom.Iterate<geo::PlaneGeo>(geo::TPCID{0, 0}))
31  planeSet.insert(plane.View());
32 
33  if (nPlanes == 3 && planeSet.count(geo::kU) && planeSet.count(geo::kY) &&
34  planeSet.count(geo::kZ)) {
35  return new DUNEFarDetVDThreeView; //TODO Address bare pointer
36  }
37  if (nPlanes == 3 && planeSet.count(geo::kU) && planeSet.count(geo::kV) &&
38  planeSet.count(geo::kW)) {
39  return new VintageLArTPCThreeView;
40  }
41  if (nPlanes == 3 && planeSet.count(geo::kU) && planeSet.count(geo::kV) &&
42  planeSet.count(geo::kY)) {
43  return new ICARUS;
44  }
45  if (nPlanes == 2 && planeSet.count(geo::kW) && planeSet.count(geo::kY)) {
46  return new ProtoDUNEDualPhase;
47  }
48 
49  throw cet::exception("LArPandora") << "LArPandoraDetectorType::GetDetectorType --- unable to "
50  "determine the detector type from the geometry GDML";
51  }
52 
53 } // 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:132
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:134
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
Definition: AddMC.C:8
Planes which measure Y direction.
Definition: geo_types.h:135
Detector interface for ICARUS.
Definition: ICARUS.h:20
Planes which measure U.
Definition: geo_types.h:131
Detector interface for a 3view, horizontal drift, single-phase LArTPC.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:67
The data type to uniquely identify a TPC.
Definition: geo_types.h:306
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:133
Helper functions for extracting detector geometry for use in reconsruction.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33