Public Member Functions | Public Attributes | List of all members
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 103 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 110 of file SimPhotons.h.

111  : OpChannel(chan)
112  {}
int OpChannel
Optical detector channel associated to this data.
Definition: SimPhotons.h:114

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 45 of file SimPhotons.cxx.

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

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

Definition at line 33 of file SimPhotons.cxx.

34 {
35 
36  for(auto const& phot: rhs.DetectedPhotons)
37  DetectedPhotons[phot.first] += phot.second;
38 
39  return *this;
40 } // sim::SimPhotonsLite::operator+=()
std::map< int, int > DetectedPhotons
Number of photons detected at each given time: time tick -> photons.
Definition: SimPhotons.h:117
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 247 of file SimPhotons.h.

248  { return OpChannel == other.OpChannel; }
int OpChannel
Optical detector channel associated to this data.
Definition: SimPhotons.h:114

Member Data Documentation

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

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

Definition at line 117 of file SimPhotons.h.

int sim::SimPhotonsLite::OpChannel

Optical detector channel associated to this data.

Definition at line 114 of file SimPhotons.h.


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