#include <CscRODReadOutV1.h>
|
| | CscRODReadOutV1 () |
| | CscRODReadOutV1 (double startTime, uint16_t samplingTime, double signalWidth, uint16_t numIntegration) |
| | ~CscRODReadOutV1 ()=default |
| uint32_t | getHeaderSize () |
| uint32_t | getFooterSize () |
| uint32_t | numSamples () |
| uint32_t | latency () |
| uint32_t | samplingRate () |
| uint32_t | numDPU () |
| void | triggerInfo (uint32_t *trigger) |
| uint32_t | dpuHeader () |
| uint32_t | dpuHeaderSize () |
| double | getSamplingTime () |
| void | setSamplingTime (double time) |
| double | getStartTime () |
| double | getConversion () |
| double | getMaxTimeBin () |
| uint32_t | getSourceID (uint16_t side, uint16_t rodId) |
| void | encodeFragments (const std::vector< uint16_t > &litude, std::vector< uint32_t > &v) const |
| void | set (const CscIdHelper *cscHelper) |
| void | setParams (double timeOffset, double samplingTime, double signalWidth) |
| void | setParams (double samplingTime) |
| bool | isDPU (const uint32_t fragment) const |
| bool | discard (const uint32_t fragment) const |
| bool | isAmplitude (const uint16_t fragment) const |
| bool | isAddress (const uint32_t fragment) const |
| void | decodeSourceID (uint32_t sourceId) |
| void | decodeAmplitude (const uint32_t fragment) |
| void | decodeAddress (const uint32_t fragment) |
| Identifier | decodeAddress () |
| uint32_t | hashIdentifier (const Identifier &moduleId) |
| uint32_t | numberOfStrips (const uint32_t fragment) |
| void | setAddress (const uint32_t address) |
| Identifier | decodeAddress (const Identifier &moduleId) |
| Identifier | decodeAddress (const Identifier &moduleId, int j) |
| int | findCharge (const std::vector< uint16_t > &litude, double &time) |
| double | signal_amplitude (double samplingTime) const |
| uint32_t | address (const Identifier &channelId, int &eta, int &phi) const |
| uint16_t | sourceID () const |
| uint16_t | moduleType () const |
| uint16_t | subDetectorId () const |
| uint16_t | rodId () const |
| uint16_t | getAmp1 () const |
| uint16_t | getAmp2 () const |
| uint32_t | address () const |
|
| void | set32bits (const uint16_t *v16, uint32_t &v32) const |
| double | signal (double z) const |
Definition at line 19 of file CscRODReadOutV1.h.
◆ CscRODReadOutV1() [1/2]
| CscRODReadOutV1::CscRODReadOutV1 |
( |
| ) |
|
Definition at line 8 of file CscRODReadOutV1.cxx.
8 :
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
39
40
42}
uint32_t m_TRIGGER_INFO[3]
int m_NUMBER_OF_INTEGRATION
double m_CHARGE_TO_ADC_COUNT
double signal(double z) const
const CscIdHelper * m_cscHelper
◆ CscRODReadOutV1() [2/2]
| CscRODReadOutV1::CscRODReadOutV1 |
( |
double | startTime, |
|
|
uint16_t | samplingTime, |
|
|
double | signalWidth, |
|
|
uint16_t | numIntegration ) |
◆ ~CscRODReadOutV1()
| CscRODReadOutV1::~CscRODReadOutV1 |
( |
| ) |
|
|
default |
◆ address() [1/2]
| uint32_t CscRODReadOutV1::address |
( |
| ) |
const |
|
inline |
◆ address() [2/2]
| uint32_t CscRODReadOutV1::address |
( |
const Identifier & | channelId, |
|
|
int & | eta, |
|
|
int & | phi ) const |
|
inline |
Definition at line 266 of file CscRODReadOutV1.h.
266 {
267
271 int chamberLayer =
m_cscHelper->chamberLayer(channelId);
273 int orientation =
m_cscHelper->measuresPhi(channelId);
275
276
284
285
287 nameIndex << 16 |
phiIndex << 13 | etaIndex << 12 | chamberIndex << 11 | layerIndex << 9 | stripType << 8 | stripNumber;
288
290}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
uint32_t address(const Identifier &channelId, int &eta, int &phi) const
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
◆ decodeAddress() [1/4]
Definition at line 207 of file CscRODReadOutV1.h.
207 {
211
212 return m_cscHelper->elementID(stationName, stationEta, stationPhi);
213}
constexpr uint8_t stationPhi
station Phi 1 to 8
constexpr uint8_t stationEta
1 to 3
◆ decodeAddress() [2/4]
Definition at line 217 of file CscRODReadOutV1.h.
217 {
218 int chamberLayer = ((
m_address & 0x00000800) >> 11) + 0;
219 int wireLayer = ((
m_address & 0x00000600) >> 9) + 0;
220 int measuresPhi = ((
m_address & 0x00000100) >> 8);
222 return m_cscHelper->channelID(moduleId, chamberLayer, wireLayer, measuresPhi,
strip);
223}
◆ decodeAddress() [3/4]
Definition at line 225 of file CscRODReadOutV1.h.
225 {
226 int chamberLayer = ((
m_address & 0x00000800) >> 11) + 0;
227 int wireLayer = ((
m_address & 0x00000600) >> 9) + 1;
228 int measuresPhi = ((
m_address & 0x00000100) >> 8);
230 return m_cscHelper->channelID(moduleId, chamberLayer, wireLayer, measuresPhi,
strip);
231}
◆ decodeAddress() [4/4]
| void CscRODReadOutV1::decodeAddress |
( |
const uint32_t | fragment | ) |
|
|
inline |
conversion of the chamnerLayer index into the new format
Definition at line 183 of file CscRODReadOutV1.h.
183 {
189 int chamberLayer = ((
address & 0x00000800) >> 11) + 1;
190 int wireLayer = ((
address & 0x00000600) >> 9) + 1;
191 int measuresPhi = ((
address & 0x00000100) >> 8);
193
194
202
203
204 m_address = nameIndex << 16 |
phiIndex << 13 | etaIndex << 12 | chamberIndex << 11 | layerIndex << 9 | stripType << 8 | stripNumber;
205}
◆ decodeAmplitude()
| void CscRODReadOutV1::decodeAmplitude |
( |
const uint32_t | fragment | ) |
|
|
inline |
◆ decodeSourceID()
| void CscRODReadOutV1::decodeSourceID |
( |
uint32_t | sourceId | ) |
|
|
inline |
◆ discard()
| bool CscRODReadOutV1::discard |
( |
const uint32_t | fragment | ) |
const |
|
inline |
◆ dpuHeader()
| uint32_t CscRODReadOutV1::dpuHeader |
( |
| ) |
|
|
inline |
◆ dpuHeaderSize()
| uint32_t CscRODReadOutV1::dpuHeaderSize |
( |
| ) |
|
|
inline |
◆ encodeFragments()
| void CscRODReadOutV1::encodeFragments |
( |
const std::vector< uint16_t > & | amplitude, |
|
|
std::vector< uint32_t > & | v ) const |
pedestal
Definition at line 66 of file CscRODReadOutV1.cxx.
66 {
67 int numberOfFragments = amplitude.size();
68
69
71
72 int j = 0;
73 while (j < numberOfFragments) {
76 for (
int i = 0;
i < 2;
i++) { amp[
i] = (
BODY_AMPLITUDE << 12) | amplitude[i + j]; }
79 j += 2;
80 }
81}
static const uint16_t BODY_AMPLITUDE
void set32bits(const uint16_t *v16, uint32_t &v32) const
◆ findCharge()
| int CscRODReadOutV1::findCharge |
( |
const std::vector< uint16_t > & | amplitude, |
|
|
double & | time ) |
do a parabolic fit - from Nir and David
calculate the charge and the time need to use the correct calibration
assuming amplitude[0] gives the pedestal
Definition at line 83 of file CscRODReadOutV1.cxx.
83 {
84
85
88
89 int numberOfSamplings = amplitude.size();
90
92 int maxIndex = -1;
93 for (
int i = 0;
i < numberOfSamplings;
i++) {
94 if (amplitude[i] >
max) {
97 }
98 }
99
101 if (maxIndex < 0 || maxIndex >= numberOfSamplings)
return charge;
102
104 if (maxIndex == 0)
105 return amplitude[0];
106 else if (maxIndex == (numberOfSamplings - 1))
107 return amplitude[numberOfSamplings - 1];
108 else {
110 double y1 = amplitude[maxIndex - 1];
111 double y2 = amplitude[maxIndex];
112 double y3 = amplitude[maxIndex + 1];
113 a = 0.5 * (y3 +
y1 - 2 *
y2);
116
119 double offset = (
a == 0) ? 0 : -
b / (2 *
a);
123 }
124}
double charge(const T &p)
time(flags, cells_name, *args, **kw)
◆ getAmp1()
| uint16_t CscRODReadOutV1::getAmp1 |
( |
| ) |
const |
|
inline |
◆ getAmp2()
| uint16_t CscRODReadOutV1::getAmp2 |
( |
| ) |
const |
|
inline |
◆ getConversion()
| double CscRODReadOutV1::getConversion |
( |
| ) |
|
|
inline |
◆ getFooterSize()
| uint32_t CscRODReadOutV1::getFooterSize |
( |
| ) |
|
|
inline |
◆ getHeaderSize()
| uint32_t CscRODReadOutV1::getHeaderSize |
( |
| ) |
|
|
inline |
◆ getMaxTimeBin()
| double CscRODReadOutV1::getMaxTimeBin |
( |
| ) |
|
|
inline |
◆ getSamplingTime()
| double CscRODReadOutV1::getSamplingTime |
( |
| ) |
|
|
inline |
◆ getSourceID()
| uint32_t CscRODReadOutV1::getSourceID |
( |
uint16_t | side, |
|
|
uint16_t | rodId ) |
|
inline |
Definition at line 140 of file CscRODReadOutV1.h.
140 {
143 return sourceIdentifier;
144}
static const uint16_t SOURCE_ID
static const uint16_t MODULE_TYPE
◆ getStartTime()
| double CscRODReadOutV1::getStartTime |
( |
| ) |
|
|
inline |
◆ hashIdentifier()
| uint32_t CscRODReadOutV1::hashIdentifier |
( |
const Identifier & | moduleId | ) |
|
|
inline |
Definition at line 233 of file CscRODReadOutV1.h.
233 {
234 int chamberLayer = ((
m_address & 0x00000800) >> 11) + 0;
235 int wireLayer = ((
m_address & 0x00000600) >> 9) + 1;
236 int measuresPhi = ((
m_address & 0x00000100) >> 8);
238 Identifier
id =
m_cscHelper->channelID(moduleId, chamberLayer, wireLayer, measuresPhi,
strip);
239 IdContext context =
m_cscHelper->channel_context();
242 return (uint32_t)
hash;
243}
◆ isAddress()
| bool CscRODReadOutV1::isAddress |
( |
const uint32_t | fragment | ) |
const |
|
inline |
Definition at line 173 of file CscRODReadOutV1.h.
173 {
174 uint32_t addressTest = (fragment >> 17);
176}
static const uint32_t BODY_ADDRESS
◆ isAmplitude()
| bool CscRODReadOutV1::isAmplitude |
( |
const uint16_t | fragment | ) |
const |
|
inline |
◆ isDPU()
| bool CscRODReadOutV1::isDPU |
( |
const uint32_t | fragment | ) |
const |
|
inline |
◆ latency()
| uint32_t CscRODReadOutV1::latency |
( |
| ) |
|
|
inline |
◆ moduleType()
| uint16_t CscRODReadOutV1::moduleType |
( |
| ) |
const |
|
inline |
◆ numberOfStrips()
| uint32_t CscRODReadOutV1::numberOfStrips |
( |
const uint32_t | fragment | ) |
|
|
inline |
◆ numDPU()
| uint32_t CscRODReadOutV1::numDPU |
( |
| ) |
|
|
inline |
◆ numSamples()
| uint32_t CscRODReadOutV1::numSamples |
( |
| ) |
|
|
inline |
◆ rodId()
| uint16_t CscRODReadOutV1::rodId |
( |
| ) |
const |
|
inline |
◆ samplingRate()
| uint32_t CscRODReadOutV1::samplingRate |
( |
| ) |
|
|
inline |
◆ set()
| void CscRODReadOutV1::set |
( |
const CscIdHelper * | cscHelper | ) |
|
|
inline |
◆ set32bits()
| void CscRODReadOutV1::set32bits |
( |
const uint16_t * | v16, |
|
|
uint32_t & | v32 ) const |
|
inlineprivate |
Definition at line 153 of file CscRODReadOutV1.h.
153 {
157 for (uint16_t i = 0;
i <
n;
i++) {
160 v32 = v32 | (
v <<
p);
161 }
162}
◆ setAddress()
| void CscRODReadOutV1::setAddress |
( |
const uint32_t | address | ) |
|
|
inline |
◆ setParams() [1/2]
| void CscRODReadOutV1::setParams |
( |
double | samplingTime | ) |
|
|
inline |
◆ setParams() [2/2]
| void CscRODReadOutV1::setParams |
( |
double | timeOffset, |
|
|
double | samplingTime, |
|
|
double | signalWidth ) |
|
inline |
◆ setSamplingTime()
| void CscRODReadOutV1::setSamplingTime |
( |
double | time | ) |
|
|
inline |
◆ signal()
| double CscRODReadOutV1::signal |
( |
double | z | ) |
const |
|
inlineprivate |
◆ signal_amplitude()
| double CscRODReadOutV1::signal_amplitude |
( |
double | samplingTime | ) |
const |
|
inline |
◆ sourceID()
| uint16_t CscRODReadOutV1::sourceID |
( |
| ) |
const |
|
inline |
◆ subDetectorId()
| uint16_t CscRODReadOutV1::subDetectorId |
( |
| ) |
const |
|
inline |
◆ triggerInfo()
| void CscRODReadOutV1::triggerInfo |
( |
uint32_t * | trigger | ) |
|
|
inline |
◆ BODY_ADDRESS
| const uint32_t CscRODReadOutV1::BODY_ADDRESS = 0x00000000 |
|
staticprivate |
◆ BODY_AMPLITUDE
| const uint16_t CscRODReadOutV1::BODY_AMPLITUDE = 0x0000 |
|
staticprivate |
◆ DPU_DISCARD
| const uint32_t CscRODReadOutV1::DPU_DISCARD = 0xFFFFFFFF |
|
staticprivate |
◆ DPU_HEADER_MARKER
| const uint32_t CscRODReadOutV1::DPU_HEADER_MARKER = 0xC5F38856 |
|
staticprivate |
◆ DPU_HEADER_SIZE
| const uint32_t CscRODReadOutV1::DPU_HEADER_SIZE = 13 |
|
staticprivate |
◆ LATENCY
| const uint32_t CscRODReadOutV1::LATENCY = 0 |
|
staticprivate |
◆ m_address
| uint32_t CscRODReadOutV1::m_address |
|
private |
◆ m_amp1
| uint16_t CscRODReadOutV1::m_amp1 |
|
private |
◆ m_amp2
| uint16_t CscRODReadOutV1::m_amp2 |
|
private |
◆ m_CHARGE_TO_ADC_COUNT
| double CscRODReadOutV1::m_CHARGE_TO_ADC_COUNT |
|
private |
◆ m_cscHelper
◆ m_moduleType
| uint16_t CscRODReadOutV1::m_moduleType |
|
private |
◆ m_norm
| double CscRODReadOutV1::m_norm |
|
private |
◆ m_NUMBER_OF_INTEGRATION
| int CscRODReadOutV1::m_NUMBER_OF_INTEGRATION |
|
private |
◆ m_rodId
| uint16_t CscRODReadOutV1::m_rodId |
|
private |
◆ m_SAMPLING_TIME
| double CscRODReadOutV1::m_SAMPLING_TIME |
|
private |
◆ m_SIGNAL_WIDTH
| double CscRODReadOutV1::m_SIGNAL_WIDTH |
|
private |
◆ m_sourceID
| uint16_t CscRODReadOutV1::m_sourceID |
|
private |
◆ m_subDetectorId
| uint16_t CscRODReadOutV1::m_subDetectorId |
|
private |
◆ m_TIME_OFFSET
| double CscRODReadOutV1::m_TIME_OFFSET |
|
private |
◆ m_TRIGGER_INFO
| uint32_t CscRODReadOutV1::m_TRIGGER_INFO[3] {} |
|
private |
◆ m_Z0
| double CscRODReadOutV1::m_Z0 |
|
private |
◆ MODULE_TYPE
| const uint16_t CscRODReadOutV1::MODULE_TYPE = 0x00 |
|
staticprivate |
◆ NUM_DPU
| const uint32_t CscRODReadOutV1::NUM_DPU = 12 |
|
staticprivate |
◆ NUM_SAMPLES
| const uint32_t CscRODReadOutV1::NUM_SAMPLES = 25 |
|
staticprivate |
◆ RATE
| const uint32_t CscRODReadOutV1::RATE = 40 |
|
staticprivate |
◆ ROD_FOOTER_SIZE
| const uint32_t CscRODReadOutV1::ROD_FOOTER_SIZE = 0x0 |
|
staticprivate |
◆ ROD_HEADER_SIZE
| const uint32_t CscRODReadOutV1::ROD_HEADER_SIZE = 12 |
|
staticprivate |
◆ SOURCE_ID
| const uint16_t CscRODReadOutV1::SOURCE_ID = 0x00 |
|
staticprivate |
The documentation for this class was generated from the following files: