35 #ifndef LARCOREALG_GEOMETRY_GEOMETRYCORE_H
36 #define LARCOREALG_GEOMETRY_GEOMETRYCORE_H
62 #include "fhiclcpp/ParameterSet.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>
203 template <
typename OTHERID>
220 operator bool()
const;
291 template <
typename GEOID>
293 virtual public std::forward_iterator_tag,
304 "template type GEOID is not a LocalID_t");
354 template <
typename OTHERID>
359 template <
typename OTHERID>
376 operator bool()
const;
438 template <
typename GEOID>
440 virtual public std::forward_iterator_tag,
451 "template type GEOID is not a LocalID_t");
502 template <
typename OTHERID>
507 template <
typename OTHERID>
524 operator bool()
const;
586 template <
typename GEOID>
588 virtual public std::forward_iterator_tag,
599 "template type GEOID is not a LocalID_t");
650 template <
typename OTHERID>
655 template <
typename OTHERID>
672 operator bool()
const;
718 template <
typename GEOIT>
720 <std::is_base_of_v<geometry_iterator_base, GEOIT>, std::ostream&>
722 {
return out <<
"geometry_iterator{ " << *it <<
" }"; }
726 template <
typename GEOIDITER>
730 template <
typename GEOIDITER>
733 GEOIDITER
const& id_iter
736 template <
typename GEOIDITER>
738 GEOIDITER
const& id_iter,
741 {
return iter == id_iter; }
744 template <
typename GEOIDITER>
746 geometry_element_iterator<GEOIDITER>
const& iter,
747 GEOIDITER
const& id_iter
750 template <
typename GEOIDITER>
752 GEOIDITER
const& id_iter,
755 {
return iter != id_iter; }
773 template <
typename GEOIDITER>
774 class geometry_element_iterator:
775 public std::forward_iterator_tag,
public geometry_iterator_types
782 "template class for geometry_element_iterator"
783 " must be a geometry iterator"
791 using GeoID_t =
typename id_iterator_t::GeoID_t;
867 if (ptr)
return *ptr;
868 throw cet::exception(
"geometry_iterator")
869 <<
"iterator attempted to obtain geometry element "
870 << std::string(
ID());
932 template <
typename GEOID>
934 virtual public std::forward_iterator_tag,
944 "template type GEOID is not a LocalID_t");
996 template <
typename OTHERID>
1001 template <
typename OTHERID>
1018 operator bool()
const;
1083 template <
typename GEOID>
1085 virtual public std::forward_iterator_tag,
1095 "template type GEOID is not a LocalID_t");
1146 template <
typename OTHERID>
1151 template <
typename OTHERID>
1168 operator bool()
const;
1392 : util::span<Iter>((geom->*BeginFunc)(), (geom->*EndFunc)())
1401 Iter (GeometryCore::*BeginFunc)(GeoID
const&)
const,
1402 Iter (GeometryCore::*EndFunc)(GeoID
const&)
const
1408 : util::span<Iter>((geom->*BeginFunc)(ID), (geom->*EndFunc)(ID))
1416 namespace iterators {
1489 using Point3D_t [[deprecated(
"Convert the code to use geo::Point_t")]]
1494 template <
typename Po
int>
1498 using std::pair<Point, Point>::pair;
1518 static constexpr std::size_t MaxWireDepthInGDML = 20U;
1777 TGeoVolume
const* WorldVolume()
const;
1798 void WorldBox(
double* xlo,
double* xhi,
1799 double* ylo,
double* yhi,
1800 double* zlo,
double* zhi)
const;
1828 TGeoManager* ROOTGeoManager()
const;
1831 const std::string GetWorldVolumeName()
const;
1837 (std::string
const&
name =
"volDetEnclosure")
const;
1849 std::string VolumeName(
geo::Point_t const& point)
const;
1864 std::vector<TGeoNode const*> FindAllVolumes
1865 (std::set<std::string>
const& vol_names)
const;
1880 std::vector<std::vector<TGeoNode const*>> FindAllVolumePaths
1881 (std::set<std::string>
const& vol_names)
const;
1893 std::string MaterialName(
geo::Point_t const& point)
const;
1900 double TotalMass(std::string vol)
const;
1917 double MassBetweenPoints
1919 double MassBetweenPoints(
double *
p1,
double *p2)
const;
1924 template <
typename Stream>
1925 void Print(
Stream&& out, std::string indent =
" ")
const;
1929 std::string Info(std::string indent =
" ")
const;
1940 template <
typename GeoID>
1949 template <
typename GeoID>
1951 {
auto nextID(
id); IncrementID(nextID);
return nextID; }
1959 template <
typename GeoID>
1970 template <
typename GeoID,
typename ContextID>
1971 GeoID GetBeginID(ContextID
const&
id)
const;
1982 template <
typename GeoID,
typename ContextID>
1983 GeoID GetEndID(ContextID
const&
id)
const;
2005 {
return Ncryostats(); }
2020 {
return cryoid.
Cryostat < Ncryostats(); }
2022 {
return HasCryostat(cryoid); }
2042 {
return Cryostat(cryoid); }
2055 {
return HasCryostat(cryoid)? &(Cryostats()[cryoid.
Cryostat]):
nullptr; }
2057 {
return CryostatPtr(cryoid); }
2071 (
double const worldLoc[3])
const;
2135 (
double const worldLoc[3],
unsigned int &cstat)
const;
2249 void CryostatBoundaries
2267 void CryostatBoundaries
2268 (
double* boundaries,
unsigned int cstat = 0)
const
2311 unsigned int NTPC(
unsigned int cstat = 0)
const
2315 unsigned int MaxTPCs()
const;
2318 unsigned int TotalNTPC()
const;
2349 template <
typename T>
2351 {
return { Ncryostats(), MaxTPCs() }; }
2372 template <
typename T>
2374 {
return { Ncryostats(), MaxTPCs(), defValue }; }
2395 {
return NTPC(cryoid); }
2397 {
return NTPC(tpcid); }
2408 return pCryo? pCryo->
HasTPC(tpcid):
false;
2431 (
unsigned int const tpc = 0,
unsigned int const cstat = 0)
const
2434 {
return Cryostat(tpcid).TPC(tpcid); }
2436 {
return TPC(tpcid); }
2451 return pCryo? pCryo->
TPCPtr(tpcid):
nullptr;
2454 {
return TPCPtr(tpcid); }
2505 TPCGeo const& PositionToTPC
2506 (
double const worldLoc[3],
unsigned int &tpc,
unsigned int &cstat)
const;
2516 TPCGeo const& PositionToTPC
2517 (
double const worldLoc[3],
TPCID& tpcid)
const;
2533 { GetBeginID(
id.asCryostatID());
id.TPC = 0; }
2544 {
return { id, 0 }; }
2630 void IterateTPCIDs(
geo::TPCID const& pid)
const =
delete;
2633 void IterateTPCIDs(
geo::PlaneID const& pid)
const =
delete;
2636 void IterateTPCIDs(
geo::WireID const& pid)
const =
delete;
2684 IterateTPCs(geo::CryostatID
const& cid)
const {
return {
this, cid }; }
2687 void IterateTPCs(
geo::TPCID const& pid)
const =
delete;
2690 void IterateTPCs(
geo::PlaneID const& pid)
const =
delete;
2693 void IterateTPCs(
geo::WireID const& pid)
const =
delete;
2722 (
unsigned int tpc = 0,
unsigned int cstat = 0)
const
2723 {
return DetHalfWidth(
geo::TPCID(cstat, tpc)); }
2744 (
unsigned int tpc = 0,
unsigned int cstat = 0)
const
2745 {
return DetHalfHeight(
geo::TPCID(cstat, tpc)); }
2766 {
return DetLength(
geo::TPCID(cstat, tpc)); }
2782 template <
typename Po
int>
2784 {
return TPC(tpcid).GetFrontFaceCenter<
Point>(); }
2786 {
return GetTPCFrontFaceCenter<DefaultPoint_t>(tpcid); }
2801 template <
typename Po
int>
2802 Point GetTPCFrontFaceCenter
2803 (
unsigned int tpc = 0,
unsigned int cstat = 0)
const
2804 {
return GetTPCFrontFaceCenter<Point>(
geo::TPCID(cstat, tpc)); }
2805 DefaultPoint_t GetTPCFrontFaceCenter
2806 (
unsigned int tpc = 0,
unsigned int cstat = 0)
const
2807 {
return GetTPCFrontFaceCenter<DefaultPoint_t>(tpc, cstat); }
2828 std::string GetLArTPCVolumeName(
geo::TPCID const& tpcid)
const;
2829 std::string GetLArTPCVolumeName
2830 (
unsigned int const tpc = 0,
unsigned int const cstat = 0)
const
2831 {
return GetLArTPCVolumeName(
geo::TPCID(cstat, tpc)); }
2854 unsigned int Nplanes(
unsigned int tpc = 0,
unsigned int cstat = 0)
const
2858 unsigned int MaxPlanes()
const;
2887 template <
typename T>
2889 {
return { Ncryostats(), MaxTPCs(), MaxPlanes() }; }
2909 template <
typename T>
2911 {
return { Ncryostats(), MaxTPCs(), MaxPlanes(), defValue }; }
2927 TPCGeo const* pTPC = GetElementPtr(tpcid);
2931 {
return Nplanes(tpcid); }
2933 {
return Nplanes(planeid); }
2948 unsigned int Nviews()
const;
2957 [[deprecated(
"Iterate through geo::GeometryCore::IteratePlaneIDs() instead")]]
2958 std::set<PlaneID>
const& PlaneIDs()
const;
2976 return pTPC? pTPC->
HasPlane(planeid):
false;
2979 {
return HasPlane(planeid); }
3000 (
unsigned int const p,
unsigned int const tpc = 0,
unsigned int const cstat = 0)
3004 {
return TPC(planeid).Plane(planeid); }
3006 {
return Plane(planeid); }
3021 return pTPC? pTPC->
PlanePtr(planeid):
nullptr;
3024 {
return PlanePtr(planeid); }
3033 { GetBeginID(
id.asTPCID());
id.Plane = 0; }
3044 {
return { GetBeginTPCID(
id), 0 }; }
3048 geo::PlaneID GetEndPlaneID(geo::CryostatID
const&
id)
const;
3052 {
return { id, 0 }; }
3183 void IteratePlaneIDs(
geo::PlaneID const& pid)
const =
delete;
3186 void IteratePlaneIDs(
geo::WireID const& pid)
const =
delete;
3261 void IteratePlanes(
geo::PlaneID const& pid)
const =
delete;
3264 void IteratePlanes(
geo::WireID const& pid)
const =
delete;
3294 geo::TPCID
const& tpcid,
3300 unsigned int p2 = 1,
3301 unsigned int tpc = 0,
3302 unsigned int cstat = 0)
const;
3345 (
unsigned int p,
unsigned int tpc = 0,
unsigned int cstat = 0)
const
3361 PlaneGeo const* pPlane = GetElementPtr(planeid);
3365 {
return Nwires(planeid); }
3367 {
return Nwires(wireid); }
3370 unsigned int MaxWires()
const;
3389 return pPlane? pPlane->
HasWire(wireid):
false;
3406 return pPlane? pPlane->
WirePtr(wireid):
nullptr;
3423 {
return Plane(wireid).Wire(wireid); }
3425 {
return Wire(wireid); }
3427 {
return Wire(wireid); }
3436 { GetBeginID(
id.asPlaneID());
id.Wire = 0; }
3447 {
return { GetBeginPlaneID(
id), 0 }; }
3451 geo::WireID GetEndWireID(geo::CryostatID
const&
id)
const;
3459 geo::WireID GetEndWireID(geo::TPCID
const&
id)
const;
3463 {
return { id, 0 }; }
3631 void IterateWireIDs(
geo::WireID const& pid)
const =
delete;
3732 void IterateWires(
geo::WireID const& pid)
const =
delete;
3763 unsigned int tpc = 0,
3764 unsigned int cstat = 0)
const
3765 {
return WirePitch(geo::PlaneID(cstat, tpc, plane)); }
3800 double WireAngleToVertical(
geo::View_t view, geo::TPCID
const& tpcid)
const;
3802 {
return WireAngleToVertical(view, geo::TPCID(Cryo,
TPC)); }
3838 (
geo::WireID const& wireid,
double *xyzStart,
double *xyzEnd)
const;
3856 unsigned int cstat,
unsigned int tpc,
unsigned int plane,
unsigned int wire,
3857 double *xyzStart,
double *xyzEnd
3859 { WireEndPoints(
geo::WireID(cstat, tpc, plane, wire), xyzStart, xyzEnd); }
3874 template <
typename Po
int>
3875 Segment<Point> WireEndPoints(
geo::WireID const& wireID)
const;
3877 {
return WireEndPoints<DefaultPoint_t>(wireID); }
3924 (
geo::Point_t const& point, geo::PlaneID
const& planeid)
const;
3943 (
const double point[3], geo::PlaneID
const& planeid)
const;
3945 (std::vector<double>
const& point, geo::PlaneID
const& planeid)
const;
3947 (
const TVector3& point, geo::PlaneID
const& planeid)
const
3950 unsigned int const PlaneNo,
3951 unsigned int const TPCNo = 0,
3952 unsigned int const cstat = 0)
const
3953 {
return NearestWireID(point, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
3955 unsigned int const PlaneNo,
3956 unsigned int const TPCNo = 0,
3957 unsigned int const cstat = 0)
const
3958 {
return NearestWireID(point, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
3960 unsigned int const PlaneNo,
3961 unsigned int const TPCNo = 0,
3962 unsigned int const cstat = 0)
const
3963 {
return NearestWireID(point, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
3965 unsigned int const PlaneNo,
3966 unsigned int const TPCNo = 0,
3967 unsigned int const cstat = 0)
const
3968 {
return NearestWireID(point, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
3981 (
geo::Point_t const& point, geo::PlaneID
const& planeid)
const;
3999 unsigned int NearestWire
4000 (
const double worldLoc[3], geo::PlaneID
const& planeid)
const;
4001 unsigned int NearestWire
4002 (std::vector<double>
const& worldLoc, geo::PlaneID
const& planeid)
const;
4003 unsigned int NearestWire
4004 (
const TVector3& worldLoc, geo::PlaneID
const& planeid)
const
4007 unsigned int const PlaneNo,
4008 unsigned int const TPCNo = 0,
4009 unsigned int const cstat = 0)
const
4010 {
return NearestWire(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4012 unsigned int const PlaneNo,
4013 unsigned int const TPCNo = 0,
4014 unsigned int const cstat = 0)
const
4015 {
return NearestWire(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4017 unsigned int const PlaneNo,
4018 unsigned int const TPCNo = 0,
4019 unsigned int const cstat = 0)
const
4020 {
return NearestWire(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4022 unsigned int const PlaneNo,
4023 unsigned int const TPCNo = 0,
4024 unsigned int const cstat = 0)
const
4025 {
return NearestWire(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4046 (
double YPos,
double ZPos, geo::PlaneID
const& planeid)
const;
4061 unsigned int PlaneNo,
4063 unsigned int cstat)
const
4064 {
return WireCoordinate(YPos, ZPos, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4079 (
geo::Point_t const& pos, geo::PlaneID
const& planeid)
const;
4081 (TVector3
const& pos, geo::PlaneID
const& planeid)
const
4113 bool IntersectLines(
4114 double A_start_x,
double A_start_y,
double A_end_x,
double A_end_y,
4115 double B_start_x,
double B_start_y,
double B_end_x,
double B_end_y,
4116 double&
x,
double&
y
4140 bool IntersectSegments(
4141 double A_start_x,
double A_start_y,
double A_end_x,
double A_end_y,
4142 double B_start_x,
double B_start_y,
double B_end_x,
double B_end_y,
4143 double&
x,
double&
y
4182 bool WireIDsIntersect(
4186 bool WireIDsIntersect
4187 (
WireID const& wid1,
WireID const& wid2, TVector3& intersection)
const;
4213 bool WireIDsIntersect
4260 unsigned int plane1,
4261 unsigned int plane2,
4267 return IntersectionPoint(
4286 geo::PlaneID ThirdPlane
4287 (geo::PlaneID
const& pid1, geo::PlaneID
const& pid2)
const;
4308 double ThirdPlaneSlope(geo::PlaneID
const& pid1,
double slope1,
4309 geo::PlaneID
const& pid2,
double slope2,
4310 geo::PlaneID
const& output_plane)
const;
4329 double ThirdPlaneSlope(geo::PlaneID
const& pid1,
double slope1,
4330 geo::PlaneID
const& pid2,
double slope2)
const;
4350 geo::TPCID
const& tpcid)
const
4352 return ThirdPlaneSlope(
4353 geo::PlaneID(tpcid, plane1), slope1,
4354 geo::PlaneID(tpcid, plane2), slope2
4358 unsigned int plane2,
double slope2,
4359 unsigned int tpc,
unsigned int cstat)
const
4361 return ThirdPlaneSlope
4362 (plane1, slope1, plane2, slope2, geo::TPCID(cstat, tpc));
4383 double ThirdPlane_dTdW(geo::PlaneID
const& pid1,
double slope1,
4384 geo::PlaneID
const& pid2,
double slope2,
4385 geo::PlaneID
const& output_plane)
const;
4404 double ThirdPlane_dTdW(geo::PlaneID
const& pid1,
double slope1,
4405 geo::PlaneID
const& pid2,
double slope2)
const;
4419 static double ComputeThirdPlaneSlope(
4420 double angle1,
double slope1,
4421 double angle2,
double slope2,
4441 static double ComputeThirdPlane_dTdW(
4442 double angle1,
double pitch1,
double dTdW1,
4443 double angle2,
double pitch2,
double dTdW2,
4444 double angle_target,
double pitch_target
4486 OpDetGeo const& OpDetGeoFromOpChannel(
unsigned int OpChannel)
const;
4493 OpDetGeo const& OpDetGeoFromOpDet(
unsigned int OpDet)
const;
4508 unsigned int GetClosestOpDet(
geo::Point_t const& point)
const;
4509 unsigned int GetClosestOpDet(
double const* point)
const;
4525 std::string OpDetGeoName(
unsigned int c = 0)
const;
4548 unsigned int NAuxDets()
const {
return AuxDets().size(); }
4556 unsigned int NAuxDetSensitive(
size_t const& aid)
const;
4570 AuxDetGeo const& AuxDet(
unsigned int const ad = 0)
const;
4582 unsigned int FindAuxDetAtPosition(
double const worldLoc[3],
double tolerance = 0)
const;
4602 void FindAuxDetSensitiveAtPosition(
geo::Point_t const& point,
4615 void FindAuxDetSensitiveAtPosition(
double const worldLoc[3],
4643 (
double const worldLoc[3],
unsigned int& ad,
double tolerance = 0)
const;
4674 const AuxDetGeo& ChannelToAuxDet(std::string
const& auxDetName,
4675 uint32_t
const& channel)
const;
4679 uint32_t
const& channel)
const;
4693 unsigned int Nchannels()
const;
4700 std::vector<raw::ChannelID_t> ChannelsInTPCs()
const;
4706 std::set<geo::View_t>
const&
Views()
const {
return allViews; }
4738 unsigned int const wire,
4739 unsigned int const tpc = 0,
4740 unsigned int const cstat = 0)
const
4741 {
return PlaneWireToChannel(
geo::WireID(cstat, tpc, plane, wire)); }
4775 std::vector<geo::WireID> ChannelToWire
4797 (
geo::Point_t const& worldLoc, geo::PlaneID
const& planeid)
const;
4814 (
const double worldLoc[3], geo::PlaneID
const& planeid)
const;
4816 (std::vector<double>
const& worldLoc, geo::PlaneID
const& planeid)
const;
4818 (
const TVector3& worldLoc, geo::PlaneID
const& planeid)
const
4821 unsigned int const PlaneNo,
4822 unsigned int const TPCNo = 0,
4823 unsigned int const cstat = 0)
const
4824 {
return NearestChannel(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4826 unsigned int const PlaneNo,
4827 unsigned int const TPCNo = 0,
4828 unsigned int const cstat = 0)
const
4829 {
return NearestChannel(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4831 unsigned int const PlaneNo,
4832 unsigned int const TPCNo = 0,
4833 unsigned int const cstat = 0)
const
4834 {
return NearestChannel(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4836 unsigned int const PlaneNo,
4837 unsigned int const TPCNo = 0,
4838 unsigned int const cstat = 0)
const
4839 {
return NearestChannel(worldLoc, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
4855 bool ChannelsIntersect
4880 {
return NTPCsets(tpcsetid); }
4884 unsigned int MaxTPCsets()
const;
4907 template <
typename T>
4909 {
return { Ncryostats(), MaxTPCsets() }; }
4925 template <
typename T>
4927 {
return { Ncryostats(), MaxTPCsets(), defValue }; }
4939 {
return HasTPCset(tpcsetid); }
4965 std::vector<geo::TPCID> TPCsetToTPCs
4975 { GetBeginID(
id.asCryostatID());
id.TPCset = 0; }
4979 { GetEndID(
id.asCryostatID());
id.TPCset = 0; }
4987 {
return { id, 0 }; }
5080 {
return NROPs(ropid); }
5084 unsigned int MaxROPs()
const;
5108 template <
typename T>
5110 {
return { Ncryostats(), MaxTPCsets(), MaxROPs() }; }
5126 template <
typename T>
5128 {
return { Ncryostats(), MaxTPCsets(), MaxROPs(), defValue }; }
5156 readout::ROPID WirePlaneToROP(geo::PlaneID
const& planeid)
const;
5168 std::vector<geo::PlaneID> ROPtoWirePlanes
5181 std::vector<geo::TPCID> ROPtoTPCs(
readout::ROPID const& ropid)
const;
5202 { GetBeginID(
id.asTPCsetID());
id.ROP = 0; }
5206 { GetEndID(
id.asTPCsetID());
id.ROP = 0; }
5214 {
return { GetBeginTPCsetID(
id), 0 }; }
5219 {
return { GetEndTPCsetID(
id), 0 }; }
5223 {
return { id, 0 }; }
5228 {
return { GetNextID(
id), 0 }; }
5373 unsigned int NOpChannels()
const;
5376 unsigned int MaxOpChannel()
const;
5379 unsigned int NOpHardwareChannels(
int opDet)
const;
5387 bool IsValidOpChannel(
int opChannel)
const;
5390 unsigned int OpChannel(
int detNum,
int hardwareChannel)
const;
5396 unsigned int HardwareChannelFromOpChannel(
int opChannel)
const;
5399 unsigned int OpDetFromCryo(
unsigned int o,
unsigned int c)
const;
5421 bool ValueInRange(
double value,
double min,
double max)
const;
5451 void LoadGeometryFile(
5452 std::string gdmlfile, std::string rootfile,
5454 bool bForceReload =
false
5468 void LoadGeometryFile
5469 (std::string gdmlfile, std::string rootfile,
bool bForceReload =
false);
5482 void ApplyChannelMap(std::unique_ptr<geo::ChannelMapAlg> pChannelMap);
5492 {
return fChannelMapAlg.get(); }
5528 std::vector<TGeoNode const*> FindDetectorEnclosure
5529 (std::string
const&
name =
"volDetEnclosure")
const;
5531 bool FindFirstVolume
5532 (std::string
const&
name, std::vector<const TGeoNode*>&
path)
const;
5539 bool WireIDIntersectionCheck
5543 static bool PointWithinSegments(
5544 double A_start_x,
double A_start_y,
double A_end_x,
double A_end_y,
5545 double B_start_x,
double B_start_y,
double B_end_x,
double B_end_y,
5553 void UpdateAfterSorting();
5556 void ClearGeometry();
5560 static void CheckIndependentPlanesOnSameTPC
5561 (geo::PlaneID
const& pid1, geo::PlaneID
const& pid2,
const char* caller);
5593 {
init(start_node); }
5603 std::vector<TGeoNode const*>
get_path()
const;
5618 void init(TGeoNode
const* start_node);
5639 unsigned int const nTPCsInCryo = NTPC(
id);
5640 if (++
id.
TPC < nTPCsInCryo)
return bool(
id);
5643 return IncrementID(
id.asCryostatID());
5649 unsigned int const nPlanesInTPC = Nplanes(
id);
5650 if (++
id.
Plane < nPlanesInTPC)
return bool(
id);
5653 return IncrementID(
id.asTPCID());
5659 unsigned int const nWiresInPlane = Nwires(
id);
5660 if (++
id.Wire < nWiresInPlane)
return bool(
id);
5663 return IncrementID(
id.asPlaneID());
5667 unsigned int const nTPCsetsInCryo = NTPCsets(
id);
5668 if (++
id.TPCset < nTPCsetsInCryo)
5672 return IncrementID(
id.asCryostatID());
5678 unsigned int const nROPinTPC = NROPs(
id);
5679 if (++
id.ROP < nROPinTPC)
return bool(
id);
5682 return IncrementID(
id.asTPCsetID());
5691 template <
typename Po
int>
5701 template <
typename Stream>
5706 out <<
"Detector " << DetectorName() <<
" has "
5707 << Ncryostats() <<
" cryostats and "
5708 << NAuxDets() <<
" auxiliary detectors:";
5710 auto const& detEnclosureBox = DetectorEnclosureBox();
5711 out <<
"\n" << indent <<
"Detector enclosure: "
5712 << detEnclosureBox.Min() <<
" -- " << detEnclosureBox.Max()
5713 <<
" cm => ( " << detEnclosureBox.SizeX() <<
" x "
5714 << detEnclosureBox.SizeY() <<
" x "
5715 << detEnclosureBox.SizeZ() <<
" ) cm^3"
5719 out <<
"\n" << indent;
5720 cryostat.PrintCryostatInfo
5721 (std::forward<Stream>(out), indent +
" ", cryostat.MaxVerbosity);
5723 const unsigned int nTPCs = cryostat.NTPC();
5724 for(
unsigned int t = 0; t < nTPCs; ++t) {
5727 out <<
"\n" << indent <<
" ";
5729 (std::forward<Stream>(out), indent +
" ", tpc.
MaxVerbosity);
5731 const unsigned int nPlanes = tpc.
Nplanes();
5732 for(
unsigned int p = 0; p < nPlanes; ++
p) {
5734 const unsigned int nWires = plane.
Nwires();
5736 out <<
"\n" << indent <<
" ";
5738 (std::forward<Stream>(out), indent +
" ", plane.
MaxVerbosity);
5740 out <<
"\n" << indent <<
" "
5742 <<
" (" <<
static_cast<int>(sigType) <<
")";
5744 for(
unsigned int w = 0;
w < nWires; ++
w) {
5750 out <<
"\n" << indent <<
" " << wireID <<
" ";
5752 (std::forward<Stream>(out), indent +
" ", wire.
MaxVerbosity);
5757 unsigned int nOpDets = cryostat.NOpDet();
5758 for (
unsigned int iOpDet = 0; iOpDet < nOpDets; ++iOpDet) {
5760 out <<
"\n" << indent <<
" [OpDet #" << iOpDet <<
"] ";
5762 (std::forward<Stream>(out), indent +
" ", opDet.
MaxVerbosity);
5766 unsigned int const nAuxDets = NAuxDets();
5767 for (
unsigned int iDet = 0; iDet < nAuxDets; ++iDet) {
5770 out <<
"\n" << indent <<
"[#" << iDet <<
"] ";
5772 (std::forward<Stream>(out), indent +
" ", auxDet.
MaxVerbosity);
5775 switch (nSensitive) {
5779 out <<
"\n" << indent <<
" ";
5781 (std::forward<Stream>(out), indent +
" ", auxDetS.
MaxVerbosity);
5785 for (
unsigned int iSens = 0; iSens < nSensitive; ++iSens) {
5786 out <<
"\n" << indent <<
"[#" << iSens <<
"] ";
5790 (std::forward<Stream>(out), indent +
" ", auxDetS.
MaxVerbosity);
5807 inline geo::TPCID GeometryCore::GetBeginID<geo::TPCID, geo::CryostatID>
5808 (geo::CryostatID
const& id)
const
5809 {
return GetBeginTPCID(
id); }
5812 inline geo::TPCID GeometryCore::GetEndID<geo::TPCID, geo::CryostatID>
5813 (geo::CryostatID
const& id)
const
5814 {
return GetEndTPCID(
id); }
5817 inline geo::PlaneID GeometryCore::GetBeginID<geo::PlaneID, geo::CryostatID>
5818 (geo::CryostatID
const& id)
const
5819 {
return GetBeginPlaneID(
id); }
5822 inline geo::PlaneID GeometryCore::GetEndID<geo::PlaneID, geo::CryostatID>
5823 (geo::CryostatID
const& id)
const
5824 {
return GetEndPlaneID(
id); }
5832 template <
typename GEOID>
5836 template <
typename GEOID>
5841 template <
typename GEOID>
5845 template <
typename GEOID>
5849 template <
typename GEOID>
5853 template <
typename GEOID>
5855 if (at_end())
return;
5856 if (++local_index() < limit)
return;
5857 localID().isValid =
false;
5864 template <
typename GEOID>
5871 template <
typename GEOID>
5876 template <
typename GEOID>
5882 template <
typename GEOID>
5885 if (upper_iterator::at_end())
return;
5888 if (++local_index() < limit)
return;
5892 upper_iterator::next();
5904 template <
typename GEOID>
5911 template <
typename GEOID>
5916 template <
typename GEOID>
5922 template <
typename GEOID>
5925 if (upper_iterator::at_end())
return;
5928 if (++local_index() < limit)
return;
5932 upper_iterator::next();
5944 template <
typename GEOID>
5950 template <
typename GEOID>
5955 template <
typename GEOID>
5961 template <
typename GEOID>
5964 if (upper_iterator::at_end())
return;
5967 if (++local_index() < limit)
return;
5971 upper_iterator::next();
5983 template <
typename GEOIDITER>
5984 bool geo::details::operator==
5987 return iter.id_iterator() == id_iter;
5990 template <
typename GEOIDITER>
5991 bool geo::details::operator!=
5994 return iter.id_iterator() != id_iter;
6001 template <
typename GEOID>
6008 template <
typename GEOID>
6014 template <
typename GEOID>
6017 if (upper_iterator::at_end())
return;
6020 if (++local_index() < limit)
return;
6024 upper_iterator::next();
6036 template <
typename GEOID>
6043 template <
typename GEOID>
6049 template <
typename GEOID>
6052 if (upper_iterator::at_end())
return;
6055 if (++local_index() < limit)
return;
6059 upper_iterator::next();
6071 #endif // LARCOREALG_GEOMETRY_GEOMETRYCORE_H
pointer operator->() const
Returns the TPCID the iterator points to.
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.
TPC_id_iterator_base< GEOID > upper_iterator
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.
process_name opflash particleana ie ie ie z
geo::WireGeo const * ElementPtr_t
GeoID GetEndID() const
Returns the (possibly invalid) ID after the last subelement of the detector.
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.
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.
reference operator*() const
Returns the PlaneID the iterator points to.
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
cryostat_id_iterator_base(geo::GeometryCore const *geom)
Constructor: points to begin.
readout::ROPID GetEndROPID(geo::CryostatID const &id) const
iterator & operator++()
Prefix increment: returns this iterator pointing to the next TPC set.
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.
TGeoNode const * operator*() const
Returns the pointer to the current node, or nullptr if none.
CryostatGeo const & GetElement(geo::CryostatID const &cryoid) const
reference operator*() const
Returns the geometry element the iterator points to.
ID_t limit
maximum number of cryostats
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.
BEGIN_PROLOG true icarus_rawdigitfilter FilterTools FilterPlane1 Plane
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
static constexpr TPCID_t InvalidID
Special code for an invalid ID.
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.
ID_t limit
maximum number of TPCs in the current cryostat
An object with a begin and end iterator.
bool HasElement(geo::PlaneID const &planeid) const
double Length_t
Type used for coordinates and distances. They are measured in centimeters.
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.
ROOTGeoNodeForwardIterator & operator++()
Points to the next node, or to nullptr if there are no more.
const geo::GeometryCore * geometry
process_name opflash particleana ie x
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
typename upper_iterator::GeoID_t GeoID_t
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.
reference operator*() const
Returns the WireID the iterator points to.
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
bool operator!=(cryostat_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to different cryostats.
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.
unsigned int ROPID_t
Type for the ID number.
IDparameter< readout::ROPID > ROPID
Member type of validated readout::ROPID parameter.
Container with one element per readout plane.
LocalID_t & localID()
Returns the type of ID we act on (non-const version).
reference operator*() const
Returns the TPCsetID the iterator points to.
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
geometry_element_iterator< id_iterator_t > iterator
this type
bool operator==(TPC_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to the same TPC.
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.
bool operator!=(plane_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to different planes.
readout::ROPDataContainer< T > makeROPdata() const
Returns a container with one entry per readout plane.
unsigned short TPCsetID_t
Type for the ID number.
Simple data structure holding the data of the geometry.
unsigned int PlaneID_t
Type for the ID number.
cryostat_id_iterator_base< GEOID > upper_iterator
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.
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.
geo::TPCID LocalID_t
type of the ID we change
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.
readout::ROPID LocalID_t
type of the ID we change
typename upper_iterator::GeoID_t GeoID_t
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
static constexpr WireID_t InvalidID
Special code for an invalid ID.
bool operator!=(iterator const &as) const
Returns true if the two iterators point to different objects.
void next()
Skips to the next TPC.
WireID_t Wire
Index of the wire within its plane.
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::Length_t CryostatLength(unsigned int cstat=0) const
LocalID_t & localID()
Returns the type of ID we act on (non-const version)
bool operator!=(ROP_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to different readout planes.
TPCset_id_iterator begin_TPCset_id(geo::CryostatID const &cid) const
Container with one element per geometry wire plane.
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
bool operator!=(TPC_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to different TPCs.
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.
bool operator==(cryostat_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to the same cryostat.
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
wire_id_iterator_base(geo::GeometryCore const *geom, BeginPos_t const)
Constructor: points to begin.
std::string ROOTFile() const
Returns the full directory path to the geometry file source.
bool operator==(TPCset_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to the same TPC set.
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
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
reference operator*() const
Returns the PlaneID the iterator points to.
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.
IDparameter< geo::PlaneID > PlaneID
Member type of validated geo::PlaneID parameter.
static constexpr TPCsetID_t InvalidID
Special code for an invalid ID.
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.
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 caloskimCalorimetryCryoE physics caloskimCalorimetryCryoW physics path
std::enable_if_t< std::is_base_of_v< geometry_iterator_base, GEOIT >, std::ostream & > operator<<(std::ostream &out, GEOIT const &it)
Stream output for all geometry ID iterator types: prints the pointed ID.
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.
bool operator==(plane_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to the same plane.
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.
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.
pointer operator->() const
Returns a pointer to the ID the iterator points to.
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.
plane_id_iterator_base< GEOID > upper_iterator
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.
process_name opflash particleana ie ie y
ROPID_t ROP
Index of the readout plane within its TPC set.
bool operator==(iterator const &as) const
Returns true if the two iterators point to the same object.
GeometryData_t::CryostatList_t CryostatList_t
Type of list of cryostats.
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!
bool operator==(ROP_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to the same readout plane.
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.
Definitions of geometry vector data types.
ElementPtr_t get() const
Returns a pointer to plane, or nullptr if invalid.
plane_iterator begin_plane(geo::CryostatID const &ID) const
bool operator!=(wire_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to different wires.
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.
iterator & operator++()
Prefix increment: returns this iterator pointing to the next cryostat.
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.
std::tuple< double, double, const reco::ClusterHit3D * > Point
Definitions used by the VoronoiDiagram algorithm.
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.
ID_t limit
maximum number of TPC sets in the current cryostat.
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.
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().
cryostat_id_iterator_base< GEOID > upper_iterator
void PrintOpDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=0) const
Prints information about this optical detector.
reference operator*() const
Returns the ID the iterator points to.
TPCset_id_iterator begin_TPCset_id() const
Returns an iterator pointing to the first TPC set ID in the detector.
Utilities to extend the interface of geometry vectors.
wire_id_iterator_base()
Default constructor; effect not defined: assign to it before using!
typename std::enable_if< B, T >::type enable_if_t
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.
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.
geo::CryostatID LocalID_t
type of the ID we change
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.
bool operator!=(TPCset_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to different TPC sets.
pointer operator->() const
Returns the PlaneID the iterator points to.
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.
reference operator*() const
Returns the TPCID the iterator points to.
geo::WireID NearestWireID(geo::Point_t const &point, unsigned int const PlaneNo, unsigned int const TPCNo=0, unsigned int const cstat=0) const
BEGIN_PROLOG supported so Material
The data type to uniquely identify a TPC.
PlaneID_t Plane
Index of the plane within its TPC.
Description of geometry of one entire detector.
bool operator==(wire_id_iterator_base< OTHERID > const &as) const
Returns true if the two iterators point to the same wire.
plane_iterator end_plane(geo::CryostatID const &ID) const
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.
iterator & operator++()
Prefix increment: returns this iterator pointing to the next TPC.
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.
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.
ID_t limit
maximum number of planes in the current TPC
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.
TPCsetID_t TPCset
Index of the TPC set within its cryostat.
readout::TPCsetID LocalID_t
Type of the ID we change.
std::vector< TGeoNode const * > get_path() const
Returns the full path of the current node.
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.
Encapsulate the geometry of an auxiliary detector.
LocalID_t const & localID() const
Returns the type of ID we act on.
typename upper_iterator::GeoID_t GeoID_t
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
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.
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
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.
ID_t limit
Maximum number of readout planes in the current TPC set.
size_t OpDetFromOpChannel(size_t opch)
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
iterator & operator++()
Prefix increment: returns this iterator pointing to the next element.
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 TPCID_t
Type for the ID number.
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.
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.
GeometryCore const * pGeo
pointer to the geometry
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.
size_t NOpDets(int cryostat)
geo::ChannelMapAlg const * ChannelMap() const
Returns the object handling the channel map.
iterator & operator++()
Prefix increment: returns this iterator pointing to the next plane.
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
ID_t limit
maximum number of wires in the current plane
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
void init(TGeoNode const *start_node)
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).
iterator & operator++()
Prefix increment: returns this iterator pointing to the next plane.
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.
geometry_element_iterator()=default
Default constructor; effect not defined: assign to it before using!
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().
geo::PlaneGeo const * ElementPtr_t
TPCset_id_iterator_base< GEOID > upper_iterator
unsigned int WireID_t
Type for the ID number.
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
ROP_id_iterator_base()=default
Default constructor; effect not defined: assign to it before using!
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()
static constexpr CryostatID_t InvalidID
Special code for an invalid ID.
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.
Interface to algorithm class for a specific detector channel mapping.
Data in the geometry description.
static constexpr PlaneID_t InvalidID
Special code for an invalid ID.
wire_id_iterator_base(geo::GeometryCore const *geom)
Constructor: points to begin.
geo::TPCGeo const * ElementPtr_t
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.
TPCID_t TPC
Index of the TPC within its cryostat.
TPCset_id_iterator end_TPCset_id(geo::CryostatID const &cid) const
Segment< DefaultPoint_t > WireEndPoints(geo::WireID const &wireID) const
GeoID GetNextID(GeoID const &id) const
Returns the ID next to the specified one.
geo::PlaneID LocalID_t
type of the ID we change
std::ptrdiff_t difference_type
Containers to hold one datum per TPC set or readout plane.
Forward iterator browsing all geometry elements in the detector.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
static constexpr unsigned int MaxVerbosity
Maximum value for print verbosity.
void reach_deepest_descendant()
unsigned int NSiblingElements(readout::ROPID const &ropid) const
GENVECTOR_CONSTEXPR::geo::Point_t makePointFromCoords(Coords &&coords)
Creates a geo::Point_t from its coordinates (see makeFromCoords()).
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.
fhicl::ParameterSet fBuilderParameters
geometry_element_iterator(geo::GeometryCore const *geom)
Constructor: points to begin.
static constexpr ROPID_t InvalidID
Special code for an invalid ID.
Base forward iterator browsing all TPC set IDs in the detector.
pointer operator->() const
Returns the TPCsetID the iterator points to.
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.
geo::WireID LocalID_t
type of the ID we change
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.
iterator & operator++()
Prefix increment: returns this iterator pointing to the next wire.
std::ptrdiff_t difference_type
typename id_iterator_t::ElementPtr_t ElementPtr_t
physics associatedGroupsWithLeft p1
void PrintAuxDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this auxiliary detector.
pointer operator->() const
Returns the WireID the iterator points to.
pointer operator->() const
Returns a pointer to the element the iterator points to (or nullptr)
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.
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.
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.
pointer operator->() const
Returns the PlaneID the iterator points to.
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.