LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SimPhotons.cxx
Go to the documentation of this file.
1 
9 // library header
11 
12 // -----------------------------------------------------------------------------
13 // --- sim::SimPhotons
14 // -----------------------------------------------------------------------------
16 {
17 
18  this->insert(this->begin(), rhs.cbegin(), rhs.cend());
19  return *this;
20 
21 } // sim::SimPhotons::operator+=()
22 
23 //----------------------------------------------------------------------------
25 {
26  return sim::SimPhotons(*this) += rhs;
27 }
28 
29 // -----------------------------------------------------------------------------
30 // --- sim::SimPhotonsLite
31 // -----------------------------------------------------------------------------
33 {
34 
35  for (auto const& phot : rhs.DetectedPhotons)
36  DetectedPhotons[phot.first] += phot.second;
37 
38  return *this;
39 } // sim::SimPhotonsLite::operator+=()
40 
41 //----------------------------------------------------------------------------
43 {
44  return sim::SimPhotonsLite(*this) += rhs;
45 }
46 
47 // -----------------------------------------------------------------------------
48 // --- sim::SimPhotonsCollection
49 // -----------------------------------------------------------------------------
SimPhotonsLite & operator+=(const SimPhotonsLite &rhs)
Add all photons from rhs to this ones, at their original time.
Definition: SimPhotons.cxx:32
SimPhotonsLite operator+(const SimPhotonsLite &rhs) const
Definition: SimPhotons.cxx:42
SimPhotons & operator+=(const SimPhotons &rhs)
Add all photons from rhs to this ones; no sorting is applied.
Definition: SimPhotons.cxx:15
std::map< int, int > DetectedPhotons
Number of photons detected at each given time: time tick -> photons.
Definition: SimPhotons.h:109
Simulation objects for optical detectors.
General LArSoft Utilities.
Collection of photons which recorded on one channel.
Definition: SimPhotons.h:127
Compact representation of photons on a channel.
Definition: SimPhotons.h:98
SimPhotons operator+(const SimPhotons &rhs) const
Definition: SimPhotons.cxx:24
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:69