35 #ifndef LARCOREALG_GEOMETRY_GEOMETRYCORE_H 36 #define LARCOREALG_GEOMETRY_GEOMETRYCORE_H 74 #include <type_traits> 87 class AuxDetSensitiveGeo;
147 template <
typename GEOID>
159 "template type GEOID is not a LocalID_t");
198 template <
typename OTHERID>
200 {
return localID() == as.
localID(); }
203 template <
typename OTHERID>
205 {
return localID() != as.
localID(); }
211 pointer operator-> ()
const {
return &(localID()); }
220 operator bool()
const;
231 { set_local_limits(); }
243 bool at_end()
const {
return local_index() == limit; }
247 ID_t limit = LocalID_t::InvalidID;
250 void set_local_limits();
291 template <
typename GEOID>
293 virtual public std::forward_iterator_tag,
304 "template type GEOID is not a LocalID_t");
340 { set_local_limits(); }
345 { set_local_limits(); }
354 template <
typename OTHERID>
356 {
return localID() == as.
localID(); }
359 template <
typename OTHERID>
361 {
return localID() != as.
localID(); }
367 pointer operator-> ()
const {
return &(localID()); }
376 operator bool()
const;
383 using ID_t =
typename LocalID_t::TPCID_t;
396 using upper_iterator::at_end;
407 ID_t limit = LocalID_t::InvalidID;
410 void set_local_limits();
438 template <
typename GEOID>
440 virtual public std::forward_iterator_tag,
451 "template type GEOID is not a LocalID_t");
488 { set_local_limits(); }
493 { set_local_limits(); }
502 template <
typename OTHERID>
504 {
return localID() == as.
localID(); }
507 template <
typename OTHERID>
509 {
return localID() != as.
localID(); }
515 pointer operator-> ()
const {
return &(localID()); }
524 operator bool()
const;
531 using ID_t =
typename LocalID_t::PlaneID_t;
544 using upper_iterator::at_end;
555 ID_t limit = LocalID_t::InvalidID;
558 void set_local_limits();
586 template <
typename GEOID>
588 virtual public std::forward_iterator_tag,
599 "template type GEOID is not a LocalID_t");
636 { set_local_limits(); }
641 { set_local_limits(); }
650 template <
typename OTHERID>
652 {
return localID() == as.
localID(); }
655 template <
typename OTHERID>
657 {
return localID() != as.
localID(); }
663 pointer operator-> ()
const {
return &(localID()); }
672 operator bool()
const;
679 using ID_t =
typename LocalID_t::WireID_t;
692 using upper_iterator::at_end;
703 ID_t limit = LocalID_t::InvalidID;
706 void set_local_limits();
718 template <
typename GEOIDITER>
722 template <
typename GEOIDITER>
725 GEOIDITER
const& id_iter
728 template <
typename GEOIDITER>
730 GEOIDITER
const& id_iter,
733 {
return iter == id_iter; }
736 template <
typename GEOIDITER>
739 GEOIDITER
const& id_iter
742 template <
typename GEOIDITER>
744 GEOIDITER
const& id_iter,
747 {
return iter != id_iter; }
765 template <
typename GEOIDITER>
774 "template class for geometry_element_iterator" 775 " must be a geometry iterator" 783 using GeoID_t =
typename id_iterator_t::GeoID_t;
827 id_iter(geom, start_from)
859 if (ptr)
return *ptr;
861 <<
"iterator attempted to obtain geometry element " 869 iterator& operator++ () { ++id_iterator();
return *
this; }
873 {
iterator old(*
this); ++id_iterator();
return old; }
877 {
return bool(id_iterator()) && (id_iterator().get() !=
nullptr); }
924 template <
typename GEOID>
926 virtual public std::forward_iterator_tag,
936 "template type GEOID is not a LocalID_t");
974 { set_local_limits(); }
979 { set_local_limits(); }
988 template <
typename OTHERID>
990 {
return localID() == as.
localID(); }
993 template <
typename OTHERID>
995 {
return localID() != as.
localID(); }
1001 pointer operator-> ()
const {
return &(localID()); }
1010 operator bool()
const;
1015 using ID_t =
typename LocalID_t::TPCsetID_t;
1028 using upper_iterator::at_end;
1042 void set_local_limits();
1075 template <
typename GEOID>
1077 virtual public std::forward_iterator_tag,
1087 "template type GEOID is not a LocalID_t");
1124 { set_local_limits(); }
1129 { set_local_limits(); }
1138 template <
typename OTHERID>
1140 {
return localID() == as.
localID(); }
1143 template <
typename OTHERID>
1145 {
return localID() != as.
localID(); }
1151 pointer operator-> ()
const {
return &(localID()); }
1160 operator bool()
const;
1164 using ID_t =
typename LocalID_t::ROPID_t;
1177 using upper_iterator::at_end;
1192 void set_local_limits();
1384 :
util::
span<Iter>((geom->*BeginFunc)(), (geom->*EndFunc)())
1400 :
util::
span<Iter>((geom->*BeginFunc)(ID), (geom->*EndFunc)(ID))
1408 namespace iterators {
1481 using Point3D_t [[deprecated(
"Convert the code to use geo::Point_t")]]
1486 template <
typename Po
int>
1490 using std::pair<Point, Point>::pair;
1510 static constexpr std::size_t MaxWireDepthInGDML = 20U;
1769 TGeoVolume
const* WorldVolume()
const;
1790 void WorldBox(
double* xlo,
double* xhi,
1791 double* ylo,
double* yhi,
1792 double* zlo,
double* zhi)
const;
1820 TGeoManager* ROOTGeoManager()
const;
1856 std::vector<TGeoNode const*> FindAllVolumes
1857 (std::set<std::string>
const& vol_names)
const;
1872 std::vector<std::vector<TGeoNode const*>> FindAllVolumePaths
1873 (std::set<std::string>
const& vol_names)
const;
1877 TGeoMaterial
const* Material(
geo::Point_t const& point)
const;
1909 double MassBetweenPoints
1911 double MassBetweenPoints(
double *p1,
double *p2)
const;
1916 template <
typename Stream>
1932 template <
typename GeoID>
1941 template <
typename GeoID>
1943 {
auto nextID(
id); IncrementID(nextID);
return nextID; }
1951 template <
typename GeoID>
1962 template <
typename GeoID,
typename ContextID>
1963 GeoID GetBeginID(ContextID
const&
id)
const;
1974 template <
typename GeoID,
typename ContextID>
1975 GeoID GetEndID(ContextID
const&
id)
const;
1997 {
return Ncryostats(); }
2012 {
return cryoid.
Cryostat < Ncryostats(); }
2014 {
return HasCryostat(cryoid); }
2034 {
return Cryostat(cryoid); }
2047 {
return HasCryostat(cryoid)? &(Cryostats()[cryoid.
Cryostat]):
nullptr; }
2049 {
return CryostatPtr(cryoid); }
2063 (
double const worldLoc[3])
const;
2127 (
double const worldLoc[3],
unsigned int &cstat)
const;
2241 void CryostatBoundaries
2259 void CryostatBoundaries
2260 (
double* boundaries,
unsigned int cstat = 0)
const 2303 unsigned int NTPC(
unsigned int cstat = 0)
const 2307 unsigned int MaxTPCs()
const;
2310 unsigned int TotalNTPC()
const;
2341 template <
typename T>
2343 {
return { Ncryostats(), MaxTPCs() }; }
2364 template <
typename T>
2366 {
return { Ncryostats(), MaxTPCs(), defValue }; }
2387 {
return NTPC(cryoid); }
2389 {
return NTPC(tpcid); }
2400 return pCryo? pCryo->
HasTPC(tpcid):
false;
2423 (
unsigned int const tpc = 0,
unsigned int const cstat = 0)
const 2426 {
return Cryostat(tpcid).
TPC(tpcid); }
2428 {
return TPC(tpcid); }
2443 return pCryo? pCryo->
TPCPtr(tpcid):
nullptr;
2446 {
return TPCPtr(tpcid); }
2497 TPCGeo const& PositionToTPC
2498 (
double const worldLoc[3],
unsigned int &tpc,
unsigned int &cstat)
const;
2508 TPCGeo const& PositionToTPC
2509 (
double const worldLoc[3],
TPCID& tpcid)
const;
2525 { GetBeginID(
id.asCryostatID());
id.TPC = 0; }
2529 { GetEndID(
id.asCryostatID());
id.TPC = 0; }
2537 {
return { id, 0 }; }
2627 void IterateTPCIDs(
geo::PlaneID const& pid)
const =
delete;
2630 void IterateTPCIDs(
geo::WireID const& pid)
const =
delete;
2678 IterateTPCs(geo::CryostatID
const& cid)
const {
return {
this, cid }; }
2681 void IterateTPCs(
geo::TPCID const& pid)
const =
delete;
2684 void IterateTPCs(
geo::PlaneID const& pid)
const =
delete;
2687 void IterateTPCs(
geo::WireID const& pid)
const =
delete;
2716 (
unsigned int tpc = 0,
unsigned int cstat = 0)
const 2717 {
return DetHalfWidth(
geo::TPCID(cstat, tpc)); }
2738 (
unsigned int tpc = 0,
unsigned int cstat = 0)
const 2739 {
return DetHalfHeight(
geo::TPCID(cstat, tpc)); }
2760 {
return DetLength(
geo::TPCID(cstat, tpc)); }
2776 template <
typename Po
int>
2778 {
return TPC(tpcid).GetFrontFaceCenter<
Point>(); }
2780 {
return GetTPCFrontFaceCenter<DefaultPoint_t>(tpcid); }
2795 template <
typename Po
int>
2796 Point GetTPCFrontFaceCenter
2797 (
unsigned int tpc = 0,
unsigned int cstat = 0)
const 2798 {
return GetTPCFrontFaceCenter<Point>(
geo::TPCID(cstat, tpc)); }
2800 (
unsigned int tpc = 0,
unsigned int cstat = 0)
const 2801 {
return GetTPCFrontFaceCenter<DefaultPoint_t>(tpc, cstat); }
2824 (
unsigned int const tpc = 0,
unsigned int const cstat = 0)
const 2825 {
return GetLArTPCVolumeName(
geo::TPCID(cstat, tpc)); }
2848 unsigned int Nplanes(
unsigned int tpc = 0,
unsigned int cstat = 0)
const 2852 unsigned int MaxPlanes()
const;
2881 template <
typename T>
2883 {
return { Ncryostats(), MaxTPCs(), MaxPlanes() }; }
2903 template <
typename T>
2905 {
return { Ncryostats(), MaxTPCs(), MaxPlanes(), defValue }; }
2921 TPCGeo const* pTPC = GetElementPtr(tpcid);
2925 {
return Nplanes(tpcid); }
2927 {
return Nplanes(planeid); }
2942 unsigned int Nviews()
const;
2951 [[deprecated(
"Iterate through geo::GeometryCore::IteratePlaneIDs() instead")]]
2952 std::set<PlaneID>
const& PlaneIDs()
const;
2970 return pTPC? pTPC->
HasPlane(planeid):
false;
2973 {
return HasPlane(planeid); }
2994 (
unsigned int const p,
unsigned int const tpc = 0,
unsigned int const cstat = 0)
2998 {
return TPC(planeid).Plane(planeid); }
3000 {
return Plane(planeid); }
3015 return pTPC? pTPC->
PlanePtr(planeid):
nullptr;
3018 {
return PlanePtr(planeid); }
3027 { GetBeginID(
id.asTPCID());
id.Plane = 0; }
3031 { GetEndID(
id.asTPCID());
id.Plane = 0; }
3039 {
return { GetBeginTPCID(
id), 0 }; }
3044 {
return { GetEndTPCID(
id), 0 }; }
3048 {
return { id, 0 }; }
3053 {
return { GetNextID(
id), 0 }; }
3180 void IteratePlaneIDs(
geo::PlaneID const& pid)
const =
delete;
3183 void IteratePlaneIDs(
geo::WireID const& pid)
const =
delete;
3258 void IteratePlanes(
geo::PlaneID const& pid)
const =
delete;
3261 void IteratePlanes(
geo::WireID const& pid)
const =
delete;
3291 geo::TPCID
const& tpcid,
3297 unsigned int p2 = 1,
3298 unsigned int tpc = 0,
3299 unsigned int cstat = 0)
const;
3342 (
unsigned int p,
unsigned int tpc = 0,
unsigned int cstat = 0)
const 3358 PlaneGeo const* pPlane = GetElementPtr(planeid);
3362 {
return Nwires(planeid); }
3364 {
return Nwires(wireid); }
3367 unsigned int MaxWires()
const;
3386 return pPlane? pPlane->
HasWire(wireid):
false;
3403 return pPlane? pPlane->
WirePtr(wireid):
nullptr;
3420 {
return Plane(wireid).Wire(wireid); }
3422 {
return Wire(wireid); }
3424 {
return Wire(wireid); }
3433 { GetBeginID(
id.asPlaneID());
id.Wire = 0; }
3437 { GetEndID(
id.asPlaneID());
id.Wire = 0; }
3445 {
return { GetBeginPlaneID(
id), 0 }; }
3450 {
return { GetEndPlaneID(
id), 0 }; }
3463 {
return { id, 0 }; }
3468 {
return { GetNextID(
id), 0 }; }
3632 void IterateWireIDs(
geo::WireID const& pid)
const =
delete;
3733 void IterateWires(
geo::WireID const& pid)
const =
delete;
3764 unsigned int tpc = 0,
3765 unsigned int cstat = 0)
const 3766 {
return WirePitch(geo::PlaneID(cstat, tpc, plane)); }
3801 double WireAngleToVertical(
geo::View_t view, geo::TPCID
const& tpcid)
const;
3803 {
return WireAngleToVertical(view, geo::TPCID(Cryo,
TPC)); }
3839 (
geo::WireID const& wireid,
double *xyzStart,
double *xyzEnd)
const;
3857 unsigned int cstat,
unsigned int tpc,
unsigned int plane,
unsigned int wire,
3858 double *xyzStart,
double *xyzEnd
3860 { WireEndPoints(
geo::WireID(cstat, tpc, plane, wire), xyzStart, xyzEnd); }
3875 template <
typename Po
int>
3878 {
return WireEndPoints<DefaultPoint_t>(wireID); }
3925 (
geo::Point_t const& point, geo::PlaneID
const& planeid)
const;
3944 (
const double point[3], geo::PlaneID
const& planeid)
const;
3946 (std::vector<double>
const& point, geo::PlaneID
const& planeid)
const;
3948 (
const TVector3& point, geo::PlaneID
const& planeid)
const 3951 unsigned int const PlaneNo,
3952 unsigned int const TPCNo = 0,
3953 unsigned int const cstat = 0)
const 3954 {
return NearestWireID(point, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
3956 unsigned int const PlaneNo,
3957 unsigned int const TPCNo = 0,
3958 unsigned int const cstat = 0)
const 3959 {
return NearestWireID(point, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
3961 unsigned int const PlaneNo,
3962 unsigned int const TPCNo = 0,
3963 unsigned int const cstat = 0)
const 3964 {
return NearestWireID(point, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
3966 unsigned int const PlaneNo,
3967 unsigned int const TPCNo = 0,
3968 unsigned int const cstat = 0)
const 3969 {
return NearestWireID(point, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
3982 (
geo::Point_t const& point, geo::PlaneID
const& planeid)
const;
4000 unsigned int NearestWire
4001 (
const double worldLoc[3], geo::PlaneID
const& planeid)
const;
4002 unsigned int NearestWire
4003 (std::vector<double>
const& worldLoc, geo::PlaneID
const& planeid)
const;
4004 unsigned int NearestWire
4005 (
const TVector3& worldLoc, geo::PlaneID
const& planeid)
const 4008 unsigned int const PlaneNo,
4009 unsigned int const TPCNo = 0,
4010 unsigned int const cstat = 0)
const 4011 {
return NearestWire(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4013 unsigned int const PlaneNo,
4014 unsigned int const TPCNo = 0,
4015 unsigned int const cstat = 0)
const 4016 {
return NearestWire(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4018 unsigned int const PlaneNo,
4019 unsigned int const TPCNo = 0,
4020 unsigned int const cstat = 0)
const 4021 {
return NearestWire(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4023 unsigned int const PlaneNo,
4024 unsigned int const TPCNo = 0,
4025 unsigned int const cstat = 0)
const 4026 {
return NearestWire(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4047 (
double YPos,
double ZPos, geo::PlaneID
const& planeid)
const;
4062 unsigned int PlaneNo,
4064 unsigned int cstat)
const 4065 {
return WireCoordinate(YPos, ZPos, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4080 (
geo::Point_t const& pos, geo::PlaneID
const& planeid)
const;
4082 (TVector3
const& pos, geo::PlaneID
const& planeid)
const 4114 bool IntersectLines(
4115 double A_start_x,
double A_start_y,
double A_end_x,
double A_end_y,
4116 double B_start_x,
double B_start_y,
double B_end_x,
double B_end_y,
4117 double&
x,
double&
y 4141 bool IntersectSegments(
4142 double A_start_x,
double A_start_y,
double A_end_x,
double A_end_y,
4143 double B_start_x,
double B_start_y,
double B_end_x,
double B_end_y,
4144 double& x,
double& y
4183 bool WireIDsIntersect(
4187 bool WireIDsIntersect
4188 (
WireID const& wid1,
WireID const& wid2, TVector3& intersection)
const;
4214 bool WireIDsIntersect
4261 unsigned int plane1,
4262 unsigned int plane2,
4268 return IntersectionPoint(
4287 geo::PlaneID ThirdPlane
4288 (geo::PlaneID
const& pid1, geo::PlaneID
const& pid2)
const;
4309 double ThirdPlaneSlope(geo::PlaneID
const& pid1,
double slope1,
4310 geo::PlaneID
const& pid2,
double slope2,
4311 geo::PlaneID
const& output_plane)
const;
4330 double ThirdPlaneSlope(geo::PlaneID
const& pid1,
double slope1,
4331 geo::PlaneID
const& pid2,
double slope2)
const;
4351 geo::TPCID
const& tpcid)
const 4353 return ThirdPlaneSlope(
4354 geo::PlaneID(tpcid, plane1), slope1,
4355 geo::PlaneID(tpcid, plane2), slope2
4359 unsigned int plane2,
double slope2,
4360 unsigned int tpc,
unsigned int cstat)
const 4362 return ThirdPlaneSlope
4363 (plane1, slope1, plane2, slope2, geo::TPCID(cstat, tpc));
4384 double ThirdPlane_dTdW(geo::PlaneID
const& pid1,
double slope1,
4385 geo::PlaneID
const& pid2,
double slope2,
4386 geo::PlaneID
const& output_plane)
const;
4405 double ThirdPlane_dTdW(geo::PlaneID
const& pid1,
double slope1,
4406 geo::PlaneID
const& pid2,
double slope2)
const;
4420 static double ComputeThirdPlaneSlope(
4421 double angle1,
double slope1,
4422 double angle2,
double slope2,
4442 static double ComputeThirdPlane_dTdW(
4443 double angle1,
double pitch1,
double dTdW1,
4444 double angle2,
double pitch2,
double dTdW2,
4445 double angle_target,
double pitch_target
4476 unsigned int NOpDets()
const;
4494 OpDetGeo const& OpDetGeoFromOpDet(
unsigned int OpDet)
const;
4509 unsigned int GetClosestOpDet(
geo::Point_t const& point)
const;
4510 unsigned int GetClosestOpDet(
double const* point)
const;
4549 unsigned int NAuxDets()
const {
return AuxDets().size(); }
4557 unsigned int NAuxDetSensitive(
size_t const& aid)
const;
4571 AuxDetGeo const& AuxDet(
unsigned int const ad = 0)
const;
4583 unsigned int FindAuxDetAtPosition(
double const worldLoc[3],
double tolerance = 0)
const;
4603 void FindAuxDetSensitiveAtPosition(
geo::Point_t const& point,
4616 void FindAuxDetSensitiveAtPosition(
double const worldLoc[3],
4644 (
double const worldLoc[3],
unsigned int& ad,
double tolerance = 0)
const;
4676 uint32_t
const&
channel)
const;
4680 uint32_t
const& channel)
const;
4694 unsigned int Nchannels()
const;
4701 std::vector<raw::ChannelID_t> ChannelsInTPCs()
const;
4707 std::set<geo::View_t>
const&
Views()
const {
return allViews; }
4739 unsigned int const wire,
4740 unsigned int const tpc = 0,
4741 unsigned int const cstat = 0)
const 4742 {
return PlaneWireToChannel(
geo::WireID(cstat, tpc, plane, wire)); }
4776 std::vector<geo::WireID> ChannelToWire
4798 (
geo::Point_t const& worldLoc, geo::PlaneID
const& planeid)
const;
4815 (
const double worldLoc[3], geo::PlaneID
const& planeid)
const;
4817 (std::vector<double>
const& worldLoc, geo::PlaneID
const& planeid)
const;
4819 (
const TVector3& worldLoc, geo::PlaneID
const& planeid)
const 4822 unsigned int const PlaneNo,
4823 unsigned int const TPCNo = 0,
4824 unsigned int const cstat = 0)
const 4825 {
return NearestChannel(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4827 unsigned int const PlaneNo,
4828 unsigned int const TPCNo = 0,
4829 unsigned int const cstat = 0)
const 4830 {
return NearestChannel(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4832 unsigned int const PlaneNo,
4833 unsigned int const TPCNo = 0,
4834 unsigned int const cstat = 0)
const 4835 {
return NearestChannel(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4837 unsigned int const PlaneNo,
4838 unsigned int const TPCNo = 0,
4839 unsigned int const cstat = 0)
const 4840 {
return NearestChannel(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4856 bool ChannelsIntersect
4881 {
return NTPCsets(tpcsetid); }
4885 unsigned int MaxTPCsets()
const;
4908 template <
typename T>
4910 {
return { Ncryostats(), MaxTPCsets() }; }
4926 template <
typename T>
4928 {
return { Ncryostats(), MaxTPCsets(), defValue }; }
4940 {
return HasTPCset(tpcsetid); }
4966 std::vector<geo::TPCID> TPCsetToTPCs
4976 { GetBeginID(
id.asCryostatID());
id.TPCset = 0; }
4980 { GetEndID(
id.asCryostatID());
id.TPCset = 0; }
4988 {
return { id, 0 }; }
5081 {
return NROPs(ropid); }
5085 unsigned int MaxROPs()
const;
5109 template <
typename T>
5111 {
return { Ncryostats(), MaxTPCsets(), MaxROPs() }; }
5127 template <
typename T>
5129 {
return { Ncryostats(), MaxTPCsets(), MaxROPs(), defValue }; }
5157 readout::ROPID WirePlaneToROP(geo::PlaneID
const& planeid)
const;
5169 std::vector<geo::PlaneID> ROPtoWirePlanes
5182 std::vector<geo::TPCID> ROPtoTPCs(
readout::ROPID const& ropid)
const;
5203 { GetBeginID(
id.asTPCsetID());
id.ROP = 0; }
5207 { GetEndID(
id.asTPCsetID());
id.ROP = 0; }
5215 {
return { GetBeginTPCsetID(
id), 0 }; }
5220 {
return { GetEndTPCsetID(
id), 0 }; }
5224 {
return { id, 0 }; }
5229 {
return { GetNextID(
id), 0 }; }
5391 unsigned int OpChannel(
int detNum,
int hardwareChannel)
const;
5400 unsigned int OpDetFromCryo(
unsigned int o,
unsigned int c)
const;
5422 bool ValueInRange(
double value,
double min,
double max)
const;
5452 void LoadGeometryFile(
5455 bool bForceReload =
false 5469 void LoadGeometryFile
5483 void ApplyChannelMap(std::unique_ptr<geo::ChannelMapAlg> pChannelMap);
5493 {
return fChannelMapAlg.get(); }
5529 std::vector<TGeoNode const*> FindDetectorEnclosure
5532 bool FindFirstVolume
5540 bool WireIDIntersectionCheck
5544 static bool PointWithinSegments(
5545 double A_start_x,
double A_start_y,
double A_end_x,
double A_end_y,
5546 double B_start_x,
double B_start_y,
double B_end_x,
double B_end_y,
5554 void UpdateAfterSorting();
5557 void ClearGeometry();
5561 static void CheckIndependentPlanesOnSameTPC
5562 (geo::PlaneID
const& pid1, geo::PlaneID
const& pid2,
const char* caller);
5594 {
init(start_node); }
5598 {
return current_path.empty()?
nullptr: current_path.back().self; }
5604 std::vector<TGeoNode const*> get_path()
const;
5611 : self(new_self), sibling(new_sibling) {}
5617 void reach_deepest_descendant();
5619 void init(TGeoNode
const* start_node);
5635 if (
id)
id.isValid = HasCryostat(
id);
5640 unsigned int const nTPCsInCryo = NTPC(
id);
5641 if (++
id.
TPC < nTPCsInCryo)
return bool(
id);
5644 return IncrementID(
id.asCryostatID());
5650 unsigned int const nPlanesInTPC = Nplanes(
id);
5651 if (++
id.
Plane < nPlanesInTPC)
return bool(
id);
5654 return IncrementID(
id.asTPCID());
5660 unsigned int const nWiresInPlane = Nwires(
id);
5661 if (++
id.
Wire < nWiresInPlane)
return bool(
id);
5664 return IncrementID(
id.asPlaneID());
5668 unsigned int const nTPCsetsInCryo = NTPCsets(
id);
5669 if (++
id.TPCset < nTPCsetsInCryo)
5673 return IncrementID(
id.asCryostatID());
5679 unsigned int const nROPinTPC = NROPs(
id);
5680 if (++
id.ROP < nROPinTPC)
return bool(
id);
5683 return IncrementID(
id.asTPCsetID());
5692 template <
typename Po
int>
5702 template <
typename Stream>
5707 out <<
"Detector " << DetectorName() <<
" has " 5708 << Ncryostats() <<
" cryostats and " 5709 << NAuxDets() <<
" auxiliary detectors:";
5711 auto const& detEnclosureBox = DetectorEnclosureBox();
5712 out <<
"\n" << indent <<
"Detector enclosure: " 5713 << detEnclosureBox.Min() <<
" -- " << detEnclosureBox.Max()
5714 <<
" cm => ( " << detEnclosureBox.SizeX() <<
" x " 5715 << detEnclosureBox.SizeY() <<
" x " 5716 << detEnclosureBox.SizeZ() <<
" ) cm^3" 5721 cryostat.PrintCryostatInfo
5722 (std::forward<Stream>(out), indent +
" ", cryostat.MaxVerbosity);
5724 const unsigned int nTPCs = cryostat.NTPC();
5725 for(
unsigned int t = 0;
t < nTPCs; ++
t) {
5728 out <<
"\n" << indent <<
" ";
5730 (std::forward<Stream>(out), indent +
" ", tpc.
MaxVerbosity);
5732 const unsigned int nPlanes = tpc.
Nplanes();
5733 for(
unsigned int p = 0; p < nPlanes; ++
p) {
5735 const unsigned int nWires = plane.
Nwires();
5737 out <<
"\n" << indent <<
" ";
5739 (std::forward<Stream>(out), indent +
" ", plane.
MaxVerbosity);
5741 out <<
"\n" << indent <<
" " 5743 <<
" (" <<
static_cast<int>(sigType) <<
")";
5745 for(
unsigned int w = 0;
w < nWires; ++
w) {
5751 out <<
"\n" << indent <<
" " << wireID <<
" ";
5753 (std::forward<Stream>(out), indent +
" ", wire.
MaxVerbosity);
5758 unsigned int nOpDets = cryostat.NOpDet();
5759 for (
unsigned int iOpDet = 0; iOpDet < nOpDets; ++iOpDet) {
5761 out <<
"\n" << indent <<
" [OpDet #" << iOpDet <<
"] ";
5763 (std::forward<Stream>(out), indent +
" ", opDet.
MaxVerbosity);
5767 unsigned int const nAuxDets = NAuxDets();
5768 for (
unsigned int iDet = 0; iDet < nAuxDets; ++iDet) {
5771 out <<
"\n" << indent <<
"[#" << iDet <<
"] ";
5773 (std::forward<Stream>(out), indent +
" ", auxDet.
MaxVerbosity);
5776 switch (nSensitive) {
5780 out <<
"\n" << indent <<
" ";
5782 (std::forward<Stream>(out), indent +
" ", auxDetS.
MaxVerbosity);
5786 for (
unsigned int iSens = 0; iSens < nSensitive; ++iSens) {
5787 out <<
"\n" << indent <<
"[#" << iSens <<
"] ";
5791 (std::forward<Stream>(out), indent +
" ", auxDetS.
MaxVerbosity);
5808 inline geo::TPCID GeometryCore::GetBeginID<geo::TPCID, geo::CryostatID>
5809 (geo::CryostatID
const& id)
const 5810 {
return GetBeginTPCID(
id); }
5813 inline geo::TPCID GeometryCore::GetEndID<geo::TPCID, geo::CryostatID>
5814 (geo::CryostatID
const& id)
const 5815 {
return GetEndTPCID(
id); }
5818 inline geo::PlaneID GeometryCore::GetBeginID<geo::PlaneID, geo::CryostatID>
5819 (geo::CryostatID
const& id)
const 5820 {
return GetBeginPlaneID(
id); }
5823 inline geo::PlaneID GeometryCore::GetEndID<geo::PlaneID, geo::CryostatID>
5824 (geo::CryostatID
const& id)
const 5825 {
return GetEndPlaneID(
id); }
5833 template <
typename GEOID>
5835 {
return geometry() && geometry()->HasElement(localID()); }
5837 template <
typename GEOID>
5840 {
return geometry()->GetElementPtr(localID()); }
5842 template <
typename GEOID>
5844 { limit = geometry()->NSiblingElements(localID()); }
5846 template <
typename GEOID>
5848 { geometry()->GetBeginID(
ID()); }
5850 template <
typename GEOID>
5852 { geometry()->GetEndID(
ID()); }
5854 template <
typename GEOID>
5856 if (at_end())
return;
5857 if (++local_index() < limit)
return;
5858 localID().isValid =
false;
5865 template <
typename GEOID>
5867 return upper_iterator::geometry()
5868 && upper_iterator::geometry()->HasElement(localID());
5872 template <
typename GEOID>
5875 {
return upper_iterator::geometry()->GetElementPtr(localID()); }
5877 template <
typename GEOID>
5880 limit = upper_iterator::geometry()->NSiblingElements(localID());
5883 template <
typename GEOID>
5886 if (upper_iterator::at_end())
return;
5889 if (++local_index() < limit)
return;
5893 upper_iterator::next();
5905 template <
typename GEOID>
5907 return upper_iterator::geometry()
5908 && upper_iterator::geometry()->HasElement(localID());
5912 template <
typename GEOID>
5915 {
return upper_iterator::geometry()->GetElementPtr(localID()); }
5917 template <
typename GEOID>
5920 limit = upper_iterator::geometry()->NSiblingElements(localID());
5923 template <
typename GEOID>
5926 if (upper_iterator::at_end())
return;
5929 if (++local_index() < limit)
return;
5933 upper_iterator::next();
5945 template <
typename GEOID>
5947 return upper_iterator::geometry()
5948 && upper_iterator::geometry()->HasElement(localID());
5951 template <
typename GEOID>
5954 {
return upper_iterator::geometry()->GetElementPtr(localID()); }
5956 template <
typename GEOID>
5959 limit = upper_iterator::geometry()->NSiblingElements(localID());
5962 template <
typename GEOID>
5965 if (upper_iterator::at_end())
return;
5968 if (++local_index() < limit)
return;
5972 upper_iterator::next();
5984 template <
typename GEOIDITER>
5985 bool geo::details::operator==
5991 template <
typename GEOIDITER>
5992 bool geo::details::operator!=
6002 template <
typename GEOID>
6004 return upper_iterator::geometry()
6005 && upper_iterator::geometry()->HasElement(localID());
6009 template <
typename GEOID>
6012 limit = upper_iterator::geometry()->NSiblingElements(localID());
6015 template <
typename GEOID>
6018 if (upper_iterator::at_end())
return;
6021 if (++local_index() < limit)
return;
6025 upper_iterator::next();
6037 template <
typename GEOID>
6039 return upper_iterator::geometry()
6040 && upper_iterator::geometry()->HasElement(localID());
6044 template <
typename GEOID>
6047 limit = upper_iterator::geometry()->NSiblingElements(localID());
6050 template <
typename GEOID>
6053 if (upper_iterator::at_end())
return;
6056 if (++local_index() < limit)
return;
6060 upper_iterator::next();
6072 #endif // LARCOREALG_GEOMETRY_GEOMETRYCORE_H
unsigned int NearestWire(geo::Point_t const &worldLoc, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
wire_iterator end_wire(geo::PlaneID const &id) const
Returns an iterator pointing after the last wire in specified plane.
wire_iterator begin_wire() const
Returns an iterator pointing to the first wire in the detector.
geo::WirePtr WirePtr(unsigned int iwire) const
Returns the wire number iwire from this plane.
unsigned int NElements() const
void GetStart(double *xyz) const
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
bool HasElement(readout::TPCsetID const &tpcsetid) const
Returns whether we have the specified TPC set.
geo::TPCID GetEndTPCID(geo::CryostatID const &id) const
GeoID GetEndID() const
Returns the (possibly invalid) ID after the last subelement of the detector.
span(IterB &&b, IterE &&e, Adaptor &&adaptor) -> span< decltype(adaptor(std::forward< IterB >(b))), decltype(adaptor(std::forward< IterE >(e))) >
Index OpChannel(Index detNum, Index channel)
bool HasPlane(unsigned int iplane) const
Returns whether a plane with index iplane is present in this TPC.
geo::PlaneDataContainer< T > makePlaneData() const
Returns a container with one entry per wire plane.
ROP_id_iterator begin_ROP_id() const
Returns an iterator pointing to the first ROP ID in the detector.
Utilities to extend the interface of geometry vectors.
readout::TPCsetDataContainer< T > makeTPCsetData(T const &defValue) const
Returns a container with one entry per TPC set.
id_iterator_t const & id_iterator() const
Access to the base ID iterator.
typename id_iterator_t::LocalID_t LocalID_t
LocalIteratorBox< wire_iterator, geo::CryostatID,&GeometryCore::begin_wire,&GeometryCore::end_wire > IterateWires(geo::CryostatID const &cid) const
Enables ranged-for loops on all wires of specified cryostat.
IDparameter< geo::CryostatID > CryostatID
Member type of validated geo::CryostatID parameter.
Interface for a class providing readout channel mapping to geometry.
DefaultPoint_t GetTPCFrontFaceCenter(geo::TPCID const &tpcid) const
std::unique_ptr< const geo::ChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
ID_t & local_index()
Returns the index (part if the ID) this iterator runs on (non-const)
void PrintWireInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this wire.
cryostat_id_iterator_base(geo::GeometryCore const *geom, UndefinedPos_t)
Constructor: does not set the current ID.
raw::ChannelID_t NearestChannel(geo::Point_t const &worldLoc, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
std::string GetCryostatVolumeName(unsigned int const cstat=0) const
Namespace for general, non-LArSoft-specific utilities.
cryostat_id_iterator_base(geo::GeometryCore const *geom)
Constructor: points to begin.
readout::ROPID GetEndROPID(geo::CryostatID const &id) const
ID_t const & local_index() const
Returns the index (part if the ID) this iterator runs on.
constexpr auto undefined_pos
wire_iterator end_wire() const
Returns an iterator pointing after the last wire in the detector.
void PrintTPCInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this TPC.
CryostatGeo const * GetElementPtr(geo::CryostatID const &cryoid) const
geo::GeometryCore const * geometry() const
Returns a pointer to the geometry.
value_type const * pointer
void set_begin()
Sets the iterator to the begin position.
CryostatGeo const & GetElement(geo::CryostatID const &cryoid) const
static constexpr UndefinedPos_t undefined_pos
raw::ChannelID_t NearestChannel(const double worldLoc[3], unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
void GetBeginID(geo::WireID &id) const
Initializes the specified ID with the ID of the first wire.
TPC_id_iterator begin_TPC_id() const
Returns an iterator pointing to the first TPC ID in the detector.
GeometryData_t fGeoData
The detector description data.
Container with one element per readout TPC set.
unsigned int NSiblingElements(geo::CryostatID const &) const
std::forward_iterator_tag iterator_category
wire_iterator begin_wire(geo::CryostatID const &id) const
Returns an iterator pointing to the first wire in specified cryostat.
std::vector< NodeInfo_t > current_path
which node, which sibling?
IteratorBox< wire_iterator,&GeometryCore::begin_wire,&GeometryCore::end_wire > IterateWires() const
Enables ranged-for loops on all wires of the detector.
Encapsulate the construction of a single cyostat.
An object with a begin and end iterator.
bool HasElement(geo::PlaneID const &planeid) const
geo::WireID GetEndWireID(geo::TPCID const &id) const
geo::Length_t WirePitch(unsigned int plane=0, unsigned int tpc=0, unsigned int cstat=0) const
IteratorBox< plane_iterator,&GeometryCore::begin_plane,&GeometryCore::end_plane > IteratePlanes() const
Enables ranged-for loops on all planes of the detector.
GeoID GetBeginID() const
Returns the ID of the first element of the detector.
cryostat_id_iterator_base(geo::GeometryCore const *geom, EndPos_t)
Constructor: points to end.
Classes identifying readout-related concepts.
geo::WireID NearestWireID(const TVector3 &point, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
LocalIteratorBox< wire_iterator, geo::PlaneID,&GeometryCore::begin_wire,&GeometryCore::end_wire > IterateWires(geo::PlaneID const &tid) const
Enables ranged-for loops on all wires of specified wire plane.
LocalID_t & localID()
Returns the type of ID we act on (non-const version)
TPCset_id_iterator_base(geo::GeometryCore const *geom, EndPos_t)
Constructor: points to end.
AdcChannelData::View View
void Print(Stream &&out, std::string indent=" ") const
Prints geometry information with maximum verbosity.
static constexpr BeginPos_t begin_pos
WireGeo const & Wire(unsigned int iwire) const
wire_iterator end_wire(geo::CryostatID const &id) const
Returns an iterator pointing after the last wire in specified cryostat.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Base forward iterator browsing all wire IDs in the detector.
Base forward iterator browsing all TPC IDs in the detector.
Base forward iterator browsing all readout plane IDs in the detector.
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
void WireEndPoints(unsigned int cstat, unsigned int tpc, unsigned int plane, unsigned int wire, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
unsigned int Nplanes() const
Number of planes in this tpc.
Container with one element per readout plane.
LocalID_t & localID()
Returns the type of ID we act on (non-const version).
LocalIteratorBox< wire_id_iterator, geo::CryostatID,&GeometryCore::begin_wire_id,&GeometryCore::end_wire_id > IterateWireIDs(geo::CryostatID const &cid) const
Enables ranged-for loops on all wire IDs of specified cryostat.
LocalID_t const & localID() const
Returns the type of ID we act on.
raw::ChannelID_t NearestChannel(const TVector3 &worldLoc, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
unsigned int NSiblingElements(geo::PlaneID const &planeid) const
std::set< geo::View_t > const & Views() const
Returns a list of possible views in the detector.
details::cryostat_id_iterator_base< geo::CryostatID > cryostat_id_iterator
Forward iterator browsing all cryostats in the detector.
LocalIteratorBox(GeometryCore const *geom, GeoID const &ID)
wire_id_iterator begin_wire_id(geo::TPCID const &id) const
Returns an iterator pointing to the first wire ID in specified TPC.
readout::ROPDataContainer< T > makeROPdata() const
Returns a container with one entry per readout plane.
Simple data structure holding the data of the geometry.
unsigned int PlaneID_t
Type for the ID number.
cryostat_iterator end_cryostat() const
Returns an iterator pointing after the last cryostat.
wire_id_iterator begin_wire_id(geo::PlaneID const &id) const
Returns an iterator pointing to the first wire ID in specified plane.
plane_iterator end_plane() const
Returns an iterator pointing after the last plane in the detector.
The data type to uniquely identify a Plane.
Geometry information for a single TPC.
wire_id_iterator begin_wire_id(geo::CryostatID const &id) const
Returns an iterator pointing to the first wire ID in specified cryostat.
details::ROP_id_iterator_base< readout::ROPID > ROP_id_iterator
Forward iterator browsing all readout planes in the detector.
Segment< DefaultPoint_t > WireEndPoints(geo::WireID const &wireID) const
TPC_iterator end_TPC(geo::CryostatID const &cid) const
Returns an iterator pointing after the last TPC in the detector.
readout::ROPDataContainer< T > makeROPdata(T const &defValue) const
Returns a container with one entry per readout plane.
TPCGeo const & GetElement(geo::TPCID const &tpcid) const
void next()
Skips to the next wire.
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
Class identifying a set of TPC sharing readout channels.
geo::PlaneID GetBeginPlaneID(geo::CryostatID const &id) const
Returns the ID of the first plane of the specified cryostat.
Point const & start() const
NodeInfo_t(Node_t new_self, int new_sibling)
static constexpr EndPos_t end_pos
LocalID_t & localID()
Returns the type of ID we act on (non-const version).
GeoID_t const & ID() const
Returns the actual type of ID we store.
TPCset_id_iterator_base(geo::GeometryCore const *geom)
Constructor: points to begin.
value_type const & reference
std::vector< geo::CryostatGeo > CryostatList_t
Type of list of cryostats.
geo::WireID GetBeginWireID(geo::TPCID const &id) const
Returns the ID of the first wire of the specified TPC.
double fSurfaceY
The point where air meets earth for this detector.
plane_iterator end_plane(geo::TPCID const &ID) const
Returns an iterator pointing after the last plane in the specified TPC.
ID_t const & local_index() const
Returns the index (part if the ID) this iterator runs on.
Interface for geometry extractor classes.
wire_iterator end_wire(geo::TPCID const &id) const
Returns an iterator pointing after the last wire in specified TPC.
CryostatID_t Cryostat
Index of cryostat.
TPC_iterator begin_TPC(geo::CryostatID const &cid) const
Returns an iterator pointing to the first TPC in the detector.
ROP_id_iterator end_ROP_id() const
Returns an iterator pointing after the last ROP ID in the detector.
geo::WireID NearestWireID(std::vector< double > const &point, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
void next()
Skips to the next TPC.
enum geo::coordinates Coord_t
TPCset_id_iterator end_TPCset_id() const
Returns an iterator pointing after the last TPC set ID in the detector.
geo::TPCDataContainer< T > makeTPCData(T const &defValue) const
Returns a container with one entry per TPC.
geo::TPCDataContainer< T > makeTPCData() const
Returns a container with one entry per TPC.
Point const & end() const
geo::WireID GetEndWireID(geo::CryostatID const &id) const
geo::WireID GetEndWireID(geo::PlaneID const &id) const
geo::Length_t CryostatLength(unsigned int cstat=0) const
LocalID_t & localID()
Returns the type of ID we act on (non-const version)
TPCset_id_iterator begin_TPCset_id(geo::CryostatID const &cid) const
Container with one element per geometry wire plane.
void GetEndID(geo::WireID &id) const
Initializes the specified ID with the invalid ID after the last wire.
Geometry information for a single cryostat.
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
TPCGeo const & TPC(geo::TPCID const &tpcid) const
void set_local_limits()
Sets limit to the past-the-end TPC set number of current croystat.
typename id_iterator_t::EndPos_t EndPos_t
double WireAngleToVertical(geo::View_t view, int TPC=0, int Cryo=0) const
TPC_id_iterator_base()
Default constructor; effect not defined: assign to it before using!
typename LocalID_t::CryostatID_t ID_t
void GetBeginID(geo::TPCID &id) const
Initializes the specified ID with the ID of the first TPC.
TPC_id_iterator begin_TPC_id(geo::CryostatID const &cid) const
geometry_iterator_base(geo::GeometryCore const *geom)
Constructor: associates with the specified geometry.
wire_id_iterator_base(geo::GeometryCore const *geom, EndPos_t)
Constructor: points to end.
unsigned int NearestWire(const TVector3 &worldLoc, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
wire_id_iterator end_wire_id(geo::TPCID const &id) const
Returns an iterator pointing after the last wire ID in specified TPC.
void GetBeginID(readout::TPCsetID &id) const
Initializes the specified ID with the ID of the first TPC set.
PlaneGeo const * GetElementPtr(geo::PlaneID const &planeid) const
ID_t & local_index()
Returns the index (part if the ID) this iterator runs on (non-const).
TVector3 DefaultVector_t
Default template argument.
Class for approximate comparisons.
IteratorBox< TPC_id_iterator,&GeometryCore::begin_TPC_id,&GeometryCore::end_TPC_id > IterateTPCIDs() const
Enables ranged-for loops on all TPC IDs of the detector.
details::geometry_iterator_types::EndPos_t EndPos_t
void next()
Skips to the next TPC set.
unsigned int NSiblingElements(readout::TPCsetID const &tpcsetid) const
bool IntersectionPoint(unsigned int wire1, unsigned int wire2, unsigned int plane1, unsigned int plane2, unsigned int cstat, unsigned int tpc, double &y, double &z) const
Returns the intersection point of two wires.
WireGeo const * GetElementPtr(geo::WireID const &wireid) const
unsigned int NElements() const
void GetEndID(geo::TPCID &id) const
Initializes the specified ID with the invalid ID after the last TPC.
wire_id_iterator_base(geo::GeometryCore const *geom, BeginPos_t const)
Constructor: points to begin.
Index OpDetFromOpChannel(Index opChannel)
std::string ROOTFile() const
Returns the full directory path to the geometry file source.
wire_id_iterator_base(geo::GeometryCore const *geom, UndefinedPos_t)
Constructor: position undefined (meaning undefined local limits too)
bool IncrementID(geo::CryostatID &id) const
details::plane_id_iterator_base< geo::PlaneID > plane_id_iterator
Forward iterator browsing all planes in the detector.
PlaneGeo const & Plane(geo::PlaneID const &planeid) const
GENVECTOR_CONSTEXPR::geo::Point_t makePointFromCoords(Coords &&coords)
Creates a geo::Point_t from its coordinates (see makeFromCoords()).
TPCGeo const & PositionToTPC(double const point[3]) const
LocalIteratorBox< wire_id_iterator, geo::TPCID,&GeometryCore::begin_wire_id,&GeometryCore::end_wire_id > IterateWireIDs(geo::TPCID const &tid) const
Enables ranged-for loops on all wire IDs of specified TPC.
readout::TPCsetID GetEndTPCsetID(geo::CryostatID const &id) const
details::geometry_iterator_types::BeginPos_t BeginPos_t
unsigned int NSiblingElements(geo::TPCID const &tpcid) const
raw::ChannelID_t NearestChannel(std::vector< double > const &worldLoc, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
TPC_iterator begin_TPC() const
Returns an iterator pointing to the first TPC in the detector.
LocalIteratorBox< ROP_id_iterator, readout::TPCsetID,&GeometryCore::begin_ROP_id,&GeometryCore::end_ROP_id > IterateROPIDs(readout::TPCsetID const &sid) const
Enables ranged-for loops on all readout plane IDs of the specified TPC set.
double TotalMass() const
Returns the total mass [kg] of the specified volume (default: world).
void GetBeginID(readout::ROPID &id) const
Initializes the specified ID with the ID of the first readout plane.
static lar::util::RealComparisons< geo::Length_t > coordIs
Value of tolerance for equality comparisons.
IteratorBox< plane_id_iterator,&GeometryCore::begin_plane_id,&GeometryCore::end_plane_id > IteratePlaneIDs() const
Enables ranged-for loops on all plane IDs of the detector.
geo::PlaneID GetBeginPlaneID(geo::TPCID const &id) const
Returns the ID of the first plane of the specified TPC.
TPC_id_iterator end_TPC_id(geo::CryostatID const &cid) const
geo::TPCID FindTPCAtPosition(double const worldLoc[3]) const
Returns the ID of the TPC at specified location.
CryostatList_t const & Cryostats() const
geo::CryostatGeo const * ElementPtr_t
Interface to algorithm class for sorting geo::XXXGeo objects.
details::geometry_element_iterator< wire_id_iterator > wire_iterator
Forward iterator browsing all wires in the detector.
ROP_id_iterator begin_ROP_id(readout::TPCsetID const &ID) const
std::string GDMLFile() const
Returns the full directory path to the GDML file source.
details::geometry_element_iterator< plane_id_iterator > plane_iterator
Forward iterator browsing all planes in the detector.
plane_id_iterator_base(geo::GeometryCore const *geom, UndefinedPos_t)
Constructor: position undefined (meaning undefined local limits too)
bool HasElement(readout::ROPID const &ropid) const
cryostat_id_iterator_base()
Default constructor; effect not defined: assign to it before using!
TVector3 DefaultPoint_t
Default template argument.
AuxDetList_t const & AuxDets() const
Containers to hold one datum per TPC or plane.
TPC_id_iterator_base(geo::GeometryCore const *geom, UndefinedPos_t)
Constructor: position undefined (meaning undefined local limits too)
geo::WireID GetBeginWireID(geo::PlaneID const &id) const
Returns the ID of the first wire of the specified wire plane.
IteratorBox< wire_id_iterator,&GeometryCore::begin_wire_id,&GeometryCore::end_wire_id > IterateWireIDs() const
Enables ranged-for loops on all wire IDs of the detector.
static constexpr double as
LocalIteratorBox< plane_id_iterator, geo::CryostatID,&GeometryCore::begin_plane_id,&GeometryCore::end_plane_id > IteratePlaneIDs(geo::CryostatID const &cid) const
Enables ranged-for loops on all plane IDs of the specified cryostat.
void set_end()
Sets the iterator to the end position.
Container with one element per geometry TPC.
Base class for geometry iterators, containing some type definitions.
PlaneGeo const * PlanePtr(geo::PlaneID const &planeid) const
Returns the specified plane.
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
LocalIteratorBox< TPCset_id_iterator, geo::CryostatID,&GeometryCore::begin_TPCset_id,&GeometryCore::end_TPCset_id > IterateTPCsetIDs(geo::CryostatID const &cid) const
Enables ranged-for loops on all TPC set IDs of the specified cryostat.
plane_id_iterator end_plane_id(geo::TPCID const &ID) const
Iterator to navigate through all the nodes.
bool HasElement(geo::CryostatID const &cryoid) const
void GetEndID(readout::TPCsetID &id) const
Initializes the specified ID with the invalid ID after the last TPC set.
std::set< geo::View_t > allViews
All views in the detector.
readout::ROPID GetBeginROPID(readout::TPCsetID const &id) const
Returns the ID of the first readout plane of the specified TPC set.
readout::TPCsetID GetBeginTPCsetID(geo::CryostatID const &id) const
Returns the ID of the first TPC set in the specified cryostat.
GeometryData_t::CryostatList_t CryostatList_t
Type of list of cryostats.
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
geometry_iterator_base()
Default constructor; do not use a default-constructed iterator as-is!
details::TPCset_id_iterator_base< readout::TPCsetID > TPCset_id_iterator
Forward iterator browsing all TPC sets in the detector.
void GetBeginID(geo::CryostatID &id) const
Initializes the specified ID with the ID of the first cryostat.
void GetBeginID(geo::PlaneID &id) const
Initializes the specified ID with the ID of the first plane.
LocalID_t const & localID() const
Returns the type of ID we act on.
LocalIteratorBox< wire_id_iterator, geo::PlaneID,&GeometryCore::begin_wire_id,&GeometryCore::end_wire_id > IterateWireIDs(geo::PlaneID const &pid) const
Enables ranged-for loops on all wire IDs of specified wire plane.
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
ROOTGeoNodeForwardIterator(TGeoNode const *start_node)
Constructor: start from this node.
ElementPtr_t get() const
Returns a pointer to plane, or nullptr if invalid.
plane_iterator begin_plane(geo::CryostatID const &ID) const
geo::Length_t DetLength(unsigned int tpc=0, unsigned int cstat=0) const
typename std::remove_pointer< ElementPtr_t >::type Element_t
Geometry class pointed by the iterator.
typename id_iterator_t::GeoID_t GeoID_t
enum geo::_plane_sigtype SigType_t
IteratorBox< TPC_iterator,&GeometryCore::begin_TPC,&GeometryCore::end_TPC > IterateTPCs() const
Enables ranged-for loops on all TPCs of the detector.
IDparameter< readout::TPCsetID > TPCsetID
Member type of validated readout::TPCsetID parameter.
LocalID_t const & localID() const
Returns the type of ID we act on.
Base forward iterator browsing all cryostat IDs in the detector.
ROP_id_iterator_base(geo::GeometryCore const *geom, BeginPos_t const)
Constructor: points to begin.
plane_id_iterator_base(geo::GeometryCore const *geom, BeginPos_t const)
Constructor: points to begin.
wire_iterator begin_wire(geo::PlaneID const &id) const
Returns an iterator pointing to the first wire in specified plane.
details::geometry_element_iterator< TPC_id_iterator > TPC_iterator
Forward iterator browsing all TPCs in the detector.
void set_local_limits()
Sets the limit member to the past-the-end cryostat number.
geo::PlaneID GetEndPlaneID(geo::TPCID const &id) const
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
unsigned int NElements() const
Alias for NTPC().
void PrintOpDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=0) const
Prints information about this optical detector.
TPCset_id_iterator begin_TPCset_id() const
Returns an iterator pointing to the first TPC set ID in the detector.
wire_id_iterator_base()
Default constructor; effect not defined: assign to it before using!
geometry_element_iterator(id_iterator_t &&iter)
Constructor: points to the same element as the specified ID iterator.
TPCGeo const * TPCPtr(unsigned int itpc) const
Returns the TPC number itpc from this cryostat.
TPC_id_iterator_base(geo::GeometryCore const *geom, EndPos_t)
Constructor: points to end.
Encapsulate the geometry of an auxiliary detector.
Point GetTPCFrontFaceCenter(geo::TPCID const &tpcid) const
Returns the center of side of the detector facing the beam.
details::wire_id_iterator_base< geo::WireID > wire_id_iterator
Forward iterator browsing all wires in the detector.
bool HasElement(geo::TPCID const &tpcid) const
Returns whether we have the specified TPC.
ID_t const & local_index() const
Returns the index (part if the ID) this iterator runs on.
TPCGeo const * TPCPtr(geo::TPCID const &tpcid) const
Returns the specified TPC.
LocalIteratorBox< plane_id_iterator, geo::TPCID,&GeometryCore::begin_plane_id,&GeometryCore::end_plane_id > IteratePlaneIDs(geo::TPCID const &tid) const
Enables ranged-for loops on all plane IDs of the specified TPC.
size_t NSensitiveVolume() const
geo::Length_t SurfaceY() const
The position of the detector respect to earth surface.
TPC_id_iterator_base(geo::GeometryCore const *geom)
Constructor: points to begin.
ROP_id_iterator_base(geo::GeometryCore const *geom, EndPos_t)
Constructor: points to end.
wire_id_iterator end_wire_id() const
Returns an iterator pointing after the last wire ID in the detector.
void SetDetectorName(std::string const &new_name)
Sets the detector name.
geo::WireID NearestWireID(geo::Point_t const &point, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
static int max(int a, int b)
The data type to uniquely identify a TPC.
Description of geometry of one entire detector.
plane_iterator end_plane(geo::CryostatID const &ID) const
Index HardwareChannelFromOpChannel(Index opChannel)
void next()
Skips to the next cryostat.
Definition of data types for geometry description.
LocalIteratorBox< plane_iterator, geo::CryostatID,&GeometryCore::begin_plane,&GeometryCore::end_plane > IteratePlanes(geo::CryostatID const &cid) const
Enables ranged-for loops on all planes of the specified cryostat.
ROP_id_iterator_base(geo::GeometryCore const *geom)
Constructor: points to begin.
TPC_id_iterator_base(geo::GeometryCore const *geom, BeginPos_t const)
Constructor: points to begin.
LocalIteratorBox< TPC_id_iterator, geo::CryostatID,&GeometryCore::begin_TPC_id,&GeometryCore::end_TPC_id > IterateTPCIDs(geo::CryostatID const &cid) const
Enables ranged-for loops on all TPC IDs of the specified cryostat.
AuxDetList_t & AuxDets()
Return the interfal auxiliary detectors list.
double DefaultWiggle() const
Returns the tolerance used in looking for positions.
wire_iterator begin_wire(geo::TPCID const &id) const
Returns an iterator pointing to the first wire in specified TPC.
TPC_id_iterator end_TPC_id() const
Returns an iterator pointing after the last TPC ID in the detector.
IteratorBox(GeometryCore const *geom)
Class identifying a set of planes sharing readout channels.
bool IsValidOpChannel(Index opChannel, Index)
LocalIteratorBox< wire_iterator, geo::TPCID,&GeometryCore::begin_wire,&GeometryCore::end_wire > IterateWires(geo::TPCID const &tid) const
Enables ranged-for loops on all wires of specified TPC.
void PrintAuxDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=0) const
Prints information about this auxiliary sensitive detector.
Provides a base class aware of world box coordinates.
typename id_iterator_t::BeginPos_t BeginPos_t
ElementPtr_t get() const
Returns a pointer to TPC, or nullptr if invalid.
wire_id_iterator end_wire_id(geo::CryostatID const &id) const
plane_id_iterator_base(geo::GeometryCore const *geom, EndPos_t)
Constructor: points to end.
double fPositionWiggle
accounting for rounding errors when testing positions
std::input_iterator_tag iterator_category
value_type const & reference
unsigned int NElements(geo::CryostatID const &cryoid) const
double ThirdPlaneSlope(geo::PlaneID::PlaneID_t plane1, double slope1, geo::PlaneID::PlaneID_t plane2, double slope2, geo::TPCID const &tpcid) const
Returns the slope on the third plane, given it in the other two.
LocalID_t const & localID() const
Returns the type of ID we act on.
Encapsulate the geometry of a wire.
GeometryData_t::AuxDetList_t AuxDetList_t
Type of list of auxiliary detectors.
plane_iterator begin_plane(geo::TPCID const &ID) const
Returns an iterator pointing to the first plane in the specified TPC.
ID_t const & local_index() const
Returns the index (part if the ID) this iterator runs on.
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
CryostatGeo const & PositionToCryostat(double const point[3]) const
void GetEndID(geo::PlaneID &id) const
Initializes the specified ID with the invalid ID after the last plane.
LocalID_t const & localID() const
Returns the type of ID we act on.
LocalIteratorBox< plane_iterator, geo::TPCID,&GeometryCore::begin_plane,&GeometryCore::end_plane > IteratePlanes(geo::TPCID const &tid) const
Enables ranged-for loops on all planes of the specified TPC.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Encapsulate the geometry of an optical detector.
IteratorBox< cryostat_iterator,&GeometryCore::begin_cryostat,&GeometryCore::end_cryostat > IterateCryostats() const
Enables ranged-for loops on all cryostats of the detector.
std::string fGDMLfile
path to geometry file used for Geant4 simulation
double Length_t
Type used for coordinates and distances. They are measured in centimeters.
void next()
Skips to the next plane.
bool HasTPC(geo::TPCID const &tpcid) const
Returns whether we have the specified TPC.
cryostat_iterator begin_cryostat() const
Returns an iterator pointing to the first cryostat.
ROP_id_iterator begin_ROP_id(geo::CryostatID const &ID) const
unsigned int Nwires(geo::PlaneID const &planeid) const
Returns the total number of wires in the specified plane.
details::geometry_iterator_types::UndefinedPos_t UndefinedPos_t
WireGeo const & Wire(geo::WireID const &wireid) const
Returns the specified wire.
WireGeo const & GetElement(geo::WireID const &wireid) const
unsigned int NSiblingElements(geo::WireID const &wireid) const
void set_local_limits()
Sets limit to the past-the-end TPC number of current croystat.
unsigned int CryostatID_t
Type for the ID number.
plane_id_iterator_base()
Default constructor; effect not defined: assign to it before using!
LocalIteratorBox< ROP_id_iterator, geo::CryostatID,&GeometryCore::begin_ROP_id,&GeometryCore::end_ROP_id > IterateROPIDs(geo::CryostatID const &cid) const
Enables ranged-for loops on all readout plane IDs of the specified cryostat.
bool operator!=(geometry_element_iterator< GEOIDITER > const &iter, GEOIDITER const &id_iter)
Comparison operator: geometry ID and element point to different IDs.
plane_id_iterator begin_plane_id(geo::TPCID const &ID) const
geo::WireID GetBeginWireID(geo::CryostatID const &id) const
Returns the ID of the first wire in the specified cryostat.
std::string VolumeName(TVector3 const &point) const
Base forward iterator browsing all plane IDs in the detector.
double ThirdPlaneSlope(unsigned int plane1, double slope1, unsigned int plane2, double slope2, unsigned int tpc, unsigned int cstat) const
ID_t & local_index()
Returns the index (part if the ID) this iterator runs on (non-const).
readout::TPCsetDataContainer< T > makeTPCsetData() const
Returns a container with one entry per TPC set.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintAuxDetInfo().
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
unsigned int NearestWire(std::vector< double > const &worldLoc, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
ID_t const & local_index() const
Returns the index (part if the ID) this iterator runs on.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Index NOpHardwareChannels(Index opDet)
Encapsulate the construction of a single detector plane.
IteratorBox< ROP_id_iterator,&GeometryCore::begin_ROP_id,&GeometryCore::end_ROP_id > IterateROPIDs() const
Enables ranged-for loops on all readout plane IDs of the detector.
readout::ROPID GetEndROPID(readout::TPCsetID const &id) const
ROP_id_iterator end_ROP_id(readout::TPCsetID const &ID) const
bool HasWire(unsigned int iwire) const
Returns whether a wire with index iwire is present in this plane.
void PrintPlaneInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this plane.
PlaneGeo const * PlanePtr(unsigned int iplane) const
Returns the plane number iplane from this TPC.
geometry_element_iterator(id_iterator_t const &iter)
Constructor: points to the same element as the specified ID iterator.
ElementPtr_t get() const
Returns a pointer to cryostat, or nullptr if invalid.
LocalID_t const & ID() const
Returns the ID of the pointed geometry element.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc'th TPC in the cryostat.
void GetEnd(double *xyz) const
plane_id_iterator end_plane_id() const
Returns an iterator pointing after the last plane ID in the detector.
geo::TPCID FindTPCAtPosition(TVector3 const &point) const
ElementPtr_t get() const
Returns a pointer to wire, or nullptr if invalid.
void GetEndID(readout::ROPID &id) const
Initializes the specified ID with the invalid ID after the last ROP.
IteratorBox< TPCset_id_iterator,&GeometryCore::begin_TPCset_id,&GeometryCore::end_TPCset_id > IterateTPCsetIDs() const
Enables ranged-for loops on all TPC set IDs of the detector.
geo::ChannelMapAlg const * ChannelMap() const
Returns the object handling the channel map.
void next()
Skips to the next readout plane.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintOpDetInfo().
geo::PlaneID const & ID() const
Returns the identifier of this plane.
unsigned int NElements(geo::TPCID const &tpcid) const
cryostat_id_iterator begin_cryostat_id() const
Returns an iterator pointing to the first cryostat ID.
IteratorBox< cryostat_id_iterator,&GeometryCore::begin_cryostat_id,&GeometryCore::end_cryostat_id > IterateCryostatIDs() const
Enables ranged-for loops on all cryostat IDs of the detector.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintAuxDetInfo().
value_type const * pointer
geo::TPCID GetBeginTPCID(geo::CryostatID const &id) const
Returns the ID of the first TPC in the specified cryostat.
unsigned int Nwires() const
Number of wires in this plane.
unsigned int NElements(geo::PlaneID const &planeid) const
ID_t & local_index()
Returns the index (part if the ID) this iterator runs on (non-const)
unsigned int NElements() const
ID_t & local_index()
Returns the index (part if the ID) this iterator runs on (non-const)
Base class for geometry iterators (note: this is not an iterator)
CryostatList_t & Cryostats()
Return the internal cryostat list.
Simple class with two points (a pair with aliases).
void set_local_limits()
Sets limit to the past-the-end wire number of current plane.
void WireEndPoints(geo::WireID const &wireid, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
std::string fDetectorName
Name of the detector.
details::TPC_id_iterator_base< geo::TPCID > TPC_id_iterator
Forward iterator browsing all TPCs in the detector.
TPCset_id_iterator_base(geo::GeometryCore const *geom, UndefinedPos_t)
Constructor: position undefined (meaning undefined local limits too).
CryostatGeo const & Cryostat(unsigned int const cstat=0) const
typename id_iterator_t::UndefinedPos_t UndefinedPos_t
id_iterator_t id_iter
iterator performing the job
TPCset_id_iterator_base()
Default constructor; effect not defined: assign to it before using!
raw::ChannelID_t PlaneWireToChannel(unsigned int const plane, unsigned int const wire, unsigned int const tpc=0, unsigned int const cstat=0) const
bool HasPlane(geo::PlaneID const &planeid) const
Returns whether we have the specified plane.
Manages the extraction of LArSoft geometry information from ROOT.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintWireInfo().
unsigned int WireID_t
Type for the ID number.
Definitions of geometry vector data types.
detail::Node< FrameID, bool > PlaneID
TPCGeo const * GetElementPtr(geo::TPCID const &tpcid) const
plane_id_iterator begin_plane_id() const
Returns an iterator pointing to the first plane ID in the detector.
LocalID_t const & localID() const
Returns the type of ID we act on.
Structures to distinguish the constructors.
bool HasElement(geo::WireID const &wireid) const
LocalIteratorBox< TPC_iterator, geo::CryostatID,&GeometryCore::begin_TPC,&GeometryCore::end_TPC > IterateTPCs(geo::CryostatID const &cid) const
Enables ranged-for loops on all TPCs of the specified cryostat.
wire_id_iterator begin_wire_id() const
Returns an iterator pointing to the first wire ID in the detector.
unsigned int Nplanes(geo::TPCID const &tpcid) const
Returns the total number of planes in the specified TPC.
void set_local_limits()
Sets limit to the past-the-end plane number of current TPC.
IDparameter< geo::TPCID > TPCID
Member type of validated geo::TPCID parameter.
id_iterator_t & id_iterator()
std::vector< geo::AuxDetGeo > AuxDetList_t
Type of list of auxiliary detectors.
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
TPCset_id_iterator_base(geo::GeometryCore const *geom, BeginPos_t const)
Constructor: points to begin.
bool HasTPC(unsigned int itpc) const
Returns whether a TPC with index itpc is present in this cryostat.
std::string MaterialName(TVector3 const &point) const
Name of the deepest material containing the point xyz.
Data in the geometry description.
wire_id_iterator_base(geo::GeometryCore const *geom)
Constructor: points to begin.
details::geometry_element_iterator< cryostat_id_iterator > cryostat_iterator
Forward iterator browsing all cryostats in the detector.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Interface to algorithm class for a specific detector channel mapping.
TPCset_id_iterator end_TPCset_id(geo::CryostatID const &cid) const
GeoID GetNextID(GeoID const &id) const
Returns the ID next to the specified one.
std::ptrdiff_t difference_type
Containers to hold one datum per TPC set or readout plane.
second_as<> second
Type of time stored in seconds, in double precision.
Forward iterator browsing all geometry elements in the detector.
recob::tracking::Plane Plane
Index MaxOpChannel(Index)
static constexpr unsigned int MaxVerbosity
Maximum value for print verbosity.
QuadExpr operator*(double v, const QuadExpr &e)
unsigned int NSiblingElements(readout::ROPID const &ropid) const
plane_id_iterator end_plane_id(geo::CryostatID const &ID) const
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintTPCInfo().
wire_id_iterator end_wire_id(geo::PlaneID const &id) const
Returns an iterator pointing after the last wire ID in specified plane.
LArSoft geometry interface.
fhicl::ParameterSet fBuilderParameters
geometry_element_iterator(geo::GeometryCore const *geom)
Constructor: points to begin.
Base forward iterator browsing all TPC set IDs in the detector.
geo::Length_t CryostatHalfWidth(unsigned int cstat=0) const
plane_iterator begin_plane() const
Returns an iterator pointing to the first plane in the detector.
ROP_id_iterator end_ROP_id(geo::CryostatID const &ID) const
std::string fROOTfile
path to geometry file for geometry in GeometryCore
unsigned int NearestWire(const double worldLoc[3], unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
geo::WireID NearestWireID(const double point[3], unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
unsigned int NTPC(geo::CryostatID const &cryoid) const
Returns the total number of TPCs in the specified cryostat.
plane_id_iterator begin_plane_id(geo::CryostatID const &ID) const
readout::ROPID GetBeginROPID(geo::CryostatID const &id) const
Returns the ID of the first readout plane of the specified cryostat.
bool operator==(geometry_element_iterator< GEOIDITER > const &iter, GEOIDITER const &id_iter)
Comparison operator: geometry ID and element point to the same ID.
std::ptrdiff_t difference_type
typename id_iterator_t::ElementPtr_t ElementPtr_t
void PrintAuxDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this auxiliary detector.
CryostatGeo const * CryostatPtr(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
bool HasCryostat(geo::CryostatID const &cryoid) const
Returns whether we have the specified cryostat.
geo::Length_t WireCoordinate(double YPos, double ZPos, unsigned int PlaneNo, unsigned int TPCNo, unsigned int cstat) const
Returns the index of the nearest wire to the specified position.
plane_id_iterator_base(geo::GeometryCore const *geom)
Constructor: points to begin.
LocalID_t & localID()
Returns the type of ID we act on (non-const version)
std::string SignalTypeName(geo::SigType_t sigType)
Returns the name of the specified signal type.
cet::coded_exception< error, detail::translate > exception
GeoID_t id
ID of the current cryostat.
GEOID GeoID_t
type of the actual ID stored in the iterator
unsigned int NAuxDets() const
Returns the number of auxiliary detectors.
geo::Length_t CryostatHalfHeight(unsigned int cstat=0) const
TPC_iterator end_TPC() const
Returns an iterator pointing after the last TPC in the detector.
ROP_id_iterator_base(geo::GeometryCore const *geom, UndefinedPos_t)
Constructor: position undefined (meaning undefined local limits too).
Encapsulate the construction of a single detector plane.
The data type to uniquely identify a cryostat.
geo::PlaneID GetEndPlaneID(geo::CryostatID const &id) const
bool HasWire(geo::WireID const &wireid) const
Returns whether we have the specified wire.
void GetEndID(geo::CryostatID &id) const
Initializes the specified ID with the invalid ID after the last cryostat.
geo::PlaneDataContainer< T > makePlaneData(T const &defValue) const
Returns a container with one entry per wire plane.
bool at_end() const
Returns whether this iterator has reached the end.
WireGeo const & WireIDToWireGeo(geo::WireID const &wireid) const
ID_t const & local_index() const
Returns the index (part if the ID) this iterator runs on.
WireGeo const * WirePtr(geo::WireID const &wireid) const
Returns the specified wire.
PlaneGeo const & GetElement(geo::PlaneID const &planeid) const
cryostat_id_iterator end_cryostat_id() const
Returns an iterator pointing after the last cryostat ID.