72 ::art::ServiceHandle<geo::Geometry>
const geo;
73 auto const clock_data = ::art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
74 auto const det_prop = ::art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataForJob(clock_data);
79 _pmt_v.resize(geo->NOpDets());
81 for (
size_t opdet = 0; opdet < geo->NOpDets(); opdet++) {
83 std::vector<double> pos(3, 0.);
84 geo->OpDetGeoFromOpDet(opdet).GetCenter(&pos[0]);
90 double global_x_min = 1e9, global_x_max = -1e9;
91 double global_y_min = 1e9, global_y_max = -1e9;
92 double global_z_min = 1e9, global_z_max = -1e9;
94 _bbox_map.reserve(geo->Ncryostats() * geo->NTPC());
96 for (
size_t cryo = 0; cryo < geo->Ncryostats(); cryo++) {
97 for (
size_t tpc = 0; tpc < geo->NTPC(cryo); tpc++) {
108 if (x_min < global_x_min) global_x_min = x_min;
109 if (x_max > global_x_max) global_x_max = x_max;
110 if (y_min < global_y_min) global_y_min = y_min;
111 if (y_max > global_y_max) global_y_max = y_max;
112 if (z_min < global_z_min) global_z_min = z_min;
113 if (z_max > global_z_max) global_z_max = z_max;
119 global_x_max, global_y_max, global_z_max);
std::unordered_map< std::pair< int, int >, geoalgo::AABox, boost::hash< std::pair< int, int > > > _bbox_map
A bbox map (cryo,tpc) -> bbox.
Geometry information for a single TPC.
Representation of a 3D rectangular box which sides are aligned w/ coordinate axis. A representation of an Axis-Aligned-Boundary-Box, a simple & popular representation of 3D boundary box for collision detection. The concept was taken from the reference, Real-Time-Collision-Detection (RTCD), and in particular Ch. 4.2 (page 77): .
double HalfLength() const
Length is associated with z coordinate [cm].
double HalfHeight() const
Height is associated with y coordinate [cm].
std::vector< geoalgo::Point_t > _pmt_v
double HalfWidth() const
Width is associated with x coordinate [cm].
Point GetCenter() const
Returns the center of the TPC volume in world coordinates [cm].