ATLAS Offline Software
MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #include "NSWGeoPlottingAlg.h"
5 
6 #include <cmath>
7 
8 #include "GaudiKernel/SystemOfUnits.h"
13 #include "TFile.h"
14 #include "TGraph.h"
15 #include "TH1.h"
16 #include "TH2D.h"
18 #include "TrkSurfaces/Surface.h"
19 
20 namespace {
21 std::string to_string(const Amg::Vector3D& v) {
22  std::stringstream sstr{};
23  sstr << "[x,y,z]=(" << v.x() << "," << v.y() << "," << v.z()
24  << ") [theta/eta/phi]=(" << (v.theta() / Gaudi::Units::degree) << ","
25  << v.eta() << "," << v.phi() << ")";
26  return sstr.str();
27 }
28 
29 } // namespace
30 
32  ISvcLocator* pSvcLocator)
33  : AthHistogramAlgorithm(name, pSvcLocator) {}
35  std::unique_ptr<TFile> out_file =
36  std::make_unique<TFile>(m_outFile.value().c_str(), "RECREATE");
37  if (!out_file || !out_file->IsOpen() || out_file->IsZombie()) {
38 
39  ATH_MSG_FATAL("Failed to create the output file " << m_outFile);
40  return StatusCode::FAILURE;
41  }
42  out_file->mkdir("SinglePads");
43  out_file->mkdir("ActiveSurfaces");
44  const MmIdHelper& mm_helper = m_idHelperSvc->mmIdHelper();
45  const sTgcIdHelper& st_helper = m_idHelperSvc->stgcIdHelper();
46  for (auto& id_graph : m_nswPads) {
47  std::unique_ptr<TGraph>& graph = id_graph.second;
48  const Identifier& id = id_graph.first;
49  bool is_mm = m_idHelperSvc->isMM(id);
50  const int stEta = m_idHelperSvc->stationEta(id);
51  const int ml = is_mm ? mm_helper.multilayer(id) : st_helper.multilayer(id);
52  const int lay = is_mm ? mm_helper.gasGap(id) : st_helper.gasGap(id);
53  const std::string ch_name =
54  (is_mm ? mm_helper.stationNameString(m_idHelperSvc->stationName(id))
55  : st_helper.stationNameString(m_idHelperSvc->stationName(id))) +
56  std::to_string(std::abs(stEta)) + (stEta > 0 ? "A" : "C") +
57  std::to_string(m_idHelperSvc->stationPhi(id)) + "W" +
58  std::to_string(ml) + "L" + std::to_string(lay);
59  TDirectory* dir = out_file->GetDirectory("SinglePads");
60  dir->WriteObject(graph.get(), ch_name.c_str());
61  graph.reset();
62  const int signed_lay = layerId(id);
63  std::unique_ptr<TGraph>& lay_graph = m_nswLayers[signed_lay];
64  if (!lay_graph)
65  continue;
66  std::string lay_name = std::string{is_mm ? "MMG" : "STG"} + "W" +
67  std::to_string(ml) + (stEta > 0 ? "A" : "C") +
68  std::to_string(lay);
69  out_file->WriteObject(lay_graph.get(), lay_name.c_str());
70  lay_graph.reset();
71  std::unique_ptr<TH1>& active_area = m_nswActiveAreas[signed_lay];
72  if (!active_area)
73  continue;
74  dir = out_file->GetDirectory("ActiveSurfaces");
75 
76  dir->WriteObject(active_area.get(), lay_name.c_str());
77  active_area.reset();
78  }
79  return StatusCode::SUCCESS;
80 }
83  ATH_CHECK(m_idHelperSvc.retrieve());
86  return StatusCode::SUCCESS;
87 }
89  if (m_alg_run)
90  return StatusCode::SUCCESS;
91  const EventContext& ctx = Gaudi::Hive::currentContext();
93  ctx};
94  if (!detMgr.isValid()) {
95  ATH_MSG_FATAL("Failed to retrieve the detector manager ");
96  return StatusCode::FAILURE;
97  }
98 
99  for (auto& id_graph : m_nswPads) {
100  const Identifier& id = id_graph.first;
101  std::unique_ptr<TGraph>& pad_graph = id_graph.second;
102  const bool is_mm = m_idHelperSvc->isMM(id);
103  const int signed_lay = layerId(id);
104  std::unique_ptr<TGraph>& wheel_graph = m_nswLayers[signed_lay];
105 
106  const MuonGM::MMReadoutElement* mm_roe =
107  is_mm ? detMgr->getMMReadoutElement(id) : nullptr;
108  const MuonGM::sTgcReadoutElement* st_roe =
109  is_mm ? nullptr : detMgr->getsTgcReadoutElement(id);
110 
111  const MuonGM::MuonChannelDesign* design =
112  is_mm ? mm_roe->getDesign(id) : st_roe->getDesign(id);
113 
114  const Trk::TrkDetElementBase* roe =
115  (mm_roe ? static_cast<const Trk::TrkDetElementBase*>(mm_roe)
116  : static_cast<const Trk::TrkDetElementBase*>(st_roe));
117  auto fill_graphs = [&](const Amg::Vector2D& locPos, int strip) {
118  if ((is_mm || std::abs(locPos.y()) < 1.e-3) &&
119  design->channelNumber(locPos) != strip) {
120  ATH_MSG_ALWAYS(" Backmapping of the strip number did not work for "
121  << m_idHelperSvc->toString(id) << " local pos: "
122  << locPos.x() << " " << locPos.y() << " "
123  << " " << design->channelNumber(locPos) << " vs. "
124  << strip);
125  return false;
126  }
127 
129  roe->surface(id).localToGlobal(locPos, Amg::Vector3D::Zero(), globPos);
130  if (pad_graph)
131  pad_graph->SetPoint(pad_graph->GetN(), globPos.x(), globPos.y());
132  if (wheel_graph)
133  wheel_graph->SetPoint(wheel_graph->GetN(), globPos.x(), globPos.y());
134 
135  return true;
136  };
137  const MmIdHelper& id_helper = m_idHelperSvc->mmIdHelper();
138  auto global_points = [&](const Identifier& id, Amg::Vector3D& left,
139  Amg::Vector3D& center, Amg::Vector3D& right) {
141  l_right{Amg::Vector2D::Zero()};
142  const MuonGM::MuonChannelDesign* design = nullptr;
143  if (mm_roe)
144  design = mm_roe->getDesign(id);
145  else if (st_roe)
146  design = st_roe->getDesign(id);
147  const int chan = id_helper.channel(id);
148  design->leftEdge(chan, l_left);
149  design->center(chan, l_cen);
150  design->rightEdge(chan, l_right);
151 
152  roe->surface(id).localToGlobal(l_left, Amg::Vector3D::Zero(), left);
153  roe->surface(id).localToGlobal(l_cen, Amg::Vector3D::Zero(), center);
154  roe->surface(id).localToGlobal(l_right, Amg::Vector3D::Zero(), right);
155  };
156 
157  const int n_strips =
158  (is_mm ? mm_roe->numberOfStrips(id) : st_roe->numberOfStrips(id));
159  for (int strip = design->numberOfMissingBottomStrips() + 1;
160  strip <= n_strips; strip += 1) {
161  {
163  if (design->leftEdge(strip, locPos) && !fill_graphs(locPos, strip))
164  ATH_MSG_DEBUG("left edge -- channel " << m_idHelperSvc->toString(id)
165  << " does not have strip "
166  << strip << "... Why?");
167  }
168  {
170  if (design->center(strip, locPos) && !fill_graphs(locPos, strip))
171  ATH_MSG_DEBUG("center -- channel " << m_idHelperSvc->toString(id)
172  << " does not have strip " << strip
173  << "... Why?");
174  }
175  {
177  if (design->rightEdge(strip, locPos) && !fill_graphs(locPos, strip))
178  ATH_MSG_DEBUG("right edge -- channel " << m_idHelperSvc->toString(id)
179  << " does not have strip "
180  << strip << "... Why?");
181  }
182  }
183  auto uv_intersects = [&]() {
185  if (design->hasStereoAngle() || m_idHelperSvc->issTgc(id))
186  return StatusCode::SUCCESS;
187  const int gap = id_helper.gasGap(id);
188  const int ml = id_helper.multilayer(id);
189  if ((ml == 1 && gap == 2) || (ml == 2 && gap == 4))
190  return StatusCode::SUCCESS;
191 
192  for (int strip = design->numberOfMissingBottomStrips() + 1;
193  strip <= n_strips; strip += 1) {
194  const int u_gap = ml == 1 ? 3 : 1;
195  const int v_gap = ml == 1 ? 4 : 2;
196  const Identifier x_id = id_helper.channelID(id, ml, gap, strip);
197  const Identifier u_id = id_helper.channelID(id, ml, u_gap, strip);
198  const Identifier v_id = id_helper.channelID(id, ml, v_gap, strip);
200  u_center{Amg::Vector3D::Zero()}, v_center{Amg::Vector3D::Zero()};
202  u_left{Amg::Vector3D::Zero()}, v_left{Amg::Vector3D::Zero()};
204  u_right{Amg::Vector3D::Zero()}, v_right{Amg::Vector3D::Zero()};
205 
206  global_points(x_id, x_left, x_center, x_right);
207  global_points(u_id, u_left, u_center, u_right);
208  global_points(v_id, v_left, v_center, v_right);
209 
210  const Amg::Vector3D x_dir = (x_right - x_left).unit();
211  const Amg::Vector3D v_dir = (v_left - v_right).unit();
212  const Amg::Vector3D u_dir = (u_left - u_right).unit();
213 
214  std::optional<double> uv_isect =
215  Amg::intersect<3>(v_center, v_dir, u_center, u_dir);
216 
217  if (!uv_isect) {
218  ATH_MSG_ERROR("Failed to intersect the uv strips for identifiers "
219  << std::endl
220  << " *** " << m_idHelperSvc->toString(u_id) << " "
221  << to_string(u_dir) << std::endl
222  << " *** " << m_idHelperSvc->toString(v_id) << " "
223  << to_string(v_dir));
224  return StatusCode::FAILURE;
225  }
226  const Amg::Vector3D uv_ipoint = u_center + (*uv_isect) * u_dir;
227  const Amg::Vector2D cen_diff = (uv_ipoint - x_center).block<2, 1>(0, 0);
228  if (cen_diff.dot(cen_diff) > std::numeric_limits<float>::epsilon()) {
229  ATH_MSG_ERROR("Expect that the uv strips "
230  << std::endl
231  << " *** " << m_idHelperSvc->toString(u_id) << " "
232  << to_string(u_dir) << std::endl
233  << " *** " << m_idHelperSvc->toString(v_id) << " "
234  << to_string(v_dir)
235  << " intersect at the center of the corresponding x "
236  "strip. But they don't. "
237  << std::endl
238  << to_string(uv_ipoint) << std::endl
239  << " vs." << std::endl
240  << to_string(x_center));
241  }
242  ATH_MSG_DEBUG("Intersection of uv is in " << to_string(uv_ipoint) << " "
243  << to_string(x_center));
244 
245  std::optional<double> ux_isect =
246  Amg::intersect<3>(u_center, u_dir, x_center, x_dir);
247  if (!ux_isect) {
248  ATH_MSG_ERROR("Failed to intersect the ux strips for identifiers "
249  << std::endl
250  << " *** " << m_idHelperSvc->toString(v_id) << " "
251  << to_string(u_dir) << std::endl
252  << " *** " << m_idHelperSvc->toString(x_id) << " "
253  << to_string(x_dir));
254  return StatusCode::FAILURE;
255  }
256  ATH_MSG_DEBUG("Intersection of xu is in "
257  << to_string(x_center + (*ux_isect) * x_dir) << " "
258  << to_string(x_center));
259 
260  std::optional<double> vx_isect =
261  Amg::intersect<3>(v_center, v_dir, x_center, x_dir);
262  if (!ux_isect) {
263  ATH_MSG_ERROR("Failed to intersect the vx strips for identifiers "
264  << std::endl
265  << " *** " << m_idHelperSvc->toString(v_id) << " "
266  << to_string(v_dir) << std::endl
267  << " *** " << m_idHelperSvc->toString(x_id) << " "
268  << to_string(x_dir));
269  return StatusCode::FAILURE;
270  }
271  ATH_MSG_DEBUG("Intersection of vu is in "
272  << to_string(x_center + (*vx_isect) * x_dir) << " "
273  << to_string(x_center));
274  }
275  return StatusCode::SUCCESS;
276  };
277  if (false)
278  ATH_CHECK(uv_intersects());
279 
280  std::unique_ptr<TH1>& surface_histo = m_nswActiveAreas[signed_lay];
281  if (!surface_histo) {
282  ATH_MSG_WARNING("No surface histo has been made for "
283  << m_idHelperSvc->toString(id) << " " << signed_lay);
284  continue;
285  }
286  const Amg::Vector3D& surf_cent = roe->center(id);
287  double d = std::max(std::max(design->xSize(), design->maxYSize()),
288  design->minYSize());
289  for (double x = surf_cent.x() - d; x <= surf_cent.x() + d; x += 1) {
290  for (double y = surf_cent.y() - d; y <= surf_cent.y() + d; y += 1) {
291  const Amg::Vector3D glob_pos{x, y, surf_cent.z()};
293  if (!roe->surface(id).globalToLocal(glob_pos, glob_pos, lpos))
294  continue;
295  if ((is_mm && mm_roe->insideActiveBounds(id, lpos, 10., 10.)) ||
296  (!is_mm && st_roe->surface(id).insideBounds(lpos, 10., 10.))
297 
298  ) {
299  surface_histo->Fill(x, y);
300  }
301  }
302  }
303  }
304  m_alg_run = true;
305  return StatusCode::SUCCESS;
306 }
308  const MuonGM::MuonDetectorManager* detMgr{nullptr};
309  ATH_CHECK(detStore()->retrieve(detMgr));
310  const MmIdHelper& id_helper = m_idHelperSvc->mmIdHelper();
311  for (const std::string station : {"MML", "MMS"}) {
312  for (int phi = id_helper.stationPhiMin();
313  phi <= id_helper.stationPhiMax(); ++phi) {
314  for (int eta = -2; eta <= 2; ++eta) {
315  if (eta == 0)
316  continue;
317  for (int ml = id_helper.multilayerMin();
318  ml <= id_helper.multilayerMax(); ++ml) {
319  bool is_valid{false};
320  const Identifier station_id =
321  id_helper.elementID(station, eta, phi, is_valid);
322  if (!is_valid)
323  continue;
324  const Identifier module_id = id_helper.multilayerID(station_id, ml);
325  if (!detMgr->getMMReadoutElement(module_id))
326  continue;
327  for (int i_layer = 1; i_layer <= 4; ++i_layer) {
328  const Identifier id =
329  id_helper.channelID(module_id, ml, i_layer, 10);
330  m_nswPads[id] = std::make_unique<TGraph>();
332  int signed_layer = layerId(id);
333  if (!m_nswLayers[signed_layer]) {
334  m_nswLayers[signed_layer] = std::make_unique<TGraph>();
335  }
336  if (!m_nswActiveAreas[signed_layer]) {
337  m_nswActiveAreas[signed_layer] = std::make_unique<TH2D>(
338  std::to_string(m_nswActiveAreas.size()).c_str(),
339  "ActiveNSW;x [mm]; y [mm]", 1000, -5001, 5001., 1000,
340  -5001., 5001.);
341  }
342  }
343  }
344  }
345  }
346  }
347  return StatusCode::SUCCESS;
348 }
350  int eta = m_idHelperSvc->stationEta(id);
351  if (m_idHelperSvc->issTgc(id)) {
352  const sTgcIdHelper& id_helper = m_idHelperSvc->stgcIdHelper();
353  int ml = id_helper.multilayer(id);
354  int lay = id_helper.gasGap(id);
355  int type = id_helper.channelType(id);
356  return (8 * (type == sTgcIdHelper::sTgcChannelTypes::Strip) + 4 * (ml - 1) +
357  (lay - 1)) *
358  (eta > 0 ? 1 : -1);
359  }
360  if (m_idHelperSvc->isMM(id)) {
361  const MmIdHelper& id_helper = m_idHelperSvc->mmIdHelper();
362  int ml = id_helper.multilayer(id);
363  int lay = id_helper.gasGap(id);
364  return (16 + 4 * (ml - 1) + (lay - 1)) * (eta > 0 ? 1 : -1);
365  }
366  return -666;
367 }
369  const MuonGM::MuonDetectorManager* detMgr{nullptr};
370  ATH_CHECK(detStore()->retrieve(detMgr));
371  const sTgcIdHelper& id_helper = m_idHelperSvc->stgcIdHelper();
372  for (const std::string station : {"STS", "STL"}) {
373  for (int eta = id_helper.stationEtaMin(); eta <= id_helper.stationEtaMax();
374  ++eta) {
375  if (eta == 0)
376  continue;
377  for (int phi = id_helper.stationPhiMin();
378  phi <= id_helper.stationPhiMax(); ++phi) {
379  for (int ml = id_helper.multilayerMin();
380  ml <= id_helper.multilayerMax(); ++ml) {
381  bool is_valid{false};
382  Identifier station_id =
383  id_helper.elementID(station, eta, phi, is_valid);
384  if (!is_valid)
385  continue;
386  const Identifier module_id = id_helper.multilayerID(station_id, ml);
387  if (!detMgr->getsTgcReadoutElement(module_id))
388  continue;
389  for (int lay = 1; lay <= 4; ++lay) {
390  const Identifier strip_id = id_helper.channelID(
391  module_id, ml, lay, sTgcIdHelper::sTgcChannelTypes::Strip, 10);
392  const Identifier wire_id = id_helper.channelID(
393  module_id, ml, lay, sTgcIdHelper::sTgcChannelTypes::Wire, 10);
394  for (const Identifier& id : {strip_id, wire_id}) {
395  m_nswPads[id] = std::make_unique<TGraph>();
396  int signed_layer = layerId(id);
397  if (!m_nswLayers[signed_layer]) {
398  m_nswLayers[signed_layer] = std::make_unique<TGraph>();
399  }
400  if (!m_nswActiveAreas[signed_layer]) {
401  m_nswActiveAreas[signed_layer] = std::make_unique<TH2D>(
402  std::to_string(m_nswActiveAreas.size()).c_str(),
403  "ActiveNSW;x [mm]; y [mm]", 1000, -5001, 5001., 1000,
404  -5001., 5001.);
405  }
406  }
407  }
408  }
409  }
410  }
411  }
412  return StatusCode::SUCCESS;
413 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
sTgcIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1017
MmIdHelper::stationPhiMin
static int stationPhiMin()
Definition: MmIdHelper.cxx:807
NSWGeoPlottingAlg::initSTgcs
StatusCode initSTgcs()
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:368
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonGM::MuonChannelDesign::xSize
double xSize() const
Definition: MuonChannelDesign.h:478
SiliconTech::strip
@ strip
NSWGeoPlottingAlg::m_nswActiveAreas
std::map< int, std::unique_ptr< TH1 > > m_nswActiveAreas
Map showing the active areas of the NSW to show the passivation.
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:45
NSWGeoPlottingAlg::initialize
StatusCode initialize() override
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:81
MuonGM::MMReadoutElement::insideActiveBounds
bool insideActiveBounds(const Identifier &id, const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const
boundary check Wrapper Trk::PlaneSurface::insideBounds() taking into account the passivated width
Definition: MMReadoutElement.h:255
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
MmIdHelper::stationPhiMax
static int stationPhiMax()
Definition: MmIdHelper.cxx:809
MuonGM::sTgcReadoutElement::numberOfStrips
virtual int numberOfStrips(const Identifier &layerId) const override final
number of strips per layer
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:408
Surface.h
NSWGeoPlottingAlg::NSWGeoPlottingAlg
NSWGeoPlottingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:31
sTgcReadoutElement.h
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
sTgcIdHelper::stationPhiMin
static int stationPhiMin()
Definition: sTgcIdHelper.cxx:1034
MuonGM::MuonChannelDesign::channelNumber
int channelNumber(const Amg::Vector2D &pos) const
calculate local channel number, range 1=nstrips like identifiers. Returns -1 if out of range
Definition: MuonChannelDesign.h:198
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
sTgcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const
Definition: sTgcIdHelper.cxx:886
hist_file_dump.d
d
Definition: hist_file_dump.py:137
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
NSWGeoPlottingAlg::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:33
MuonGM::MMReadoutElement::getDesign
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MMReadoutElement.h:191
MuonGM::sTgcReadoutElement::getDesign
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:279
sTgcIdHelper::multilayerMin
static int multilayerMin()
Definition: sTgcIdHelper.cxx:1038
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
AthHistogramming::graph
TGraph * graph(const std::string &graphName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered TGraphs.
Definition: AthHistogramming.cxx:492
x
#define x
NSWGeoPlottingAlg::m_nswLayers
std::map< int, std::unique_ptr< TGraph > > m_nswLayers
Map showing the edges of the 16 layers of the NSW.
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:43
CaloSwCorrections.gap
def gap(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:212
MuonGM::MuonChannelDesign::hasStereoAngle
double hasStereoAngle() const
returns whether the stereo angle is non-zero
Definition: MuonChannelDesign.h:78
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
ReadCondHandle.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
NSWGeoPlottingAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:37
MmIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: MmIdHelper.cxx:796
Trk::PlaneSurface::insideBounds
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override
This method calls the inside() method of the Bounds.
MuonGM::MuonChannelDesign::minYSize
double minYSize() const
Definition: MuonChannelDesign.h:480
MmIdHelper::multilayerID
Identifier multilayerID(const Identifier &channeldID) const
Definition: MmIdHelper.cxx:277
MMReadoutElement.h
sTgcIdHelper::stationEtaMin
static int stationEtaMin()
Definition: sTgcIdHelper.cxx:1030
NSWGeoPlottingAlg::execute
StatusCode execute() override
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:88
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
sTgcIdHelper::stationPhiMax
static int stationPhiMax()
Definition: sTgcIdHelper.cxx:1036
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
NSWGeoPlottingAlg.h
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::sTgcReadoutElement
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:30
sTgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: sTgcIdHelper.cxx:1020
MmIdHelper::multilayerMax
static int multilayerMax()
Definition: MmIdHelper.cxx:813
Trk::TrkDetElementBase::surface
virtual const Surface & surface() const =0
Return surface associated with this detector element.
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
sTgcIdHelper::stationEtaMax
static int stationEtaMax()
Definition: sTgcIdHelper.cxx:1032
AthHistogramAlgorithm
Definition: AthHistogramAlgorithm.h:32
beamspotman.dir
string dir
Definition: beamspotman.py:623
NSWGeoPlottingAlg::m_alg_run
bool m_alg_run
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:46
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:854
MuonGM::MuonChannelDesign::center
bool center(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the center on the strip.
Definition: MuonChannelDesign.h:484
MmIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: MmIdHelper.cxx:706
sTgcIdHelper::multilayerMax
static int multilayerMax()
Definition: sTgcIdHelper.cxx:1040
MuonGM::MMReadoutElement::numberOfStrips
virtual int numberOfStrips(const Identifier &layerId) const override final
number of strips per layer
Definition: MMReadoutElement.h:289
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
sTgcIdHelper
Definition: sTgcIdHelper.h:55
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
NSWGeoPlottingAlg::m_nswPads
std::map< Identifier, std::unique_ptr< TGraph > > m_nswPads
Map containing each PCB of the NSW seperately.
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:41
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonDetectorManager.h
python.PyAthena.v
v
Definition: PyAthena.py:154
sTgcIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: sTgcIdHelper.cxx:856
MuonGM::MuonChannelDesign::rightEdge
bool rightEdge(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the right edge of the strip.
Definition: MuonChannelDesign.h:498
MuonGM::MuonChannelDesign
Definition: MuonChannelDesign.h:24
MmIdHelper::channel
int channel(const Identifier &id) const override
Definition: MmIdHelper.cxx:800
y
#define y
MmIdHelper
Definition: MmIdHelper.h:54
MmIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: MmIdHelper.cxx:798
Trk::Surface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
MuonGM::MuonChannelDesign::maxYSize
double maxYSize() const
Definition: MuonChannelDesign.h:479
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:21
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:25
sTgcIdHelper::multilayerID
Identifier multilayerID(const Identifier &channeldID) const
Definition: sTgcIdHelper.cxx:297
NSWGeoPlottingAlg::finalize
StatusCode finalize() override
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:34
MuonGM::MuonChannelDesign::numberOfMissingBottomStrips
int numberOfMissingBottomStrips() const
Returns the number of missing bottom strips.
Definition: MuonChannelDesign.h:477
RotatedTrapezoidBounds.h
NSWGeoPlottingAlg::m_outFile
Gaudi::Property< std::string > m_outFile
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:39
MmIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Definition: MmIdHelper.cxx:736
sTgcIdHelper::channelType
int channelType(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1022
Trk::TrkDetElementBase::center
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
NSWGeoPlottingAlg::layerId
int layerId(const Identifier &id) const
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:349
MmIdHelper::multilayerMin
static int multilayerMin()
Definition: MmIdHelper.cxx:811
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106
Trk::Surface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
NSWGeoPlottingAlg::initMicroMega
StatusCode initMicroMega()
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:307
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonGM::MuonChannelDesign::leftEdge
bool leftEdge(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the left edge of the strip.
Definition: MuonChannelDesign.h:491
Identifier
Definition: IdentifierFieldParser.cxx:14