24 return StatusCode::SUCCESS;
30 std::vector<const TileCell*> mbtsContainer;
32 ATH_MSG_DEBUG (
"Successfully retrieved mbtsContainer collection of size " << mbtsContainer.size());
38 for(
auto mbtsTile: mbtsContainer ){
42 int type_id = TileHelper->
type(
id);
48 unsigned int module_id = TileHelper->
module(
id);
53 if(abs(type_id) != 1) {
66 unsigned int bit_pos = 0;
75 ATH_CHECK(bit_pos < triggerEnergies.size());
76 triggerEnergies[bit_pos] = mbtsTile->energy();
77 ATH_MSG_DEBUG(
"Counter id = " << bit_pos <<
", energy = " << triggerEnergies[bit_pos] <<
" pC");
81 triggerTimes[bit_pos] = mbtsTile->time();
82 ATH_MSG_DEBUG(
"Counter id = " << bit_pos <<
", time = " << triggerTimes[bit_pos] <<
" ns");
87 static const std::vector<int> channelID({0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
88 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31});
92 double weightedTime = 0;
96 weightedTime += triggerTimes[
i] * triggerEnergies[
i];
99 const double timeDelta = (
weights == 0 ? -999.0 : weightedTime/
weights);
106 auto trigMbtsContainer = std::make_unique< xAOD::TrigT2MbtsBitsContainer>();
107 auto trigMbtsAuxContainer = std::make_unique< xAOD::TrigT2MbtsBitsAuxContainer>();
108 trigMbtsContainer->setStore(trigMbtsAuxContainer.get());
111 trigMbtsContainer->push_back(mbtsObj);
117 ATH_CHECK(mbtsHandle.
record( std::move(trigMbtsContainer), std::move( trigMbtsAuxContainer ) ) );
118 return StatusCode::SUCCESS;