LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
sim::SimPhotons Class Reference

Collection of photons which recorded on one channel. More...

#include "SimPhotons.h"

Inheritance diagram for sim::SimPhotons:

Public Types

Vector types
typedef std::vector< OnePhotonlist_type
 
typedef list_type::value_type value_type
 
typedef list_type::iterator iterator
 
typedef list_type::const_iterator const_iterator
 
typedef list_type::reverse_iterator reverse_iterator
 
typedef list_type::const_reverse_iterator const_reverse_iterator
 
typedef list_type::size_type size_type
 
typedef list_type::difference_type difference_type
 

Public Member Functions

 SimPhotons ()=default
 Default constructor (do not use! it's for ROOT only). More...
 
 SimPhotons (int chan)
 Constructor: associated to optical detector channel chan, and empty. More...
 
int OpChannel () const
 Returns the optical channel number this object is associated to. More...
 
void SetChannel (int ch)
 Sets the optical detector channel number this object is associated to. More...
 
SimPhotonsoperator+= (const SimPhotons &rhs)
 Add all photons from rhs to this ones; no sorting is applied. More...
 
SimPhotons operator+ (const SimPhotons &rhs) const
 
bool operator== (const SimPhotons &other) const
 Returns whether other is on the same channel (OpChannel) as this. More...
 

Public Attributes

int fOpChannel
 Optical detector channel associated to this data. More...
 
elements
 STL member. More...
 

Detailed Description

Collection of photons which recorded on one channel.

Definition at line 127 of file SimPhotons.h.

Member Typedef Documentation

typedef list_type::const_iterator sim::SimPhotons::const_iterator

Definition at line 139 of file SimPhotons.h.

typedef list_type::const_reverse_iterator sim::SimPhotons::const_reverse_iterator

Definition at line 141 of file SimPhotons.h.

typedef list_type::difference_type sim::SimPhotons::difference_type

Definition at line 143 of file SimPhotons.h.

typedef list_type::iterator sim::SimPhotons::iterator

Definition at line 138 of file SimPhotons.h.

typedef std::vector<OnePhoton> sim::SimPhotons::list_type

Definition at line 136 of file SimPhotons.h.

typedef list_type::reverse_iterator sim::SimPhotons::reverse_iterator

Definition at line 140 of file SimPhotons.h.

typedef list_type::size_type sim::SimPhotons::size_type

Definition at line 142 of file SimPhotons.h.

typedef list_type::value_type sim::SimPhotons::value_type

Definition at line 137 of file SimPhotons.h.

Constructor & Destructor Documentation

sim::SimPhotons::SimPhotons ( )
default

Default constructor (do not use! it's for ROOT only).

sim::SimPhotons::SimPhotons ( int  chan)
inline

Constructor: associated to optical detector channel chan, and empty.

Definition at line 152 of file SimPhotons.h.

References operator+(), lar::dump::operator+=(), util::details::operator==(), and fhicl::other.

152 : fOpChannel(chan) {}
int fOpChannel
Optical detector channel associated to this data.
Definition: SimPhotons.h:130

Member Function Documentation

int sim::SimPhotons::OpChannel ( ) const
inline

Returns the optical channel number this object is associated to.

Definition at line 239 of file SimPhotons.h.

Referenced by opdet::SimPhotonCounter::AddSimPhotons(), sim::DumpSimPhotons::DumpElement(), simfilter::FilterSimPhotonTime::filter(), operator==(), opdet::OptDetDigitizer::produce(), and opdet::OpMCDigi::produce().

240 {
241  return fOpChannel;
242 }
int fOpChannel
Optical detector channel associated to this data.
Definition: SimPhotons.h:130
sim::SimPhotons sim::SimPhotons::operator+ ( const SimPhotons rhs) const

Creates a new sim::SimPhotons with all photons from rhs and this object.

Definition at line 24 of file SimPhotons.cxx.

25 {
26  return sim::SimPhotons(*this) += rhs;
27 }
Collection of photons which recorded on one channel.
Definition: SimPhotons.h:127
sim::SimPhotons & sim::SimPhotons::operator+= ( const SimPhotons rhs)

Add all photons from rhs to this ones; no sorting is applied.

Definition at line 15 of file SimPhotons.cxx.

References util::begin().

16 {
17 
18  this->insert(this->begin(), rhs.cbegin(), rhs.cend());
19  return *this;
20 
21 } // sim::SimPhotons::operator+=()
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:69
bool sim::SimPhotons::operator== ( const SimPhotons other) const
inline

Returns whether other is on the same channel (OpChannel) as this.

Definition at line 249 of file SimPhotons.h.

References OpChannel().

250 {
251  return OpChannel() == other.OpChannel();
252 }
int OpChannel() const
Returns the optical channel number this object is associated to.
Definition: SimPhotons.h:239
void sim::SimPhotons::SetChannel ( int  ch)
inline

Sets the optical detector channel number this object is associated to.

Definition at line 244 of file SimPhotons.h.

Referenced by sim::SimListUtils::GetSimPhotonsCollection().

245 {
246  fOpChannel = ch;
247 }
int fOpChannel
Optical detector channel associated to this data.
Definition: SimPhotons.h:130

Member Data Documentation

T std::vector< T >::elements
inherited

STL member.

int sim::SimPhotons::fOpChannel

Optical detector channel associated to this data.

Definition at line 130 of file SimPhotons.h.


The documentation for this class was generated from the following files: