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 | |
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 | |
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... | |
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 | |
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... | |
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 40 of file PhotonMappingIdentityTransformations.h.
using phot::PhotonMappingIdentityTransformations::Parameters = art::ToolConfigTable<Config> |
Definition at line 54 of file PhotonMappingIdentityTransformations.h.
|
inline |
Constructor: ignores the configuration.
Definition at line 58 of file PhotonMappingIdentityTransformations.h.
|
inline |
Constructor: ignores the configuration.
Definition at line 65 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 85 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 123 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 166 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 178 of file PhotonMappingIdentityTransformations.h.
|
protected |
Return a trivial global optical detector identifier mapping.
Definition at line 21 of file PhotonMappingIdentityTransformations.cxx.
|
protected |
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 150 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 138 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 108 of file PhotonMappingIdentityTransformations.h.
|
protected |
Detector geometry service provider.
Definition at line 189 of file PhotonMappingIdentityTransformations.h.
|
protected |
Complete optical detector identifier mapping library-to-world.
Definition at line 195 of file PhotonMappingIdentityTransformations.h.
|
protected |
Complete optical detector identifier mapping world-to-library.
Definition at line 192 of file PhotonMappingIdentityTransformations.h.