56 <<
" BCID = " << eventInfo->
bcid()
59 const std::vector<xAOD::EventInfo::StreamTag>& evtStreamTags = eventInfo->
streamTags();
60 if (!evtStreamTags.empty()) {
61 msg(MSG::DEBUG) <<
" stream name/type:";
62 for (
const auto& evtStreamTag : evtStreamTags) {
63 msg(MSG::DEBUG) <<
" " << evtStreamTag.name() <<
"/" << evtStreamTag.type();
76 std::vector<int> drawers[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
77 std::vector<int> channels[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
78 std::vector<float> pedestals[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
79 std::vector<float> hfns[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
81 int nChannelsInPartition = 2880;
82 for (
unsigned int partition = 0; partition < Tile::MAX_ROS - 1; ++partition) {
83 if (partition > 1) nChannelsInPartition = 2048;
84 for (
unsigned int gain : {0, 1}) {
85 drawers[partition][gain].reserve(nChannelsInPartition);
86 channels[partition][gain].reserve(nChannelsInPartition);
87 pedestals[partition][gain].reserve(nChannelsInPartition);
88 hfns[partition][gain].reserve(nChannelsInPartition);
101 if (digitsCollection->empty() )
continue;
103 if (digitsCollection->getLvl1Type() != lvl1TriggerType) {
104 ATH_MSG_DEBUG(
"Level1 Trigger Type in Tile digits [0x" << std::hex
105 << digitsCollection->getLvl1Type() <<
"] != [0x"
106 << lvl1TriggerType << std::dec <<
"] from the event info");
110 HWIdentifier adc_id = digitsCollection->front()->adc_HWID();
114 int partition = ros - 1;
116 unsigned int nBadOrDisconnectedChannels = 0;
118 if (
m_cabling->isDisconnected(ros, drawer, channel)) {
119 ++nBadOrDisconnectedChannels;
124 if (digitsCollection->size() < nRequiredChannels) {
125 ATH_MSG_DEBUG(
"Number of Tile channels with digits [" << digitsCollection->size()
126 <<
"] less than expected [" << nRequiredChannels <<
"]");
132 int fragId = digitsCollection->identify();
137 for (
const TileDigits* tile_digits : *digitsCollection) {
139 adc_id = tile_digits->adc_HWID();
148 if (checkDQ && !(dqStatus->
isAdcDQgood(ros, drawer, channel, adc))) {
158 if (badChannels->getAdcStatus(adc_id).isBad()) {
163 std::vector<float> digits = tile_digits->samples();
165 double sampleMean = 0.0;
166 double sampleRMS = 0.0;
167 unsigned int nSamples = digits.size();
169 for (
double sample : digits) {
170 sampleMean += sample;
171 sampleRMS += sample * sample;
175 double pedestal = digits[0];
178 if (!
m_cabling->isDisconnected(ros, drawer, channel)) {
185 drawers[partition][adc].push_back(drawer);
186 channels[partition][adc].push_back(channel);
187 pedestals[partition][adc].push_back(pedestal);
189 sampleMean /= nSamples;
190 sampleRMS = sampleRMS / nSamples - sampleMean * sampleMean;
191 sampleRMS = (sampleRMS > 0.0) ? sqrt(sampleRMS * nSamples / (nSamples - 1)) : 0.0;
193 hfns[partition][adc].push_back(sampleRMS);
200 for (
unsigned int partition = 0; partition < Tile::MAX_ROS - 1; ++partition) {
201 for (
unsigned int gain = 0; gain < Tile::MAX_GAIN; ++gain) {
202 if (!pedestals[partition][gain].
empty()) {
215 fill(
"TileDigiNoiseMonExecuteTime", timer);
217 return StatusCode::SUCCESS;