1 #ifndef CALOBASE_RAWTOWERDEFS_H
2 #define CALOBASE_RAWTOWERDEFS_H
13 namespace RawTowerDefs
56 const unsigned int tower_index_2)
60 if (tower_index_1 < 0xFFF && tower_index_2 < 0xFFF)
66 std::cout <<
"too large index1 and/or index2; index1: "
67 << tower_index_1 <<
" (max val " << 0xFFF <<
")"
69 << tower_index_2 <<
" (max val " << 0xFFF <<
")" << std::endl;
83 if (tower_index < 0xFFFFFF)
89 std::cout <<
"too large index; index: " << tower_index
90 <<
" (max val " << 0xFFFFFF <<
")" << std::endl;
110 return (calo_tower_id) &0xFFFFFF;
126 return calo_tower_id & 0xFFF;
140 return (calo_tower_id >> (bitsIndex2+bitsIndex3)) & 0x3FF;
150 return (calo_tower_id >> (bitsIndex3)) & 0x3FF;
159 return calo_tower_id & 0xF;
166 const unsigned int tower_index_2,
const unsigned int tower_index_3)
174 if (tower_index_1 < 0x3FF && tower_index_2 < 0x3FF && tower_index_3 < 0xF)
176 calo_tower_id = (calo_id <<
RawTowerDefs::tower_idbits) + (tower_index_1 << (bitsIndex2+bitsIndex3)) + (tower_index_2 << bitsIndex3) + tower_index_3;
180 std::cout <<
"too large index1 and/or index2; index1: "
181 << tower_index_1 <<
" (max val " << 0x3FF <<
")"
183 << tower_index_2 <<
" (max val " << 0x3FF <<
")"
185 << tower_index_3 <<
" (max val " << 0xF <<
")"<< std::endl;
192 return calo_tower_id;
243 return "EEMC_crystal";
284 <<
"Invalid calorimeter ID passed to RawTowerDefs::convert_caloid_to_name"
295 if (caloname ==
"NONE")
298 else if (caloname ==
"CEMC")
301 else if (caloname ==
"DRCALO")
304 else if (caloname ==
"HCALIN")
307 else if (caloname ==
"HCALOUT")
310 else if (caloname ==
"EEMC")
313 else if (caloname ==
"EHCAL")
316 else if (caloname ==
"FEMC")
319 else if (caloname ==
"FHCAL")
322 else if (caloname ==
"EEMC_crystal")
325 else if (caloname ==
"EEMC_glass")
328 else if (caloname ==
"LFHCAL")
331 else if (caloname ==
"BECAL")
334 else if (caloname ==
"ZDC")
337 else if (caloname ==
"B0ECAL")
340 else if (caloname ==
"BWD_0")
343 else if (caloname ==
"BWD_1")
346 else if (caloname ==
"BWD_2")
349 else if (caloname ==
"BWD_3")
352 else if (caloname ==
"BWD_4")
357 std::cout <<
"Invalid calorimeter name " << caloname
358 <<
" passed to RawTowerDefs::convert_name_to_caloid" << std::endl;