6 namespace single_photon
15 tend = geometry->
end_TPC(cryo.ID());
17 std::vector<geo::BoxBoundedGeo> this_tpc_volumes;
18 while (iTPC != tend) {
23 paras.
fTPCVolumes.push_back(std::move(this_tpc_volumes));
27 for (
const std::vector<geo::BoxBoundedGeo> &tpcs: paras.
fTPCVolumes) {
28 paras.
s_tpc_active_XMin = std::min_element(tpcs.begin(), tpcs.end(), [](
auto &lhs,
auto &rhs) {
return lhs.MinX() < rhs.MinX(); })->MinX();
29 paras.
s_tpc_active_YMin = std::min_element(tpcs.begin(), tpcs.end(), [](
auto &lhs,
auto &rhs) {
return lhs.MinY() < rhs.MinY(); })->MinY();
30 paras.
s_tpc_active_ZMin = std::min_element(tpcs.begin(), tpcs.end(), [](
auto &lhs,
auto &rhs) {
return lhs.MinZ() < rhs.MinZ(); })->MinZ();
32 paras.
s_tpc_active_XMax = std::max_element(tpcs.begin(), tpcs.end(), [](
auto &lhs,
auto &rhs) {
return lhs.MaxX() < rhs.MaxX(); })->MaxX();
33 paras.
s_tpc_active_YMax = std::max_element(tpcs.begin(), tpcs.end(), [](
auto &lhs,
auto &rhs) {
return lhs.MaxY() < rhs.MaxY(); })->MaxY();
34 paras.
s_tpc_active_ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](
auto &lhs,
auto &rhs) {
return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ();
48 throw cet::exception(
"single_photon") <<
" The coordinate dimension is not 3!";
54 bool inside = is_x&&is_y&&is_z;
67 return ( (min_x<min_y) ? std::min(min_x,min_z) : std::min(min_y,min_z) );
74 double dx = std::min( fabs(vec[0] - (-0.45)) , fabs(vec[0] - 0.45));
Utilities related to art service access.
const geo::GeometryCore * geometry
Geometry information for a single TPC.
geo::BoxBoundedGeo const & ActiveBoundingBox() const
Returns the box of the active volume of this TPC.
TPC_iterator begin_TPC() const
Returns an iterator pointing to the first TPC in the detector.
void setTPCGeom(para_all ¶s)
int distToSCB(double &dist, std::vector< double > &vec, para_all ¶s)
double distToCPA(std::vector< double > &vec, para_all ¶s)
Description of geometry of one entire detector.
bool isInTPCActive(std::vector< double > &vec, para_all ¶s)
Provides a base class aware of world box coordinates.
IteratorBox< cryostat_iterator,&GeometryCore::begin_cryostat,&GeometryCore::end_cryostat > IterateCryostats() const
Enables ranged-for loops on all cryostats of the detector.
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
double distToTPCActive(std::vector< double > &vec, para_all ¶s)
Forward iterator browsing all geometry elements in the detector.
BEGIN_PROLOG could also be cout
TPC_iterator end_TPC() const
Returns an iterator pointing after the last TPC in the detector.
std::vector< std::vector< geo::BoxBoundedGeo > > fTPCVolumes