16#define BOOST_TEST_MODULE Test TPC SAMPAProcessing
17#define BOOST_TEST_MAIN
18#define BOOST_TEST_DYN_LINK
19#include <boost/test/unit_test.hpp>
27#include <fairlogger/Logger.h>
42 1000.f * eleParam.ElectronCharge * 1.e15 * eleParam.ChipGain *
43 eleParam.ADCsaturation / eleParam.ADCdynamicRange,
56 std::vector<float> ADCin = {{1.f, 50.f, 100.f, 1000.f, 1023.f, 1024.f, 2000.f, 10000.f}};
57 std::vector<float> ADCout = {{1.f, 50.f, 100.f, 1000.f, 1023.f, 1023.f, 1023.f, 1023.f}};
59 for (
size_t i = 0;
i < ADCin.size(); ++
i) {
74 float timeInit[4] = {0.1, 3.3, 1.f, 90.5};
75 float startTimeInit[4] = {0.f, 3.f, 0.f, 90.f};
76 float ADCinit[4] = {1.f, 50.f, 100.f, 100.f};
78 Vc::float_v startTime;
80 for (
int i = 0;
i < 4; ++
i) {
82 startTime[
i] = startTimeInit[
i];
87 Vc::float_v adcValue = 55.f * ADC * Vc::exp(-4.f * (
time - startTime) / eleParam.PeakingTime) *
88 (
time - startTime) / eleParam.PeakingTime * (
time - startTime) /
89 eleParam.PeakingTime * (
time - startTime) / eleParam.PeakingTime *
90 (
time - startTime) / eleParam.PeakingTime;
91 Vc::float_v signal = sampa.getGamma4(
time, startTime, ADC);
92 for (
int i = 0;
i < 4; ++
i) {
93 float currentSignal = signal[
i];
94 float currentADC = adcValue[
i];
95 BOOST_CHECK_CLOSE(currentSignal, currentADC, 1E-3);
104 cdb.setUseDefaults();
Simple interface to the CDB manager.
Definition of the SAMPA response.
static const ParameterElectronics & Instance()
static CDBInterface & instance()
T getADCvalue(T nElectrons) const
static SAMPAProcessing & instance()
float getZfromTimeBin(float timeBin, Side s) const
TimeBin getTimeBin(float zPos) const
float getADCSaturation(const float signal) const
BOOST_AUTO_TEST_CASE(ClusterHardware_test1)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...