LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Classes describing partition of cryostat volume. More...
#include "larcorealg/Geometry/DriftPartitions.h"
#include "larcorealg/CoreUtils/DumpUtils.h"
#include "larcorealg/CoreUtils/RealComparisons.h"
#include "larcorealg/Geometry/CryostatGeo.h"
#include "larcorealg/Geometry/Decomposer.h"
#include "larcorealg/Geometry/PlaneGeo.h"
#include "larcorealg/Geometry/TPCGeo.h"
#include "cetlib_except/exception.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iterator>
#include <memory>
#include <type_traits>
#include <utility>
#include <vector>
Go to the source code of this file.
Classes | |
struct | TPCgroup_t |
struct | TPCwithArea_t |
struct | SorterByKey< Key, ExtractKey, Comparer > |
Typedefs | |
using | TPCandPos_t = std::pair< double, geo::TPCGeo const * > |
template<geo::part::AreaOwner::AreaRangeMember_t Range> | |
using | SortTPCareaByAreaRangeLower = SorterByKey< double, geo::part::details::RangeLowerBoundExtractor< Range >> |
using | SortTPCwithAreaByWidth = SortTPCareaByAreaRangeLower<&geo::part::AreaOwner::Area_t::width > |
using | SortTPCwithAreaByDepth = SortTPCareaByAreaRangeLower<&geo::part::AreaOwner::Area_t::depth > |
Functions | |
std::vector< std::pair< geo::DriftPartitions::DriftDir_t, std::vector< geo::TPCGeo const * > > > | groupTPCsByDriftDir (geo::CryostatGeo const &cryo) |
std::vector< TPCandPos_t > | sortTPCsByDriftCoord (std::vector< geo::TPCGeo const * > const &TPCs, geo::DriftPartitions::Decomposer_t const &decomp) |
std::vector< TPCgroup_t > | groupByDriftCoordinate (std::vector< TPCandPos_t > const &TPCs) |
unsigned int | checkTPCcoords (std::vector< geo::TPCGeo const * > const &TPCs) |
template<typename Range > | |
geo::DriftPartitions::DriftDir_t | detectGlobalDriftDir (Range &&directions) |
geo::part::AreaOwner::Area_t | TPCarea (geo::TPCGeo const &TPC, geo::DriftPartitions::Decomposer_t const &decomposer) |
std::vector< TPCwithArea_t > | addAreaToTPCs (std::vector< geo::TPCGeo const * > const &TPCs, geo::DriftPartitions::Decomposer_t const &decomposer) |
template<typename BeginIter , typename EndIter > | |
geo::part::AreaOwner::Area_t | computeTotalArea (BeginIter TPCbegin, EndIter TPCend) |
template<geo::part::AreaOwner::AreaRangeMember_t sortingRange, typename BeginIter , typename EndIter > | |
std::vector< std::vector< TPCwithArea_t const * >::const_iterator > | groupTPCsByRangeCoord (BeginIter beginTPCwithArea, EndIter endTPCwithArea) |
template<geo::part::AreaOwner::AreaRangeMember_t sortingRange, typename BeginIter , typename EndIter > | |
std::pair< std::vector< TPCwithArea_t const * >, std::vector< std::vector< TPCwithArea_t const * >::const_iterator > > | sortAndGroupTPCsByRangeCoord (BeginIter beginTPCwithArea, EndIter endTPCwithArea) |
template<typename BeginIter , typename EndIter , typename TPCendIter , typename SubpartMaker > | |
geo::part::Partition< geo::TPCGeo const >::Subpartitions_t | createSubpartitions (BeginIter itTPCbegin, EndIter itTPCend, TPCendIter TPCend, SubpartMaker subpartMaker) |
auto | makeTPCPartitionElement (TPCwithArea_t const &TPCinfo) |
template<typename BeginIter , typename EndIter > | |
std::unique_ptr< geo::part::Partition< geo::TPCGeo const > > | makeWidthPartition (BeginIter beginTPCwithArea, EndIter endTPCwithArea) |
template<typename BeginIter , typename EndIter > | |
std::unique_ptr< geo::part::Partition< geo::TPCGeo const > > | makeDepthPartition (BeginIter beginTPCwithArea, EndIter endTPCwithArea) |
template<typename BeginIter , typename EndIter > | |
std::unique_ptr< geo::part::Partition< geo::TPCGeo const > > | makeGridPartition (BeginIter beginTPCwithArea, EndIter endTPCwithArea) |
template<typename BeginIter , typename EndIter > | |
std::unique_ptr< geo::part::Partition< geo::TPCGeo const > > | makePartition (BeginIter beginTPCwithArea, EndIter endTPCwithArea) |
template<typename TPCPartitionResultType , geo::part::AreaOwner::AreaRangeMember_t Range, typename BeginIter , typename EndIter , typename SubpartMaker > | |
std::unique_ptr< geo::part::Partition< geo::TPCGeo const > > | makeSortedPartition (BeginIter beginTPCwithArea, EndIter endTPCwithArea, SubpartMaker subpartMaker) |
template<typename BeginIter , typename EndIter > | |
auto | makeCPointerVector (BeginIter b, EndIter e) |
template<typename T > | |
auto | makeCPointerVector (std::vector< T > const &v) |
std::unique_ptr< geo::DriftPartitions::TPCPartition_t > | makePartition (std::vector< TPCwithArea_t > const &TPCs) |
Classes describing partition of cryostat volume.
Definition in file DriftPartitions.cxx.
using SortTPCareaByAreaRangeLower = SorterByKey<double, geo::part::details::RangeLowerBoundExtractor<Range>> |
Definition at line 457 of file DriftPartitions.cxx.
Definition at line 460 of file DriftPartitions.cxx.
Definition at line 459 of file DriftPartitions.cxx.
using TPCandPos_t = std::pair<double, geo::TPCGeo const*> |
Definition at line 147 of file DriftPartitions.cxx.
std::vector<TPCwithArea_t> addAreaToTPCs | ( | std::vector< geo::TPCGeo const * > const & | TPCs, |
geo::DriftPartitions::Decomposer_t const & | decomposer | ||
) |
Definition at line 397 of file DriftPartitions.cxx.
References TPCarea().
Referenced by geo::buildDriftVolumes().
unsigned int checkTPCcoords | ( | std::vector< geo::TPCGeo const * > const & | TPCs | ) |
Definition at line 282 of file DriftPartitions.cxx.
References geo::vect::dot(), geo::DriftPartitions::driftCoord(), geo::TPCGeo::DriftDir(), e, geo::TPCGeo::ID(), lar::util::makeVector3DComparison(), lar::util::RealComparisons< RealType >::nonEqual(), and lar::dump::vector3D().
Referenced by geo::buildDriftVolumes().
geo::part::AreaOwner::Area_t computeTotalArea | ( | BeginIter | TPCbegin, |
EndIter | TPCend | ||
) |
Definition at line 414 of file DriftPartitions.cxx.
References lar::util::simple_geo::Rectangle< Data >::extendToInclude().
Referenced by makeSortedPartition().
geo::part::Partition<geo::TPCGeo const>::Subpartitions_t createSubpartitions | ( | BeginIter | itTPCbegin, |
EndIter | itTPCend, | ||
TPCendIter | TPCend, | ||
SubpartMaker | subpartMaker | ||
) |
Definition at line 547 of file DriftPartitions.cxx.
References makeTPCPartitionElement().
Referenced by makeSortedPartition().
geo::DriftPartitions::DriftDir_t detectGlobalDriftDir | ( | Range && | directions | ) |
Definition at line 335 of file DriftPartitions.cxx.
References util::abs(), util::cbegin(), util::cend(), dir, geo::vect::dot(), e, lar::util::RealComparisons< RealType >::equal(), and lar::dump::vector3D().
Referenced by geo::buildDriftVolumes().
std::vector<TPCgroup_t> groupByDriftCoordinate | ( | std::vector< TPCandPos_t > const & | TPCs | ) |
Definition at line 241 of file DriftPartitions.cxx.
References geo::TPCGeo::Nplanes(), and geo::TPCGeo::Plane0Pitch().
Referenced by geo::buildDriftVolumes().
std::vector<std::pair<geo::DriftPartitions::DriftDir_t, std::vector<geo::TPCGeo const*> > > groupTPCsByDriftDir | ( | geo::CryostatGeo const & | cryo | ) |
Definition at line 168 of file DriftPartitions.cxx.
References geo::TPCGeo::DriftDir(), e, lar::util::makeVector3DComparison(), geo::CryostatGeo::NTPC(), geo::vect::rounded01(), lar::util::RealComparisons< RealType >::threshold, and geo::CryostatGeo::TPC().
Referenced by geo::buildDriftVolumes().
std::vector<std::vector<TPCwithArea_t const*>::const_iterator> groupTPCsByRangeCoord | ( | BeginIter | beginTPCwithArea, |
EndIter | endTPCwithArea | ||
) |
Definition at line 466 of file DriftPartitions.cxx.
References lar::util::RealComparisons< RealType >::nonSmaller().
auto makeCPointerVector | ( | BeginIter | b, |
EndIter | e | ||
) |
Definition at line 1001 of file DriftPartitions.cxx.
Referenced by makeCPointerVector(), and makePartition().
auto makeCPointerVector | ( | std::vector< T > const & | v | ) |
Definition at line 1011 of file DriftPartitions.cxx.
References makeCPointerVector().
std::unique_ptr< geo::part::Partition< geo::TPCGeo const > > makeDepthPartition | ( | BeginIter | beginTPCwithArea, |
EndIter | endTPCwithArea | ||
) |
Definition at line 698 of file DriftPartitions.cxx.
References lar::util::simple_geo::Rectangle< double >::depth.
Referenced by makePartition(), and makeTPCPartitionElement().
std::unique_ptr< geo::part::Partition< geo::TPCGeo const > > makeGridPartition | ( | BeginIter | beginTPCwithArea, |
EndIter | endTPCwithArea | ||
) |
Definition at line 709 of file DriftPartitions.cxx.
References if(), makePartition(), lar::util::RealComparisons< RealType >::nonSmaller(), part, r, lar::util::RealComparisons< RealType >::strictlyGreater(), and lar::util::RealComparisons< RealType >::strictlySmaller().
Referenced by makePartition(), and makeTPCPartitionElement().
std::unique_ptr< geo::part::Partition< geo::TPCGeo const > > makePartition | ( | BeginIter | beginTPCwithArea, |
EndIter | endTPCwithArea | ||
) |
Definition at line 935 of file DriftPartitions.cxx.
References makeDepthPartition(), makeGridPartition(), makeTPCPartitionElement(), makeWidthPartition(), and util::size().
Referenced by geo::buildDriftVolumes(), makeGridPartition(), makePartition(), and makeTPCPartitionElement().
std::unique_ptr<geo::DriftPartitions::TPCPartition_t> makePartition | ( | std::vector< TPCwithArea_t > const & | TPCs | ) |
Definition at line 1017 of file DriftPartitions.cxx.
References util::cbegin(), util::cend(), makeCPointerVector(), and makePartition().
std::unique_ptr<geo::part::Partition<geo::TPCGeo const> > makeSortedPartition | ( | BeginIter | beginTPCwithArea, |
EndIter | endTPCwithArea, | ||
SubpartMaker | subpartMaker | ||
) |
Definition at line 633 of file DriftPartitions.cxx.
References computeTotalArea(), and createSubpartitions().
auto makeTPCPartitionElement | ( | TPCwithArea_t const & | TPCinfo | ) |
Definition at line 602 of file DriftPartitions.cxx.
References geo::part::AreaOwner::area(), makeDepthPartition(), makeGridPartition(), makePartition(), makeWidthPartition(), and TPCwithArea_t::TPC.
Referenced by createSubpartitions(), and makePartition().
std::unique_ptr< geo::part::Partition< geo::TPCGeo const > > makeWidthPartition | ( | BeginIter | beginTPCwithArea, |
EndIter | endTPCwithArea | ||
) |
Definition at line 688 of file DriftPartitions.cxx.
References lar::util::simple_geo::Rectangle< double >::width.
Referenced by makePartition(), and makeTPCPartitionElement().
std::pair<std::vector<TPCwithArea_t const*>, std::vector<std::vector<TPCwithArea_t const*>::const_iterator> > sortAndGroupTPCsByRangeCoord | ( | BeginIter | beginTPCwithArea, |
EndIter | endTPCwithArea | ||
) |
Definition at line 525 of file DriftPartitions.cxx.
std::vector<TPCandPos_t> sortTPCsByDriftCoord | ( | std::vector< geo::TPCGeo const * > const & | TPCs, |
geo::DriftPartitions::Decomposer_t const & | decomp | ||
) |
Definition at line 208 of file DriftPartitions.cxx.
References geo::DriftPartitions::driftCoord(), and geo::Decomposer< Vector, Point, ProjVector >::PointNormalComponent().
Referenced by geo::buildDriftVolumes().
geo::part::AreaOwner::Area_t TPCarea | ( | geo::TPCGeo const & | TPC, |
geo::DriftPartitions::Decomposer_t const & | decomposer | ||
) |
Definition at line 378 of file DriftPartitions.cxx.
References geo::BoxBoundedGeo::MaxX(), geo::BoxBoundedGeo::MaxY(), geo::BoxBoundedGeo::MaxZ(), geo::BoxBoundedGeo::MinX(), geo::BoxBoundedGeo::MinY(), geo::BoxBoundedGeo::MinZ(), and geo::Decomposer< Vector, Point, ProjVector >::ProjectPointOnPlane().
Referenced by addAreaToTPCs().