45 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
48 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
51 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
55 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
58 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
62 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
65 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
70 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
73 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
77 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
80 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
88 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
91 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
94 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
97 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
100 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
103 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
107 return StatusCode::SUCCESS;
118 if (ctx.evt() % 1000 == 0) {
132 if (cispar[8] != 0)
return StatusCode::SUCCESS;
134 int cap = (cispar[7] > 10) ? 0 : 1;
135 double injectionTime = cispar[5] * 0.104;
136 double chargeForNormalModule = (cispar[6] < 1024) ? cispar[6] *
m_dac2Charge[cap] : 0.;
138 double chargeForDemonstrator = cap ? chargeForNormalModule * 0.5 : chargeForNormalModule;
139 double invChargeForNormalModule = (chargeForNormalModule != 0) ? 1.0 / chargeForNormalModule : 0.;
140 double invChargeForDemonstrator = (chargeForDemonstrator != 0) ? 1.0 / chargeForDemonstrator : 0.;
144 std::array<double, 2> minChargeForNormalModule = {(cap ? 10. : 15.), 1.};
145 std::array<double, 2> minChargeForDemonstrator = {(cap ? 10. : 15.), 2.};
149 std::array<double, 2> maxChargeForNormalModule = {750., 11.5};
150 std::array<double, 2> maxChargeForDemonstrator = {750., 23.0};
157 bool corruptedData[Tile::MAX_ROS - 1][Tile::MAX_DRAWER][Tile::MAX_GAIN][
MAX_DMU]={{{{
false}}}};
163 if (digitsCollection->empty() )
continue;
165 HWIdentifier adc_id = digitsCollection->front()->adc_HWID();
170 std::vector<uint32_t>
headers = digitsCollection->getFragChipHeaderWords();
174 int fragId = digitsCollection->identify();
176 for (
int dmu = 0; dmu < nDMU; ++dmu) {
185 float partitionTimeSum[Tile::MAX_ROS-1] = {0};
187 float offlineTime[Tile::MAX_ROS-1][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN] = {{{{0}}}};
188 float offlineAmplitude[Tile::MAX_ROS-1][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN] = {{{{0}}}};
197 if (rawChannelCollection->empty())
continue;
199 HWIdentifier adc_id = rawChannelCollection->front()->adc_HWID();
205 int fragId = rawChannelCollection->identify();
208 std::array<double, 2>& minCharge = demonstrator ? minChargeForDemonstrator : minChargeForNormalModule;
209 std::array<double, 2>& maxCharge = demonstrator ? maxChargeForDemonstrator : maxChargeForNormalModule;
210 double charge = demonstrator ? chargeForDemonstrator : chargeForNormalModule;
211 double invCharge = demonstrator ? invChargeForDemonstrator : invChargeForNormalModule;
214 adc_id = rawChannel->adc_HWID();
222 float amplitude = rawChannel->amplitude();
230 rawChannel->cell_ID_index(
index,
pmt);
240 float time = rawChannel->time();
273 double ratio = amplitude * invCharge;
295 for (
unsigned int gain = 0;
gain < Tile::MAX_GAIN; ++
gain) {
299 float timeCorrected = time - averagePartitionTime;
319 if (rawChannelCollection->empty() )
continue;
321 HWIdentifier adc_id = rawChannelCollection->front()->adc_HWID();
328 adc_id = rawChannel->adc_HWID();
336 float amplitude = rawChannel->amplitude();
344 rawChannel->cell_ID_index(
index,
pmt);
357 float amplitudeDiff = (amplitude - offline_amplitude) / offline_amplitude;
362 float time = rawChannel->time();
367 if (offline_time != 0.) {
368 float timeDiff = time - offline_time;
373 float chi2 = rawChannel->quality();
382 fill(
"TileRawChannelMonExecuteTime",
timer);
384 return StatusCode::SUCCESS;