Trivial photon mapping transformation. More...
#include <PhotonMappingIdentityTransformations.h>
Classes | |
struct | Config |
Public Types | |
using | Parameters = art::ToolConfigTable< Config > |
Public Types inherited from phot::IPhotonMappingTransformations | |
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 | |
PhotonMappingIdentityTransformations (Config const &) | |
Constructor: ignores the configuration. More... | |
PhotonMappingIdentityTransformations (Parameters const &config) | |
Constructor: ignores the configuration. More... | |
Geometry mapping interface | |
virtual geo::Point_t | detectorToLibrary (geo::Point_t const &location) const override |
Returns the representation within the library of a detector location. More... | |
Optical detector mapping interface | |
virtual LibraryIndex_t | opDetToLibraryIndex (geo::Point_t const &location, OpDetID_t opDetID) const override |
Maps an optical detector with its library index. More... | |
virtual OpDetID_t | libraryIndexToOpDet (geo::Point_t const &location, LibraryIndex_t libIndex) const override |
Maps a library index with an optical detector. More... | |
virtual OpDetToLibraryIndexMap const & | opDetsToLibraryIndices (geo::Point_t const &location) const override |
Returns a map of library indices as function of optical detectors. More... | |
virtual std::size_t | opDetMappingSize () const override |
Expected number of mappings of optical detector into library index. More... | |
virtual LibraryIndexToOpDetMap const & | libraryIndicesToOpDets (geo::Point_t const &location) const override |
Returns a map of optical detectors identifiers, one for each library index. More... | |
virtual std::size_t | libraryMappingSize (geo::Point_t const &location) const override |
Size of the mapping of library optical detectors. More... | |
Public Member Functions inherited from phot::IPhotonMappingTransformations | |
virtual | ~IPhotonMappingTransformations ()=default |
template<typename Coll > | |
auto | applyOpDetMapping (OpDetToLibraryIndexMap const &opDetToLibraryMap, Coll &&source, util::collection_value_t< Coll > defaultValue) const -> MappedOpDetData_t< Coll > |
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... | |
Protected Member Functions | |
virtual LibraryIndexToOpDetMap | makeLibraryIndicesToOpDetsMap () const |
Return a trivial global optical detector identifier mapping. More... | |
virtual 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... | |
Additional Inherited Members | |
Static Public Attributes inherited from phot::IPhotonMappingTransformations | |
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 = std::numeric_limits<LibraryIndex_t>::max() |
Value used for an invalid library index. More... | |
Trivial photon mapping transformation.
This implementation of phot::IPhotonMappingTransformations
interface uses the identity mapping to have the library space matching the world one.
This is the most generic case when there are no symmetries to be exploited: neither locations nor the optical detectors are changed by the mapping.
phot::IPhotonMappingTransformations
interface. For information about how to use it, see the documentation of that interface. Definition at line 39 of file PhotonMappingIdentityTransformations.h.
Definition at line 53 of file PhotonMappingIdentityTransformations.h.
|
inline |
Constructor: ignores the configuration.
Definition at line 57 of file PhotonMappingIdentityTransformations.h.
|
inline |
Constructor: ignores the configuration.
Definition at line 64 of file PhotonMappingIdentityTransformations.h.
|
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 an exact copy of location
.
No exception is ever thrown.
Implements phot::IPhotonMappingTransformations.
Reimplemented in phot::PhotonMappingXMirrorTransformations.
Definition at line 84 of file PhotonMappingIdentityTransformations.h.
|
inlineoverridevirtual |
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 122 of file PhotonMappingIdentityTransformations.h.
|
inlineoverridevirtual |
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 165 of file PhotonMappingIdentityTransformations.h.
|
inlineoverridevirtual |
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.
|
protectedvirtual |
Return a trivial global optical detector identifier mapping.
Definition at line 21 of file PhotonMappingIdentityTransformations.cxx.
|
protectedvirtual |
Return a trivial library index mapping.
Definition at line 36 of file PhotonMappingIdentityTransformations.cxx.
|
inlineoverridevirtual |
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 149 of file PhotonMappingIdentityTransformations.h.
|
inlineoverridevirtual |
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 137 of file PhotonMappingIdentityTransformations.h.
|
inlineoverridevirtual |
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 107 of file PhotonMappingIdentityTransformations.h.
|
protected |
Detector geometry service provider.
Definition at line 188 of file PhotonMappingIdentityTransformations.h.
|
protected |
Complete optical detector identifier mapping library-to-world.
Definition at line 194 of file PhotonMappingIdentityTransformations.h.
|
protected |
Complete optical detector identifier mapping world-to-library.
Definition at line 191 of file PhotonMappingIdentityTransformations.h.