diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/make_dd.icc b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/make_dd.icc index 60c384201ba184f1c3dadecad67b99d00f483ab1..81a5859dd240dda16df21c2c7aab077ec7eb1b62 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/make_dd.icc +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/make_dd.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ /** * @file MuonEventTPCnv/test/make_dd.icc @@ -127,7 +127,7 @@ void MuonChamber::makeMdt (const Identifier& id) void MuonChamber::makesTgc (const Identifier& id) { auto elt = std::make_unique<MuonGM::sTgcReadoutElement>(&m_pvol, "STS", 1, 2, 1, &m_muo_dd); - elt->initDesign (0, 0, 0, 0, 0, 0, 0, 1); + elt->initDesign (1); elt->setIdentifier (id); //elt->m_ngasgaps = 2; diff --git a/MuonSpectrometer/MuonDetDescr/MuonDetDescrUtils/src/BuildNSWReadoutGeometry.cxx b/MuonSpectrometer/MuonDetDescr/MuonDetDescrUtils/src/BuildNSWReadoutGeometry.cxx index 3db89b43f7b7f35d2438f7ee456f0b929b09db8f..007458426b0f0e31f30365b88f23cfbf3a1a84b6 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonDetDescrUtils/src/BuildNSWReadoutGeometry.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonDetDescrUtils/src/BuildNSWReadoutGeometry.cxx @@ -60,7 +60,7 @@ bool BuildNSWReadoutGeometry::BuildReadoutGeometry(MuonGM::MuonDetectorManager* } else if (chTag.substr(0, 3) == "sTG") { std::unique_ptr<sTgcReadoutElement> re = std::make_unique<sTgcReadoutElement>(vol, sName, etaIndex, phiIndex, mLayer, mgr); std::string myVolName = (chTag.substr(0, 8)).c_str(); - re->initDesign(-999., -999., -999., 3.2, -999., 2.7, -999., 2.6); + re->initDesign(2.6); re->fillCache(); mgr->addsTgcReadoutElement(std::move(re)); } diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h index 40060a49b9e85ffff7fc1c8936443445ddc90576..86c12607378dbad23a7593b38f04a19205bc3673 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONREADOUTGEOMETRY_STGCREADOUTELEMENT_H @@ -13,9 +13,10 @@ #include "MuonReadoutGeometry/MuonClusterReadoutElement.h" #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "MuonReadoutGeometry/MuonPadDesign.h" +#include "GeoModelInterfaces/IGeoDbTagSvc.h" -class BLinePar; -class GeoVFullPhysVol; + +class MuonReadoutGeomCnvAlg; namespace MuonGM { /** @@ -25,9 +26,12 @@ namespace MuonGM { class sTgcReadoutElement final : public MuonClusterReadoutElement { public: + friend class ::MuonReadoutGeomCnvAlg; + /** constructor */ - - sTgcReadoutElement(GeoVFullPhysVol* pv, const std::string& stName, int zi, int fi, int mL, MuonDetectorManager* mgr); + sTgcReadoutElement(GeoVFullPhysVol* pv, + const std::string& stName, + int zi, int fi, int mL, MuonDetectorManager* mgr); /** destructor */ ~sTgcReadoutElement(); @@ -150,8 +154,7 @@ namespace MuonGM { virtual bool measuresPhi(const Identifier& id) const override final; /** @brief initialize the design classes for this readout element */ - void initDesign(double largeX, double smallX, double lengthY, double stripPitch, double wirePitch, double stripWidth, - double wireWidth, double thickness); + void initDesign(double thickness); /** returns the MuonChannelDesign class for the given identifier */ const MuonChannelDesign* getDesign(const Identifier& id) const; @@ -199,14 +202,20 @@ namespace MuonGM { static double triggerBandIdToRadius(bool isLarge, int triggerBand); private: - std::vector<MuonChannelDesign> m_phiDesign; - std::vector<MuonChannelDesign> m_etaDesign; - std::vector<MuonPadDesign> m_padDesign; - - std::vector<int> m_nStrips; - std::vector<int> m_nWires; - std::vector<int> m_nPads; - int m_nlayers{0}; + + void initDesignFromSQLite(double thickness); + + void initDesignFromAGDD(double thickness); + + const sTgcIdHelper& m_idHelper{idHelperSvc()->stgcIdHelper()}; + std::array<MuonChannelDesign,4> m_phiDesign{}; + std::array<MuonChannelDesign,4> m_etaDesign{}; + std::array<MuonPadDesign,4> m_padDesign{}; + + std::array<int, 4> m_nStrips{}; + std::array<int, 4> m_nWires{}; + std::array<int, 4> m_nPads{}; + static constexpr int m_nlayers{4}; int m_ml{0}; double m_offset{0.}; @@ -219,20 +228,17 @@ namespace MuonGM { const BLinePar* m_BLinePar{nullptr}; Amg::Transform3D m_delta{Amg::Transform3D::Identity()}; - // const double m_largeSectorOpeningAngle = 28.0; - // const double m_smallSectorOpeningAngle = 17.0; - // surface dimensions for strips - std::vector<double> m_halfX; - std::vector<double> m_minHalfY; - std::vector<double> m_maxHalfY; + std::array<double, 4> m_halfX{}; + std::array<double, 4> m_minHalfY{}; + std::array<double, 4> m_maxHalfY{}; // surface dimensions for pads and wires - std::vector<double> m_PadhalfX; - std::vector<double> m_PadminHalfY; - std::vector<double> m_PadmaxHalfY; + std::array<double, 4> m_PadhalfX{}; + std::array<double, 4> m_PadminHalfY{}; + std::array<double, 4> m_PadmaxHalfY{}; // transforms (RE->layer) - Amg::Transform3D m_Xlg[4]; + std::array<Amg::Transform3D, 4> m_Xlg{make_array<Amg::Transform3D, 4>(Amg::Transform3D::Identity())}; // The radial positions of the trigger bands cannot be derived from the readout geometry, therefore hard-coding them for now diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/sTgcReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/sTgcReadoutElement.cxx index 5ff7efb2d662dc5186a1d332fd38e67662b51f28..533a5c5b070c42165c34244545b96933d20da7ce 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/sTgcReadoutElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/sTgcReadoutElement.cxx @@ -9,11 +9,13 @@ #include "MuonReadoutGeometry/sTgcReadoutElement.h" -#include <GaudiKernel/IMessageSvc.h> +#include <GeoPrimitives/GeoPrimitivesHelpers.h> +#include <GeoPrimitives/GeoPrimitivesToStringConverter.h> + #include <GeoModelKernel/GeoLogVol.h> #include <GeoModelKernel/GeoVFullPhysVol.h> #include <GeoModelKernel/GeoVPhysVol.h> -#include <TString.h> +#include <GeoModelHelpers/StringUtils.h> #include <cmath> #include <ext/alloc_traits.h> @@ -22,9 +24,6 @@ #include <stdexcept> #include <utility> -#include "AthenaKernel/getMessageSvc.h" -#include "EventPrimitives/AmgMatrixBasePlugin.h" -#include "GaudiKernel/MsgStream.h" #include "GeoModelKernel/GeoFullPhysVol.h" #include "Identifier/IdentifierHash.h" #include "MuonAGDDDescription/sTGCDetectorDescription.h" @@ -43,8 +42,16 @@ #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" -#include "GeoModelInterfaces/IGeoDbTagSvc.h" +#define THROW_EXCEPTION(MSG) \ + { \ + std::stringstream sstr{}; \ + sstr<<"sTgcReadoutElement - "<<idHelperSvc()->toStringDetEl(identify())<<" "<<__LINE__<<": "; \ + sstr<<MSG; \ + throw std::runtime_error(sstr.str()); \ + } \ + +using namespace GeoStrUtils; namespace MuonGM { //============================================================================ @@ -59,56 +66,6 @@ namespace MuonGM { setChamberLayer(mL); setIdentifier(id); // representative identifier, with stName, stEta, stPhi, mL -#ifndef NDEBUG - sTGCDetectorHelper sTGC_helper; - std::string sTGCname = std::string("sTG1-") + stName; - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "sTGCname: " << sTGCname << endmsg; - sTGCDetectorDescription* sTGC = sTGC_helper.Get_sTGCDetectorType(sTGCname); - if (not sTGC){ - log << MSG::FATAL << "sTGC helper could not be retrieved in sTgcReadoutElement constructor "<<endmsg; - return; - } - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Found sTGC detector: " << sTGCname << " " << sTGC << endmsg; - static const int nLayers = 4; - for (int layer = 0; layer < nLayers; layer++) { - double length = sTGC->Length(); // Distance between parallel sides of the trapezoid - double ysFrame = sTGC->ysFrame(); // Frame thickness on short parallel edge - double ylFrame = sTGC->ylFrame(); // Frame thickness on long parallel edge - if (log.level() <= MSG::DEBUG) - log << MSG::DEBUG << "length: " << length << " ysFrame: " << ysFrame << " ylFrame: " << ylFrame << endmsg; - } -#endif - - if (mgr->MinimalGeoFlag() == 0) { - if (GeoFullPhysVol* pvc = dynamic_cast<GeoFullPhysVol*>(pv)) { - unsigned int nchildvol = pvc->getNChildVols(); - int llay = 0; - std::string::size_type npos; - for (unsigned ich = 0; ich < nchildvol; ++ich) { - PVConstLink pc = pvc->getChildVol(ich); - std::string childname = (pc->getLogVol())->getName(); -#ifndef NDEBUG - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Volume Type: " << pc->getLogVol()->getShape()->type() << endmsg; -#endif - if ((npos = childname.find("Sensitive")) != std::string::npos) { - llay++; - if (llay > 4) { -#ifndef NDEBUG - if (log.level() <= MSG::DEBUG) - log << MSG::DEBUG << "number of sTGC layers > 4: increase transform array size" << endmsg; -#endif - continue; - } - m_Xlg[llay - 1] = pvc->getXToChildVol(ich); - } - } - m_nlayers = llay; - } else { - throw std::runtime_error(Form( - "File: %s, Line: %d\nsTgcReadoutElement::sTgcReadoutElement() - Cannot perform a dynamic cast !", __FILE__, __LINE__)); - } - } } @@ -116,20 +73,13 @@ namespace MuonGM { sTgcReadoutElement::~sTgcReadoutElement() = default; //============================================================================ - void sTgcReadoutElement::initDesign(double /*largeX*/, double /*smallX*/, double /*lengthY*/, double /*stripPitch*/, - double /*wirePitch*/, double /*stripWidth*/, double /*wireWidth*/, double thickness) { - - - MsgStream log(Athena::getMessageSvc(), "sTGCReadoutElement"); - ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap - IGeoDbTagSvc* geoDbTag{nullptr}; - StatusCode sc = svcLocator->service("GeoDbTagSvc",geoDbTag); - if (sc.isFailure()) log << MSG::FATAL << "Could not locate GeoDbTagSvc" << endmsg; - GeoModelIO::ReadGeoModel* sqliteReader = geoDbTag->getSqliteReader(); - if (sqliteReader) { + void sTgcReadoutElement::initDesignFromSQLite(double thickness) { + ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap + IGeoDbTagSvc* geoDbTag{nullptr}; + svcLocator->service("GeoDbTagSvc",geoDbTag).ignore(); + IRDBAccessSvc *accessSvc{nullptr}; - StatusCode sc=svcLocator->service(geoDbTag->getParamSvcName(),accessSvc); - if (sc.isFailure()) log << MSG::FATAL << "Could not locate " << geoDbTag->getParamSvcName() << endmsg; + svcLocator->service(geoDbTag->getParamSvcName(),accessSvc).ignore(); IRDBRecordset_ptr nswdimRec = accessSvc->getRecordsetPtr("NSWDIM","",""); IRDBRecordset_ptr wstgcRec = accessSvc->getRecordsetPtr("WSTGC","",""); IRDBRecordset_ptr nswPars = accessSvc->getRecordsetPtr("NSWPARS","",""); @@ -139,372 +89,298 @@ namespace MuonGM { std::string pVName=parent->getNameOfChildVol(index); float yCutoutCathode(0); if (nswPars->size()==0) { - throw std::runtime_error("Error, cannot access NSWPARS record!"); - } - else { - yCutoutCathode=(*nswPars)[0]->getFloat("NSW_sTGC_yCutoutCathode"); + THROW_EXCEPTION("Error, cannot access NSWPARS record!"); + } else { + yCutoutCathode=(*nswPars)[0]->getFloat("NSW_sTGC_yCutoutCathode"); } for (unsigned int ind = 0; ind < wstgcRec->size(); ind++) { - std::string WSTGC_TYPE = (*wstgcRec)[ind]->getString("WSTGC_TYPE"); - - if (getStationName()[2] != WSTGC_TYPE[6]) continue; - if (abs(getStationEta())!=(int) (WSTGC_TYPE[7]-'0')) continue; - if (m_ml != (int) (pVName[7]-'0')) continue; - const IRDBRecord *nswdim{nullptr}; - std::string logVolSubName=getMaterialGeom()->getLogVol()->getName().substr(7,4); - size_t w{0}; - for (w=0;w<nswdimRec->size();w++) { - nswdim = (*nswdimRec)[w]; - const std::string & type = nswdim->getString("NSW_TYPE").substr(5,4); - if (type==logVolSubName) { - break; - } - } - - m_sWidthChamber = nswdim->getDouble("BASE_WIDTH");; // bottom base length (full chamber) - m_lWidthChamber = nswdim->getDouble("TOP_WIDTH"); // top base length (full chamber) - m_lengthChamber = nswdim->getDouble("LENGTH"); // height of the trapezoid (full chamber) - - double gasTck = (*wstgcRec)[ind]->getDouble("gasTck"); - double Tck = (*wstgcRec)[ind]->getDouble("Tck"); - double xFrame = (*wstgcRec)[ind]->getDouble("xFrame"); - double ylFrame = (*wstgcRec)[ind]->getDouble("ylFrame"); - double ysFrame = (*wstgcRec)[ind]->getDouble("ysFrame"); - double wirePitch = (*wstgcRec)[ind]->getDouble("wirePitch"); - double stripPitch = (*wstgcRec)[ind]->getDouble("stripPitch"); - double stripWidth = (*wstgcRec)[ind]->getDouble("stripWidth"); - double sPadWidth = (*wstgcRec)[ind]->getDouble("sPadWidth"); - double lPadWidth = (*wstgcRec)[ind]->getDouble("lPadWidth"); - double anglePadPhi = (*wstgcRec)[ind]->getDouble("anglePadPhi"); - double sStripWidth = (*wstgcRec)[ind]->getDouble("sStripWidth"); - double lStripWidth = (*wstgcRec)[ind]->getDouble("lStripWidth"); - int wireGroupWidth = (*wstgcRec)[ind]->getInt("wireGroupWidth"); - int nStrips = (*wstgcRec)[ind]->getInt("nStrips"); - std::string padH = (*wstgcRec)[ind]->getString("padH"); - std::string rankPadPhi = (*wstgcRec)[ind]->getString("rankPadPhi"); - std::string nPadPhi = (*wstgcRec)[ind]->getString("nPadPhi"); - std::string firstPadPhiDivision_C = (*wstgcRec)[ind]->getString("firstPadPhiDivision_C"); - std::string PadPhiShift_C = (*wstgcRec)[ind]->getString("PadPhiShift_C"); - std::string firstPadPhiDivision_A = (*wstgcRec)[ind]->getString("firstPadPhiDivision_A"); - std::string PadPhiShift_A = (*wstgcRec)[ind]->getString("PadPhiShift_A"); - std::string rankPadH = (*wstgcRec)[ind]->getString("rankPadH"); - std::string nPadH = (*wstgcRec)[ind]->getString("nPadH"); - std::string firstPadH = (*wstgcRec)[ind]->getString("firstPadH"); - std::string firstPadRow = (*wstgcRec)[ind]->getString("firstPadRow"); - std::string wireCutout = (*wstgcRec)[ind]->getString("wireCutout"); - std::string nWires = (*wstgcRec)[ind]->getString("nWires"); - std::string firstWire = (*wstgcRec)[ind]->getString("firstWire"); - std::string firstTriggerBand = (*wstgcRec)[ind]->getString("firstTriggerBand"); - std::string nTriggerBands = (*wstgcRec)[ind]->getString("nTriggerBands"); - std::string firstStripInTrigger = (*wstgcRec)[ind]->getString("firstStripInTrigger"); - std::string firstStripWidth = (*wstgcRec)[ind]->getString("firstStripWidth"); - std::string StripsInBandsLayer1 = (*wstgcRec)[ind]->getString("StripsInBandsLayer1"); - std::string StripsInBandsLayer2 = (*wstgcRec)[ind]->getString("StripsInBandsLayer2"); - std::string StripsInBandsLayer3 = (*wstgcRec)[ind]->getString("StripsInBandsLayer3"); - std::string StripsInBandsLayer4 = (*wstgcRec)[ind]->getString("StripsInBandsLayer4"); - std::string nWireGroups = (*wstgcRec)[ind]->getString("nWireGroups"); - std::string firstWireGroup = (*wstgcRec)[ind]->getString("firstWireGroup"); + std::string WSTGC_TYPE = (*wstgcRec)[ind]->getString("WSTGC_TYPE"); - for (std::string * s : { - &padH , - &rankPadPhi , - &nPadPhi , - &firstPadPhiDivision_C, - &PadPhiShift_C , - &firstPadPhiDivision_A, - &PadPhiShift_A , - &rankPadH , - &nPadH , - &firstPadH , - &firstPadRow , - &wireCutout , - &nWires , - &firstWire , - &firstTriggerBand , - &nTriggerBands , - &firstStripInTrigger , - &firstStripWidth , - &StripsInBandsLayer1 , - &StripsInBandsLayer2 , - &StripsInBandsLayer3 , - &StripsInBandsLayer4 , - &nWireGroups , - &firstWireGroup - }) { - std::replace(s->begin(),s->end(),';',' '); - } - + if (getStationName()[2] != WSTGC_TYPE[6]) continue; + if (std::abs(getStationEta())!=(int) (WSTGC_TYPE[7]-'0')) continue; + if (m_ml != (int) (pVName[7]-'0')) continue; + const IRDBRecord *nswdim{nullptr}; + std::string logVolSubName=getMaterialGeom()->getLogVol()->getName().substr(7,4); + + size_t w{0}; + for (w=0;w<nswdimRec->size();w++) { + nswdim = (*nswdimRec)[w]; + const std::string type = nswdim->getString("NSW_TYPE").substr(5,4); + if (type==logVolSubName) { + break; + } + } - char sector_l = getStationName().substr(2, 1) == "L" ? 'L' : 'S'; - int stEta = std::abs(getStationEta()); - int Etasign = getStationEta() / stEta; - std::string side = (Etasign > 0) ? "A" : "C"; - m_diamondShape = sector_l == 'L' && stEta == 3; + m_sWidthChamber = nswdim->getDouble("BASE_WIDTH");; // bottom base length (full chamber) + m_lWidthChamber = nswdim->getDouble("TOP_WIDTH"); // top base length (full chamber) + m_lengthChamber = nswdim->getDouble("LENGTH"); // height of the trapezoid (full chamber) - m_phiDesign = std::vector<MuonChannelDesign>(m_nlayers); - m_etaDesign = std::vector<MuonChannelDesign>(m_nlayers); - m_padDesign = std::vector<MuonPadDesign>(m_nlayers); + const double gasTck = (*wstgcRec)[ind]->getDouble("gasTck"); + const double Tck = (*wstgcRec)[ind]->getDouble("Tck"); + const double xFrame = (*wstgcRec)[ind]->getDouble("xFrame"); + const double ylFrame = (*wstgcRec)[ind]->getDouble("ylFrame"); + const double ysFrame = (*wstgcRec)[ind]->getDouble("ysFrame"); + const double wirePitch = (*wstgcRec)[ind]->getDouble("wirePitch"); + const double stripPitch = (*wstgcRec)[ind]->getDouble("stripPitch"); + const double stripWidth = (*wstgcRec)[ind]->getDouble("stripWidth"); + const double sPadWidth = (*wstgcRec)[ind]->getDouble("sPadWidth"); + const double lPadWidth = (*wstgcRec)[ind]->getDouble("lPadWidth"); + const double anglePadPhi = (*wstgcRec)[ind]->getDouble("anglePadPhi"); + const double sStripWidth = (*wstgcRec)[ind]->getDouble("sStripWidth"); + const double lStripWidth = (*wstgcRec)[ind]->getDouble("lStripWidth"); + const int wireGroupWidth = (*wstgcRec)[ind]->getInt("wireGroupWidth"); + const int nStrips = (*wstgcRec)[ind]->getInt("nStrips"); + const std::vector<double> padH = tokenizeDouble((*wstgcRec)[ind]->getString("padH"),";"); + const std::vector<double> rankPadPhi = tokenizeDouble((*wstgcRec)[ind]->getString("rankPadPhi"),";"); + const std::vector<int> nPadPhi = tokenizeInt((*wstgcRec)[ind]->getString("nPadPhi"),";"); + const std::vector<double> firstPadPhiDivision_C = tokenizeDouble((*wstgcRec)[ind]->getString("firstPadPhiDivision_C"),";"); + const std::vector<double> PadPhiShift_C = tokenizeDouble((*wstgcRec)[ind]->getString("PadPhiShift_C"),";"); + const std::vector<double> firstPadPhiDivision_A = tokenizeDouble((*wstgcRec)[ind]->getString("firstPadPhiDivision_A"),";"); + const std::vector<double> PadPhiShift_A = tokenizeDouble((*wstgcRec)[ind]->getString("PadPhiShift_A"),";"); + const std::vector<double> rankPadH = tokenizeDouble((*wstgcRec)[ind]->getString("rankPadH"),";"); + const std::vector<int> nPadH = tokenizeInt((*wstgcRec)[ind]->getString("nPadH"),";"); + const std::vector<double> firstPadH = tokenizeDouble((*wstgcRec)[ind]->getString("firstPadH"),";"); + const std::vector<double> firstPadRow = tokenizeDouble((*wstgcRec)[ind]->getString("firstPadRow"),";"); + const std::vector<double> wireCutout = tokenizeDouble((*wstgcRec)[ind]->getString("wireCutout"),";"); + const std::vector<int> nWires = tokenizeInt((*wstgcRec)[ind]->getString("nWires"),";"); + const std::vector<int> firstWire = tokenizeInt((*wstgcRec)[ind]->getString("firstWire"),";"); + const std::vector<double> firstTriggerBand = tokenizeDouble((*wstgcRec)[ind]->getString("firstTriggerBand"),";"); + const std::vector<int> nTriggerBands = tokenizeInt((*wstgcRec)[ind]->getString("nTriggerBands"),";"); + const std::vector<double> firstStripInTrigger = tokenizeDouble((*wstgcRec)[ind]->getString("firstStripInTrigger"),";"); + const std::vector<double> firstStripWidth = tokenizeDouble((*wstgcRec)[ind]->getString("firstStripWidth"),";"); + const std::vector<double> StripsInBandsLayer1 = tokenizeDouble((*wstgcRec)[ind]->getString("StripsInBandsLayer1"),";"); + const std::vector<double> StripsInBandsLayer2 = tokenizeDouble((*wstgcRec)[ind]->getString("StripsInBandsLayer2"),";"); + const std::vector<double> StripsInBandsLayer3 = tokenizeDouble((*wstgcRec)[ind]->getString("StripsInBandsLayer3"),";"); + const std::vector<double> StripsInBandsLayer4 = tokenizeDouble((*wstgcRec)[ind]->getString("StripsInBandsLayer4"),";"); + const std::vector<int> nWireGroups = tokenizeInt((*wstgcRec)[ind]->getString("nWireGroups"),";"); + const std::vector<double> firstWireGroup = tokenizeDouble((*wstgcRec)[ind]->getString("firstWireGroup"),";"); - // Get frame widths - m_tckChamber = Tck; // thickness (full chamber) - - double yCutout = m_diamondShape ? yCutoutCathode: 0.0; // y of cutout of trapezoid (only in outermost detectors) - - // For strips: - m_halfX = std::vector<double>(m_nlayers); - m_minHalfY = std::vector<double>(m_nlayers); - m_maxHalfY = std::vector<double>(m_nlayers); - // For pads and wires: - m_PadhalfX = std::vector<double>(m_nlayers); - m_PadminHalfY = std::vector<double>(m_nlayers); - m_PadmaxHalfY = std::vector<double>(m_nlayers); + char sector_l = getStationName().substr(2, 1) == "L" ? 'L' : 'S'; + int stEta = std::abs(getStationEta()); + int Etasign = getStationEta() / stEta; + std::string side = (Etasign > 0) ? "A" : "C"; + m_diamondShape = sector_l == 'L' && stEta == 3; - // Radial shift of the local frame origin w.r.t. the center of the quadruplet. - // For diamond shape (QL3) the origin is on the cutout base. For the rest, the it is at the center - // of the active area, therefore the shift is half the difference of the top and bottom frame widths. - m_offset = (m_diamondShape) ? 0.5*m_lengthChamber - (yCutout + ylFrame) : -0.5*(ylFrame - ysFrame); - - //------------------- - // Strips - //------------------- - std::istringstream firstStripWidthStream(firstStripWidth); - for (int il = 0; il < m_nlayers; il++) { - // identifier of the first channel - strip plane - to retrieve max number of strips - /*Identifier id = manager()->stgcIdHelper()->channelID(getStationName(),getStationEta(),getStationPhi(),m_ml, il+1, 1, 1); - int chMax = manager()->stgcIdHelper()->channelMax(id); - if (chMax<0) chMax = 350;*/ - - m_etaDesign[il].type = MuonChannelDesign::ChannelType::etaStrip; - m_etaDesign[il].detType = MuonChannelDesign::DetType::STGC; - if (yCutout == 0.) - m_etaDesign[il].defineTrapezoid(0.5 * sStripWidth, 0.5 * lStripWidth, 0.5 * (m_lengthChamber - ysFrame - ylFrame)); - else - m_etaDesign[il].defineDiamond(0.5 * sStripWidth, 0.5 * lStripWidth, 0.5 * (m_lengthChamber - ysFrame - ylFrame), yCutout); - - m_etaDesign[il].inputPitch = stripPitch; - m_etaDesign[il].inputWidth = stripWidth; - m_etaDesign[il].thickness = gasTck; - firstStripWidthStream >> m_etaDesign[il].firstPitch; - m_etaDesign[il].setFirstPos((m_diamondShape) ? -(m_etaDesign[il].xSize()- yCutout) + m_etaDesign[il].firstPitch - : -0.5 * m_etaDesign[il].xSize()+ m_etaDesign[il].firstPitch); - m_etaDesign[il].nch = nStrips; - - m_nStrips.push_back(m_etaDesign[il].nch); - - m_halfX[il] = 0.5*m_etaDesign[il].xSize(); - m_minHalfY[il] = 0.5*sStripWidth; - m_maxHalfY[il] = 0.5*lStripWidth; - - } - //------------------- - // Wires - //------------------- - std::istringstream firstWireStream (firstWire); - std::istringstream firstWireGroupStream (firstWireGroup); - std::istringstream nWireGroupsStream (nWireGroups); - std::istringstream wireCutoutStream (wireCutout); - std::istringstream nWiresStream (nWires); + // Get frame widths + m_tckChamber = Tck; // thickness (full chamber) + + double yCutout = m_diamondShape ? yCutoutCathode: 0.0; // y of cutout of trapezoid (only in outermost detectors) + - for (int il = 0; il < m_nlayers; il++) { - m_phiDesign[il].type = MuonChannelDesign::ChannelType::phiStrip; - m_phiDesign[il].detType = MuonChannelDesign::DetType::STGC; - if (yCutout == 0.) - m_phiDesign[il].defineTrapezoid(0.5 * sPadWidth, 0.5 * lPadWidth, 0.5 * (m_lengthChamber - ysFrame - ylFrame) ); - else - m_phiDesign[il].defineDiamond(0.5 * sPadWidth, 0.5 * lPadWidth, 0.5 * (m_lengthChamber - ysFrame - ylFrame), yCutout); - m_phiDesign[il].inputPitch = wirePitch; - m_phiDesign[il].inputWidth = 0.015; - m_phiDesign[il].thickness = m_tckChamber; - {int fw; firstWireStream >> fw; m_phiDesign[il].setFirstPos(fw);} // Position of 1st wire, accounts for staggering - firstWireGroupStream >> m_phiDesign[il].firstPitch; // Number of Wires in 1st group, group staggering - m_phiDesign[il].groupWidth = wireGroupWidth; // Number of Wires normal group - nWireGroupsStream >> m_phiDesign[il].nGroups; // Number of Wire Groups - wireCutoutStream >> m_phiDesign[il].wireCutout; // Size of "active" wire region for digits - nWiresStream >> m_phiDesign[il].nch; - - m_nWires.push_back(m_phiDesign[il].nGroups); // number of nWireGroups + // Radial shift of the local frame origin w.r.t. the center of the quadruplet. + // For diamond shape (QL3) the origin is on the cutout base. For the rest, the it is at the center + // of the active area, therefore the shift is half the difference of the top and bottom frame widths. + m_offset = (m_diamondShape) ? 0.5*m_lengthChamber - (yCutout + ylFrame) : -0.5*(ylFrame - ysFrame); + + //------------------- + // Strips + //------------------- + for (int il = 0; il < m_nlayers; il++) { + m_etaDesign[il].type = MuonChannelDesign::ChannelType::etaStrip; + m_etaDesign[il].detType = MuonChannelDesign::DetType::STGC; + if (yCutout == 0.) { + m_etaDesign[il].defineTrapezoid(0.5 * sStripWidth, + 0.5 * lStripWidth, + 0.5 * (m_lengthChamber - ysFrame - ylFrame)); + } else { + m_etaDesign[il].defineDiamond(0.5 * sStripWidth, + 0.5 * lStripWidth, + 0.5 * (m_lengthChamber - ysFrame - ylFrame), yCutout); + } + m_etaDesign[il].inputPitch = stripPitch; + m_etaDesign[il].inputWidth = stripWidth; + m_etaDesign[il].thickness = gasTck; + m_etaDesign[il].firstPitch = firstStripWidth[il]; + m_etaDesign[il].setFirstPos(m_diamondShape ? -(m_etaDesign[il].xSize()- yCutout) + m_etaDesign[il].firstPitch + : -0.5 * m_etaDesign[il].xSize()+ m_etaDesign[il].firstPitch); + m_etaDesign[il].nch = nStrips; - } + m_nStrips[il] = m_etaDesign[il].nch; + + m_halfX[il] = 0.5*m_etaDesign[il].xSize(); + m_minHalfY[il] = 0.5*sStripWidth; + m_maxHalfY[il] = 0.5*lStripWidth; + } - //------------------- - // Pads - //------------------- - std::istringstream nPadPhiStream(nPadPhi); - std::istringstream firstPadPhiDivision_AStream(firstPadPhiDivision_A); - std::istringstream padPhiShift_AStream(PadPhiShift_A); - std::istringstream firstPadRowStream(firstPadRow); - std::istringstream nPadHStream(nPadH); - std::istringstream firstPadHStream(firstPadH); - std::istringstream padHStream(padH); + //------------------- + // Wires + //------------------- + for (int il = 0; il < m_nlayers; il++) { + m_phiDesign[il].type = MuonChannelDesign::ChannelType::phiStrip; + m_phiDesign[il].detType = MuonChannelDesign::DetType::STGC; + if (yCutout == 0.) { + m_phiDesign[il].defineTrapezoid(0.5 * sPadWidth, + 0.5 * lPadWidth, + 0.5 * (m_lengthChamber - ysFrame - ylFrame) ); + } else { + m_phiDesign[il].defineDiamond(0.5 * sPadWidth, + 0.5 * lPadWidth, + 0.5 * (m_lengthChamber - ysFrame - ylFrame), yCutout); + } + m_phiDesign[il].inputPitch = wirePitch; + m_phiDesign[il].inputWidth = 0.015; + m_phiDesign[il].thickness = m_tckChamber; + m_phiDesign[il].setFirstPos(firstWire[il]); // Position of 1st wire, accounts for staggering + m_phiDesign[il].firstPitch = firstWireGroup[il]; // Number of Wires in 1st group, group staggering + m_phiDesign[il].groupWidth = wireGroupWidth; // Number of Wires normal group + m_phiDesign[il].nGroups = nWireGroups[il]; // Number of Wire Groups + m_phiDesign[il].wireCutout = wireCutout[il]; // Size of "active" wire region for digits + m_phiDesign[il].nch = nWires[il]; + + m_nWires[il] = m_phiDesign[il].nGroups; // number of nWireGroups + } - double radius = absTransform().translation().perp() + m_offset; - for (int il = 0; il < m_nlayers; il++) { - m_padDesign[il].Length = m_lengthChamber; - m_padDesign[il].sWidth = m_sWidthChamber; - m_padDesign[il].lWidth = m_lWidthChamber; - m_padDesign[il].Size = m_lengthChamber - ylFrame - ysFrame; - m_padDesign[il].xFrame = xFrame; - m_padDesign[il].ysFrame = ysFrame; - m_padDesign[il].ylFrame = ylFrame; - m_padDesign[il].yCutout = yCutout; - m_padDesign[il].etasign = Etasign; - m_padDesign[il].setR(radius); - m_padDesign[il].sPadWidth = sPadWidth; - m_padDesign[il].lPadWidth = lPadWidth; - nPadPhiStream >>m_padDesign[il].nPadColumns; + //------------------- + // Pads + //------------------- + double radius = absTransform().translation().perp() + m_offset; + for (int il = 0; il < m_nlayers; il++) { + m_padDesign[il].Length = m_lengthChamber; + m_padDesign[il].sWidth = m_sWidthChamber; + m_padDesign[il].lWidth = m_lWidthChamber; + m_padDesign[il].Size = m_lengthChamber - ylFrame - ysFrame; + m_padDesign[il].xFrame = xFrame; + m_padDesign[il].ysFrame = ysFrame; + m_padDesign[il].ylFrame = ylFrame; + m_padDesign[il].yCutout = yCutout; + m_padDesign[il].etasign = Etasign; + m_padDesign[il].setR(radius); + m_padDesign[il].sPadWidth = sPadWidth; + m_padDesign[il].lPadWidth = lPadWidth; + + m_padDesign[il].nPadColumns = nPadPhi[il]; - m_PadhalfX[il] = 0.5*m_padDesign[il].Size; - m_PadminHalfY[il] = 0.5*sPadWidth; - m_PadmaxHalfY[il] = 0.5*lPadWidth; + m_PadhalfX[il] = 0.5*m_padDesign[il].Size; + m_PadminHalfY[il] = 0.5*sPadWidth; + m_PadmaxHalfY[il] = 0.5*lPadWidth; - // The C side of the NSW is mirrored instead of rotated - // We should be using the same values for the pads for both A and C - // It is easier for us to simply read the same correct value once - // whereas changing the XML and the reading functions will make this incompatible with past versions - // Alexandre Laurier 12 Sept 2018 - firstPadPhiDivision_AStream >> m_padDesign[il].firstPhiPos; - m_padDesign[il].inputPhiPitch = anglePadPhi; // stEta<2 ? PAD_PHI_DIVISION/PAD_PHI_SUBDIVISION : PAD_PHI_DIVISION ; - padPhiShift_AStream >> m_padDesign[il].PadPhiShift; - firstPadRowStream >> m_padDesign[il].padEtaMin; // FIRST_PAD_ROW_DIVISION[2*sector+(m_ml-1)][stEta-1][il]; - nPadHStream >> m_padDesign[il].nPadH; - m_padDesign[il].padEtaMax = m_padDesign[il].padEtaMin + m_padDesign[il].nPadH; // PAD_ROWS[2*sector+(m_ml-1)][stEta-1][il]; - firstPadHStream >> m_padDesign[il].firstRowPos; // H_PAD_ROW_0[2*sector+(m_ml-1)][il]; - padHStream >> m_padDesign[il].inputRowPitch; // PAD_HEIGHT[2*sector+(m_ml-1)][il]; + // The C side of the NSW is mirrored instead of rotated + // We should be using the same values for the pads for both A and C + // It is easier for us to simply read the same correct value once + // whereas changing the XML and the reading functions will make this incompatible with past versions + // Alexandre Laurier 12 Sept 2018 + m_padDesign[il].firstPhiPos= firstPadPhiDivision_A[il]; + m_padDesign[il].inputPhiPitch = anglePadPhi; // stEta<2 ? PAD_PHI_DIVISION/PAD_PHI_SUBDIVISION : PAD_PHI_DIVISION ; + m_padDesign[il].PadPhiShift= PadPhiShift_A[il]; + m_padDesign[il].padEtaMin = firstPadRow[il]; // FIRST_PAD_ROW_DIVISION[2*sector+(m_ml-1)][stEta-1][il]; + m_padDesign[il].nPadH = nPadH[il]; + m_padDesign[il].padEtaMax = m_padDesign[il].padEtaMin + m_padDesign[il].nPadH; // PAD_ROWS[2*sector+(m_ml-1)][stEta-1][il]; + m_padDesign[il].firstRowPos = firstPadH[il]; // H_PAD_ROW_0[2*sector+(m_ml-1)][il]; + m_padDesign[il].inputRowPitch = padH[il]; // PAD_HEIGHT[2*sector+(m_ml-1)][il]; - if (sector_l == 'L') { - m_padDesign[il].isLargeSector = 1; - m_padDesign[il].sectorOpeningAngle = m_padDesign[il].largeSectorOpeningAngle; - } else { - m_padDesign[il].isLargeSector = 0; - m_padDesign[il].sectorOpeningAngle = m_padDesign[il].smallSectorOpeningAngle; - } - - m_padDesign[il].thickness = thickness; - } - } + if (sector_l == 'L') { + m_padDesign[il].isLargeSector = 1; + m_padDesign[il].sectorOpeningAngle = m_padDesign[il].largeSectorOpeningAngle; + } else { + m_padDesign[il].isLargeSector = 0; + m_padDesign[il].sectorOpeningAngle = m_padDesign[il].smallSectorOpeningAngle; + } + m_padDesign[il].thickness = thickness; + } + } } - // AGDD STYLE STARTS HERE: - else { - char sector_l = getStationName().substr(2, 1) == "L" ? 'L' : 'S'; - int stEta = std::abs(getStationEta()); - int Etasign = getStationEta() / stEta; - std::string side = (Etasign > 0) ? "A" : "C"; - m_diamondShape = sector_l == 'L' && stEta == 3; - -#ifndef NDEBUG - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "station name" << getStationName() << endmsg; -#endif - - sTGCDetectorHelper aHelper; - sTGCDetectorDescription* stgc = aHelper.Get_sTGCDetector(sector_l, stEta, getStationPhi(), m_ml, side.back()); - -#ifndef NDEBUG - log << MSG::DEBUG << "Found sTGC Detector " << stgc->GetName() << endmsg; -#endif + void sTgcReadoutElement::initDesignFromAGDD(double thickness) { + + char sector_l = getStationName().substr(2, 1) == "L" ? 'L' : 'S'; + int stEta = std::abs(getStationEta()); + int Etasign = getStationEta() / stEta; + std::string side = (Etasign > 0) ? "A" : "C"; + m_diamondShape = sector_l == 'L' && stEta == 3; - auto *tech = stgc->GetTechnology(); - if (!tech) - throw std::runtime_error( - Form("File: %s, Line: %d\nsTgcReadoutElement::initDesign() - Failed To get Technology for stgc element: %s", __FILE__, __LINE__, stgc->GetName().c_str())); + ATH_MSG_DEBUG("station name" << getStationName()); - m_phiDesign = std::vector<MuonChannelDesign>(m_nlayers); - m_etaDesign = std::vector<MuonChannelDesign>(m_nlayers); - m_padDesign = std::vector<MuonPadDesign>(m_nlayers); + sTGCDetectorHelper aHelper; + sTGCDetectorDescription* stgc = aHelper.Get_sTGCDetector(sector_l, stEta, getStationPhi(), m_ml, side.back()); - // Get Chamber length, width and frame widths - m_sWidthChamber = stgc->sWidth(); // bottom base length (full chamber) - m_lWidthChamber = stgc->lWidth(); // top base length (full chamber) - m_lengthChamber = stgc->Length(); // height of the trapezoid (full chamber) - m_tckChamber = stgc->Tck(); // thickness (full chamber) - double ysFrame = stgc->ysFrame(); // Frame thickness on short parallel edge - double ylFrame = stgc->ylFrame(); // Frame thickness on long parallel edge - double xFrame = stgc->xFrame(); // Frame thickness of non parallel edges - double yCutout = stgc->yCutoutCathode(); // y of cutout of trapezoid (only in outermost detectors) - sTGCReadoutParameters roParam = stgc->GetReadoutParameters(); + ATH_MSG_DEBUG( "Found sTGC Detector " << stgc->GetName() ); - // For strips: - m_halfX = std::vector<double>(m_nlayers); - m_minHalfY = std::vector<double>(m_nlayers); - m_maxHalfY = std::vector<double>(m_nlayers); - // For pads and wires: - m_PadhalfX = std::vector<double>(m_nlayers); - m_PadminHalfY = std::vector<double>(m_nlayers); - m_PadmaxHalfY = std::vector<double>(m_nlayers); + MuonGM::sTGC_Technology *tech = stgc->GetTechnology(); + if (!tech) THROW_EXCEPTION(" Failed To get Technology for stgc element:"<< stgc->GetName()); - // Radial shift of the local frame origin w.r.t. the center of the quadruplet. - // For diamond shape (QL3) the origin is on the cutout base. For the rest, the it is at the center - // of the active area, therefore the shift is half the difference of the top and bottom frame widths. - m_offset = (m_diamondShape) ? 0.5*m_lengthChamber - (yCutout + ylFrame) : -0.5*(ylFrame - ysFrame); - //------------------- - // Strips - //------------------- + // Get Chamber length, width and frame widths + m_sWidthChamber = stgc->sWidth(); // bottom base length (full chamber) + m_lWidthChamber = stgc->lWidth(); // top base length (full chamber) + m_lengthChamber = stgc->Length(); // height of the trapezoid (full chamber) + m_tckChamber = stgc->Tck(); // thickness (full chamber) + double ysFrame = stgc->ysFrame(); // Frame thickness on short parallel edge + double ylFrame = stgc->ylFrame(); // Frame thickness on long parallel edge + double xFrame = stgc->xFrame(); // Frame thickness of non parallel edges + double yCutout = stgc->yCutoutCathode(); // y of cutout of trapezoid (only in outermost detectors) + sTGCReadoutParameters roParam = stgc->GetReadoutParameters(); - for (int il = 0; il < m_nlayers; il++) { - // identifier of the first channel - strip plane - to retrieve max number of strips - /*Identifier id = manager()->stgcIdHelper()->channelID(getStationName(),getStationEta(),getStationPhi(),m_ml, il+1, 1, 1); - int chMax = manager()->stgcIdHelper()->channelMax(id); - if (chMax<0) chMax = 350;*/ - - m_etaDesign[il].type = MuonChannelDesign::ChannelType::etaStrip; - m_etaDesign[il].detType = MuonChannelDesign::DetType::STGC; - if (yCutout == 0.) - m_etaDesign[il].defineTrapezoid(0.5 * roParam.sStripWidth, 0.5 * roParam.lStripWidth, 0.5 * (m_lengthChamber - ysFrame - ylFrame)); - else - m_etaDesign[il].defineDiamond(0.5 * roParam.sStripWidth, 0.5 * roParam.lStripWidth, 0.5 * (m_lengthChamber - ysFrame - ylFrame), yCutout); - - m_etaDesign[il].inputPitch = stgc->stripPitch(); - m_etaDesign[il].inputWidth = stgc->stripWidth(); - m_etaDesign[il].thickness = tech->gasThickness; - m_etaDesign[il].firstPitch = roParam.firstStripWidth[il]; - m_etaDesign[il].setFirstPos((m_diamondShape) ? -(m_etaDesign[il].xSize()- yCutout) + m_etaDesign[il].firstPitch - : -0.5 * m_etaDesign[il].xSize()+ m_etaDesign[il].firstPitch); - m_etaDesign[il].nch = roParam.nStrips; - - m_nStrips.push_back(m_etaDesign[il].nch); - - m_halfX[il] = 0.5*m_etaDesign[il].xSize(); - m_minHalfY[il] = 0.5*roParam.sStripWidth; - m_maxHalfY[il] = 0.5*roParam.lStripWidth; - -#ifndef NDEBUG - if (log.level() <= MSG::DEBUG) - log << MSG::DEBUG << "initDesign:" << getStationName() << " layer " << il << ", strip pitch " << m_etaDesign[il].inputPitch - << ", nstrips " << m_etaDesign[il].nch << ", firstPos: " << m_etaDesign[il].firstPos() << endmsg; -#endif - } - //------------------- - // Wires - //------------------- + // Radial shift of the local frame origin w.r.t. the center of the quadruplet. + // For diamond shape (QL3) the origin is on the cutout base. For the rest, the it is at the center + // of the active area, therefore the shift is half the difference of the top and bottom frame widths. + m_offset = (m_diamondShape) ? 0.5*m_lengthChamber - (yCutout + ylFrame) : -0.5*(ylFrame - ysFrame); - for (int il = 0; il < m_nlayers; il++) { - m_phiDesign[il].type = MuonChannelDesign::ChannelType::phiStrip; - m_phiDesign[il].detType = MuonChannelDesign::DetType::STGC; - if (yCutout == 0.) - m_phiDesign[il].defineTrapezoid(0.5 * roParam.sPadWidth, 0.5 * roParam.lPadWidth, 0.5 * (m_lengthChamber - ysFrame - ylFrame) ); - else - m_phiDesign[il].defineDiamond(0.5 * roParam.sPadWidth, 0.5 * roParam.lPadWidth, 0.5 * (m_lengthChamber - ysFrame - ylFrame), yCutout); - m_phiDesign[il].inputPitch = stgc->wirePitch(); - m_phiDesign[il].inputWidth = 0.015; - m_phiDesign[il].thickness = m_tckChamber; - m_phiDesign[il].setFirstPos(roParam.firstWire[il]); // Position of 1st wire, accounts for staggering - m_phiDesign[il].firstPitch = roParam.firstWireGroup[il]; // Number of Wires in 1st group, group staggering - m_phiDesign[il].groupWidth = roParam.wireGroupWidth; // Number of Wires normal group - m_phiDesign[il].nGroups = roParam.nWireGroups[il]; // Number of Wire Groups - m_phiDesign[il].wireCutout = roParam.wireCutout[il]; // Size of "active" wire region for digits - m_phiDesign[il].nch = roParam.nWires[il]; - - m_nWires.push_back(m_phiDesign[il].nGroups); // number of nWireGroups - -#ifndef NDEBUG - if (log.level() <= MSG::DEBUG) - log << MSG::DEBUG << "initDesign:" << getStationName() << " layer " << il << ", wireGang pitch " - << m_phiDesign[il].inputPitch << ", nWireGangs " << m_phiDesign[il].nch << endmsg; -#endif + //------------------- + // Strips + //------------------- + for (int il = 0; il < m_nlayers; il++) { + // identifier of the first channel - strip plane - to retrieve max number of strips + m_etaDesign[il].type = MuonChannelDesign::ChannelType::etaStrip; + m_etaDesign[il].detType = MuonChannelDesign::DetType::STGC; + if (yCutout == 0.) { + m_etaDesign[il].defineTrapezoid(0.5 * roParam.sStripWidth, + 0.5 * roParam.lStripWidth, + 0.5 * (m_lengthChamber - ysFrame - ylFrame)); + } else { + m_etaDesign[il].defineDiamond(0.5 * roParam.sStripWidth, + 0.5 * roParam.lStripWidth, + 0.5 * (m_lengthChamber - ysFrame - ylFrame), yCutout); + } + m_etaDesign[il].inputPitch = stgc->stripPitch(); + m_etaDesign[il].inputWidth = stgc->stripWidth(); + m_etaDesign[il].thickness = tech->gasThickness; + m_etaDesign[il].firstPitch = roParam.firstStripWidth[il]; + m_etaDesign[il].setFirstPos((m_diamondShape) ? -(m_etaDesign[il].xSize()- yCutout) + m_etaDesign[il].firstPitch + : -0.5 * m_etaDesign[il].xSize()+ m_etaDesign[il].firstPitch); + m_etaDesign[il].nch = roParam.nStrips; + + m_nStrips[il] = m_etaDesign[il].nch; + + m_halfX[il] = 0.5*m_etaDesign[il].xSize(); + m_minHalfY[il] = 0.5*roParam.sStripWidth; + m_maxHalfY[il] = 0.5*roParam.lStripWidth; + + ATH_MSG_DEBUG("initDesign:" << getStationName() << " layer " << il + << ", strip pitch " << m_etaDesign[il].inputPitch + << ", nstrips " << m_etaDesign[il].nch + << ", firstPos: " << m_etaDesign[il].firstPos() ); + } + + //------------------- + // Wires + //------------------- + for (int il = 0; il < m_nlayers; il++) { + m_phiDesign[il].type = MuonChannelDesign::ChannelType::phiStrip; + m_phiDesign[il].detType = MuonChannelDesign::DetType::STGC; + if (yCutout == 0.) { + m_phiDesign[il].defineTrapezoid(0.5 * roParam.sPadWidth, + 0.5 * roParam.lPadWidth, + 0.5 * (m_lengthChamber - ysFrame - ylFrame) ); + } else { + m_phiDesign[il].defineDiamond(0.5 * roParam.sPadWidth, + 0.5 * roParam.lPadWidth, + 0.5 * (m_lengthChamber - ysFrame - ylFrame), yCutout); + } + m_phiDesign[il].inputPitch = stgc->wirePitch(); + m_phiDesign[il].inputWidth = 0.015; + m_phiDesign[il].thickness = m_tckChamber; + m_phiDesign[il].setFirstPos(roParam.firstWire[il]); // Position of 1st wire, accounts for staggering + m_phiDesign[il].firstPitch = roParam.firstWireGroup[il]; // Number of Wires in 1st group, group staggering + m_phiDesign[il].groupWidth = roParam.wireGroupWidth; // Number of Wires normal group + m_phiDesign[il].nGroups = roParam.nWireGroups[il]; // Number of Wire Groups + m_phiDesign[il].wireCutout = roParam.wireCutout[il]; // Size of "active" wire region for digits + m_phiDesign[il].nch = roParam.nWires[il]; + m_nWires[il] = m_phiDesign[il].nGroups; // number of nWireGroups + + ATH_MSG_DEBUG( "initDesign:" << getStationName() << " layer " << il << ", wireGang pitch " + << m_phiDesign[il].inputPitch << ", nWireGangs " << m_phiDesign[il].nch ); } //------------------- @@ -554,9 +430,7 @@ namespace MuonGM { m_padDesign[il].thickness = thickness; -#ifndef NDEBUG - if (log.level() <= MSG::DEBUG) - log << MSG::DEBUG << "initDesign stationname " << getStationName() << " layer " << il << ",pad phi angular width " + ATH_MSG_DEBUG( "initDesign stationname " << getStationName() << " layer " << il << ",pad phi angular width " << m_padDesign[il].inputPhiPitch << ", eta pad size " << m_padDesign[il].inputRowPitch << " Length: " << m_padDesign[il].Length << " sWidth: " << m_padDesign[il].sWidth << " lWidth: " << m_padDesign[il].lWidth << " firstPhiPos:" << m_padDesign[il].firstPhiPos @@ -565,23 +439,53 @@ namespace MuonGM { << " thickness:" << m_padDesign[il].thickness << " sPadWidth: " << m_padDesign[il].sPadWidth << " lPadWidth: " << m_padDesign[il].lPadWidth << " xFrame: " << m_padDesign[il].xFrame << " ysFrame: " << m_padDesign[il].ysFrame << " ylFrame: " << m_padDesign[il].ylFrame - << " yCutout: " << m_padDesign[il].yCutout << endmsg; -#endif - } - } + << " yCutout: " << m_padDesign[il].yCutout ); + } + } + + void sTgcReadoutElement::initDesign(double thickness) { + + if (manager()->MinimalGeoFlag() == 0) { + PVConstLink pvc {getMaterialGeom()}; + unsigned int nchildvol = pvc->getNChildVols(); + int llay = 0; + std::string::size_type npos; + for (unsigned ich = 0; ich < nchildvol; ++ich) { + PVConstLink pc = pvc->getChildVol(ich); + std::string childname = (pc->getLogVol())->getName(); + + ATH_MSG_DEBUG("Volume Type: " << pc->getLogVol()->getShape()->type()); + if ((npos = childname.find("Sensitive")) != std::string::npos) { + ++llay; + if (llay > 4) { + ATH_MSG_DEBUG("number of sTGC layers > 4: increase transform array size"); + continue; + } + m_Xlg[llay - 1] = pvc->getXToChildVol(ich); + } + } + assert(m_nlayers == llay); + } + + ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap + IGeoDbTagSvc* geoDbTag{nullptr}; + StatusCode sc = svcLocator->service("GeoDbTagSvc",geoDbTag); + if (sc.isFailure()) THROW_EXCEPTION( "Could not locate GeoDbTagSvc" ); + if (geoDbTag->getSqliteReader()) initDesignFromSQLite(thickness); + else initDesignFromAGDD(thickness); + } //============================================================================ void sTgcReadoutElement::fillCache() { - if (!m_surfaceData) - m_surfaceData = std::make_unique<SurfaceData>(); - else { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "calling fillCache on an already filled cache" << endmsg; + if (m_surfaceData) { + ATH_MSG_WARNING("calling fillCache on an already filled cache" ); return; } + m_surfaceData = std::make_unique<SurfaceData>(); + for (int layer{0}; layer < m_nlayers; ++layer) { // Define the geometry for the strips, pads and wires of this readout element. @@ -611,16 +515,16 @@ namespace MuonGM { //------------------- // identifier of the first channel - wire plane - locX along phi, locY max->min R - Identifier id = manager()->stgcIdHelper()->channelID(getStationName(), getStationEta(), getStationPhi(), m_ml, layer + 1, 2, 1); + Identifier id = m_idHelper.channelID(getStationName(), getStationEta(), getStationPhi(), m_ml, layer + 1, 2, 1); m_surfaceData->m_layerSurfaces.push_back(std::make_unique<Trk::PlaneSurface>(*this, id)); m_surfaceData->m_layerTransforms.push_back( absTransform() // transformation from chamber to ATLAS frame * m_delta // transformations from the alignment group * m_Xlg[layer] // x-shift of the gas-gap center w.r.t. quadruplet center - * Amg::Translation3D(0, 0., m_offset) // z-shift to volume center (after m_delta!) - * Amg::AngleAxis3D(-90 * CLHEP::deg, Amg::Vector3D(0., 1., 0.)) // x<->z because of GeoTrd definition - * Amg::AngleAxis3D(-90 * CLHEP::deg, Amg::Vector3D(0., 0., 1.))); // x<->y for wires + * Amg::getTranslateZ3D(m_offset) // z-shift to volume center (after m_delta!) + * Amg::getRotateY3D(-90 * CLHEP::deg) // x<->z because of GeoTrd definition + * Amg::getRotateZ3D(-90 * CLHEP::deg)); // x<->y for wires m_surfaceData->m_layerCenters.emplace_back(m_surfaceData->m_layerTransforms.back().translation()); m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() * Amg::Vector3D(0., 0., -1.)); @@ -632,12 +536,12 @@ namespace MuonGM { const double shift{layer%2 == 0 ? 0.01 : -0.01}; // 1st layer gets +0.01; layer numbering starts from 0 here! // identifier of the first channel - strip plane - id = manager()->stgcIdHelper()->channelID(getStationName(), getStationEta(), getStationPhi(), m_ml, layer + 1, 1, 1); + id = m_idHelper.channelID(getStationName(), getStationEta(), getStationPhi(), m_ml, layer + 1, 1, 1); m_surfaceData->m_layerSurfaces.push_back(std::make_unique<Trk::PlaneSurface>(*this, id)); m_surfaceData->m_layerTransforms.push_back(absTransform() * m_delta * m_Xlg[layer] *Amg::Translation3D(shift, 0., m_offset) - *Amg::AngleAxis3D(-90 * CLHEP::deg, Amg::Vector3D(0., 1., 0.))); // x<->z because of GeoTrd definition + *Amg::getRotateY3D(-90 * CLHEP::deg)); // x<->z because of GeoTrd definition m_surfaceData->m_layerCenters.emplace_back(m_surfaceData->m_layerTransforms.back().translation()); m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() * Amg::Vector3D(0., 0., -1.)); @@ -647,13 +551,14 @@ namespace MuonGM { //------------------- // identifier of the first channel - pad plane - id = manager()->stgcIdHelper()->channelID(getStationName(), getStationEta(), getStationPhi(), m_ml, layer + 1, 0, 1); + id = m_idHelper.channelID(getStationName(), getStationEta(), getStationPhi(), m_ml, layer + 1, 0, 1); m_surfaceData->m_layerSurfaces.push_back(std::make_unique<Trk::PlaneSurface>(*this, id)); - m_surfaceData->m_layerTransforms.push_back(absTransform() * m_delta * m_Xlg[layer] * Amg::Translation3D(-shift, 0., m_offset) - * Amg::AngleAxis3D(-90 * CLHEP::deg, Amg::Vector3D(0., 1., 0.)) // x<->z because of GeoTrd definition - * Amg::AngleAxis3D(-90 * CLHEP::deg, Amg::Vector3D(0., 0., 1.))); // x<->y for pads + m_surfaceData->m_layerTransforms.push_back(absTransform() * m_delta * m_Xlg[layer] * + Amg::getTranslate3D(-shift, 0., m_offset) + * Amg::getRotateY3D(-90 * CLHEP::deg) // x<->z because of GeoTrd definition + * Amg::getRotateZ3D(-90 * CLHEP::deg)); // x<->y for pads m_surfaceData->m_layerCenters.emplace_back(m_surfaceData->m_layerTransforms.back().translation()); m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() * Amg::Vector3D(0., 0., -1.)); @@ -663,18 +568,18 @@ namespace MuonGM { //============================================================================ bool sTgcReadoutElement::containsId(const Identifier& id) const { - if (manager()->stgcIdHelper()->stationEta(id) != getStationEta()) return false; - if (manager()->stgcIdHelper()->stationPhi(id) != getStationPhi()) return false; + if (m_idHelper.stationEta(id) != getStationEta()) return false; + if (m_idHelper.stationPhi(id) != getStationPhi()) return false; - if (manager()->stgcIdHelper()->multilayerID(id) != m_ml) return false; + if (m_idHelper.multilayerID(id) != m_ml) return false; - int gasgap = manager()->stgcIdHelper()->gasGap(id); + int gasgap = m_idHelper.gasGap(id); if (gasgap < 1 || gasgap > m_nlayers) return false; - int strip = manager()->stgcIdHelper()->channel(id); - if (manager()->stgcIdHelper()->channelType(id) == 1 && (strip < 1 || strip > m_nStrips[gasgap - 1])) return false; - if (manager()->stgcIdHelper()->channelType(id) == 2 && (strip < 1 || strip > m_nWires[gasgap - 1])) return false; - if (manager()->stgcIdHelper()->channelType(id) == 0 && (strip < 1 || strip > m_nPads[gasgap - 1])) return false; + int strip = m_idHelper.channel(id); + if (m_idHelper.channelType(id) == sTgcIdHelper::sTgcChannelTypes::Strip && (strip < 1 || strip > m_nStrips[gasgap - 1])) return false; + if (m_idHelper.channelType(id) == sTgcIdHelper::sTgcChannelTypes::Wire && (strip < 1 || strip > m_nWires[gasgap - 1])) return false; + if (m_idHelper.channelType(id) == sTgcIdHelper::sTgcChannelTypes::Pad && (strip < 1 || strip > m_nPads[gasgap - 1])) return false; return true; } @@ -682,22 +587,20 @@ namespace MuonGM { //============================================================================ double sTgcReadoutElement::channelPitch(const Identifier& id) const { - if (manager()->stgcIdHelper()->channelType(id) == 0) { + if (m_idHelper.channelType(id) == sTgcIdHelper::sTgcChannelTypes::Pad) { const MuonPadDesign* design = getPadDesign(id); - if (!design) { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "no pad Design" << endmsg; + if (!design) { + ATH_MSG_WARNING( "no pad Design" ); return -1; } - return design->channelWidth(Amg::Vector2D(0, 0), 0); + return design->channelWidth(Amg::Vector2D::Zero(), 0); } const MuonChannelDesign* design = getDesign(id); if (!design) return -1; - - if (manager()->stgcIdHelper()->channelType(id) == 1) // sTGC strips + if (m_idHelper.channelType(id) == sTgcIdHelper::sTgcChannelTypes::Strip) // sTGC strips return design->inputPitch; - else if (manager()->stgcIdHelper()->channelType(id) == 2) // sTGC wires + else if (m_idHelper.channelType(id) == sTgcIdHelper::sTgcChannelTypes::Wire) // sTGC wires return design->inputPitch * design->groupWidth; // wire Pitch * number of wires in a group else return -1; @@ -707,9 +610,8 @@ namespace MuonGM { //============================================================================ int sTgcReadoutElement::padNumber(const Amg::Vector2D& pos, const Identifier& id) const { const MuonPadDesign* design = getPadDesign(id); - if (!design) { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "no pad Design" << endmsg; + if (!design) { + ATH_MSG_WARNING( "no pad Design" ); return -1; } std::pair<int, int> pad(design->channelNumber(pos)); @@ -733,15 +635,15 @@ namespace MuonGM { !is_valid || #endif padEta != pad.first || padPhi != pad.second) { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << " bad pad indices: input " << pad.first << " " << pad.second << " from ID " << padEta << " " - << padPhi << endmsg; + + ATH_MSG_WARNING( " bad pad indices: input " << pad.first << " " << pad.second << " from ID " << padEta << " " + << padPhi ); return -1; } return channel; } - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING <<__LINE__<< " bad channelNumber" <<pad.first<<" "<<pad.second << endmsg; + + ATH_MSG_WARNING(__LINE__<< " bad channelNumber" <<pad.first<<" "<<pad.second ); return -1; } @@ -750,9 +652,8 @@ namespace MuonGM { //============================================================================ int sTgcReadoutElement::wireNumber(const Amg::Vector2D& pos, const Identifier& id) const { const MuonChannelDesign* design = getDesign(id); - if (!design) { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "no wire design when trying to get the wire number" << endmsg; + if (!design) { + ATH_MSG_WARNING( "no wire design when trying to get the wire number" ); return -1; } return design->wireNumber(pos); @@ -761,9 +662,8 @@ namespace MuonGM { //============================================================================ double sTgcReadoutElement::wirePitch(int gas_gap) const { - if (m_phiDesign.empty()) { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "no wire design when trying to get the wire pitch" << endmsg; + if (m_phiDesign.empty()) { + ATH_MSG_WARNING( "no wire design when trying to get the wire pitch" ); return -1.0; } return (m_phiDesign[gas_gap - 1]).inputPitch; @@ -773,17 +673,15 @@ namespace MuonGM { //============================================================================ double sTgcReadoutElement::positionFirstWire(const Identifier& id) const { double pos_wire = -9999.9; - if (manager()->stgcIdHelper()->channelType(id) == sTgcIdHelper::sTgcChannelTypes::Wire) { + if (m_idHelper.channelType(id) == sTgcIdHelper::sTgcChannelTypes::Wire) { const MuonChannelDesign* design = getDesign(id); - if (!design) { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "no wire design when trying to get the 1st wire position" << endmsg; + if (!design) { + ATH_MSG_WARNING( "no wire design when trying to get the 1st wire position" ); return pos_wire; } pos_wire = design->firstPos(); - } else { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "attempt to retrieve the 1st wire position with a wrong identifier" << endmsg; + } else { + ATH_MSG_WARNING( "attempt to retrieve the 1st wire position with a wrong identifier" ); } return pos_wire; } @@ -792,17 +690,15 @@ namespace MuonGM { //============================================================================ int sTgcReadoutElement::numberOfWires(const Identifier& id) const { int nWires = -1; - if (manager()->stgcIdHelper()->channelType(id) == sTgcIdHelper::sTgcChannelTypes::Wire) { + if (m_idHelper.channelType(id) == sTgcIdHelper::sTgcChannelTypes::Wire) { const MuonChannelDesign* design = getDesign(id); - if (!design) { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "no wire design when trying to get the total number of wires" << endmsg; + if (!design) { + ATH_MSG_WARNING( "no wire design when trying to get the total number of wires" ); return nWires; } nWires = design->nch; - } else { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "attempt to retrieve the number of wires with a wrong identifier" << endmsg; + } else { + ATH_MSG_WARNING( "attempt to retrieve the number of wires with a wrong identifier" ); } return nWires; } @@ -810,27 +706,20 @@ namespace MuonGM { //============================================================================ Amg::Vector3D sTgcReadoutElement::localToGlobalCoords(const Amg::Vector3D& locPos, Identifier id) const { - int gg = manager()->stgcIdHelper()->gasGap(id); - int channelType = manager()->stgcIdHelper()->channelType(id); + int gg = m_idHelper.gasGap(id); + int channelType = m_idHelper.channelType(id); // The assigned coordinate along the layer normal is at the center of the gas gap; // wires are considered at x=0, while: // for layers 1, 3 strips (pads) are shifted by +10 (-10) microns // for layers 2, 4 strips (pads) are shifted by -10 (+10) microns - Amg::Vector3D locPos_ML(0, 0, 0); double shift{0.}; if (channelType != 2) shift = ((gg % 2) ^ (channelType==0)) ? 0.01 : -0.01; - locPos_ML = m_Xlg[gg - 1] * Amg::Translation3D(shift, 0., m_offset) * locPos; - -#ifndef NDEBUG - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - if (log.level() <= MSG::DEBUG) { - log << MSG::DEBUG << "position coordinates in the gas-gap r.f.: " << locPos << endmsg; - log << MSG::DEBUG << "position coordinates in the multilayer r.f.: " << locPos_ML << endmsg; - } -#endif - Amg::Vector3D gVec = absTransform() * m_delta * locPos_ML; - return gVec; + const Amg::Vector3D locPos_ML = m_Xlg[gg - 1] * Amg::getTranslate3D(shift, 0., m_offset) * locPos; + + ATH_MSG_DEBUG( "position coordinates in the gas-gap r.f.: " << Amg::toString(locPos) ); + ATH_MSG_DEBUG( "position coordinates in the multilayer r.f.: " << Amg::toString(locPos_ML) ); + return absTransform() * m_delta * locPos_ML; } @@ -844,7 +733,7 @@ namespace MuonGM { // of m_delta so that it can be applied on chamber frame coordinates. Amg::Translation3D t(0., 0., m_offset); m_ALinePar = &aline; - m_delta = t*m_delta*t.inverse(); + m_delta = Amg::getTranslateZ3D(m_offset)*m_delta*Amg::getTranslateZ3D(-m_offset); refreshCache(); } else { clearALinePar(); @@ -934,9 +823,8 @@ namespace MuonGM { pos = Amg::Vector3D(locXpos, locYpos, 0.); const MuonChannelDesign* design = getDesign(layerId); - if (!design) { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "Unable to get MuonChannelDesign, therefore cannot provide position corrections. Returning." << endmsg; + if (!design) { + ATH_MSG_WARNING( "Unable to get MuonChannelDesign, therefore cannot provide position corrections. Returning." ); return; } @@ -949,22 +837,20 @@ namespace MuonGM { //********************* const NswAsBuilt::StgcStripCalculator* sc = manager()->getStgcAsBuiltCalculator(); if (sc && design->type == MuonChannelDesign::ChannelType::etaStrip) { - Amg::Vector2D lpos(locXpos, locYpos); // express the local position w.r.t. the nearest active strip Amg::Vector2D rel_pos; int istrip = design->positionRelativeToStrip(lpos, rel_pos); - if (istrip < 0) { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - log << MSG::WARNING << "As-built corrections are provided only for eta strips within the active area. Returning." << endmsg; + if (istrip < 0) { + ATH_MSG_WARNING( "As-built corrections are provided only for eta strips within the active area. Returning." ); return; } // setup strip calculator NswAsBuilt::stripIdentifier_t strip_id; strip_id.quadruplet = { (largeSector() ? NswAsBuilt::quadrupletIdentifier_t::STL : NswAsBuilt::quadrupletIdentifier_t::STS), getStationEta(), getStationPhi(), m_ml }; - strip_id.ilayer = manager()->stgcIdHelper()->gasGap(layerId); + strip_id.ilayer = m_idHelper.gasGap(layerId); strip_id.istrip = istrip; // get the position coordinates, in the chamber frame, from NswAsBuilt. @@ -979,15 +865,9 @@ namespace MuonGM { // (don't go back to the layer frame yet, since we may apply b-lines later on) trfToML = m_delta.inverse()*absTransform().inverse()*transform(layerId); conditionsApplied = true; + } else { + ATH_MSG_DEBUG( "No as-built corrections provided for stEta: "<<getStationEta() << " stPhi: "<<getStationPhi()<<" ml: "<<m_ml<<" layer: "<<strip_id.ilayer); } -#ifndef NDEBUG - else { - MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement"); - if (log.level() <= MSG::DEBUG) { - log << MSG::DEBUG << "No as-built corrections provided for stEta: "<<getStationEta() << " stPhi: "<<getStationPhi()<<" ml: "<<m_ml<<" layer: "<<strip_id.ilayer<< endmsg; - } - } -#endif } #endif @@ -998,8 +878,7 @@ namespace MuonGM { // go to the multilayer reference frame if we are not already there if (!conditionsApplied) { trfToML = m_delta.inverse()*absTransform().inverse()*transform(layerId); - pos = trfToML*pos; - + pos = trfToML*pos; // signal that pos is now in the multilayer reference frame conditionsApplied = true; } diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactoryLite.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactoryLite.cxx index 7e514b572e16564a7cebd76d3c9c7ccd56e21d25..a96f788bb25b0008f770b545311326124971b97f 100644 --- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactoryLite.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactoryLite.cxx @@ -78,7 +78,7 @@ namespace MuonGM { else if (key.substr(0,3)=="sTG") { std::string sName = vName.substr(7,4); std::unique_ptr<sTgcReadoutElement> re = std::make_unique<sTgcReadoutElement>(pV, sName, ec*eta, phi, ml, m_manager); - re->initDesign(-999., -999., -999., 3.2, -999., 2.7, -999., 2.6); + re->initDesign(2.6); re->fillCache(); m_manager->addsTgcReadoutElement(std::move(re)); }