PhotonMappingXMirrorTransformations.h
Go to the documentation of this file.
1 /**
2  * @file larsim/PhotonPropagation/LibraryMappingTools/PhotonMappingXMirrorTransformations.h
3  * @brief A photon mapping transformation with reflection at x = 0.
4  * @author Gianluca Petrillo (petrillo@slac.stanford.edu)
5  * @date March 20, 2019
6  * @see `larsim/PhotonPropagation/LibraryMappingTools/PhotonMappingXMirrorTransformations_tool.cc`
7  *
8  */
9 
10 #ifndef LARSIM_PHOTONPROPAGATION_LIBRARYMAPPINGTOOLS_PHOTONMAPPINGXMIRRORTRANSFORMATIONS_H
11 #define LARSIM_PHOTONPROPAGATION_LIBRARYMAPPINGTOOLS_PHOTONMAPPINGXMIRRORTRANSFORMATIONS_H
12 
13 // LArSoft libraries
15 
16 // framework libraries
18 
19 // C/C++ standard libraries
20 #include <cmath> // std::abs()
21 
22 namespace phot {
23 
24  /**
25  * @brief Photon mapping transformation with reflection at x = 0.
26  *
27  * This mapping describes an infinite planar mirror placed at @f$ x = 0 @f$.
28  *
29  */
32  {
33 
34  public:
36 
37  // using Name = fhicl::Name;
38  // using Comment = fhicl::Comment;
39 
40  // no additional configuration required
41 
42  }; // struct Config
43 
45 
46 
47  /// Constructor: same configuration
48  /// as `phot::PhotonMappingIdentityTransformations`.
51 
52  /// Constructor: same configuration
53  /// as `phot::PhotonMappingIdentityTransformations`.
56 
57 
58  /**
59  * @brief Returns the representation within the library of a detector
60  * location.
61  * @param location position in world coordinates [cm]
62  * @return a vector expressing `location` in the library space
63  *
64  * The returned vector is the same as `location`, but with the _x_ component
65  * always positive..
66  *
67  * No exception is ever thrown.
68  */
70  (geo::Point_t const& location) const override
71  { return { std::abs(location.X()), location.Y(), location.Z() }; }
72 
73  }; // class PhotonMappingXMirrorTransformations
74 
75 
76 } // namespace phot
77 
78 
79 #endif // LARSIM_PHOTONPROPAGATION_LIBRARYMAPPINGTOOLS_PHOTONMAPPINGXMIRRORTRANSFORMATIONS_H
T abs(T value)
static Config * config
Definition: config.cpp:1054
Photon mapping transformation with reflection at x = 0.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
General LArSoft Utilities.
A photon mapping identity transformation.
virtual geo::Point_t detectorToLibrary(geo::Point_t const &location) const override
Returns the representation within the library of a detector location.