#include <CscRODReadOut.h>
|
| | CscRODReadOut () |
| | CscRODReadOut (double startTime, double signalWidth, uint16_t numIntegration) |
| | ~CscRODReadOut ()=default |
| uint32_t | getHeaderSize () const |
| uint32_t | getFooterSize () const |
| uint32_t | numSamples () const |
| uint32_t | latency () const |
| uint32_t | samplingRate () const |
| uint32_t | numDPU () const |
| uint32_t | dpuHeader () const |
| uint32_t | dpuHeaderSize () const |
| double | getStartTime () const |
| double | getConversion () const |
| double | getMaxTimeBin () const |
| uint32_t | getSourceID (uint16_t side, uint16_t rodId) const |
| void | encodeFragments (const std::vector< uint16_t > &litude, std::vector< uint32_t > &v) const |
| void | set (const CscIdHelper *cscIdHelper) |
| void | setChamberBitVaue (uint32_t value) |
| void | setParams (double timeOffset, double signalWidth) |
| 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 sourceIdIDIn, uint16_t &sourceID, uint16_t &moduleType, uint16_t &subDetectorId, uint16_t &rodId) const |
| void | decodeAmplitude (const uint32_t fragment, uint16_t &1, uint16_t &2) const |
| uint32_t | fragmentToAddress (const uint32_t fragment) const |
| Identifier | decodeAddress (const uint32_t address) const |
| uint32_t | hashIdentifier (const uint32_t address, const Identifier &moduleId) const |
| uint32_t | numberOfStrips (const uint32_t fragment) const |
| Identifier | decodeAddress (const uint32_t address, const Identifier &moduleId) const |
| Identifier | decodeAddress (const uint32_t address, const Identifier &moduleId, int j) const |
| double | signal_amplitude (double samplingTime) const |
| uint32_t | address (const Identifier &channelId, int &eta, int &phi) const |
|
| static int | findCharge (double samplingTime, const std::vector< uint16_t > &litude, double &time) |
|
| void | set32bits (const uint16_t *v16, uint32_t &v32) const |
| double | signal (double z) const |
Definition at line 22 of file CscRODReadOut.h.
◆ CscRODReadOut() [1/2]
| CscRODReadOut::CscRODReadOut |
( |
| ) |
|
Definition at line 8 of file CscRODReadOut.cxx.
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
37}
uint32_t m_chamberBitValue
int m_NUMBER_OF_INTEGRATION
double m_CHARGE_TO_ADC_COUNT
const CscIdHelper * m_cscIdHelper
double signal(double z) const
◆ CscRODReadOut() [2/2]
| CscRODReadOut::CscRODReadOut |
( |
double | startTime, |
|
|
double | signalWidth, |
|
|
uint16_t | numIntegration ) |
◆ ~CscRODReadOut()
| CscRODReadOut::~CscRODReadOut |
( |
| ) |
|
|
default |
◆ address()
| uint32_t CscRODReadOut::address |
( |
const Identifier & | channelId, |
|
|
int & | eta, |
|
|
int & | phi ) const |
|
inline |
Definition at line 254 of file CscRODReadOut.h.
254 {
255
263
264
265
266
274
276
277
279 nameIndex << 16 |
phiIndex << 13 | etaIndex << 12 | chamberIndex << 11 | layerIndex << 9 | stripType << 8 | stripNumber;
280
282}
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/3]
| Identifier CscRODReadOut::decodeAddress |
( |
const uint32_t | address | ) |
const |
|
inline |
Definition at line 161 of file CscRODReadOut.h.
161 {
165
166 return m_cscIdHelper->elementID(stationName, stationEta, stationPhi);
167}
constexpr uint8_t stationPhi
station Phi 1 to 8
constexpr uint8_t stationEta
1 to 3
◆ decodeAddress() [2/3]
| Identifier CscRODReadOut::decodeAddress |
( |
const uint32_t | address, |
|
|
const Identifier & | moduleId ) const |
|
inline |
Definition at line 171 of file CscRODReadOut.h.
171 {
173
174 int wireLayer = ((
address & 0x00000600) >> 9) + 1;
175 int measuresPhi = ((
address & 0x00000100) >> 8);
176
178
180
181
182 if (measuresPhi) {
184 }
185
186 return m_cscIdHelper->channelID(moduleId, chamberLayer, wireLayer, measuresPhi,
strip);
187}
◆ decodeAddress() [3/3]
| Identifier CscRODReadOut::decodeAddress |
( |
const uint32_t | address, |
|
|
const Identifier & | moduleId, |
|
|
int | j ) const |
|
inline |
Definition at line 191 of file CscRODReadOut.h.
191 {
193
194 int wireLayer = ((
address & 0x00000600) >> 9) + 1;
195 int measuresPhi = ((
address & 0x00000100) >> 8);
197
198
199 if (measuresPhi) {
202 }
203
204 return m_cscIdHelper->channelID(moduleId, chamberLayer, wireLayer, measuresPhi,
strip);
205}
◆ decodeAmplitude()
| void CscRODReadOut::decodeAmplitude |
( |
const uint32_t | fragment, |
|
|
uint16_t & | amp1, |
|
|
uint16_t & | amp2 ) const |
|
inline |
Definition at line 154 of file CscRODReadOut.h.
154 {
155 amp2 = 0x0000FFFF & fragment;
156 amp1 = (0xFFFF0000 & fragment) >> 16;
157}
◆ decodeSourceID()
| void CscRODReadOut::decodeSourceID |
( |
uint32_t | sourceIdIDIn, |
|
|
uint16_t & | sourceID, |
|
|
uint16_t & | moduleType, |
|
|
uint16_t & | subDetectorId, |
|
|
uint16_t & | rodId ) const |
|
inline |
Definition at line 121 of file CscRODReadOut.h.
122 {
123 sourceID = (sourceIDIn & 0xff000000) >> 24;
124 moduleType = (sourceIDIn & 0x00ff0000) >> 16;
125 subDetectorId = (sourceIDIn & 0x0000ff00) >> 8;
126 rodId = (sourceIDIn & 0x000000ff);
127}
◆ discard()
| bool CscRODReadOut::discard |
( |
const uint32_t | fragment | ) |
const |
|
inline |
◆ dpuHeader()
| uint32_t CscRODReadOut::dpuHeader |
( |
| ) |
const |
|
inline |
Definition at line 37 of file CscRODReadOut.h.
static const uint32_t DPU_HEADER_MARKER
◆ dpuHeaderSize()
| uint32_t CscRODReadOut::dpuHeaderSize |
( |
| ) |
const |
|
inline |
◆ encodeFragments()
| void CscRODReadOut::encodeFragments |
( |
const std::vector< uint16_t > & | amplitude, |
|
|
std::vector< uint32_t > & | v ) const |
pedestal
Definition at line 53 of file CscRODReadOut.cxx.
53 {
54 int numberOfFragments = amplitude.size();
55
56
58
59 int j = 0;
60 while (j < numberOfFragments) {
63 for (
int i = 0;
i < 2;
i++) { amp[
i] = (
BODY_AMPLITUDE << 12) | amplitude[i + j]; }
66 j += 2;
67 }
68}
void set32bits(const uint16_t *v16, uint32_t &v32) const
static const uint16_t BODY_AMPLITUDE
◆ findCharge()
| int CscRODReadOut::findCharge |
( |
double | samplingTime, |
|
|
const std::vector< uint16_t > & | amplitude, |
|
|
double & | time ) |
|
static |
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 70 of file CscRODReadOut.cxx.
70 {
71
72
75
76 int numberOfSamplings = amplitude.size();
77
79 int maxIndex = -1;
80 for (
int i = 0;
i < numberOfSamplings;
i++) {
81 if (amplitude[i] >
max) {
84 }
85 }
86
88 if (maxIndex < 0 || maxIndex >= numberOfSamplings)
return charge;
89
91 if (maxIndex == 0)
92 return amplitude[0];
93 else if (maxIndex == (numberOfSamplings - 1))
94 return amplitude[numberOfSamplings - 1];
95 else {
97 double y1 = amplitude[maxIndex - 1];
98 double y2 = amplitude[maxIndex];
99 double y3 = amplitude[maxIndex + 1];
100 a = 0.5 * (y3 +
y1 - 2 *
y2);
103
106 double offset = (
a == 0) ? 0 : -
b / (2 *
a);
110 }
111}
double charge(const T &p)
time(flags, cells_name, *args, **kw)
◆ fragmentToAddress()
| uint32_t CscRODReadOut::fragmentToAddress |
( |
const uint32_t | fragment | ) |
const |
|
inline |
◆ getConversion()
| double CscRODReadOut::getConversion |
( |
| ) |
const |
|
inline |
◆ getFooterSize()
| uint32_t CscRODReadOut::getFooterSize |
( |
| ) |
const |
|
inline |
◆ getHeaderSize()
| uint32_t CscRODReadOut::getHeaderSize |
( |
| ) |
const |
|
inline |
◆ getMaxTimeBin()
| double CscRODReadOut::getMaxTimeBin |
( |
| ) |
const |
|
inline |
◆ getSourceID()
| uint32_t CscRODReadOut::getSourceID |
( |
uint16_t | side, |
|
|
uint16_t | rodId ) const |
|
inline |
Definition at line 115 of file CscRODReadOut.h.
115 {
118 return sourceIdentifier;
119}
static const uint16_t MODULE_TYPE
static const uint16_t SOURCE_ID
◆ getStartTime()
| double CscRODReadOut::getStartTime |
( |
| ) |
const |
|
inline |
◆ hashIdentifier()
| uint32_t CscRODReadOut::hashIdentifier |
( |
const uint32_t | address, |
|
|
const Identifier & | moduleId ) const |
|
inline |
Definition at line 209 of file CscRODReadOut.h.
209 {
211
212 int wireLayer = ((
address & 0x00000600) >> 9) + 1;
213 int measuresPhi = ((
address & 0x00000100) >> 8);
215
216
217 if (measuresPhi) {
220 }
221
222 Identifier
id =
m_cscIdHelper->channelID(moduleId, chamberLayer, wireLayer, measuresPhi,
strip);
226 throw (std::runtime_error("CscRODReadOut::hashIdentifier: Unable to get identifier!"));
227 };
228 return (uint32_t)
hash;
229}
◆ isAddress()
| bool CscRODReadOut::isAddress |
( |
const uint32_t | fragment | ) |
const |
|
inline |
Definition at line 149 of file CscRODReadOut.h.
149 {
150 uint32_t addressTest = (fragment >> 17);
152}
static const uint32_t BODY_ADDRESS
◆ isAmplitude()
| bool CscRODReadOut::isAmplitude |
( |
const uint16_t | fragment | ) |
const |
|
inline |
◆ isDPU()
| bool CscRODReadOut::isDPU |
( |
const uint32_t | fragment | ) |
const |
|
inline |
◆ latency()
| uint32_t CscRODReadOut::latency |
( |
| ) |
const |
|
inline |
◆ numberOfStrips()
| uint32_t CscRODReadOut::numberOfStrips |
( |
const uint32_t | fragment | ) |
const |
|
inline |
Definition at line 231 of file CscRODReadOut.h.
231 {
236}
Identifier decodeAddress(const uint32_t address) const
uint32_t fragmentToAddress(const uint32_t fragment) const
◆ numDPU()
| uint32_t CscRODReadOut::numDPU |
( |
| ) |
const |
|
inline |
◆ numSamples()
| uint32_t CscRODReadOut::numSamples |
( |
| ) |
const |
|
inline |
◆ samplingRate()
| uint32_t CscRODReadOut::samplingRate |
( |
| ) |
const |
|
inline |
◆ set()
| void CscRODReadOut::set |
( |
const CscIdHelper * | cscIdHelper | ) |
|
|
inline |
◆ set32bits()
| void CscRODReadOut::set32bits |
( |
const uint16_t * | v16, |
|
|
uint32_t & | v32 ) const |
|
inlineprivate |
Definition at line 129 of file CscRODReadOut.h.
129 {
133 for (uint16_t i = 0;
i <
n;
i++) {
136 v32 = v32 | (
v <<
p);
137 }
138}
◆ setChamberBitVaue()
| void CscRODReadOut::setChamberBitVaue |
( |
uint32_t | value | ) |
|
|
inline |
◆ setParams()
| void CscRODReadOut::setParams |
( |
double | timeOffset, |
|
|
double | signalWidth ) |
|
inline |
◆ signal()
| double CscRODReadOut::signal |
( |
double | z | ) |
const |
|
inlineprivate |
◆ signal_amplitude()
| double CscRODReadOut::signal_amplitude |
( |
double | samplingTime | ) |
const |
|
inline |
◆ BODY_ADDRESS
| const uint32_t CscRODReadOut::BODY_ADDRESS = 0x00000000 |
|
staticprivate |
◆ BODY_AMPLITUDE
| const uint16_t CscRODReadOut::BODY_AMPLITUDE = 0x0000 |
|
staticprivate |
◆ DPU_DISCARD
| const uint32_t CscRODReadOut::DPU_DISCARD = 0xFFFFFFFF |
|
staticprivate |
◆ DPU_HEADER_MARKER
| const uint32_t CscRODReadOut::DPU_HEADER_MARKER = 0xC5F38856 |
|
staticprivate |
◆ DPU_HEADER_SIZE
| const uint32_t CscRODReadOut::DPU_HEADER_SIZE = 13 |
|
staticprivate |
◆ LATENCY
| const uint32_t CscRODReadOut::LATENCY = 0 |
|
staticprivate |
◆ m_chamberBitValue
| uint32_t CscRODReadOut::m_chamberBitValue |
|
private |
◆ m_CHARGE_TO_ADC_COUNT
| double CscRODReadOut::m_CHARGE_TO_ADC_COUNT |
|
private |
◆ m_cscIdHelper
◆ m_norm
| double CscRODReadOut::m_norm |
|
private |
◆ m_NUMBER_OF_INTEGRATION
| int CscRODReadOut::m_NUMBER_OF_INTEGRATION |
|
private |
◆ m_SIGNAL_WIDTH
| double CscRODReadOut::m_SIGNAL_WIDTH |
|
private |
◆ m_TIME_OFFSET
| double CscRODReadOut::m_TIME_OFFSET |
|
private |
◆ m_Z0
| double CscRODReadOut::m_Z0 |
|
private |
◆ MODULE_TYPE
| const uint16_t CscRODReadOut::MODULE_TYPE = 0x00 |
|
staticprivate |
◆ NUM_DPU
| const uint32_t CscRODReadOut::NUM_DPU = 12 |
|
staticprivate |
◆ NUM_SAMPLES
| const uint32_t CscRODReadOut::NUM_SAMPLES = 25 |
|
staticprivate |
◆ RATE
| const uint32_t CscRODReadOut::RATE = 40 |
|
staticprivate |
◆ ROD_FOOTER_SIZE
| const uint32_t CscRODReadOut::ROD_FOOTER_SIZE = 0x0 |
|
staticprivate |
◆ ROD_HEADER_SIZE
| const uint32_t CscRODReadOut::ROD_HEADER_SIZE = 12 |
|
staticprivate |
◆ SOURCE_ID
| const uint16_t CscRODReadOut::SOURCE_ID = 0x00 |
|
staticprivate |
The documentation for this class was generated from the following files: