15 #include "GeoModelKernel/GeoBox.h"
16 #include "GeoModelKernel/GeoCons.h"
17 #include "GeoModelKernel/GeoPara.h"
18 #include "GeoModelKernel/GeoPgon.h"
19 #include "GeoModelKernel/GeoShape.h"
20 #include "GeoModelKernel/GeoShapeIntersection.h"
21 #include "GeoModelKernel/GeoShapeShift.h"
22 #include "GeoModelKernel/GeoShapeSubtraction.h"
23 #include "GeoModelKernel/GeoShapeUnion.h"
24 #include "GeoModelKernel/GeoTrap.h"
25 #include "GeoModelKernel/GeoTrd.h"
26 #include "GeoModelKernel/GeoTube.h"
27 #include "GeoModelKernel/GeoTubs.h"
28 #include "GeoModelKernel/GeoVolumeCursor.h"
95 return StatusCode::SUCCESS;
104 std::vector<std::pair<const GeoVPhysVol*, std::vector<GMInfo>>> stations =
retrieveGMsensitive(muonMgr);
106 for (
const auto& mstation : stations) {
114 std::string
name = mstation.first->getLogVol()->getName();
116 if (
name.substr(0, 4) ==
"sTGC" ||
name.substr(0, 2) ==
"MM") {
117 for (
unsigned int i = 0;
i < mstation.second.size();
i++) {
118 std::string sName =
name.substr(
name.find(
'-') + 1);
122 mstation.second[0].first.inverse());
123 std::unique_ptr<Trk::DetachedTrackingVolume> newStat{msType->
clone(
name, trdef)};
130 translatedStations.push_back(std::move(newStat));
133 for (
auto gminfo : mstation.second) {
135 std::unique_ptr<Trk::DetachedTrackingVolume> newStat{msType->
clone(
name, gminfo.first)};
146 translatedStations.push_back(std::move(newStat));
151 ATH_MSG_DEBUG(
"returns " << translatedStations.size() <<
" stations");
152 return translatedStations;
170 if (cubVolBounds && binUtilityX) {
175 if (low >= 0 &&
up >= 0) {
177 for (
unsigned int i = 0;
i < components.size() - 1; ++
i) {
192 const std::string stationStr =
stationName.substr(0, 3);
193 bool is_valid{
false};
197 stationStr, cscEtaSt, phi + 1, 1, 1, 0, 1, is_valid);
202 stationStr, cscEtaSt, phi + 1, 2, 1, 0, 1, is_valid);
207 for (
int gasgap = 0; gasgap < cscRE->
Ngasgaps(); gasgap++) {
221 if (assocVol && assocLay) {
232 }
else if (stationStr[0] ==
'T') {
235 if (stationStr ==
"T1F") {
237 }
else if (stationStr ==
"T1E") {
239 }
else if (stationStr ==
"T2F") {
241 }
else if (stationStr ==
"T2E") {
243 }
else if (stationStr ==
"T3F") {
245 }
else if (stationStr ==
"T3E") {
247 }
else if (stationStr ==
"T4F") {
254 const int stationEta =
256 auto getReadout = [
stationName, stationEta, muonMgr, &idHelper](
int phi) {
257 const int stationPhi = phi + 1;
258 bool is_valid{
false};
260 return is_valid ? muonMgr->getTgcReadoutElement(
id) :
nullptr;
265 unsigned int phit = 0;
276 int stationEta = idHelper.stationEta(oldId);
293 Identifier wireId = idHelper.channelID(stationStr, etaSt, phiSt, 1, 0, 1, validId);
308 wireId = idHelper.channelID(stationStr, etaSt, phiSt,
il + 1, 1, 1, validId);
318 if ((
layers[
il]->surfaceRepresentation().transform().inverse() * stripSurf->center()).
mag() > 0.001)
319 ATH_MSG_DEBUG(
"TGC strip plane shifted:"<< st <<
"," << eta <<
"," << phi
326 <<
"," << eta <<
"," << phi);
333 const int nameIndex = idHelper.stationNameIndex(
stationName.substr(0, 3));
337 for (
auto* cVol : cVols) {
338 if (cVol->confinedLayers()) {
341 bool is_valid{
false};
343 for (
auto* cLay : cLays) {
346 Identifier newId = idHelper.channelID(nameIndex, eta, phi,
347 idHelper.multilayer(
id),
348 idHelper.tubeLayer(
id),
355 cLay->setLayerType(newid);
358 double ref = cLay->getRef();
362 double loc = (cLay->surfaceRepresentation().transform().inverse() * mdtROE->
tubePos(newId))[1];
363 if (std::abs(
ref) > 10e6) {
364 double sign = (
ref > 0.) ? 1. : -1.;
367 0.5 * (
sign + 1) * 1e5;
368 if (std::abs(
ref - loc) > 0.001) {
369 cLay->setRef(loc + dec * 1e5 + 0.5 * (
sign + 1) * 1e5);
371 }
else if (std::abs(
ref - loc) > 0.001) {
378 if (!cVol->confinedArbitraryLayers().empty()) {
381 for (
auto* cLay : cLays) {
383 bool is_valid{
false};
385 Identifier newId = idHelper.channelID(nameIndex, eta, phi,
386 idHelper.doubletR(
id), idHelper.doubletZ(
id),
387 idHelper.doubletPhi(
id), idHelper.gasGap(
id),
388 1, idHelper.strip(
id),
391 cLay->setLayerType(newid);
402 for (
auto* cVol : cVols) {
403 if (cVol->confinedLayers()) {
405 cVol->confinedLayers()->arrayObjects();
406 for (
unsigned int il = 0;
il < cLays.size();
il++) {
410 <<
"," << cVol->volumeName()
411 <<
", unidentified active layer:" <<
il);
414 " subvolume " + cVol->volumeName(),
415 muonMgr,
id, cLays[
il]);
418 if (!cVol->confinedArbitraryLayers().empty()) {
420 cVol->confinedArbitraryLayers();
421 for (
unsigned int il = 0;
il < cLays.size();
il++) {
425 <<
"," << cVol->volumeName()
426 <<
", unidentified active layer:" <<
il);
429 station->
name() +
" subvolume " +
431 muonMgr,
id, cLays[
il]);
439 for (
unsigned int il = 0;
il < cLays.size();
il++) {
443 <<
"," << station->
name()
444 <<
", unidentified active layer:" <<
il);
447 muonMgr,
id, cLays[
il]);
459 const bool isStgc{station.
name().substr(0, 4) ==
"sTGC"};
460 const bool isMm{station.
name().substr(0, 2) ==
"MM"};
461 if (!isMm && !isStgc)
return;
462 for (
unsigned int il = 0;
il < lays.size();
il++) {
465 const Identifier lid = idHelper.channelID(
id, idHelper.multilayer(
id),
il + 1, 2, 1);
470 const Identifier lid = idHelper.channelID(
id, idHelper.multilayer(
id),
il + 1, 1);
483 const std::string stationNameShort =
stationName.substr(0, 3);
485 bool is_valid{
false};
487 if (
m_idHelperSvc->hasMDT() && (stationFirstChar ==
'B' || stationFirstChar ==
'E')) {
490 const int nameIndex = idHelper.stationNameIndex(stationNameShort);
492 const Identifier ele_id = idHelper.channelID(nameIndex, eta, phi,
multi, 1, 1, is_valid);
514 assocLay->
setLayerType(
id.get_identifier32().get_compact());
521 if (confinedVolumes) {
523 for (
auto* vol : vols) {
524 if (!
m_idHelperSvc->hasRPC() || vol->volumeName() !=
"RPC") {
530 int nameIndex =
m_idHelperSvc->rpcIdHelper().stationNameIndex(stationNameShort);
532 if (stationNameShort ==
"BME" || stationNameShort ==
"BMG") {
543 if (stationNameShort.find(
"BMS") != std::string::npos && (std::abs(eta) == 2 || std::abs(eta) == 4)) {
546 else if (stationNameShort.find(
"BOG") != std::string::npos) {
547 if (std::abs(eta) == 7 || std::abs(eta) == 8) {
552 }
else if (stationNameShort.find(
"BOF") != std::string::npos && std::abs(eta) == 4){
563 for (
int doubletZ = 1; doubletZ <= doubletZMax; ++doubletZ) {
582 if (
layer->layerType() == 0 ||
583 !
layer->surfaceRepresentation().isOnSurface(stripLocPos,
false, 0.5*
layer->thickness())){
586 const Amg::Vector3D locPos1 =
layer->surfaceRepresentation().transform().inverse() * stripLocPos;
589 double swap = (std::abs(locPos1[1] - locPos2[0]) > 0.001) ? 20000. : 0.;
610 for (
auto* cVol : cVols) {
611 if (cVol->confinedLayers()) {
613 for (
unsigned int il = 0;
il < cLays.size();
il++) {
620 if (!cVol->confinedArbitraryLayers().empty()) {
622 for (
unsigned int il = 0;
il < cLays.size();
il++) {
633 for (
unsigned int il = 0;
il < cLays.size();
il++) {
645 std::vector<std::pair<std::pair<const GeoLogVol*, Trk::MaterialProperties*>,
646 std::vector<Amg::Transform3D>>>& vols,
647 std::vector<std::string>& volNames)
const {
652 unsigned int nc =
pv->getNChildVols();
654 <<
pv->getLogVol()->getName() <<
","
655 <<
pv->getLogVol()->getMaterial()->getName()
656 <<
", looping over " <<
nc <<
" children");
658 for (
unsigned int ic = 0;
ic <
nc;
ic++) {
660 const GeoVPhysVol* cv =
pv->getChildVol(
ic);
661 const GeoLogVol* clv = cv->getLogVol();
662 std::string childName = clv->getName();
663 ATH_MSG_DEBUG(
"getNSWStationsForTranslation child " << childName);
665 if (childName.empty()) {
666 childName =
"Spacer";
668 if (childName.size() > 9 && childName.substr(childName.size() - 9, 9) ==
"Sensitive") {
672 std::string cName = childName.compare(0, 3,
"NSW") == 0 || childName.compare(0, 8,
"NewSmall") == 0
676 if (!cv->getNChildVols()) {
678 for (
unsigned int is = 0; is < vols.size(); is++) {
679 if (cName == volNames[is]) {
681 vols[is].
second.front().translation().perp()) <
686 double phiTr = (
transform * transf).translation().phi();
687 if (phiTr > -0.001 && phiTr < 0.4) {
688 vols[is].second.insert(vols[is].
second.begin(),
691 vols[is].second.push_back(
transform * transf);
694 << clv->getName() <<
","
695 << (
transform * transf).translation().perp() <<
","
696 << (
transform * transf).translation().z() <<
","
704 std::vector<Amg::Transform3D> volTr;
709 if (
pv->getLogVol()->getMaterial()->getName() !=
"Ether" &&
710 (childName ==
"MM_Frame" || childName ==
"sTGC_Frame")) {
714 pv->getLogVol()->getMaterial());
723 std::pair<const GeoLogVol*, Trk::MaterialProperties*> cpair(
724 pv->getLogVol(), nMat);
725 vols.emplace_back(cpair, volTr);
727 volNames.push_back(cName);
730 << clv->getMaterial()->getName() <<
", "
731 << volTr.back().translation().z() <<
", "
732 << volTr.back().translation().phi()
744 std::vector<std::pair<const GeoVPhysVol*, std::vector<GMInfo>>>
749 std::vector<std::pair<
const GeoVPhysVol*,
750 std::vector<GMInfo>>> sensitive;
758 if (sTGC_top && sTGC_top !=
top) {
759 ATH_MSG_DEBUG(
"sTGC GeoModel branch found:" << sTGC_top->getLogVol()->getName());
760 GeoVolumeCursor vol(sTGC_top);
761 while (!vol.atEnd()) {
762 const GeoVPhysVol* cv = vol.getVolume();
763 const std::string& vname = cv->getLogVol()->getName();
764 if (vname.find(
"sTGC_1") == std::string::npos) {
768 std::vector<std::pair<
const GeoVPhysVol*,
771 while (
it < sensitive.end()) {
772 if (vname == (*it).first->getLogVol()->getName() &&
778 if (
it == sensitive.end()) {
779 std::vector<std::pair<Amg::Transform3D, int>> cloneList;
781 std::make_pair(vol.getTransform(), 0));
782 sensitive.push_back(std::make_pair(cv, cloneList));
786 double phiTr = transf.translation().phi();
787 if (phiTr > -0.001 && phiTr < 0.4)
788 (*it).second.insert((*it).second.begin(),
789 std::make_pair(vol.getTransform(), 0));
791 (*it).second.push_back(std::make_pair(vol.getTransform(), 0));
797 if (MM_top && MM_top !=
top) {
798 ATH_MSG_DEBUG(
"MM GeoModel branch found:" << MM_top->getLogVol()->getName());
799 GeoVolumeCursor vol(MM_top);
800 while (!vol.atEnd()) {
801 const GeoVPhysVol* cv = vol.getVolume();
802 const std::string& vname = cv->getLogVol()->getName();
803 if (vname.find(
"MM_1") == std::string::npos) {
807 std::vector<std::pair<
const GeoVPhysVol*,
810 while (
it < sensitive.end()) {
811 if (vname == (*it).first->getLogVol()->getName() &&
817 if (
it == sensitive.end()) {
818 std::vector<std::pair<Amg::Transform3D, int>> cloneList;
819 cloneList.push_back(std::make_pair(vol.getTransform(), 0));
820 sensitive.push_back(std::make_pair(cv, cloneList));
824 double phiTr = transf.translation().phi();
825 if (phiTr > -0.001 && phiTr < 0.4)
826 (*it).second.insert((*it).second.begin(), std::make_pair(vol.getTransform(), 0));
828 (*it).second.push_back(std::make_pair(vol.getTransform(), 0));
834 GeoVolumeCursor vol(
top);
835 while (!vol.atEnd()) {
836 const GeoVPhysVol* cv = &(*(vol.getVolume()));
837 const std::string& vname = cv->getLogVol()->getName();
838 if (vname.find(
"Station") == std::string::npos &&
839 vname.find(
"MM_1") == std::string::npos &&
840 vname.find(
"sTGC_1") == std::string::npos) {
846 if (vname.substr(0, 1) ==
"T") {
849 const GeoLogVol* tlv = tv->getLogVol();
851 const std::string& tgc_name = tlv->getName();
853 std::vector<std::pair<
const GeoVPhysVol*,
856 while (
it < sensitive.end()) {
857 if (tgc_name == (*it).first->getLogVol()->getName() &&
864 if (
it == sensitive.end()) {
865 std::vector<std::pair<Amg::Transform3D, int>> cloneList;
866 cloneList.push_back(std::make_pair(
transform, vol.getId()));
867 sensitive.push_back(std::make_pair(tv, cloneList));
871 double phiTr = transf.translation().phi();
872 if (phiTr > -0.001 && phiTr < 0.4)
873 (*it).second.insert((*it).second.begin(),
876 (*it).second.push_back(std::make_pair(
transform, vol.getId()));
883 std::vector<std::pair<
const GeoVPhysVol*,
886 while (
it < sensitive.end()) {
887 if (vname == (*it).first->getLogVol()->getName() &&
893 if (
it == sensitive.end()) {
894 std::vector<std::pair<Amg::Transform3D, int>> cloneList;
895 cloneList.push_back(std::make_pair(vol.getTransform(), vol.getId()));
896 sensitive.push_back(std::make_pair(cv, cloneList));
900 double phiTr = transf.translation().phi();
901 if (phiTr > -0.001 && phiTr < 0.4)
902 (*it).second.insert((*it).second.begin(),
903 std::make_pair(vol.getTransform(), vol.getId()));
905 (*it).second.push_back(std::make_pair(vol.getTransform(), vol.getId()));
911 ATH_MSG_DEBUG(
"Number of muon station types in GeoModel tree:" << sensitive.size());
916 std::unique_ptr<Trk::DetachedTrackingVolume>
918 const GeoVPhysVol* cv,
920 const GeoLogVol* clv = cv->getLogVol();
921 const std::string& vname = clv->getName();
922 ATH_MSG_DEBUG(
name() <<
" building station prototype for " << cv->getLogVol()->getName());
926 std::unique_ptr<Trk::DetachedTrackingVolume> typeStat{};
928 if (vname.substr(0, 4) ==
"sTGC" || vname.substr(0, 2) ==
"MM") {
929 std::string sName = vname.substr(vname.find(
'-') + 1);
932 if (vname.substr(0, 4) ==
"sTGC" &&
m_idHelperSvc->issTgc(nswId)) {
934 }
else if (vname.substr(0, 2) ==
"MM" &&
m_idHelperSvc->isMM(nswId)) {
943 if (!
m_buildCsc && vname.compare(0, 1,
"C") == 0)
945 if (!
m_buildTgc && vname.compare(0, 1,
"T") == 0)
948 int etaphi = gmInfo.second;
949 int sign = (etaphi < 0) ? -1 : 1;
950 etaphi =
sign * etaphi;
951 int is_mirr = etaphi / 1000;
952 etaphi = etaphi - is_mirr * 1000;
953 int eta = etaphi / 100;
954 int phi = etaphi - eta * 100;
958 gmStation = muonMgr->
getMuonStation(vname.substr(0, 4), eta, phi);
962 int etaphi = gmInfo.second;
963 int a_etaphi =
static_cast<int>(etaphi / 100000);
964 int sideC =
static_cast<int>(a_etaphi / 10000);
965 a_etaphi -=
sideC * 10000;
966 is_mirr =
static_cast<int>(a_etaphi / 1000);
967 a_etaphi -= is_mirr * 1000;
968 eta =
static_cast<int>(a_etaphi / 100);
969 phi = a_etaphi - eta * 100;
972 gmStation = muonMgr->
getMuonStation(vname.substr(0, 3), eta, phi);
975 std::string stname = (vname.compare(0, 1,
"T") == 0) ? vname : (clv->getName()).substr(0, vname.size() - 8);
977 if (stname.compare(0, 1,
"B") == 0 && eta < 0) {
978 stname = (clv->getName()).substr(0, vname.size() - 8) +
"-";
980 ATH_MSG_VERBOSE(
" new station type " << stname <<
"," << clv->getShape()->type());
981 ATH_MSG_VERBOSE(
" prototype built from eta, phi:" << eta <<
"," << phi);
983 if (stname.compare(0, 2,
"CS") == 0 || stname.compare(0, 1,
"T") == 0) {
985 if (stname.compare(0, 2,
"CS") == 0) {
990 auto layerVec = std ::make_unique<std::vector<Trk::Layer*>>(
Muon::release(layerRepr.second));
991 typeStat = std::make_unique<Trk::DetachedTrackingVolume>(stname, csc_station.release(),
992 layerRepr.first.release(), layerVec.release());
998 auto layerVec = std ::make_unique<std::vector<Trk::Layer*>>(
Muon::release(layerRepr.second));
999 typeStat = std::make_unique<Trk::DetachedTrackingVolume>(stname, tgc_station.release(),
1000 layerRepr.first.release(), layerVec.release());
1004 const GeoShape* shapeS = clv->getShape();
1005 while (shapeS->type() !=
"Trd") {
1006 if (shapeS->type() ==
"Shift") {
1007 const GeoShapeShift* shift =
dynamic_cast<const GeoShapeShift*
>(shapeS);
1008 shapeS = shift->getOp();
1009 }
else if (shapeS->type() ==
"Subtraction") {
1010 const GeoShapeSubtraction* sub =
dynamic_cast<const GeoShapeSubtraction*
>(shapeS);
1011 shapeS = sub->getOpA();
1012 }
else if (shapeS->type() ==
"Union") {
1013 const GeoShapeUnion* uni =
dynamic_cast<const GeoShapeUnion*
>(shapeS);
1014 shapeS = uni->getOpA();
1016 ATH_MSG_WARNING(
"unexpected station shape ? "<< shapeS->type() <<
", station not built");
1020 const GeoTrd* trd =
dynamic_cast<const GeoTrd*
>(shapeS);
1022 double halfX1{0.}, halfX2{0.}, halfY1{0.}, halfY2{0.}, halfZ{0.};
1025 halfX1 = trd->getXHalfLength1();
1026 halfX2 = trd->getXHalfLength2();
1027 halfY1 = trd->getYHalfLength1();
1028 halfY2 = trd->getYHalfLength2();
1029 halfZ = trd->getZHalfLength();
1032 std::unique_ptr<Trk::TrackingVolumeArray> confinedVolumes{};
1033 std::vector<std::unique_ptr<Trk::Layer>> confinedLayers{};
1034 std::unique_ptr<Trk::Volume> envelope;
1035 std::string shape =
"Trd";
1036 if (halfX1 == halfX2 && halfY1 == halfY2)
1038 if (shape ==
"Box") {
1039 auto envBounds = std::make_unique<Trk::CuboidVolumeBounds>(halfX1, halfY1, halfZ);
1042 if (!confinedVolumes) {
1046 envelope = std::make_unique<Trk::Volume>(
nullptr, envBounds.release());
1047 }
else if (shape ==
"Trd") {
1048 std::unique_ptr<Trk::TrapezoidVolumeBounds> envBounds{};
1050 if (halfY1 == halfY2) {
1051 envBounds = std::make_unique<Trk::TrapezoidVolumeBounds>(halfX1, halfX2, halfY1, halfZ);
1052 ATH_MSG_VERBOSE(
"CAUTION!!!: this trapezoid volume does not require XY -> YZ switch");
1054 if (halfY1 != halfY2 && halfX1 == halfX2) {
1056 envBounds = std::make_unique<Trk::TrapezoidVolumeBounds>(halfY1, halfY2, halfZ, halfX1);
1058 if (halfX1 != halfX2 && halfY1 != halfY2) {
1065 envelope = std::make_unique<Trk::Volume>(
makeTransform(transf), envBounds.release());
1071 std::unique_ptr<Trk::TrackingVolume> newType{};
1072 if (!confinedLayers.empty()) {
1073 auto confinedLayerPtr = std::make_unique<std::vector<Trk::Layer*>>(
Muon::release(confinedLayers));
1074 newType = std::make_unique<Trk::TrackingVolume>(*envelope,
m_muonMaterial, confinedLayerPtr.release(), stname);
1076 newType = std::make_unique<Trk::TrackingVolume>(*envelope,
m_muonMaterial,
nullptr, confinedVolumes.release(), stname);
1081 if ((stname.compare(0, 1,
"B") == 0 || stname.compare(0, 1,
"E") == 0))
1088 auto layerVec = std::make_unique<std::vector<Trk::Layer*>>(
Muon::release(layerRepr.second));
1089 typeStat = std::make_unique<Trk::DetachedTrackingVolume>(stname, newType.release(),
1090 layerRepr.first.release(), layerVec.release());
1106 int etaphi = gm_info.second;
1107 int sign = (etaphi < 0) ? -1 : 1;
1108 etaphi =
sign * etaphi;
1109 int is_mirr = etaphi / 1000;
1110 etaphi = etaphi - is_mirr * 1000;
1112 phi = etaphi - eta * 100;
1118 gmStation = muonMgr->
getMuonStation(vname.substr(0, 4), eta, phi);
1122 int etaphi = gm_info.second;
1123 int a_etaphi =
static_cast<int>(etaphi / 100000);
1124 int sideC =
static_cast<int>(a_etaphi / 10000);
1125 a_etaphi -=
sideC * 10000;
1126 is_mirr =
static_cast<int>(a_etaphi / 1000);
1127 a_etaphi -= is_mirr * 1000;
1128 eta =
static_cast<int>(a_etaphi / 100);
1129 phi = a_etaphi - eta * 100;
1132 gmStation = muonMgr->
getMuonStation(vname.substr(0, 3), eta, phi);
1136 ATH_MSG_WARNING(
"Muon station not found! " << vname <<
"," << eta <<
","
1140 if (vname.compare(0, 1,
"T") == 0 || vname.compare(0, 1,
"C") == 0) {
1141 stName = vname.substr(0, 4);
1143 stName = (vname.substr(0, vname.size() - 8));
1144 if (stName.compare(0, 1,
"B") == 0 && eta < 0) {
1145 stName = vname.substr(0, vname.size() - 8) +
"-";
1151 bool is_valid{
false};
1152 if (
m_idHelperSvc->hasCSC() && stName.compare(0, 1,
"C") == 0) {
1153 stId =
m_idHelperSvc->cscIdHelper().elementID(vname.substr(0, 3), eta,
1157 if (vname.compare(0, 1,
"C") == 0) {
1159 if (transf.translation().z() < 0)
1161 double phic = transf.translation().phi() + 0.1;
1163 static_cast<int>(phic < 0 ? 4 * phic /
M_PI + 8 : 4 * phic /
M_PI);
1165 if (vname.compare(0, 1,
"T") == 0) {
1167 std::string sub = vname.substr(7, 2);
1168 if (transf.translation().z() < 0)
1172 else if (sub ==
"02")
1174 else if (sub ==
"03")
1176 else if (sub ==
"04")
1178 else if (sub ==
"05")
1180 else if (sub ==
"06")
1182 else if (sub ==
"07")
1184 else if (sub ==
"08")
1186 else if (sub ==
"09")
1188 else if (sub ==
"10")
1190 else if (sub ==
"11")
1192 else if (sub ==
"12")
1194 else if (sub ==
"13")
1196 else if (sub ==
"14")
1198 else if (sub ==
"15")
1200 else if (sub ==
"16")
1202 else if (sub ==
"17")
1204 else if (sub ==
"18")
1206 else if (sub ==
"19")
1208 else if (sub ==
"20")
1210 else if (sub ==
"21")
1212 else if (sub ==
"22")
1216 int etaSt = eta - 4;
1219 double phic = transf.translation().phi();
1220 if (vname.compare(2, 1,
"E") == 0 && vname.compare(0, 3,
"T4E") != 0)
1221 phi =
static_cast<int>(phic < 0 ? 24 * phic /
M_PI + 48
1222 : 24 * phic /
M_PI);
1224 phi =
static_cast<int>(phic < 0 ? 12 * phic /
M_PI + 24
1225 : 12 * phic /
M_PI);
1227 stId =
m_idHelperSvc->tgcIdHelper().elementID(vname.substr(0, 3), etaSt,
1229 }
else if (
m_idHelperSvc->hasRPC() && stName.compare(0, 3,
"BML") == 0) {
1230 stId =
m_idHelperSvc->rpcIdHelper().elementID(vname.substr(0, 3), eta,
1232 }
else if (
m_idHelperSvc->hasMDT() && stName.compare(0, 1,
"C") != 0) {
1233 stId =
m_idHelperSvc->mdtIdHelper().elementID(vname.substr(0, 3), eta,
1238 << vname <<
"," << eta <<
"," << phi);