#include <LArWave.h>
|
| | LArWave () |
| | LArWave (const unsigned nSamples, const double dt, const unsigned flag=0) |
| | LArWave (const std::vector< double > &theVector, const double dt, const unsigned flag=0) |
| virtual | ~LArWave ()=default |
| const std::vector< double > & | getWave () const |
| | Wave parameters.
|
| const double & | getDt () const |
| | delta time
|
| const double & | getSample (const unsigned int i) const |
| | Amplitude per time bin.
|
| const double & | operator[] (const unsigned int i) const |
| | Amplitude per time bin.
|
| double | getTime (const unsigned i) const |
| | time
|
| size_t | getSize () const |
| | number of time samples
|
| unsigned | getIndex (double aTime) const |
| | index for a time value
|
| unsigned | getFlag () const |
| | flag: ...
|
| bool | isEmpty () const |
| | is LArWave uninitialized?
|
| double & | operator[] (const unsigned int i) |
| | Amplitude per time bin - NOT const.
|
| void | setSize (const unsigned nSize) |
| | resize the number of time bin samples
|
| void | setDt (const double dt) |
| | set the delta time
|
| void | setSample (const unsigned i, const double aVal) |
| | set the amplitude for time bin i
|
| void | setFlag (const unsigned flag) |
| | set flag
|
|
| enum | {
meas = 01
, mwf = 02
, mwfN = 03
, dac0 = 04
,
xtalkcorr = 05
, pred = 10
, predCali = 11
, predFitPhys = 12
,
predMeasPar = 13
, model = 20
, patch = 30
, unknown = 0
} |
| double | m_dt |
| std::vector< double > | m_amplitudes |
| unsigned | m_flag |
| LArWave | operator+ (const LArWave &bWave) const |
| LArWave | operator- (const LArWave &bWave) const |
| LArWave | operator* (const LArWave &bWave) const |
| LArWave | operator/ (const LArWave &bWave) const |
| LArWave | operator% (const LArWave &bWave) const |
| LArWave | operator+ (const double aBias) const |
| LArWave | operator* (const double aScale) const |
| LArWave & | operator+= (const LArWave &bWave) |
| LArWave & | operator-= (const LArWave &bWave) |
| LArWave & | operator*= (const double aScale) |
| | LArWave (const LArWave &theWave1, const LArWave &theWave2) |
Definition at line 31 of file LArWave.h.
◆ anonymous enum
| Enumerator |
|---|
| meas | |
| mwf | |
| mwfN | |
| dac0 | |
| xtalkcorr | |
| pred | |
| predCali | |
| predFitPhys | |
| predMeasPar | |
| model | |
| patch | |
| unknown | |
Definition at line 121 of file LArWave.h.
121 {
127
132
134
136
138 };
◆ LArWave() [1/4]
◆ LArWave() [2/4]
| LArWave::LArWave |
( |
const unsigned | nSamples, |
|
|
const double | dt, |
|
|
const unsigned | flag = 0 ) |
|
inline |
Definition at line 152 of file LArWave.h.
153 :
std::vector< double > m_amplitudes
◆ LArWave() [3/4]
| LArWave::LArWave |
( |
const std::vector< double > & | theVector, |
|
|
const double | dt, |
|
|
const unsigned | flag = 0 ) |
|
inline |
◆ ~LArWave()
| virtual LArWave::~LArWave |
( |
| ) |
|
|
virtualdefault |
◆ LArWave() [4/4]
| LArWave::LArWave |
( |
const LArWave & | theWave1, |
|
|
const LArWave & | theWave2 ) |
|
protected |
Definition at line 9 of file LArWave.cxx.
11{
12 if ( theWave1.
m_dt == theWave2.
m_dt ) {
16 } else {
19 }
20}
size_t getSize() const
number of time samples
◆ getDt()
| const double & LArWave::getDt |
( |
| ) |
const |
|
inline |
◆ getFlag()
| unsigned LArWave::getFlag |
( |
| ) |
const |
|
inline |
◆ getIndex()
| unsigned LArWave::getIndex |
( |
double | aTime | ) |
const |
◆ getSample()
| const double & LArWave::getSample |
( |
const unsigned int | i | ) |
const |
|
inline |
Amplitude per time bin.
Definition at line 53 of file LArWave.h.
◆ getSize()
| size_t LArWave::getSize |
( |
| ) |
const |
|
inline |
number of time samples
Definition at line 62 of file LArWave.h.
◆ getTime()
| double LArWave::getTime |
( |
const unsigned | i | ) |
const |
|
inline |
◆ getWave()
| const std::vector< double > & LArWave::getWave |
( |
| ) |
const |
|
inline |
◆ isEmpty()
| bool LArWave::isEmpty |
( |
| ) |
const |
|
inline |
◆ operator%()
Definition at line 91 of file LArWave.cxx.
92{
93
94
95
96
99
101 const size_t s=
result.getSize();
102 for (
size_t i=0 ;
i<
s ; ++
i ) {
103
104 double sum2 = 0.5 * ( (*this).m_amplitudes[0] * bWave.
m_amplitudes[
i] +
106 for (
size_t k=1 ;
k<
i ; ++
k ) {
107 sum2 += amplPtrA[
k] * amplPtrB[
i-
k] ;
108 }
110 }
112}
◆ operator*() [1/2]
| LArWave LArWave::operator* |
( |
const double | aScale | ) |
const |
Definition at line 126 of file LArWave.cxx.
126 {
128 std::vector<double>::iterator
it=
result.m_amplitudes.begin();
129 std::vector<double>::iterator it_e=
result.m_amplitudes.end();
130 for (;
it!=it_e;++
it) {
131 (*it)*=aScale;
132 }
134}
◆ operator*() [2/2]
Definition at line 69 of file LArWave.cxx.
70{
72 const size_t s=
result.getSize();
73 for (
size_t i=0 ;
i<
s ; ++
i ) {
76 }
78}
◆ operator*=()
| LArWave & LArWave::operator*= |
( |
const double | aScale | ) |
|
Definition at line 137 of file LArWave.cxx.
137 {
140 }
141 return *this ;
142}
◆ operator+() [1/2]
| LArWave LArWave::operator+ |
( |
const double | aBias | ) |
const |
Definition at line 115 of file LArWave.cxx.
115 {
117 std::vector<double>::iterator
it=
result.m_amplitudes.begin();
118 std::vector<double>::iterator it_e=
result.m_amplitudes.end();
119 for (;
it!=it_e;++
it) {
120 (*it)+=aBias;
121 }
123}
◆ operator+() [2/2]
Definition at line 24 of file LArWave.cxx.
25{
27 const size_t s=
result.getSize();
28 for (
size_t i=0 ;
i<
s ; ++
i ) {
31 }
33}
◆ operator+=()
Definition at line 35 of file LArWave.cxx.
36{
38 for (
size_t i=0 ;
i<
s ; ++
i ) {
40 }
41 return *this;
42}
◆ operator-()
Definition at line 46 of file LArWave.cxx.
47{
49 const size_t s=
result.getSize();
50 for (
size_t i=0 ;
i<
s ; ++
i ) {
53 }
55}
◆ operator-=()
Definition at line 58 of file LArWave.cxx.
59{
61 for (
size_t i=0 ;
i<
s ; ++
i ) {
63 }
64 return *this;
65}
◆ operator/()
Definition at line 80 of file LArWave.cxx.
81{
83 const size_t s=
result.getSize();
84 for (
size_t i=0 ;
i<
s ; ++
i ) {
87 }
89}
◆ operator[]() [1/2]
| double & LArWave::operator[] |
( |
const unsigned int | i | ) |
|
|
inline |
Amplitude per time bin - NOT const.
Definition at line 78 of file LArWave.h.
◆ operator[]() [2/2]
| const double & LArWave::operator[] |
( |
const unsigned int | i | ) |
const |
|
inline |
Amplitude per time bin.
Definition at line 56 of file LArWave.h.
◆ setDt()
| void LArWave::setDt |
( |
const double | dt | ) |
|
|
inline |
set the delta time
Definition at line 193 of file LArWave.h.
◆ setFlag()
| void LArWave::setFlag |
( |
const unsigned | flag | ) |
|
|
inline |
◆ setSample()
| void LArWave::setSample |
( |
const unsigned | i, |
|
|
const double | aVal ) |
|
inline |
set the amplitude for time bin i
Definition at line 87 of file LArWave.h.
◆ setSize()
| void LArWave::setSize |
( |
const unsigned | nSize | ) |
|
|
inline |
resize the number of time bin samples
Definition at line 188 of file LArWave.h.
◆ m_amplitudes
| std::vector<double> LArWave::m_amplitudes |
|
protected |
◆ m_dt
◆ m_flag
The documentation for this class was generated from the following files: