PhotonMappingIdentityTransformations.cxx
Go to the documentation of this file.
1 /**
2  * @file larsim/PhotonPropagation/LibraryMappingTools/PhotonMappingIdentityTransformations.cxx
3  * @brief A photon mapping identity transformation: implementation.
4  * @author Gianluca Petrillo (petrillo@slac.stanford.edu)
5  * @date March 20, 2019
6  * @see `larsim/PhotonPropagation/LibraryMappingTools/PhotonMappingIdentityTransformations.h`
7  * @see `larsim/PhotonPropagation/LibraryMappingTools/PhotonMappingIdentityTransformations_tool.cc`
8  *
9  */
10 
11 
12 // LArSoft libraries
14 
15 #include <numeric> // std::iota()
16 
17 
18 //------------------------------------------------------------------------------
21  () const
22 {
23 
24  auto const nOpDets = fGeom->NOpDets();
25 
26  LibraryIndexToOpDetMap map(nOpDets);
27  std::iota(map.begin(), map.end(), 0);
28 
29  return map;
30 } // phot::PhotonMappingIdentityTransformations::makeLibraryIndicesToOpDetsMap()
31 
32 
33 //------------------------------------------------------------------------------
36  () const
37 {
38 
39  auto const nOpDets = fGeom->NOpDets();
40 
41  OpDetToLibraryIndexMap map(nOpDets);
42  std::iota(map.begin(), map.end(), 0);
43 
44  return map;
45 } // phot::PhotonMappingIdentityTransformations::makeOpDetsToLibraryIndicesMap()
46 
47 
48 //------------------------------------------------------------------------------
49 
virtual OpDetToLibraryIndexMap makeOpDetsToLibraryIndicesMap() const
Return a trivial library index mapping.
virtual LibraryIndexToOpDetMap makeLibraryIndicesToOpDetsMap() const
Return a trivial global optical detector identifier mapping.
std::vector< OpDetID_t > LibraryIndexToOpDetMap
Type describing the mapping of optical detectors into library indices.
A photon mapping identity transformation.
std::vector< LibraryIndex_t > OpDetToLibraryIndexMap
Type describing the mapping of library indices into optical detectors.