CbmRoot
Loading...
Searching...
No Matches
CbmPsdDsp.h
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
15#ifndef CbmPsdDsp_H
16#define CbmPsdDsp_H 1
17
18#include "CbmDefs.h" // for ECbmModuleId::kPsd
19#include "CbmPsdAddress.h" // for CbmPsdAddress
20
21#include <Rtypes.h> // for THashConsistencyHolder, ClassDefNV
22
23#include <boost/serialization/access.hpp>
24#include <boost/serialization/base_object.hpp>
25
26#include <cstdint>
27#include <string> // for string
28
29
30class CbmPsdDsp {
31
32public:
35 CbmPsdDsp();
36
37
40 CbmPsdDsp(uint32_t address, double time, double ts_time, double edep, uint32_t zl, double accum, double adc_time,
41 double edep_wfm, double ampl, uint32_t minimum, uint32_t time_max, std::vector<std::uint16_t> wfm,
42 double fit_ampl, double fit_zl, double fit_edep, double fit_r2, double fit_time_max,
43 std::vector<std::uint16_t> fit_wfm);
44
45
47 CbmPsdDsp(const CbmPsdDsp&);
48
49
52
53
56
57
60
61
63 ~CbmPsdDsp();
64
65
69 static const char* GetClassName() { return "CbmPsdDsp"; }
70
71
75 uint32_t GetAddress() const { return fuAddress; };
76
77
81 double GetTime() const { return fdTime; };
82
83
87 double GetTsTime() const { return fdTsTime; };
88
89
93 double GetEdep() const { return fdEdep; };
94
95
100
101
106
107
112
113
115 void SetAddress(uint32_t address) { fuAddress = address; };
116 void SetAddress(uint32_t moduleId, uint32_t sectionId);
117 void SetTime(double time) { fdTime = time; }
118 void SetEdep(double edep) { fdEdep = edep; }
119
120 uint32_t fuAddress = 0;
121 double fdTime = -1.;
122 double fdTsTime = -1.;
123 double fdEdep = 0.;
124 uint32_t fuZL = 0;
125 double fdAccum = 0;
126 double fdAdcTime = -1.;
127
128 double fdEdepWfm = 0.;
129 double fdAmpl = 0.;
130 uint32_t fuMinimum = 0;
131 uint32_t fuTimeMax = 0;
132 std::vector<uint16_t> fuWfm = std::vector<uint16_t>(32, 0);
133
134 double fdFitAmpl = 0.;
135 double fdFitZL = 0.;
136 double fdFitEdep = 0.;
137 double fdFitR2 = 999.;
138 double fdFitTimeMax = -1.;
139 std::vector<uint16_t> fuFitWfm = std::vector<uint16_t>(32, 0);
140
141 template<class Archive>
142 void serialize(Archive& ar, const unsigned int /*version*/)
143 {
144 ar& fuAddress;
145 ar& fdTime;
146 ar& fdTsTime;
147 ar& fdEdep;
148 ar& fuZL;
149 ar& fdAccum;
150 ar& fdAdcTime;
151
152 ar& fdEdepWfm;
153 ar& fdAmpl;
154 ar& fuMinimum;
155 ar& fuTimeMax;
156 ar& fuWfm;
157
158 ar& fdFitAmpl;
159 ar& fdFitZL;
160 ar& fdFitEdep;
161 ar& fdFitR2;
162 ar& fdFitTimeMax;
163 ar& fuFitWfm;
164 }
165
166private:
169
170
172};
173
174#endif // CbmPsdDsp_H
ECbmModuleId
Definition CbmDefs.h:39
@ kPsd
Projectile spectator detector.
static uint32_t GetSectionId(uint32_t address)
Return sector ID from address.
static uint32_t GetModuleId(uint32_t address)
Return module ID from address.
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
void SetTime(double time)
Definition CbmPsdDsp.h:117
double GetTime() const
Time.
Definition CbmPsdDsp.h:81
double GetModuleID() const
Module Identifier.
Definition CbmPsdDsp.h:99
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 GetAddress() const
Address.
Definition CbmPsdDsp.h:75
double GetTsTime() const
TsTime.
Definition CbmPsdDsp.h:87
void serialize(Archive &ar, const unsigned int)
Definition CbmPsdDsp.h:142
void SetEdep(double edep)
Definition CbmPsdDsp.h:118
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
static const char * GetClassName()
Class name (static)
Definition CbmPsdDsp.h:69
ClassDefNV(CbmPsdDsp, 1)
double fdFitR2
Energy deposition from fit of waveform [MeV].
Definition CbmPsdDsp.h:137
double GetEdep() const
Energy deposit.
Definition CbmPsdDsp.h:93
CbmPsdDsp()
Default constructor.
Definition CbmPsdDsp.cxx:21
void SetAddress(uint32_t address)
Definition CbmPsdDsp.h:115
double fdFitEdep
ZeroLevel from fit of waveform [adc counts].
Definition CbmPsdDsp.h:136
static ECbmModuleId GetSystem()
System identifier.
Definition CbmPsdDsp.h:111
void SetAddress(uint32_t moduleId, uint32_t sectionId)
friend class boost::serialization::access
BOOST serialization interface.
Definition CbmPsdDsp.h:168
double fdFitAmpl
Definition CbmPsdDsp.h:134
double fdEdepWfm
Adc time of measurement.
Definition CbmPsdDsp.h:128
double GetSectionID() const
Section Identifier.
Definition CbmPsdDsp.h:105
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