#include <LArWaveCumul.h>
|
| | LArWaveCumul () |
| | LArWaveCumul (const std::vector< double > &theVector, double dt, unsigned flag=0) |
| | LArWaveCumul (const std::vector< double > &vAmpl, const std::vector< double > &vErr, const std::vector< int > &vTrig, double dt, unsigned flag=0) |
| | LArWaveCumul (unsigned nSamples, double dt, unsigned flag=0) |
| virtual | ~LArWaveCumul ()=default |
| const std::vector< double > & | getErrors () const |
| | error vector
|
| double | getError (unsigned i) const |
| | error per time bin
|
| const std::vector< int > & | getTriggers () const |
| | trigger vector
|
| int | getTrigger (unsigned i) const |
| | trigger per time bin
|
| 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
|
|
| std::vector< double > | m_errors |
| std::vector< int > | m_triggers |
| void | addEvent (int delay, int step, const std::vector< double > &Samples) |
| | add in set of channel responses for a given step/delay
|
| void | addAccumulatedEvent (int delay, int step, const std::vector< double > &SamplesSum, const std::vector< double > &Samples2Sum, unsigned nTriggers) |
| | used when building from LArAccumulatedDigits
|
|
| double | m_dt |
| std::vector< double > | m_amplitudes |
| unsigned | m_flag |
| LArWave | operator+ (const LArWave &bWave) const |
| LArWave | operator+ (const double aBias) const |
| LArWave | operator- (const LArWave &bWave) const |
| LArWave | operator* (const LArWave &bWave) const |
| LArWave | operator* (const double aScale) const |
| LArWave | operator/ (const LArWave &bWave) const |
| LArWave | operator% (const LArWave &bWave) const |
| LArWave & | operator+= (const LArWave &bWave) |
| LArWave & | operator-= (const LArWave &bWave) |
| LArWave & | operator*= (const double aScale) |
| 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
} |
Definition at line 30 of file LArWaveCumul.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 };
◆ LArWaveCumul() [1/4]
| LArWaveCumul::LArWaveCumul |
( |
| ) |
|
|
inline |
◆ LArWaveCumul() [2/4]
| LArWaveCumul::LArWaveCumul |
( |
const std::vector< double > & | theVector, |
|
|
double | dt, |
|
|
unsigned | flag = 0 ) |
|
inline |
Definition at line 102 of file LArWaveCumul.h.
105 :
107{
108 unsigned nSamples = theVector.size();
111}
std::vector< int > m_triggers
std::vector< double > m_errors
◆ LArWaveCumul() [3/4]
| LArWaveCumul::LArWaveCumul |
( |
const std::vector< double > & | vAmpl, |
|
|
const std::vector< double > & | vErr, |
|
|
const std::vector< int > & | vTrig, |
|
|
double | dt, |
|
|
unsigned | flag = 0 ) |
|
inline |
◆ LArWaveCumul() [4/4]
| LArWaveCumul::LArWaveCumul |
( |
unsigned | nSamples, |
|
|
double | dt, |
|
|
unsigned | flag = 0 ) |
|
inline |
◆ ~LArWaveCumul()
| virtual LArWaveCumul::~LArWaveCumul |
( |
| ) |
|
|
virtualdefault |
◆ addAccumulatedEvent()
| void LArWaveCumul::addAccumulatedEvent |
( |
int | delay, |
|
|
int | step, |
|
|
const std::vector< double > & | SamplesSum, |
|
|
const std::vector< double > & | Samples2Sum, |
|
|
unsigned | nTriggers ) |
used when building from LArAccumulatedDigits
Definition at line 39 of file LArWaveCumul.cxx.
43{
44 if (!nTriggers) return;
45 const unsigned int nSwave =
getSize() ;
46 const unsigned int nSevt = SamplesSum.size() ;
47
48 for (
unsigned int i=0 ;
i<nSevt ;
i++ ) {
49
50 unsigned int k=(
i+1)*step-(
delay+1);
51
52 if (k<nSwave ) {
53
57
59 double sum2 = SamplesSum[
i] ;
60 double sum22 = Samples2Sum[
i] ;
61
65
66 }
67 }
68}
double delay(std::size_t d)
std::vector< double > m_amplitudes
size_t getSize() const
number of time samples
◆ addEvent()
| void LArWaveCumul::addEvent |
( |
int | delay, |
|
|
int | step, |
|
|
const std::vector< double > & | Samples ) |
add in set of channel responses for a given step/delay
Definition at line 10 of file LArWaveCumul.cxx.
12{
13 const unsigned int nSwave =
getSize() ;
14 const unsigned int nSevt = Samples.size() ;
15 for (
unsigned int i=0 ;
i<nSevt ;
i++ ) {
16 unsigned int k=(
i+1)*step-(
delay+1);
17 if (k<nSwave) {
18 double evt = Samples[
i] ;
22
26
27
28
32
33 }
34 }
35}
◆ getDt()
| const double & LArWave::getDt |
( |
| ) |
const |
|
inlineinherited |
◆ getError()
| double LArWaveCumul::getError |
( |
unsigned | i | ) |
const |
|
inline |
◆ getErrors()
| const std::vector< double > & LArWaveCumul::getErrors |
( |
| ) |
const |
|
inline |
◆ getFlag()
| unsigned LArWave::getFlag |
( |
| ) |
const |
|
inlineinherited |
◆ getIndex()
| unsigned LArWave::getIndex |
( |
double | aTime | ) |
const |
|
inherited |
◆ getSample()
| const double & LArWave::getSample |
( |
const unsigned int | i | ) |
const |
|
inlineinherited |
Amplitude per time bin.
Definition at line 53 of file LArWave.h.
◆ getSize()
| size_t LArWave::getSize |
( |
| ) |
const |
|
inlineinherited |
number of time samples
Definition at line 62 of file LArWave.h.
◆ getTime()
| double LArWave::getTime |
( |
const unsigned | i | ) |
const |
|
inlineinherited |
◆ getTrigger()
| int LArWaveCumul::getTrigger |
( |
unsigned | i | ) |
const |
|
inline |
◆ getTriggers()
| const std::vector< int > & LArWaveCumul::getTriggers |
( |
| ) |
const |
|
inline |
◆ getWave()
| const std::vector< double > & LArWave::getWave |
( |
| ) |
const |
|
inlineinherited |
◆ isEmpty()
| bool LArWave::isEmpty |
( |
| ) |
const |
|
inlineinherited |
◆ 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 |
|
inherited |
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 | ) |
|
|
inherited |
Definition at line 137 of file LArWave.cxx.
137 {
140 }
141 return *this ;
142}
◆ operator+() [1/2]
| LArWave LArWave::operator+ |
( |
const double | aBias | ) |
const |
|
inherited |
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 | ) |
|
|
inlineinherited |
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 |
|
inlineinherited |
Amplitude per time bin.
Definition at line 56 of file LArWave.h.
◆ setDt()
| void LArWave::setDt |
( |
const double | dt | ) |
|
|
inlineinherited |
set the delta time
Definition at line 193 of file LArWave.h.
◆ setFlag()
| void LArWave::setFlag |
( |
const unsigned | flag | ) |
|
|
inlineinherited |
◆ setSample()
| void LArWave::setSample |
( |
const unsigned | i, |
|
|
const double | aVal ) |
|
inlineinherited |
set the amplitude for time bin i
Definition at line 87 of file LArWave.h.
◆ setSize()
| void LArWave::setSize |
( |
const unsigned | nSize | ) |
|
|
inlineinherited |
resize the number of time bin samples
Definition at line 188 of file LArWave.h.
◆ m_amplitudes
| std::vector<double> LArWave::m_amplitudes |
|
protectedinherited |
◆ m_dt
◆ m_errors
| std::vector<double> LArWaveCumul::m_errors |
|
protected |
◆ m_flag
◆ m_triggers
| std::vector<int> LArWaveCumul::m_triggers |
|
protected |
The documentation for this class was generated from the following files: