Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
wire-cell-build
sigproc
test
test_simple_channel_noisedb.cxx
Go to the documentation of this file.
1
#include "
WireCellUtil/Testing.h
"
2
3
#include "
WireCellSigProc/SimpleChannelNoiseDB.h
"
4
#include "
WireCellUtil/Units.h
"
5
6
#include <iostream>
7
8
using namespace
std
;
9
using namespace
WireCell
;
10
using namespace
WireCell::SigProc
;
11
12
int
main
()
13
{
14
const
int
nsamples = 5432;
15
const
double
tick
= 1.0*
units::ms
;
16
17
SimpleChannelNoiseDB
cndb(tick, nsamples);
18
19
Assert
(cndb.
sample_time
() ==
tick
);
20
Assert
(cndb.
nominal_baseline
(0) == 0.0);
21
Assert
(cndb.
gain_correction
(0) == 1.0);
22
23
auto
rcrc0 = cndb.
rcrc
(0);
24
auto
config0 = cndb.
config
(0);
25
auto
noise0 = cndb.
noise
(0);
26
27
cerr << rcrc0.size() <<
endl
;
28
29
Assert
(rcrc0.size() == nsamples);
30
Assert
(config0.size() == nsamples);
31
Assert
(noise0.size() == nsamples);
32
33
cndb.
set_gains_shapings
({0,1,2,3});
34
35
auto
config1 = cndb.
config
(1);
36
cerr << config1.size() <<
endl
;
37
Assert
(config1.size() == nsamples);
38
39
return
0;
40
}
WireCell::SigProc::SimpleChannelNoiseDB::set_gains_shapings
void set_gains_shapings(const std::vector< int > &channels, double from_gain_mVfC=7.8, double to_gain_mVfC=14.0, double from_shaping=1.0 *units::us, double to_shaping=2.0 *units::us)
Definition:
SimpleChannelNoiseDB.cxx:295
WireCell::SigProc::SimpleChannelNoiseDB::config
virtual const filter_t & config(int channel) const
Return the filter to correct any wrongly configured channels.
Definition:
SimpleChannelNoiseDB.cxx:197
std
STL namespace.
tick
const double tick
Definition:
test_binneddiffusion.cxx:51
WireCell::SigProc
Definition:
ChannelSelector.h:18
Assert
#define Assert
Definition:
Testing.h:7
SimpleChannelNoiseDB.h
main
int main()
Definition:
test_simple_channel_noisedb.cxx:12
Testing.h
WireCell::SigProc::SimpleChannelNoiseDB
Definition:
SimpleChannelNoiseDB.h:17
WireCell
Definition:
Main.h:22
WireCell::SigProc::SimpleChannelNoiseDB::noise
virtual const filter_t & noise(int channel) const
Return the filter to attenuate noise.
Definition:
SimpleChannelNoiseDB.cxx:202
genie::units::ms
static const double ms
Definition:
Units.h:100
WireCell::SigProc::SimpleChannelNoiseDB::sample_time
virtual double sample_time() const
FIXME: how to handle state changes?
Definition:
SimpleChannelNoiseDB.h:27
WireCell::SigProc::SimpleChannelNoiseDB::rcrc
virtual const filter_t & rcrc(int channel) const
Return the filter for the RC+RC coupling response function.
Definition:
SimpleChannelNoiseDB.cxx:192
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
Units.h
WireCell::SigProc::SimpleChannelNoiseDB::nominal_baseline
virtual double nominal_baseline(int channel) const
Return a nominal baseline correction (additive offset)
Definition:
SimpleChannelNoiseDB.cxx:41
WireCell::SigProc::SimpleChannelNoiseDB::gain_correction
virtual double gain_correction(int channel) const
Definition:
SimpleChannelNoiseDB.cxx:50
Generated by
1.8.11