LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Photon mapping transformation with reflection at x = 0. More...
#include "PhotonMappingXMirrorTransformations.h"
Classes | |
struct | Config |
Public Types | |
using | Parameters = art::ToolConfigTable< Config > |
using | OpDetID_t = int |
Type describing a optical detector ID. More... | |
using | LibraryIndex_t = OpDetID_t |
Type describing a library index. FIXME former LibraryOpDetID_t. More... | |
using | LibraryIndexToOpDetMap = std::vector< OpDetID_t > |
Type describing the mapping of optical detectors into library indices. More... | |
using | OpDetToLibraryIndexMap = std::vector< LibraryIndex_t > |
Type describing the mapping of library indices into optical detectors. More... | |
template<typename LibDataColl > | |
using | MappedOpDetData_t = phot::OpDetVisibilityData< util::collection_reference_t< LibDataColl >, util::collection_reference_t< OpDetToLibraryIndexMap const >> |
Type of optical detector data collection. More... | |
Public Member Functions | |
PhotonMappingXMirrorTransformations (Parameters const &config) | |
PhotonMappingXMirrorTransformations (Config const &config) | |
virtual geo::Point_t | detectorToLibrary (geo::Point_t const &location) const override |
Returns the representation within the library of a detector location. More... | |
template<typename Coll > | |
auto | applyOpDetMapping (OpDetToLibraryIndexMap const &opDetToLibraryMap, Coll &&source, util::collection_value_t< Coll > defaultValue) const -> MappedOpDetData_t< Coll > |
Optical detector mapping interface | |
LibraryIndex_t | opDetToLibraryIndex (geo::Point_t const &location, OpDetID_t opDetID) const override |
Maps an optical detector with its library index. More... | |
OpDetID_t | libraryIndexToOpDet (geo::Point_t const &location, LibraryIndex_t libIndex) const override |
Maps a library index with an optical detector. More... | |
OpDetToLibraryIndexMap const & | opDetsToLibraryIndices (geo::Point_t const &location) const override |
Returns a map of library indices as function of optical detectors. More... | |
std::size_t | opDetMappingSize () const override |
Expected number of mappings of optical detector into library index. More... | |
LibraryIndexToOpDetMap const & | libraryIndicesToOpDets (geo::Point_t const &location) const override |
Returns a map of optical detectors identifiers, one for each library index. More... | |
std::size_t | libraryMappingSize (geo::Point_t const &location) const override |
Size of the mapping of library optical detectors. More... | |
Utility methods | |
template<typename Coll > | |
MappedOpDetData_t< Coll > | applyOpDetMapping (OpDetToLibraryIndexMap const &opDetToLibraryMap, Coll &&source, util::collection_value_t< Coll > defaultValue={}) const |
Remaps a collection indexed by library index into one indexed by optical detector IDs. More... | |
template<typename Coll > | |
auto | applyOpDetMapping (geo::Point_t const &location, Coll &&source, util::collection_value_t< Coll > defaultValue={}) const |
Remaps a collection indexed by library index into one indexed by optical detector IDs according to the mapping at location . More... | |
Static Public Attributes | |
static constexpr OpDetID_t | InvalidOpDetID = std::numeric_limits<OpDetID_t>::max() |
Value used to identify an invalid optical detector. More... | |
static constexpr LibraryIndex_t | InvalidLibraryIndex |
Value used for an invalid library index. More... | |
Protected Member Functions | |
LibraryIndexToOpDetMap | makeLibraryIndicesToOpDetsMap () const |
Return a trivial global optical detector identifier mapping. More... | |
OpDetToLibraryIndexMap | makeOpDetsToLibraryIndicesMap () const |
Return a trivial library index mapping. More... | |
Protected Attributes | |
geo::GeometryCore const * | fGeom = nullptr |
Detector geometry service provider. More... | |
OpDetToLibraryIndexMap | fOpDetsToLibraryIndicesMap |
Complete optical detector identifier mapping world-to-library. More... | |
LibraryIndexToOpDetMap | fLibraryIndicesToOpDetsMap |
Complete optical detector identifier mapping library-to-world. More... | |
Photon mapping transformation with reflection at x = 0.
This mapping describes an infinite planar mirror placed at .
Definition at line 30 of file PhotonMappingXMirrorTransformations.h.
|
inherited |
Type describing a library index. FIXME former LibraryOpDetID_t.
Definition at line 124 of file IPhotonMappingTransformations.h.
|
inherited |
Type describing the mapping of optical detectors into library indices.
This type of mapping allows querying data values by optical detector ID, fetching them from library data source.
This type guarantees:
operator[](OpDetID_t)
to fetch the library index associated to the specified optical detectorsize()
to report how many optical detectors are supported Definition at line 139 of file IPhotonMappingTransformations.h.
|
inherited |
Type of optical detector data collection.
LibDataColl | type of the original library data container |
This type behaves like a random access collection with as index the optical detector ID and as value the data corresponding to that optical detector.
Definition at line 170 of file IPhotonMappingTransformations.h.
|
inherited |
Type describing a optical detector ID.
Definition at line 121 of file IPhotonMappingTransformations.h.
|
inherited |
Type describing the mapping of library indices into optical detectors.
This type of mapping allows querying data values by library index, fetching them from an optical-detector-based data source.
This type guarantees:
operator[](LibraryIndex_t)
to access the optical detector ID of the specified library indexsize()
to report how many library optical detectors are supportedbool
, response to empty()
or to std::size()
to determine if the contained data is valid (actually, just response to phot::isValidLibraryData()
) Definition at line 157 of file IPhotonMappingTransformations.h.
Definition at line 42 of file PhotonMappingXMirrorTransformations.h.
|
inline |
Constructor: same configuration as phot::PhotonMappingIdentityTransformations
.
Definition at line 46 of file PhotonMappingXMirrorTransformations.h.
|
inline |
Constructor: same configuration as phot::PhotonMappingIdentityTransformations
.
Definition at line 52 of file PhotonMappingXMirrorTransformations.h.
|
inherited |
Remaps a collection indexed by library index into one indexed by optical detector IDs.
Coll | type of collection of data from the library, to be mapped |
opDetToLibraryMap | the mapping to be applied |
source | collection of library data to be mapped |
defaultValue | value returned for unmapped optical detector IDs |
This method returns a collection proxy that dynamically applies the specified mapping. The original data is not copied.
The format of the map (opDetMap
) is an object with a indexing operator where the index is the one in the destination collection (i.e. the optical detector ID) and the mapped value is the index in the source collection (the libary index). Each valid optical detector ID must be mapped. If the library index mapped to an optical detector is InvalidLibraryIndex
, that optical detector is not mapped anywhere and its entry in the mapped collection is assigned the value defaultValue
. Otherwise, the library index must be valid (which means, up to the result of libraryMappingSize()
applied to the location where opDetMap
is valid).
Referenced by phot::IPhotonMappingTransformations::applyOpDetMapping().
|
inlineinherited |
Remaps a collection indexed by library index into one indexed by optical detector IDs according to the mapping at location
.
Coll | type of collection of data from the library, to be mapped |
location | a world reference point to provide global context |
source | collection of library data to be mapped |
defaultValue | value returned for unmapped optical detector IDs |
applyOpDetMapping()
This method applies a mapping (see applyOpDetMapping(OpDetToLibraryIndexMap const&, Coll&&, util::collection_value_t<Coll>)
) that is obtained via libraryIndicesToOpDets()
.
Definition at line 391 of file IPhotonMappingTransformations.h.
References phot::IPhotonMappingTransformations::applyOpDetMapping(), and phot::IPhotonMappingTransformations::opDetsToLibraryIndices().
|
inherited |
Definition at line 410 of file IPhotonMappingTransformations.h.
References util::make_collection_reference(), n, and util::size().
|
inlineoverridevirtual |
Returns the representation within the library of a detector location.
location | position in world coordinates [cm] |
location
in the library spaceThe returned vector is the same as location
, but with the x component always positive..
No exception is ever thrown.
Reimplemented from phot::PhotonMappingIdentityTransformations.
Definition at line 67 of file PhotonMappingXMirrorTransformations.h.
References util::abs().
|
inlineoverridevirtualinherited |
Maps a library index with an optical detector.
location | world reference point _(unused)_ |
libIndex | the library index to be mapped |
geo::GeometryCore::OpDetGeoFromOpDet()
) The mapping is trivial: each library index has the same value as the ID of the optical detector it corresponds to.
Implements phot::IPhotonMappingTransformations.
Definition at line 119 of file PhotonMappingIdentityTransformations.h.
|
inlineoverridevirtualinherited |
Returns a map of optical detectors identifiers, one for each library index.
location | a world reference point _(unused)_ |
The mapping is trivial, as each library index has the same value as the ID of the optical detector it corresponds to. This mapping is global and does not depend on any location.
Implements phot::IPhotonMappingTransformations.
Definition at line 163 of file PhotonMappingIdentityTransformations.h.
|
inlineoverridevirtualinherited |
Size of the mapping of library optical detectors.
location | a world reference point _(unused)_ |
opDetsFromLibrary()
This is also the number of optical detectors.
Implements phot::IPhotonMappingTransformations.
Definition at line 177 of file PhotonMappingIdentityTransformations.h.
|
protectedinherited |
Return a trivial global optical detector identifier mapping.
Definition at line 18 of file PhotonMappingIdentityTransformations.cxx.
References phot::PhotonMappingIdentityTransformations::fGeom, and geo::GeometryCore::NOpDets().
|
protectedinherited |
Return a trivial library index mapping.
Definition at line 31 of file PhotonMappingIdentityTransformations.cxx.
References phot::PhotonMappingIdentityTransformations::fGeom, and geo::GeometryCore::NOpDets().
|
inlineoverridevirtualinherited |
Expected number of mappings of optical detector into library index.
opDetsToLibraryIndices()
This is effectively the number of available optical detectors, as well as the size of the mapping as returned by opDetsToLibraryIndices()
.
Implements phot::IPhotonMappingTransformations.
Definition at line 150 of file PhotonMappingIdentityTransformations.h.
|
inlineoverridevirtualinherited |
Returns a map of library indices as function of optical detectors.
location | world reference point _(unused)_ |
The mapping is trivial, as each library index has the same value as the ID of the optical detector it corresponds to. This mapping is global and does not depend on any location.
Implements phot::IPhotonMappingTransformations.
Definition at line 135 of file PhotonMappingIdentityTransformations.h.
|
inlineoverridevirtualinherited |
Maps an optical detector with its library index.
location | _(unused)_ world reference point |
opDetID | ID of the optical detector to be mapped (as used, e.g., in geo::GeometryCore::OpDetGeoFromOpDet() ) |
The mapping is trivial: each library index has the same value as the ID of the optical detector it corresponds to.
Implements phot::IPhotonMappingTransformations.
Definition at line 102 of file PhotonMappingIdentityTransformations.h.
|
protectedinherited |
Detector geometry service provider.
Definition at line 187 of file PhotonMappingIdentityTransformations.h.
Referenced by phot::PhotonMappingIdentityTransformations::makeLibraryIndicesToOpDetsMap(), and phot::PhotonMappingIdentityTransformations::makeOpDetsToLibraryIndicesMap().
|
protectedinherited |
Complete optical detector identifier mapping library-to-world.
Definition at line 193 of file PhotonMappingIdentityTransformations.h.
|
protectedinherited |
Complete optical detector identifier mapping world-to-library.
Definition at line 190 of file PhotonMappingIdentityTransformations.h.
|
staticinherited |
Value used for an invalid library index.
It may be used as value of the detector-to-library mapping.
Definition at line 186 of file IPhotonMappingTransformations.h.
|
staticinherited |
Value used to identify an invalid optical detector.
It may be used as value of the library-to-detector mapping.
Definition at line 179 of file IPhotonMappingTransformations.h.