Commit a49b7faa authored by legoc's avatar legoc
Browse files

Corrected masks for eventEnergy()

parent 1ce8b4dd
Version 1.2.1, YYYY-MM-DD
-------------------------
- Corrected masks for eventEnergy() function according to the number of bits defined.
Version 1.2.0, 2018-09-20
-------------------------
......
......@@ -83,14 +83,21 @@ uint16_t eventEnergyResolution(Event const & event) {
uint16_t eventEnergy(Event const & event) {
if (event.boardType() == CFD
|| event.boardType() == C1724_PHA_RT
|| event.boardType() == C1730_PHA_RT
|| event.boardType() == C1740_QDC
|| event.boardType() == C1725_PHA_RT) {
if (event.boardType() == CFD) {
return event.data[0] & 0xFFF;
}
else if (event.boardType() == C1724_PHA_RT) {
return event.data[0] & 0x7FFF;
}
else if (event.boardType() == C1730_PHA_RT) {
return event.data[0] & 0x7FFF;
}
else if (event.boardType() == C1740_QDC) {
return event.data[0] & 0xFFFF;
}
else if (event.boardType() == C1725_PHA_RT) {
return event.data[0] & 0x7FFF;
}
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment