LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
SimPhotons.cxx
Go to the documentation of this file.
1 // SimPhotons, OnePhoton and SimPhotonsCollection implementation.
2 //
3 // These objects are primarily storage containers, so not much
4 // function code is actually required.
5 //
6 // See comments at head of SimPhotons.h for more details.
7 //
8 // Ben Jones, MIT, 06/04/2010
9 //
10 
11 
13 #include <iostream>
14 
15 namespace sim
16 {
17 
18  //----------------------------------------------------------------------------
20  {
21  }
22 
23  //----------------------------------------------------------------------------
24  /*
25  SimPhotons SimPhotonsCollection::GetHit(int key)
26  {
27  if( !((*this)[key]) )
28  (*this)[key] = new SimPhotons();
29  return (*this)[key];
30  }
31  */
32  //----------------------------------------------------------------------------
33  /*
34  SimPhotonsCollection & SimPhotonsCollection::operator+=(const SimPhotonsCollection &rhs)
35  {
36  for(SimPhotonsCollection::const_iterator it = rhs.begin(); it!=rhs.end(); it++){
37  GetHit(it->first).operator+=(it->second);
38  }
39  SetSDName("CompositeHitCollection");
40  return *this;
41  }
42  */
43  //----------------------------------------------------------------------------
44  /*
45  const SimPhotonsCollection SimPhotonsCollection::operator+(const SimPhotonsCollection &rhs) const
46  {
47  return SimPhotonsCollection(*this)+=rhs;
48  }
49  */
50  //----------------------------------------------------------------------------
52  {
53  }
54 
55  //----------------------------------------------------------------------------
57  {
58  }
59 
60 
61  //----------------------------------------------------------------------------
63  {
64  }
65 
66  //----------------------------------------------------------------------------
68  {
69  for(SimPhotons::const_iterator it = rhs.begin(); it!=rhs.end(); it++){
70  push_back(*it);
71  }
72  return *this;
73  }
74 
75  //----------------------------------------------------------------------------
77  {
78  return SimPhotons(*this)+=rhs;
79  }
80 
81  //----------------------------------------------------------------------------
83  {
84 
85  for(auto const& phot : rhs.DetectedPhotons)
86  this->DetectedPhotons[phot.first] += phot.second;
87 
88  return *this;
89  }
90 
91  //----------------------------------------------------------------------------
93  {
94  return SimPhotonsLite(*this)+=rhs;
95  }
96 
97 }
const SimPhotonsLite operator+(const SimPhotonsLite &rhs) const
Definition: SimPhotons.cxx:92
std::map< int, int > DetectedPhotons
Definition: SimPhotons.h:65
contains objects relating to OpDet hits
Monte Carlo Simulation.
const SimPhotons operator+(const SimPhotons &rhs) const
Definition: SimPhotons.cxx:76
General LArSoft Utilities.
SimPhotons & operator+=(const SimPhotons &rhs)
Definition: SimPhotons.cxx:67
list_type::const_iterator const_iterator
Definition: SimPhotons.h:93
SimPhotonsLite & operator+=(const SimPhotonsLite &rhs)
Definition: SimPhotons.cxx:82