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

Compact representation of photons on a channel. More...

#include "SimPhotons.h"

Public Member Functions

 SimPhotonsLite ()=default
 Default constructor (do not use! it's for ROOT only). More...
 
 SimPhotonsLite (int chan)
 Constructor: associated to optical detector channel chan, and empty. More...
 
SimPhotonsLiteoperator+= (const SimPhotonsLite &rhs)
 Add all photons from rhs to this ones, at their original time. More...
 
SimPhotonsLite operator+ (const SimPhotonsLite &rhs) const
 
bool operator== (const SimPhotonsLite &other) const
 Returns whether other is on the same channel (OpChannel) as this. More...
 

Public Attributes

int OpChannel
 Optical detector channel associated to this data. More...
 
std::map< int, int > DetectedPhotons
 Number of photons detected at each given time: time tick -> photons. More...
 

Detailed Description

Compact representation of photons on a channel.

See also
sim::SimPhotons

Compared to sim::SimPhotons, this object contains only the total count of photon arriving at a certain time on the channel. The time is discretized in ticks.

Definition at line 98 of file SimPhotons.h.

Constructor & Destructor Documentation

sim::SimPhotonsLite::SimPhotonsLite ( )
default

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

sim::SimPhotonsLite::SimPhotonsLite ( int  chan)
inline

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

Definition at line 104 of file SimPhotons.h.

104 : OpChannel(chan) {}
int OpChannel
Optical detector channel associated to this data.
Definition: SimPhotons.h:106

Member Function Documentation

sim::SimPhotonsLite sim::SimPhotonsLite::operator+ ( const SimPhotonsLite rhs) const

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

Definition at line 42 of file SimPhotons.cxx.

43 {
44  return sim::SimPhotonsLite(*this) += rhs;
45 }
Compact representation of photons on a channel.
Definition: SimPhotons.h:98
sim::SimPhotonsLite & sim::SimPhotonsLite::operator+= ( const SimPhotonsLite rhs)

Add all photons from rhs to this ones, at their original time.

Definition at line 32 of file SimPhotons.cxx.

References DetectedPhotons.

33 {
34 
35  for (auto const& phot : rhs.DetectedPhotons)
36  DetectedPhotons[phot.first] += phot.second;
37 
38  return *this;
39 } // sim::SimPhotonsLite::operator+=()
std::map< int, int > DetectedPhotons
Number of photons detected at each given time: time tick -> photons.
Definition: SimPhotons.h:109
General LArSoft Utilities.
bool sim::SimPhotonsLite::operator== ( const SimPhotonsLite other) const
inline

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

Definition at line 230 of file SimPhotons.h.

References OpChannel.

231 {
232  return OpChannel == other.OpChannel;
233 }
int OpChannel
Optical detector channel associated to this data.
Definition: SimPhotons.h:106

Member Data Documentation

std::map<int, int> sim::SimPhotonsLite::DetectedPhotons

Number of photons detected at each given time: time tick -> photons.

Definition at line 109 of file SimPhotons.h.

Referenced by sim::DumpSimPhotonsLite::DumpPhoton(), simfilter::FilterSimPhotonLiteTime::filter(), operator+=(), and larg4::LArG4::produce().

int sim::SimPhotonsLite::OpChannel

Optical detector channel associated to this data.

Definition at line 106 of file SimPhotons.h.

Referenced by sim::DumpSimPhotonsLite::DumpPhoton(), simfilter::FilterSimPhotonLiteTime::filter(), operator==(), and larg4::LArG4::produce().


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