14 static const InterfaceID IID_ITRT_FillCablingData_DC2
15 (
"TRT_FillCablingData_DC2", 1, 0);
20 (
const std::string&
type,
const std::string&
name,
const IInterface*
parent):
23 declareInterface<TRT_FillCablingData_DC2>(
this);
34 return IID_ITRT_FillCablingData_DC2;
48 return StatusCode::FAILURE;
58 ATH_MSG_INFO(
"TRT_FillCablingData_DC2::initializiation finished" );
60 return StatusCode::SUCCESS;
86 int numberOfWheelsB = 8;
106 int numberOfStrawsInPlaneAB = 768;
137 int numberOfStrawsB = 520;
138 int numberOfStrawsC = 793;
162 int numberOfStrawsInLayersA[] = {15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18,
163 18, 18, 18, 18, 19, 19, 19, 18};
165 int numberOfStrawsInLayersB[] = {19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21,
166 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 23};
168 int numberOfStrawsInLayersC[] = {23, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26,
169 26, 26, 26, 26, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 28};
174 int currentLayerID = 0;
175 int firstStrawInLayer = 0;
176 int firstStrawInNextLayer = numberOfStrawsInLayersA[currentLayerID];
183 if (
i == firstStrawInNextLayer)
186 firstStrawInLayer = firstStrawInNextLayer;
187 firstStrawInNextLayer += numberOfStrawsInLayersA[currentLayerID];
197 firstStrawInLayer = firstStrawInNextLayer;
198 firstStrawInNextLayer += numberOfStrawsInLayersB[currentLayerID -
209 firstStrawInLayer = firstStrawInNextLayer;
210 firstStrawInNextLayer += numberOfStrawsInLayersC[currentLayerID -
220 int numberOfStrawsInPreviousLayer;
225 numberOfStrawsInPreviousLayer = numberOfStrawsInLayersA[
i - 1];
227 numberOfStrawsInPreviousLayer =
230 numberOfStrawsInPreviousLayer =
244 log <<
MSG::DEBUG <<
"***** TRT_IdentifierConversion::printParameters *****"
306 log <<
MSG::DEBUG <<
" numberOfStrawsInPreviousLayers[" <<
i <<
"]="
335 eformat::SubDetector det_id = eformat::TRT_ENDCAP_A_SIDE;
339 for (
int i = 0;
i < 2; ++
i)
355 det_id = eformat::TRT_BARREL_A_SIDE;
370 det_id = eformat::TRT_BARREL_C_SIDE;
385 det_id = eformat::TRT_ENDCAP_C_SIDE;
388 for (
int i = 0;
i < 2; ++
i)
406 det_id = eformat::TRT_ENDCAP_A_SIDE;
410 for (
int i = 0;
i < 2; ++
i)
412 eformat::helper::SourceIdentifier sid(det_id,
418 det_id = eformat::TRT_ENDCAP_C_SIDE;
421 for (
int i = 0;
i < 2; ++
i)
423 eformat::helper::SourceIdentifier sid(det_id,
429 det_id = eformat::TRT_BARREL_A_SIDE;
433 eformat::helper::SourceIdentifier sid(det_id,
438 det_id = eformat::TRT_BARREL_C_SIDE;
442 eformat::helper::SourceIdentifier sid(det_id,
450 ATH_MSG_DEBUG(
" TRT_IdentifierConversionTool::defineCollID " );
454 eformat::SubDetector det_id = eformat::TRT_ENDCAP_A_SIDE;
459 for (
int i = 0;
i < 2; ++
i)
462 eformat::helper::SourceIdentifier sid(det_id,
465 std::vector<IdentifierHash> * vect =
new std::vector<IdentifierHash>();
471 det_id = eformat::TRT_BARREL_A_SIDE;
475 eformat::helper::SourceIdentifier sid(det_id,
477 std::vector<IdentifierHash> * vect =
new std::vector<IdentifierHash>();
482 det_id = eformat::TRT_BARREL_C_SIDE;
486 eformat::helper::SourceIdentifier sid(det_id,
488 std::vector<IdentifierHash> * vect =
new std::vector<IdentifierHash>();
493 det_id = eformat::TRT_ENDCAP_C_SIDE;
497 for (
int i = 0;
i < 2; ++
i)
500 eformat::helper::SourceIdentifier sid(det_id,
503 std::vector<IdentifierHash> * vect =
new std::vector<IdentifierHash>();
509 ATH_MSG_DEBUG(
" TRT_FillCablingData_DC1::defineCollID finished " );
514 std::vector<IdentifierHash> &
ids)
516 int id_barrel_ec, id_phi_module;
520 eformat::SubDetector det_id;
523 eformat::helper::SourceIdentifier
id (rob_id);
524 det_id =
id.subdetector_id();
527 if (det_id == eformat::TRT_ENDCAP_A_SIDE)
545 ids.push_back(idHash);
558 ids.push_back(idHash);
576 else if (det_id == eformat::TRT_BARREL_A_SIDE)
588 ids.push_back(idHash);
599 ids.push_back(idHash);
610 ids.push_back(idHash);
617 else if (det_id == eformat::TRT_BARREL_C_SIDE)
629 ids.push_back(idHash);
640 ids.push_back(idHash);
651 ids.push_back(idHash);
658 else if (det_id == eformat::TRT_ENDCAP_C_SIDE)
672 ids.push_back(idHash);
684 ids.push_back(idHash);
707 (
const eformat::SubDetector& subdetector,
const int& intRod,
708 const int&
straw)
const
710 int id_barrel_ec, id_layer_or_wheel, id_phi_module, id_straw_layer, id_straw;
712 if ((subdetector == eformat::TRT_BARREL_A_SIDE) ||
713 (subdetector == eformat::TRT_BARREL_C_SIDE))
715 if (subdetector == eformat::TRT_BARREL_A_SIDE)
720 id_phi_module = intRod;
724 id_layer_or_wheel = 0;
730 id_layer_or_wheel = 1;
736 id_layer_or_wheel = 2;
743 if (subdetector == eformat::TRT_ENDCAP_A_SIDE)
783 id_straw_layer, id_straw);
791 std::vector<uint32_t>
v;
794 eformat::SubDetector det_id;
799 if (id_barrel_ec == -2)
801 det_id = eformat::TRT_ENDCAP_A_SIDE;
803 for (
int i = 0;
i < 2; ++
i)
806 eformat::helper::SourceIdentifier sid(det_id,
809 v.push_back(sid.code());
812 else if (id_barrel_ec == -1)
814 det_id = eformat::TRT_BARREL_A_SIDE;
816 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) id_phi_module);
817 v.push_back(sid.code());
819 else if (id_barrel_ec == 1)
821 det_id = eformat::TRT_BARREL_C_SIDE;
823 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) id_phi_module);
824 v.push_back(sid.code());
826 else if (id_barrel_ec == 2)
828 det_id = eformat::TRT_ENDCAP_C_SIDE;
830 for (
int i = 0;
i < 2; ++
i)
833 eformat::helper::SourceIdentifier sid(det_id,
836 v.push_back(sid.code());
851 eformat::SubDetector det_id;
858 if (id_barrel_ec == -2)
860 det_id = eformat::TRT_ENDCAP_A_SIDE;
866 eformat::helper::SourceIdentifier sid(det_id,
868 (
uint8_t) (id_phi_module * 2 + rod_num));
871 else if (id_barrel_ec == -1)
873 det_id = eformat::TRT_BARREL_A_SIDE;
875 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) (id_phi_module));
878 else if (id_barrel_ec == 1)
880 det_id = eformat::TRT_BARREL_C_SIDE;
882 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) (id_phi_module));
885 else if (id_barrel_ec == 2)
887 det_id = eformat::TRT_ENDCAP_C_SIDE;
893 eformat::helper::SourceIdentifier sid(det_id,
895 (
uint8_t) (id_phi_module * 2 + rod_num));
911 eformat::SubDetector det_id;
919 if (id_barrel_ec == -2)
921 det_id = eformat::TRT_ENDCAP_A_SIDE;
927 eformat::helper::SourceIdentifier sid(det_id,
929 (
uint8_t) (id_phi_module * 2 + rod_num));
932 else if (id_barrel_ec == -1)
934 det_id = eformat::TRT_BARREL_A_SIDE;
936 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) (id_phi_module));
939 else if (id_barrel_ec == 1)
941 det_id = eformat::TRT_BARREL_C_SIDE;
943 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) (id_phi_module));
946 else if (id_barrel_ec == 2)
948 det_id = eformat::TRT_ENDCAP_C_SIDE;
954 eformat::helper::SourceIdentifier sid(det_id,
956 (
uint8_t) (id_phi_module * 2 + rod_num));
960 if ((id_barrel_ec == -2) || (id_barrel_ec == 2))
981 if (id_layer_or_wheel == 0)
982 layer = id_straw_layer;
983 else if (id_layer_or_wheel == 1)
994 int& numberOfStrawsInBarrelROD,
995 int& shiftForLeftEndCapStraws,
996 int& shiftForLeftBarrelStraws,
997 int& shiftForRightBarrelStraws,
998 int& shiftForRightEndCapStraws,
999 int& numberOfEndCapPhiSectors,
1000 int& numberOfIdentifierSectors)