CbmRoot
Loading...
Searching...
No Matches
CbmPsdDsp.cxx
Go to the documentation of this file.
1/* Copyright (C) 2021 Institute for Nuclear Research, Moscow
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Nikolay Karpushkin [committer] */
4
12#include "CbmPsdDsp.h"
13
14#include <TBuffer.h> // for TBuffer
15#include <TClass.h> // for CbmPsdDsp::IsA()
16#include <TString.h> // for Form, TString
17
18#include <string> // for basic_string
19
20// --- Default constructor
22 : fuAddress()
23 , fdTime()
24 , fdTsTime()
25 , fdEdep()
26 , fuZL()
27 , fdAccum()
28 , fdAdcTime()
29
30 , fdEdepWfm()
31 , fdAmpl()
32 , fuMinimum()
33 , fuTimeMax()
34 , fuWfm()
35
36 , fdFitAmpl()
37 , fdFitZL()
38 , fdFitEdep()
39 , fdFitR2()
40 , fdFitTimeMax()
41 , fuFitWfm()
42{
43}
44
45// clang-format off
46// --- Constructor with assignment
47CbmPsdDsp::CbmPsdDsp(uint32_t address,
48 double time,
49 double ts_time,
50 double edep,
51 uint32_t zl,
52 double accum,
53 double adc_time,
54
55 double edep_wfm,
56 double ampl,
57 uint32_t minimum,
58 uint32_t time_max,
59 std::vector<std::uint16_t> wfm,
60
61 double fit_ampl,
62 double fit_zl,
63 double fit_edep,
64 double fit_r2,
65 double fit_time_max,
66 std::vector<std::uint16_t> fit_wfm)
67
68 : fuAddress(address)
69 , fdTime(time)
70 , fdTsTime(ts_time)
71 , fdEdep(edep)
72 , fuZL(zl)
73 , fdAccum(accum)
74 , fdAdcTime(adc_time)
75
76 , fdEdepWfm(edep_wfm)
77 , fdAmpl(ampl)
78 , fuMinimum(minimum)
79 , fuTimeMax(time_max)
80 , fuWfm(wfm)
81
82 , fdFitAmpl(fit_ampl)
83 , fdFitZL(fit_zl)
84 , fdFitEdep(fit_edep)
85 , fdFitR2(fit_r2)
86 , fdFitTimeMax(fit_time_max)
87 , fuFitWfm(fit_wfm)
88{
89}
90// clang-format on
91
92// --- Copy constructor
94 : fuAddress(other.fuAddress)
95 , fdTime(other.fdTime)
96 , fdTsTime(other.fdTsTime)
97 , fdEdep(other.fdEdep)
98 , fuZL(other.fuZL)
99 , fdAccum(other.fdAccum)
100 , fdAdcTime(other.fdAdcTime)
101
102 , fdEdepWfm(other.fdEdepWfm)
103 , fdAmpl(other.fdAmpl)
104 , fuMinimum(other.fuMinimum)
105 , fuTimeMax(other.fuTimeMax)
106 , fuWfm(other.fuWfm)
107
108 , fdFitAmpl(other.fdFitAmpl)
109 , fdFitZL(other.fdFitZL)
110 , fdFitEdep(other.fdFitEdep)
111 , fdFitR2(other.fdFitR2)
112 , fdFitTimeMax(other.fdFitTimeMax)
113 , fuFitWfm(other.fuFitWfm)
114{
115}
116
117
118// --- Move constructor
120 : fuAddress(other.fuAddress)
121 , fdTime(other.fdTime)
122 , fdTsTime(other.fdTsTime)
123 , fdEdep(other.fdEdep)
124 , fuZL(other.fuZL)
125 , fdAccum(other.fdAccum)
126 , fdAdcTime(other.fdAdcTime)
127
128 , fdEdepWfm(other.fdEdepWfm)
129 , fdAmpl(other.fdAmpl)
130 , fuMinimum(other.fuMinimum)
131 , fuTimeMax(other.fuTimeMax)
132 , fuWfm(other.fuWfm)
133
134 , fdFitAmpl(other.fdFitAmpl)
135 , fdFitZL(other.fdFitZL)
136 , fdFitEdep(other.fdFitEdep)
137 , fdFitR2(other.fdFitR2)
138 , fdFitTimeMax(other.fdFitTimeMax)
139 , fuFitWfm(other.fuFitWfm)
140{
141}
142
143
144// --- Destructor
146{
147 std::vector<uint16_t>().swap(fuWfm);
148 std::vector<uint16_t>().swap(fuFitWfm);
149}
150
151
152// --- Assignment operator
154{
155 if (this != &other) {
156 fuAddress = other.fuAddress;
157 fdTime = other.fdTime;
158 fdTsTime = other.fdTsTime;
159 fdEdep = other.fdEdep;
160 fuZL = other.fuZL;
161 fdAccum = other.fdAccum;
162 fdAdcTime = other.fdAdcTime;
163
164 fdEdepWfm = other.fdEdepWfm;
165 fdAmpl = other.fdAmpl;
166 fuMinimum = other.fuMinimum;
167 fuTimeMax = other.fuTimeMax;
168 fuWfm = other.fuWfm;
169
170 fdFitAmpl = other.fdFitAmpl;
171 fdFitZL = other.fdFitZL;
172 fdFitEdep = other.fdFitEdep;
173 fdFitR2 = other.fdFitR2;
175 fuFitWfm = other.fuFitWfm;
176 }
177 return *this;
178}
179
180
181// --- Move assignment operator
183{
184 if (this != &other) {
185 fuAddress = other.fuAddress;
186 fdTime = other.fdTime;
187 fdTsTime = other.fdTsTime;
188 fdEdep = other.fdEdep;
189 fuZL = other.fuZL;
190 fdAccum = other.fdAccum;
191 fdAdcTime = other.fdAdcTime;
192
193 fdEdepWfm = other.fdEdepWfm;
194 fdAmpl = other.fdAmpl;
195 fuMinimum = other.fuMinimum;
196 fuTimeMax = other.fuTimeMax;
197 fuWfm = other.fuWfm;
198
199 fdFitAmpl = other.fdFitAmpl;
200 fdFitZL = other.fdFitZL;
201 fdFitEdep = other.fdFitEdep;
202 fdFitR2 = other.fdFitR2;
203 fdFitTimeMax = other.fdFitTimeMax;
204 fuFitWfm = other.fuFitWfm;
205 }
206 return *this;
207}
208
209
ClassImp(CbmConverterManager)
Data class for PSD digital signal processing (DSP)
Definition CbmPsdDsp.h:30
double fdAccum
ZeroLevel from waveform [adc counts].
Definition CbmPsdDsp.h:125
double fdFitZL
Amplitude from fit of waveform [mV].
Definition CbmPsdDsp.h:135
double fdEdep
Time of TimeSlice of measurement. Relative to first TS [ns].
Definition CbmPsdDsp.h:123
CbmPsdDsp & operator=(const CbmPsdDsp &)
uint32_t fuTimeMax
Minimum of waveform [adc samples].
Definition CbmPsdDsp.h:131
double fdTime
Unique channel address.
Definition CbmPsdDsp.h:121
uint32_t fuMinimum
Amplitude from waveform [mV].
Definition CbmPsdDsp.h:130
std::vector< uint16_t > fuWfm
Time of maximum in waveform [adc samples].
Definition CbmPsdDsp.h:132
uint32_t fuAddress
Definition CbmPsdDsp.h:120
double fdTsTime
Time of measurement relative to TS [ns].
Definition CbmPsdDsp.h:122
uint32_t fuZL
Energy deposition from FPGA [MeV].
Definition CbmPsdDsp.h:124
std::vector< uint16_t > fuFitWfm
Time of maximum in fit of waveform [adc samples].
Definition CbmPsdDsp.h:139
double fdFitR2
Energy deposition from fit of waveform [MeV].
Definition CbmPsdDsp.h:137
CbmPsdDsp()
Default constructor.
Definition CbmPsdDsp.cxx:21
double fdFitEdep
ZeroLevel from fit of waveform [adc counts].
Definition CbmPsdDsp.h:136
double fdFitAmpl
Definition CbmPsdDsp.h:134
double fdEdepWfm
Adc time of measurement.
Definition CbmPsdDsp.h:128
double fdAdcTime
FPGA FEE Accumulator.
Definition CbmPsdDsp.h:126
double fdAmpl
Energy deposition from waveform [MeV].
Definition CbmPsdDsp.h:129
double fdFitTimeMax
Quality of waveform fit [] – good near 0.
Definition CbmPsdDsp.h:138