ATLAS Offline Software
MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 #include "GeoModelTgcTest.h"
5 
6 #include <fstream>
7 #include <iostream>
8 
13 #include "GaudiKernel/SystemOfUnits.h"
14 
15 
16 namespace MuonGM {
17 
18 template<typename VType> bool isEqual(const std::vector<VType>& a,
19  const std::vector<VType>& b) {
20  if (a.size() != b.size()) {
21  return false;
22  }
23  for (size_t k =0 ; k < a.size() ; ++k) {
24  if ( std::abs(a[k] - b[k]) > std::numeric_limits<VType>::epsilon()){
25  return false;
26  }
27  }
28  return true;
29 }
30 template <typename VType> std::ostream& operator<<(std::ostream& ostr, const std::vector<VType>& v){
31  for (size_t k = 0 ; k <v.size(); ++k){
32  ostr<<v[k];
33  if ( k+1 != v.size())ostr<<",";
34  }
35  return ostr;
36 }
37 template <typename VType> std::ostream& operator<<(std::ostream& ostr, const std::set<VType>& s){
38  unsigned int k=1;
39  for (const VType& ele : s){
40  ostr<<ele;
41  if (k != s.size()) ostr<<";";
42  ++k;
43  }
44  return ostr;
45 }
46 inline int nStrips(const MuonGM::TgcReadoutElement& readoutEle, int layer) {
47  return readoutEle.nStrips(layer) > 1 ? readoutEle.nStrips(layer) : 0;
48 }
49 
50 
53  std::string techType{};
54  std::vector<double> botStripPos{};
55  std::vector<double> topStripPos{};
56  std::vector<int> wireGangLayout{};
57  double wirePitch{0.};
58 
59  bool operator==(const TgcChamberLayout& other) const{
60  return isEqual(botStripPos, other.botStripPos) &&
61  isEqual(topStripPos, other.topStripPos) &&
62  isEqual(wireGangLayout, other.wireGangLayout) &&
63  std::abs(wirePitch - other.wirePitch) < std::numeric_limits<float>::epsilon();
64  }
65 };
66 struct ChamberGrp {
68  m_lay{grp} {
69  m_gaps[grp.techType].insert(grp.gasGap);
70  }
71  bool addChamber(const TgcChamberLayout& lay){
72  if (m_lay == lay) {
73  m_gaps[lay.techType].insert(lay.gasGap);
74  return true;
75  }
76  return false;
77  }
78  const std::map<std::string, std::set<Identifier>>& allGaps() const{ return m_gaps; }
79  const TgcChamberLayout& layout() const { return m_lay; }
81  private:
83  std::map<std::string, std::set<Identifier>> m_gaps{};
84 
85 };
86 
87 GeoModelTgcTest::GeoModelTgcTest(const std::string& name, ISvcLocator* pSvcLocator):
88  AthHistogramAlgorithm{name, pSvcLocator} {}
89 
92  return StatusCode::SUCCESS;
93 }
96  ATH_CHECK(m_idHelperSvc.retrieve());
97  ATH_CHECK(m_tree.init(this));
98  const TgcIdHelper& id_helper{m_idHelperSvc->tgcIdHelper()};
99  for (const std::string& testCham : m_selectStat) {
100  if (testCham.size() != 7) {
101  ATH_MSG_FATAL("Wrong format given " << testCham);
102  return StatusCode::FAILURE;
103  }
105  std::string statName = testCham.substr(0, 3);
106  unsigned int statEta = std::atoi(testCham.substr(3, 1).c_str()) *
107  (testCham[4] == 'A' ? 1 : -1);
108  unsigned int statPhi = std::atoi(testCham.substr(5, 2).c_str());
109  bool is_valid{false};
110  const Identifier eleId =
111  id_helper.elementID(statName, statEta, statPhi, is_valid);
112  if (!is_valid) {
113  ATH_MSG_FATAL("Failed to deduce a station name for " << testCham);
114  return StatusCode::FAILURE;
115  }
116  m_testStations.insert(eleId);
117  }
119  if (m_testStations.empty()){
120  for(auto itr = id_helper.detectorElement_begin();
121  itr!= id_helper.detectorElement_end();++itr){
122  m_testStations.insert(*itr);
123  }
124  }
125  return StatusCode::SUCCESS;
126 }
128  const EventContext& ctx{Gaudi::Hive::currentContext()};
130  if (!detMgr.isValid()) {
131  ATH_MSG_FATAL("Failed to retrieve MuonDetectorManager "
132  << m_detMgrKey.fullKey());
133  return StatusCode::FAILURE;
134  }
135  dumpReadoutXML(**detMgr);
136  for (const Identifier& test_me : m_testStations) {
137  ATH_MSG_VERBOSE("Test retrieval of Mdt detector element "
138  << m_idHelperSvc->toStringDetEl(test_me));
139  const TgcReadoutElement* reElement = detMgr->getTgcReadoutElement(test_me);
140  if (!reElement) {
141  ATH_MSG_VERBOSE("Detector element is invalid");
142  continue;
143  }
145  if (reElement->identify() != test_me) {
146  ATH_MSG_FATAL("Expected to retrieve "
147  << m_idHelperSvc->toStringDetEl(test_me) << ". But got instead "
148  << m_idHelperSvc->toStringDetEl(reElement->identify()));
149  return StatusCode::FAILURE;
150  }
151 
152  const Identifier prevId = reElement->getStationPhi() > 1 ? m_idHelperSvc->tgcIdHelper().elementID(m_idHelperSvc->stationNameString(test_me),
153  reElement->getStationEta(),
154  reElement->getStationPhi() - 1) : test_me;
155  const TgcReadoutElement* prevRE = detMgr->getTgcReadoutElement(prevId);
156  const Amg::Vector3D center = reElement->center();
157  ATH_MSG_DEBUG("Tgc element "<<m_idHelperSvc->toString(reElement->identify())
158  <<" position "<<Amg::toString(center, 2)
159  <<" perp: "<<center.perp()
160  <<" phi: "<<(center.phi() / Gaudi::Units::deg)
161  <<" theta: "<<(center.theta() / Gaudi::Units::deg)
162  <<" rSize: "<<reElement->getRsize()<<"/"<<reElement->getLongRsize()
163  <<" sSize: "<<reElement->getSsize()<<"/"<<reElement->getLongSsize()
164  <<" zSize: "<<reElement->getZsize()<<"/"<<reElement->getLongZsize()
165  <<" dPhi: "<<(prevRE->center().deltaPhi(center) / Gaudi::Units::deg));
166  ATH_CHECK(dumpToTree(ctx, reElement));
167  }
168  return StatusCode::SUCCESS;
169 }
170 StatusCode GeoModelTgcTest::dumpToTree(const EventContext& ctx, const TgcReadoutElement* readoutEle) {
171  m_stIndex = readoutEle->getStationIndex();
172  m_stEta = readoutEle->getStationEta();
173  m_stPhi = readoutEle->getStationPhi();
174  m_nGasGaps = readoutEle->nGasGaps();
175  ATH_MSG_DEBUG("Dump readout element "<<m_idHelperSvc->toString(readoutEle->identify()));
176 
177  const TgcIdHelper& idHelper{m_idHelperSvc->tgcIdHelper()};
178 
179  const Amg::Transform3D& trans{readoutEle->transform()};
180  m_readoutTransform = trans;
181  m_shortWidth = readoutEle->getSsize();
182  m_longWidth = readoutEle->getLongSsize();
183  m_height = readoutEle->length();
184 
185  m_thickness = readoutEle->getZsize();
186  m_stLayout = readoutEle->getTechnologyName();
187 
188  const MuonGM::MuonStation* station = readoutEle->parentMuonStation();
189  m_alignableNode = station->getGeoTransform()->getDefTransform() *
190  station->getNativeToAmdbLRS().inverse();
191 
192  if (station->hasALines()){
193  m_ALineTransS = station->getALine_tras();
194  m_ALineTransT = station->getALine_traz();
195  m_ALineTransZ = station->getALine_trat();
196  m_ALineRotS = station->getALine_rots();
197  m_ALineRotT = station->getALine_rotz();
198  m_ALineRotZ = station->getALine_rott();
199  }
200 
201  for (bool isStrip : {false, true}) {
202  for (int layer = 1 ; layer <= readoutEle->numberOfLayers(isStrip); ++layer){
203  const unsigned int nChan = isStrip ? nStrips(*readoutEle, layer) :
204  readoutEle->nWireGangs(layer);
205  if (!nChan) continue;
206  const Identifier layerId = idHelper.channelID(readoutEle->identify(),layer, isStrip, 1);
207  m_layTans.push_back(readoutEle->surface(layerId).transform());
210  m_layHeight.push_back(readoutEle->length());
211  m_layShortWidth.push_back(readoutEle->getSsize() /*- readoutEle->frameXwidth() * 2. */);
212  m_layLongWidth.push_back(readoutEle->getLongSsize() /*- readoutEle->frameXwidth() * 2. */);
213  unsigned int numWires = !isStrip ? readoutEle->nWires(layer) : 0;
214  m_layNumWires.push_back(numWires);
215 
216  if (isStrip) {
218  for (int strip = 1; strip <= nStrips(*readoutEle,layer); ++strip) {
219  bool is_valid{false};
220  const Identifier stripId = idHelper.channelID(readoutEle->identify(), layer, isStrip, strip, is_valid);
221  if (!is_valid) continue;
222 
224  const Amg::Vector3D globStripPos = readoutEle->channelPos(stripId);
225  Amg::Vector2D locStripPos{Amg::Vector2D::Zero()};
226  const Trk::Surface& surf{readoutEle->surface(stripId)};
227  if (!surf.globalToLocal(globStripPos, Amg::Vector3D::Zero(), locStripPos)){
228  ATH_MSG_FATAL("Failed to build local strip position "<<m_idHelperSvc->toString(stripId));
229  return StatusCode::FAILURE;
230  }
231  m_locStripCenter.push_back(locStripPos);
232  m_stripCenter.push_back(globStripPos);
234  const double stripHalfLength = readoutEle->stripLength() / 2.;
235 
236  const Amg::Vector2D locStripBot{readoutEle->stripPosOnShortBase(strip), -stripHalfLength};
237  const Amg::Vector2D locStripTop{readoutEle->stripPosOnLargeBase(strip), stripHalfLength};
238  const Amg::Vector3D globStripBot{surf.localToGlobal(locStripBot)};
239  const Amg::Vector3D globStripTop{surf.localToGlobal(locStripTop)};
240 
241  m_stripBottom.push_back(globStripBot);
242  m_stripTop.push_back(globStripTop);
243 
244  m_locStripBottom.push_back(locStripBot);
245  m_locStripTop.push_back(locStripTop);
246 
248  m_stripNum.push_back(strip);
249  m_stripLength.push_back(stripHalfLength * 2.);
250  m_stripPitch.push_back(readoutEle->stripPitch(layer,strip));
251  m_stripShortWidth.push_back(readoutEle->stripShortWidth(layer, strip));
252  m_stripLongWidth.push_back(readoutEle->stripLongWidth(layer, strip));
253  }
254  } else {
256  for (int gang = 1; gang <= readoutEle->nWireGangs(layer); ++gang) {
257  const Identifier gangId{idHelper.channelID(readoutEle->identify(), layer, isStrip, gang)};
258  const Trk::Surface& surf{readoutEle->surface(gangId)};
259  const Amg::Vector3D globPos{readoutEle->wireGangPos(layer, gang)};
261  if (!surf.globalToLocal(globPos,Amg::Vector3D::Zero(),locPos)) {
262  ATH_MSG_FATAL("Failed to extract local position "<<m_idHelperSvc->toString(gangId));
263  return StatusCode::FAILURE;
264  }
265  m_locGangPos.push_back(locPos);
266  m_gangCenter.push_back(globPos);
268  m_gangNum.push_back(gang);
269  m_gangNumWires.push_back(readoutEle->nWires(layer, gang));
270  m_gangLength.push_back(0.5 *(readoutEle->gangShortWidth(layer, gang) +
271  readoutEle->gangLongWidth(layer, gang) ));
272  }
273  }
274  }
275  }
276  return m_tree.fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
277 }
278 
280  if (m_readoutXML.empty()) {
281  return;
282  }
283  std::ofstream xmlStream{m_readoutXML};
284  const TgcIdHelper& idHelper{m_idHelperSvc->tgcIdHelper()};
285  std::map<Identifier, TgcChamberLayout> allLayouts{};
286  for (TgcIdHelper::const_id_iterator itr = idHelper.module_begin();
287  itr != idHelper.module_end(); ++itr) {
288  const MuonGM::TgcReadoutElement* reEle = detMgr.getTgcReadoutElement(*itr);
289  if (!reEle) continue;
290  for (bool isStrip : {false, true}) {
291  for (int layer = 1 ; layer <= reEle->numberOfLayers(isStrip); ++layer){
292  const Identifier layerId = idHelper.channelID(reEle->identify(), layer, isStrip, 1);
293  TgcChamberLayout& chambLayout = allLayouts[m_idHelperSvc->gasGapId(layerId)];
294  chambLayout.gasGap = m_idHelperSvc->gasGapId(layerId);
295  chambLayout.techType = reEle->getTechnologyName();
296  if (isStrip && nStrips(*reEle, layer)) {
297  const double halfHeight = 0.5 * (reEle->getRsize() - 2. * reEle->physicalDistanceFromBase());
298  const Amg::Transform3D globToLoc{reEle->surface(layerId).transform().inverse() * reEle->absTransform()};
299  const double sign = (reEle->getStationEta()> 0. ? -1. : 1.) *( (globToLoc*Amg::Vector3D::UnitY()).x() > 0 ? 1. : -1);
300 
301  for (int strip = 1; strip < 33; ++strip) {
304  chambLayout.botStripPos.push_back(sign *reEle->stripLowEdgeLocX(layer,strip, -halfHeight));
305  chambLayout.topStripPos.push_back(sign *reEle->stripLowEdgeLocX(layer,strip, +halfHeight));
306  if (strip != 32) continue;
307  chambLayout.botStripPos.push_back(sign *reEle->stripHighEdgeLocX(layer,strip, -halfHeight));
308  chambLayout.topStripPos.push_back(sign *reEle->stripHighEdgeLocX(layer,strip, +halfHeight));
309  }
310  } else if (!isStrip) {
311  unsigned int accumlWires{0};
312  chambLayout.wirePitch = reEle->wirePitch();
318  for (int gang = 1; gang <= reEle->nWireGangs(layer); ++gang) {
319  unsigned int nWires = reEle->nWires(layer , gang);
320  accumlWires+=nWires;
321  if (nWires) {
322  chambLayout.wireGangLayout.push_back(nWires);
323  } else {
324  chambLayout.wireGangLayout.push_back(reEle->nWires(layer) - accumlWires);
325  break;
326  }
327  }
328  }
329  }
330  }
331  }
333  std::vector<ChamberGrp> groupedLayouts{};
334  for (const auto& lay : allLayouts) {
335  bool added{false};
336  for (ChamberGrp& grp : groupedLayouts) {
337  if (grp.addChamber(lay.second)){
338  added = true;
339  break;
340  }
341  }
342  if (!added) groupedLayouts.emplace_back(lay.second);
343  }
344  allLayouts.clear();
345  std::stable_sort(groupedLayouts.begin(),groupedLayouts.end(),
346  [](const ChamberGrp& a, const ChamberGrp& b){
347  return a.layout().techType < b.layout().techType;
348  });
350  ATH_MSG_INFO("Found in total "<<groupedLayouts.size()<<" different chamber layouts");
351  xmlStream<<"<Table name=\"TgcSensorLayout\">"<<std::endl;
352  unsigned int counter{1};
353  for (const ChamberGrp& grp : groupedLayouts) {
354  for (const auto& [tech_type, gapIds]: grp.allGaps()) {
355  std::set<int> gaps{};
356  std::set<char> sides{};
357  for (const Identifier gapId : gapIds) {
358  gaps.insert(m_idHelperSvc->gasGap(gapId));
359  sides.insert(m_idHelperSvc->stationEta(gapId) > 0 ? 'A' : 'C');
360  }
361  xmlStream<<" <Row ";
362  xmlStream<<"TGCSENSORLAYOUT_DATA_ID=\""<<counter<<"\" ";
363  xmlStream<<"technology=\""<<tech_type<<"\" ";
364  xmlStream<<"gasGap=\""<<gaps<<"\" ";
365  xmlStream<<"side=\""<<sides<<"\" ";
366  xmlStream<<"wirePitch=\""<<grp.layout().wirePitch<<"\" ";
367  xmlStream<<"wireGangs=\""<<grp.layout().wireGangLayout<<"\" ";
368  xmlStream<<"bottomStrips=\""<<grp.layout().botStripPos<<"\" ";
369  xmlStream<<"topStrips=\""<<grp.layout().topStripPos<<"\" ";
370  xmlStream<<" />"<<std::endl;
371  ++counter;
372  }
373  }
374  xmlStream<<"</Table> "<<std::endl;
375 }
376 
377 
378 }
MuonGM::ChamberGrp::m_lay
TgcChamberLayout m_lay
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:82
MuonGM::TgcChamberLayout::topStripPos
std::vector< double > topStripPos
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:55
MuonGM::TgcReadoutElement::physicalDistanceFromBase
double physicalDistanceFromBase() const
MuonGM::TgcReadoutElement::numberOfLayers
virtual int numberOfLayers(bool isStrip) const override
number of layers in phi/eta projection
MuonGM::TgcReadoutElement::stripPosOnShortBase
double stripPosOnShortBase(int strip) const
MuonGM::TgcChamberLayout::botStripPos
std::vector< double > botStripPos
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:54
MuonGM::GeoModelTgcTest::m_shortWidth
MuonVal::ScalarBranch< float > & m_shortWidth
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:69
MuonGM::MuonClusterReadoutElement::transform
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Definition: MuonClusterReadoutElement.h:124
MuonGM::MuonStation::getALine_trat
double getALine_trat() const
Definition: MuonStation.h:192
MuonGM::operator<<
std::ostream & operator<<(std::ostream &os, const AlignPos &p)
Definition: AlignPos.cxx:8
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonGM::GeoModelTgcTest::dumpToTree
StatusCode dumpToTree(const EventContext &ctx, const TgcReadoutElement *readoutEle)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:170
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
MuonGM::MuonReadoutElement::absTransform
const Amg::Transform3D & absTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:210
MuonGM::GeoModelTgcTest::m_gangCenter
MuonVal::ThreeVectorBranch m_gangCenter
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:100
MuonGM::GeoModelTgcTest::m_tree
MuonVal::MuonTesterTree m_tree
Write a TTree for validation purposes.
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:52
MuonGM::GeoModelTgcTest::m_readoutTransform
MuonVal::CoordTransformBranch m_readoutTransform
Transformation of the readout element (Translation, ColX, ColY, ColZ)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:65
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MuonVal::MuonTesterTree::init
StatusCode init(OWNER *instance)
Initialize method.
MuonGM::TgcReadoutElement::stripHighEdgeLocX
double stripHighEdgeLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the right edge of the strip at a given local radial position.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:138
MuonGM::ChamberGrp
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:66
MuonGM::GeoModelTgcTest::m_layHeight
MuonVal::VectorBranch< float > & m_layHeight
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:113
MuonGM::MuonClusterReadoutElement::center
virtual const Amg::Vector3D & center() const override
Return the center of the element.
Definition: MuonClusterReadoutElement.h:125
MuonGM::GeoModelTgcTest::m_locStripBottom
MuonVal::TwoVectorBranch m_locStripBottom
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:88
TgcIdHelper
Definition: TgcIdHelper.h:50
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonGM::GeoModelTgcTest::m_detMgrKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detMgrKey
MuonDetectorManager from the conditions store.
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:36
MuonGM::GeoModelTgcTest::initialize
StatusCode initialize() override
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:94
MuonGM::MuonStation::getALine_rotz
double getALine_rotz() const
Definition: MuonStation.h:194
GeoModelTgcTest.h
MuonGM::MuonStation::getALine_traz
double getALine_traz() const
Definition: MuonStation.h:191
MuonGM::GeoModelTgcTest::m_stripLongWidth
MuonVal::VectorBranch< float > & m_stripLongWidth
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:95
MuonGM::GeoModelTgcTest::m_layShortWidth
MuonVal::VectorBranch< float > & m_layShortWidth
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:111
MuonGM::GeoModelTgcTest::m_locStripCenter
MuonVal::TwoVectorBranch m_locStripCenter
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:87
MuonGM::MuonStation::getALine_tras
double getALine_tras() const
Definition: MuonStation.h:190
MuonGM::GeoModelTgcTest::execute
StatusCode execute() override
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:127
MuonGM::MuonReadoutElement::getZsize
double getZsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:198
MuonGM::GeoModelTgcTest::m_readoutXML
Gaudi::Property< std::string > m_readoutXML
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:54
deg
#define deg
Definition: SbPolyhedron.cxx:17
MuonGM::TgcReadoutElement::stripLength
double stripLength() const
Returns the length of each strip which is equal to the height of the chamber.
MuonGM::GeoModelTgcTest::m_stripLength
MuonVal::VectorBranch< float > & m_stripLength
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:98
MuonGM::MuonReadoutElement::getTechnologyName
const std::string & getTechnologyName() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:188
MuonGM::GeoModelTgcTest::m_stPhi
MuonVal::ScalarBranch< short > & m_stPhi
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:60
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonGM::GeoModelTgcTest::m_gangNumWires
MuonVal::VectorBranch< uint8_t > & m_gangNumWires
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:105
MuonGM::MuonReadoutElement::getLongSsize
double getLongSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:199
MuonGM::GeoModelTgcTest::m_stEta
MuonVal::ScalarBranch< short > & m_stEta
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:59
MuonGM::GeoModelTgcTest::m_gangNum
MuonVal::VectorBranch< unsigned int > & m_gangNum
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:104
x
#define x
MuonGM::GeoModelTgcTest::m_ALineTransZ
MuonVal::ScalarBranch< float > & m_ALineTransZ
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:77
MuonGM::GeoModelTgcTest::m_gangLength
MuonVal::VectorBranch< float > & m_gangLength
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:106
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
MuonGM::TgcReadoutElement::stripLowEdgeLocX
double stripLowEdgeLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the left edge of the strip at a given local radial position.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:130
MuonGM::TgcReadoutElement::nGasGaps
int nGasGaps() const
Returns the number of gas gaps associated with the readout element (2 or 3)
ReadCondHandle.h
MuonGM::GeoModelTgcTest::m_stripCenter
MuonVal::ThreeVectorBranch m_stripCenter
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:83
MuonGM::TgcReadoutElement::wireGangPos
Amg::Vector3D wireGangPos(const Identifier &id) const
Returns the global position of a wireGang.
MuonGM::TgcReadoutElement::channelPos
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip)
MuonGM::GeoModelTgcTest::m_ALineTransS
MuonVal::ScalarBranch< float > & m_ALineTransS
Alignment parameters.
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:75
MuonGM::ChamberGrp::layout
TgcChamberLayout & layout()
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:80
MuonGM::TgcChamberLayout::techType
std::string techType
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:53
MuonGM::GeoModelTgcTest::m_stripNum
MuonVal::VectorBranch< unsigned int > & m_stripNum
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:93
MuonGM::MuonDetectorManager::getTgcReadoutElement
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:247
MuonGM::MuonReadoutElement::getLongRsize
double getLongRsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:200
MuonGM::MuonReadoutElement::getSsize
double getSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:196
MuonVal::ThreeVectorBranch::push_back
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
Definition: ThreeVectorBranch.cxx:23
MuonGM::isEqual
bool isEqual(const std::vector< VType > &a, const std::vector< VType > &b)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:18
MuonGM::GeoModelTgcTest::m_ALineTransT
MuonVal::ScalarBranch< float > & m_ALineTransT
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:76
MuonGM::GeoModelTgcTest::m_nGasGaps
MuonVal::ScalarBranch< uint8_t > & m_nGasGaps
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:73
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonGM::TgcReadoutElement::gangLongWidth
double gangLongWidth(int gasGap, int gang) const
Returns the length of the most top wire in the gang.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:86
MuonVal::TwoVectorBranch::push_back
void push_back(const Amg::Vector2D &vec)
interface using the Amg::Vector3D
Definition: TwoVectorBranch.cxx:21
MuonGM::MuonStation::getALine_rott
double getALine_rott() const
Definition: MuonStation.h:195
MuonGM::GeoModelTgcTest::m_testStations
std::set< Identifier > m_testStations
Set of stations to be tested.
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:44
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
MuonGM::MuonReadoutElement::getLongZsize
double getLongZsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:201
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::TgcReadoutElement::gangShortWidth
double gangShortWidth(int gasGap, int gang) const
Returns the length of the most bottom wire in the gang.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:79
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonGM::TgcReadoutElement::nWires
int nWires(int gasGap) const
Returns the total number of wires in a given gas gap.
MuonGM::MuonReadoutElement::parentMuonStation
const MuonStation * parentMuonStation() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:135
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGM::ChamberGrp::layout
const TgcChamberLayout & layout() const
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:79
MuonGM::GeoModelTgcTest::m_thickness
MuonVal::ScalarBranch< float > & m_thickness
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:72
MuonGM::MuonStation
Definition: MuonStation.h:51
MuonGM::TgcReadoutElement
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:42
MuonGM::TgcChamberLayout::operator==
bool operator==(const TgcChamberLayout &other) const
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:59
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:127
MuonGM::GeoModelTgcTest::m_stLayout
MuonVal::ScalarBranch< std::string > & m_stLayout
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:61
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonGM::MuonStation::getNativeToAmdbLRS
const Amg::Transform3D & getNativeToAmdbLRS() const
Definition: MuonStation.h:182
MuonGM::GeoModelTgcTest::m_height
MuonVal::ScalarBranch< float > & m_height
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:71
MuonGM::TgcChamberLayout::wireGangLayout
std::vector< int > wireGangLayout
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:56
MuonGM::TgcReadoutElement::nStrips
int nStrips(int gasGap) const
Returns the number of strips in a given gas gap.
MuonGM::GeoModelTgcTest::m_stripBottom
MuonVal::ThreeVectorBranch m_stripBottom
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:84
AthHistogramAlgorithm
Definition: AthHistogramAlgorithm.h:32
MuonGM::GeoModelTgcTest::m_layTans
MuonVal::CoordSystemsBranch m_layTans
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:108
MuonGM::GeoModelTgcTest::finalize
StatusCode finalize() override
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:90
MuonGM::TgcReadoutElement::nWireGangs
int nWireGangs(int gasGap) const
Returns the number of wire gangs (Random grouping of wires) in a given gas gap.
MuonGM::GeoModelTgcTest::m_layNumWires
MuonVal::VectorBranch< uint16_t > & m_layNumWires
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:114
MuonGM::MuonStation::getGeoTransform
const GeoAlignableTransform * getGeoTransform() const
Definition: MuonStation.h:167
MuonVal::VectorBranch::push_back
void push_back(const T &value)
Adds a new element at the end of the vector.
MuonGM::GeoModelTgcTest::m_locStripTop
MuonVal::TwoVectorBranch m_locStripTop
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:89
MuonGM::nStrips
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:46
MuonGM::GeoModelTgcTest::m_stripShortWidth
MuonVal::VectorBranch< float > & m_stripShortWidth
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:94
dumpTgcDigiThreshold.isStrip
list isStrip
Definition: dumpTgcDigiThreshold.py:33
MuonGM::TgcReadoutElement::stripLongWidth
double stripLongWidth(int, int) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:162
MuonGM::GeoModelTgcTest::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:40
MuonGM::GeoModelTgcTest::m_locGangPos
MuonVal::TwoVectorBranch m_locGangPos
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:101
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonGM::ChamberGrp::addChamber
bool addChamber(const TgcChamberLayout &lay)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:71
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
MuonGM::GeoModelTgcTest::dumpReadoutXML
void dumpReadoutXML(const MuonGM::MuonDetectorManager &detMgr)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:279
MuonGM::ChamberGrp::allGaps
const std::map< std::string, std::set< Identifier > > & allGaps() const
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:78
MuonGM::GeoModelTgcTest::m_stripGasGap
MuonVal::VectorBranch< uint8_t > & m_stripGasGap
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:92
MuonGM::GeoModelTgcTest::m_layNumber
MuonVal::VectorBranch< uint8_t > & m_layNumber
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:110
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGM::TgcReadoutElement::wirePitch
double wirePitch() const
Returns the pitch of the wires.
MuonGM::GeoModelTgcTest::m_layMeasPhi
MuonVal::VectorBranch< bool > & m_layMeasPhi
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:109
MuonGM::TgcReadoutElement::stripShortWidth
double stripShortWidth(int, int) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:150
MuonGM::GeoModelTgcTest::m_selectStat
Gaudi::Property< std::vector< std::string > > m_selectStat
String should be formated like <stationName><stationEta><A/C><stationPhi>
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:48
MuonGM::GeoModelTgcTest::m_layLongWidth
MuonVal::VectorBranch< float > & m_layLongWidth
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:112
MuonGM::TgcReadoutElement::stripPitch
double stripPitch(int gasGap, int strip) const
Returns the pitch of the given strip in gasGap i.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:176
python.PyAthena.v
v
Definition: PyAthena.py:157
MuonGM::MuonReadoutElement::getStationIndex
int getStationIndex() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:192
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonGM::MuonReadoutElement::getRsize
double getRsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:197
MuonGM::TgcChamberLayout
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:51
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:49
MuonGM::GeoModelTgcTest::GeoModelTgcTest
GeoModelTgcTest(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:87
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:184
MuonGM::GeoModelTgcTest::m_stripPitch
MuonVal::VectorBranch< float > & m_stripPitch
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:96
MuonGM::TgcChamberLayout::wirePitch
double wirePitch
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:57
MuonVal::CoordSystemsBranch::push_back
void push_back(const Amg::Transform3D &trans)
Definition: CoordTransformBranch.cxx:28
MuonGM::TgcReadoutElement::stripPosOnLargeBase
double stripPosOnLargeBase(int strip) const
MuonGM::TgcReadoutElement::length
double length() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:53
GeoPrimitivesToStringConverter.h
MuonVal::MuonTesterTree::fill
bool fill(const EventContext &ctx)
Fills the tree per call.
Definition: MuonTesterTree.cxx:89
MuonVal::MuonTesterTree::write
StatusCode write()
Finally write the TTree objects.
Definition: MuonTesterTree.cxx:178
MuonGM::GeoModelTgcTest::m_alignableNode
MuonVal::CoordTransformBranch m_alignableNode
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:66
MuonGM::MuonStation::hasALines
bool hasALines() const
Definition: MuonStation.h:196
MuonIdHelper::const_id_iterator
std::vector< Identifier >::const_iterator const_id_iterator
Definition: MuonIdHelper.h:143
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
TgcReadoutElement.h
MuonGM::ChamberGrp::ChamberGrp
ChamberGrp(const TgcChamberLayout &grp)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:67
MuonGM::GeoModelTgcTest::m_gangGasGap
MuonVal::VectorBranch< uint8_t > & m_gangGasGap
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:103
MuonGM::ChamberGrp::m_gaps
std::map< std::string, std::set< Identifier > > m_gaps
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:83
MuonStation.h
test_pyathena.counter
counter
Definition: test_pyathena.py:15
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
MuonGM::GeoModelTgcTest::m_ALineRotZ
MuonVal::ScalarBranch< float > & m_ALineRotZ
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:80
MuonGM::GeoModelTgcTest::m_stripTop
MuonVal::ThreeVectorBranch m_stripTop
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:85
MuonGM::MuonStation::getALine_rots
double getALine_rots() const
Definition: MuonStation.h:193
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
MuonGM::GeoModelTgcTest::m_ALineRotT
MuonVal::ScalarBranch< float > & m_ALineRotT
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:79
MuonGM::GeoModelTgcTest::m_ALineRotS
MuonVal::ScalarBranch< float > & m_ALineRotS
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:78
MuonGM::GeoModelTgcTest::m_stIndex
MuonVal::ScalarBranch< unsigned short > & m_stIndex
Identifier of the readout element.
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:58
MuonGM::MuonReadoutElement::getStationPhi
int getStationPhi() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:194
MuonGM::MuonReadoutElement::getStationEta
int getStationEta() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:193
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonGM::TgcChamberLayout::gasGap
Identifier gasGap
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:52
MuonGM::GeoModelTgcTest::m_longWidth
MuonVal::ScalarBranch< float > & m_longWidth
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.h:70