33 std::ifstream
fin(
file.c_str());
36 return StatusCode::FAILURE;
41 std::vector<float> convfact;
48 std::array<unsigned int, 4096> sideALUT =
data[
"LucrodHighGain"][
"LUTs"][
"sideA"];
50 std::array<unsigned int, 4096> sideCLUT =
data[
"LucrodHighGain"][
"LUTs"][
"sideC"];
52 std::array<unsigned int, 256> combLUT =
data[
"LucrodHighGain"][
"LUTs"][
"comb"];
59 return StatusCode::SUCCESS;
69 const EventContext &ctx = Gaudi::Hive::currentContext();
75 std::vector<float> moduleEnergy = {0., 0., 0., 0., 0., 0., 0., 0.};
80 for (
const auto zdcModule : *zdcModules)
82 if (zdcModule->zdcType() == 0)
85 ATH_MSG_DEBUG(
"ZDC Side " << zdcModule->zdcSide() <<
", Module: " << zdcModule->zdcModule() <<
" and Energy: " << zdcModuleCalibEnergyHandle(*zdcModule));
89 if (zdcModule->zdcSide() > 0)
91 moduleEnergy.at(zdcModule->zdcModule()) = (!
m_energyToADCScaleFactor && LucrodTriggerAmpAcc.
isAvailable(*zdcModule)) ?
static_cast<float>(LucrodTriggerAmpAcc(*zdcModule)) : zdcModuleCalibEnergyHandle(*zdcModule);
95 if (zdcModule->zdcSide() < 0)
97 moduleEnergy.at(zdcModule->zdcModule() + 4) = (!
m_energyToADCScaleFactor && LucrodTriggerAmpAcc.
isAvailable(*zdcModule)) ?
static_cast<float>(LucrodTriggerAmpAcc(*zdcModule)) : zdcModuleCalibEnergyHandle(*zdcModule);
110 std::bitset<3>
bin(wordOut);
120 unsigned int word0 = 0;
121 word0 += (
bin[0] << 25);
122 word0 += (
bin[1] << 26);
123 word0 += (
bin[2] << 27);
130 ATH_MSG_DEBUG(
"Stored ZDC CTP object with words " << std::hex << (zdcCTP->cableWord0()) <<
" from LUTOutput " << std::dec << wordOut);
131 return StatusCode::SUCCESS;