16 static const InterfaceID IID_ITRT_FillCablingData_DC1
17 (
"TRT_FillCablingData_DC1", 1, 0);
22 (
const std::string&
type,
const std::string&
name,
const IInterface*
parent):
25 declareInterface<TRT_FillCablingData_DC1>(
this);
36 return IID_ITRT_FillCablingData_DC1;
50 return StatusCode::FAILURE;
61 ATH_MSG_INFO(
"TRT_FillCablingData_DC1::initializiation finished" );
63 return StatusCode::SUCCESS;
91 int numberOfWheelsB = 8;
92 int numberOfWheelsC = 4;
112 int numberOfStrawsInPlaneAB = 768;
113 int numberOfStrawsInPlaneC = 576;
146 int numberOfStrawsB = 520;
147 int numberOfStrawsC = 793;
171 int numberOfStrawsInLayersA[] = {15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18,
172 18, 18, 18, 18, 19, 19, 19, 18};
174 int numberOfStrawsInLayersB[] = {19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21,
175 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 23};
177 int numberOfStrawsInLayersC[] = {23, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26,
178 26, 26, 26, 26, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 28};
183 int currentLayerID = 0;
184 int firstStrawInLayer = 0;
185 int firstStrawInNextLayer = numberOfStrawsInLayersA[currentLayerID];
192 if (
i == firstStrawInNextLayer)
195 firstStrawInLayer = firstStrawInNextLayer;
196 firstStrawInNextLayer += numberOfStrawsInLayersA[currentLayerID];
206 firstStrawInLayer = firstStrawInNextLayer;
207 firstStrawInNextLayer += numberOfStrawsInLayersB[currentLayerID -
218 firstStrawInLayer = firstStrawInNextLayer;
219 firstStrawInNextLayer += numberOfStrawsInLayersC[currentLayerID -
229 int numberOfStrawsInPreviousLayer;
234 numberOfStrawsInPreviousLayer = numberOfStrawsInLayersA[
i - 1];
236 numberOfStrawsInPreviousLayer =
239 numberOfStrawsInPreviousLayer =
251 ATH_MSG_DEBUG(
"***** TRT_IdentifierConversion::printParameters *****" );
326 eformat::SubDetector det_id = eformat::TRT_ENDCAP_A_SIDE;
330 for (
int i = 0;
i < 3; ++
i)
349 det_id = eformat::TRT_BARREL_A_SIDE;
365 det_id = eformat::TRT_BARREL_C_SIDE;
381 det_id = eformat::TRT_ENDCAP_C_SIDE;
384 for (
int i = 0;
i < 3; ++
i)
404 det_id = eformat::TRT_ENDCAP_A_SIDE;
408 for (
int i = 0;
i < 3; ++
i)
411 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (
phi * 3 +
i));
417 det_id = eformat::TRT_ENDCAP_C_SIDE;
420 for (
int i = 0;
i < 3; ++
i)
423 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (
phi * 3 +
i));
429 det_id = eformat::TRT_BARREL_A_SIDE;
433 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (
phi ));
438 det_id = eformat::TRT_BARREL_C_SIDE;
442 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (
phi ));
449 ATH_MSG_DEBUG(
" TRT_IdentifierConversionTool::defineCollID " );
454 eformat::SubDetector det_id = eformat::TRT_ENDCAP_A_SIDE;
457 for (
int i = 0;
i < 3; ++
i)
460 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (
phi * 3 +
i));
461 std::vector<IdentifierHash> * vect =
new std::vector<IdentifierHash>();
468 det_id = eformat::TRT_BARREL_A_SIDE;
472 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (
phi ));
473 std::vector<IdentifierHash> * vect =
new std::vector<IdentifierHash>();
479 det_id = eformat::TRT_BARREL_C_SIDE;
483 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (
phi ));
484 std::vector<IdentifierHash> * vect =
new std::vector<IdentifierHash>();
490 det_id = eformat::TRT_ENDCAP_C_SIDE;
493 for (
int i = 0;
i < 3; ++
i)
496 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (
phi * 3 +
i));
497 std::vector<IdentifierHash> * vect =
new std::vector<IdentifierHash>();
503 ATH_MSG_DEBUG(
" TRT_FillCablingData_DC1::defineCollID finished " );
508 std::vector<IdentifierHash> &
ids)
510 int id_barrel_ec, id_phi_module;
515 eformat::SubDetector det_id;
518 eformat::helper::SourceIdentifier
id (rob_id);
519 det_id =
id.subdetector_id();
523 if (det_id == eformat::TRT_ENDCAP_A_SIDE)
540 ids.push_back(idHash);
552 ids.push_back(idHash);
563 ids.push_back(idHash);
571 else if (det_id == eformat::TRT_BARREL_A_SIDE)
583 ids.push_back(idHash);
594 ids.push_back(idHash);
605 ids.push_back(idHash);
613 else if (det_id == eformat::TRT_BARREL_C_SIDE)
625 ids.push_back(idHash);
636 ids.push_back(idHash);
647 ids.push_back(idHash);
655 else if (det_id == eformat::TRT_ENDCAP_C_SIDE)
667 ids.push_back(idHash);
678 ids.push_back(idHash);
689 ids.push_back(idHash);
702 (
const eformat::SubDetector& subdetector,
const int& intRod,
703 const int&
straw)
const
705 int id_barrel_ec, id_layer_or_wheel, id_phi_module, id_straw_layer, id_straw;
708 if ((subdetector == eformat::TRT_BARREL_A_SIDE) ||
710 (subdetector == eformat::TRT_BARREL_C_SIDE))
713 if (subdetector == eformat::TRT_BARREL_A_SIDE)
718 id_phi_module = intRod;
720 if (
straw < m_numberOfStrawsA)
722 id_layer_or_wheel = 0;
723 id_straw_layer = m_layerID[
straw];
724 id_straw = m_strawIDInLayer[
straw];
726 else if (
straw < m_numberOfStrawsAB)
728 id_layer_or_wheel = 1;
729 id_straw_layer = m_layerID[
straw] - m_numberOfLayersA;
730 id_straw = m_strawIDInLayer[
straw];
734 id_layer_or_wheel = 2;
735 id_straw_layer = m_layerID[
straw] - m_numberOfLayersAB;
736 id_straw = m_strawIDInLayer[
straw];
742 if (subdetector == eformat::TRT_ENDCAP_A_SIDE)
747 id_phi_module = intRod / m_numberOfPhiSectorsInIDSector;
748 int rodInIDSector = intRod % m_numberOfPhiSectorsInIDSector;
750 if (
straw < m_numberOfStrawsAInRod)
752 id_layer_or_wheel =
straw / m_numberOfStrawsInWheelAForRod;
753 int strawInWheelA =
straw % m_numberOfStrawsInWheelAForRod;
754 id_straw_layer = strawInWheelA / m_numberOfStrawsInPhiSectorAB;
755 id_straw = strawInWheelA % m_numberOfStrawsInPhiSectorAB +
756 m_numberOfStrawsInPhiSectorAB * rodInIDSector;
758 else if (
straw < m_numberOfStrawsABInRod)
760 int strawInWheelsB =
straw - m_numberOfStrawsAInRod;
761 id_layer_or_wheel = strawInWheelsB / m_numberOfStrawsInWheelBForRod +
763 int strawInWheelB = strawInWheelsB % m_numberOfStrawsInWheelBForRod;
764 id_straw_layer = strawInWheelB / m_numberOfStrawsInPhiSectorAB;
765 id_straw = strawInWheelB % m_numberOfStrawsInPhiSectorAB +
766 m_numberOfStrawsInPhiSectorAB * rodInIDSector;
770 int strawInWheelsC =
straw - m_numberOfStrawsABInRod;
771 id_layer_or_wheel = strawInWheelsC / m_numberOfStrawsInWheelCForRod +
773 int strawInWheelC = strawInWheelsC % m_numberOfStrawsInWheelCForRod;
774 id_straw_layer = strawInWheelC / m_numberOfStrawsInPhiSectorC;
775 id_straw = strawInWheelC % m_numberOfStrawsInPhiSectorC +
776 m_numberOfStrawsInPhiSectorC * rodInIDSector;
780 return m_id_trt->straw_id(id_barrel_ec, id_phi_module, id_layer_or_wheel,
781 id_straw_layer, id_straw);
789 std::vector<uint32_t>
v;
793 eformat::SubDetector det_id;
798 if (id_barrel_ec == -2)
801 det_id = eformat::TRT_ENDCAP_A_SIDE;
802 for (
int i = 0;
i < 3; ++
i)
805 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (id_phi_module * 3 +
i));
806 v.push_back(sid.code());
809 else if (id_barrel_ec == -1)
812 det_id = eformat::TRT_BARREL_A_SIDE;
814 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) id_phi_module);
815 v.push_back(sid.code());
817 else if (id_barrel_ec == 1)
820 det_id = eformat::TRT_BARREL_C_SIDE;
822 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) id_phi_module);
823 v.push_back(sid.code());
825 else if (id_barrel_ec == 2)
828 det_id = eformat::TRT_ENDCAP_C_SIDE;
829 for (
int i = 0;
i < 3; ++
i)
832 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (id_phi_module * 3 +
i));
833 v.push_back(sid.code());
849 eformat::SubDetector det_id;
856 if (id_barrel_ec == -2)
859 det_id = eformat::TRT_ENDCAP_A_SIDE;
865 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (id_phi_module * 3 + rod_num));
868 else if (id_barrel_ec == -1)
871 det_id = eformat::TRT_BARREL_A_SIDE;
873 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) (id_phi_module));
876 else if (id_barrel_ec == 1)
879 det_id = eformat::TRT_BARREL_C_SIDE;
881 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) (id_phi_module));
884 else if (id_barrel_ec == 2)
887 det_id = eformat::TRT_ENDCAP_C_SIDE;
893 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (id_phi_module * 3 + rod_num));
910 eformat::SubDetector det_id;
918 if (id_barrel_ec == -2)
921 det_id = eformat::TRT_ENDCAP_A_SIDE;
927 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (id_phi_module * 3 + rod_num));
930 else if (id_barrel_ec == -1)
933 det_id = eformat::TRT_BARREL_A_SIDE;
935 eformat::helper::SourceIdentifier sid(det_id, (
uint8_t) (id_phi_module));
938 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)
949 det_id = eformat::TRT_ENDCAP_C_SIDE;
955 eformat::helper::SourceIdentifier sid(det_id,(
uint8_t) (id_phi_module * 3 + rod_num));
959 if ((id_barrel_ec == -2) || (id_barrel_ec == 2))
979 if (id_layer_or_wheel == 0)
980 layer = id_straw_layer;
981 else if (id_layer_or_wheel == 1)
992 int& numberOfStrawsInBarrelROD,
993 int& shiftForLeftEndCapStraws,
994 int& shiftForLeftBarrelStraws,
995 int& shiftForRightBarrelStraws,
996 int& shiftForRightEndCapStraws,
997 int& numberOfEndCapPhiSectors,
998 int& numberOfIdentifierSectors)